advpath.inc - Generic movement/follow/pathing script

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Mon Mar 01, 2004 9:14 am

or an '/echo add loc' or something....
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Mon Mar 01, 2004 7:33 pm

flightrecorder wrote:OK, stripped down the number of locs in my ini and this ran smoothly

I know see the finesse of the InitAPFVars speed value although this could get messy recording a complex path at a low value

What this leads me to think is that it would be very cool to have some kind of single loc record function that allows us to make keypress/simple function call selections of locs the toon is at, that are then being written to a single path file.
eg. run to certain point, record that loc, run to another, record that, etc, and each loc going into the same path file...?

I'm happy to manually edit loc files in initial creation, but this would be very cool... it also sounds diff to a newb like myself :-)

[edit]
I'm thinking something like a pause and a file append with file name specified perhaps?
If you are strictly talking about the recording portion just change the number in red to like 18 or something and see if this helps. This should ensure that it only plots a location in your path file at a minimum of an 18 loc measurement from the previous loc.

Code: Select all

| -------------------------------------------------------------------------------- 
Sub RecordPath 
/if n @RecordPathFlag==1 { 
    /if n @NumLocs==0 { 
        /varset LocArray(@NumLocs) "$char(y) $char(x) $char(z)" 
        /varadd NumLocs 1 
    } else { 
        /if n $distance($arg(1,"@LocArray($calc(@NumLocs-1))"),$arg(2,"@LocArray($calc(@NumLocs-1))"),$arg(3,"@LocArray($calc(@NumLocs-1))"))>[color=red]12[/color] { 
            /varset LocArray(@NumLocs) "$char(y) $char(x) $char(z)" 
            /varadd NumLocs 1 
        } 
    } 
} 
/doevents 
/return 

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Sat Mar 06, 2004 7:45 pm

Updated:
advpath.inc
advpath.txt

I've added in a manual record mode that will let you precisely plot locs if auto mode isn't accurate enough for what you are recording.

To record in Auto mode just use the command as you always had:
/echo record PATHFILENAME

To record in Manual mode add the manual parameter like this:
/echo record PATHFILENAME manual

If you are in Manual record mode you plot locations with the new command that was added:
/echo plot

Once you are done plotting locations just issue the stop command as you always have:
/echo stop