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.

Walking to an exact position

Featured Replies

I noticed when webwalking it wouldn't go to the exact position I wanted (A few tiles off sometimes) so I did a search to try and figure out how to do this and found a snippet from @@Explv

WalkingEvent walkingPath = new WalkingEvent(position);
                walkingPath.setMiniMapDistanceThreshold(0);
                walkingPath.setMinDistanceThreshold(0);
                execute(walkingPath);

Upon testing this code in my script I still encountered the same problem.

 

Is there another workaround for this?

 

Did you also take a look at the issue @@Alek

 

http://osbot.org/forum/topic/90020-walking-to-a-specific-tile/

 

 

Thank you

Edited by dontbuzz

  • Author

That is WalkingEvent, not WebWalkEvent.

 

I don't want to webwalk anymore cause I saw it had a min distance threshold of 2 or something.

 

 

Shouldn't this code by itself walk to the exact position I choose?

 

I'm confused haha and still learning

WalkingEvent walkingPath = new WalkingEvent(position);
                walkingPath.setMiniMapDistanceThreshold(0);
                walkingPath.setMinDistanceThreshold(0);
                execute(walkingPath);

Edited by dontbuzz

You can use this to click one a specific tile if the tile is visible on your minimap already. 

Position PositionToWalkTo = new Position(0,0,0);



MiniMapTileDestination Spot = new MiniMapTileDestination(getBot(), PositionToWalkTo);

getMouse().click(Spot);

Edited by lg_juggles

  • Author

 

You can use this to click one a specific tile if the tile is visible on your minimap already. 

Position PositionToWalkTo = new Position(0,0,0);



MiniMapTileDestination Spot = new MiniMapTileDestination(getBot(), PositionToWalkTo);

getMouse().click(Spot);

 

I tried this earlier aswell but it still missed the tile sometimes :(

I tried this earlier aswell but it still missed the tile sometimes sad.png

 
    public static boolean walkExact(Script script, Position position) {
        WalkingEvent event = new WalkingEvent(position);
        event.setMinDistanceThreshold(0);
        return script.execute(event).hasFinished();
    }

use dis. 

 

 

Edited by Transporter

  • Author
    public static boolean walkExact(Script script, Position position) {
        WalkingEvent event = new WalkingEvent(position);
        event.setMinDistanceThreshold(0);
        return script.execute(event).hasFinished();
    }

use dis. 

 

 

EDIT: THIS WORKED FOR ME

Edited by dontbuzz

Same thing still happens haha

 

I use this and it walks to the exact tile for me. 

walkExact(script, new Position(x, y, z));

Use it like this.

I use this and it walks to the exact tile for me. 

walkExact(script, new Position(x, y, z));

Use it like this.

 

Why would wrapping the method do anything?

 

Check the result of the event executing.

  • Author
    public static boolean walkExact(Script script, Position position) {
        WalkingEvent event = new WalkingEvent(position);
        event.setMinDistanceThreshold(0);
        return script.execute(event).hasFinished();
    }

use dis. 

 

 

THIS ACTUALLY WORKED THANKS.

 

I had deleted my script folder accidentally just before i tried this and found out i was still running the non-updated version of my script somehow. 

  • 5 years later...
On 8/11/2016 at 3:00 AM, Transporter said:
    public static boolean walkExact(Script script, Position position) {
        WalkingEvent event = new WalkingEvent(position);
        event.setMinDistanceThreshold(0);
        return script.execute(event).hasFinished();
    }

use dis. 

 

 

This works but the script for some reason pauses for 1-2 seconds after executing the event. I am running my script in mirror mode

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.