View Single Post
02-12-14, 04:51 PM   #1
Spawnova
A Warpwood Thunder Caller
 
Spawnova's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2012
Posts: 96
Macro Efficiency

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:
  1. /run local p="MOUNT";
  2. for i=1,GetNumCompanions(p) do
  3.     local f=IsFlyableArea();
  4.     local _,v=GetCompanionInfo(p,i);
  5.     if v=="Obsidian Nightwing" and f==1 then
  6.         CallCompanion(p,i)
  7.     elseif v=="Vicious Skeletal Warhorse" then
  8.         CallCompanion(p,i)
  9.     end
  10. end
There is tabbing just for readability normally it would be one line.
  Reply With Quote