Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Zalana
Newbie


Joined: 02 May 2001
Posts: 5

PostPosted: 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.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
Zalana
Newbie


Joined: 02 May 2001
Posts: 5

PostPosted: 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}
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: 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
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net