Page 1 of 1

Path Looping

Posted: Sun Mar 06, 2011 10:21 pm
by Uniden65
Is there a way to add in a path way something like this

Code: Select all

	<!-- #  6 --><waypoint x="-10197" z="12721">	</waypoint>
	<!-- #  7 --><waypoint x="-10289" z="12529">	</waypoint>
	<!-- #  8 --><waypoint x="-10760" z="12050">
		if( player.Path > 2 ) then
			loadPaths("xxxxxxxxx");
	  	end	</waypoint>
</waypoints>
lets say the bot runs the path many time 20 or 2 for example above then loads in the new path witch takes it to sell and repair then i have that path returning and fighting again? or do i have something wrong above ? and hopefuly iam following the rules on asking this question.. You do such a great job on the bot there not many questions for me to ask. :)

what i have tryed and i have check Wiki many times

Code: Select all

	<!-- #  7 --><waypoint x="-10289" z="12529">	</waypoint>
	<!-- #  8 --><waypoint x="-10760" z="12050">
		if( player.mobs["Wild Tatani"] > 9 ) then
			loadPaths("xxxxxxxxxxx");
	  	end	</waypoint>
</waypoints>
does not work !!!

Re: Path Looping

Posted: Mon Mar 07, 2011 12:59 am
by lisa
You can do what you want by simply adding ina variable

Code: Select all

<onLoad>
times = 1
</onLoad>
at the begining of the wp, you could then make it add 1 at a certain waypoint

Code: Select all

times = times + 1
then have in at the waypoint you want

Code: Select all

if times == 20 then loadPaths(XXXXXX) end
However I would think that making the bot check your bag space or weapon durability at that waypoint would be a much better idea. There are already a few posts on how to do this, just do a search =)