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
annex187
Beginner


Joined: 16 Mar 2003
Posts: 16
Location: USA

PostPosted: Mon Sep 26, 2005 8:38 am   

Resetting #TRIGGER #COND?
 
I'm making a script to gather data from lines of text, and stop gathering when a certain pattern is received from the mud. Ideally, I want to gather three values and then stop when the line is received. My script works great as long as there are at least three matching items, but when there are two or less it gives me trouble. The last #COND in the trigger is never reached, because the trigger itself and first two conditions gather the data values and after the third is gathered, the next state sends the attack command to the mud. So if there aren't at least three matching values, the attack command is never sent. My question is, is there anyway to reset a trigger so that it goes back to the first condition (line 0)? I've searched the help files and forums, but really don't even know what criteria I should be using to search. Any help would be appreciated.
Reply with quote
Slaem
Apprentice


Joined: 20 Sep 2005
Posts: 135

PostPosted: Mon Sep 26, 2005 9:52 am   
 
Have you checked out #STATE ?
_________________
Show your love.
Support Zugg Software!
Donate to zugg@zuggsoft.com with PayPal Send Money.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Sep 26, 2005 8:12 pm   
 
You might also want to use a sperate trigger for the "third" state since it can occur at other points. Simply turn it off and on with #T- and #T+ respectively as your reach the correct states. Then you can use %state and #STATE with the other trigger to properly control it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
annex187
Beginner


Joined: 16 Mar 2003
Posts: 16
Location: USA

PostPosted: Tue Sep 27, 2005 3:41 am   
 
Thanks a lot guys, #STATE is exactly what I was looking for. Also thanks to Vijilante for the extra input.
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