 |
gerry_d98 Beginner
Joined: 05 Sep 2008 Posts: 20
|
Posted: Fri Sep 12, 2008 6:31 pm
healing buttons jumping off point |
ok I have spent half the day so far trying to get one button to load and work properly, and failing.
I am looking to make a listing of buttons along the left side of my output window that captures the health of group members. group member reports come in this format:
Your group consists of ( 8/11):
( Head) 658/1535 hit, 211/212 move Nair
(Front) 1256/1256 hit, 169/170 move Uzzac
(Front) 362/1140 hit, 171/171 move Hova
(Front) 604/805 hit, 230/230 move Omm
(Front) 715/715 hit, 125/125 move, 167/990 mana Zel
(Front) 805/805 hit, 161/161 move San
(Front) 546/599 hit, 140/140 move Joreal
(Front) 662/950 hit, 151/198 move Nicram
with up to say 15 max people in group
I am trying to make buttons that will capture the names of the people in the group, write them to the caption in/on the button, and then have that button change color depending on the health of the person assigned to that button when I type GROUP (possibly also having a button named GROUP that will execute the group command, yeah that one is the easy one of course)
I have been playing around quite a bit, but cant get the variables of GROUP_HEALTH to capture to the button for even one button, let along trying to define all buttons
if some kind soul could help me out with an example I can replicate id be indebted. |
|
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4783 Location: Pensacola, FL, USA
|
Posted: Fri Sep 12, 2008 9:11 pm |
first off, i would use a database variable to track which button corresponds to each person
#ADDK groupMembers {Nair=groupButton1}
The following trigger assumes you have the @groupMembers up to date
#TR {(%d)/(%d) hit, *move (%w)$} {#IF (%1>%2/4) {#CALL %btncol(@groupButton.%3, red)} {#CALL %btncol(@groupButton.%3, green)}}
This is untested, mind you, but it should work. |
|
|
|
 |
gerry_d98 Beginner
Joined: 05 Sep 2008 Posts: 20
|
Posted: Sat Sep 13, 2008 12:01 am |
ok, here is what I am starting with, and what I would like to do is manipulate this to NOT send things to a seperate GroupStats window, but direct that output to the button that a group member is bound too. my head is starting to hurt from all this so mebbe ill tackle it again some more tomorrow. This script is from a guild member and operates identically to what I made for zmud, so at least I am getting closer.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<module name="HealingWindowWatcher" global="true">
<uid>{FF94150F-1423-4404-872E-6AB5E36FF467}</uid>
<class name="healingwatcher">
<alias name="gr" autoappend="true">
<value>#clr {groupstats}
group</value>
</alias>
<alias name="zgroup" autoappend="true">
<value>#var group {}
gr
#T+ autohealgroup</value>
</alias>
<trigger priority="1770">
<pattern>Health~[*~]</pattern>
<value>#capture {Group Stats}</value>
</trigger>
</class>
<trigger priority="1730" enabled="false">
<pattern>^You complete your spell...</pattern>
<value>#T+ autohealgroup</value>
</trigger>
<var name="current_hp">303</var>
<var name="hp_difference">-232</var>
<var name="max_hp">535</var>
<var name="temp_percentage" type="String"/>
<var name="temp_hp" type="String"/>
<var name="group" type="String"/>
<var name="hp_percentage">56</var>
<var name="ignorelist">An|an|A|a|The|the|Someone|someone|Human|Halfling</var>
<var name="group_member"> Skirr</var>
<var name="max_mv">138</var>
<var name="current_mv">138</var>
<class name="autohealgroup" initdisable="true" enabled="false">
<trigger priority="4070">
<pattern>(%w) (*) ~(paralyzed~)</pattern>
<value>#if %ismember( %1, @ignorelist) {} {
#if %ismember( %1, @Group) {
cast 'cause critical' %1
#echo ---- unpara %1
} {}
}</value>
</trigger>
</class>
<trigger priority="1760">
<pattern><![CDATA[(&%d{current_hp})/(&%d{max_hp})%shit,%s(&%d{current_mv})/(&%d{max_mv})%smove{(*) mana (&group_member)|(&group_member)}]]></pattern>
<value><![CDATA[#var temp_hp {}
#var temp_percentage {}
#math hp_difference (@current_hp - @max_hp)
#math hp_percentage (@current_hp*100/@max_hp)
#execwin GroupStats {#IF @hp_percentage<21 {#SAY %ansi( bold, white)~[ %ansi( bold, red)@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)~]};#IF (@hp_percentage>=21 AND @hp_percentage<=41) {#SAY %ansi( bold, white)~[ %ansi( bold, yellow)@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is %ansi( bold, yellow)Hurting %ansi( bold, white)~| %ansi( bold, yellow)@hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};#IF (@hp_percentage>41 AND @hp_percentage<96) {#SAY %ansi( bold, white)~[ %ansi( bold, green)@hp_difference %ansi( bold, white)~| %ansi( bold, cyan)@group_member is %ansi(bold, white)Damaged %ansi( bold, white)~| %ansi( bold,white)@hp_percentage%ansi( bold, green)~% %ansi( bold, white)~]};#abort all}
]]></value>
</trigger>
</module>
</cmud> |
|
|
|
 |
|
|
|
|
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
|
|