Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
atpeace
Novice


Joined: 26 Jan 2009
Posts: 32

PostPosted: 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?
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: 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.
Reply with quote
atpeace
Novice


Joined: 26 Jan 2009
Posts: 32

PostPosted: Wed Jan 28, 2009 2:32 pm   
 
Thanks!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net