|
annex187 Beginner
Joined: 16 Mar 2003 Posts: 16 Location: USA
|
Posted: 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.
|
|
|
|
Slaem Apprentice
Joined: 20 Sep 2005 Posts: 135
|
Posted: Mon Sep 26, 2005 9:52 am |
Have you checked out #STATE ?
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
annex187 Beginner
Joined: 16 Mar 2003 Posts: 16 Location: USA
|
Posted: 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.
|
|
|
|
|
|