Thread Tools Display Modes
12-31-18, 05:29 AM   #1
doofus
A Chromatic Dragonspawn
Join Date: Feb 2018
Posts: 158
Can macro determine if spell is on cooldown

I have a macro like this:
/cast Spell
/do other things


I would like it to be

if Spell not on cooldown
/cast Spell
/do other things
else
/do something else (or nothing)
end

Is that possible or will I have to script it inside an addon?
  Reply With Quote
12-31-18, 09:30 AM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
It is both not possible in a macro and not possible in an addon. You can have an addon check if a spell is on cooldown easily with GetSpellCooldown() but the “do stuff” and “do other stuff” parts cannot cast spells.
  Reply With Quote
12-31-18, 04:23 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
To clarify, you can not create logic in a macro (or addon) to cast spells based on a spell's cooldown or availability. Blizzard considers this automation, which is just a short step away from botting, and takes a hard stance against it.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
12-31-18, 05:28 PM   #4
doofus
A Chromatic Dragonspawn
Join Date: Feb 2018
Posts: 158
Academically, and as I know it, Blizzard allows "one key press = one action, per one client, of one to many clients" regardless how the "key press" made it to the "one client (of many)". That reasoning allows multiboxing.

For example I could run 3 copies WoW on the same machine, run an external, 3rd party application that switches between the WoW clients and sends them keystrokes (yes, really) and Blizzard is happy, as long as (1) I am physically present and (2) each keystroke input received by each WoW client is the result of one physical key press.

Yes I could not believe it either. There is so much scope there for abuse it defies belief.


Happy New Year everyone.
  Reply With Quote
12-31-18, 07:21 PM   #5
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
I would argue there's no room to abuse the rules given to multiboxers. You press a key, WoW receives that key. The caveat here is that WoW must receive the key that was pressed, nothing more, nothing different. The only "wiggle room" this provides is sending only a few clients the key press instead of all of them. WoW doesn't care if it actually doesn't receive a key press, that happens all the time when someone is alt-tabbed to another program.

Kind of off-topic to bring up multiboxing though.
  Reply With Quote
01-01-19, 04:57 AM   #6
doofus
A Chromatic Dragonspawn
Join Date: Feb 2018
Posts: 158
Kanegasi, a Windows application cannot ever know where a key it has received has come from, or indeed if it were a key that was pressed or some other activity, physical or virtual. I can explain in minute technical detail if you wish.

"Kind of off-topic to bring up multiboxing though."

To the contrary, multiboxing and botting are two sides of the same coin. You allow, actually encourage multiboxing, as Blizzard very publicly have done, and you also turn a blind eye to botting, because technically they are one and the same.
  Reply With Quote
01-01-19, 01:10 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
With multiboxing the player is still making the decisions. With botting, a program is. They are actually quite different.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Can macro determine if spell is on cooldown

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off