• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

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

alcoholen

Member
Joined
Sep 12, 2004
RedCents
80¢
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