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.

How to create a walkingevent?

Featured Replies

Hello all,

 

i am trying to change the 

setMinDistanceThreshold

 

but it keeps giving me errors, no matter what i try sad.png

 

STATUS: SOLVED

i use another method more accurate to the last tile.

 

Event.WalkingEvent(AREA.getRandomPosition(0)).setMinDistanceTreshold(0);
map.walk(AREA);

 

 

 

Edited by fre024

I've never bothered with this. Unable to help here, sorry. :c

Event.WalkingEvent(AREA.getRandomPosition(0)).setMinDistanceTreshold(0);
map.walk(AREA);

 

 

Use the localWalker class, all you need is: 

localWalker.walk(AREA.getRandomPosition(0));

Edited by Divinity

  • Author

 

Use the localWalker class, all you need is: 

localWalker.walk(AREA.getRandomPosition(0));

 

and how do i make it walk to that exact position?

it always stops 2 tiles from the position it needs to be

can i use:

 setMinDistanceTreshold(0);

 

and how do i make it walk to that exact position?

it always stops 2 tiles from the position it needs to be

can i use:

 

Are you sure it steps 2 tiles from that position? RandomPosition will just return any coordinate in that area, so unless your debugging the coordinate I don't see how you would know?

 

If you are debugging it and it still steps 2 steps before, then it's a bug with the walking class in OSBot 2, remember it's not a final release so there are bound to be imperfections.

What are the coordinates you want to finish at?

  • Author

I use an area that is 1 tile.

I also tried walking to the specified position with the same result, 2 tiles away from endposition.

Default setMinDistanceTreshold is set to 2 for every walking procedure right?

I want to set this to 0.

 

Are you sure it steps 2 tiles from that position? RandomPosition will just return any coordinate in that area, so unless your debugging the coordinate I don't see how you would know?

 

If you are debugging it and it still steps 2 steps before, then it's a bug with the walking class in OSBot 2, remember it's not a final release so there are bound to be imperfections.

 

No it's not a bug, it's just that the script stops within the threshold difference... there's no walkExact method anymore, for whatever reason.

 

I use an area that is 1 tile.

I also tried walking to the specified position with the same result, 2 tiles away from endposition.

Default setMinDistanceTreshold is set to 2 for every walking procedure right?

I want to set this to 0.

 

I contact a developer and see if I can convince them to readd the walkExact method into the OSBot 2 API.

 

For now though, when I needed it to walk exactly, I use localWalker to get near enough then I do the following:

Position position = new Position(x, y, z);
position.interact(bot, "Walk here");

It'll click on the tile on screen, with camera rotation if necessary. This will ensure that you walk to the desired location exactly.

No it's not a bug, it's just that the script stops within the threshold difference... there's no walkExact method anymore, for whatever reason.

 

 

I contact a developer and see if I can convince them to readd the walkExact method into the OSBot 2 API.

 

For now though, when I needed it to walk exactly, I use localWalker to get near enough then I do the following:

Position position = new Position(x, y, z);
position.interact(bot, "Walk here");

It'll click on the tile on screen, with camera rotation if necessary. This will ensure that you walk to the desired location exactly.

 

you can also write your own, I found local walker to be too buggy.

    public boolean walkMinimap(Position p) {
            MouseDestination mouseDestination = new MiniMapTileDestination(bot,p);
            if (mouseDestination != null) {
                return mouse.click(mouseDestination);
            }
        return false;
    }

usage:

if (walkMinimap(new Position(3022,3022,0) {
//blah
}

Edited by Th3

 

you can also write your own, I found local walker to be too buggy.

    public boolean walkMinimap(Position p) {
            MouseDestination mouseDestination = new MiniMapTileDestination(bot,p);
            if (mouseDestination != null) {
                return mouse.click(mouseDestination);
            }
        return false;
    }

usage:

if (walkMinimap(new Position(3022,3022,0) {
//blah
}

 

The local walker has always been fine for me... idk

Guest
This topic is now closed to further replies.

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.