Page 1 of 1

Simple script to finish after going through wp-file

Posted: Sat Dec 24, 2011 1:04 am
by spawni
hmm..if i want to run a wp-file only once - then I have to put a piece of code to end the script (like in your malatina code but that one is a little to complicated cause there is a multi-account-changing-script).
Oterhwise the bot will run to the first wp? (Haven“t tested yet - not enough time).

Maybe you can give me a tipp?

btw.. happy holidays and merry xmas :-)

Re: Simple script to finish after going through wp-file

Posted: Sat Dec 24, 2011 1:52 am
by lisa
A normal Wp will go through the waypoints until the last and then start agaon from the first.

so if you have 15 waypoints and #1 is closest to character when the WP is started it will do
1 -> 15 -> 1 -> 15 -> 1 -> 15
and continue on forever.

if # 6 is closest to character at startup then it does
6 -> 15 -> 1 -> 15 -> 1 -> 15
and continue on forever.

So if you want it to do another WP after it reaches #15 then add in code, something like this

Code: Select all

<!-- # 15 --><waypoint x="-13658" z="40641" y="709">	
loadPaths("WPfilename")
</waypoint>
So when it reaches waypoint #15 it will start the WPfilename.xml

Re: Simple script to finish after going through wp-file

Posted: Sun Dec 25, 2011 7:59 am
by rock5
If you are simply asking, how to stop a waypoint file, then I would use

Code: Select all

error("Waypoint file finished.")
in the last waypoint.

Re: Simple script to finish after going through wp-file

Posted: Fri Jan 06, 2012 7:37 pm
by kuripot
how about if i want to use #1-#15 when finish then #15-1?

Re: Simple script to finish after going through wp-file

Posted: Fri Jan 06, 2012 7:57 pm
by lisa
just change the direction it does the waypoints in.


--=== to do the waypoints in reverse
--=== so at waypoint #15 do

Code: Select all

__WPL:setDirection(WPT_BACKWARD);
--=== to make it go in order again
--=== at waypoint #1 make sure to change it to forward

Code: Select all

__WPL:setDirection(WPT_FORWARD);