Automatic Tracking Macro (Happy Halloween!)

I received an e-mail late last night from a person who turned out to be awesome! Then again, most people who e-mail me are awesome! But I was pleasantly suprised when I received this one, which came from Sillie from Kor’Gall(EU), who wrote in saying:

I’m been reading your blog for some time now, but I have been passive when it comes to comments until now.

However, I have been thinking a lot about macros lately, and in particular macros to automate things for me. After listening to that podcast from you and Lassirra regarding the talent Improved Tracking I started some research, and came up with a macro to help me with this.

And he shared this beauty with me:
#showtooltip Steady Shot
/stopmacro [noexists]
/run for i=1,GetNumTrackingTypes() do local n, t, a, c = GetTrackingInfo(i); if string.find(n, UnitCreatureType(“target”)) then if t~=GetTrackingTexture(i) then SetTracking(i); end end end
/cast Steady Shot

And being that everyone here loves to know how things work, he provided a breakdown of exactly what the macro does.

First I loop through all the tracking types available for the player.

  • i=1,GetNumTrackingTypes() do

Then I gather info about the current tracking type and test it against the current target.

  • n, t, a, c = GetTrackingInfo(i);

If there is a match here, then it means that the player can actually track this type of mob.

  • if string.find(n, UnitCreatureType(“target”))

Finally I do one more check to avoid setting tracking type in case I already got the correct one set.

  • if t~=GetTrackingTexture(i)

If not, then set the new tracking.

  • SetTracking(i);

When I got this e-mail, it came in around 1:30 in the morning, my time, but I had to log on and check this bad boy out. And it works exactly like he says it does. Start spamming that macro and it will automatically start tracking your target and then start firing Steady Shot. And if you’re already tracking the right kind of mob, it doesn’t try to change it. I tested it on a couple different mob types down in Terrokar Forest and it works like a charm. The macro can have things added or removed as long as you don’t mess with the /run line. If you want to add in Kill Command, pet attack, or whatever you keep in your shot rotation macro as long as you keep it under the 255 character limit.

You better believe that this bad boy is getting added to my shots, because as he noted, I openly admitted during the podcast to having problems remembers to change my tracking during PvE. I sent him a response e-mail to thank him for his sheer awesomeness and letting him know I would be posting the macro up today, and because he felt automatic tracking wasn’t enough win he sent me one more:
#showtooltip Vampiric Batling
/run local c = GetNumCompanions(“CRITTER”); CallCompanion(“CRITTER”,random(1,c))

I bet you can guess what this one does. And if you guessed that it randomly summons one of your critter pets you would be right. :)

So a big thanks goes out to Sillie for helping make a Hunter’s life a little bit easier!

I hope everyone is going to have a safe and enjoyable Halloween tonight! I am going to a party at my sister-in-law’s dressed up as none other than Dr. Horrible!

I figured I didn’t have the physique to pull off Captain Hammer.

Thoughts, comments, or hallelujahs to Sillie can be posted here!

About Drotara

Drotara (or BehemothDan) considers himself a geek on many levels. A web developer and programmer by trade, he has no shortage of geeky hobbies. When not fulfilling husband and daddy duties, he enjoys WoW, the WoW TCG, Magic: The Gathering, and great board games with friends and family.