Sub CheckForCombat(int SkipCombat, string FromWhere)
/if (${Debug} || ${DebugCombat}) /echo CheckForCombat Enter SkipCombat: ${SkipCombat} ChainPull: ${ChainPull} Role: ${Role} ${FromWhere}
/if (${SkipCombat}) /goto :SkipMelee
:CombatTop
/if (${Debug}) /delay 5
/if ((${DMZ} && ${Me.InInstance}==FALSE) || ${Me.Hovering} || ${IAmDead} || (!${MobCount} && !${AggroTargetID}) || (!${DPSOn} && !${MeleeOn})) /return
/if (${Debug} || ${DebugCombat}) /echo CheckForCombat: Assist/Combat Begin ${If[!${SkipCombat},Normal,CheckForAdds]}
/call Assist
/call Combat
/if (${Debug} || ${DebugCombat}) /echo CheckForCombat: Assist/Combat End ${If[!${SkipCombat},Normal,CheckForAdds]}
/if (${ChainPull}==2) /return
:SkipMelee
/call CheckForAdds CheckForCombat
|/if (${Role.Equal[tank]}) {
/if (${Select[${Role},tank,pettank]}) {
| If tank is assisting puller and in chase mode
/if (${MainAssist.NotEqual[${Me}]} && ${ChaseAssist}) /call DoWeMove
/if (${ReturnToCamp} && !${MobCount} && ${Math.Distance[${CampYLoc},${CampXLoc}]}>10 || (${MobCount}==1 && ${AggroTargetID} && ${Math.Distance[${CampYLoc},${CampXLoc}]}>75)) /call DoWeMove
/if ((${MobCount} && ${AggroTargetID}) || ${TankTimer}) /goto :CombatTop
}
/if (${Debug} || ${DebugCombat}) /echo CheckForCombat MobCount: ${MobCount} AggroTargetID: ${AggroTargetID} ChainPull: ${ChainPull}
/if ((${AggroTargetID} && !${ChainPull}) || (${MobCount}>1 && ${ChainPull})) /goto :CombatTop
/if (${MobCount}==1 && ${ChainPull}) /return
/if (${ReturnToCamp} && ${Math.Distance[${CampYLoc},${CampXLoc}]}>10) {
/if (${MainAssist.NotEqual[${Me}]}) /delay ${Math.Calc[${Math.Rand[1]}+1]}s
/if (${MobCount}<=0) /call DoWeMove
}
/if (${Debug} || ${DebugCombat}) /echo CheckForCombat Exit.
/return