|
Zalana Newbie
Joined: 02 May 2001 Posts: 5
|
Posted: Wed Mar 20, 2002 11:13 pm
Resetting flag |
Some reason I can't get this trigger to work.
Ive got an attack command I set in the prompt and right now it keeps flooding on me. Im trying to set it to wait until Ive completed the attack before firing again.
#VAR Attackpending 1
#tri ((%w) Now!+) {#if (@attackpending=0) %1;#var @attackpending,1 {#noop}
I've got another trigger to reset the flag once ive completed the attack
#tri (you bop someone) {#var Attackpending,0}
Thanks in advance for any help. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Mar 21, 2002 12:15 am |
You have the wrong syntax for the #VAR command and #IF command. Try changing your script to this:
#VAR Attackpending 1
#tri {(%w) Now!+} {#if (@attackpending=0) {%1;#var @attackpending 1} {#noop}}
#tri {you bop someone} {#var Attackpending 0}
Kjata |
|
|
|
Zalana Newbie
Joined: 02 May 2001 Posts: 5
|
Posted: Thu Mar 21, 2002 5:44 am |
Some reason with the above corrections the trigger isn't firing at all now.
{#if (@attackpending=0) {%1;#var @attackpending 1} {#noop} |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu Mar 21, 2002 12:38 pm |
Did you enter the commands I posted directly in the command line and hit enter or did you use the Settings Editor. If the latter is true, then make sure that in the settings editor you used:
Pattern: (%w) Now!+
Value: #if (@attackpending=0) {%1;#var attackpending 1} {#noop}
Also, notice that when you create the attackpending variable, you are setting its value initially to 1 which will prevent the trigger from doing anything until you receive the line "you bop someone".
Finally, I forgot about one other change that you needed to do, here is the script again in command-line format (I also changed the initial value of the attackpending variable just in case):
#VAR Attackpending 0
#tri {(%w) Now!+} {#if (@attackpending=0) {%1;#var attackpending 1} {#noop}}
#tri {you bop someone} {#var Attackpending 0}
Kjata |
|
|
|
|
|