Second time i look at LUA, so this might be the least elegant function ever seen: targets the pet that has the lowest health in you current set of followers. (in PetWindow.lua) Code: function PetWindow.GetPetHealth(petId) local h = WindowData.MobileStatus[petId].CurrentHealth return h end function PetWindow.TargetLowestHealthPet() local targetId = nil local lowestHealth = -1 local i for i=1,PetWindow.totalPets do local id = WindowData.Pets.PetId[i] local health = PetWindow.GetPetHealth(id) if((lowestHealth == -1) or (health < lowestHealth)) then targetId = id lowestHealth = health end end if(targetId ~= nil) then HandleSingleLeftClkTarget(targetId) end end Then i use it in a macro like this: Slot 1: script PetWindow.TargetLowestHealthPet() Slot 2: bandage selected target I find it quite useful when i take my dogs out, I'm still testing it, works well so far. EDIT: of course it was fraught with problems (the table is used as reference didn't keep track of changes in the pet set, maybe). Now it works even after changing the pets. Sorry but coding for the EC is like moving blindfolded with a dark sky in a foggy night under heavy rain.