If Spell Not On Cooldown Run Script?

This is sort of silly and trivial, but…

Here’s what I have:

#showtooltip Psychic Scream
/cast Psychic Scream
/script s={“Sorry… Need a moment…”,“You can see I’m busy! Back off!”,“Not now… Come back later!”,“Listen up! Take a hike, buddy!”,“Sorry… no time for you right now.”};SendChatMessage(s[random(1,5)], “SAY”)

This works, but… even if Psychic Scream is on cooldown, it runs the script.

QUESTION: Is there any way to have the script ONLY run if the spell is castable (off cooldown)?

It tends to get mentioned fairly early into most guides, however macros are not intended to make decisions like that. There is no way to restrict a macro’s activation to whether or not the spell is on CD.

1 Like

this is from another thread

#showtooltip
/run if GetSpellCooldown("Avenging Wrath") == 0 then SendChatMessage("We Strike with the Wrath of the Righteous!","yell"); end
/use avenging wrath
3 Likes

I was hoping it was something like this! Thanks!