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.

Few api questions

Featured Replies

i can't seem to get these to work, would be nice if someone were to explain why

 they dont work.

Ex:

///////////////////////////////////Im getting error on Area ---- Area is undefined
if(Area(1,2,3,4).contains.myPosition(){
    //code 
}
//////////////////////////////////// Im getting errors on .getRunEnergy() ---says change method receiver cast
if(myPlayer().getRunenergy() > random(25,50){
    myPlayer().setRunning(true);
}
//////////////////////////////////// Im getting error on walk ----- method walk i undefined
Position BANK = new Position(random(3092,3097), random(3240, 3246), 0);
walk(BANK);

Edited by javant

I'm no expert on the API but it should probably be

 

new Area(1, 2, 3, 4).contains(myPlayer)

 

if(myPlayer.getRunEnergy() > random(25, 50)){

    myPlayer.setRunning(true);

}

Unless your using notepad all the Java IDE's have relatively useful intellisense. I suggest actually reading the compile time errors you receive.

Edited by Swizzbeat

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

walks you to a random position in an area

 

Area x = new Area(1,2,3,4);

 

if (x.contains(myPlayer())) {

//cod

}

 

 

if (settings.getRunEnergy() > random(20,25)) {

//code

}

  • Author

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

walks you to a random position in an area

 

Area x = new Area(1,2,3,4);

 

if (x.contains(myPlayer())) {

//cod

}

 

 

if (settings.getRunEnergy() > random(20,25)) {

//code

}

I still get an error on Area(1,2,3,4); saying cannot define constructor

I still get an error on Area(1,2,3,4); saying cannot define constructor

then you have the wrong import, remove it. and try adding the other import. It should be something with rs07

  • Author

then you have the wrong import, remove it. and try adding the other import. It should be something with rs07

that was the problem.. thanks!!

Edited by javant

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.