Capturing Two Lines of Text
Posted: Fri Apr 10, 2015 8:44 pm
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!
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!