Need a method to manually terminate the multi-line trigger

Posted by Zhenzh on Mon 15 Jan 2018 08:59 AM — 3 posts, 15,581 views.

China #0
I'm using multi-line trigger to capture the description of a room. The general description looks like:

Roomename -
Roome description line 1
Roome description line 2
Roome description line 3
...
Roome description line n

Roome exit is xxx


The trigger I have is:
^(\S+) - \n(?:(.*)\n)*
Enabled multi-line flag and set max_line to 10 as I don't know how many description lines a room may has.

In the sendto section, I compare all captured strings and keep on con-cat them until the string "exit is" is found.

I tried disabling the trigger at "exit is" being found. The trigger works find at the first time I looking at a room whose description lines are less then 10(suppose it's 5 lines in this topic).

But the problem comes when I enable the trigger again to capture another room. The trigger immediately compared 5 more noisy lines before I looking at a new room.

Seems the multi-line trigger will not reset and start a new comparison before the previous compare completing specified lines.

This my case, I specified max line to 10 while the first trigger was disabled at the 5th line room description. When the trigger is re-enabled, it directly capture the rest 5 lines.

I wonder is there any way to manually terminate/reset the previous used multi-line trigger?

I mean when I think the captured lines are enough for the current trigger, I can force get ride of comparing the rest lines.

I have also tried one-short flag to auto-delete the multi-line trigger itself but the trigger was deleted immediately after completing 1st line, the other multiple lines were ignored. Seems one-short can not support multi-line trigger.
Australia Forum Administrator #1
Template:faq=37
Please read the MUSHclient FAQ - point 37.


The above link shows a much easier way of doing this, with much more control over what is matched.
Amended on Mon 15 Jan 2018 09:04 AM by Nick Gammon
China #2
Thank you so much.
That's what I'm looking for.