• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Question - Target closest npc by distance to reach, rather than a straight line (1 Viewer)

levox

Active member
Joined
Aug 10, 2015
RedCents
866¢
Is there an easy way to change /target ${NearestSpawn[npc]} to target the nearest one factoring in the actual distance to run there, rather than x/y distances? I think I've seen it as some kind of Math.Calc variation but can't seem to figure it out. A point in the right direction would be helpful.
 
There was a modification to kiss for precisely this feature that checked distance over ground to a mob and then navigated to it, rather than straight-line distance. I thought kiss had been updated to use the new way of calculating the distance.
 
You can check the length when using mq2nav something like Navigation.PathLength[ID ${Target.ID}] or somesuch, and pick the closest. It should work in theory, i might play around with it tomorrow, would be very useful in an automated dungeon crawl.
 
Is there an easy way to change /target ${NearestSpawn[npc]} to target the nearest one factoring in the actual distance to run there, rather than x/y distances? I think I've seen it as some kind of Math.Calc variation but can't seem to figure it out. A point in the right direction would be helpful.

Start using MQ2Nav for pulling/whatever you are trying to do. MQ2Nav is the only way to get the mobs distance based on the path to get to the mob.
 
Start using MQ2Nav for pulling/whatever you are trying to do. MQ2Nav is the only way to get the mobs distance based on the path to get to the mob.

Well that was the end goal in what I was trying to do but probably going about it the wrong way...still learning. Wanted to navigate to closest mob based on MQ2Nav distance which I guess is already in the KA code. I'll check it out.

Thanks for the reply and also glad to hear you're safe and back at it after Irma.


Sent from my iPhone using Tapatalk
 
"need to add a .LineOfSight check into it"

Where would I add that? I am using MQ2 VV, pulling in hilly area i skip mobs in defilade. I want to target nearest mob, not LOS.

Would be easier to use MQ2Nav and /nav to the target. Look in the kiss findmobtopull routine for specific code on how to find the closest mob based on /nav path. Then you don't need to worry about LOS.
 
Question - Target closest npc by distance to reach, rather than a straight line

Users who are viewing this thread

Back
Top