Skip 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.

getWalking().walk(Position) doesn't walk to exact tile

Featured Replies

        Position myPos = myPlayer().getPosition();

        if (myPlayer().isUnderAttack() && myPos.equals(afkPos)) {
            lastAtk = System.currentTimeMillis();
            done = false;
            afk();
        } else {
            if ( (System.currentTimeMillis() > (lastAtk + timer) ) && !done) {
                reset();
            } else {
                log("CURRENTLY HERE");
                getWalking().walk(afkPos);
                sleep(random(450, 750));
            }
        }

 

I'm at Sand Crabs and sometimes the script will missclick so I want it to return to the afk tile, but it doesn't actually walk to it. The logger spams "CURRENTLY HERE" so it reaches the code, but the script doesn't move. Does this have something to do with how getWalking().walk(Position) works?

You need to make an event and setMinDistanceThreshold to 0 to walk to exact tile

WalkingEvent myEvent = new WalkingEvent(new Position(1, 2, 3)); //making the event
myEvent.setMinDistanceThreshold(0);
execute(myEvent); //executing the event

 

Edited by skillerkidos1

  • Author
2 minutes ago, skillerkidos1 said:

You need to make an event and setMinDistanceThreshold to 0 to walk to exact tile



WalkingEvent myEvent = new WalkingEvent(new Position(1, 2, 3)); //making the event
myEvent.setMinDistanceThreshold(0); 
myEvent.setEnergyThreshold(47);
myEvent.setBreakCondition(new Condition() {
    @[member='Override']
    public boolean evaluate() {
        return myPlayer().isUnderAttack();
    }
});
execute(myEvent); //executing the event

 

Yeah after some searching I simply did

WalkingEvent walkingEvent = new WalkingEvent(afkPos);
walkingEvent.setMinDistanceThreshold(0);
execute(walkingEvent);

Thanks anyway

Edited by Gam

  • Author
41 minutes ago, skillerkidos1 said:

That’s exactly what I said? Lmao

Yeah, I just mean I did that right before you commented. 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.