I wrote this little plugin to find a safe spot (out of mob melee range) within an area. I think it would be useful for getting automated pet tanking to work. It uses a simple Voronoi diagram creator (just used the source from http://skynet.ie/~sos/mapviewer/voronoi.php, which is free to use) based on a list of mobs locations in range, and then uses a quad-tree to sort through the vertices and find one that is far enough away from mobs to be safe. It would be awesome if more people tested this to make sure it works really well. Here's what to expect:
You MUST use this first, or you won't have a zone to kill in.
will set up the zone in which you want to check and find safe spots. Radius is the size of the zone (defaults to 25), loc is the X Y of the center (defaults to your current position -- also I might have these backwards from ingame /loc), safe is an overestimate of max melee range (default is 5, that might be low), min is the minimum distance to check for mobs from a vertex (defaults to 0.5), and inc is how much you want to increment your nearest mob search (defaults to 1 -- the higher this is the faster the algorithm, but the coarser and less accurate the result)
Then you just run this command:
will find a safe spot and populate the new TLO's:
That's pretty much it. I hope you macro writers out there find this useful and help me develop it more. I wrote this in a day, so I expect bugs -- please help me find them!
You MUST use this first, or you won't have a zone to kill in.
Rich (BB code):
/setKillZone <radius #> <loc # #> <safe #> <min #> <inc #>
will set up the zone in which you want to check and find safe spots. Radius is the size of the zone (defaults to 25), loc is the X Y of the center (defaults to your current position -- also I might have these backwards from ingame /loc), safe is an overestimate of max melee range (default is 5, that might be low), min is the minimum distance to check for mobs from a vertex (defaults to 0.5), and inc is how much you want to increment your nearest mob search (defaults to 1 -- the higher this is the faster the algorithm, but the coarser and less accurate the result)
Then you just run this command:
Rich (BB code):
/findSafeSpot
Rich (BB code):
${SafeSpot} - gives human readable loc.
${SafeSpot.X} - gives a float for x position
${SafeSpot.Y} - gives a float for y position
${SafeSpot.SafeDist} - gives the safe distance
${SafeSpot.MinDist} - gives the min distance
${SafeSpot.IncDist} - gives the increment
That's pretty much it. I hope you macro writers out there find this useful and help me develop it more. I wrote this in a day, so I expect bugs -- please help me find them!

