Page 1 of 1
How can I use this for a travel bot?
Posted: Sun May 24, 2009 8:12 am
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.
Re: How can I use this for a travel bot?
Posted: Sun May 24, 2009 8:41 am
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:
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.
Re: How can I use this for a travel bot?
Posted: Sun May 24, 2009 10:13 am
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?
Re: How can I use this for a travel bot?
Posted: Sun May 24, 2009 7:34 pm
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>
Re: How can I use this for a travel bot?
Posted: Mon May 25, 2009 9:17 am
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.
Re: How can I use this for a travel bot?
Posted: Mon May 25, 2009 9:20 am
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>
Re: How can I use this for a travel bot?
Posted: Mon May 25, 2009 9:44 am
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>
Re: How can I use this for a travel bot?
Posted: Mon May 25, 2009 10:41 am
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>
Re: How can I use this for a travel bot?
Posted: Tue May 26, 2009 4:18 pm
by birdy64
This is working great! Thanks for your time.
Re: How can I use this for a travel bot?
Posted: Thu Jun 04, 2009 8:10 am
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:
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.
Re: How can I use this for a travel bot?
Posted: Thu Jun 04, 2009 12:53 pm
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).
Re: How can I use this for a travel bot?
Posted: Mon Jun 08, 2009 4:09 pm
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.
Re: How can I use this for a travel bot?
Posted: Thu Jun 18, 2009 2:40 am
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:
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
Re: How can I use this for a travel bot?
Posted: Thu Jun 18, 2009 3:44 am
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.