Waypoint deviation radius

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Waypoint deviation radius

#1 Post 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?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Waypoint deviation radius

#2 Post 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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Waypoint deviation radius

#3 Post by Personalausweis »

Code: Select all

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

using svn updated rev 529
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Waypoint deviation radius

#4 Post 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?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Waypoint deviation radius

#5 Post 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?
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Waypoint deviation radius

#6 Post 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.
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Waypoint deviation radius

#7 Post 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?
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Waypoint deviation radius

#8 Post 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++).
Personalausweis
Posts: 73
Joined: Mon Aug 16, 2010 12:50 pm

Re: Waypoint deviation radius

#9 Post 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...
User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Waypoint deviation radius

#10 Post 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]
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates
Post Reply