Jah Wanderer
Joined: 11 Oct 2000 Posts: 52 Location: Sweden
|
Posted: Thu Dec 25, 2003 8:23 pm
magic dragon healthchecker |
#CLASS {Healthchecker}
#TRIGGER {%s(%d)/(%d)%****,*move, *mana (%*)} {#var name %3;#if %ismember( @name, @Group) {#noop} {#var Group %additem( @name, @Group)};;Begin bar calculation;#var bars "";#var bar =;#var numbars 50;#math bars {%1 * 50 / %2};#var vamped "";#if (@bars >= 51) {#var bars 50;#var vamped 1};#math spacenum {50 - @bars};#var barspace {%repeat( ".", @spacenum)};#if (@bars < 10) {#var bar %ansi( blink, high, red)%repeat( @bar, @bars)} {#if (@bars < 16) {#var bar %ansi( high, red)%repeat( @bar, @bars)} {#if (@bars < 26) {#var bar %ansi( high, yellow)%repeat( @bar, @bars)} {#if (@bars < 38) {#var bar %ansi( high, green)%repeat( @bar, @bars)} {#if (@bars < 48) {#var bar %ansi( high, green)%repeat( @bar, @bars)} {#if (@bars <= 50) {#if (@vamped==1) {#var bar %ansi( grey)%repeat( @bar, 44)VAMPED} {#var bar %ansi( grey)%repeat( @bar, @bars)}}}}}}};;End bar calculation;#var hp %1;#var maxhp %2;#Var sub %line;#math minus (@hp - @maxhp);#math minusplus (@maxhp - @hp);#if (@minusplus<=0) {#var minusplus 0};#math status (@hp*100/@maxhp);#if (@status<0) {#VAR sub2 @status} {#if (@status<20) {#var sub2 {%ansi( blink, high, red) @status~% @minus}} {#if (@status<31) {#VAR sub2 {%ansi( high, red) @status~% @minus}} {#if (@status<51) {#VAR sub2 {%ansi( high, yellow) @status~% @minus}} {#if (@status<76) {#VAR sub2 {%ansi( high, green) @status~% @minus}} {#if (@status<97) {#VAR sub2 {%ansi( high, green) @status~% @minus}} {#if (@status<1000) {#VAR sub2 ""}}}}}}};#if (@status<599) {#SUB {@bar@barspace @name @sub2}};#if (@status<97) {#addkey healthchecker {@name=@minusplus}};#VAR sub ""}
#TRIGGER {$} {#var templist "";#var templist2 "";#var gnum "";#T- Healthchecker;:group: #CLR;#LOOPDB @healthchecker {#VARIABLE templist %concat( @templist, "|", %repeat( "0", 4 - %len( %val)), %val, "=", %key)};#VARIABLE templist %delete( @templist, 1, 1);#VARIABLE templist %sort( @templist, 1);#VARIABLE templist2 %sort( @templist, 1);#FORALL @templist {#add gnum 1;:group: #SHOW F@gnum : %concat( %copy( %i, %pos( "=", %i) + 1, %len( %i) - %pos( "=", %i) + 1), ": -", %number( %copy( %i, 1, %pos( "=", %i) - 1)));#key F@gnum {h %copy( %i, %pos( "=", %i) + 1, %len( %i) - %pos( "=", %i) + 1)}};#Var healthchecker ""}
#CLASS 0
#CLASS {Healtchecker always on}
#TRIGGER {^Your group consists of:} {#var group "";#var Gnum 0;#T+ Healthchecker;:group: #clr}
#CLASS 0 |
|