Nick wrote me this heal script a long time ago and I've had a lot of success with it but I would like to make a slight modification...
Basically when I type "group" I see something to this effect"
"Your group consists of:
( Head) 846/740 hit, 192/192 move Jim
(Front) 579/579 hit, 154/154 move Joe
(Front) 539/550 hit, 160/160 move Bob
(Front) 562/562 hit, 160/160 move Jay
(Front) 323/323 hit, 109/109 move Yens"
The script then automatically calculates which person is missing the most hit points and I just type an alias to heal that person... The problem is if there is a "pet" in the group it kind of changes the output,
"(Front) 323/323 hit, 109/109 move a beautiful pegasus"
Basically if that case happens I just want to ignore the pet, which are generally in the form "a horse", "a water elemental", "a whatever"...
Here's the script...
<triggers>
<trigger
enabled="y"
match="Your group consists of:"
send_to="12"
sequence="100"
>
<send>SetVariable "person", ""
SetVariable "hp", 999999999</send>
</trigger>
<trigger
custom_colour="2"
enabled="y"
match="^\(.*\)\s+(\d+)/\d+\s+hit,\s+\d+/\d+\s+move\s+(.*)$"
regexp="y"
send_to="12"
sequence="100"
>
<send>if %1 < CLng (GetVariable ("hp")) then
SetVariable "hp", %1
SetVariable "person", "%2"
end if
</send>
</trigger>
</triggers>
<aliases>
<alias
match="--heal"
enabled="y"
send_to="12"
sequence="100"
>
<send>if GetVariable ("person") <> "" _
and GetVariable ("hp") <> 999999999 then
Send "cast 'full heal' " & GetVariable ("person")
end if</send>
</alias>
</aliases>
and
<triggers>
<trigger
custom_colour="2"
enabled="y"
match="^\(.*\)\s+(\d+)/(\d+)\s+hit,\s+\d+/\d+\s+move\s+(.*)$"
regexp="y"
send_to="12"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
<send>if %2 > 0 then ' don't divide by zero!
if (100 * %1 / %2) < CLng (GetVariable ("hp")) then
SetVariable "hp", 100 * %1 / %2 ' save percentage
SetVariable "person", "%3"
end if
end if
</send>
</trigger>
</triggers>
|