I've made a macro below that uses either my ground or flying mount depending on the area and it took just about the entire 255 characters so I was wondering if anyone knew any tips or tricks to condense it so I could learn for future cases.
My code:
Lua Code:
/run local p="MOUNT";
for i=1,GetNumCompanions(p) do
local f=IsFlyableArea();
local _,v=GetCompanionInfo(p,i);
if v=="Obsidian Nightwing" and f==1 then
CallCompanion(p,i)
elseif v=="Vicious Skeletal Warhorse" then
CallCompanion(p,i)
end
end
There is tabbing just for readability normally it would be one line.