Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/11/23 in all areas

  1. And this sweet drop while testing the script for update v254.0... 52 HOUR RESULT! 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.
    1 point
  2. Hi all, I've missed writing osrs scripts, so I sat down today and came up with this little guy. In short, it will ask you to input whatever fish you want to cook through a simple GUI, and then it'll use the lumbridge cooking range (burns less fish) to drop all the fish, picking them up 1 by 1 to cook them at a 2-tick cycle. The only requirement is cooks assistant to be completed, and to have the level to cook whichever fish you input. I've pasted the full script, feel free to use it/leech it/customize it! I've left a lot of // commentary to help me remember what I was doing. I've been running it for about 2 hours now and it's run flawlessly, I've even added failsafes for when it picks up 2 fish by mistake, or a few other things that can go wrong. package osrs; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.constants.Banks; import org.osbot.rs07.api.model.GroundItem; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import javax.swing.*; import java.awt.*; import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.Locale; @ScriptManifest(name = "Efficient 2-tick Cooker", author = "Marcus", version = 1.0, info = "A script that drops fish in order to 2-tick cook them", logo = "") public class Main extends Script { private String itemName; // Item to cook private Area dropArea = new Area(3211, 3215, 3211, 3215); // Area of itemName on the ground private long startTime; private int startingXP; private int currentXP; private int xpGained; long amountLeft; private final NumberFormat numberFormat = NumberFormat.getInstance(Locale.US); private final DecimalFormat decimalFormat = new DecimalFormat("#,###"); @Override public void onStart() { // Prompt user to input item name through a simple GUI itemName = JOptionPane.showInputDialog("Enter the item name to cook:"); startTime = System.currentTimeMillis(); startingXP = getSkills().getExperience(Skill.COOKING); xpGained = 0; getExperienceTracker().start(Skill.COOKING); } @Override public int onLoop() throws InterruptedException { GroundItem groundItem = getGroundItems().closest(itemName); if (getInventory().contains(itemName) && getInventory().getAmount(itemName) >= 2) { // If inventory is full, drop all items at the collection area if (dropArea.contains(myPosition())) { getInventory().dropAll(itemName); // Conditional sleep Sleep.sleepUntil(() -> getInventory().getAmount(itemName) == 1, random(500, 1000)); } else { getWalking().webWalk(dropArea); sleep(random(500, 1000)); // Sleep between 0.5-1 seconds } } else if (!getInventory().contains(itemName) && groundItem != null) { // If inventory is empty and item found on the ground, take 1 item groundItem.interact("Take"); // Conditional sleep Sleep.sleepUntil(() -> getInventory().contains(itemName), random(500, 1000)); } else if (getInventory().contains(itemName) && getInventory().getAmount(itemName) == 1) { getObjects().closest("Cooking range").interact("Cook"); // Conditional sleep Sleep.sleepUntil(() -> !getInventory().contains(itemName), random(500, 1000)); } else { // If no item on the ground and inventory is not full, walk to the collection area if (Banks.LUMBRIDGE_UPPER.contains(myPosition())) { getBank().open(); // Conditional sleep Sleep.sleepUntil(() -> getBank().isOpen(), random(500, 1000)); if (!getBank().contains(itemName)) { log("Item not found in the bank. Stopping script..."); stop(false); } getBank().depositAll(); // Conditional sleep Sleep.sleepUntil(() -> getInventory().isEmpty(), random(500, 1000)); if (getBank().contains(itemName)) { getBank().withdraw(itemName, 28); amountLeft = getBank().getAmount(itemName); // Conditional sleep Sleep.sleepUntil(() -> getInventory().contains(itemName) && getInventory().getAmount(itemName) == 28, random(500, 1000)); } getBank().close(); // Conditional sleep Sleep.sleepUntil(() -> !getBank().isOpen(), random(500, 1000)); } else { getWalking().webWalk(Banks.LUMBRIDGE_UPPER); sleep(random(500, 1000)); // Sleep between 0.5-1 seconds } } return 0; // Return 0 } @Override public void onExit() { log("Thank you for using Efficient 2-tick Cooker!"); } @Override public void onPaint(Graphics2D g) { currentXP = getSkills().getExperience(Skill.COOKING); xpGained = currentXP - startingXP; int xpHour = getExperienceTracker().getGainedXPPerHour(Skill.COOKING); Point mP = getMouse().getPosition(); g.drawLine(mP.x, 501, mP.x, 0); g.drawLine(0, mP.y, 764, mP.y); g.setColor(Color.white); // Paint background g.setColor(Color.BLACK); g.fillRect(5, 5, 200, 110); // Paint border g.setColor(Color.WHITE); g.drawRect(5, 5, 200, 110); // Paint text g.setColor(Color.WHITE); g.drawString("Efficient 2-tick Cooker", 15, 25); g.drawString("Time Running: " + formatTime(System.currentTimeMillis() - startTime), 15, 45); g.drawString("Total XP Gained: " + decimalFormat.format(xpGained), 15, 65); g.drawString("Total XP Per hour: " + decimalFormat.format(xpHour), 15, 85); g.drawString(itemName + " in Bank: " + numberFormat.format(amountLeft), 15, 105); } private String formatTime(long ms) { long seconds = ms / 1000; long minutes = seconds / 60; long hours = minutes / 60; minutes %= 60; seconds %= 60; return String.format("%02d:%02d:%02d", hours, minutes, seconds); } }
    1 point
  3. Hey, Download link: http://osbot.org/devbuilds/osbot 2.6.65.jar Mostly tweaks. fixes and small changes in this release. API CHANGES: - Deprecated World#getLocationId() as it has always been 0. WEB WALKER: - Updated some charter links. - Fixed some incorrect object links. MISC: - Small tweaks to the inventory API to improve stability. - Added Script#complete(boolean logout) to logout when your script is the last one in the queue. - New mouse has been enabled by default. (temporary) CLI to disable is -nonewmouse - Adding/importing accounts has been moved to the top of the side panel. - Minor bug fixes. - The OSBot Team
    1 point
  4. Thank you bro i appreciate it. This script is pretty much great except for that little bug.
    1 point
  5. 1 point
  6. Thank you for your quick reply! Yep that fixed the issue.
    1 point
  7. not on 1 ip lol, must be cache ty
    1 point
  8. Good to see some new scripters Some tips: - I would only initiliaze stuff in the onStart, never really executed any interaction code in it. Since it's only run once it can fail. Another thing that will cause issues is that you do 15 tasks in a row. This will clog up sooner or later. If 1 action missclicks it could get stuck. What you should do instead is only execute 1-2 commands every loop. if animating => Wait, we are making wines else if inventory contains jug of water and grapes => use grapes on water else if inventory does not contain water and grapes => Bank else if bank is open? => if we have wine deposit else if bank is open and we have no wine? check if we have water else withdraw water else if bank is open and we have no wine? check if we have grapes else withdraw grapes this is just an example but it will improve stability by a lot. Kind regards Khaleesi
    1 point
×
×
  • Create New...