Download
(7Kb)
Download
Updated: 12-03-06 11:41 PM
Updated:12-03-06 11:41 PM
Created:unknown
Downloads:43,400
Favorites:71
MD5:

AfterCast  Popular! (More than 5000 hits)

Version: v1.1-20000
by: Iriel [More]

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.

Optional Files (0)


Post A Reply Comment Options
Unread 08-12-06, 07:23 PM  
Curney
A Murloc Raider
 
Curney's Avatar
AddOn Author - Click to view AddOns

Forum posts: 8
File comments: 23
Uploads: 1
can you give any example of how you use the functions in lua?

i use clique and i want to integrate aftercast with some spells casting..

for instance..
AfterCastOn("done", SendChatMessage("Casting heal on you!", "WHISPER", "COMMON", Clique.unit));
AfterCastOn("fail", SendChatMessage("I failed to heal you!", "WHISPER", "COMMON", Clique.unit));
CastSpellByName("Flash Heal(Rank 5)")

i sends both whispers then casts the flash heal. help please?
__________________
Curney of Uther

Vita Infinita
Report comment to moderator  
Reply With Quote
Unread 04-27-06, 08:44 AM  
unreal_space
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
kill my dialog window

i has setup your addon, then i found while my spells' bar goes over dialog window will show a message "timer 1".
i am a priest, using Flash Heal so much, these messages roll my dialog too quick.
How can i just turn off this massage?
BTW: i am a foreigner, and my English is not good, if you can understand me,please reply.
THANK YOU!
Last edited by unreal_space : 04-27-06 at 08:46 AM.
Report comment to moderator  
Reply With Quote
Unread 03-28-06, 01:11 AM  
Iriel
Super Moderator
WoWInterface Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 578
File comments: 25
Uploads: 22
1.10 Update delayed

It seems that the 1.10 patch introduced an event change I wasn't prepared for, AfterCast will be delayed a day or so while I verify it still works. The 1.9 version should work for all but channeled spells, and MIGHT work for those, also.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: