• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Question - Target closest npc by distance to reach, rather than a straight line

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.
 
if using mq2nav you have the distance to mob via ghosting a path, all other plugins, moveutils and advpath do not know the terrain and cannot judge distance via a path but by distance from your xyz and the targets xyz.
 
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
Cart