Change the action bar based on the current form
As a druid you have completely separate actions when you're in humanoid/moonkin, bear, or cat forms. This will change your action bar automatically when you shapeshift.
if (arg1 ~= "player") then
return
end
local junk, englishClass = UnitClass("player")
if (englishClass ~= "DRUID") then
return
end
myForm=0
for i=1,GetNumShapeshiftForms(),1 do
icon,name,active=GetShapeshiftFormInfo(i)
if (active==1) then
myForm=i
break
end
end
-- you may want to change this to whichever bars you want
if (myForm==1) then
CURRENT_ACTIONBAR_PAGE=3
elseif (myForm==3) then
CURRENT_ACTIONBAR_PAGE=2
else
CURRENT_ACTIONBAR_PAGE=1
end
ChangeActionBarPage()