Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help: Walk from any location to a predefined mob area

Featured Replies

So I decided to do some scripting in my spare time. And as a first step to check some things out, I wanted the bot to walk to a certain position from any location (starting position should be variable and the ending position should be contant). 

So somewhere I read that you could use this piece of code to walk somewhere(lumbridge general store coords):

public Position GeneralStore = new Position(3199, 3245, 0);
getWalking().walk(GeneralStore);

However when running this, nothing really happends (nog even a log that I've made)..

 

"Complete" code:

Spoiler

package Fighter;

//OSBOT API
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.api.map.Position;


@ScriptManifest(author = "Hussain1e", name = "Fighter", info = "Walk to goblin, kills it, collects loot, walks to bank, bank all and loop", version = 1.0, logo = "")

public final class Fighter extends Script {
    //Goblin location
    public Position GeneralStore = new Position(3199, 3245, 0);

    @Override
    public final void onStart() {
        log("Walking to goblin area...");
        getWalking().walk(GeneralStore);
    }

    @Override
    public final int onLoop() {
        return random(111, 211);
    }

    @Override
    public final void onExit() {
        mouse.moveOutsideScreen();
        log("Closing Script...");
    }
}

 

If the position is to far from the player position you will have to use the WebWalker it is a heavier method to call so try to use the local walker when you can.

Example

getWalking.webWalk(location);

Edited by BravoTaco

  • Author

Thank you very much. Which import do I need to use for webWalk? And where can I find documentation on all osbot import?

1 hour ago, Hussain1e said:

Thank you very much. Which import do I need to use for webWalk? And where can I find documentation on all osbot import?

I think the import is:

org.osbot.rs07.api.Walking

Should be the same import as the standard walker uses.

  • Author
15 hours ago, BravoTaco said:

I think the import is:

org.osbot.rs07.api.Walking

Should be the same import as the standard walker uses.

Thank you, I've already got some semi-ideas in work. However I cannot help but think that the way webWalk is walking, is quite "botlike". Is there a way to customize his walking behaviour. For example not only using the mini-map to click but also using the normal surroundings to click for walking. Or increase the intesity of clicking (maybe that he'll sometimes spamclick). Or make it so that he does unnecessary mouse movements while walking and clicking....

8 hours ago, Hussain1e said:

Thank you, I've already got some semi-ideas in work. However I cannot help but think that the way webWalk is walking, is quite "botlike". Is there a way to customize his walking behaviour. For example not only using the mini-map to click but also using the normal surroundings to click for walking. Or increase the intesity of clicking (maybe that he'll sometimes spamclick). Or make it so that he does unnecessary mouse movements while walking and clicking....

To customize it you will have to use a WebWalkEvent and a PathPreferenceProfile. I don't think you can change how it clicks. There is few different options to be used so you will have to reference the API to see them all, but here is a quick example.

WebWalkEvent webWalkEvent = new WebWalkEvent(location);
//This will ignore using roads and take a more direct path to the destination.
webWalkEvent.useSimplePath();
PathPreferenceProfile pathPreferenceProfile = new PathPreferenceProfile();
pathPreferenceProfile.setAllowSpiritTrees(false);
pathPreferenceProfile.setAllowGliders(false);
webWalkEvent.setPathPreferenceProfile(pathPreferenceProfile);
execute(webWalkEvent);
  • Author
On 10/13/2019 at 10:20 PM, BravoTaco said:

To customize it you will have to use a WebWalkEvent and a PathPreferenceProfile. I don't think you can change how it clicks. There is few different options to be used so you will have to reference the API to see them all, but here is a quick example.


WebWalkEvent webWalkEvent = new WebWalkEvent(location);
//This will ignore using roads and take a more direct path to the destination.
webWalkEvent.useSimplePath();
PathPreferenceProfile pathPreferenceProfile = new PathPreferenceProfile();
pathPreferenceProfile.setAllowSpiritTrees(false);
pathPreferenceProfile.setAllowGliders(false);
webWalkEvent.setPathPreferenceProfile(pathPreferenceProfile);
execute(webWalkEvent);

Wow, thank you so much!

2 hours ago, Hussain1e said:

Wow, thank you so much!

Np. Need any help feel free to drop me a pm.

Gl on your scripting endeavour. 🙂

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.