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.

exuals

Trade With Caution
  • Joined

  • Last visited

  1. Thanks, my IDE does it automatically when I refactor const's though.
  2. It's intentional, otherwise it'd attack a monster and immediately attempt to attack another when you're in combat. It's an example to demonstrate how to do the right click next monster for max efficiency shit.
  3. Since there is a tutorial for the legacy I figured I'd throw up what I've been using to develop OSB2 scripts. So, before I copy and paste code, an event is similar to a 'node' with the addition of useful features such as; EventMode EventStatus EventMode determines when to run the code in the event. With concurrency changes in OSB2 you can run events in 'ASYNC' mode, AKA another thread that runs this event in sync with another already running event. For example say you have an autofighter, you can start a new event in async mode that checks prayer points and when low; drinks a dose of prayer restore. You can also set an event to run in BLOCKING mode, simply stating that when the current event is finished, run this one next. EventStatus determines what the event is currently doing, this is useful for managing multiple events. EventStatus can be: Queued Working Finished Failed Back to the autofighter example, some of the events could be: AttackMonster, this can be run in BLOCKING mode as we don't want to fight multiple monsters. When this event is executed, if there is another event currently running, it will be queued. When this event is Working it will be in combat with a monster, when the event is Finished, the monster should be dead and Failed would be if the monster is unable to be killed or killed us. This is incredibly useful as there is functionality to run code while event is queued, hence, if you queued an AttackMonster event it could right click the monster and wait for the current to be killed. EatFood, this would be run in ASYNC mode as we want to eat when we are low and not wait for the current event to finish. EatFood can be queued to indicate that you want to eat 3 or 4 pieces of food in a row. When the event is finished, determine that our health increased to complete the event. Now, our core script class: import java.awt.Graphics2D; import java.util.ArrayList; import org.osbot.script.Script; import org.osbot.script.event.Event; import Events.EventTest; public class TestScript extends Script { private ArrayList<Event> allEvents = new ArrayList<Event>(); @Override public int onLoop() throws InterruptedException { for (Event e : allEvents) { execute(e); } return 1000; } @Override public void onStart() throws InterruptedException { allEvents.add(new EventTest()); super.onStart(); } } Looks similar to the node framework right? Simple enough to read, we have an ArrayList of all of our events , onStart we add what events we want to use. During the onLoop for this example we simply execute all of the events in the arraylist. Note: If you have events that run in async make sure to place them before non async events when adding to the arraylist. And here is an example event: package Events; import org.osbot.legacy.script.MethodProvider; import org.osbot.rs07.api.model.NPC; import org.osbot.script.event.Event; public class FishSharks extends Event { private static final String FISHING = "Fishing"; private static final String HARPOON = "Harpoon"; private static final int _618 = 618; private static final int _2906 = 2906; @Override public int execute() throws InterruptedException { if (inventory.isFull()) setFinished(); if (!(myPlayer().getAnimation() == _618)) startFishing(); return 0; } private void startFishing() throws InterruptedException { NPC fishingspot = npcs.closest(_2906); if (fishingspot.exists()) { camera.toEntity(fishingspot); fishingspot.interact(HARPOON); sleep(MethodProvider.gRandom(1000, 200)); } } @Override public String toString() { return FISHING; } } This event simply catches sharks if it is not animating. Since the event hasn't stated a EventMode it is automatically set to BLOCKING. Here is an example of a ASYNC event; package Events; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.api.ui.Spell; import org.osbot.script.MethodProvider; import org.osbot.script.event.Event; public class AntiBan extends Event { private static final String ANTIBAN = "Antiban"; public AntiBan() { setAsync(); } @Override public int execute() throws InterruptedException { antiBan(); return 0; } private void antiBan() throws IllegalArgumentException, InterruptedException { int rand = MethodProvider.random(0, 4); switch (rand) { case 0: antiBan.hoverSkill(Skill.FISHING); break; case 1: antiBan.hoverSpell(Spell.HOME_TELEPORT); break; case 2: antiBan.moveMouseOutsideScreen(); break; case 3: camera.movePitch(99); break; } sleep(MethodProvider.gRandom(6000, 6000)); } @Override public String toString() { return ANTIBAN; } } Because this Event is run in ASYNC (Notice we set this in the constructor) the antiban will run concurrently with the other two events. And finally, the core of this example fishing script: import java.awt.Color; import java.awt.Graphics2D; import java.util.ArrayList; import java.util.Collections; import org.osbot.script.Script; import org.osbot.script.ScriptManifest; import org.osbot.script.event.Event; import Events.AntiBan; import Events.BankSharks; import Events.FishSharks; @ScriptManifest(author = "exuals", info = "I don't even", logo = "what", name = "exFishy", version = 0) public class exSharksAPI2 extends Script { private ArrayList<Event> allEvents = new ArrayList<Event>(); @Override public int onLoop() throws InterruptedException { for (Event e : allEvents) { execute(e); } return 1000; } @Override public void onPaint(Graphics2D arg0) { super.onPaint(arg0); int x, y, width, height; x = 20; y = 50; width = 100; height = 25; for (Event e : allEvents) { if (e.isWorking()) { arg0.setColor(Color.green); arg0.fillRect(x, y, width, height); } else if (e.isQueued()) { arg0.setColor(Color.yellow); arg0.fillRect(x, y, width, height); } else if (e.hasFailed()) { arg0.setColor(Color.red); arg0.fillRect(x, y, width, height); } arg0.setColor(Color.white); arg0.drawRect(x, y, width, height); arg0.setColor(Color.black); arg0.drawString(e.toString(), x + 15, y + 17); y += 30; } } @Override public void onStart() throws InterruptedException { Collections.addAll(allEvents, new AntiBan(), new FishSharks(), new BankSharks()); super.onStart(); } }
  4. Bought a bond, went first, super helpful and nice. Thanks
  5. exuals replied to exuals's topic in Projects
    I wrote a NMZ bot in 4 hours, shouldn't be a problem, logic is easy. Just gotta type haha.
  6. exuals posted a topic in Projects
    Broke from staking and need to make dosh. Going to write a quick GDK bot with some customization for my account (Ancient teleporting & Looting bag). I'll post progress in a list as I go along, if anyone would like to contribute or collab, shoot me a PM. Aiming to be finished by tomorrow, midnight at the latest. Completed: Starting items withdrawn from bank from hashmap Looting bag API (Deposits) Teleport to Graveyard Attack Green Dragon Eat Food Open Bank In Progress: Looting bag API (Withdraw, bank)
  7. exuals replied to Parameter's topic in Projects
    If you'd like my old source I can probably dig it up for you.
  8. Looking for a hearthstone beta key, offering a Gold 1 League of Legends account with numerous skins or a Nether beta access account. Skype: scottygmostdope
  9. As a script writer who wrote the asynchronous tasking for a previous script, did you use a queue with an Overridden peek to determine where to place the mouse? That was my method, was incredibly efficient, would highly recommend. Also, could we see a script to check out the new API?
  10. exuals posted a topic in Archive
    I was recently kicked & banned from the Chat for telling the user "Cortana" to "Fuck off" Now, I'm curious. This isn't allowed because I swore? Or insulted you're little e-whore? Either way this is ridiculous, this is an internet community, a public way to express opinions. If I have a negative opinion of another user I'll state it as I expect them to state it to me, when in discussion. Cortana corrected my context of "you're/your", I told her to fuck off and was kicked. I rejoined the chat and then was banned after attempting to argue (without using "language") my side of how idiotic it is to censor language in a fucking chatroom. I can name multiple users on a daily basis who swear in that chatroom with moderator presence, anyone here know of a "Smoke Crack"? He's nothing but an idiot and annoying troll that swears and tells new users to delete system32, don't worry, you can still find him in the chatroom, but not I. Get you're shit together, censoring language in a public internet chatroom? Get real. Embarrassing to be a part of this community.
  11. As someone who is literally high everyday, all day... I hope they don't, I'd have to pay through the roof at a dispensary and my dealer gives me such nice deals.
  12. My Nightmare Zone bot can reach 125k/exp an hour and will run forever. Released on SDN soon.
  13. 25 sitting on 25 mill.
  14. The item rewards are so stable, doubt it'll ever happen.

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.