AfterCast

AfterCast - Perform action after a cast
---------------------------------------------------------------------------
This is a fairly simple addon for performing actions based on the success or failure of a cast. Usage is as follows

/aftercast /smile
/aftercast +fail /cry
/cast Frostbolt(Rank 2)

If the spell succeeds then you'll smile, if it fails, then you'll
cry. If it is interrupted then nothing will happen.

Events you can use are:

+done At the end of successful casting (Default if no event given)
+fail If the spell fails
+interrupt If the spell is interrupted
+start When spell starts casting (Fires before done for instant spells)

Aftercasts apply to the next spell which occurs, and then is reset, you can set up one of each event before each cast.

These functions can also be gotten at via lua functions

AfterCast(doneAction, failAction);
Shortcut to set up the 2 most common actions, either can be nil.

AfterCastOn(event, action)
Set up a specific action (use without the +, so "done", "fail", etc)

AfterCastReason([clearFlag])
Return the stop reason ("done"/"interrupt"/"fail") for the last cast (nil if none have stopped since the last clear).. if clearFlag is present and true then resets status after return.

Will it work for Cataclysm ? 4.0.6 for example ?
This addon is really useful, I was trying to do simple macro but was tired from accidental spamming when spell actually fails.
If it doesn't work in Cataclysm, can you write a version for it ?

I was told AfterCast could help me so that the whisper is only fired if Hysteria successfully goes off. I will occasionally be out of range of my preselected Hysteria go-to-guy, but they get the whisper even if it doesn't go off, leading to some confusion. How would I implement this? Thanks for your help.

I was told AfterCast could help me so that the whisper is only fired if Hysteria successfully goes off. I will occasionally be out of range of my preselected Hysteria go-to-guy, but they get the whisper even if it doesn't go off, leading to some confusion. How would I implement this? Thanks for your help.