Conditional/Known Macro Help

I’ve googled and tinkered for quite a while before taking to the forums, so thank you in advance for taking the time to read this.

I am trying to use the two hunter talents binding shot and scatter shot, which are a talent node you need to choose between. I already have binding shot working with @cursor, but I want to be able to cast scatter shot in a priority of @mouseover and if no mouseover then @ target.

UPDATE: Figured it out, see below for anyone wondering.

I read some non-known macro posts and was able to get it working, I’ll leave this here for anyone trying to accomplish the same:

#showtooltip
/use [known:Binding Shot,@cursor] Binding Shot; [known:Scatter Shot,@mouseover,exists] Scatter Shot; Scatter Shot

2 Likes

“known” also works with the spellid which is much shorter and the # is nearly always much shorter than the talent name. Macro’s (without addon help) are limited to 255 characters and sometimes that limit becomes an issue.

Go to wowhead.com and search on the talent name and the spell id will be in the url. For example, binding shot’s spell id is 109248
https://www.wowhead.com/spell=109248/binding-shot
and scatter shot’s spell id is 213691
https://www.wowhead.com/spell=213691/scatter-shot

And you could shorten the macro to

#showtooltip
/use [known:109248,@cursor] Binding Shot; [known:213691,@mouseover,exists][] Scatter Shot

side note: the empty brackets [] just before scatter shot basically just says “cast spell normally”

1 Like

Small fix

#showtooltip
/cast [known:109248,@cursor] Binding Shot; [known:213691,@mouseover,harm,nodead] [known:213691] Scatter Shot
1 Like