Example:
=====================[ Neverending Walkway [n,e,s,w]. ]=====================
Hp: 23890(23890) [#########################] Gp: 5987(5987) [#########################]
Xp: 12419928(16800000) Fighting: 2 10 0
Alias: update_hud
hud_location = %ansi(grey)@room%ansi(green) @roomdirs%ansi(grey).
hud_blank_str = %ansi(cyan,bold)""
#LOOP %eval((100-%len(@hud_location))/2) {hud_blank_str = %concat(@hud_blank_str, "=")}
hp_percent = %eval(100*@Hp/@MaxHp)
gp_percent = %eval(100*@Gp/@MaxGp)
xp_percent = %eval(100*@Xp/@MaxXp)
#if (@hp_percent < 14) {hp_color = red} {#if (@hp_percent < 28) {hp_color = red,bold} {#if (@hp_percent < 42) {hp_color = magenta} {#if (@hp_percent < 56) {hp_color = green} {#if (@hp_percent < 70) {hp_color = green,bold} {#if (@hp_percent < 84) {hp_color = yellow} {#if (@hp_percent < 100) {hp_color = cyan} {hp_color = cyan,bold}}}}}}}
#if (@gp_percent < 14) {gp_color = red} {#if (@gp_percent < 28) {gp_color = red,bold} {#if (@gp_percent < 42) {gp_color = magenta} {#if (@gp_percent < 56) {gp_color = green} {#if (@gp_percent < 70) {gp_color = green,bold} {#if (@gp_percent < 84) {gp_color = yellow} {#if (@gp_percent < 100) {gp_color = cyan} {gp_color = cyan,bold}}}}}}}
#if (@xp_percent < 14) {xp_color = red} {#if (@xp_percent < 28) {xp_color = red,bold} {#if (@xp_percent < 42) {xp_color = magenta} {#if (@xp_percent < 56) {xp_color = green} {#if (@xp_percent < 70) {xp_color = green,bold} {#if (@xp_percent < 84) {xp_color = yellow} {#if (@xp_percent < 100) {xp_color = cyan} {xp_color = cyan,bold}}}}}}}
hp_bar_string = %ansi(red,red,bold)""
#LOOP %eval(@hp_percent/4) {hp_bar_string = %concat(@hp_bar_string,"#")}
hp_bar_string = %concat(@hp_bar_string,%ansi(grey,black))
#if (@hp_percent < 100) {#LOOP %eval(25-(@hp_percent/4)) {hp_bar_string = %concat(@hp_bar_string," "}}
gp_bar_string = %ansi(blue,blue,bold)""
#LOOP %eval(@gp_percent/4) {gp_bar_string = %concat(@gp_bar_string,"#")}
gp_bar_string = %concat(@gp_bar_string,%ansi(grey,black))
#if (@gp_percent < 100) {#LOOP %eval(25-(@gp_percent/4)) {gp_bar_string = %concat(@gp_bar_string," "}}
hud_fighting_string = " "
Misc1 = %replace(@Misc1,"*", "")
Misc1 = %replace(@Misc1," ", "")
hud_fighting = %remove("Fighting:", @hud_fighting)
hud_fighting = %trimleft(@hud_fighting)
hud_num_fighting = %numwords(@hud_fighting)
#if (%len(@Misc1) > 0 and @hud_num_fighting = 0) {hud_fighting = %concat(@Misc1" ", @hud_fighting)
#add hud_num_fighting 1}
#loop @hud_num_fighting {hud_targhp = %word(@hud_fighting,%{i})
#if (@hud_targhp = "10" or @hud_targhp = "9") {hud_targclr = "cyan,bold"} {#if (@hud_targhp = "8" or @hud_targhp = "7" or @hud_targhp = "6") {hud_targclr = "green,bold"} {#if (@hud_targhp = "5" or @hud_targhp = "4" or @hud_targhp = "3") {hud_targclr = "brown,bold"} {hud_targclr = "red,bold"}}}
hud_fighting_string = %concat(@hud_fighting_string, %ansi(@hud_targclr)@hud_targhp" ")}
#WIN status @hud_blank_str%ansi(white)~[ %ansi(grey)@room %ansi(green)@roomdirs~]%ansi(grey). %ansi(white)~]%ansi(cyan,bold)@hud_blank_str
#WIN status %ansi(grey)Hp: %ansi(@hp_color)@Hp%ansi(grey)(%ansi(cyan,bold)@MaxHp%ansi(grey)) %ansi(white)~[%ansi(red,bold)@hp_bar_string%ansi(white)~] %ansi(grey)Gp: %ansi(@gp_color)@Gp%ansi(grey)(%ansi(cyan,bold)@MaxGp%ansi(grey)) %ansi(white)~[%ansi(green,bold)@gp_bar_string%ansi(white)~]
#WIN status %ansi(grey)Xp: %ansi(@xp_color)@Xp%ansi(grey)(%ansi(cyan,bold)@MaxXp%ansi(grey)) " " %ansi(grey)Fighting:@hud_fighting_string
Important Triggers: Pattern: &room &%x{roomdirs}].
Commands: (none)
Pattern: ^Hp: &%d{Hp}~(&%d{MaxHp}~)(&Misc1)Gp: &%d{Gp}~(&%d{MaxGp}~)(*)Xp: &%d{Xp}~(&%d{MaxXp}~)&hud_fighting
Commands:
#wait 50
update_hud
hud_fighting = ""
|