"Keep evaluating", and multi and single line triggers

Posted by Wink on Sun 06 Mar 2005 07:31 AM — 5 posts, 20,645 views.

#0
I seem to be encountering a snag concerning the "keep evaluating" option and two triggers.

Here's the output:
My friend, clearly you know little of the sultry tango, if you think that you
can perform it without a partner.

I have a multiline trigger that responds to the full two lines of output:
My friend\, clearly you know little of the sultry tango\, if you think that you \ncan perform it without a partner\.\Z


As well as a single line trigger that responds to only the second line of output:
^can perform it without a partner\.$

Both triggers are set to "keep evaluating", but that's where I run into my dilemma. My single line trigger will only fire if I set it at a lower sequence number than the multiline trigger. So the execution ends up being single line trigger, multiline trigger.

My questions is this: Is it possible to make the multiline trigger fire first, and have the single line trigger fire second?

I believe I can work around this using an enabling/disabling system for the trigger for both lines of output, but I'm wondering if there's another method that I'm missing. Thanks for any response.
Poland #1
What comes to my mind is something along the lines of: make a multiline trigger matching ^(.*)\ncan perform it without a partner\.
When the trigger fires, you would use a script to check whether the first line matches "My friend..." and do the desired action basing on the check's result.
Australia Forum Administrator #2
There is a test in the code for MUSHclient that suppresses "keep evaluating" for multi-line triggers.

It is easy enough to remove, and unfortunately there is no comment on it to remind me why I put it there.

It is either there for a good reason, or is simply a mistake. Can anyone think of a reason why "keep evaluating" might be a bad idea for multi-line triggers?
#3
Thanks for the suggestion, Scypio, but the actual problem here was what I thought my requirements were.

I was actually in the process of trying to build your suggestion, when I realized that I was being rather foolish about all this. Basically my requirements were less elaborate than I'd managed to convince myself previously, and all that I had to do was take the commands to be executed on the single line trigger, copy them, and add them to the multi-line trigger to occur after the original multi-line trigger commands (if any of that sentence makes sense). So whether or not the multi-line trigger managed to suppress the single line trigger, one way or another the commands would get executed in the order I wanted.
Amended on Sat 26 Mar 2005 06:36 AM by Wink
Australia Forum Administrator #4
This has arisen again, so in version 3.73 the test has been removed. Hopefully there won't be side-effects.