#TRIGGER {*%s(%d)/(%d)%shit,%s%d/%d%smove,%s%d/%d%spsp (%*)$} {#MATH groupstatus ((%1*10)/%2);#IF (@groupstatus<1) {#VA groupstatus 1};#IF (@groupstatus>10) {#VA groupstatus 10};#IF (@groupstatus>7) {#SUB {%line %ansi( green)%repeat( "•", @groupstatus)%ansi( black)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=7) {#SUB {%line %ansi( yellow)%repeat( "•", @groupstatus)%ansi( black)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=3) {#SUB {%line %ansi( red)%repeat( "•", @groupstatus)%ansi( black)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP}}
#VAR groupstatus {}
What this does is append a health gauge next to the name of the person in a group listing. Shows green from 100% down to 70%, 70% to 30% it shows yellow, and 30% down to dead it shows red.
Give it a whirl and tell me what you think.
------------------
·•Kuurg•·
[This message has been edited by Kuurg (edited 12-14-2001).]
Colored health gauge for Group
and for people who don't use zmud :-P, here's a version of the same thing that I wrote for tinyfugue.
/def -Fp200 -ag -mregexp -t'([0-9]+)/([0-9]+).+hit,.+ ([0-9]+)/([0-9]+).+move,.+ ([0-9]+)/([0-9]+).+psp ([^ ]+)$' group_trigger = \
/let currhit %P1 %;\
/let maxhit %P2 %;\
/let groupmember %P7 %;\
/let hp_percent $[trunc(1.0 * {currhit} / {maxhit} * 100)] %;\
; /echo $[strcat("hit: ", {currhit}, " maxhit: ", {maxhit}, " hp_percent: ", {hp_percent})] %;\
/if ({hp_percent} < 16) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{n}@{Cred}awful @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/elseif ({hp_percent} < 31) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{BCred}pretty hurt @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/elseif ({hp_percent} < 51) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{n}@{Cmagenta}nasty wounds @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/elseif ({hp_percent} < 76) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{BCmagenta}few wounds @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/endif %;\
/let hpstring=$[strcat(%P1, "/", %P2, " hp")] %;\
/let movestring=$[strcat(%P3, "/", %P4, " move")] %;\
/let playerstring=$[pad("@{BCwhite}", 0, %P7, 16, "@{BCblack} -- @{n}[", 0, %{hpstring}, 16, " ", 0, %{movestring}, 16, " ]", 0)] %;\
/if (%{gag} =~ "on") \
/if ({hp_percent} < 76) \
/echo -p $[strcat({playerstring}, " ", {condstring})] %;\
/else \
/echo -p $[{playerstring}] %;\
/endif %;\
/else \
/if ({hp_percent} < 76) /echo -p @{n} $[pad({condstring}, 60)] %; /endif %;\
/endif
By the way, I like Kuurg's too, I just sometimes find TF script to be a bit more natural to read/understand than making sense of what Zmud exports- for people that like to look at posts and write their own stuff.
------------------
-<(#)>- Xebes makes your heart start to race REAL FAST!
/def -Fp200 -ag -mregexp -t'([0-9]+)/([0-9]+).+hit,.+ ([0-9]+)/([0-9]+).+move,.+ ([0-9]+)/([0-9]+).+psp ([^ ]+)$' group_trigger = \
/let currhit %P1 %;\
/let maxhit %P2 %;\
/let groupmember %P7 %;\
/let hp_percent $[trunc(1.0 * {currhit} / {maxhit} * 100)] %;\
; /echo $[strcat("hit: ", {currhit}, " maxhit: ", {maxhit}, " hp_percent: ", {hp_percent})] %;\
/if ({hp_percent} < 16) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{n}@{Cred}awful @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/elseif ({hp_percent} < 31) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{BCred}pretty hurt @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/elseif ({hp_percent} < 51) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{n}@{Cmagenta}nasty wounds @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/elseif ({hp_percent} < 76) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{BCmagenta}few wounds @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/endif %;\
/let hpstring=$[strcat(%P1, "/", %P2, " hp")] %;\
/let movestring=$[strcat(%P3, "/", %P4, " move")] %;\
/let playerstring=$[pad("@{BCwhite}", 0, %P7, 16, "@{BCblack} -- @{n}[", 0, %{hpstring}, 16, " ", 0, %{movestring}, 16, " ]", 0)] %;\
/if (%{gag} =~ "on") \
/if ({hp_percent} < 76) \
/echo -p $[strcat({playerstring}, " ", {condstring})] %;\
/else \
/echo -p $[{playerstring}] %;\
/endif %;\
/else \
/if ({hp_percent} < 76) /echo -p @{n} $[pad({condstring}, 60)] %; /endif %;\
/endif
By the way, I like Kuurg's too, I just sometimes find TF script to be a bit more natural to read/understand than making sense of what Zmud exports- for people that like to look at posts and write their own stuff.
------------------
-<(#)>- Xebes makes your heart start to race REAL FAST!
We are of a like mind on that. Here's what I have already. If anyone wants to test it, I haven't done so exhaustively. It might need some tweaking. specifically the line where I set 70 (rather arbitrarily) as the length to deduct %len(%line) from... here's what I had.
#TRIGGER {*%s(%d)/(%d)%shit,%s%d/%d%smove,%s%d/%d%spsp (%*)$} {#MATH groupstatus ((%1*10)/%2);#MATH groupline (70- %len( %line));#IF (@groupstatus<1) {#VA groupstatus 1};#IF (@groupstatus>10) {#VA groupstatus 10};#IF (@groupstatus>7) {#SUB {%line %repeat( " ", @groupline)%ansi( green)%repeat( "•", @groupstatus)%ansi( black)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=7) {#SUB {%line %repeat( " ", @groupline) %ansi( yellow)%repeat( "•", @groupstatus)%ansi( black)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=3) {#SUB {%line %repeat( " ", @groupline) %ansi( red)%repeat( "•", @groupstatus)%ansi( black)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP}}
------------------
·•Kuurg•·
#TRIGGER {*%s(%d)/(%d)%shit,%s%d/%d%smove,%s%d/%d%spsp (%*)$} {#MATH groupstatus ((%1*10)/%2);#MATH groupline (70- %len( %line));#IF (@groupstatus<1) {#VA groupstatus 1};#IF (@groupstatus>10) {#VA groupstatus 10};#IF (@groupstatus>7) {#SUB {%line %repeat( " ", @groupline)%ansi( green)%repeat( "•", @groupstatus)%ansi( black)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=7) {#SUB {%line %repeat( " ", @groupline) %ansi( yellow)%repeat( "•", @groupstatus)%ansi( black)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=3) {#SUB {%line %repeat( " ", @groupline) %ansi( red)%repeat( "•", @groupstatus)%ansi( black)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP}}
------------------
·•Kuurg•·
Been messing with this trigger a bit, I really like it btw kuurg! Here are a few changes I made to it so that;
- Bards work (they use man not psp)
- I can see the amount of HP missing fromw a char on a black background)
- All of the group health bars are in an even column at the end of group line, for some reason or other this irked me hehe... (note if your name is longer than 11 letters column will be pushed over a bit)
#TRIGGER {*%s(%d)/(%d)%shit,%s%d/%d%smove,%s%d/%d%s{psp|man} (%*)$} {#MATH groupstatus ((%1*10)/%2);groupstatusnamelength = {%len(%3};#MATH groupstatusspace (10-@groupstatusnamelength);#IF (@groupstatus<1) {#VA groupstatus 1};#IF (@groupstatus>10) {#VA groupstatus 10};#IF (@groupstatus>7) {#SUB {%line %repeat( " ", @groupstatusspace)%ansi( green)%repeat( "•", @groupstatus)%ansi( grey)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=7) {#SUB {%line %ansi( yellow)%repeat( "•", @groupstatus)%ansi( grey)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=3) {#SUB {%line %ansi( red)%repeat( "•", @groupstatus)%ansi( grey)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP}}
- Bards work (they use man not psp)
- I can see the amount of HP missing fromw a char on a black background)
- All of the group health bars are in an even column at the end of group line, for some reason or other this irked me hehe... (note if your name is longer than 11 letters column will be pushed over a bit)
#TRIGGER {*%s(%d)/(%d)%shit,%s%d/%d%smove,%s%d/%d%s{psp|man} (%*)$} {#MATH groupstatus ((%1*10)/%2);groupstatusnamelength = {%len(%3};#MATH groupstatusspace (10-@groupstatusnamelength);#IF (@groupstatus<1) {#VA groupstatus 1};#IF (@groupstatus>10) {#VA groupstatus 10};#IF (@groupstatus>7) {#SUB {%line %repeat( " ", @groupstatusspace)%ansi( green)%repeat( "•", @groupstatus)%ansi( grey)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=7) {#SUB {%line %ansi( yellow)%repeat( "•", @groupstatus)%ansi( grey)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP};#IF (@groupstatus<=3) {#SUB {%line %ansi( red)%repeat( "•", @groupstatus)%ansi( grey)%repeat( "•", %eval( 10 - @groupstatus))}} {#NOOP}}
Sure
Gormal wrote:I uploaded Xebes' trigset for TF, can someone show my how to make it incoroprate bards into the mix? now that we've got their psp stuff, it messes them up and they don't get put into that nice format.
Here's a fix. I've also updated some of the use of variables and substitutions so it doesn't throw a warning in pedantic mode (I can't believe you guys don't /set pedantic on!).
Edit - I somehow managed to miss out pasting the first line! Sorry, try it now and it should work :)
/def -Fp200 -ag -mregexp -t'([0-9]+)/([0-9]+).+hit,.+ ([0-9]+)/([0-9]+).+move,.+ ([0-9]+)/([0-9]+).+(psp|man) ([^ ]+)$' group_trigger = \
/let currhit %P1 %;\
/let maxhit %P2 %;\
/let groupmember %P8 %;\
/let hp_percent $[trunc(1.0 * {currhit} / {maxhit} * 100)] %;\
; /echo $[strcat("hit: ", {currhit}, " maxhit: ", {maxhit}, " hp_percent: ", {hp_percent})] %;\
/if ({hp_percent} < 16) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{n}@{Cred}awful @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/elseif ({hp_percent} < 31) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{BCred}pretty hurt @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/elseif ({hp_percent} < 51) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{n}@{Cmagenta}nasty wounds @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/elseif ({hp_percent} < 76) /let condstring $[strcat("( @{BCblue}P: ", {groupmember}, " @{Cwhite}C: @{BCmagenta}few wounds @{BCcyan}", {hp_percent}, "% @{n})")] %;\
/endif %;\
/let hpstring=$[strcat({P1}, "/", {P2}, " hp")] %;\
/let movestring=$[strcat({P3}, "/", {P4}, " move")] %;\
/let playerstring=$[pad("@{BCwhite}", 0, {P8}, 16, "@{BCblack} -- @{n}[", 0, {hpstring}, 16, " ", 0, {movestring}, 16, " ]", 0)] %;\
/if ({gag} =~ "on") \
/if ({hp_percent} < 76) \
/echo -p $[strcat({playerstring}, " ", {condstring})] %;\
/else \
/echo -p $[{playerstring}] %;\
/endif %;\
/else \
/if ({hp_percent} < 76) /echo -p @{n} $[pad({condstring}, 60)] %; /endif %;\
/endif
Last edited by shalath on Mon Jun 07, 2004 4:07 am, edited 1 time in total.
You'll probably have to copy the script into a .txt file, then import it.
Support Your Addiction! Vote for TorilMUD Today!
Top Mud Sites: http://www.topmudsites.com/cgi-bin/topmuds/rankem.cgi?id=shev
Why Nerox is jealous of me:
Nerox tells you 'man this thing is kicking my ass and i have blisters!'
Nerox tells you 'ok attempting it again put tape on my fingers for easier sliding'
Top Mud Sites: http://www.topmudsites.com/cgi-bin/topmuds/rankem.cgi?id=shev
Why Nerox is jealous of me:
Nerox tells you 'man this thing is kicking my ass and i have blisters!'
Nerox tells you 'ok attempting it again put tape on my fingers for easier sliding'
Who is online
Users browsing this forum: No registered users and 22 guests