• 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 - Is there a way to save loc's to file?

alcoholen

Member
Is there a way to save loc's as you go to a file?
Type a comand, and mq save x, y loc in a pathfile?

And the pathfile end up something like:
xloc, yloc
xloc1, yloc1
xloc2, yloc2
... ... . .
Cheers
 
Is there a way to save loc's as you go to a file?
Type a comand, and mq save x, y loc in a pathfile?

And the pathfile end up something like:
xloc, yloc
xloc1, yloc1
xloc2, yloc2
... ... . .
Cheers

Create a config (ini) file from inside your macro and write to it. Here's a link for reference:

http://www.macroquest2.com/wiki/index.php/Ini

Each time you run the macro you'll want to create a new section OUTSIDE of the loop, then you'll create a loop that writes to the ini. Make sure you pause the loop for a little bit before running it again to avoid creating an unbreakable loop.
 
Make a hot key
Rich (BB code):
/mac saveloc
Save this macro to your macro folder
Rich (BB code):
| Saveloc.mac v 1 by Maskoi 3/15/2015

Sub Main
    /declare i int outer
    /for i 1 to 100
        /if (!${Ini[Locations.ini,MyLocations,Loc${i}].Length}) {
            /ini "Locations.ini" "MyLocations" "Loc${i}" "${Me.Y},${Me.X},${Me.Z}"
            /echo Location saved as Loc${i}=${Me.Y},${Me.X},${Me.Z} in Locations.ini files
            /end
        }
    /next i 
/return
Hit the hot key and the spot where you are standing will be recorded to the Locations.ini file in your macro folder up to 100 entries.
Rich (BB code):
[MyLocations]
Loc1=373.29,149.72,0.19
Loc2=395.87,135.75,0.19
Loc3=400.87,130.25,0.19
Locs are in Y, X, Z because thats how most MQ2 plugins handle the xyz axis for location. Edit the macro if you want x,y,z instead
 
I modified this a little bit to use with MQ2Navigation. It saves the locs in a separate file to avoid confusion.

Rich (BB code):
| Saveloc.mac v 1 by Maskoi 3/15/2015
| NavSavelaoc.mac modified from above for use with MQ2Navigation by Randyleo

Sub Main
    /declare i int outer
    /for i 1 to 100
        /if (!${Ini[NavLocations.ini,MyLocations,Loc${i}].Length}) {
            /ini "NavLocations.ini" "MyLocations" "Loc${i}" "${Me.X} ${Me.Y} ${Me.Z}"
            /echo NavLocation saved as Loc${i}=${Me.X} ${Me.Y} ${Me.Z} in NavLocations.ini files
            /end
        }
    /next i 
/return
 
I modified this a little bit to use with MQ2Navigation. It saves the locs in a separate file to avoid confusion.

Rich (BB code):
| Saveloc.mac v 1 by Maskoi 3/15/2015
| NavSavelaoc.mac modified from above for use with MQ2Navigation by Randyleo

Sub Main
    /declare i int outer
    /for i 1 to 100
        /if (!${Ini[NavLocations.ini,MyLocations,Loc${i}].Length}) {
            /ini "NavLocations.ini" "MyLocations" "Loc${i}" "${Me.X} ${Me.Y} ${Me.Z}"
            /echo NavLocation saved as Loc${i}=${Me.X} ${Me.Y} ${Me.Z} in NavLocations.ini files
            /end
        }
    /next i 
/return
Thank you Maskoi... I am trying to learn how to interact with an .ini file and this is a clean example...

Randyleo...Is this the same format as MQ2Nav?
Thanks Randyleo

Playbetter
 
Question - Is there a way to save loc's to file?

Users who are viewing this thread

Back
Top
Cart