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 do I get my free Far Cry Blood Dragon Classic Edition? How do I get my free Far Cry Blood Dragon Classic Edition?

Posted On: April 10, 2024
I bought Far Cry 6: Gold Edition from the PS Store on PS4 (Pro) a few months back and only now realised that, as well as most DLCs, it says I get Far Cry Blood Dragon Classic Edition for free, but I h...[More]


In Hogwarts Legacy, How do I get it open ? In Hogwarts Legacy, How do I get it open ?

Posted On: April 15, 2023
I don't know what else to do, I’ve watched videos about the whole quest and for some reason mine isn’t open ://. Question from user Critical-Surprise-52 at HogwartsLegacyGaming at r...[More]


What are the optimal strategies for buying and selling matches? What are the optimal strategies for buying and selling matches?

Posted On: January 16, 2023
In Luce's Journey, a trading survival game set in the Victorian era, you play as a young child who must trade matches in order to survive. The player character earns money by trading matches, a...[More]


What are all the ways to impact your trial grade in Outlast Trials? What are all the ways to impact your trial grade in Outlast Trials?

Posted On: June 22, 2023
In The Outlast Trials, you are given a personal grade (and a team grade) when you complete a trial. It is a letter-grade style score (A+, A, A-, B+ etc.). Performing certain actions can increase your ...[More]


What is the Mod Power Requirement? What is the Mod Power Requirement?

Posted On: August 2, 2023
Now I have completed the tutorial boss I have the chance to craft a mod for my weapon. Here is one of the options. This one has a 'Mod Power Requirement' of 600. What is this requirement an...[More]


What to know for first playthrough in Hogwarts Legacy? What to know for first playthrough in Hogwarts Legacy?

Posted On: August 18, 2023
Hey, just looking for some pointers that would help me for my first time playing - mostly what decisions have a later impact on gameplay, or quality of life tips :) no spoilers would be appreciated! T...[More]


Can I use N.E.I. every time i play? Can I use N.E.I. every time i play?

Posted On: September 19, 2023
Is it possible to always have Not Enough Items set up every time I play Minecraft even without Forge? Can I for example open Minecraft and choose my normal profile not Forge, and when I play have Forg...[More]


What is the optimal strategy for 2048? What is the optimal strategy for 2048?

Posted On: July 9, 2023
I've tried a few approaches, but I just can't make a tile with 2048. Question from user André Lucas at stackexchange. Answer: The key to all merging/matching/combining gam...[More]


STUCK Lvl 39. 100% STUCK Lvl 39. 100%

Posted On: September 11, 2023
PLEASE HELP. I haven’t seen any recent posts on this issue so I’m am reaching out. . I have completed HL to 100%. And I mean 100%, on EVERYTHING. There is no room for any more XP - not ...[More]


Am I doing this Durge thing right? About to hit act 2 Am I doing this Durge thing right? About to hit act 2

Posted On: June 24, 2025
Question from user Smiley_707 at BaldursGate3 at reddit.com.Answer:Umm… I think you may have an IRL dark urge.Answer from user TheMediumEagle at BaldursGate3 at reddit.com....[More]