Download
(7 Kb)
Download
Updated: 12-03-06 10:41 PM
Updated:12-03-06 10:41 PM
Created:unknown
Downloads:34,518
Favorites:67
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 (2)
File Name
Version
Size
Author
Date
Type
3.0
10kB
07-04-10 05:48 AM
Patch
2.01-30200
7kB
08-18-09 03:31 PM
Patch


Post A Reply Comment Options
Old 11-02-07, 12:18 PM  
osanaco
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 6
Uploads: 1
Hi Iriel:

I use your AfterCast since knowing it from WOWWiki about Macro Options.
The version I use now is 2.0-beta1-20100. Most time it works great.
Sometimes there are some warnings, but it does no matter.
It seems because of the event mechanism changed at 20200.

During waiting for your new version,
I try to write a whole new one after studying codes.
It also is event-driven to recognize spells, and uses the same input format
(I love it in AfterCast ^^)
Because I prefer your history frame, it is also preserved in my work
(with a little code modification, but outline is the same).

Besides, there are more functions added, such as +resist +immue, +evade,
which are mentioned in before posts. And it adds more GUI depending on
Ace2 Addons such as AceDB, FuBarPlugin.

Since it refers to your work, AfterCast, and is a work come from it.
I want to request your agreement to publish my work.
Your AfterCast indeed is very helpful for accomplishing the work.
And one more thing that I give it a new name, may I ?
Or, you have a plan of the new version of AfterCast to publish ?

Thank you very much.
Last edited by osanaco : 11-04-07 at 03:18 AM.
osanaco is offline Report comment to moderator  
Reply With Quote
Old 06-19-08, 07:20 PM  
Skorpion9x
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
http://img444.imageshack.us/img444/6...8200032fk3.jpg

Is there any way to stop this spam from happening? This is using spells that have no /aftercast macro associated with them.
Skorpion9x is offline Report comment to moderator  
Reply With Quote
Old 09-22-08, 05:39 PM  
Rofel
A Murloc Raider

Forum posts: 4
File comments: 3
Uploads: 0
Blizzard UI conflict

so im a 70 Mage learning the world of Macro's and i wanted to try something along the lines of a 'FrostfireBolt' lol, so i typed

/aftercast /cast Presence of Mind
/aftercast /cast Pyroblast
/cast Frostbolt

which would/should cast my highest rank Frostbolt, followed by Presence of Mind as well as my highest rank Pyroblast, making an instant cast Pyroblast

this should cast Frostbolt + an Instant Cast Pyroblast making what looks like a Frostbolt + Pyroblast, having both the slow affects from Frostbolt as well as the DPS affects from Pyroblast, correct?

** The only problem is this: "Aftercast has been blocked from an action only available to the Blizzard UI. You can disable this addon and reload the UI."

Now, i've got this /xperl UI Addon from my brother -i think thats what its called. Anyway, i'd like to keep this altered UI as well as the Aftercast addon, any suggestions?
Rofel is offline Report comment to moderator  
Reply With Quote
Old 09-22-08, 05:40 PM  
Rofel
A Murloc Raider

Forum posts: 4
File comments: 3
Uploads: 0
Originally posted by Iriel
No, you can't cast spells from an AfterCast action, you can only do non-protected functions.
Oh wait, you cannot cast spells? bah- well that defeats the purpose for me...
Rofel is offline Report comment to moderator  
Reply With Quote
Old 10-22-08, 09:13 PM  
Siku
A Fallenroot Satyr
 
Siku's Avatar
AddOn Author - Click to view AddOns

Forum posts: 25
File comments: 89
Uploads: 5
Is there a way to put a probability on the /aftercast +done ?

Because i wouldnt want my /say to be said EVERYTIME i cast that spell, or it would become quite annoying... im looking around 25% to say it.. is there a function to do that?
Siku is offline Report comment to moderator  
Reply With Quote
Old 10-26-08, 06:46 PM  
AnduinLothar
Nobody of Importance
 
AnduinLothar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 95
File comments: 208
Uploads: 49
I just got a "AfterCast: Unexpected event UNIT_SPELLCAST_INTERRUPTED in NormalCast"

i think it was when using my hammer macro:

