1. The simplest solution would be to set your screen width to 0, thus letting the MUD send all responses to your commands as single lines of unlimited length. Mudlet will wrap the lines for you according to your line wrap settings. This makes scripting *much* easier.
2. If you MUD doesnt support this feature (most big MUDs do though) you have to write a proper multiline trigger using the multistate machine -> pattern list.
Triggers are run on the entire line as sent by the MUD. You can use our multi condition AND trigger feature to accomplish what you want to do. The trigger will fire when all conditions are true i. e. when all patterns on the pattern list of the trigger have been found within the delta of lines defined in the trigger AND condition (=line margin).
a) In your example the pattern can occur in 1 or 2 lines -> set line delta to 2.
b) first pattern type regex:Though too far away to accurately perceive details, you see that (\w+) is in
second pattern type regex:^(.*)\.$
script:
Code: Select all
echo( "GOT: person=" .. multimatches[1][2] .. " city=" .. multimatches[2][2] )