Adds in the distance

OldOne

New member
Joined
Nov 1, 2007
Messages
229
Reaction score
0
Points
0
Location
Virginia
Is there a way to determine if there are mobs around something you have targeted at a distance? Anyone have a solution?
 
Code:
${SpawnCount[npc loc ${Target.X} ${Target.Y} ${Target.Z} radius HowFarYouWantToCheck]}
 
You can also use

Code:
${Target.NearestSpawn[npc radius <the radius you want to check>]}

This will return the actual spawn info for the closest mob within the specified radius and you can use it like this
Code:
${Target.NearestSpawn[2,npc radius <the radius you want to check>]}
to get the 2nd closest spawn within the specified radius.

This can be usefull if your trying to check for possible adds or need to find out more information about the spawns around your target. Doing it this way you can use anything from the spawn datatype (like .ID or .Name, etc). If used in conjuction with SpawnCount it's really easy to make a /for /next loop to handle all spawns in the radius you want to search.

I use this method in my magebot to check for adds around my pet (except I dont actually target my pet I just use ${Me.Pet.NearestSpawn}, this way I can actually tell the pet to attack them to get aggro with less coding :)