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.

Snowydell

Members
  • Joined

  • Last visited

Everything posted by Snowydell

  1. import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.Area; import java.awt.*; @ScriptManifest(author = "Tyler", info = "Start in Lumbridg Cow Pen", name = "Cow Killer", version = 0, logo = "") public class CowKiller extends Script { //Declare Variables Area COW_AREA = new Area(3265, 3298, 3253, 3255); Area BANK_AREA = new Area(3207, 3222, 3210, 3216); Area STAIRS_AREA = new Area(3203, 3206, 3207, 3210); NPC cow = npcs.closest("Cow","Cow calf"); //WALK FROM COW PEN TO STAIRS private Position[] PATH_PEN_TO_STAIRS = { new Position(3255, 3267, 0), new Position(3250, 3260, 0), new Position(3252, 3253, 0), new Position(3256, 3247, 0), new Position(3259, 3241, 0), new Position(3259, 3233, 0), new Position(3255, 3227, 0), new Position(3249, 3226, 0), new Position(3243, 3225, 0), new Position(3235, 3220, 0), new Position(3225, 3218, 0), new Position(3218, 3218, 0), new Position(3215, 3213, 0), new Position(3206, 3209, 0) }; //WALK FROM STAIRS TO BANK private Position[] PATH_STAIRS_TO_BANK = { new Position(3206, 3215, 2), new Position(3208, 3220, 2), }; //WALK FROM BANK TO STAIRS private Position[] PATH_BANK_TO_STAIRS = { new Position(3205, 3216, 2), new Position(3205, 3209, 2), }; //WALK FROM STAIRS TO PEN private Position[] PATH_STAIRS_TO_PEN = { new Position(3206, 3209, 0), new Position(3215, 3213, 0), new Position(3218, 3218, 0), new Position(3225, 3218, 0), new Position(3235, 3220, 0), new Position(3243, 3225, 0), new Position(3249, 3226, 0), new Position(3255, 3227, 0), new Position(3259, 3233, 0), new Position(3259, 3241, 0), new Position(3256, 3247, 0), new Position(3252, 3253, 0), new Position(3250, 3260, 0), new Position(3255, 3267, 0), }; //OnStart public void onStart() { log("Welcome to my Cow Killer!"); log("Enjoy the script!"); } //Declare State private enum State { ATTACK, WALK_TO_STAIRS_FROM_PEN, GO_UPSTAIRS1, GO_UPSTAIRS2, WALK_TO_BANK, WALK_TO_STAIRS_FROM_BANK, GO_DOWNSTAIRS1, GO_DOWNSTAIRS2, WALK_TO_PEN, BANK, WAIT, } //Finds State private State getState() { //ATTACKS if(!inventory.isFull() && COW_AREA.contains(myPlayer()) && !myPlayer().isUnderAttack() && !cow.isUnderAttack() && cow != null) { return State.ATTACK; } //WALK FROM COW PEN TO STAIRS if(inventory.isFull() && COW_AREA.contains(myPlayer())) { return State.WALK_TO_STAIRS_FROM_PEN; } //GOES UP FIRST SET OF STAIRS if(myPosition().getZ() == 0 && STAIRS_AREA.contains(myPlayer()) && inventory.isFull()) { return State.GO_UPSTAIRS1; } //GOES UP SECOND SET OF STAIRS if(myPosition().getZ() == 1 && STAIRS_AREA.contains(myPlayer()) && inventory.isFull()) { return State.GO_UPSTAIRS2; } //WALKS FROM STAIRS TO BANK if(myPosition().getZ() == 2 && STAIRS_AREA.contains(myPlayer()) && inventory.isFull()) { return State.WALK_TO_BANK; } //BANKS ITEMS if(myPosition().getZ() == 2 && BANK_AREA.contains(myPlayer()) && inventory.isFull()) { return State.BANK; } //WALKS FROM BANK BACK TO STAIRS if(myPosition().getZ() == 2 && BANK_AREA.contains(myPlayer()) && inventory.isEmpty()) { return State.WALK_TO_STAIRS_FROM_BANK; } //GOES DOWN STAIRS TO REACH SECOND FLOOR if(myPosition().getZ() == 2 && STAIRS_AREA.contains(myPlayer()) && inventory.isEmpty()) { return State.GO_DOWNSTAIRS1; } //GOES DOWN STAIRS TO REACH FIRST FLOOR if(myPosition().getZ() == 1 && STAIRS_AREA.contains(myPlayer()) && inventory.isEmpty()) { return State.GO_DOWNSTAIRS2; } //WALKS FROM LUMBRIDGE CASTLE TO COW PEN if(myPosition().getZ() == 0 && STAIRS_AREA.contains(myPlayer()) && inventory.isEmpty()) { return State.WALK_TO_PEN; } return State.WAIT; } //Executes State public int onLoop() throws InterruptedException { switch (getState()) { //ATTACKING case ATTACK: cow = npcs.closest("Cow","Cow calf"); cow.interact("Attack"); break; //WALKS FROM COW PEN TO STAIRS case WALK_TO_STAIRS_FROM_PEN: localWalker.walkPath(PATH_PEN_TO_STAIRS); break; //GOES UP FIRST SET OF STAIRS case GO_UPSTAIRS1: objects.closest("Staircase").interact("Climb-up"); sleep(random(300, 500)); break; //GOES UP SECOND SET OF STAIRS case GO_UPSTAIRS2: objects.closest("Staircase").interact("Climb-up"); sleep(random(300, 500)); break; //WALKS FROM STAIRS TO BANK case WALK_TO_BANK: localWalker.walkPath(PATH_STAIRS_TO_BANK); sleep(random(300, 500)); break; //BANKS ITEMS case BANK: bank.open(); sleep(random(450, 500)); bank.depositAll(); sleep(random(300, 500)); bank.close(); break; //WALKS FROM BANK BACK TO STAIRS case WALK_TO_STAIRS_FROM_BANK: localWalker.walkPath(PATH_BANK_TO_STAIRS); sleep(random(300, 500)); break; //GOES DOWN STAIRS TO REACH SECOND FLOOR case GO_DOWNSTAIRS1: objects.closest("Staircase").interact("Climb-down"); sleep(random(300, 500)); break; //GOES DOWN STAIRS TO REACH FIRST FLOOR case GO_DOWNSTAIRS2: objects.closest("Staircase").interact("Climb-down"); sleep(random(300, 500)); break; //WALKS FROM LUMBRIDGE CASTLE TO COW PEN case WALK_TO_PEN: localWalker.walkPath(PATH_STAIRS_TO_PEN); sleep(random(300, 500)); break; //WAIT case WAIT: sleep(random(500, 700)); break; } return random(200, 300); } //On Exit public void onExit() { log("Thanks for running Oak Cutter!"); } public void onPaint(Graphics2D g) { } }
  2. When I try to run it nothing happens and the screen is still clickable too
  3. Thansk guys, ill try that Divinity and yeah it would be loaded Botre
  4. If a position is out of range on the minimap and screen will it still go to it?
  5. Never knew that was a command thanks for that
  6. So this is my script now fire.interact("Use"); sleep(500); if (getInterfaces().getChild(548, 127).isVisible()) { getInterfaces().getChild(307, 2).interact("Cook All"); } It's for the cooking interface on a fire but I just can't get it to work.
  7. Hm let me try that thanks
  8. Learn some Java first then go to the tutorial section and use one of the tutorials as a base. You could learn the basics of Java in less than a week. Also, it looks confusing because of the way I copy and pasted it so the format is messed up, hard to read
  9. Thank you, I did it
  10. Sorry to ask but how do I do that? Edit: might have figured it out let me see. Nervermind i'm lost, can someone help me please
  11. Basically at shrimps there is an npc that blocks a fishing spot. How would I make the bot if it clicked on the spot and realized it couldnot walk there go to a different spot or make it so it never clicks on that spot at all. I believe I would need to do an area maybe but idk. Also i'm making this bot for fun not to actually level with btw.
  12. Ah I see, thanks for the answers
  13. Yeah that was it, thank you for the answer , what is task based if it's not to hard to explain. Also does anyone know why my character drops fish slow then stands around for 10 seconds doing nothing until it starts to fish again?
  14. Ok so here's the part of the code I need help on. private State getState() { if(!myPlayer().isAnimating() && !inventory.isFull()) { return State.FISH; } if(inventory.isFull()) { return State.DROP; } return State.WAIT; } public int onLoop() throws InterruptedException { switch (getState()) { case FISH: NPC fishingspot = npcs.closest("Fishing Spot"); fishingspot.interact("Net"); break; case DROP: if(inventory.isFull()) { inventory.dropAllExcept("Small fishing net"); } break; My first question is if it benefits or does the same thing if I put the if statement in the case. As seen in the drop case or can I just leave it out and it will execute the same way since it already declared it needed to drop. Second question is for some reason my player drops the fish fairly slow then after it's all dropped stands around for 10 seconds then goes back to fishing, any fix for these? Thanks

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.