Page 1 of 1

Wand macro question

PostPosted: Thu Nov 19, 2015 12:12 am
by Winstons
Hi guys, I'm pretty unfamiliar with how macros work, so I'm hoping some wiser heads can advise me here.

I'm looking to create a macro for my wand attack, that will target a specific type of totem if it is in range, and if there isn't one, to attack my current target. Is this possible? A biscuit is available as a prize.

Re: Wand macro question

PostPosted: Sat Nov 28, 2015 2:33 pm
by Dreez
a macro that automatically tries to target any totem and casts wand is only possible with repeat functions and weird conditions that'll either make it fail to work or crash your client

however here's a macro that tries to target a specific totem by its name, if it exists wands it, if it doesn't exist targets your last enemy and casts wand
Code: Select all
/run d=CheckInteractDistance("target", 4) c=CastSpellByName u=UnitCreatureType("target") TargetByName("Grounding Totem") if (u=="totem" and d==1) then c("Shoot") else TargetLastEnemy() c("Shoot") end


edit: range check implemented

Re: Wand macro question

PostPosted: Sat Nov 28, 2015 4:46 pm
by Winstons
Hi again! Thanks once more. I created a very simple half-assed version of this that essentially just auto-targets totems, but this is much better, thank you.