Page 1 of 1

Mandatory waypoint [FIXED]

Posted: Mon Feb 06, 2012 6:17 pm
by Guest1234
Hey guys.

I have added this waypoint file to onLeaveCombat so that after a certain time, it will recall and go in my house to boost exp/tp bonus and logout.

onLeaveCombat: ( 10800 = 3 hours -- 60 seconds * 60 minutes * 3 hours )

Code: Select all

	if( os.difftime(os.time(), player.BotStartTime) > 10800 ) then 
		local _tmpTime = os.difftime(os.time(), player.BotStartTime)/3600
		printf("Running for: %s hours, Going to logout in house.\n", tostring(_tmpTime));
			loadPaths("logout"); 	
	end;


logout.xml : (added __WPL:setWaypointIndex(1); as per lisa's recommendation to make this work)

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onLoad>		
	sendMacro("UseSkill(1,2);"); -- Recall
	waitForLoadingScreen()
	yrest(1000)
	player:update()
	__WPL:setWaypointIndex(1);
	</onLoad>

<!-- #  1 --><waypoint x="-2774" z="49630" y="139" type="TRAVEL">	</waypoint>
<!-- #  2 --><waypoint x="-2718" z="49051" y="156" type="TRAVEL">	</waypoint>
<!-- #  3 --><waypoint x="-2670" z="48990" y="156" type="TRAVEL">
		player:target_NPC("Peki Chorayne");
		sendMacro("ChoiceOption(1)");
		waitForLoadingScreen()
		yrest(1000)
		player:logout(true);
</waypoint>

</waypoints>
This works great, but, when it arrives in Kampel, it skips to wp #3, apparently it thinks that it's closer, but it actually isn't.
How can I make WP #1 mandatory? Otherwise it hits the wall to the city and sticks there trying to run through the wall.


Thanks lisa !

Re: Mandatory waypoint

Posted: Mon Feb 06, 2012 9:03 pm
by lisa
use this in your onload of the WP

Code: Select all

__WPL:setWaypointIndex(1);

Re: Mandatory waypoint

Posted: Tue Feb 07, 2012 7:58 am
by Guest1234
Thanks lisa, will try that now.

:))))

Re: Mandatory waypoint

Posted: Tue Feb 07, 2012 8:18 am
by Guest1234
Thanks lisa, works like a charm.

:D :D :D :D :D :D :D :D :D :D

Edited 1st post to reflect fix.