Hello,
I would like some advice on writing a trigger to capture and store two consecutive lines of text for my mapper script.
On any player movement, the MUD generates two consecutive lines with Room Description and Exits, such as:
A City Sidewalk
(Exits: n e w s)
How can I make a trigger that will react to the "Exits" line and also capture the previous line, which can be any string of characters? I know how to write the regex for the "Exits" line alone, but I am at a loss for how to write a two-line trigger that matches "Line 1: [Anything], Line 2: (Exits: ...)".
Any help greatly appreciated, as always!
Capturing Two Lines of Text
Re: Capturing Two Lines of Text
And you'll want to tick the 'multiline / AND Trigger' and set line delta to 1. Hope this helps.
Last edited by Belgarath on Thu Apr 16, 2015 7:49 am, edited 4 times in total.
Re: Capturing Two Lines of Text
Thank you for having a look at this. I created the trigger you described above, and it does capture the room description and exits... but, it also captures every other line of text sent by the MUD. (I checked this by clicking the "highlight" checkbox and setting the foreground/background colors to something distinct.) Every line is matching the trigger.
I did verify that Multiline/ALL is selected, and line delta set to 1.
I did verify that Multiline/ALL is selected, and line delta set to 1.
Re: Capturing Two Lines of Text
I tested it myself and it only captured my room exits and the previous line. I'm not sure why it is matching every line for you.