|
Vunutus Newbie
Joined: 18 Jul 2007 Posts: 6
|
Posted: 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? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4672 Location: Pensacola, FL, USA
|
Posted: 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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
|
|