A significant thing to remember if you're getting really into macros is that TrinityBars2.0 allows you to make macros that are up to something like 5000 characters long. I'm willing to bet that there are other addons that will let you do this without replacing your Action Bars. This allows for some really nifty things. For example, here's my general Bear Form macro, weighing in at a hefty 781 characters:
#showtooltip [modifier:shift] Enrage; Dire Bear Form
/cast [stance:1,modifier:shift] Enrage
/stopmacro [stance:1,modifier:shift]
/cast [nostance] Dire Bear Form
/stopmacro [nostance]
/equip [stance:1] Pillar of Ferocity
/equip [stance:1] Idol of Terror
/script local f="Dire Bear Form" local gcd=GetSpellCooldown(f)>0 or not IsUsableSpell(f); if not gcd then CancelPlayerBuff("Dire Bear Form") CancelPlayerBuff("Cat Form") CancelPlayerBuff("Travel Form") end;
/script local f="Dire Bear Form" local gcd=GetSpellCooldown(f)>0 or not IsUsableSpell(f); if not gcd then CancelPlayerBuff("Swift Flight Form") CancelPlayerBuff("Moonkin Form") CancelPlayerBuff("Tree Form") end;
/stopmacro [stance]
/cast [nostance] Dire Bear Form
/equip [nostance] Pillar of Ferocity
/equip [nostance] Idol of Terror
I'll explain in pseudo-code...
if (in Bear Form with "shift" held down)
/cast Enrage
/stopmacro
elseif (in caster form)
/cast Bear Form
/stopmacro
elseif (in Bear Form)
/equip Bear staff
/equip Bear Idol
#Note that if this actually causes a weapon swap, it puts you on GCD
elseif ("Bear Form" spell not on cooldown and you have mana to cast it)
/cancelaura Bear Form
/cast Bear Form
/equip Bear staff
/equip Bear Idol
end
I also have a similar version for Cat Form, but you should be able to figure that out from this code. There are two quirks about this macro. First, it will pop you out of any form that you happen to be in if you try to use it while stunned or otherwise incapacitated. IsUsableSpell() doesn't seem to consider being stunned as a condition under which you can't cast a spell. Secondly, if you use this macro from caster form, it won't equip the weapons that it does at any other time that you use it. You can, however, basically double-tap the macro to shift into Bear Form and then equip weapons. If the second click is while you're still on GCD from entering Bear Form, the /equips will be the only actions performed.
The problems in most powershifting macros that this fixes are pretty cool. Firstly, you won't ever attempt to shift when you're on GCD. (Note that this can also be fixed by using a /cast !Bear Form line instead of the /cancelform /cast combination). Also, this macro won't attempt to swap your weapons if you're not on GCD and not in Bear Form. That problem with normal powershifting macros caused me a lot of trouble in Arenas where I'd be clicking my shift button while I was on GCD, so I'd wind up extending the GCD by another 1.5 seconds. (Equipping weapons in combat causes a GCD from the instant the /equip command was sent, even though you can do the equipping while you're already on GCD).