|
jluce7 Beginner
Joined: 20 Dec 2005 Posts: 22
|
Posted: Tue Jan 10, 2006 12:31 am
Trying to set up a multistate Trigger |
I play Achaea, and in it, there are snakes that can perform illusions to make you *THINK* you have been afflicted. A doublestab (DTAB) can normally give two afflictions at once, a bite, only one. However, against a doublestab, rebounding stops it. A bite is stopped by sileris. My question is, if I set up a multistate trigger with basically all the affliction msgs, can it be done like this?
Example of a possible DSTAB :
%1 pricks you twice in rapid succession with {his|her} dirk.
Hmmmm. Why must everything be so difficult to figure out?
You feel ugliness radiating from you.
Sample Code:
#TR {^%1 pricks you twice in rapid succession with {his|her} dirk.$} {}
#COND {^Hmmmm. Why must everything be so difficult to figure out?$} {#IF @reboundingup="yes" {#ECHO ILLUSION} {do the cure for this}
#COND {^You feel ugliness radiating from you.$} {#IF @reboundingup=yes {#ECHO ILLUSION} {cure it}
#COND
Basically..can I set the DSTAB message as the trigger, then just put all 100 possible affliction msgs into the COND lines? Will this work or would it have to be one #COND msg at a time? THANKS ahead of time, for some reason I couldn't find multistate triggers in the help files. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Jan 10, 2006 2:09 am |
#TR "DStab" {^%w pricks you twice in rapid succession with {his|her} dirk.$} {#IF (@reboundingup="yes") {#STATE Dstab 0}}
Why even bother allowing extra conditions to be triggered if you can determine it is an illusion earlier.
You can use something like:
#COND {} {CurrentAffliction=%db(@AfflictionsRec,%line);add @CurrentAffliction to healing queue} {looplines|param=2}
To put them in your queue if you establish a record type variable with all the line texts and appropiate affliction codes for your scripts. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
jluce7 Beginner
Joined: 20 Dec 2005 Posts: 22
|
Posted: Tue Jan 10, 2006 2:22 am |
Ok, so I can just set it so that basically
#TRIGGER {^Hmmmm. Why must everything be so difficult to figure out?$} {#IF DSTAB=0 {#ECHO illusion} {cure}}
would this work? or would it be @dstab? I am so new to this it's not even funny and I have no prior scripting knowledge so, going off what I can assess from poking around the boards here.
Basically I have every affliction msg, and they are all triggered already with the cure, but I wanted to try and add some degree of anti illusioning capacity. If this would work, it would help with a lot to start with.
(Hence why I was looking for a simple trigger setup). Just out of curiousity though, would the way I suggested work? |
|
|
|
jluce7 Beginner
Joined: 20 Dec 2005 Posts: 22
|
Posted: Tue Jan 10, 2006 5:49 pm Possible Reparsing? |
Ok, I discussed this with someone that had a decent amount of programming skill and they said what I was trying to do wouldn't work, as it would just check to see if the msg was matched, if not, it would stop. However they said I may be able to use REPARSE to get it to work.
My question is, how do I use reparse?
This is a small example of the possible afflictions....
#TRIGGER {^%w pricks you twice in rapid succession with {his|her} dirk.$}
#COND {^Your insomnia has cleared up.$} {cure} {reparse}
#COND {^You feel light headed and dizzy.$} {cure} {reparse}
#COND {^Something interferes with your ability to clot.$} {cure} {reparse}
#COND {^You swoon as you suffer a toxic relapse.$} {cure} {reparse}
#COND {^You gasp as your fine-tuned reflexes disappear into a haze of confusion.$} {cure} {reparse}
Would this work for this message?: (assuming rebounding was not on and I needed to actually heal this)
Johnnyboy pricks you twice in rapid succession with {his|her} dirk.
Your insomnia has cleared up.
You gasp as your fine tuned reflexes disappear into a haze of confusion.
Basically, I need it to check the whole list of possible affliction msgs and cure them but I am trying to not have to get crazy with it since these afflictions only come if I am DSTABd or bit. So I want it to check the first msg, check rebounding, then if rebounding is down, heal each one. Can this be done with two triggers (bite msg and DSTAB msg) and all the afflictions as #COND?? |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Tue Jan 10, 2006 10:07 pm |
Your first #COND shouldn't be reparse, or it will try to reparse the line matched in the first state (the dstab message). That second state (or first condition) should be something like {looplines|param=2}. Doing the reparse over two lines is iffy, though. I take care of this sort of thing by just setting a flag and unsetting it on the next prompt (with a simpler two-state trigger) and separate triggers for all the afflictions that check the flag before marking the affliction. Obviously, there's a little more to it than that, but that's the basic method I use.
|
|
|
|
|
|
|
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
|
|