 |
atpeace Novice
Joined: 26 Jan 2009 Posts: 32
|
Posted: Wed Jan 28, 2009 1:21 pm
Telnet Trigger for data containing <LF> midline. |
Achaea sends:
(From Debug Window)
12.289 | a Achaea.m #Telnet 200: Char.Vitals<LF>H:3180/3180 M:2942/3498 E:14800/14800 W:14800/14800 NL:15/100
A Telnet Trigger (*) on channel 200 will return in %1 Char.Vitals and %2 will be blank.
no doubt because of the <LF> in the line
I have to set a multi Telnet trigger on channel 200 for :
State1 : ^Char.Vitals
State2 : H:(%d)/(%d) M:(%d)/(%d) E:(%d)/(%d) W:(%d)/(%d) NL:(%d)/100$
to capture this data, but it only captures the actual stats every other time this data is sent as the trigger state goes from one to two and then back again.
A single Telnet trigger on 200 of H:(%d)/(%d) M:(%d)/(%d) E:(%d)/(%d) W:(%d)/(%d) NL:(%d)/100$ doesn't fire at all.
Anyone managed to get this data every time it has been sent? |
|
|
 |
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Wed Jan 28, 2009 2:21 pm |
I use regex, so make sure that's ticked if you use this pattern:
Code: |
^Char\.Vitals\nH:(\d+)/(\d+) M:(\d+)/(\d+) E:(\d+)/(\d+) W:(\d+)/(\d+) NL:(\d+)/100\s*$ |
the \n matches a single line feed character. |
|
|
 |
atpeace Novice
Joined: 26 Jan 2009 Posts: 32
|
Posted: Wed Jan 28, 2009 2:32 pm |
Thanks!
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jan 28, 2009 5:29 pm |
The (*) doesn't match a LF character. But you can use a %lf character in your pattern. For example:
Code: |
^Char.Vitals%{lf}H:(%d)/(%d) M:(%d)/(%d) E:(%d)/(%d) W:(%d)/(%d) NL:(%w)/100 |
and that should work if you don't want to use a regex.
You cannot use a multi-state trigger for this because the LF in the telnet trigger is not a true "newline" from the MUD. It's considered part of the ATCP data itself. |
|
|
 |
|
|