Page 1 of 1

Waypoint deviation radius

Posted: Thu Dec 02, 2010 3:13 am
by Personalausweis
Hi there,

since some days my daylie-farm bot is doing long trips, far away from his waypionts.
then he often gets stuck cause he fell of a cliff or couldn't walk past a tree, fence,...etc

i my profile waypoint_deviation is set to 0

Code: Select all

<option name="WAYPOINT_DEVIATION"	value="0" />
http://img41.imageshack.us/f/deviation.jpg

how can i force him to his waypoints?

Re: Waypoint deviation radius

Posted: Thu Dec 02, 2010 4:30 am
by rock5
To control how far he travels from the waypoints chasing mobs you should use MAX_TARGET_DIST in your profile. See 'default.xml' profile for an example. It's supposed to keep you from going too far from the path. Also make sure you are using the latest version of rombot as there have been fixes related to this recently.

Re: Waypoint deviation radius

Posted: Thu Dec 02, 2010 4:50 am
by Personalausweis

Code: Select all

<option name="MAX_TARGET_DIST"    value="120" />
is 120 a good value for mage?

using svn updated rev 529

Re: Waypoint deviation radius

Posted: Thu Dec 02, 2010 8:09 am
by rock5
Personalausweis wrote:

Code: Select all

<option name="MAX_TARGET_DIST"    value="120" />
is 120 a good value for mage?

using svn updated rev 529
That shouldn't cause a problem. More likely there is a bug. There was a bug that caused such behavior but I fixed it around version 520. I had a look round that section but could find nothing wrong. Just to be sure, check that line 1397 of player.lua looks like this

Code: Select all

	if (__WPL:getMode() == "waypoints") then
You can also try setting DEBUG_TARGET to true in your profile and see what it outputs when you get pulled off course.

One last idea, you haven't added any code to the onLeaveCombat section of your profile that might cause it to attack mobs, have you?

Re: Waypoint deviation radius

Posted: Thu Dec 02, 2010 9:33 am
by Personalausweis
I will check bot after work with "max_target_dist" if he does what he should, everything is fine.


line 1397 of player.lua says:

Code: Select all

if( distance(V.X, V.Z, target.X, target.Z) > settings.profile.options.MAX_TARGET_DIST ) then

onLeaveCombat section does not contain any code.



What is Debug_Target and what does it?

Re: Waypoint deviation radius

Posted: Thu Dec 02, 2010 10:37 am
by jduartedj
Personalausweis wrote: What is Debug_Target and what does it?
DEBUG_TARGET (like all other DEBUG options) provides detailed information on what is happening at that time in that particular action, so DEBUG_TARGET would provide such information about the target.

You can set these options in settings.lua
Personalausweis wrote:line 1397 of player.lua says:

Code: Select all

	if( distance(player.X, player.Z, target.X, target.Z) > settings.profile.options.MAX_TARGET_DIST ) then
This isn't right! That should be line 1374. Try updating to the SVN the version, the last version on that file, if I'm not mistaken, is r529.

Re: Waypoint deviation radius

Posted: Thu Dec 02, 2010 12:24 pm
by Personalausweis
i changed max_target_dist and now all is working fine.

one question to the "onleavecombat" part in my profile.
is it possible to write a function whitch checks my HP and give me full HP bevor he heads to the next waypoint?
like this?

Code: Select all

<onLeaveCombat><![CDATA[
		full_heal();
	]]></onLeaveCombat>

and one last question:

Code: Select all

<!-- #  1 --><waypoint x="9273" z="52174"> tag="start"	</waypoint>
	<!-- #  2 --><waypoint x="9319" z="52660">	</waypoint>
	<!-- #  3 --><waypoint x="8888" z="52680">	</waypoint>
	<!-- #  4 --><waypoint x="8780" z="52350">	</waypoint>
	<!-- #  5 --><waypoint x="9090" z="52095">
			inventory:update();
			if 6 == inventory:itemTotalCount("Gewebest\129ck eines Sandsturm-Yasheedees")
			then loadPaths("abgeben");
			else __WPL:setWaypointIndex(__WPL:findWaypointTag("start"));
			end;			
	</waypoint>
why does he not load "abgeben" when he has 6 of these items?

Re: Waypoint deviation radius

Posted: Thu Dec 02, 2010 3:10 pm
by Administrator
why does he not load "abgeben" when he has 6 of these items?
Probably because you should be using characters with umlauts instead of their ASCII code, and make sure you save the file as UTF-8 without BOM encoding (use Notepad++).

Re: Waypoint deviation radius

Posted: Thu Dec 02, 2010 3:15 pm
by Personalausweis
if i use ΓΌ instead of \129 he gives an error...
i also tried with ID but he also does not load the other path...

Re: Waypoint deviation radius

Posted: Thu Dec 02, 2010 6:44 pm
by jduartedj
Personalausweis wrote:why does he not load "abgeben" when he has 6 of these items?
Found the Error:

XML 101: Put the properties INSIDE the tags...

??? -> WRONG!

Code: Select all

<!-- #  1 --><waypoint x="9273" z="52174"> tag="start"   </waypoint>
[/i]

CORRECT!

Code: Select all

<!-- #  1 --><waypoint x="9273" z="52174" tag="start">   </waypoint>
[/b]