| Message |
Well, it was a little trickier than I expected to get right, but this should work.
First, make a script file if you don't have one already, and put this into it:
Sub OnChat (name, line, wildcards)
Dim msg
msg = Split (wildcards (10), chr (10))
For Each m In msg
AppendToNotepad "Chats", m & vbCrLf
Next
end Sub
The reason for this script is to split up the incoming line at line feeds, and append them to the notepad with a carriage-return/linefeed combination, otherwise the multiple lines appear as little black squares.
Next, paste in this trigger:
<triggers>
<trigger
enabled="y"
lines_to_match="10"
match="^\(Serpentlords\): (.*?) "([^"]+)"\Z"
multi_line="y"
name="chats"
regexp="y"
script="OnChat"
sequence="100"
>
</trigger>
</triggers>
This matches the "Serpentlords" chats, however you can have more than one like this: "Ashura|Serpentlords" (instead of just "Serpentlords").
It then matches up to 10 lines (you can change that) looking for the closing quote symbol, and accepting any characters, including newlines, but excepting the quote symbol itself. The reason for that is to stop the same line matching more than once. It calls OnChat script routine, which then breaks up the matching line and appends it to the notepad window.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|