Hello,
I am trying to create a Macro that allows me to announce a spell I used like Innervate in a chat channel (like raid), but also not allow it to spam the chat message if I accidentally click it more than once.
Macros can't check for spell success / failure.
Just don't spam.
#showtooltip (use '?' icon)
/cast Innervate
/ra Innervate used on %t
If you use mouseover, change %t to %m and change the second line to :
/cast [@mouseover,noharm,nodead] Innervate
Use AfterCast
Mordret's suggestion, AfterCast, is the best method for this. Check it out, it's very useful.
How to use thisCode:local a = CreateFrame("Frame") a:SetScript("OnEvent", function(self,event,...) if (select(2,...)) == "SPELL_CAST_SUCCESS" and (select(4,...)) == UnitName("player") and (select(10,...)) == "Innervate" then SendChatMessage("Innervated "..(select(7, ...)).."!", GetRealNumRaidMembers()>0 and "RAID" or "PARTY") end end) a:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
I'm using this macro :
Just change power infusion to the spell you want to use.#showtooltip
/script local u,pi="mouseover","Power infusion";if IsSpellInRange(pi,u)==1 and GetSpellCooldown(pi)==0 then SendChatMessage(GetSpellLink(pi).."Burst !","WHISPER",nil,UnitName(u)) end
/cast [target=mouseover] Power infusion
END
Use the addon SpeakinSpell instead, it is very cofigurable and will allow you to fix this 'announce' as well as many others.Originally Posted by Daginni
Aftercast is extremely out of date and will flood the user with errors, so if you want to link them to it, link the Fan Update version.
http://www.wowinterface.com/download...ansUpdate.html
Gershuun @ Borean Tundra US - Interface & Macros Moderator