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


Joined: 28 Jun 2005
Posts: 1

PostPosted: Wed Jun 29, 2005 12:03 am   

How do I capture a line to a file?
 
I want to keep track of all my gains for a character. When I gain a level the mud tells me: You raise a level! You gain X/YYY hps X/YYY mana X/YYY move. I want a trigger that will capture that line and write it to a file: CharGains.

How do I set this up?
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Jun 29, 2005 2:17 am   
 
#TR "log_gains" {^You raise a level! You gain %d/%d hps %d/%d mana %d/d move.} {
#FILE 1 CharGains.txt
#WRITE 1 {%line}
}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jun 29, 2005 9:14 am   
 
#TR "log_gains" {^You raise a level! You gain %d/%d hps %d/%d mana %d/d move.} {
#FILE 1 CharGains.txt
#WRITE 1 {%line}
#CLOSE 1}

It is poor resource management to not cleanup and release a used resource when your done with it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Jun 29, 2005 11:19 pm   
 
*bonk self*

I totaly meant to put that in too :p See what 15 hours of hard work a day does to you when you get home!
_________________
Zmud Support Library
Zmud Knowledge Base
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