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.

Beginner question

Featured Replies

import org.osbot.rs07.api.model.Entity;

import org.osbot.rs07.script.Script;

import org.osbot.rs07.script.ScriptManifest;

 

@ScriptManifest(author = "Umut", info = "Testing", name = "Mining Test", logo = "", version = 0)

public class main extends Script {

 


public void onStart() {

log("Test");

}

 

private enum State {

MINE, DROP, WAIT

};

            

private State getState() throws InterruptedException {

Entity stall = objects.closest("Rocks");

        inventory.dropAllExcept(1265);

        sleep(random(1000, 1500));

if (stall != null)

return State.MINE;

return State.WAIT;

}

 


public int onLoop() throws InterruptedException {

switch (getState()) {

case MINE:

   Entity stall = objects.closest("Rocks");

   if (stall != null && !myPlayer().isAnimating()) {

       stall.interact("Mine");

   }

break;

case DROP:

inventory.dropAll();

break;

case WAIT:

sleep(random(500, 700));

break;

}

return random(200, 300);

}

 {

 

}

 

}

 

 

What could I improve on this script maybe like walking but I don´t know how to implement it any other suggestion or any help how to "bank walk" or walk to any specify area of rocks.

Thanks anways :)

private State getState() throws InterruptedException {
Entity stall = objects.closest("Rocks");
        inventory.dropAllExcept(1265);
        sleep(random(1000, 1500));
if (stall != null)
return State.MINE;
return State.WAIT;
}

Live code does not belong in your getState() - don't even have to read through the script. This will only give you problems in the end.

 
 
  • Author

 

private State getState() throws InterruptedException {
Entity stall = objects.closest("Rocks");
        inventory.dropAllExcept(1265);
        sleep(random(1000, 1500));
if (stall != null)
return State.MINE;
return State.WAIT;
}

Live code does not belong in your getState() - don't even have to read through the script. This will only give you problems in the end.

 

Hmm okay thanks for that! Well im beginning :P

  • Author

 

private State getState() throws InterruptedException {
Entity stall = objects.closest("Rocks");
        inventory.dropAllExcept(1265);
        sleep(random(1000, 1500));
if (stall != null)
return State.MINE;
return State.WAIT;
}

Live code does not belong in your getState() - don't even have to read through the script. This will only give you problems in the end.

 

 

What should I do any advice?

 

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.