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
aslanthekat
Novice


Joined: 17 Sep 2007
Posts: 44
Location: Missouri

PostPosted: Thu Jul 12, 2012 8:04 pm   

Coloring
 
Lets say my mud prompt looks something like <2900hp
But the color of my hp doesn't always stay the same <1900hp

How do I store the value of my hp in a variable, including the color? Then I can use it with #sub and such.

Thanks
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Jul 12, 2012 8:48 pm   
 
When you make your trigger, mark the checkbox for ANSI trigger. Then cut and paste the mud prompt from the mud into the pattern. Edit the pattern, replacing everything after "<" and before the escape code which precedes "hp" with "(*)". In your trigger script, set your variable to %1.

If there is no escape code before the "hp" in the green-number example, then it will be trickier. In that case you will have to have an optional escape code.

If you can't get it to work, cut and paste the actual text from the mud, including ansi codes, inside [code] ... [/code] tags here and we can write it for you.
Reply with quote
aslanthekat
Novice


Joined: 17 Sep 2007
Posts: 44
Location: Missouri

PostPosted: Thu Jul 12, 2012 9:00 pm   
 
Thanks for the reply.

I can probably write up the more complicated script. I just wanted to make sure I wasn't missing a built in function or command that would make this simple(r). If I get stumped, you'll be hearing from me.
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