Download
(7 Kb)
Download
Updated: 08-18-09 03:31 PM
Patch for:
AfterCast.
Updated:08-18-09 03:31 PM
Created:08-14-09 02:03 AM
Downloads:5,900
Favorites:23
MD5:
AfterCast (Fan's Update)  Popular! (More than 5000 hits)
Version: 2.01-30200
by: Hammersbald [More]
--------------------------------------------------------
This is an update version of Iriel's AfterCast. I fixed the
events to make it work with 3.2 again. To save valuable
space in macros, I also added an additional /ac command.
Original version 1.1-20000 of this Addon can be found here:
http://www.wowinterface.com/downloads/info4167-AfterCast.html

Original description below:
--------------------------------------------------------
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. You can also use the shorter command,

/ac +start /p Casting Resurrection...
/ac +done /p Resurrection Done!
/cast Resurrection

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.
V2.01 - UNIT_SPELLCAST_SENT should no longer occurr as unexpected event in Sent.
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Author
Date
2.0-30200
7kB
Hammersbald
08-14-09 02:03 AM


Post A Reply Comment Options
Unread 03-09-11, 04:32 PM  
deadcrusader
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
I love this addon, is it possible to get an update for 4.0 (or 4.1/4.2 when they arrive)?

thanks
deadcrusader is offline Report comment to moderator  
Reply With Quote
Unread 07-12-10, 03:21 AM  
fligex
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
I also was having this problem.. so I hunted down a solution for it..

FIND IN (AfterCast.lua) AT LINE 40:

Code:
eBox.language = ChatFrameEditBox.language;
REPLACE WITH:
Code:
eBox.language = ChatEdit_GetActiveWindow();

I don't know much about addon code or nothing but I hunted down this solution online after trying to use the addon in its present state.

The addon works with this and does display the message as intended only when successfully cast. I haven't had much chance to test this fix fully but it seems to be working atleast better then it was.. 8)

enjoy~
fligex is offline Report comment to moderator  
Reply With Quote
Unread 07-02-10, 05:31 PM  
derekleeketchum
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Re: Re: 3.3.5 lua errors

Okay, I made the line 40 change and my /ac commands are now working properly, but I'm still getting lua error messages. This isn't a huge issue for me now since at this point I can now just uncheck the option to display those messages in my interface and it still works the way I intend it to. But I am concerned about these additional lua error messages I'm now getting. Any suggestions as to how to fix these errors from popping up?
Originally posted by Gotai
Open up AfterCast.lua, go to line 40. Change:

Code:
    eBox.language  = ChatFrameEditBox.language;
to

Code:
    eBox.language  = nil
derekleeketchum is offline Report comment to moderator  
Reply With Quote
Unread 07-02-10, 11:33 AM  
Capenus
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Code:
#showtooltip
/cast [@mouseover, help][@player] Hand of Freedom
/ac +done /run n=UnitName("mouseover") if (n) then SendChatMessage(n.."  Freedom", "channel", nil, 4) else SendChatMessage("Ich  Freedom", "channel", nil, 4) end
Doesn't work (No chat message), anyone an idea why?

PS: I changed line 40 in the AfterCast.lua
Last edited by Capenus : 07-02-10 at 11:34 AM.
Capenus is offline Report comment to moderator  
Reply With Quote
Unread 07-02-10, 11:16 AM  
Gotai
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 133
Uploads: 10
Re: 3.3.5 lua errors

Open up AfterCast.lua, go to line 40. Change:

Code:
    eBox.language  = ChatFrameEditBox.language;
to

Code:
    eBox.language  = nil
Gotai is offline Report comment to moderator  
Reply With Quote
Unread 07-02-10, 10:16 AM  
derekleeketchum
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
3.3.5 lua errors

I've been getting lua errors in wow ever since the 3.3.5 patch. Anyone else getting these problems, or have any suggestions how to fix this?
derekleeketchum is offline Report comment to moderator  
Reply With Quote
Unread 04-14-10, 05:33 PM  
trclocke
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 110
Uploads: 1
I'm receiving the following errors using your fan update. It seems to trigger when I'm using macros that don't even include the /ac command:
Code:
AfterCast: Unexpected event UNIT_SPELLCAST_INTERRUPTED in ChannelCast
AfterCast: Unexpected event UNIT_SPELLCAST_FAILED in ChannelCast
AfterCast: Unexpected event UNIT_SPELLCAST_DELAYED in Sent
Edit: extra errors being displayed, added to code above.

Edit 2: I know next to nothing about lua coding, but from looking through AfterCast.lua, all of the above events seem to be accounted for, but for some reason they're defaulting to the error display anyway. I don't know enough to be able to correct the problem, so I just removed the contents of the error function.
Last edited by trclocke : 04-27-10 at 04:00 PM.
trclocke is offline Report comment to moderator  
Reply With Quote
Unread 01-27-10, 06:12 PM  
Dajova
A Wyrmkin Dreamwalker
 
Dajova's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 825
Uploads: 13
Originally posted by duhwhat
Hello. I was directed to your addon from the official wow macro/ui forum.

Basically, I use the following macro for Hysteria:

Code:
#showtooltip
/target Manuallyenteredplayername
/cast Hysteria
/run SendChatMessage("Hysteria on %t.", "WHISPER", nil, UnitName("target")) 
/targetlasttarget 
/startattack

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.
Code:
#showtooltip
/target Manuallyenteredplayername
/cast Hysteria
/ac +done /run SendChatMessage("Hysteria on %t.", "WHISPER", nil, UnitName("target")) 
/targetlasttarget 
/startattack
__________________


Livestream | Twitter | Facebook | YouTube


Dajova is offline Report comment to moderator  
Reply With Quote
Unread 01-15-10, 06:32 PM  
duhwhat
A Cyclonian

Forum posts: 40
File comments: 220
Uploads: 0
Hello. I was directed to your addon from the official wow macro/ui forum.

Basically, I use the following macro for Hysteria:

Code:
#showtooltip
/target Manuallyenteredplayername
/cast Hysteria
/run SendChatMessage("Hysteria on %t.", "WHISPER", nil, UnitName("target")) 
/targetlasttarget 
/startattack

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.
duhwhat is offline Report comment to moderator  
Reply With Quote
Unread 01-08-10, 12:41 PM  
Dajova
A Wyrmkin Dreamwalker
 
Dajova's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 825
Uploads: 13



:/
__________________


Livestream | Twitter | Facebook | YouTube


Dajova is offline Report comment to moderator  
Reply With Quote
Unread 12-04-09, 06:47 PM  
Goobers
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
I must be doing something wrong.

I have it set up so that when i use death grip, it says something. but if I use the macro and don't have a target, it says nothing. Like it's supposed to. but the moment I use/cast anything else, it says it.

How do i make that stop?
Goobers is offline Report comment to moderator  
Reply With Quote
Unread 11-06-09, 02:01 PM  
Bifidus
A Kobold Labourer

Forum posts: 0
File comments: 45
Uploads: 3
Hi.

I got a bug with iceblock (a mage cast).
When i use it in a macro, the /ac +done /s blabla part of the macro will say "blabla" two times. One time after iceblock is done, and one other for the next action (even if it's not a cast).
If a replace iceblock with another cast, everything is fine.
So... what's the problem with iceblock ? ^^

Thank you in advance for any answer.
Bifidus is offline Report comment to moderator  
Reply With Quote
Unread 11-03-09, 11:15 AM  
Rofel
A Murloc Raider

Forum posts: 4
File comments: 3
Uploads: 0
Red face +crit

Would It be possible for Aftercast to recognize when a Crit occurs?

I was on my Boomkin in Arathi Basin and I noticed myself saying Boom everytime my Starfire critted lol. So I remembered /Aftercast
Rofel is offline Report comment to moderator  
Reply With Quote
Unread 09-22-09, 04:15 PM  
optikuz
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
[23:07] AfterCast: Unexpected event UNIT_SPELLCAST_INTERRUPTED in ChannelCast

Got it while interrupting my own spell to cast another one I think.
optikuz is offline Report comment to moderator  
Reply With Quote
Unread 08-16-09, 09:06 AM  
Syngian
A Kobold Labourer

Forum posts: 0
File comments: 75
Uploads: 0
Originally posted by ckramme
I sometimes get this
Code:
AfterCast: Unexpected event UNIT_SPELLCAST_SENT in Sent
in the chat. Screenshot
If I am on tournament mounts it fires all the time.
I also get this message, most typically on my boomkin, I've also received the message "AfterCast: Unexpected event UNIT_SPELLCAST_DELAYED in Sent".

Thanks btw for continuing this project!
Syngian is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: