Page 1 of 1

Latest Bot revision 758 causes issues

Posted: Tue Jun 11, 2013 2:51 pm
by Cindy
Since updating to latest rev, I have had failures consistently with the Miller farm waypoint file (i do it for the golden egg) and the AT waypoint file. Specifically, upon entry,

Code: Select all

	local zoneid = RoMScript("GetZoneID()")
	print(zoneid)
	if zoneid ~= 304 then -- not at Miller's Ranch
		-- Try to find Sorrun and teleport in
		if player:target_NPC("Sorrun") then
			sendMacro("ChoiceOption(3)") yrest(1500)
			sendMacro("ChoiceOption(1)") yrest(1500)
			waitForLoadingScreen(20000)
			yrest(3500)
			-- __WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z))
		else
			error("You are too far from Miller's Ranch")
		end
	end
now fails, in that it always decides waypoint 6 is the nearest, and runs to collect the bags without having picked up the quest. (Note i increased/added yrest values, and finally disabled the line that picks the waypoint based on position).

In the AT script, I actually got inside all the way to the center place without any npcs/towers/chest being summoned, I suspect it is a similar timing type issue that causes this. On my backup computer, the exact same waypoints, and exact same game version work fine, so it is something that changed in the last bot revision that causes the anomaly.

Re: Latest Bot revision 758 causes issues

Posted: Tue Jun 11, 2013 2:58 pm
by rock5
I think I might have remove a player:update() in waitForLoadingScreen() because it was sometime causing problems on some servers that need more time to be ready before a player:update() can be done. Just add a player:update() after the waitForLoadingScreen(). See if that fixes it.

Re: Latest Bot revision 758 causes issues

Posted: Wed Jun 12, 2013 11:17 am
by Cindy
This did not work:

Code: Select all

	local zoneid = RoMScript("GetZoneID()")
	print(zoneid)
	if zoneid ~= 304 then -- not at Miller's Ranch
		-- Try to find Sorrun and teleport in
		if player:target_NPC("Sorrun") then
			sendMacro("ChoiceOption(3)") yrest(1000)
			sendMacro("ChoiceOption(1)")
			waitForLoadingScreen(20);	yrest(1000);   player:update();    yrest(1000)
			printf("x: " ..player.X.."  : "..player.Z)
			__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z))
		else
			error("You are too far from Miller's Ranch")
		end
	end

Re: Latest Bot revision 758 causes issues

Posted: Wed Jun 12, 2013 11:36 am
by rock5
Well the fix worked for me but I think you are right, it's a timing issue. Some servers such as the nexon server (rom4u) have this small time after waitForLoadingScreen has ended that player:update doesn't work. You could try increasing the yrest before the player:update and see if that helps.

Either way I might have a look and see if there is some way I can put the player:update back in waitForLoadingScreen as it seems to be causing a few too many problems. Maybe I can get the bot to ignore errors when player:update runs.