[TF] Status line variables
Brought to you by:
kenkeys
|
From: mark at mail.mumac.o. (M. Rogo) - 2003-03-11 20:20:52
|
I'm having some problems playing with my new statusline. I have
gotten all the basics to work but now I would like to play with a few of
my variables.
Basically I am having trouble modifiying my variable based on it's
value. Should be no realy problem but I am either over thinking it or my
brain has stopped working.
What I'd like it do specifically is this:
My prompt will have two things, HP and MAXHP, currently in my Statusline I
have it displayed as xxxx(xxxx), which is great. The two things I'd like
are if either of those two variables are over 9999 I'd like it to say
"LOTS". Shouldn't be too hard but my syntax or soemthing must be off.
The other thing is based my percentage of HP left I'd like the color to
change. Basically the same thing. I'm guessing I haven't quite mastered
most of the /if stuff. Any help would be great!
/def -wBLAH -mregexp -ag -t"THEPROMPT ([0-9]+) ([0-9]+)" BLAH_status \
/set hp=%P1 %; \
/set hpmax=%P2 %; \
/set hpstat=$[pad("Hp:", 3, hp, 4, "(", 1, hpmax, 4, ")", 1)] %; \
/test status_fields := status_fields
/def -h"WORLD BLAH" BLAH_activation_hook= \
/eval /set status_fields=%blah_status_bar %; \
/test status_fields := status_fields
/set blah_status_bar=:2 hpstat:13:%hpstatc
/def setprompt = prompt THEPROMPT <hp> <maxhp><newline>
/set hp=0
/set maxhp=0
/set hpstat=0
/set hpstatc=Cblue
Again I appreciate any help anyone can offer.
-Mark
|