Skip 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.

Alek

Ex-Staff
  • Joined

  • Last visited

Everything posted by Alek

  1. Alek replied to Alek's topic in Releases
    Yes, this will be fixed for .61. Thank you.
  2. Alek replied to Alek's topic in Releases
    No, its still on the todo list. The bug fixes were more along improvements; for instance the default widget closing searches only for widgets in the main game screen clip, etc.
  3. Alek posted a topic in Releases
    bug fixes and web walking changes
  4. Alek replied to Birdaking's topic in Spam/Off Topic
    This is my cat:
  5. Without using web walking (not accurate if you have banks close to each other): banks.sort(new Comparator<Area>() { public int compare(Area bank1, Area bank2) { return bank1.getRandomPosition().distance(myPosition()) - bank2.getRandomPosition().distance(myPosition()); } }); First index in the collection will be to your closest position, last would be furthest.
  6. I normally don't write like that but it's nice if it's a one-class script, really logical and easy on the eyes.
  7. Runs multiple games for me; I have 19 tickets in one run so far.
  8. You also get updates automatically if I make any.
  9. Originally I wanted to do that or make a Catapult Sniper; it would grab a list of players, adjust coordinates, and fire. Not enough time though, have to get back to some of my real work now.
  10. Haven't seen a Castle Wars script on either here or a competitor bot. This is something I wrote up real quick; you could just AFK outside the spawn room but I added some basic logic to prevent some reports. Features: -Waits for game -Grabs bandages, finds enemies, attacks people -Leaves spawn zone, walks to high-traffic areas This is an open-source script, written so its easy to understand for some of you newer guys. If you are a VIP+ member you get the convenience of the script being on the SDN. Source: import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.NPC; import org.osbot.rs07.api.model.Player; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.api.util.GraphicUtilities; import org.osbot.rs07.api.util.LocalPathFinder; import org.osbot.rs07.event.InteractionEvent; import org.osbot.rs07.script.MethodProvider; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; import java.util.Collection; import java.util.LinkedList; import java.util.Optional; import java.util.stream.Collectors; /** * Created by Alek on 5/8/2016. */ @ScriptManifest(name = "Castle Wars", author = "Alek", version = 1.0, info = "Castle Wars Script", logo = "") public class CastleWars extends Script { ScriptState scriptState = ScriptState.PENDING; private Team myTeam = null; private Player enemyPlayer = null; private final Area ZAMORAK_SPAWN_ROOM = new Area(2368, 3127, 2376, 3135).setPlane(1); private final Area SARADOMIN_SPAWN_ROOM = new Area(2423, 3072, 2431, 3080).setPlane(1); private final Area ZAMORAK_WAITING_ROOM = new Area(2403, 9510, 2437, 9543); private final Area SARADOMIN_WAITING_ROOM = new Area(2363, 9478, 2394, 9502); private final Area SARADOMIN_SPAWN_AREA = new Area(2420, 3072, 2431, 3083).setPlane(1); private final Area ZAMORAK_SPAWN_AREA = new Area(2368, 3124, 2379, 3135).setPlane(1); private final Position ZAMORAK_STAIRS_DOWN = new Position(2380, 3127, 1); private final Position SARADOMIN_STAIRS_DOWN = new Position(2419, 3080, 1); private final Position ZAMORAK_LADDER_DOWN = new Position(2378, 3134, 1); private final Position SARADOMIN_LADDER_DOWN = new Position(2421, 3073, 1); private final Position ZAMORAK_BARRIER = new Position(2377, 3131, 1); private final Position SARADOMIN_BARRIER = new Position(2422, 3076, 1); private final Position CENTER_ISLAND = new Position(2400, 3104, 0); private final Position ZAMORAK_CASTLE_FRONT = new Position(2387, 3115, 0); private final Position SARADOMIN_CASTLE_FRONT = new Position(2411, 3092, 0); private enum Team { SARADOMIN(1), ZAMORAK(2); int teamId; Team(int teamId) { this.teamId = teamId; } int getTeamId() { return teamId; } } private enum ScriptState {FIND_PORTAL, WAIT_FOR_GAME, GRAB_SUPPLIES, LEAVE_SPAWN, FIND_OPPONENT, FIGHT_OPPONENT, PENDING} @Override public void onPaint(Graphics2D g) { g.setColor(Color.WHITE); g.drawString(scriptState.name(), 10, 120); } @Override public int onLoop() { scriptState = getScriptState(); switch (scriptState) { case FIND_PORTAL: myTeam = null; Optional<RS2Object> optionalPortal = getObjects().getAll().stream().filter(o -> o.getName().equals("Guthix Portal")).findFirst(); if (optionalPortal.isPresent()) { if (optionalPortal.get().interact("Enter")) { new ConditionalSleep(5000, 500) { @Override public boolean condition() throws InterruptedException { return SARADOMIN_WAITING_ROOM.contains(myPlayer()) || ZAMORAK_WAITING_ROOM.contains(myPlayer()); } }.sleep(); } } else { log("Please start the script in Castle Wars!"); stop(false); } break; case WAIT_FOR_GAME: if (getDialogues().isPendingOption()) { getDialogues().selectOption("Yes please!"); } else if (myPlayer().getArea(2).getRandomPosition().interact(getBot(), "Walk here")) { getMouse().moveOutsideScreen(); new ConditionalSleep(MethodProvider.random(30000, 60000), 3000) { @Override public boolean condition() throws InterruptedException { return getDialogues().isPendingOption() || (SARADOMIN_SPAWN_ROOM.contains(myPosition()) || ZAMORAK_SPAWN_ROOM.contains(myPosition())); } }.sleep(); } break; case GRAB_SUPPLIES: Optional<RS2Object> optionalTable = getObjects().getAll().stream().filter(o -> o.getName().equals("Table") && (ZAMORAK_SPAWN_ROOM.contains(o) || SARADOMIN_SPAWN_ROOM.contains(o))).findFirst(); if (optionalTable.isPresent()) { for (int i = 0; i < MethodProvider.random(1, 5); i++) { if (optionalTable.get().interact("Take-5")) { final int slots = getInventory().getEmptySlots(); new ConditionalSleep(5000, 500) { @Override public boolean condition() throws InterruptedException { return slots != getInventory().getEmptySlots(); } }.sleep(); } } } break; case LEAVE_SPAWN: boolean successfullyLeftSpawnArea = false; if (SARADOMIN_SPAWN_ROOM.contains(myPosition()) || ZAMORAK_SPAWN_ROOM.contains(myPosition())) { Optional<RS2Object> optionalBarrier; if (getMyTeam().equals(Team.ZAMORAK)) optionalBarrier = getObjects().getAll().stream().filter(o -> o.getPosition().equals(ZAMORAK_BARRIER)).findFirst(); else optionalBarrier = getObjects().getAll().stream().filter(o -> o.getPosition().equals(SARADOMIN_BARRIER)).findFirst(); if (optionalBarrier.isPresent()) { if (optionalBarrier.get().interact("Pass")) { new ConditionalSleep(5000, 500) { @Override public boolean condition() throws InterruptedException { return !SARADOMIN_SPAWN_ROOM.contains(myPosition()) && !ZAMORAK_SPAWN_ROOM.contains(myPosition()); } }.sleep(); } } } else { Optional<RS2Object> optionalStairs; if (getMyTeam().equals(Team.ZAMORAK)) optionalStairs = getObjects().getAll().stream().filter(o -> o.getPosition().equals(ZAMORAK_STAIRS_DOWN)).findFirst(); else optionalStairs = getObjects().getAll().stream().filter(o -> o.getPosition().equals(SARADOMIN_STAIRS_DOWN)).findFirst(); if (optionalStairs.isPresent()) { if (!isPathBlocked(optionalStairs.get())) { if (optionalStairs.get().interact("Climb")) { successfullyLeftSpawnArea = true; new ConditionalSleep(5000, 500) { @Override public boolean condition() throws InterruptedException { return myPosition().getZ() == 0; } }.sleep(); } } else { Optional<RS2Object> optionalLadder; if (getMyTeam().equals(Team.ZAMORAK)) optionalLadder = getObjects().getAll().stream().filter(o -> o.getPosition().equals(ZAMORAK_LADDER_DOWN)).findFirst(); else optionalLadder = getObjects().getAll().stream().filter(o -> o.getPosition().equals(SARADOMIN_LADDER_DOWN)).findFirst(); if (optionalLadder.isPresent()) { if (!isPathBlocked(optionalLadder.get())) { if (optionalLadder.get().interact("Climb-down")) { successfullyLeftSpawnArea = true; new ConditionalSleep(5000, 500) { @Override public boolean condition() throws InterruptedException { return myPosition().getZ() == 0; } }.sleep(); } } else { NPC barricade = getNpcs().closest("Barricade"); if (barricade != null) { if (barricade.interact("Attack")) { new ConditionalSleep(5000, 500) { @Override public boolean condition() throws InterruptedException { return !barricade.exists(); } }.sleep(); } } } } } } if (successfullyLeftSpawnArea) { switch (MethodProvider.random(0, 2)) { case 1: getWalking().webWalk(CENTER_ISLAND); break; case 2: if (getMyTeam().equals(Team.ZAMORAK)) getWalking().webWalk(ZAMORAK_CASTLE_FRONT); else getWalking().webWalk(SARADOMIN_CASTLE_FRONT); break; } } } break; case FIND_OPPONENT: Collection<Player> enemies = getPlayers().getAll().stream().filter(p -> p.getTeam() != getMyTeam().getTeamId()).collect(Collectors.toList()); if (!enemies.isEmpty()) { for (Player enemy : enemies) { Rectangle enemyBounds = GraphicUtilities.getModelBoundingBox(getBot(), enemy.getGridX(), enemy.getGridY(), enemy.getZ(), enemy.getModel()); if (getMap().canReach(enemy)) { if (enemyBounds.intersects(GraphicUtilities.MAIN_SCREEN_CLIP)) { InteractionEvent event = new InteractionEvent(enemy, "Attack").setWalkTo(false); execute(event); if (event.hasFinished()) { enemyPlayer = enemy; break; } } else if (MethodProvider.random(0, 1) == 1) { getWalking().walk(enemy); break; } } } } break; case FIGHT_OPPONENT: if (enemyPlayer.exists()) { if (myPlayer().isInteracting(enemyPlayer)) { if (getInventory().contains("Bandages") && (getSkills().getStatic(Skill.HITPOINTS) - getSkills().getDynamic(Skill.HITPOINTS) > 10)) getInventory().getItem("Bandages").interact("Heal"); new ConditionalSleep(MethodProvider.random(2000, 5000), 500) { @Override public boolean condition() throws InterruptedException { return enemyPlayer.exists(); } }.sleep(); } else if (getMap().canReach(enemyPlayer)) { enemyPlayer.interact("Attack"); } else { enemyPlayer = null; } } else { enemyPlayer = null; } break; } return 1000; } private ScriptState getScriptState() { if (getConfigs().get(1021) == 0) return ScriptState.FIND_PORTAL; if (ZAMORAK_WAITING_ROOM.contains(myPlayer()) || SARADOMIN_WAITING_ROOM.contains(myPlayer())) return ScriptState.WAIT_FOR_GAME; if (SARADOMIN_SPAWN_AREA.contains(myPlayer()) || ZAMORAK_SPAWN_AREA.contains(myPlayer())) if (!getInventory().contains("Bandages")) return ScriptState.GRAB_SUPPLIES; else return ScriptState.LEAVE_SPAWN; if (enemyPlayer == null) return ScriptState.FIND_OPPONENT; return ScriptState.FIGHT_OPPONENT; } private Team getMyTeam() { if (myTeam == null) myTeam = myPlayer().getTeam() == 1 ? Team.SARADOMIN : Team.ZAMORAK; return myTeam; } private boolean isPathBlocked(Entity entity) { LocalPathFinder pf = new LocalPathFinder(bot); LinkedList<Position> path = pf.findPath(entity); if (pf.foundPath()) { Collection<NPC> barricades = getNpcs().getAll().stream().filter(o -> o.getName().equals("Barricade")).collect(Collectors.toList()); for (Position position : path) for (NPC barricade : barricades) if (barricade.getPosition().equals(position)) return true; return false; } return true; } }
  11. In spirit of Frog Friday, we have a weekend release for all to enjoy. Finally got around to patching some logic which has been driving me crazy for about a year, Bank depositAllExcept. If your inventory did not have the specified item in the call, it would still individually deposit each item instead of clicking the "Deposit All" button. Other than that debugging should work again and scripters should be pleased with the new getDirectoryData() method. Example: new File(getDirectoryData()+getName()+File.separator+"info.txt"); Additionally the ScriptAnalyzer has now been disabled; I've gathered enough information from local scripts to being developing a server-sided solution. Changelog: -Patched debugging, see the "FAQ" for more information on arg flags -Improved Bank logic -Added Inventory getEmptySlotCount() -Added Script getDirectoryData() -Disabled local ScriptAnalyzer -The OSBot Staff
  12. The Walking class is just "front-end" API. It still calls the respective events (WalkingEvent and WebWalkEvent). If you're walking a short to moderate distance, WalkingEvent with a pre-defined works great. If you're walking medium to long distances, you may want to consider WebWalkEvent. If you're walking within the loaded region use WalkingEvent with just a position as the destinion; a path will be automatically created for you.
  13. The order you add it, not adding sorting.
  14. Tell your cousin to run the script on his computer.
  15. Just reinforcement of witchcraft and bullshit anti-ban. switch(random(0,107)) { case 11: case 21: moveMouseRandomly(); break; case 62: moveCameraRandomly(); case 63: case 77: checkCraftingLevel(); } Happy?
  16. So if a legit player drops horizontally, he will be falsely banned for botting? ...
  17. Decided to ditch the same old boring interfaces and go with something edgy. The script does all the setup for you; all you need to do is click on a tree. This is a new update changes a lot to the script, what do you guys think of the new interface system?
  18. Which scripts can you not use?
  19. It was added a few updates ago, this version only changed widget debugger and command line args.
  20. It was added a few updates ago in the dev build, not this version.
  21. File permissions were not touched in this version.
  22. Scripters have had ample time during the dev builds to update their scripts. If you're using a local/private script, best to ask your script writer.
  23. Just a few small updates before we move onto another stable release. 1. Widget Debugger A few releases ago I discussed a bit about combining Inv/Stack. Often times you will come across a widget which is a container; so if their lengths match it would make sense to combine them so you can quickly figure out the structure. As an example, I took a screenshot of debugging the bank: So instead of having 1656 fields to sort through, we only have 828 (the size of each array). widget.getInv()[11] == 995 //Coins id widget.getInvStackSizes()[11] == 3170501 //Amount of coins Hopefully scripters find this a bit easier. 2. Command Line arguments Probably one of the most requested features is a way to start the client and scripts by command line. No, this update doesn't allow you to do that yet however I've started some of the development on it. In the meantime the following arguments now exist: -mem <amount> // The amount of memory allocated in megabytes -debug <port> //Starts OSBot in debug mode, use port 5005 if you're unsure which port to use -data <value> //Allows OSBot to collect data used for bot detection analysis; 1 = true Happy Botting -The OSBot Staff
  24. An eloquently designed masterpiece which takes a subtle warm yellow to portray a new account seeing the first kiss of sunlight on Tutorial Island. Retail Price: $495 Here we see what many call "Bob". In the busy streets of Lumbridge you may seemingly walk past such characters, but do you really know their stories? Retail price: $600 Who are we? As a human race we often get lost in the struggle for materialistic goods. Reduced to just simple pixels, we are guided through Tutorial Island as a journey into our true selves. Retail price: $570
  25. You didn't show your code.

Account

Navigation

Search

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.