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.

epicbotter69

Members
  • Joined

  • Last visited

Everything posted by epicbotter69

  1. Hey guys I just wrote my first script, it's a very simple script for anglerfish on my main. I'd appreciate any feedback! public final class Angler extends Script { private final MouseTrail trail = new MouseTrail(0, 255, 255, 2000, this); private final MouseCursor cursor = new MouseCursor(52, 4, Color.white, this); private final Area fishingArea = new Area(1819,3765, 1840, 3780); @Override public final int onLoop() throws InterruptedException { if(!doingSomething()) { if(inventoryFull()) { if(Banks.PISCARILIUS_HOUSE.contains(myPosition())) { bank(); } else { getWalking().webWalk(Banks.PISCARILIUS_HOUSE); } } else { if(hasCorrectEquipment()) { if(fishingArea.contains(myPosition())) { fish(); } else { getWalking().webWalk(fishingArea); } } else { throw new InterruptedException("Please retry with bait and rod in inventory."); //Better exception? } } } return random(250,600); } @Override public void onPaint(Graphics2D g) { trail.paint(g); cursor.paint(g); } private void bank() throws InterruptedException { Bank bank = getBank(); if (bank != null && bank.open()) { bank.depositAll("Raw anglerfish"); if(getInventory().contains("Open fish barrel")) { getInventory().getItem("Open fish barrel").interact("Empty"); } bank.close(); } } private void fish() { Entity fishingSpot = getNpcs().singleFilter(getNpcs().getAll(), e -> e.getName().startsWith("Rod")); if (fishingSpot != null) { fishingSpot.interact("Bait"); } } private boolean doingSomething() { return myPlayer().isAnimating() || myPlayer().isMoving(); } private boolean inventoryFull() { return getInventory().getEmptySlots() == 0; } private boolean hasCorrectEquipment() { return getInventory().contains("Sandworms") && getInventory().contains("Fishing rod"); } } I did have a couple of basic questions as well if you still have time after reviewing the code. Why is anglerfish spot an NPC? What is more 'human-like', always interacting with the closest fishing spot? Or doing what I did in fish() and just getting one that matches? What exception to throw when user starts without correct inventory? Cleaner onLoop() implementation ideas? This bot is very simple but I already hate the amount of if..else... nested everywhere, Maybe a list of objects with "shouldRun()" and "run()"?

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.