Cancel cast when no target?

Cage9d9

Member
Joined
Aug 26, 2008
Messages
210
Reaction score
5
Points
18
I like to write my own custom macros and for the most part I can get what I need from existing resource such as bot.mac, wiki, etc. My current challenge is that as my nukers are nuking a target, it may die mid cast (maybe pets are killing it, or wahtever). I'd like to be able to stopcast if the target dies.

Do I really need to build that into my macro? For example, I noticed that MQ2Cast had a cast until target dies which would be great (not sure if that actually cancels the last nuke if target dies before the nuke goes off).

I must be missing something here, but I don't think I should have to write a loop that basically does:

:ALoopHere
/if ( ${Me.Casting} && !${Target.ID} ) {
/stopcast
} else /if ( ${Me.Casting} && ${Target.ID} ) {
/goto :ALoopHere
}

I feel like that probably exists somewhere, but I don't see it at the moment.
 
Last edited:
/interrupt is already built into spell routines.. fyi
 
Sorry, I must not understand what a spell routine is? Could you point me in the right direction to read up on those?
 
OHhh, Spell_routines.inc you must be referring to?? Let me take a look at this, I hadn't paid attention to that. I'll review it! THanks pete
 
There's bunch of ways you could add yourself. Such as mq2events, when basically any mob dies, and then if casting & the casting spell target type is npc & you have no target or target is dead, then interrupt the spell (such as /stopcast).