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
kwirlkarphys
Newbie


Joined: 16 Aug 2007
Posts: 9

PostPosted: Sat Jan 05, 2008 4:31 pm   

What does it take to use buttons effectively in a health checker script?
 
I have been trying off and on for some time to manage and effectively integrate the neat button feature into my healing scripts/health checkers. What problems i run into usually look minor, but outrank my coding knowledge.

I have decided that automatically creating and removing buttons 'on the go' for group members based on health is silly, so what I want to know is does someone have the coding forewithal to make an alias that checks the current members of your group, then creates a button for each member, and then perhaps another button that removes all the buttons?

further variants of this would be to find a way to color-coordinate the buttons with the current hitpoints of the group members as a percentage of the whole represented.

make sense, anyone?
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Sat Jan 05, 2008 9:57 pm   
 
My question is why you'd want to use buttons? Would these buttons be used as a shortcut to healing them by clicking it?
As for percentages, here is the percentage coding from my status bar trigger on a MUD that allows 3 chars at a time per player, and I use it to show all my opposite 2 on my active window so I can have a full screen window and ignore the other 2...

Code:
#ALIAS statupd {
  #IF (((%float( @kiln.hp) / %float( @kiln.maxhp)) * 100) < 35) {kiln.hpcolor = "bold,high,red"} {kiln.hpcolor = "bold,magenta"}
  #IF (((%float( @blackjack.hp) / %float( @blackjack.maxhp)) * 100) < 35) {blackjack.hpcolor = "bold,high,red"} {blackjack.hpcolor = "bold,magenta"}
  #STAT %ansi( bold, black)Kiln: Hp:%ansi( @kiln.hpcolor)@kiln.hp%ansi( bold, black), Ma:%ansi( bold, magenta)@kiln.ma%ansi( bold, black), Mv:%ansi( bold, magenta)@kiln.mv %ansi( bold, red)~| %ansi( bold, black)Blackjack: Hp:%ansi( @blackjack.hpcolor)@blackjack.hp%ansi( bold, black), Ma:%ansi( bold, magenta)@blackjack.ma%ansi( bold, black), Mv:%ansi( bold, magenta)@blackjack.mv
  }



This alias is called off a prompt trigger and a few others in order to force update the status bar for special situations. And to adjust the colors of course ;)
With this setup I get all my stats in magenta, and if my hps drop below 35% it changes to red.
Should be easy enough to incorporate this into a button caption. Though IMHO, you should also tie a hotkey into each button for keyboard activation for faster healing.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
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