Hunter tracking macros

I was using these macros for hunter tracking from this post on us forums Hunter tracking by name

But they stopped working with The War Within pre-patch. The only thing I noticed is the change from GetSpellInfo to C_Spell.GetSpellInfo, but it’s not enough to get them working again.

Any insight would be greatly appreciated.

TRACK HIDDEN
/run for i=1,C_Minimap.GetNumTrackingTypes() do local x,_,y=C_Minimap.GetTrackingInfo(i) if x==GetSpellInfo(19885) then C_Minimap.SetTracking(i, not y) z='OFF' if not y then z='ON' end DEFAULT_CHAT_FRAME:AddMessage("| Track Hidden |---> "..z) end end

TRACK DEMON
/run for i=1,C_Minimap.GetNumTrackingTypes() do local x,_,y=C_Minimap.GetTrackingInfo(i) if x==GetSpellInfo(19878) then C_Minimap.SetTracking(i, not y) z='OFF' if not y then z='ON' end DEFAULT_CHAT_FRAME:AddMessage("| Track Demon |---> "..z) end end

TRACK BEASTS
/run for i=1,C_Minimap.GetNumTrackingTypes() do local x,_,y=C_Minimap.GetTrackingInfo(i) if x==GetSpellInfo(1494) then C_Minimap.SetTracking(i, not y) z='OFF' if not y then z='ON' end DEFAULT_CHAT_FRAME:AddMessage("| Track Beasts |---> "..z) end end

TRACK HUMANOIDS
/run for i=1,C_Minimap.GetNumTrackingTypes() do local x,_,y=C_Minimap.GetTrackingInfo(i) if x==GetSpellInfo(19883) then C_Minimap.SetTracking(i, not y) z='OFF' if not y then z='ON' end DEFAULT_CHAT_FRAME:AddMessage("| Track Humanoids |---> "..z) end end

TRACK GIANTS
/run for i=1,C_Minimap.GetNumTrackingTypes() do local x,_,y=C_Minimap.GetTrackingInfo(i) if x==GetSpellInfo(19882) then C_Minimap.SetTracking(i, not y) z='OFF' if not y then z='ON' end DEFAULT_CHAT_FRAME:AddMessage("| Track Giants |---> "..z) end end

TRACK UNDEAD
/run for i=1,C_Minimap.GetNumTrackingTypes() do local x,_,y=C_Minimap.GetTrackingInfo(i) if x==GetSpellInfo(19884) then C_Minimap.SetTracking(i, not y) z='OFF' if not y then z='ON' end DEFAULT_CHAT_FRAME:AddMessage("| Track Undead |---> "..z) end end

TRACK DRAGONKIN
/run for i=1,C_Minimap.GetNumTrackingTypes() do local x,_,y=C_Minimap.GetTrackingInfo(i) if x==GetSpellInfo(19879) then C_Minimap.SetTracking(i, not y) z='OFF' if not y then z='ON' end DEFAULT_CHAT_FRAME:AddMessage("| Track Dragonkin |---> "..z) end end

TRACK ELEMENTALS
/run for i=1,C_Minimap.GetNumTrackingTypes() do local x,_,y=C_Minimap.GetTrackingInfo(i) if x==GetSpellInfo(19880) then C_Minimap.SetTracking(i, not y) z='OFF' if not y then z='ON' end DEFAULT_CHAT_FRAME:AddMessage("| Track Elementals |---> "..z) end end

TRACK MECHANICALS
/run for i=1,C_Minimap.GetNumTrackingTypes() do local x,_,y=C_Minimap.GetTrackingInfo(i) if x==GetSpellInfo(229533) then C_Minimap.SetTracking(i, not y) z='OFF' if not y then z='ON' end DEFAULT_CHAT_FRAME:AddMessage("| Track Mechanicals |---> "..z) end end

Switching to C_Spell.GetSpellInfo puts it over the 255 character limit and makes it break. So you’re not gonna get these to work without turning them into an addon or changing the DEFAULT_CHAT_FRAME:AddMessage("| Track Mechanicals |---> "..z) into print("Track Mechanicals: "..z) commands.

From that same thread

Aestalus from the US forum thread has posted a working solution :slight_smile:

A few changes to the API made this a fun little excercise…

/run for i=1,C_Minimap.GetNumTrackingTypes() do local info=C_Minimap.GetTrackingInfo(i);if (info.name=="Track Humanoids") then local status = not info.active; C_Minimap.SetTracking(i, status); end end

Change “Track Humanoids” to “Track Beasts” or Dragonkin or Demons or Undead or … etc. as necessary.

::Updated macro to print a message in the chat box.

/run for l=1,C_Minimap.GetNumTrackingTypes() do i=C_Minimap.GetTrackingInfo(l); if(i.name=="Track Humanoids")then t=not i.active; C_Minimap.SetTracking(l, t); m="OFF"; if(t)then m="ON"; end print("Track Humanoids "..m); end end

You have to change the “Track Humanoids” to whatever else in 2 places now.

2 Likes

It is possible to make a single macro to turn on or off multiple “trackings”, this will require a bit of trial and error for the user(this also works for Druids!).
I wanted to be able to do this for PVP.
Obviously the above mentioned code is too long for this so you’ll need the following;

/run C_Minimap.SetTracking(X, true)

X is your character’s MiniMap ID.

!MINIMAP IDs ARE DIFFERENT FOR EVERY CHARACTER!

Tracking Fish / Herbs and Minerals all influence your character’s Mini map IDs.

  • while in the code “true” turns the tracking on “false” will turn it off.
  • I did not make this code, I stole it and experimented with it til it worked for me.

The list of IDs;

1 Track Fish
2 Track Herbs
3 Track Minerals
4 Track Pets (Battle Pets)
5 Warboards ( ͡° ͜ʖ ͡°)
6 Track beasts
7 Track Demons
8 Track Dragonkin
9 Track Elementals
10 Track Giants
11 Track Hidden
12 Track Humanoids
13 Track Undead
14 Track Banker ( ͡° ͜ʖ ͡°)

(this is not a complete list)

If you don’t have any of the profession related track abilities your number 1 will be Track Pets (Battle Pets) and your number 10 will be Track Undead, so basically remove a number for every profession tracking ability you do not have from the top.

The macro’s I’m using;

For PVP:

/run C_Minimap.SetTracking(5, true)
/run C_Minimap.SetTracking(10, true)
/run C_Minimap.SetTracking(11, true)
/run C_Minimap.SetTracking(1, false)
/run C_Minimap.SetTracking(2, false)
/run C_Minimap.SetTracking(3, false)

This turns on “Tracks Beasts”, “Track Hidden” and “Track Humanoids” whilst turning off “Find Fish”, “Find Herbs” and “Tracks Pets (Battle Pets)” FOR MY CHARACTER.

For Gathering:

/run C_Minimap.SetTracking(1, true)
/run C_Minimap.SetTracking(2, true)
/run C_Minimap.SetTracking(3, true)
/run C_Minimap.SetTracking(5, false)
/run C_Minimap.SetTracking(11, false)

This turns on “Find Fish”, “Find Herbs” and “Track Pets (Battle Pets)” whilst turning off "Track Bests"and “Track Humanoids” FOR MY CHARACTER.

For those who want to find out their own character’s MiniMap IDs a little tip; /reload after running the code. The minimap check marks are not updated after running the code but will update with a UI reload. This is how I figured out the list of IDs listed above.

I hope this helps for people that want to make similar macro’s.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.