Target checking

kombat

Spammer
Joined
Feb 25, 2007
Messages
66
Reaction score
0
Points
0
is there a way to check my target radius to see how many mobs are standing close to it,... and if hes not on his own to move onto anther target,.., or just retarget untill he moves away from the adds?...

.. just trying to stop mindless trains from being pulled :).

thanks in advance. :D
 
Code:
${SpawnCount[npc loc ${Target.X} ${Target.Y} radius 50 notid ${Target.ID}]}

If that returns > 0 then you have an npc within the radius of 50 of your target. Note, this could include something directly under your target as it doesn't check zradius. There is a zradius component to spawnsearch, but I have never gotten it to work properly. Everytime I attempt to use it, it will not find any targets lol.

So if someone else knows how to make the zradius component work properly they can tell you how, otherwise what I gave you will work as long as there are not mobs under or above the mob (like in mech guardian).

You can also do
Code:
${Target.NearestSpawn[npc radius 50].ID}

This will return the id of the nearest npc spawn that is within a radius of 50 to your target. If there is not one it will return 0 (or NULL). This still does not check zradius though.


Dev
 
Last edited:
my ignorance,

deleted.
 
Last edited:
thanks!

thanks for your tips and trying to help me out, i didnt fully understand how to add your code but i came up with this line and it works great!.

/if (${Target.NearestSpawn[npc radius 90].ID}> 0) /target clear


thanks again :).