• 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 - Giving time to arrive at location

Just wondering if there might be a better way to write this. The intent is to nav to a loc then not do anything else until the char gets to the location. Once at the loc, move on the to next line in the macro.


Code:
    /echo Moving to the exit now
    /nav locyx -163.58 1069.97
    :runningexit
    /if (${Math.Distance[-163.58 1069.97]} > 10) {
        /goto :runningexit
    }
    /delay 3s
    /echo at the exit now
 
Just wondering if there might be a better way to write this. The intent is to nav to a loc then not do anything else until the char gets to the location. Once at the loc, move on the to next line in the macro.


Code:
    /echo Moving to the exit now
    /nav locyx -163.58 1069.97
    :runningexit
    /if (${Math.Distance[-163.58 1069.97]} > 10) {
        /goto :runningexit
    }
    /delay 3s
    /echo at the exit now
Make it a function so it's reusable imho.
The highlighted lines are part of another macro but you can either choose to use them or not. You would have to make your own combat Sub.

Code:
Sub NavToLoc(int Y,int X,int Z)
    /while (${Math.Distance[${Me.Y}, ${Me.X}, ${Me.Z}: ${Y}, ${X}, ${Z}]} > 15) {
        /if (${Me.XTarget[1].ID}) {
            /if (${Navigation.Active}) {
                /nav stop
            }
            
            /call Combat
        }
        
        /if (${Me.Combat} && !${Me.XTarget[1].ID}) {
            /squelch /attack off
            /squelch /target clear
        }
        
        /if (!${Navigation.Active}) {
            /if (${Navigation.PathExists[loc ${Y} ${X} ${Z}]}) {
                /nav loc ${Y} ${X} ${Z}
            }
        }
        
        /delay 1
    }
    
    |We've arrived.
    /if (${Navigation.Active}) {
        /nav stop
    }
/return
 
Thanks all for the input

Thanks CTWN, that's perfect.
It is a lot better then what I was doing above. I had all my loc's like the above and after then 10th one, I was like there has to be a better way.

@aquietone lol I can barely copy and paste stuff for a macro and make sense of it. Lua even more foreign to me... lol
 
Try this. This doesn't need any timers. This example uses a target but can be changed to a location.

repeat
until mq.TLO.Target.Distance() < 6
 
Question - Giving time to arrive at location

Users who are viewing this thread

Back
Top
Cart