Emote on successful spellcast macro

Hi guys! I used this macro in 3.3.5a (original wotlk) and does not seem to work anymore.

/cast Gouge
/run local f=RbA or CreateFrame(“Frame”,“RbA”) f:SetScript(“OnEvent”,function(s,e,u,p) if u==“player” and p==“Gouge” then DoEmote(“LAUGH”) end end) f:RegisterEvent(“UNIT_SPELLCAST_SUCCEEDED”)

It is supposed to do a laugh emote if my gouge was successful. Any ideas what changed?

/run local f=RbA or CreateFrame("Frame","RbA") f:SetScript("OnEvent",function(s,e,u,_,p) if u=="player" and p==1776 then DoEmote("LAUGH") end end) f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")

Maybe, dunno, I don’t play Classic to test it.

Based off the link, wouldn’t the arg order be s,u,_,p rather than s,e,u,p

self
unitTarget
castGUID
spellID

Also, make sure to wrap any code you post on the forums in code tags (</> button in the editor) or the forums convert the quotes to smartquotes etc.

/run local f=RbA or CreateFrame("Frame","RbA") f:SetScript("OnEvent",function(_,_,u,_,p) if u=="player" and p==1776 then DoEmote("LAUGH") end end) f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")

The first 2 arguments in an event call are self and event, then the unique arguments of the event.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.