|
Retrovirus Wanderer
Joined: 13 Jul 2002 Posts: 51 Location: Malaysia
|
Posted: Mon Jul 15, 2002 11:44 am
Whiner Help. |
A bit messy but cope with me please.
#pattern
^<(%1)hp (%2)ma (%3)mv
#command
#var mana_variable %2
#var mv_variable %3
#math need_hp @maximum_hp-%1
#math need_mana @maximum_mana-%2
#math percent_hp 100*%1/@maximum_hp
#if @whiner_variable=1 {#if (%1 < @hp_variable) {#math delta %1-@hp_variable
#math whiner_hp @maximum_hp-%1
grouptell d02@delta c11Oc15uc04cc06hc08!c02 [~Hp: %1 c11/ @maximum_hpc02~] To Full-->:~(c06@whiner_hpc02~) d02Gd04ld06oc15wc02 : a06a02c15@char_sanc_counta01 }
#if (%1 > @hp_variable) {#math delta %1-@hp_variable
#math whiner_hp @maximum_hp-%1
grouptell c11~+@delta c15Ac11hc08hc06hc04!c02 [~Hp: %1 /c11 @maximum_hpc02~] To Full-->:~(c06@whiner_hpc02~) d02Gd04ld06oc15w : a06a02c15@char_sanc_counta01 }}
#var hp_variable %1
OK here's what i want to do.
Lets say i got 1200 hp.
I want whiner to go like this
if %1 is like 20% of max hp, colour it red
if 21-40% colour yellow
41-60 - colour green
if 61-80 - colour purple
if 81-100% - colour cyan.
Can anyone help out?
Cameth
Saweth
Fledeth my asseth offeth |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Jul 15, 2002 4:11 pm |
I can't see any explanation of the color coding, so I'll just guess. You should be able to integrate this into your existing script.
#IF ((%1 * 5) < @maximum_hp) {grouptell ~c04HP: %1}
#IF (((%1 * 5) > @maximum_hp) AND ((%1 * 5) < (@maximum_hp * 2)) {grouptell ~c06HP: %1}
#IF (((%1 * 5) > (@maximum_hp * 2)) AND ((%1 * 5) < (@maximum_hp * 3)) {grouptell ~c02HP: %1}
#IF (((%1 * 5) > (@maximum_hp * 3)) AND ((%1 * 5) < (@maximum_hp * 4)) {grouptell ~c05HP: %1}
#IF ((%1 * 5) > (@maximum_hp * 4)) (grouptell ~c03HP: %1}
LightBulb
Senior Member
edited to change forward slash (/) to backslash () |
|
|
|
Death Apprentice
Joined: 25 Jun 2002 Posts: 109 Location: USA
|
Posted: Mon Jul 15, 2002 6:06 pm |
Is this for a prompt? To tell people? To put in a visual bar?
|
|
|
|
|
|