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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Sat Dec 20, 2008 5:45 pm   

Help creating trigger
 
I want to trigger a specific.

the output looks like this

Status of Player: 3072/3950 hp 1337/326 sp

I tried setting up this, but obviously it's not working else I'd not be here

#TR {Status of Player: *} {#wri 1 {%-1}}

I set up #file 1 player.txt

Anyone have any other suggestions. I don't want to use #log, just that specific line.

guess I could always send it to another window and log that window.. but I don't like losing that much space to a 2nd window...

thanks to all who can help.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Dec 20, 2008 6:29 pm   
 
Are there many lines like this that you want to write to a file? Because #log and #writelog and #gaglog might be the way to go.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Sat Dec 20, 2008 6:32 pm   
 
hundreds.. from 1-10 per round of combat and they're mixed in combat spam also.
Reply with quote
Tech
GURU


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

PostPosted: Sat Dec 20, 2008 6:33 pm   
 
You are missing the parentheses around the '*' which tells CMUD to capture the pattern into something you can use.

Code:
#TR {Status of Player: (*)} {#wri 1 {%1}}
should be closer to what you want.

If you just want to keep track of it why not store it in a variable or even a CMUD database, unless you want to look at the file offline without using CMUD. If you say exactly what you want to accomplish I'm sure we can provide a few ideas.
_________________
Asati di tempari!
Reply with quote
Loftaris
Adept


Joined: 24 Aug 2004
Posts: 277

PostPosted: Sat Dec 20, 2008 6:36 pm   
 
I want to keep a log of it so that I can share it with other people.

But if that simply writes what I need to the file, then we're golden. Thanks again.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Sat Dec 20, 2008 11:44 pm   
 
It does, but you'll find #log a much easier way to do this. It's much simpler to exclude the lines you don't want with #gaglog that it is to include every line you do want (all hundreds of them) with #write.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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