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
Vunutus
Newbie


Joined: 18 Jul 2007
Posts: 6

PostPosted: Wed Aug 29, 2007 3:03 am   

Setting a trigger to fire on every line of text sent from the MUD?
 
In short, I want to create a different, custom, type of logging. I hope to be able to write every line sent from the MUD to a file along with some of my own extra information. How do I create a trigger to do this? I tried setting a trigger with * as the pattern, but it fired on EVERY SINGLE CHARACTER, which zMUD does not like (it responds by shutting down my script).

Does anyone have a better solution for me?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4672
Location: Pensacola, FL, USA

PostPosted: Wed Aug 29, 2007 3:17 am   
 
#TR {$} {#WRITE 1 {%line}}

or some such, you need to set up a #FILE first to #WRITE too
_________________
Discord: Shalimarwildcat
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Aug 29, 2007 3:19 am   
 
Triggers only fire once each time thier firing conditions are met. The condition include first the newline and prompt options, second the pattern. So you should not have the trigger firing with every character. Please check through the options on your trigger. Also in order to do what you want you will have to read the help on the #FILE, #WRITE, and #CLOSE commands.

On a side note there is a character mode that is mostly never used, I am quite sure though that it only affect how your inputs are sent and not how triggers are handled.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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