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.

Spazbau5

Members
  • Joined

  • Last visited

  1. Here is the first script I've ever made. I happened to be in Port Phasmatys at the time and had gold ore in my bank lol. All feedback is very appreciated. import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; @ScriptManifest(name = "Gold Smelter", author = "Spazbau5", version = 0.1, info = "Smelts gold bars in Port Phasmatys", logo = "") public class main extends Script { private final Area FORGE_AREA = new Area(3689, 3481, 3682, 3477); private final Area BANK_AREA = new Area(3691, 3471, 3686, 3466); @Override public void onStart() { log(getName() + " v" + getVersion() + " has started!"); } @Override public void onExit() { log(getName() + " v" + getVersion() + " has stopped!"); } @Override public int onLoop() throws InterruptedException { switch (getState()) { case SMELT: log("Current state: SMELT"); RS2Object forge = getObjects().closest("Furnace"); if (forge != null) { if (!myPlayer().isAnimating()) { RS2Widget smeltButton = getWidgets().get(270, 19); if (smeltButton != null) { smeltButton.interact("Smelt"); getMouse().moveOutsideScreen(); } else { sleep(1000); if (!myPlayer().isAnimating()) { forge.interact("Smelt"); return random(4000, 5000); } } } } break; case WALK_TO_FORGE: log("Current state: WALK_TO_FORGE"); getWalking().webWalk(FORGE_AREA); break; case WALK_TO_BANK: log("Current state: WALK_TO_BANK"); getWalking().webWalk(BANK_AREA); break; case DEPOSIT: log("Current state: DEPOSIT"); if (bank.isOpen()) { bank.depositAll(); } else { RS2Object bankBooth = getObjects().closest("Bank booth"); if (bankBooth != null && bankBooth.interact("Bank")) { new ConditionalSleep(10000) { @Override public boolean condition() { return bank.isOpen(); } }.sleep(); } } break; case WITHDRAW: log("Current state: WITHDRAW"); if (bank.isOpen()) { bank.withdrawAll("Gold ore"); } else { RS2Object bankBooth = getObjects().closest("Bank booth"); if (bankBooth != null && bankBooth.interact("Bank")) { new ConditionalSleep(10000) { @Override public boolean condition() { return bank.isOpen(); } }.sleep(); } } break; case IDLE: log("Current state: IDLE"); } return random(700, 2300); } @Override public void onPaint(Graphics2D g) { } enum State { WALK_TO_BANK, DEPOSIT, WITHDRAW, WALK_TO_FORGE, SMELT, IDLE } private State getState() { if (!getInventory().contains("Gold ore")) { if (getInventory().isEmpty()) { log("Entering state: WITHDRAW"); return State.WITHDRAW; } else { log("Entering state: DEPOSIT"); return State.DEPOSIT; } } if (getInventory().contains("Gold ore")) { if (!FORGE_AREA.contains(myPlayer())) { log("Entering state: WALK_TO_FORGE"); return State.WALK_TO_FORGE; } else { log("Entering state: SMELT"); return State.SMELT; } } else if (getInventory().contains("Gold bar")) { if (!BANK_AREA.contains(myPlayer())) { log("Entering state: WALK_TO_BANK"); return State.WALK_TO_BANK; } else { log("Entering state: DEPOSIT"); return State.DEPOSIT; } } log("Entering state: IDLE"); return State.IDLE; } }
  2. Wow those were fast responses... Thanks!
  3. Spazbau5 changed their profile photo
  4. Hey there everyone, as you can tell I'm new here :p So, I'm wanting to learn how to write scripts for OSBot, but I don't have an extensive knowledge on Java, but I do have a basic understanding of it as well as a few years of experience with Python, so basic programming concepts aren't an issue for me. Is there a discord server or anywhere to discuss scripting? I'm probably going to need a little bit of help with structuring scripts, learning the API, and possibly some Java related stuff. I'm looking forward to joining this community, thanks for the 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.