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.

Path Walking

Featured Replies

I'm writing a woodchopping script that banks, and I need to get my character from the woodchopping area (position 1) to the bank (position 2). How would I go about having my character walk between the two points; what command would let me input an end position and have my character walk there?

I'm writing a woodchopping script that banks, and I need to get my character from the woodchopping area (position 1) to the bank (position 2). How would I go about having my character walk between the two points; what command would let me input an end position and have my character walk there?

 

http://osbot.org/forum/topic/100862-bank-closest-to-entity/

 

^ This is a very useful snippet from @LoudPacks that allows you to get the bank closest to your player. I just input the enum privately inside of a class called 'Banker' and made the methods of the enum into methods of the class.

 

Seems like you're new, so here's a great resource that @Explv made that has been incredibly useful to me since I found it. http://explv.github.io/ <-- Gets you the positions for Areas, Positions, etc. Very useful.

private Area myBank;
private Position initialPos; //have them start the script in the right location. 
//Or you could just input an Area if your script is already centered in a specific location
private final Area wcArea = new Area(8, 9, 10, 11);

@[member='OverRideCwalk']
public void onStart() {
    myBank = new Banker().closestTo(myPlayer());
    initialPos = myPlayer().getPosition();
}


@[member='OverRideCwalk']
public void onLoop() throws InterruptedException {
    getWalking().walk(myBank.getRandomPosition(); //walk to closest bank
    //~~~~~~~~~ banking code to implement ~~~~~~~~~~
    getWalking().walk(initialPos); 
    //or if you want to walk back to an area:
    getWalking().walk(wCArea.getRandomPosition());
}

Edited by Imateamcape

//Make 2 areas


private final Area WoodCut = new Area(0,1,2,3);

private final Area Bank = new Area(4,5,6,7);


if (getInventory.isFull) {
   if (!Bank.contains(myPlayer) {

       getWalking.webWalk(Bank); 
    } else {

        //BankCode
}



if (!getInventory.isFull) {
if (!WoodCut.contains(myPlayer) {

getWalking.webWalk(Woodcut);
} else {

//Chop
}

 

Edited by lg_juggles

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.