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.

Epos OSBot

Members
  • Joined

  • Last visited

  1. @ExtraBotz This was especially useful. Definitely cleared up some confusion.
  2. @Apaec Would it be possible to simply define and assign a variable for timeout the same way it's done for condition? So just define it and assign it in the constructor. You're able to use sleep() because the class extends ConditionalSleep, right? I'm still not quite sure what super(timeout) is for. Why not this.timeout = timeout; as done with condition?
  3. public class Sleep extends ConditionalSleep { private BooleanSupplier condition; public Sleep(BooleanSupplier condition, int timeout) { super(timeout); this.condition = condition; } @Override public boolean condition() throws InterruptedException { return condition.getAsBoolean(); } public static boolean sleepUntil(BooleanSupplier condition, int timeout) { return new Sleep(condition, timeout).sleep(); } } I got this class from a tutorial, but I'm trying to understand it and have a few questions: What does super(timeout) do? I know super calls the parent class but what exactly does it do in this context? What does the condition() method do in this class? It's an abstract method so it has to be implemented, but I don't see it being used for anything in this class, so why is return condition.getAsBoolean() necessary?
  4. Fixed by using a constructor in the BuyBoots class.
  5. public class Main extends Script { private ArrayList<Task> tasks = new ArrayList<Task>(); public static MethodProvider MP = new MethodProvider(); @Override public void onStart() throws InterruptedException { Collections.addAll(tasks, new Bank(), new Teleport(), new BuyBoots()); } @Override public int onLoop() throws InterruptedException { for (Task task : tasks) { if (task != null && task.validate()) { task.execute(); } } return random(250, 750); } } public class BuyBoots implements Task { @Override public boolean validate() { return !Main.MP.getInventory().contains("Coins"); } @Override public void execute() { Main.MP.log("Executing BuyBoots task."); } } This part is giving me an NPE: return Main.MP.getInventory().contains("Coins"); I tried defining a MethodProvider instance in the BuyBoots class, tried using a getter method in the Main class instead of a static variable etc. but when I start the script this line gives me an NPE and the script stops responding. Can anyone help?

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.