Sub CastInteruptDPS(string CIDSpell)
/if (${DebugCast}) /echo \atDEBUGCAST CastInteruptDPS Enter \agLine#: ${Macro.CurLine}
/if (!${Int[${Me.Casting.ID}]}) /return
/if (${Target.Type.Equal[pc]}) /return
/if (${Target.PctHPs}<1 || ${Target.Type.Equal[corpse]} || !${Int[${Target.ID}]}) {
/stopcast
/varset CastResult CAST_CANCELLED
/echo ${CIDSpell} interrupted due to Killing corpses is not required.
/if (${DebugCast}) /echo \atDEBUGCAST CastInteruptDPSCheckDPS1: ${Target.PctHPs} ${Target.Type} ${Int[${Target.ID}]} \agLine#: ${Macro.CurLine}
}
/if (${HealsOn}) {
/if (!${IAmMA} && ${Spawn[${MainAssist}].PctHPs}<70 && ${Spawn[${MainAssist} ${MainAssistType}].ID} && ${Spawn[${MainAssist} ${MainAssistType}].Type.NotEqual[corpse]} && ${Select[${Me.Class.ShortName},nec,mag]}==0) {
/stopcast
/varset CastResult CAST_CANCELLED
/echo ${CIDSpell} interrupted due to The Main Assist Needs a Heal.
/if (${DebugCast}) /echo \atDEBUGCAST CastInteruptDPS CheckDPS2: ${HealsOn} ${Spawn[${MainAssist}].PctHPs} ${Spawn[${MainAssist} ${MainAssistType}].ID} ${Spawn[${MainAssist} ${MainAssistType}].Type} \agLine#: ${Macro.CurLine}
} else /if (${Select[${Role},pettank,petpullertank,hunterpettank]}>0 && ${Me.Pet.ID} && ${Me.Pet.PctHPs}<80) {
/stopcast
/varset CastResult CAST_CANCELLED
/echo ${CIDSpell} interrupted due to my Pet Tank needs a heal.
/if (${DebugCast}) /echo \atDEBUGCAST CastInteruptDPS CheckDPS3: ${HealsOn} ${Me.Pet.ID} ${Me.Pet.PctHPs} \agLine#: ${Macro.CurLine}
}
}
/if (${DebugCast}) /echo \atDEBUGCAST CastInteruptDPS Leave \agLine#: ${Macro.CurLine}
/return