Jump to content

Walking and other optimizations


Maxi

Recommended Posts

  • Developer

Hello everyone,

 

Today and yesterday we have been working on a couple of things. First of all, we have improved the bot its overal mechanisms we already implemented. Furthermore we have added a walking algorithm including pathfinding, which allows you to simply say:

 

walkTo(x, y)

 

Hooray!

 

Today we are working on redesigning some of the ways input is handled and the overal design of the script / bot threads. Instead of one single thread, an event driven threading design has been introduced, to allow things to run more concurrently especially in the case of client callbacks. This isn't needed for most things, but in a few occasions this is very handy when developing scripts, such as walking and moving the camera at the same time.

 

We are also implementing a function today that turns the camera into the direction of a certain object. If we finish all things I'm talking about above, we can run a basic but complete woodcutting bot by tonight, which would only require babysitting in the case of random events which then of course can be written as they are encountered.

 

We're getting close!

 

OSBot.org

  • Like 3
Link to comment
Share on other sites

  • Developer

For the walking queue are you going to have object hooks? IE: Click open gate, open door, etc, or are we going to have to use walkTo(x, y) to the location nearest the object, perform an object action, then continue the walking queue?

We will have functions where you define an object and you define what to do. For example, walk to it and click and option. For example, the script i'm currently working at will have a series of objects registered as bank booths, and all I call in the script is simply:

walkTo(object, "menu option to click string")

 

Is that what you meant?

Link to comment
Share on other sites

Yes, but you brought up a new question now, as the fact there are multiple objects, for the object argument would we declare it locally like:

 

private int object = 1234; private int[][] object = {1234, new Location(1234, 1234)};

 

Or how would it decipher the particular object and location without multiple checks in the script? Just curious. 

Link to comment
Share on other sites

  • Developer

If there are multiple objects location can be given as a parameters.

 

Right now when I want to chop down a specific Oak Tree I do this, it will walk you to the object if the object isn't within a clickable range:

 

 

selectEntityOption(object, "Chop down", "Oak Tree")

 

In that code it's up to you to decide how you get your object. You could choose for the closest object like:

 

 

def object = closestObject(id)

 

But we will have support for objects at specific locations, and it will be very easy to find the locations of the object because the bot client has options to enable and disable information like location etc drawn on top of for example objects.

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...