[Code] Prompt Change Colors based on HP

From: Travis Turner (turnert@galstar.com)
Date: 02/04/97

I've tried at this with no luck for a while.. and have seen it before on 
the list.. but it was a while back and i didnt save it..

What i'm looking for is whan a player goes below 100% change the color of 
the HP numbers to blue, 50% Yellow, 25% Red, etc..   I've tried the 
following where it would use green at 100%, but anything under would give 
a normal color..
{ dunno if this code is abso correct as i have it.. writing in mailer }

percent = ((GET_HIT(ch) / GET_MAX_HIT(ch))*100);

   if percent >= 100 then sprintf(procol, "%s", CCBGRN(ch, C_NRM)); 
   if percent < 100 then sprintf(procol, "%s", CCCYN(ch, C_NRM)); 
   if percent < 50 then sprintf(procol, "%s", CCBYEL(ch, C_NRM)); 
   if percent < 25 then sprintf(procol, "%s", CCBRED(ch, C_NRM)); 
   if percent < 0 then sprintf(procol, "%s", CCBBLK(ch, C_NRM));

thankx for any help...

On Tue, 4 Feb 1997, Daniel Koepke wrote:
> "We are sticking with coverage on the OJ Simpson civil trial verdict.
> The president's Sate of the Union address has been tape delayed and
> will be shown in it's entirity at the conclusion of our coverage."

thats.. sad..
    ~~~                                 Travis Turner
    O O -- Smile, theres gotta          turnert@galstar.com
     .   be someone out there that      http://www.galstar.com/~turnert
    \_/        likes ya :)              ftp://ftp.galstar.com/users/turnert

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |

This archive was generated by hypermail 2b30 : 12/18/00 PST