|
flipwon Beginner
Joined: 09 May 2008 Posts: 10
|
Posted: Sat May 10, 2008 7:13 pm
Gag |
Okay i don't really know how to explain this but i guess ill try
im making a trigger that responds to
hello
for example
so that trigger does its magic, but during that,
man goes hello
man waves hello
will show up, and it will trigger the trigger, again, twice
im trying to "gag" the line from man goes and the one following so the trigger doesnt set off for anything but the plain hello
but i guess it un-gag's it when the trigger is active.. when its off it gags fine but sinse the trigger responds to it
it un-gag's itself.. any ideas?
and toggling after the first line and on after the other 2 doesnt work.. anyways
any help? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat May 10, 2008 7:39 pm |
Your explanation was very difficult to follow. It sounds like you want a trigger to only run once and then not run again until it's finished.
#trig {hello} {#if (!@running) {running=1;do something;running=0}}
If we saw your actual code and the actual lines you're trying to match, though, we might be able to offer a better solution. |
|
|
|
flipwon Beginner
Joined: 09 May 2008 Posts: 10
|
Posted: Sat May 10, 2008 8:33 pm |
okay im trying to make a trigger execute upon a single word.. the whole line is just that word
hello
(trigger goes off)
when it see's hello, to active.. BUT it activates when the word is in any line, at all
example
blahblahblah blah blah blah hello
blahblahblah hello
(trigger goes off twice)
i want it to only activate when it see's the word and only the word, not the word in a sentence
the gist of what im trying to do, is bot my guy on a mob
when it sees elven mother, it runs its script to kill it
but while it's killing it, it says elven mother while i hit it.. so i dont want it to set off a bunch of times while im hitting it
only when it sees it present via look or entering the room
what im thinking of, is
before i see the mob, the trigger is "on"
once i see it the first time, i toggle the trigger off i guess..
once it sees elf dies, toggle the trigger on
im not sure how to do this though as im a zmud noob :) |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat May 10, 2008 8:56 pm |
Change the pattern to ^hello$. ^ means the start of the line, $ means the end of the line. Read the Bible.
If you give the trigger an ID, you can turn it on and off using #t+ and #t-. |
|
|
|
flipwon Beginner
Joined: 09 May 2008 Posts: 10
|
Posted: Sat May 10, 2008 9:10 pm |
how do i give a trigger an id?
could you give me a quick example of giving it an id, and turning it on and off? :D
thanks for the other part too that works awesome
but if you tell me how to do that i can kill 2 at a time :D |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat May 10, 2008 9:55 pm |
In the command, it goes before the pattern:
#trig "MyTrig" {Test Pattern} {#say Omg I fired!}
#say Test Pattern
#t- MyTrig
#say Test Pattern
#t+ MyTrig
#say Test Pattern
If you're using the GUI, there's a box labelled ID, and you put the value you want in it. |
|
|
|
|
|