Advpath.inc - Moved to new thread.

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

Moderator: MacroQuest Developers

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

Advpath.inc - Moved to new thread.

Post by ml2517 » Tue Jan 06, 2004 9:26 pm

Advanced Path - 3D Movement Macroing Script

The goal of this is to be a complete movement macroing language that can be called from your own scripts.

Allows you to record pathfiles and then play them back in a multitude of ways. See the top portion of advpath.inc for examples.

Enjoy... :twisted:
More to come. Might mess with syntax etc. in future versions.

Edit:
Added pause command. You can cause while recording or playing back a pathfile.
Added cf and cr options for playback. They are closest loc forward and closest loc reverse.
For instance if you had a pathfile named PoTtoNexxus that was recorded going in a straight line from the PoT stone in PoK to the Nexxus stone in PoK and you were standing in the middle. If you issued:
/echo play:PoTtoNexxus 1 cf nopp z
It would find the nearest point to you (somewhere near the middle of the pathfile) and run toward Nexxus stone. When it got to the Nexxus stop it would try to zone.
Edit:
Integrated the follow routines from advfollow.mac completely into advpath.inc :wink: Enjoy
Edit:
Added the ability to call the functions directly.
Added the silent function. This toggles between silent and verbose modes. You can /echo silent or /call SilentFunction directly.
Fixed a bug with the loop option in the play function.
Edit:
Lots of door and zone fixes.
Edit:
Will now avoid following the exact path the player/npc took if they are encountered along the path. Basically this takes a shortcut straight to you if you are close enough instead of running the rest of the path it has queued up.
Edit:
Fixed an issue that would try to target the person you are following after zoning, even when you aren't in follow mode.
Edit:
Fixed some zoning issues that were brought up in the genbot thread.

Example calling macro:

** Somehow I've managed to exceed the post limit and I wasn't the second post on here. So instead of splitting them up on seperate pages or far apart on the first page I've started a new thread. Sorry for the inconvenience.
Last edited by ml2517 on Sat Jan 17, 2004 1:24 am, edited 34 times in total.

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 » Tue Jan 06, 2004 10:25 pm

Wow...sweet! You've done it again! =) Can't wait to get home and play with this one a bit! Nice documentation included in the .mac, also!
[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 » Wed Jan 07, 2004 7:23 pm

Added pause command.
Added cf (closest forward) and cr (closest reverse) options for the play command.
Also fixed a few problems I found.

See the top of advpath.inc for details.

Have fun. :o

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

Post by ml2517 » Thu Jan 08, 2004 8:31 pm

Integrated the follow routines from advfollow.mac into advpath.inc.

Make sure you use the new code blocks from the example.mac, they've changed a little.

Tells from a master aren't added into the .inc file. The only commands that are accepted are from /echo's.
If someone ends up needing the master code and doesn't want to use advfollow.mac please let me know and I'll add the code snippets you need in the example.mac.

If you have any other ideas that might be a good fit in here let me know.

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 » Fri Jan 09, 2004 12:04 am

From IRC:

/call follow [master|local|inc] [sense] [dist] [target name]

/call follow would function the same as if an /echo follow were issued. This is to reduce spam. Also lets you call these functions in a variety of scripts from genbot, to hunter macs, to puller bots, etc...

master | local | inc
master - If a name is given, this will be the master controlling the bot. Can also be defined in the bot script itself and passed as @MasterName or whatever
local - does what it does now....accepts commands from normal /echo's
inc - runs in silent (spam-free) mode, when used as in #include. Allows you to /call directly to the function and assumes "[MQ] follow" was trapped.

the rest of the options, you know... =)
[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 » Fri Jan 09, 2004 12:10 am

Actually I just thought of a way to do most of that really easily.. will post it in a few mins.

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

Post by ml2517 » Fri Jan 09, 2004 1:35 am

Added in a bulk of what you were asking for. Also fixed a bug with the loop option.

I'll go ahead and build in some commands to assign Master(s) etc. tomorrow. Edit: Actually just thought about this. Any sort of security checking should be done from the mac that this is included in. For instances when a command is called in genbot the security will already be checked before you issue the /call FunctionName blah.

Added silent command that can be issued via /echo silent or /call SilentFunction.

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

Post by ml2517 » Sat Jan 10, 2004 8:49 pm

Zoning routines updated to work better.

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

Post by ml2517 » Sun Jan 11, 2004 1:12 am

Totally reworked the door code. Let me know if it works better/worse. I tested it for quite a bit and seems to work really well.

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

Post by ml2517 » Sun Jan 11, 2004 5:26 pm

Re-grab advpath.inc.

I beat the hell out of the dead horse that is the door code again. I'm going to try not to touch it any more. Its about as good as its going to get.

The door code will now ignore door names that don't have "door" in them. This should stop it from going into the door routine when you target a non-door (bookshelves, boxes, portals etc.).

The zoning routine was changed to do a similar ignore of non portals.

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

Post by ml2517 » Mon Jan 12, 2004 7:05 am

Worked on the following code a bit. It will now avoid following the exact path the player/npc took if they are encountered along the path. Basically this takes a shortcut straight to you if you are close enough instead of running the rest of the path it has queued up.

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

Post by ml2517 » Mon Jan 12, 2004 12:32 pm

advpath.inc updated.

Fixed a problem where you would try to target the person you are following upon zoning, even though you aren't in follow mode.

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

Post by ml2517 » Tue Jan 13, 2004 7:29 pm

advpath.inc updated.

Fixed the issue if the follower zoned faster than the followee. If it takes longer than 30 seconds for the person that you are following to zone in, it will shut off follow mode.

I also fixed another issue. I was looking for "port" named portals in the zoning code. Apparently portal stones can have "port" or "tele" in the target name.

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 » Wed Jan 14, 2004 5:16 am

Here's something I noticed with the last update.
Tried changing the settings and nothing changed, except how frequently this happened. Recorded coord's and it is occuring at each sample ("waypoint") loc.

When following someone, it runs to the waypoint. It then turns around and runs back to it, then turns around and goes to the next waypoint. Rinse/repeat.

When the target stops, it paces (still). This is new from 2 updates ago.

Everything else seems to be working as intended/described.
[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 » Wed Jan 14, 2004 12:28 pm

Hmm I'm not seeing this at all on my machine. Try bumping down the 15 a bit and see if it stablizes. I'll look at it tonight when I get home and make sure I didn't break anything but I don't think I did.