Macro text help

UI and Macro
Sorry for the general title, it was hard to fit my question in.

Anyway, is there some way to make a macro so that if I want the the macro to say something in chat, the macro will only say it if the spell casts successfully?

For example, say I want a macro that uses Last Stand and also says, "**Last Stand Activated** in Party chat. However, I only want it to say, "**Last Stand Activated**" when and only when the spell casts. Whenever I try to make a simple macro like:

#showtooltip
/cast Last Stand
/p **Last Stand Activated**

I end up spamming the key and so it prints the text to party chat like five times, which I don't want to happen.

In addition, if the spell is on cd, I don't want the text to appear.

Is there any macro or addon that does this? Thank you for your time.
#showtooltip
/cast Last Stand
/run if GetSpellCooldown("Last Stand")==0 then SendChatMessage("** Last Stand Activated **","party") end
Thanks a ton, Ro.
thanks Ro
that worked well for my monk but only if the move is on cooldown,

any idea how to only make it say when spell is able to be used?
im adding text to Touch of Death to say FATALITY!,

it still spams unless the move is on cooldown, i only want to say it as its cast

thanks :o)
Your best bet is an addon, such as SpeakinSpell.
Yeah an addon is a better route mostly due to space considerations.

#showtooltip
/cast Touch of Death
/run local f=ToD or CreateFrame("Frame","ToD") f:SetScript("OnEvent",function(s,e,u,p) if u=="player" and p=="Touch of Death" then SendChatMessage("FATALITY!","party") end end) f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")

is 254 characters. But you can remove the #showtooltip, use /use instead of /cast and remove spaces after closing )s to squeeze in more characters.

Join the Conversation

Return to Forum