Leaderboard
Popular Content
Showing content with the highest reputation on 07/27/17 in Posts
-
16 points
-
This was the first script I created for OSBot, I have seen many people make / try to make this script, so I figured why not open source mine so that people could learn from it, or use it Source: https://github.com/Explv/Tutorial-Island Jar File: https://github.com/Explv/Tutorial-Island/releases12 points
-
9 points
-
NEW! Added Gemstone Crab! 81 Hours at Cows Brutal Black Dragon support Sulphur Nagua support Blue Dragon 99 ranged 99 Ranged at Gemstone Crab 81 Range F2p Safespotting Hill Giants Hotkey List // F1 = set cannon tile // F2 = hide paint // F3 = Set afk tile // F4 = reset afk tile // F6 = Set safespot tile // F7 = activate tile selector // F8 = Reset tile selector // F9 and F10 used by the client, EDIT: will re-assign as they are no longer used by client // F11 = Set breaks tile // F12 = Reset breaks tile User Interface Banking Tab Demo (handles everything with banking) You can copy inventory (to avoid adding individual items...), you can insert item names which have Auto-Fill (for you lazy folk!) and you can choose whether to block an item and avoid depositing it in bank, ideal for runes and ammo. Looting Tab Demo (From looting to alchemy, noted/stackable items too) You can choose whether to alch an item after looting it simply by enabling a checkbox, with a visual representation. All items are saved upon exiting the bot, for your convenience! Tasking Demo (Not to be confused with sequence mode, this is an individual task for leveling) You can set stop conditions, for example to stop the bot after looting a visage, you can have a leveling streak by changing attack styles and training all combat stats, you can have windows alert bubbles when an event occurs and an expansive layout for misc. options! Prayer Flick Demo (Just example, I made it faster after recording this GIF) There are two settings: Safe mode and efficient mode, this is safe mode: Fight Bounds Demo Allows you to setup the fight bounds easily! Simplified NPC chooser Either choose nearby (local) NPCs or enter an NPC name to find the nearest fight location! Simple interface, just click! Level Task Switch Demo (Switching to attack combat style after getting 5 defence) You can choose how often to keep levels together! e.g. switch styles every 3 levels Cannon Demo (Cannon is still experimental, beta mode!) Choose to kill npcs with a cannon, recharges at a random revolution after around 20-24 hits to make sure the cannon never goes empty too! Results Caged Ogres: How does this bot know where to find NPCs? This bot will find far-away npcs by simply typing the NPC name. All NPCs in the game, including their spawn points have been documented, the bot knows where they are. You can type 'Hill giant' while your account is in Lumbridge, and the bot will find it's way to the edgeville dungeon Hill giants area! Here is a visual representation of the spawn system in action (this is just a visual tool, map mode is not added due to it requiring too much CPU) Fight Area Example (How the bot searches for the npc 'Wolf') Walking System The script has 2 main walking options which have distinctive effects on the script. The walking system is basically a map with points and connections linking each point. It tells the script where to go, and decides the routes to take when walking to fightzones. Walking system 1 This uses a custom walking API written by myself and is constantly being updated as new fightzones are added. Pros: - Updates are instant, no waiting times - More fightzones are supported Cons: - Sometimes if an object is altered, the changes are not instant - Restarting the script too many times requires loading this webwalker each time which adds unnecessary memory (there is no way to make it only load at client startup since I don't control the client) Walking system 2 This is the default OSBot webwalking API - it is relatively new and very stable since the developers have built it, but is currently lacking certain fightzones (e.g. stronghold) and other high level requirement zones. It is perfect for normal walking (no object interactions or stairs, entrances etc) and never fails. Pros: - Stable, works perfect for normal walking - All scripters are giving code to improve the client webwalker - More efficient when restarting the script since it is loaded upon client start Cons: - No stronghold support yet - Some new/rare fightzones not supported yet - If there is a game-breaking update or an unsupported fightzone, it may take some time to add/repair (less than 24 hours usually) So which system should I choose? Whichever one suits your chosen fightzone best! There really shouldn't be any problems - the sole purpose of these options are for backup and emergency purposes, if the script ever messes up there is always the next option to select. Note: If the script ever fails, there will be immediate updates to fix the walking systems! Script Queue/Bot Manager: Script ID is 758, and the parameters will be the profile name that you saved in the fighter setup! Bug Report templates: New feature request - What is the new feature - Basic description of what the script should do - Basic actions for the script: 'Use item on item' etc. For when the script gets stuck on a tile (or continuous loop): - Which exact tile does the script get stuck on? (exact tile, not 'near the draynor village') - Plugin or normal script? - Did you try all 3 walking options? Script has a logic bug (e.g. dies while safespotting) or (cannon mode doesn't pickup arrows) - What is the bug - How did you make the bug happen - (optional) recommendation for the bug, e.g. 'make the script walk back' or something - Tried client restart? - Normal script or a plugin? - Which exact setup options are enabled? Afk mode, cannon mode, etc etc.6 points
-
────────────── PREMIUM SUITE ────────────── ─────────────── FREE / VIP+ ─────────────── ──────────────────────────────────────────────────────────── ⌠ Sand crabs - $4,99 | Rooftop Agility - $5,99 | AIO Smither - $4,99 | AIO Cooker - $3,99 | Unicow Killer - £3,99 | Chest Thiever - £2,99 | Rock crabs - $4,99 | Rune Sudoku - $9,99 ⌡ ⌠ AIO Herblore - FREE & OPEN-SOURCE | Auto Alcher - FREE | Den Cooker - FREE | Gilded Altar - FREE | AIO Miner - VIP+ ⌡ ──────────────────────────────────── What is a trial? A trial is a chance for you to give any of my scripts a test run. After following the instructions below, you will receive unrestricted access to the respective script for 24 hours starting when the trial is assigned. Your trial request will be processed when I log in. The trial lasts for 24 hours to cater for time zones, such that no matter when I start the trial, you should still get a chance to use the script. Rules: Only 1 trial per user per script. How to get a trial: 'Like' this thread AND the corresponding script thread using the button at the bottom right of the original post. Reply to this thread with the name of the script you would like a trial for. Your request will be processed as soon as I log in. If i'm taking a while, i'm probably asleep! Check back in the morning Once I process your request, you will have the script in your collection (just like any other SDN script) for 24 hours. Private scripts: Unfortunately I do not currently offer private scripts. ________________________________________ Thanks in advance and enjoy your trial! -Apaec.5 points
-
i hope it has option to simulate me slapping my dick on my phone as an anti-ban method4 points
-
Before buying, please ensure you check-out with the correct script. Swapping scripts is not possible. View in store $4.99 for lifetime access Features: All spawns - Supports every multi-crab spawn point both along the south coast of Zeah and Crab Claw Isle All combat styles - Supports Ranged, Magic and Melee combat training. The script will not bank runes of any type Saving GUI - Intuitive, re-sizeable and fully tool tipped GUI (Graphical User Interface) allowing you to tailor the script session to your needs, with configuration saving / loading Human replication - Designed with human simulation in mind - multiple options to replicate human behaviour available in the GUI Setup customiser - Inventory customiser allows you to visually see your trip setup CLI support - The script can be started from the command line All potions - Supports all relevant potion types (including divine potions!), multiple potion types simultaneously and varying potion ratios Healing in a range - Dual slider allows you to specify a range within which to consume food. Exact eat percentages are calculated using a Gaussian distributed generator at run time Healing to full at the bank - When banking, the script will eat up to full hit points to extend trip times Safe breaking - Working alongside the OSBot break manager, the script will walk to safe place approximately two minutes before a break starts to ensure a successful log out Anti-crash - Smart crash detection supports multiple anti-crash modes (chosen in the GUI): Hop worlds if crashed - the script will walk to a safe place and hop worlds until it finds a free one, at which point it will resume training Force attack if crashed - the script will fight back and manually fight pre-spawned sand crabs until the crasher leaves Stop if crashed - the script will walk to a safe place and stop Ammo and Clue looting - Clue scroll and Ammo looting system based on a Gaussian-randomised timing scheme All ammo - Supports all OSRS ammo types and qualities Spec activation - Special attack support for the current weapon to maximise your exp per hour Auto-retaliate toggling - The script will toggle auto-retaliate on if you forget Move mouse outside screen - Option to move the mouse outside the screen while idle, simulating an AFK player switching tabs Refresh delay - Option to add a Gaussian-randomised delay before refreshing the chosen session location, simulating an AFK player's reaction delay Visual Paint and Logger - Optional movable self-generating Paint and Timeout Scrolling Logger show all the information you would need to know about the script and your progress Progress bars - Automatically generated exp progress bars track the combat skills that you are using Web walking - Utilises the OSBot Web alongside a custom local path network to navigate the area. This means the script can be started from anywhere! Safe banking - Custom banking system ensures the script will safely stop if you run out of any configured items Safe stopping - Safely and automatically stops when out of supplies, ammo or runes Dropping - Drops useless/accidentally looted items to prevent inventory and bank clutter All food - Supports pretty much every OSRS food known to man. Seriously - there's too many to list! ... and many more - if you haven't already, trial it! Things to consider before trying/buying: Mirror mode - currently there appear to be some inconsistencies with behaviour between Mirror mode and Stealth Injection meaning the script can behave or stop unexpectedly while running on Mirror. I would urge users to use the script with Stealth Injection to ensure a flawless experience! Since Stealth Injection is widely considered equally 'safe' to mirror mode and comes with a host of other benefits such as lower resource usage, this hopefully shouldn't be a problem. Using breaks - the script supports breaks and will walk to a safe place ready to log out approximately two minutes before a configured break starts. However, upon logging back in, your spot may no longer be open. If you configure the crash mode to be either 'Hop if crashed' (default) or 'Stop if crashed', this will not prove to be a problem. However if using 'Force attack if crashed', the script will attempt to take back the spot by crashing the occupying player and manually attacking spawned sand crabs. Be aware that players have a tendency to report anti-social behaviour such as this! Avoiding bans - while I have done my utmost to make the script move and behave naturally, bans do occasionally happen, albeit rarely. To minimise your chances of receiving a ban, I would strongly suggest reviewing this thread written by the lead content developer of OSBot. If you take on board the advice given in that thread and run sensible botting periods with generous breaks, you should be fine. That being said, please keep in mind that botting is against the Oldschool Runescape game rules, thus your account will never be completely safe and you use this software at your own risk. Setting the script up - I have done my best to make the GUI (Graphical User Interface) as intuitive as possible by making all options as self explanatory as I could, however if you are not sure as to what a particular setting does, you can hover over it for more information. If that doesn't help, just ask on this thread! Web-walking - alongside a network of paths, the script moves around with the OSBot web-walking system, using it when in unknown territory. While it has proven very reliable, there are naturally some areas for which the web-walker may struggle. As a result, prior to starting the script, I would highly recommend manually navigating your player close to the sand crabs bank, however in practice, anywhere on Zeah should be fine. Script trials: I believe that trying a script before buying is paramount. After trying the script, hopefully you will be convinced to get a copy for yourself, but if not you will have gained some precious combat experience! If you're interested in a trial, please follow the instructions on my trials thread which can be found here. Gallery: Start up GUI (Graphical User Interface): Paint (optional, movable and self-generating): User screenshots: Recent Testimonials: Starting from CLI: This script can be started from the command line interface. There is a single parameter, which can take two (and only two) values: 'gui' or 'nogui'. 'gui' will start the script and show the gui, 'nogui' will skip the GUI setup and start the script using your save file as the configuration. To start from CLI with 'nogui', the script requires a valid GUI save file to be present - if you haven't already, start the script manually and configure the GUI to suit your needs. Then hit 'Save configuration' and in future starting from CLI will use these configured settings. The script ID is 886. Example CLI startup: java -jar "osbot 2.4.137.jar" -login apaec:password -bot apaec@example.com:password:1234 -debug 5005 -script 886:nogui3 points
-
3 points
-
Can we start banning people who make these threads please?3 points
-
Today, for the first time, I was able to watch my farm start itself up mule itself and shut it self down to get ready for tomorrow. 100% automated. I know a lot of people do this, but I took this on as a goal and today I can say I am successful. I own the hardware, I own the proxies, the account creation is automated and I built it, muleing is automated and I wrote all the scripts I am using. I saw 9/10 bots collect almost 10mil gold today and the hardware I have can handle 5 times that so I will be scaling up slowly. I couldn't have done it without this community. You guys and gals have helped me a TON and I want to know I appreciate all of you. To anyone reading this that thinks they can't farm: If you are really committed you can. At the beginning I didn't know any java (still dont know much) and while my career in IT gave me some advantages, it was still a labor of love. If you really want it to happen it will. I know many of you have bigger, better, more efficient farms but I am happy with mine. Thanks again OSbot community!2 points
-
2 points
-
2 points
-
I dont know if this is serious or not If it is, 1) It's skype and it's not on the forum so unless it was harassment i.e doxing then we'd take action but you could just block him 2) We only warn/punish for offensive language if it's harassment on the forums and it's persistent and not in a trolly/joke manner and you have expressed clearly that you are not fine with it2 points
-
2 points
-
2 points
-
If shift dropping is enabled in the osrs settings, the OSBot dropAll method will use shift dropping afaik.2 points
-
2 points
-
i know the rs update hasn't even happened yet but................. may as well be the early bird to this mad day which soon will follow...?2 points
-
This brings you 10 seconds away from the entrance.2 points
-
I'd like to say a note the ban meter for the account is real, it is not falsified. I've seen many people try to falsify pictures, however this is real. There's no need to question the ban if there were intentions to do so.1 point
-
1 point
-
This is the script import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.util.Utilities; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.util.Date; @ScriptManifest(author = "PshYouLost", name = "labelCollector", info = "Get Runescape Info", version = 0.1, logo = "") public final class dataCollector extends Script { private Path screenshotFile = Paths.get("C:\\Users\\PshYouLost\\OSBot\\Data\\screenshots\\screenshot_1.png"); private void labelImages(String folderName) { Utilities.takeScreenshot(); java.util.Date date = new Date(); Path destinationFile = Paths.get("C:\\Users\\PshYouLost\\OSBot\\Data\\screenshots\\varrockEastIronPowerMiner\\" + folderName + "\\" + date.getTime() + ".png"); try { Files.move(screenshotFile, destinationFile, StandardCopyOption.REPLACE_EXISTING); } catch (IOException e) { e.printStackTrace(); log(e); } } private RS2Object ironRocks = null; @Override public final int onLoop() throws InterruptedException { switch (getState()) { case MINE: labelImages("mineIronOre"); ironRocks.interact("Mine"); new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); break; case DROP: labelImages("dropIronOre"); inventory.dropAll("Iron ore"); break; case WAIT: labelImages("doNothing"); break; } return 100; } private enum State { MINE, DROP, WAIT; } private State getState() { if (inventory.isFull()) { return State.DROP; } else if (!myPlayer().isAnimating() && !myPlayer().isMoving() && ironRocks.hasAction("Mine")) { return State.MINE; } else { return State.WAIT; } } @Override public final void onStart() throws InterruptedException { log("Script Started"); if (getObjects().closest(7488) != null) { ironRocks = getObjects().closest(7488); } else if (ironRocks == null) { log("There are no iron rocks in this area!"); stop(); } camera.toTop(); } @Override public void onPaint(Graphics2D g) { } } The goal is to only power mine iron from these two specific rocks I don't want it to look for any other rocks at the moment. The ID for those 2 specific iron rocks is `7488` There are two issues. At the moment, the issue is that when I click run, the bot clicks an iron ore, and then stops and doesnt do anything else. Any ideas?1 point
-
I do mith gloves from tut island from scratch for 15m Takes about 4~ hours to do. I even broke the previous record which was 4H 1M. Addy gloves is one more subquest and the fastest is Lumby guide which requires nature spirit and a couple of other quests so youd be 13 def minimum. Addy gloves from scratch around 20-25m Rune gloves requires a bunch more quests because youre only other 2 options are King Awowogei or Sir Amik Varze. Awowogei has high stat requirements and Sir Amik Varze has high qp requirements (107 qp) From scratch for rune gloves is gonna be like 70m+ easily. Also, you say some atk/str not that high. Mith gloves from scratch requires Waterfall so 30atk/30str minimum. And this is to make the Shadow of the storm boss not take 6 hours to kill. Then pick range reward which is 10k xp from 1-27 then train to 30 for big chompy bird hunting. Usual ending combat stats for mith gloves is 30 atk, 30 str, 25 hp, 20 magic, 30 range, 1 prayer1 point
-
1 point
-
that is exactly the price of stealth quester ( without skills ) protip: you cant get addy gloves without def, stick with mith 10-15m imo, i suggest turning it into a gmauler for 20-30m1 point
-
Only do ironRocks = getObjects().closest(n -> n.getId() == 7488 && ((n.getX() == 1234 && n.getY() == 1234) || (n.getX() == 1234 && n.getY() == 1234))); In the actual mining state, no need to do that in a state where you won't need to know any information about that object. Please do null-checking aswell :)1 point
-
i suggest questing it in p2p as you might to want it to be turned into a zerker later on:O) & 47def is ugly1 point
-
I shall change the No. it drinks at, what number above current level do you think would suffice? Completed all the dream stuff and done most of the outside stuff, All thats left for me to do is buying more potions from barrels then re-arrange gui with some new features. Was in away in edinburgh past 4 days so progress was slow but i am back at home nows1 point
-
Looking to buy up to 20m. Will go first if positive feedback otherwise you must go first. Post your offers . Thanks!1 point
-
1 point
-
I liked both of the posts, I was really looking into buying this script but I was wondering if I could get a trial on it before purchasing so I know what I am spending my money on.1 point
-
1 point
-
biohazard would be lit as well. Purchased script today after using trial. Excellent script. Nature spirit, biohazard and even underground pass if you can would be absolutely amazing. This project is fantastic good shit, keep it up, well worth the money! It is mind boggling that this does mith gloves. Underground pass would be absolutely insane. If you're up for it and need an account to test it on, i will support you 100%.1 point
-
1 point
-
You can do something like this to get the Position under mouse: public final Optional<Position> getPositionUnderMouse(final Point mousePosition) { for (int x = 0; x < 104; x++) { for (int y = 0; y < 104; y++) { Position pos = new Position(getMap().getBaseX() + x, getMap().getBaseY() + y, myPosition().getZ()); if (pos.isVisible(getBot()) && pos.getPolygon(getBot()).contains(mousePosition)) { return Optional.of(pos); } } } return Optional.empty(); } Usage: Position position = getPositionUnderMouse(getMouse().getPosition()); You cant really convert a Position to a mouse point, but you can get it's on screen Polygon: Polygon polygon = position.getPolygon(getBot());1 point
-
Arent you the kid that got banned like 4 times for scamming? Scamfre?1 point
-
Hmm I'm confused about safespotting bug report, it seems to be working for me, are you 100% sure the script is not returning back to safespot? Please state the options (npc killed, which tile is the safespot with a screenshot) and any error logs, I will fix it easily. Looks like safespotting needs it's own tab in the upcoming update. There are many behavioral settings which can be added to it. Brutal black dragons plugin already had an update recently for banking conditions, if you would like any further changes please say what you wish to change, if there are any bugs please state them I cannot test them anymore since they added the slayer requirement Last update for them was: fight bounds update, stand away from dragon fix, banking conditions added to setup interface. Rockslug and gargoyle still need one more update, I need to add them to the action queue system so they actually work properly. Update coming up. Green dragons and edgeville banking, will take a look, glory mode? Regardless, will test with/without and add an update. Guthans mode and setting your custom attack style, will add this feature Sand crabs and rock crabs are currently working, will add an option to 'Open plugin directly?' instead of just stopping the script if user attempts to run the script for rock/sand crabs without using the respective plugin. Alching and eating food failsafe will be added. Extra delay for tabbing/teleporting will be added. I hope I didn't miss anything please let me know, I will add it to the update list ASAP Stay tuned guys1 point
-
1 point
-
1 point
-
1 point
-
Complete monkey madness for me for 5m. Good price and very friendly guy.1 point
-
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; } }1 point