advpath.inc -- follow/record/playback pathing include file

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

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

Post by ml2517 » Wed Apr 28, 2004 1:36 am

Updated:
advpath.inc

Tested it with the 27th zip and it bombed. Fixed the portions that were causing the issues.

Rassilon
a lesser mummy
a lesser mummy
Posts: 73
Joined: Thu Sep 04, 2003 6:34 pm

Post by Rassilon » Wed Apr 28, 2004 1:52 am

Still bombs with the 4/25 genbot macro and the latest MQ2 build. Loads of

Code: Select all

Usage: /declare varname [global|local|timer|array|array2]
errors. Something about No Variable Named 'PlotFlag' too.

Thanks

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

Post by ml2517 » Wed Apr 28, 2004 2:08 am

Umm do you have the new var system enabled? You shouldn't be getting an error like that if you have the line uncommented in mq2main.h and re-compiled.

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Wed Apr 28, 2004 8:46 am

Rassilon: the 4/25 Genbot and the new Advpath are not compatable, 1 uses the new Vars and 1 doesn't. You'll need to wait till Genbot is update - maybe today - before they work together.

Rassilon
a lesser mummy
a lesser mummy
Posts: 73
Joined: Thu Sep 04, 2003 6:34 pm

Post by Rassilon » Wed Apr 28, 2004 11:26 pm

No, I'm using your update from today of Genbot and its still bombs out. I have done nothing to eqmain.h, its default in the CVS.

THanks

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

Post by ml2517 » Wed Apr 28, 2004 11:40 pm

Run my generic calling macro and advpath.inc to see if it works properly. As of yesterdays MQ2 release it was working fine. If you are still having problems, its something on your end. And if you aren't on the latest advpath.inc then I'll set aside some time to kick you in the nuts.

Rassilon
a lesser mummy
a lesser mummy
Posts: 73
Joined: Thu Sep 04, 2003 6:34 pm

Post by Rassilon » Thu Apr 29, 2004 12:22 am

Image

This is the error it gives me.

Code: Select all

// MQ2DataVars *READY*
#define USEMQ2DATAVARS
This is the only change I made in mq2main.h . Just to be sure I didn't miss something. To recompile this:
1. I used the same MQ2 dir I was already using.
2. Made this change in MQ2Main/mq2main.h
3. F7 to get a new dll
4. Batch Build

Thats all. No errors.

BTW, yes, I'm using your newest version from 1st post/1st page. Also using genbot files from todays post as well.

Thanks

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

Post by ml2517 » Thu Apr 29, 2004 4:35 am

Dude you clearly have an error in there for botcore.inc. I asked you to run the generic calling macro from the first page, the one that starts like this:

Code: Select all

| 
|   [Last Modified: 4/27/2004 8:00pm] 
| 
| Example calling script for advpath.inc 
| 
| 
Do not modify it. Name it advpath.mac

Then try to run it.

If it works fine, then it's clearly a problem with genbot and not advpath.

robdawg
a ghoul
a ghoul
Posts: 114
Joined: Tue Mar 23, 2004 11:54 am
Contact:

....

Post by robdawg » Thu Apr 29, 2004 5:21 pm

LOL!

tons of people use this script and it works great.

furthermore, this script is updated and working almost immediately after major revisions on MQ.

FINALLY, this script is working fine, for I am using it to create my new macro!
ROBDAWG

[url=http://www.seathound.com]Seat Hound[/url]
[url=http://www.sportsrumormill.com]Sports Rumor Mill[/url]
[url=http://www.packerforum.com]Packer Forum[/url]

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

Post by ml2517 » Sat May 01, 2004 5:28 pm

Updated:
advpath.inc

Fixed the zoning flakyness. Went through and optimized alot of code to take advantage of the new variable system.

Vexix
Genbot Janitor
Posts: 245
Joined: Sat Apr 17, 2004 10:10 am

Awesome stuff

Post by Vexix » Wed May 05, 2004 5:35 am

ML,

Love your scripts. Solid work. Gives me a goal to shoot for!

A few feature requests. I do a lot of pathing in the bazaar, where the terrain is randomly placed immovable boulders called Trader OgreSoAndSo. A few things that would be handy:

When a path fails, have some kind of flag returned to notify the calling script it didn't get where it's supposed to, that remains set until another pathing command is called. I used TotalObstCount>40 to interrupt it before advpath aborts at TotalObstCount>50 and resets all the variables.

In the bazaar, jumping over the ogres isn't practical, but ducking is, so it might be useful to have an option to change the avoid obstacle code to randomly try ducking instead of jumping.

Pathing macros may be one of the easier ways for gms to catch macroers. They summon you to somewhere else in the zone, and watch the macro automatically /face and try to run back to where they were summoned from. I've been considering adding some anti-summoning code, which would raise an alert flag if your /loc suddenly jumped forward faster than you could run, or moved backwards at all. What do you think?

Thank you so much for your beautiful macros. It's obvious that you design general, powerful macros for others to use instead of just yourself, and it's much appreciated. Got a paypal account? ;)

--Vexix

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

Post by ml2517 » Wed May 05, 2004 5:50 am

Honestly the obstacle stuff needs to stay what works for most situations. You could easily build your own obstacle settings in your macro. If the script can't get past the obstacle it will terminate out and flip the Pathing flag to 0. Once it drops out you could check your distance to your end loc and if it is too far then go into your obstacle code. Then once you think you are outside of the "stuck" area you can simply call the play function again with a "cf" or "cr" depending on which direction you are playing. This will pick the closest point and resume from there.

As far as the GM thing is concerned I won't be adding anything in for this. It isn't really supposed to be used for unattended macroing. If you use it for that you should build in your own checks and live with the consequences *shrug*. It would be easy to do some checks in the WaitTilThere type Sub *hint*.

Nah don't worry about money, send it to Lax instead.

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

Post by ml2517 » Thu May 06, 2004 12:09 am

Updated:
advpath.inc *** I had to split up advpath.inc so there is now a second part that is just #include'd to the first. You don't set up or call from macros any differently than you had.
advpath2.inc (This is the second part.)
advpath.txt

Added the facef and faceb optional parameters.

You can still leave all of your old macros the same as they were before but you can now use these two commands with the optional parameters:

This would play pathfile bazaar, 1 time, forward (from the first loc in the INI to the last), does not ping pong from start to finish and back, does not try to zone at the end of the path, plays the entire path walking backward.
/echo play:bazaar 1 f nopp noz faceb

The two below are the same because it defaults to facef if no parameter is specified.
/echo play:bazaar 1 f nopp noz facef
/echo play:bazaar 1 f nopp noz

This would run you in a circle loop nonstop until you issue a 'stop' command. You would walk backward in a circle of 32 sides with a radius of 50 locs.
/echo pattern:32 50 faceb

The two below are the same since the default is assumed to be facef.
/echo pattern:32 50 facea
/echo pattern:32 50


The door code works while playing paths backward but it looks un-natural. You have been warned. :o

Let me know if you have any problems.

Quadzer
orc pawn
orc pawn
Posts: 15
Joined: Sun Oct 19, 2003 10:12 pm

Post by Quadzer » Thu May 06, 2004 6:22 pm

OMG you are Really Awsome. Thanks so much for putting in the Face command. If it was from my comment a few post Earlyer, you done it way fast. Thanks a bunch.

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

Post by ml2517 » Thu May 06, 2004 6:36 pm

Quadzer wrote:OMG you are Really Awsome. Thanks so much for putting in the Face command. If it was from my comment a few post Earlyer, you done it way fast. Thanks a bunch.
It was. You're welcome.