Targeting Macro Question

Anything related to Hunter pets.
Forum rules
Treat others with respect. Report, don't respond. Read the complete forum rules.
User avatar
Araela
Artisan Hunter
Artisan Hunter
Posts: 938
Joined: Wed Dec 08, 2010 7:44 am
Realm: Thrall
Gender: Female
Location: Everett, WA

Targeting Macro Question

Unread post by Araela »

Greetings all,

I use NPCscan, but like many of you I also use the "old fashioned" macro to find various NPCs.

After some modifications of a regular old targeting macro I found for the Turkey Lurker achievement about a year ago, I wanted to display what I currently have in my targeting bar (although I have all of these rare pets, I keep a lookout for friends)

/cleartarget
/tar Terrorpene
/tar Sambas
/tar Karoma
/tar Ghostcrawler
/tar Jadefang
/tar Madexx
/tar Baradin
/target Mysterious Camel Figurine
/run SetRaidTarget("target", 1)
/stopmacro [noexists]
/w Araela You've Found! >

You will notice that I have Baradin in there at the end- this used to be the "Wild Turkey" instead but obviously I have changed it since I'm not looking for Turkies.

My question is, with this macro and the way it is set up, I am unable to have it skip over a target if that target is dead. Thus, if I just spam "Baradin" it will target a Baradin Fox corpse or live animal, depending on what is nearby.

Any super macro people have an idea of how to fix this so it skips over corpses?

Thank you!
User avatar
Vephriel
Illustrious Master Hunter
Illustrious Master Hunter
Posts: 16434
Joined: Wed Jan 06, 2010 8:07 pm
Realm: Wyrmrest Accord US
Gender: Female
Location: Canada

Re: Targeting Macro Question

Unread post by Vephriel »

I'm certainly no expert in macros, I'm not sure if it's possible to specify a live or dead target. I do know that a targetting macro will always choose a living target over a dead one if both are in range, so if you target a dead one then you know for sure there isn't a live one near you.
User avatar
Araela
Artisan Hunter
Artisan Hunter
Posts: 938
Joined: Wed Dec 08, 2010 7:44 am
Realm: Thrall
Gender: Female
Location: Everett, WA

Re: Targeting Macro Question

Unread post by Araela »

Excellent thank you! I did not know that.
User avatar
Anyia
 Community Resource
 Community Resource
Posts: 1135
Joined: Mon Aug 23, 2010 9:35 pm
Realm: Jubei'Thos (US/Oceania)
Location: Australia
Contact:

Re: Targeting Macro Question

Unread post by Anyia »

Building on what Veph said, that means that you can add a line before the /run SetRaidTarget(...) to say:
/cleartarget [dead]
That way you treat a dead target as a non-existent target (since you would untarget it again before you do the "interesting" bits in the macro).
Worba
Illustrious Master Hunter
Illustrious Master Hunter
Posts: 3522
Joined: Wed Jul 28, 2010 3:56 pm
Realm: Uther, Zangarmarsh, Shu'halo, Fenris, Quel'Thalas+
Gender: Orc
Location: In Sethekk Halls, bothering Anzu (90 runs and counting)

Re: Targeting Macro Question

Unread post by Worba »

Cathyliz7 wrote:Greetings all,

I use NPCscan, but like many of you I also use the "old fashioned" macro to find various NPCs.

After some modifications of a regular old targeting macro I found for the Turkey Lurker achievement about a year ago, I wanted to display what I currently have in my targeting bar (although I have all of these rare pets, I keep a lookout for friends)

/cleartarget
/tar Terrorpene
/tar Sambas
/tar Karoma
/tar Ghostcrawler
/tar Jadefang
/tar Madexx
/tar Baradin
/target Mysterious Camel Figurine
/run SetRaidTarget("target", 1)
/stopmacro [noexists]
/w Araela You've Found! >

You will notice that I have Baradin in there at the end- this used to be the "Wild Turkey" instead but obviously I have changed it since I'm not looking for Turkies.

My question is, with this macro and the way it is set up, I am unable to have it skip over a target if that target is dead. Thus, if I just spam "Baradin" it will target a Baradin Fox corpse or live animal, depending on what is nearby.

Any super macro people have an idea of how to fix this so it skips over corpses?

Thank you!
I'm another longtime NPC_Scan holdout (although I have poked around its source code as I think it's neat how they got that to work); try this

/cleartarget
/tar Terrorpene
/tar [dead] Sambas
/tar [dead] Karoma
/tar [dead] Ghostcrawler
/tar [dead] Jadefang
/tar [dead] Madexx
/tar [dead] Baradin
/tar [dead] Myster
/stopmacro [noexists]
/run SetRaidTarget("target", 1)
/w Araela You've Found! >

The above will skip to the next target if the current one is dead, and I've confirmed this all fits within 255 chars (I shortened the last target name a bit to save space - when targeting you can use truncations and it will still work, as long as they remain unique for the area you will be searching)

Hope this helps :)
Worba
Illustrious Master Hunter
Illustrious Master Hunter
Posts: 3522
Joined: Wed Jul 28, 2010 3:56 pm
Realm: Uther, Zangarmarsh, Shu'halo, Fenris, Quel'Thalas+
Gender: Orc
Location: In Sethekk Halls, bothering Anzu (90 runs and counting)

Re: Targeting Macro Question

Unread post by Worba »

Sometimes using conditionals with /tar can be buggy, so if you run into trouble with that, you can try this (will just fit):

/cleartarget
/tar Terrorpene
/target [dead] Sambas
/target [dead] Karoma
/target [dead] Ghostcr
/target [dead] Jadef
/target [dead] Madexx
/target [dead] Barad
/target [dead] Myster
/stopmacro [noexists]
/run SetRaidTarget("target", 1)
/w Araela You've Found! >

BTW cool use of SetRaidTarget
Post Reply