How can I use this for a travel bot?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

How can I use this for a travel bot?

#1 Post by birdy64 »

Is there something I can change so that I can ignore targets and attacks so that it will just run the waypoints without stopping? I would like a bot to run from the starting area to Varnas for example. I unbound "select nearest target" in the interface but it won't ignore any attacks.
User avatar
Administrator
Site Admin
Posts: 5340
Joined: Sat Jan 05, 2008 4:21 pm

Re: How can I use this for a travel bot?

#2 Post by Administrator »

Open up rom/bot.lua in notepad. Search (CTRL+F) for player:fight(). Place two dashes (--) in front of the lines that contain this code. Example:

Code: Select all

--player:fight();
Now, look for player:moveTo, you'll see this line:

Code: Select all

local success, reason = player:moveTo(wp);
Change to:

Code: Select all

local success, reason = player:moveTo(wp, true);
That's it. Save and load the script in MicroMacro, and you're done.
birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

Re: How can I use this for a travel bot?

#3 Post by birdy64 »

Works great thank you!
Is there a way that when I type rom/bot.lua it will just run the "Default" Profile and not look for the character that's logged in atm? And lastly, is there a way to not have it loop my waypoints but just stop at the end of the waypoint list?
User avatar
Administrator
Site Admin
Posts: 5340
Joined: Sat Jan 05, 2008 4:21 pm

Re: How can I use this for a travel bot?

#4 Post by Administrator »

birdy64 wrote:Works great thank you!
Is there a way that when I type rom/bot.lua it will just run the "Default" Profile and not look for the character that's logged in atm?
rom/bot.lua profile:default
And lastly, is there a way to not have it loop my waypoints but just stop at the end of the waypoint list?
Edit the waypoint script. Change the last waypoint like this:

Code: Select all

<waypoint x="x" z="z">
  stopPE();
</waypoint>
birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

Re: How can I use this for a travel bot?

#5 Post by birdy64 »

I made the changes I believe correctly to my waypoint file but, it still wants to run back to #1 when finished. Attached is my waypoint file.
Attachments
toLogarMailbox.xml
(522 Bytes) Downloaded 249 times
User avatar
Administrator
Site Admin
Posts: 5340
Joined: Sat Jan 05, 2008 4:21 pm

Re: How can I use this for a travel bot?

#6 Post by Administrator »

birdy64 wrote:I made the changes I believe correctly to my waypoint file but, it still wants to run back to #1 when finished. Attached is my waypoint file.

Code: Select all

	<waypoint x="-419" z="-5999" />
	 stopPE();
Is not the same as

Code: Select all

	<waypoint x="-419" z="-5999">
	 	 stopPE();
	</waypoint>
birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

Re: How can I use this for a travel bot?

#7 Post by birdy64 »

If I change it to this I get an error Line: 17 Column: 3 Message: mismatch tag

Code: Select all

<waypoints>
	<waypoint x="-4045" z="-8240" />
	<waypoint x="-3474" z="-8242" />
	<waypoint x="-2783" z="-8236" />
	<waypoint x="-2442" z="-8255" />
	<waypoint x="-1676" z="-8370" />
	<waypoint x="-1407" z="-8533" />
	<waypoint x="-812" z="-8106" />
	<waypoint x="-475" z="-7764" />
	<waypoint x="-452" z="-7435" />
	<waypoint x="-358" z="-7211" />
	<waypoint x="-218" z="-6909" />
	<waypoint x="-238" z="-6442" />
	<waypoint x="-493" z="-6056" />
	<waypoint x="-419" z="-5999">
	     stopPE();
</waypoints>
User avatar
Administrator
Site Admin
Posts: 5340
Joined: Sat Jan 05, 2008 4:21 pm

Re: How can I use this for a travel bot?

#8 Post by Administrator »

You have this:

Code: Select all

<waypoints>
	-- snip --
	<waypoint x="-419" z="-5999">
	     stopPE();
</waypoints>
You are not closing the waypoint tag properly. You open a 'waypoint' but close 'waypoints'. They are two different attributes.

Fix:

Code: Select all

<waypoints>
	-- snip --
	<waypoint x="-419" z="-5999">
	     stopPE();
	</waypoint>
</waypoints>
birdy64
Posts: 20
Joined: Fri May 08, 2009 9:06 am

Re: How can I use this for a travel bot?

#9 Post by birdy64 »

This is working great! Thanks for your time.
d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How can I use this for a travel bot?

#10 Post by d003232 »

[quote="Administrator"]Open up rom/bot.lua in notepad. Search (CTRL+F) for player:fight(). Place two dashes (--) in front of the lines that contain this code. Example:

Code: Select all

--player:fight();
...
I like the idea of using the bot for traveling. In that case it is not very comfortable every time to edit the bot.lua

It would be very helpful if I could mark an option within the waypoint-file to say "thats a traveling waypoint" file. And if I use that wayoint file, the bot should just travel.
The RoM Bot Online Wiki needs your help!
User avatar
Administrator
Site Admin
Posts: 5340
Joined: Sat Jan 05, 2008 4:21 pm

Re: How can I use this for a travel bot?

#11 Post by Administrator »

You know, that actually wouldn't be too hard to set up, I suppose. It would still pick up aggressive monsters (which would in most people's opinion be wanted), which would be harder to change.

EDIT: Done. You can get the update off of SVN. Not enough has been changed to support a full release. To use, modify your waypoint script. Add type="TRAVEL" to just run to this waypoint without targetting additional enemies (will still attack aggressive creatures).
d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: How can I use this for a travel bot?

#12 Post by d003232 »

Administrator wrote:YTo use, modify your waypoint script. Add type="TRAVEL" to just run to this waypoint without targetting additional enemies (will still attack aggressive creatures).
cool. thx

btw: There are some more 'options' who would be helpfull to store them in the waypoint file (for normal waypointfiles): 'friends'-mobs, return path, sometime WAYPOINT_DEVIATION, COMBAT_DISTANCE (if you are in a cave as an example). In that cases it would be good to have the default values in the *charname*.xml and give the option to overwrite them with values in the waypoint file.
The RoM Bot Online Wiki needs your help!
stevenr
Posts: 4
Joined: Sat Jun 06, 2009 6:53 am

Re: How can I use this for a travel bot?

#13 Post by stevenr »

Administrator wrote:Open up rom/bot.lua in notepad. Search (CTRL+F) for player:fight(). Place two dashes (--) in front of the lines that contain this code. Example:

Code: Select all

--player:fight();
Now, look for player:moveTo, you'll see this line:

Code: Select all

local success, reason = player:moveTo(wp);
Change to:

Code: Select all

local success, reason = player:moveTo(wp, true);
That's it. Save and load the script in MicroMacro, and you're done.
Hi,

i have done this to go to the spots of herbs, etc. There i start a little program that is clicking right. I use it as a simple farmbot.
But sometimes i click on a mob - and then the bot waits that the mob is dead - so he stands there and do nothing.

Can i do something to chance it?

mfg
User avatar
Administrator
Site Admin
Posts: 5340
Joined: Sat Jan 05, 2008 4:21 pm

Re: How can I use this for a travel bot?

#14 Post by Administrator »

stevenr: If you grab the latest version (2.40, just uploaded it), then you can instead make a modification to the waypoint script which should prevent the problem you describe. For each waypoint listed in the waypoint script, set it's type to TRAVEL. For example:

Code: Select all

<waypoint x="1234" z="5678" type="TRAVEL" />
Unfortunately, you will need to do this for every waypoint in the list for the time being. Future additions will allow it to be more easily configurable.
Post Reply