|
MNGrizzly Novice
Joined: 18 Dec 2006 Posts: 47
|
Posted: Sat Jan 06, 2007 6:51 am
Multiline Triggers and/or #COND, Having no Luck |
I've tried every possible way I can think of to make this trigger work... testing with echoes. This is on Achaea.
You eat a goldenseal root.
Your mind relaxes and you feel as if you could sleep.
I've tried making it a regex with and without \n between the lines.
I've tried making it a normal trigger with and without a $ between the lines.
I've tried all combinations of the above.
I've tried using #COND to make this a multistate trigger....
and no luck with any of these.
I could probably kludge this together using variables, but I'd prefer to keep it clean with a mulit-line trigger. I'm not sure if this is a CMUD issue or a me issue, so I figured I'd see if anyone else has had any luck getting two-line triggers to work. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sat Jan 06, 2007 7:42 am |
I use conditional triggers alot so they are working. entering this at the command line should work no problem.
#TRIGGER "goldenseal" {You eat a goldenseal root.} {}
#COND {Your mind relaxes and you feel as if you could sleep.} {Do whatever here.} {within|param=1} |
|
|
|
MNGrizzly Novice
Joined: 18 Dec 2006 Posts: 47
|
Posted: Sat Jan 13, 2007 4:35 pm |
I have been able to get some of this working now using conditional triggers, however I find that attaching more than one condition to a trigger will cause it to stop working.
I've had some for the goldenseal example I gave earlier that will work when only one cure/condition is attached to the trigger, but once I add a condition for a second cure, it will stop firing. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sat Jan 13, 2007 6:34 pm |
Examples of whats not working please, (output and what you have tried).
|
|
|
|
MNGrizzly Novice
Joined: 18 Dec 2006 Posts: 47
|
Posted: Sat Jan 13, 2007 11:44 pm |
Well, one example was the original goldenseal trigger I listed here.
I'm doing all of this through the settings editor...
If I create a trigger "You eat a goldenseal root.", that will always fire.
If I add a #Cond/state to that trigger for "Your mind relaxes and you feel as if you could sleep." and set it as Within 1 line, then when it sees:
You eat a goldenseal root.
Your mind relaxes and you feel as if you could sleep.
Both the main trigger and the #COND fire correctly. Then, if I select my main "You eat a goldenseal root" trigger and choose "Create a New Trigger State.", and then add a second condition for "Your insomnia has been cleared by the goldenseal." that seems to prevent any of the conditions from firing.
For example, with that trigger, when I see:
You eat a goldenseal root.
Your mind relaxes and you feel as if you could sleep.
or
You eat a goldenseal root.
Your insomnia has been cleared by the goldenseal.
then the value for the "You eat a goldenseal root." trigger fires, but nothing for the second messages.
I can however get this to work by creating a second (and third, and fourth) trigger for "You eat a goldenseal root." and then just adding one condition to it for each multi-line pair I want to watch for. It would be a little cleaner if I could have all of these just be conditions of one trigger, obviously, but it works this way. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jan 14, 2007 1:41 am |
You are operating under a misconception about multi-state triggers. Your example looks like this:
You eat a goldenseal root. (State 0)
Your mind relaxes and you feel as if you could sleep. OR Your insomnia has been cleared by the goldenseal. (State 1)
The trigger you've created to match that looks for something like this instead:
You eat a goldenseal root. (State 0)
Your mind relaxes and you feel as if you could sleep. (State 1)
Your insomnia has been cleared by the goldenseal. (State 2)
Basically, states equate to the number of lines in the pattern you want to match. To get the effect you want, you need to use the stringlist pattern:
#condition {{Your mind relaxes and you feel as if you could sleep.|Your insomnia has been cleared by the goldenseal.}} {stuff} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|