Page 1 of 1

Collection of my Hunter Macros

PostPosted: Thu Jan 05, 2023 10:32 am
by slverbaur
Because I can never find them.

Spammable Feign Death button

Code: Select all
/run local i,x,T=1,0,"player" while UnitBuff(T,i) do if string.find(UnitBuff(T,i), "Feign") then x=1 end i=i+1 end if x==0 then CastSpellByName("Feign Death") else end



Feed Pet Macro (requires supermacro)

*Never have to care about where the food is in your bags*

Put this in "Extended Lua Code"

Code: Select all
function FeedPetByName(x)
   for b=0,4 do
      for s=1,GetContainerNumSlots(b) do
         if (string.find(GetContainerItemLink(b,s) or " ", x)) then
            PickupContainerItem(b,s) DropItemOnUnit("pet")
            b=4
            break
         end
      end
   end
end



Put this in the "Macro Commands" (left side in SuperMacro)

Code: Select all
/script FeedPetByName("Name of Food");



Example use:

Code: Select all
/script FeedPetByName("Roasted Quail");




Auto Shot + Hunter's Mark + Pet Attack macro

Code: Select all
/run if not IsAutoRepeatAction(25) then CastSpellByName("Auto Shot");end
/run local i,x,T=1,0,"target" while UnitDebuff(T,i) do if string.find(UnitDebuff(T,i), "Sniper") then x=1 end i=i+1 end if x==0 then UseAction(36) else end
/run PetAttack();


Note: 25 is for AUTO SHOT ---- Change 25 to the number of where your Auto Shot is.

Note: 36 is for HUNTER'S MARK. ---- Change 36 to the number of where your Hunter's Mark is.

Numbers reference: https://i.imgur.com/plXbRdd.jpg


Aspect of Cheetah vs Aspect of Pack

This script will cast one spell if your target is friendly. It'll cast a different spell if your target is hostile.

Code: Select all
/script if UnitIsFriend("player", "target") then CastSpellByName("Aspect of the Pack") else CastSpellByName("Aspect of the Cheetah") end



Pet Attack/Follow Toggle Macro

Attack/follow toggle which handles edge cases due to client limitations.

Code: Select all
/run if not UnitExists("target") or UnitIsDead("target") then PetFollow(); return; end if not UnitIsUnit("target", "pettarget") then PetAttack(target); else PetFollow(); end
 



Rested XP Macro (Not hunter specific)

Code: Select all
/script p="player";x=UnitXP(p);m=UnitXPMax(p);r=GetXPExhaustion();if -1==(r or -1)then t="No rest."else t="Rest: "..(math.floor(20*r/m+0.5)).." bubbles ("if r+x<m then t=t..r else t=t.."level +"..(r+x-m)end t=t.."XP)"end;DEFAULT_CHAT_FRAME:AddMessage(t);



See the attack speed before you tame
Code: Select all
/run mainSpeed, offSpeed = UnitAttackSpeed("target") print(format("%s: attack speed = %.2f", GetUnitName("target"), mainSpeed))