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.
How is the additional damage from Chosen weaknesses calculated?
Is there any way I can give myself 360° vision in game?
This Just Distracts Me in Hogwarts Legacy
What is the best class to RP as a doctor?
Efficient use of Construction Robots
My MC’s And Alcohol (Hogwarts Legacy)
Screen flashing during the day in Watch Dogs
How much grain can a giant node produce with the production per 25 perk?
In the Witcher 3, Will I always get the warning that quests may fail?



