This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Target Mobs that are: alive, hostile and have a certain name
Post Reply
Return to board index
Post by
Corbomite
Hello,
I was trying to make macro for targeting the next "Shadowy Necromancer" in Hyjal which is alive but it somehow doesn't work.
/target Shadowy Necromancer
Is somebody able to help me? :)
Thanks in advance.
Post by
Corveroth
While the line you've posted *looks* good, let's make it a bit more explicit and show why it fails:
/target Shadow Necromancer
Or, in psuedo-code,
if target is harmful and target is alive then
set target to "Shadow Necromancer"
Not quite what you wanted. You can use this:
/targetenemy Shadow Necromancer
To avoid picking up mind controlled Necros, but I'm not sure what you can do about the dead ones.
Post by
Corbomite
Ok, thank you. :) Now I see why it didn't work. But does anybody know how to target alive ones only?
Post by
pelf
Ok, thank you. :) Now I see why it didn't work. But does anybody know how to target alive ones only?
Well, you can only use UnitIDs in the target= section. Hmm. How about this:
/targetenemy Shadowy Necromancer
/stopmacro
/targetlasttarget
It tries to target a hostile unit called "Shadowy Necromancer". If whatever it targeted is alive, the macro stops; otherwise, it restores your previous target.
So, when you hit the macro, if your target changes to something alive, then it found something living. The only problem I see with that is, what if the first enemy it wants to target is the one it always tries to target first? So, if you hit the macro and it targets X, then back to Y, the next time you hit it, wouldn't it just do the same thing?
Another possibility, though it feels a little dirty, would be:
/targetenemy Shadowy Necromancer
/stopmacro
/targetenemy Shadowy Necromancer
/stopmacro
/targetenemy Shadowy Necromancer
/stopmacro
/targetenemy Shadowy Necromancer
/stopmacro
/targetenemy Shadowy Necromancer
/stopmacro
Basically it's a loop that has been written out in full. How many Shadowy Necromancers are there? Put that many repetitions of those lines until you satisfy that number. With /targetenemy, you could even shorten it to "/targetenemy Shadowy" probably.
Who knows if either of those would work well...
Post by
bjg123
Necro'ing to provide the answer. The macro below will target Fen Creepers if they are alive but will ignore them if they are dead.
/tar fen creeper
/cleartarget
Post by
Bellena
Targetenemy name doesn't work at all. Removed?
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.