Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
nilats
Beginner


Joined: 21 Sep 2009
Posts: 17

PostPosted: Sun Aug 02, 2020 7:21 am   

Want to display the assigned fkey at the end of each health check line
 
So my display on my capture box looks like this:

Health[ -109 | Nul has small wounds | 73% ]

However I would like it to resemble this:

Health[ -109 | Nul has small wounds | 73% ] F1

I'm peeled this script offline and it works but for a quicker reaction I'd like it to assign fkeys up to 10 and then spit out the assigned Fkey at the end


#ALIAS gr {group;#clr {Group Stats}}
#TRIGGER {Health~[*~]} {#capture {Group Stats}}
#TRIGGER {*%s(&%d{current_hp})/(&%d{max_hp})%shit,%s(&%d{current_mv})/(&%d{max_mv})%smove%s(&group_member)$} {#math hp_difference (@current_hp - @max_hp);#math hp_percentage (@current_hp*100/@max_hp);#if @hp_difference<@temp_hp {temp_hp=@hp_difference;#var healfirst @group_member};#if @hp_percentage<@temp_percentage {temp_percentage=@hp_percentage;#var healmefirst @group_member};#if @hp_percentage<21 {#math hp_difference (@max_hp-@current_hp);#unbutton {@group_member};#UNBUTTON {@group_member} {@group_member} {fh @group_member} {} {} {} {} {} {} {} {} {} {} {} {13} {} {} {} {} {} {@group_member};#SAY {"Health"%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is %ansi( bold, blink, red)dying %ansi( bold, white)~| %ansi( bold, blink, red)@hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};:tells: #SAY {" "%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is %ansi( bold, blink, red)dying %ansi( bold, white)~| %ansi( bold, blink, red)@hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};#abort 1};#if @hp_percentage<41 {#math hp_difference (@max_hp-@current_hp);#unbutton {@group_member};#UNBUTTON {@group_member} {@group_member} {fh @group_member} {} {} {} {} {} {} {} {} {} {} {} {12} {} {} {} {} {} {@group_member};#SAY {"Health"%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is %ansi( bold, red)hurting %ansi( bold, white)~| %ansi( bold, blink, red)@hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};:tells: #SAY {" "%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is %ansi( bold, red)hurting %ansi( bold, white)~| %ansi( bold, blink, red)@hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};#abort 1};#if @hp_percentage<61 {#math hp_difference (@max_hp-@current_hp);#unbutton {@group_member};#UNBUTTON {@group_member} {@group_member} {fh @group_member} {} {} {} {} {} {} {} {} {} {} {} {14} {} {} {} {} {} {@group_member};#SAY {"Health"%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is %ansi( bold, blue)wounded %ansi( bold, white)~| %ansi( bold, blink, red)@hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};:tells: #SAY {" "%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is %ansi( bold, blue)wounded %ansi( bold, white)~| %ansi( bold, blink, red)@hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};#abort 1};#if @hp_percentage<81 {#math hp_difference (@max_hp-@current_hp);#unbutton {@group_member};#UNBUTTON {@group_member} {@group_member} {fh @group_member} {} {} {} {} {} {} {} {} {} {} {} {10} {} {} {} {} {} {@group_member};#SAY {"Health"%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member has %ansi( bold, yellow)small wounds %ansi( bold, white)~| @hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};:tells: #SAY {" "%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member has %ansi( bold, yellow)small wounds %ansi( bold, white)~| @hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};#abort 1};#if @hp_percentage<96 {#math hp_difference (@max_hp-@current_hp);#unbutton {@group_member};#UNBUTTON {@group_member} {@group_member} {fh @group_member} {} {} {} {} {} {} {} {} {} {} {} {2} {} {} {} "" {} {} {@group_member};#say {"Health"%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is scratched %ansi( bold, white)~| @hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};:tells: #SAY {" "%ansi( bold, white)~[ %ansi( bold, green)-@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is scratched %ansi( bold, white)~| @hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};#abort 1}}

[/img]
Reply with quote
nilats
Beginner


Joined: 21 Sep 2009
Posts: 17

PostPosted: Sun Aug 02, 2020 7:32 am   
 
I assume I need a group variable that would assign and add people f1-f10 automatically as they are grouped?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net