Page 1 of 1

Getting a weird error

Posted: Wed Oct 22, 2014 8:58 am
by sauhard
While creating a botting script for doing something in guild castle i get a error in which bot automatically moves to waypoint #9 instead of targetting guild castle manager and entering guild castle. Any help would be useful

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="2528" z="-1411" y="53">
			player:target_NPC(111621) -- Guild Castle Manager
			sendMacro("ChoiceOption(2);");
         waitForLoadingScreen()
  </waypoint>
<!-- #  2 --><waypoint x="0" z="-485" y="0">
			fly()
	</waypoint>
	<!-- #  3 --><waypoint x="9" z="-469" y="17">	</waypoint>
	<!-- #  4 --><waypoint x="42" z="-427" y="67">	</waypoint>
	<!-- #  5 --><waypoint x="74" z="-404" y="104">	</waypoint>
	<!-- #  6 --><waypoint x="174" z="-343" y="214">	</waypoint>
	<!-- #  7 --><waypoint x="222" z="-299" y="223">	</waypoint>
	<!-- #  8 --><waypoint x="274" z="-241" y="222">	</waypoint>
	<!-- #  9 --><waypoint x="324" z="-186" y="221">	</waypoint>
	<!-- #  10 --><waypoint x="380" z="-124" y="219">	</waypoint>
	<!-- # 11 --><waypoint x="442" z="-56" y="218">	</waypoint>
	<!-- # 12 --><waypoint x="492" z="-7" y="217">	</waypoint>
	<!-- # 13 --><waypoint x="547" z="49" y="216">	</waypoint>
	<!-- # 14 --><waypoint x="608" z="120" y="214">	</waypoint>
	<!-- # 15 --><waypoint x="659" z="180" y="213">	</waypoint>
	<!-- # 16 --><waypoint x="736" z="270" y="211">	</waypoint>
	<!-- # 17 --><waypoint x="785" z="326" y="184">	</waypoint>
	<!-- # 18 --><waypoint x="860" z="414" y="95">	</waypoint>
	<!-- # 19 --><waypoint x="914" z="497" y="19">	</waypoint>
	<!-- # 20 --><waypoint x="947" z="569" y="9">	</waypoint>
         player:target_NPC(112899)
         sendMacro("ChoiceOption(1);");
         waitForLoadingScreen()
</waypoints>

Re: Getting a weird error

Posted: Wed Oct 22, 2014 9:05 am
by rock5
Where's the error?

Re: Getting a weird error

Posted: Wed Oct 22, 2014 9:08 am
by sauhard
Ehm there are 2 problems i am getting:

First when i start the bot, it should target guild castle manager and then enter it... Instead it is moving directly to waypoint 9

Second: it ain't targetting drill dround. I flew towards the drill ground but instead of targetting it , it is going back to waypoint i started.

Re: Getting a weird error

Posted: Wed Oct 22, 2014 9:20 am
by rock5
If the waypoint (2528, -1411) is near the guild manager and you are near the guild manager then I don't know why it would go to waypoint 9. Does it say "waypoint 9 is closer than waypoint 1 so going to waypoint 9" or does it just go to waypoint 9 with no explanation?

I believe to target the drill ground you have to move to the middle of it before targeting it or else it will be out of range, I think.

Re: Getting a weird error

Posted: Wed Oct 22, 2014 9:26 am
by sauhard
Yeah it does says waypoint 9 is more closer to waypoint 1.
And abt drill ground i'll try in few minutes

Re: Getting a weird error

Posted: Wed Oct 22, 2014 9:35 am
by rock5
Insert this on line 2

Code: Select all

<onload> player:update() print("Coords:= ", player.X, player.Z, player.Y) </onload>
That will print what it thinks the players coordinates are.

Re: Getting a weird error

Posted: Sun Oct 26, 2014 2:49 pm
by dr-nuker
sauhard wrote:And abt drill ground i'll try in few minutes
Maybe your Drill Ground has a different level so that's why it has a different id?

Or you are not close enought?

Re: Getting a weird error

Posted: Sun Nov 23, 2014 1:23 pm
by Bill D Cat
Or try using this at the start of the waypoint file.

Code: Select all

	<onload>
		if not __WPL.ResumePoint then
			__WPL:setWaypointIndex(1)
		end
	</onload>
Note: This is another prime example that pertains to the topic I posted.

http://www.solarstrike.net/phpBB3/viewt ... =21&t=5906