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 A Path --> Newer API

Featured Replies

Title says it all, I've been on Scripting Hiatus since my Goat Killer due to complications but since I'm back I have noticed the API has removed or at least deprecated the use of certain walk methods.

 

I was wondering if someone could point me in the right direction

 

I've tried

// path
	private List<Position> toBank = new ArrayList<Position>();
	private List<Position> toShelf = new ArrayList<Position>();
	
	@Override
	public void onStart() {
		try {
			toBank.add(new Position(random(3323, 3320), random(3137,3141), 0));
			toBank.add(new Position(random(3318, 3321), random(3144,3147), 0));
			toBank.add(new Position(random(3307,3313), random(3146, 3152), 0));
			toBank.add(new Position(random(3301,3305), random(3149,3152), 0));
			toBank.add(new Position(random(3288,3297), random(3147, 3150), 0));
			toBank.add(new Position(random(3280, 3289), random(3150, 3153), 0));
			toBank.add(new Position(random(3276, 3279), random(3155, 3158), 0));
			toBank.add(new Position(random(3273, 3278), random(3160, 3163), 0));
			toBank.add(new Position(random(3269, 3272), random(3162,3170), 0));
			
			// to shelf
			toShelf.add(new Position(random(3269, 3272), random(3162,3170), 0));
			toShelf.add(new Position(random(3273, 3278), random(3160, 3163), 0));
			toShelf.add(new Position(random(3276, 3279), random(3155, 3158), 0));
			toShelf.add(new Position(random(3280, 3289), random(3150, 3153), 0));
			toShelf.add(new Position(random(3288,3297), random(3147, 3150), 0));
			toShelf.add(new Position(random(3301,3305), random(3149,3152), 0));
			toShelf.add(new Position(random(3307,3313), random(3146, 3152), 0));
			toShelf.add(new Position(random(3318, 3321), random(3144,3147), 0));
			toShelf.add(new Position(random(3323, 3320), random(3137,3141), 0));
			
		} catch (Exception e) {
			log(e);
		}
	}

But it doesn't run at all on walking, everything else runs fine in the script. Could anyone help out, I'm using walkPath(List <Position> l)

 

Just make 2 areas where you want to walk

 

Area area1 = new Area(x,y,x,y);

Area area2 = new Area(x,y,x,y);

 

And simply walk to any one of them by doing:

 

getWalking().webWalk(area1);

getWalking().webWalk(area2);

 

by using the webwalker you dont need to have predefined paths, it makes a new path for itself to walk which is far better.

  • Author

If you need to enable run, use the method in the WebWalkEvent

Avoid using the deprecated walking methods, as they will be removed soon. You can find the available ones here

 

Nah it's not that I need run enabled, its that the walking method doesn't work. Though I'm going to try a step at a time to get it to.

Just make 2 areas where you want to walk

 

Area area1 = new Area(x,y,x,y);

Area area2 = new Area(x,y,x,y);

 

And simply walk to any one of them by doing:

 

getWalking().webWalk(area1);

getWalking().webWalk(area2);

 

by using the webwalker you dont need to have predefined paths, it makes a new path for itself to walk which is far better.

 

Awesome! I'll try it out which makes since for it to work. Question though, does it work by placing the two areas next to eachother or far apart.

 

Say

 

[Area1][Area2][Area3][Area4] -> I've arrived

 

or

 

[Area1] ------> [Area2] -> I've arrived

Nah it's not that I need run enabled, its that the walking method doesn't work. Though I'm going to try a step at a time to get it to.

 

Awesome! I'll try it out which makes since for it to work. Question though, does it work by placing the two areas next to eachother or far apart.

 

Say

 

[Area1][Area2][Area3][Area4] -> I've arrived

 

or

 

[Area1] ------> [Area2] -> I've arrived

You can make an area in lumby and walk from it to cammy with one line, the spacing between the areas can be as big as you want.

It will even handle boats, obstacles for you.

Title says it all, I've been on Scripting Hiatus since my Goat Killer due to complications but since I'm back I have noticed the API has removed or at least deprecated the use of certain walk methods.

 

I was wondering if someone could point me in the right direction

 

I've tried

// path
	private List<Position> toBank = new ArrayList<Position>();
	private List<Position> toShelf = new ArrayList<Position>();
	
	@Override
	public void onStart() {
		try {
			toBank.add(new Position(random(3323, 3320), random(3137,3141), 0));
			toBank.add(new Position(random(3318, 3321), random(3144,3147), 0));
			toBank.add(new Position(random(3307,3313), random(3146, 3152), 0));
			toBank.add(new Position(random(3301,3305), random(3149,3152), 0));
			toBank.add(new Position(random(3288,3297), random(3147, 3150), 0));
			toBank.add(new Position(random(3280, 3289), random(3150, 3153), 0));
			toBank.add(new Position(random(3276, 3279), random(3155, 3158), 0));
			toBank.add(new Position(random(3273, 3278), random(3160, 3163), 0));
			toBank.add(new Position(random(3269, 3272), random(3162,3170), 0));
			
			// to shelf
			toShelf.add(new Position(random(3269, 3272), random(3162,3170), 0));
			toShelf.add(new Position(random(3273, 3278), random(3160, 3163), 0));
			toShelf.add(new Position(random(3276, 3279), random(3155, 3158), 0));
			toShelf.add(new Position(random(3280, 3289), random(3150, 3153), 0));
			toShelf.add(new Position(random(3288,3297), random(3147, 3150), 0));
			toShelf.add(new Position(random(3301,3305), random(3149,3152), 0));
			toShelf.add(new Position(random(3307,3313), random(3146, 3152), 0));
			toShelf.add(new Position(random(3318, 3321), random(3144,3147), 0));
			toShelf.add(new Position(random(3323, 3320), random(3137,3141), 0));
			
		} catch (Exception e) {
			log(e);
		}
	}

But it doesn't run at all on walking, everything else runs fine in the script. Could anyone help out, I'm using walkPath(List <Position> l)

 

 

If you want to make a list like that it would be a lot cleaner to do:

private final List<Position> TO_BANK = Arrays.asList(new Position[]{

    new Position(random(3323, 3320), random(3137,3141), 0));
    new Position(random(3318, 3321), random(3144,3147), 0);
    new Position(random(3307,3313), random(3146, 3152), 0);
    new Position(random(3301,3305), random(3149,3152), 0);
    new Position(random(3288,3297), random(3147, 3150), 0);
    new Position(random(3280, 3289), random(3150, 3153), 0);
    new Position(random(3276, 3279), random(3155, 3158), 0);
    new Position(random(3273, 3278), random(3160, 3163), 0);
    new Position(random(3269, 3272), random(3162,3170), 0);
});

But yeah, use the web walker instead:

getWalking().webWalk(new Position(0, 0, 0));

Edited by Explv

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.