Article Categories
- Baldur's Gate 3
- Diablo
- Elder Scrolls
- General
- Hogwarts Legacy
- League of Legends
- Minecraft
- Pokemon Go
- Sims 4
- StarCraft
- Steam Platform
- Xbox Game Console
More Articles
How can I disable use of a macro if a spell is on cooldown?

As a Shadow Priest, I use a macro to announce to those nearby who I'm casting Power Infusion on. I do this for clarity in a raid and Mythic+ setting. It works fairly well.
The problem I'm encountering is that I'm sometimes pressing this macro before Power Infusion's cooldown timer is over. This causes the /yell message to send regardless of whether I actually cast Power Infusion or not, leading to me awkwardly mentioning in voice chat that I've not, actually, cast Power Infusion.
Here's my current macro:.
#showtooltip Power Infusion.
/target [@mouseover,help,nodead][help,nodead][@player].
/cast Power Infusion.
/yell Casting Power Infusion on %t.
/targetlasttarget.
I'm abusing /targetlasttarget to make this an easy-to-use mouseover macro.
Is there a way to make this macro not execute at all if Power Infusion is on cooldown?
Question from user Spevacus at gaming.stackexchange.com.
Answer:
So Blizzard removed the ability for a macro to make a determination whether or not to cast a spell. People were abusing this and making automated combat macros that would always cast the most effective barrage of spells/attacks in combat, and it was a game-changer for people on both sides.
You can check that a spell is on cooldown in Lua (https://wowwiki-archive.fandom.com/wiki/API_GetSpellCooldown), but you can't call that from a macro.
(Calling Lua from a macro was the main part of what was removed from the macro abilities.).
Answer from user Tim S. at gaming.stackexchange.com.

As a Shadow Priest, I use a macro to announce to those nearby who I'm casting Power Infusion on. I do this for clarity in a raid and Mythic+ setting. It works fairly well.
The problem I'm encountering is that I'm sometimes pressing this macro before Power Infusion's cooldown timer is over. This causes the /yell message to send regardless of whether I actually cast Power Infusion or not, leading to me awkwardly mentioning in voice chat that I've not, actually, cast Power Infusion.
Here's my current macro:.
#showtooltip Power Infusion.
/target [@mouseover,help,nodead][help,nodead][@player].
/cast Power Infusion.
/yell Casting Power Infusion on %t.
/targetlasttarget.
I'm abusing /targetlasttarget to make this an easy-to-use mouseover macro.
Is there a way to make this macro not execute at all if Power Infusion is on cooldown?
Question from user Spevacus at gaming.stackexchange.com.
Answer:
So Blizzard removed the ability for a macro to make a determination whether or not to cast a spell. People were abusing this and making automated combat macros that would always cast the most effective barrage of spells/attacks in combat, and it was a game-changer for people on both sides.
You can check that a spell is on cooldown in Lua (https://wowwiki-archive.fandom.com/wiki/API_GetSpellCooldown), but you can't call that from a macro.
(Calling Lua from a macro was the main part of what was removed from the macro abilities.).
Answer from user Tim S. at gaming.stackexchange.com.
Team Fortress 2 Bonus Points and How To Get Them
What happens to free games obtained through PlayStation Plus after it expires?
Neds Island weapon slots and backpack SDU in DLC
Anyone else find slapping the daedalion keys nearly impossible?
In Ben 10 Alien Force, How do you defeat the two huge snakes that come out of the wall?
Which frigate in Eve has the fastest sub-warp speed after fittings and skills?
Can you import a save from Walking Dead Season 1 to Season 2?
Can a missed shot in Xcom2 still execute?
Do you ever cast other smites over Divine as Paladin?



