As soon as the cleric is set as the groups main healer (via tell) the cleric crashes to desktop. Since the macro calls the autoheal sub if the character is the main healer, I am guessing the problem is with autoheal.
Here is the relavent code.
Main Loop Sub
Code: Select all
Sub Main
/zapvars
/varset CombatInit 1
/varset CampCreated 0
/varset CharRole "NULL"
/varset ThreatState 0
/varset CharJob 1
/stand
/varset RestState 0
:Start
/doevents
/if $CharRole=="MHealer" /call Autoheal
/if $CharRole=="GWzd" /call AutoWzd
/if $CharRole=="MnAssist" /if n $CombatInit==1 /if "$target(type)"=="NPC" /varset ThreatState 1
/if $CharRole=="MnAssist" /if "$target(type)"!="NPC" /varset ThreatState 0
/if $CharRole=="GBard" /if n $ThreatState==1 /call SingCombat
/if $CharRole=="GBard" /if n $ThreatState==0 /call SingRest
/if n $CharJob==1 /if n $ThreatState==1 /if n $CombatInit==1 /call Melee
/delay 0
/goto :Start
/return
Auto Heal Sub
Code: Select all
|---***AUTOHEAL***---|
|
Sub AutoHeal
/doevents
/varcalc GroupMax $group(count)-1
/for GroupMember 0 to $GroupMax
/if "$GroupClass"=="Bard" /goto :Supportheal
/if "$GroupClass"=="Beastlord" /goto :Supportheal
/if "$GroupClass"=="Cleric" /goto :Supportheal
/if "$GroupClass"=="Druid" /goto :Supportheal
/if "$GroupClass"=="Enchanter" /goto :Casterheal
/if "$GroupClass"=="Magician" /goto :Casterheal
/if "$GroupClass"=="Monk" /goto :Tankheal
/if "$GroupClass"=="Necromancer" /goto :Casterheal
/if "$GroupClass"=="Paladin" /goto :Tankheal
/if "$GroupClass"=="Ranger" /goto :Tankheal
/if "$GroupClass"=="Rogue" /goto :Supportheal
/if "$GroupClass"=="Shadow Knight" /goto :Tankheal
/if "$GroupClass"=="Shaman" /goto :Supportheal
/if "$GroupClass"=="Warrior" /goto :Tankheal
/if "$GroupClass"=="Wizard" /goto :Casterheal
/goto :SupportHeal
:Tankheal
/if n $spawn($group($GroupMember),hp,pct)<35 {
/if n $spawn($group($GroupMember),hp,pct)<1 /goto :nextmember
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/call CStand
/g COMPLETE HEAL on %T in 10seconds
/tell $vgLdr casting $char(gem,1) on %T
/g casting "$char(gem,1)" on %T
/varset Casttime $spell($char(gem,1),Casttime)
/call SpellSub 1 Casttime
/delay 5
/call CSit
/goto :nextmember
:Supportheal
/if n $spawn($group($GroupMember),hp,pct)<50 {
/if n $spawn($group($GroupMember),hp,pct)<1 /goto :nextmember
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/call CStand
/g Healing %T
/g casting $char(gem,2) on %T
/varset Casttime $spell($char(gem,2),Casttime)
/call SpellSub 2 Casttime
/delay 5
/call CSit
/goto :nextmember
:Casterheal
/if n $spawn($group($GroupMember),hp,pct)<80 {
/if n $spawn($group($GroupMember),hp,pct)<1 /goto :nextmember
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/call CStand
/g Healing %T
/g casting $char(gem,2) on %T
/varset Casttime $spell($char(gem,2),Casttime)
/call SpellSub 2 Casttime
/delay 5
/call CSit
/goto :nextmember
:nextmember
}
/doevents
/next GroupMember
/return
Code: Select all
|---***Set Main Healer***---
/if "$p2"=="You are the main healer" {
/varset vgMnH "$Char(Name)"
/varset CharRole "MHealer"
/varset CharJob 2
/g My role is $CharRole
/g I am the main healer
/return
}
Again as soon as the character is set to be the Main Healer, it starts up the Autoheal sub. At that point EQ crashes to desktop. I am thinking there is a loop that is not being closed. Can anyone suggest some things to change in the code?
Thanks.
Macro_Explorer

