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.

Localwalker.walk & map.walk

Featured Replies

If you make a report you should include more information. For example the code you are using, the location you are at etc.

		case MOVING:
			int newX = myPlayer().getX() - random(20, 30);
			int newY = myPlayer().getY() + (random(0, 10) - 5);
			Position[] newLocation = {new Position(newX, newY, 0)};
			//log(map.canReach(new Position(newX, newY, 0)));
			//localWalker.walkPath(newLocation);
			localWalker.walk(newX, newY);
			
			sleep(random(500, 1500));
			//log (newLocation);
			//log ("Moving to location");
			break;

Edit;  Seems like canReach was returning false and than the localWalker wasn't trying to generate the closest path to get to it.

Edited by 7331337

  • Author
  • Developer

If you make a report you should include more information. For example the code you are using, the location you are at etc.

 

public static void walkCloser(Script script, NPC npc) {
   Settings.status = "Walking closer to " + npc.getName();
   if(script.localWalker.walk(npc))
      Utils.sleep(script, 450, 800);
}

Same goes for script.map.walk()

 

It walks to a npc, but the npc is unwalkable.

Could this be the issue?

 

Khaleesi

  • Author
  • Developer

I'm going to try and reproduce this.

 

I tested it and indeed if you try to walk to a Position which is unwalkable the method won't work.

If you search for a tile close to the unwalkable tile it does work.

  • Developer

Obviously you can't walk somewhere if you try to walk to a position or entity that is not reachable. That is not a bug but common sense. Like you can't walk to bankers (although I've added something in that it will actually walk to bankers by grabbing the booth).

  • Author
  • Developer

Obviously you can't walk somewhere if you try to walk to a position or entity that is not reachable. That is not a bug but common sense. Like you can't walk to bankers (although I've added something in that it will actually walk to bankers by grabbing the booth).

 

Well this was never an issue, I've used this for 7 months ...

If you click the minimap on a unreachable spot( like tree or fish spot) it auto walks as close as possible.

 

But ok i'll write another method to get a Tile thats walkable next to it ... xD

 

Thx for the info and your time!

 

Khaleesi

Edited by Khaleesi

  • Developer

Well this was never an issue, I've used this for 7 months ...

If you click the minimap on a unreachable spot( like tree or fish spot) it auto walks as close as possible.

 

But ok i'll write another method to get a Tile thats walkable next to it ... xD

 

Thx for the info and your time!

 

Khaleesi

I was talking about the walker. The walker generates a path towards an object, and is configured to walk to trees etc at the closest spot besides it. But you can't walk to an object that is behind a wall because no path can be generated towards it. 

  • Author
  • Developer

I was talking about the walker. The walker generates a path towards an object, and is configured to walk to trees etc at the closest spot besides it. But you can't walk to an object that is behind a wall because no path can be generated towards it. 

 

Ya but I meant walking to a fishing spot. That didn't work biggrin.png bcs its located int he water probably smile.png

And this is probably seen as unwalkable (different flags?)

Edited by Khaleesi

  • Developer

Ya but I meant walking to a fishing spot. That didn't work biggrin.png bcs its located int he water probably smile.png

And this is probably seen as unwalkable (different flags?)

Same goes for fishing spots, they have special bits set in the flag bit set. I just wrote a fisher script and I can walk fine to fishing spots.

 

   public boolean walkToPool() {
        NPC pool = getClosestFishingSpot();
        if (pool != null) {
            return localWalker.walk(pool);
        } else {
            if (localWalker.walk(poolArea, true)) {
                return true;
            } else if (path != null) {
                Position[] p = ArrayUtils.clone(path.get(random(path.size())));
                ArrayUtils.reverse(p);
                return localWalker.walkPath(p);
            }
        }
        return true;
    }
  • Author
  • Developer

 

Same goes for fishing spots, they have special bits set in the flag bit set. I just wrote a fisher script and I can walk fine to fishing spots.

   public boolean walkToPool() {
        NPC pool = getClosestFishingSpot();
        if (pool != null) {
            return localWalker.walk(pool);
        } else {
            if (localWalker.walk(poolArea, true)) {
                return true;
            } else if (path != null) {
                Position[] p = ArrayUtils.clone(path.get(random(path.size())));
                ArrayUtils.reverse(p);
                return localWalker.walkPath(p);
            }
        }
        return true;
    }

 

Ok thx, Figured something out already, was bit to fast witht his topic.

 

Could be closed in my opinion :)

 

khaleesi

Guest
This topic is now closed to further replies.

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.