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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Zazou
Beginner


Joined: 19 Feb 2007
Posts: 13

PostPosted: Mon Feb 19, 2007 6:10 pm   

Special characters within a match
 
Hi,

I'm trying to capture what is sent by the MUD (including character codes) and write it to a file. My trigger is
Code:
^(*)$
with the command
Code:
#write 1 "%1"
in it.

However, if %1 contains % codes in it, some of them are removed. In fact, zMud removes exactly one from a series of them unless that would leave none (so %%% becomes %%, %% becomes %, and % stays %).

I've tried using %* in my trigger in place of *, I've tried writing using %expand() and %literal(), and all manner of %replace() statements.

How can I stop zMud removing %s?

Many thanks.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Feb 19, 2007 6:47 pm   
 
It sounds to me like you really want to use the #LOG command which basically logs all data sent to and received from the MUD. You can even capture ANSI color escape codes via an option in the preferences menu.
_________________
Asati di tempari!
Reply with quote
Zazou
Beginner


Joined: 19 Feb 2007
Posts: 13

PostPosted: Mon Feb 19, 2007 7:00 pm   
 
Thanks for the suggestion!

#log is somewhat similar, but I'm only capturing certain lines, not all (the trigger isn't *just* the #write command, there's an #if). The file also needs to be updated at least every ~50ms, which it doesn't seem #log would be too happy about.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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