Pvp Talent Swapping macro and forms

Hello.
I’m having a bit of trouble getting this macro to work.
It’s supposed to cast Moonkin Form while outside of it, and when on Moonkin Form it’s supposed to cast either Thorns or Faerie Swarm (depending on which one I have chosen).
This is what I’ve come up with so far but it isn’t showing the spells correctly.

#showtooltip
/cast [form:4]Thorns;Moonkin Form
/cast [form:4]Faerie Swarm;Moonkin Form
/run if(GetShapeShiftForm()=4) then G=GetSpellInfo SetMacroSpell(GetRunningMacro(), G"Thorns" or G"209749") else SetMacroSpell(GetRunningMacro(), G"24858")

What am I doing wrong?

Here’s a brief rundown of how macros work. First of all they exectue everything from the top to bottom, line by line and if they encounter a line they can’t exectue they just stop.

So in your case if you’re not in moonkin form it will cast it and trigger global cooldown, then it will try to cast Fearie Swarm but because of the global cooldown it can’t and macro stops.

If you are in moonkin form and know thorns it will cast it, trigger global cooldown and macro will stop. And if you kown fearie swarm it will try to cast thorns but it can’t so macro will stop.

In any of the case it necer reaches the last line. As form last line, it feels redundunt and SetMacroSpell doesn’t change what spell macro will cast, it only changes what icon and tooltip it will display.

I have no idea if what you want can be done without addons. Macros can’t realy check for pvp talents what you know and don’t know.

I could advise you to take a look at TalentMacros addon. It can generate you macros you want based on what talent you selected and it also works for pvp talents.

https://www.curseforge.com/wow/addons/talentmacros

Hello, thanks for the reply.
It seems that without SetMacroSpell the spell info doesn’t appear.
The macro works fine without the if conditional which is what I’m having trouble with, since it works with ShiftKeyIsDown() but not with GetShapeShiftForm(), probably because I’m doing it wrong.
It’s supposed to swap between pvp talent x and pvp talent y depending on which one I have chosen and only on form:4 (since you can’t do it with conditionals like normal talents).

Cheers

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.