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


Joined: 18 Jun 2008
Posts: 1

PostPosted: Fri Feb 13, 2009 12:01 am   

#IF to change colors
 
Ok basically during combat or whenever you type hp you get a prompt that looks like this:

HP: N/N SP: N/N EP: N/N

What I would like to do is have the current hp portion to color dependent on how low it is. Originally, I tried a #cw, but that just creates a new trigger and that is not going to work for me. #pcol works...sometimes. It worked, colored exactly what I wanted, and then suddenly it stopped and only colored the last two numbers in the max hp number rather than the current hp. So, now I'm out of ideas.

It seems like stuff would work fine when I typed hp, but would break in combat when the prompt is coming up on its own.

Ideas?

ETA: I figured out why it doesn't work in combat. *insert eyeroll for stupidity here*
Reply with quote
Tech
GURU


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

PostPosted: Fri Feb 13, 2009 12:39 am   
 
Try something like this

Code:
#TRIG {((HP: )(%d)/(%d))} {#IF (%float(%3)/%4) < 0.25 ) {#SUB {%2<color 'red'>%3</color>/%4}}


Although for something like this I find the Gauge buttons more useful.
_________________
Asati di tempari!
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