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.

Walker With Basic Obstacle Handling

Featured Replies

Dunno I just put that there so I wouldn't have to release my own walking method tongue.png

 

hai corey with an e

wuts wrong with corey m8

thats like saying

hey swizzbeat with a b

hey dog_ with a d

    public Position nextTile(Position path[], int skipDist) {
        int dist = -1, closest = -1;
        for (int i = path.length - 1; i >= 0; i--) {
            Position tile = path[i];
            int d = script.map.distance(tile);
            if (d <= 16 && (d < dist || dist == -1)) { //<---- was edited
                dist = d;
                closest = i;
            }
        }
        
        int feasibleTileIndex = -1;
        
        for (int i = closest; i < path.length; i++) {
            if (script.map.distance(path[i]) <= skipDist) {
                feasibleTileIndex = i;
            } else {
                break;
            }
        }

		return (feasibleTileIndex == -1) ? null : path[feasibleTileIndex];
    }

i added in one line, because for the next tile method it will get the furthest tile in the path, but sometime it picks a tile that maybe like 3-5 time out of minimap rang and just get stuck there so i added a quick boolean that will help check to see if it can reach tile.  

  • Author
    public Position nextTile(Position path[], int skipDist) {
        int dist = -1, closest = -1;
        for (int i = path.length - 1; i >= 0; i--) {
            Position tile = path[i];
            int d = script.map.distance(tile);
            if (d <= 16 && (d < dist || dist == -1)) { //<---- was edited
                dist = d;
                closest = i;
            }
        }
        
        int feasibleTileIndex = -1;
        
        for (int i = closest; i < path.length; i++) {
            if (script.map.distance(path[i]) <= skipDist) {
                feasibleTileIndex = i;
            } else {
                break;
            }
        }

		return (feasibleTileIndex == -1) ? null : path[feasibleTileIndex];
    }

i added in one line, because for the next tile method it will get the furthest tile in the path, but sometime it picks a tile that maybe like 3-5 time out of minimap rang and just get stuck there so i added a quick boolean that will help check to see if it can reach tile.  

 

You should probably add it to the loop which actually grabs the next tile to walk to. The first loop just gets the closest position to your current position as a starting point.

You should probably add it to the loop which actually grabs the next tile to walk to. The first loop just gets the closest position to your current position as a starting point.

Are you talking about the second loop

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.