Macro text help

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.
Reply Quote
90 Gnome Warrior
12295
#showtooltip
/cast Last Stand
/run if GetSpellCooldown("Last Stand")==0 then SendChatMessage("** Last Stand Activated **","party") end
Reply Quote
Thanks a ton, Ro.
Reply Quote
80 Human Monk
8570
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)
Reply Quote
90 Blood Elf Paladin
10415
Your best bet is an addon, such as SpeakinSpell.
Reply Quote
90 Gnome Warrior
12295
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.
Reply Quote

Please report any Code of Conduct violations, including:

Threats of violence. We take these seriously and will alert the proper authorities.

Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.

Harassing or discriminatory language. This will not be tolerated.

Forums Code of Conduct

Report Post # written by

Reason
Explain (256 characters max)
Submit Cancel

Reported!

[Close]