This macro should do what OP asked for while fitting within the default character limit. Can't currently test it as I'm at work and not 100% sure if the API functions used exist in 1.12, but worth a try nonetheless.
Code:
/run a = UnitAffectingCombat("player");b = GetShapeshiftForm()if a then if b == 3 then CastSpellByName("Intercept");else CastSpellByName("Berserker Stance");end;elseif b == 1 then CastSpellByName("Charge");else CastSpellByName("Battle Stance");end;
It does require two clicks if it needs to switch stances, but that isn't avoidable afaik.
Edit: GetShapeshiftForm() seems to be a 2.0 addition. Can't find a way to make the macro work within 255 chars.
To make the macro work, paste the following into the SuperMacro extended lua code:
Code:
function GetShapeshiftForm() for i=1,GetNumShapeshiftForms() do local _,_,c = GetShapeshiftFormInfo(i); if c then return i; end; end; end;
Edit 2: We should really make an addon that implements some missing API functions. Would make making macros much easier.