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.

Jeef_

Members
  • Joined

  • Last visited

  1. Oh I remember your name, you made the Macro Killer I believe. So I changed up a few things. public enum State { WALK, BANK, KILL, WAIT, IDLE; } public State getState() { NPC cow = getNpcs().closest("Cow", "Cow calf"); if (cow != null && cow.exists() && cow.isAttackable() && !myPlayer().isUnderAttack()) { //KILLING COWS return State.KILL; } if (myPlayer().isAnimating()) { // PROGRESS KILLING COWS return State.WAIT; } return State.IDLE; public int onLoop() throws InterruptedException { NPC cow = getNpcs().closest("Cow", "Cow calf"); switch (getState()) { case KILL: if (myPlayer().isAnimating()) { lastAnimation = System.currentTimeMillis(); } else if (System.currentTimeMillis() > (lastAnimation + 2500)) { if (cow.interact("Attack")) { Timing.waitCondition(() -> myPlayer().isUnderAttack(), random(2000, 3000)); } } break; case WAIT: sleep (random(500,900)); break; } return 0; } Just showed what I thought would be important. My Logic behind this, and please correct me if I'm wrong - which I'm sure I am. If an Attackable Cow is there, It'll return State.KILL That cow becomes the target and then Player interacts "Attack ". Player is now underattack so it won't return State.Kill, but State.WAIT After Cow is dead It'll search for a new cow and cycle repeats. I thought it would work like this but there are multiple issues I'm having. Having performance issues where once the script is on, the client will be really laggy, sometimes to the point where I have to open task manager to even close the client. Takes forever for me to even attack a Cow in the first place Sometimes would spam click on the cow.
  2. I moved it to the onLoop(), but I also had to add it in my getState(). Is it supposed to be like that? Because it seems redundant.
  3. Okay, So this is my second Script. First one is a simple Shrimp catcher at and it does the basic it fishes and drops. Trying to make a combat script that loots and banks but I don't understand why my code doesn't even start up, Literally does nothing. import java.util.Objects; import org.osbot.rs07.api.GroundItems; import org.osbot.rs07.api.Inventory; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Jeef_", info = "Kills Cows and Banks", name = "CowKiller", version = 0, logo = "") public class main extends Script{ Area Cowpen = new Area(3253, 3255, 3265, 3296).setPlane(0); Area lumbank = new Area(3208, 3218, 3210, 3220).setPlane(2); NPC cow = getNpcs().closest("Cow", "Cow calf"); public void onStart() { } public enum State { WALK, BANK, KILL, WAIT; } public State getState() { if (getInventory().isFull()) { // FULL COWHIDE return State.BANK; } if (!Cowpen.contains(myPlayer())) { // IF I'M NOT AT THE COWPEN return State.WALK; } if (cow != null && cow.exists() && cow.isAttackable() && !inventory.isFull()) { //KILLING COWS return State.KILL; } if (myPlayer().isAnimating()) { // PROGRESS KILLING COWS return State.WAIT; } return null; } @Override public int onLoop() throws InterruptedException { switch (getState()) { case BANK: RS2Object banker = getObjects().closest("Bank booth"); if (getWalking().webWalk(lumbank)) { if (banker != null) { if (banker.interact("Bank")) { if (bank.isOpen()) { if (bank.depositAll()) { Timing.waitCondition(() -> inventory.isEmpty(), random (2000, 5000)); } } } } } break; case WALK: if (getWalking().webWalk(Cowpen)) { Timing.waitCondition(() -> Cowpen.contains(myPlayer()), random(2000, 5000)); } break; case KILL: GroundItem hide = getGroundItems().closest("Cowhide"); if (cow.interact("Attack")) { Timing.waitCondition(() -> myPlayer().isUnderAttack() || myPlayer().isAnimating(), random(2000, 3000)); if (!inventory.isFull()) { hide.interact("Take"); sleep (random(500,900)); } } break; case WAIT: sleep (random(500, 900)); break; } return 0; } }

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.