Hunter tracking by name

Is there a macro to toggle a hunter tracking by name instead of by id?

I’d like to toggle human and beast tracking with a macro across several hunters but they don’t have the same id list.

To do this you actually need to make use of a script within a macro to toggle the tracking for the specific type on or off. For example the below is the easiest option but is using the list number location (10 and 4) to toggle Track Humanoids and Beasts on and off.

/run C_Minimap.SetTracking(10, true)
/run C_Minimap.SetTracking(4, true)
/run C_Minimap.SetTracking(10, false)
/run C_Minimap.SetTracking(4, false)

Another option that you could try but I this hasn’t be tested it’s just something that I thought might work. The below actually checks and finds a tracking type by name in this case it is Humanoids toggles them off or on.

/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

Then for Beasts you can use this one to toggle it on or off:

/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

In addition I think you should be able to use the below command to find out what the tracking number identifier is for each tracking type you can try this and if it works it should print a list in you chat window.

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

Hope that helps you. As I mentioned I haven’t tested the second one and it may need to be tweaked a bit to get it working correctly.

1 Like

These don’t work.

/run for i = 1, C_Minmap.GetNumTrackingTypes() do local name, _, active, _ = C_Minimap.GetTrackingInfo(i) if name == “Track Humanoids” or “Track Beasts” then return C_Minimap.SetTracking(i, not active) end end

/run for i=1,C_Minimap.GetNumTrackingTypes() do local name,_,status= C_Minimap.GetTrackingInfo(i) print(i … ” – ” … name) end

I have changed those two and split the first one out into two different commands. Dragonflight made a lot of changes to how things worked but I am hoping those two new ones work for you.

The one that lists things out I hope should work now but might need to play around a little more with the nesting.

1 Like

Here are all the other Tracking types:

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

Not sure if I missed any but that is all that I am aware of.

7 Likes

Necroing this thread because sadly these macros stopped working recently. Is anyone aware if the functions used here were changed for TWW prepatch?

Can just toggle this CVar then use the regular minimap tracking
/console minimapTrackingShowAll 1

2 Likes

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.

4 Likes

This works great, you’re a lifesaver!

My dude, you’re a hero. Thank you so much. I made a full Opie setup with all 8 trackings thanks to your command!

not working =(

not working for me. the messages do display though