Code: Select all
#define GroupMember v93
#define GroupMax v90
#define ChatCommand p2
#define XLOC v52
#define YLOC v53
#define $GroupClass $spawn($group($GroupMember),class)
#include SpellSub.mac
#include routines.mac
#chat tell
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"
#Event ClarityGone "Your mind returns to normal."
#Event InvisGone "You feel yourself starting to appear"
#Event RootGone "Your Immobilize spell has worn off."
#Event FollowOff "You are no longer auto-following "
Sub Main
/varset v69 $p0
:chkevent
/doevents
| *** AutoHeal ***
/varcalc GroupMax $group(count)-1
/for GroupMember 0 to $GroupMax
/if n $spawn($group($GroupMember),hp,pct)<1 /goto :nextmember
/if "$GroupClass"=="Warrior" /goto :Tankheal
/if "$GroupClass"=="Paladin" /goto :Tankheal
/if "$GroupClass"=="Shadow Knight" /goto :Tankheal
/if "$GroupClass"=="Monk" /goto :Meleheal
/if "$GroupClass"=="Ranger" /goto :Tankheal
/if "$GroupClass"=="Rogue" /goto :Meleheal
/if "$GroupClass"=="Bard" /goto :Meleheal
/goto :CasterHeal
:Tankheal
/if n $spawn($group($GroupMember),hp,pct)<71 {
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/if n $target(distance)>100 {
/tell $p0 %T is too far away.
/delay 30
/press esc
/goto :nextmember
}
/stand
/g Complete Heal >> %T
/call SpellSub 1 100
/press esc
}
/goto :nextmember
:Meleheal
/if n $spawn($group($GroupMember),hp,pct)<71 {
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/if n $target(distance)>100 {
/tell $p0 %T is too far away.
/pause 30
/sit
/press esc
/goto :nextmember
}
/stand
/g SR INC %T
/call SpellSub 2 50
/pause 20
/press esc
}
/goto :nextmember
:Casterheal
/if n $spawn($group($GroupMember),hp,pct)<71 {
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/if n $target(distance)>100 {
/tell $p0 %T is too far away.
/delay 30
/press esc
/goto :nextmember
}
/stand
/g SR INC %t
/call SpellSub 2 50
/sit
/press esc
}
/goto :nextmember
:nextmember
}
/next GroupMember
/goto :chkevent
/return Ending Macro: Bad Variable in /var function
cleric.mac@19(main): /varset v69 $p0
cleared the following: Timed Vars Arrays
The current macro has ended