#showtooltip Hammer of Wrath
/aftercast /y HAMMAR TIME!
/cast Hammer of Wrath
/use Headless Horseman's Helm

My Headless Horseman's Helm was int he bank at the time.
AnduinLothar is offline Report comment to moderator  
Reply With Quote
Old 04-10-09, 03:01 PM  
Nikzilla
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
For the next version:

I would love to stop the spam of Spell interupted

And please have a +crit option.
Nikzilla is offline Report comment to moderator  
Reply With Quote
Old 04-17-09, 01:06 AM  
Cowberty
A Murloc Raider

Forum posts: 8
File comments: 40
Uploads: 0
I think my aftercast broke.
Cowberty is offline Report comment to moderator  
Reply With Quote
Old 04-20-09, 05:42 AM  
KazamaSogetsu
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Seems this addon is still working, just need to be updated for some new actions. To stop the spam until then: open the AfterCast.lua file and comment the line 41:

Code:
DEFAULT_CHAT_FRAME:AddMessage("AfterCast: " .. msg);
It should be like this. Notice the "--" before the line:

Code:
local function Error(msg)
    -- DEFAULT_CHAT_FRAME:AddMessage("AfterCast: " .. msg);
end
It won't fix it, but at least won't output errors.
KazamaSogetsu is offline Report comment to moderator  
Reply With Quote
Old 06-21-09, 06:11 PM  
Malazee
A Kobold Labourer

Forum posts: 0
File comments: 10
Uploads: 0
Channeled casts

The /aftercast +done action doesn't seem to function properly for Channeled spells... for example:

Code:
#showtooltip Hymn of Hope
/aftercast +start /ra HYMN OF HOPE TICKING, USE YOUR MANA!
/aftercast +done /ra HYMN OF HOPE DONE
/cast Hymn of Hope
will show the start message, but not the done message. +done is working fine for normal casts.

I can achieve the done message by using the built-in Ace timer:

Code:
/in 8 /ra HYMN OF HOPE DONE
but that's not precise (the cast is less than 8 sec), it shows whether or not the cast was successful, and it defeats the whole purpose of having this addon.
Last edited by Malazee : 06-21-09 at 06:14 PM.
Malazee is offline Report comment to moderator  
Reply With Quote
Old 08-14-09, 02:08 AM  
Hammersbald
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 1
Uploads: 1
I posted an update of AfterCast here:

http://www.wowinterface.com/download...ansUpdate.html

It will fix the "unexpected event" errors, and has the "+done" event with channelled spells working again.
Hammersbald is offline Report comment to moderator  
Reply With Quote
Old 01-15-10, 05:31 PM  
duhwhat
An Aku'mai Servant

Forum posts: 39
File comments: 221
Uploads: 0
Hi Iriel. 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
Old 04-14-10, 12:49 PM  
Ceberus
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Originally posted by duhwhat
Hi Iriel. 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.
Try this

Code:
#showtooltip Hysteria
/aftercast /run SendChatMessage("You have Hysteria! GoGoGo!!1!", "WHISPER", nil, UnitName("UNITNAME"))
/cast [@UNITNAME] Hysteria
replace "UNITNAME" with the name of the character that it getting the buff.

PS. You don't have to do that /target UNITNAME and /attacklasttarget thing.
use [@target], it does the same thing.
__________________
WTB [Shadowmourne]
Ceberus is offline Report comment to moderator  
Reply With Quote
Old 10-25-10, 12:27 PM  
Caliga
A Murloc Raider

Forum posts: 7
File comments: 6
Uploads: 0
I wanted a macro to either /s or /y something when i cast but not when i cancel the cast using the same button.

#showtooltip Hellfire
/y INFERNO! **1st press not second which cancels cast**
/cast Hellfire
/cancelaura Hellfire
/script UIErrorsFrame:Clear()

Someone on wow macro forum suggested this addon and it seems like it might do what i need just dont know how to do that.
Caliga is offline Report comment to moderator  
Reply With Quote
Old 03-09-11, 03:28 PM  
deadcrusader
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
i really like this addon, is it possible to get an update for 4.0(or 4.1/4.2 when they come)?
deadcrusader is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: