How can I disable use of a macro if a spell is on cooldown?

[BACK]
How can I disable use of a macro if a spell is on cooldown?
Posted On: January 29, 2023

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.



[BACK]
How can I disable use of a macro if a spell is on cooldown?
Posted On: January 29, 2023

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.



[BACK]

How to get the Operating Profit Graph for the entire game? How to get the Operating Profit Graph for the entire game?

Posted On: September 6, 2023
The game shows it only for last few years:. Is it possible to get similar graph for the entire game duration? Question from user ZakiMa at stackexchange. Answer: It's not possible. The...[More]


Why does my map have exclamation points marked on it? Why does my map have exclamation points marked on it?

Posted On: April 19, 2024
I have just started playing and some locations on my compass have an exclamation point marked and I have no idea what this is telling me. I have highlighted it below.What are these exclamation points ...[More]


Can someone tell me what is wrong with my game in Hogwarts Legacy? Can someone tell me what is wrong with my game in Hogwarts Legacy?

Posted On: May 21, 2023
I’ve tried most of the settings and the game is still very laggy when trying to talk or do anything. . Also nightmare fuel graphics. AlL NPC/ characters look like this. Question from user ...[More]


What programming language or game engine is Hogwarts Legacies written in? What programming language or game engine is Hogwarts Legacies written in?

Posted On: July 20, 2023
I was curious as to what was used to make this game. What programming language or game engine was used to create Hogwarts Legacies? Question from user Shaun Roselt at stackexchange. Answer: ...[More]


Can you control what ore a drill harvests when its placed over multiple ores? Can you control what ore a drill harvests when its placed over multiple ores?

Posted On: January 5, 2024
I'm trying to harvest the maximum amount of uranium possible from a small patch. Unfortunately, there is a bordering coal patch nearby as well, and two of my electric mining drills are within rang...[More]


Are Cheats in GTA5 official feature or is it some hack spread by developers - users? Are Cheats in GTA5 official feature or is it some hack spread by developers - users?

Posted On: November 30, 2023
When you press ` (backtick) key in GTA5, you can enter cheat codes like BUZZOFF. Now I was wondering is this official feature? I find it a bit strange because on GTA5 official site and in their Man...[More]


Just need some advice ?? Just need some advice ??

Posted On: November 28, 2025
Im doing my first real play through, and decided to play on tactician and would really like some advice/tips. So far i made it to the cove after finding the guy who can respec your characters. Battle...[More]


Ancient Magic Theory relating to Harry Potter Ancient Magic Theory relating to Harry Potter

Posted On: July 31, 2023
So we know that the Keepers became Keepers because they wanted to keep the truth of the ancient magic from others because it could turn them evil, as we see with Isidora. It turned her dark. What i...[More]


Agitated Giant Thrips: how to properly deal with them in Dwarf Fortress? Agitated Giant Thrips: how to properly deal with them in Dwarf Fortress?

Posted On: April 25, 2023
The number one cause of death on my Fortress is: attack by flying insects. As they don't activate the Cage Traps, because they don't touch the ground, which are the possible ways to deal wi...[More]


What do the Dota 2 ranks mean in the context of individual unranked games? What do the Dota 2 ranks mean in the context of individual unranked games?

Posted On: August 10, 2023
When I look at my matches on https://www.dotabuff, I see that it includes ranks like Archon, Crusader, Guardian etc. with each game. However, all these games are unranked (and I have never played a...[More]