Leaderboard
Popular Content
Showing content with the highest reputation on 12/04/21 in all areas
-
βCzarScripts #1 Bots β Proven the #1 selling, most users, most replies Script Series on the market. Big THANK YOU to all our wonderful users and supporters over the 8 years, we couldn't have done it without you. Czar Bots have always been the Best and the most Feature-rich bots available with the most total sales in OSBot history. Come and find out why everyone is choosing Czar Bots today. β LATEST BOTS β If you want a trial - just post the script name and it will be activated after I hit 'like' on your post Requirements: hit 'like' on this thread1 point
-
VOUCHED SELLER! To purchase add my discord as I am much more likely to see your message there: cas.tro Features: EVERY ACCOUNT: Created on high quality USA ISP proxies Rested for a variety of days, 3+ minimum Positioned at Grand Exchange Randomly dressed Randomly named using real words (e.g not: 3ourihj48) Zulrah (Unfinished) Accounts $9.7 60/60/60 Melee Accounts $2.25 50/50/50 Melee Accounts $1.15 40/40/40 Melee Accounts $0.55 70 Ranged 1 Defence $2.45 60 Range 40 Defence Accounts $1.95 60 Range 1 Defence Accounts $1.7 82 Fishing Accounts $2.31 point
-
A simple mining script that was created for my needs, you can add in the position of the ores and what is the type of ore you want to mine, and it will hover over the next ore and drop when inventory is full. To change the position of ores, you can edit the values in "positions" or add more positions. To change the ore type, you can edit the value in "oreToMine" and set it to whatever rock you want to mine. SimpleMiner.java import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.event.InteractionEvent; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep2; import java.awt.*; import java.awt.event.KeyEvent; import java.util.Arrays; import java.util.List; @ScriptManifest(version = 0.0, logo = "", author = "Progamerz", name = "Simple Miner", info = "") public class SimpleMiner extends Script { List<Position> positions = Arrays.asList(new Position(3183, 3376, 0), new Position(3181, 3376, 0)); Rock oreToMine = Rock.TIN; RS2Object currentOre; RS2Object nextOre; long startTime; @Override public void onStart() { startTime = System.currentTimeMillis(); getExperienceTracker().start(Skill.MINING); } @Override public int onLoop() throws InterruptedException { if (getDialogues().isPendingContinuation()) { getDialogues().clickContinue(); } else if (getInventory().isFull()) { dropAll(); } else { if (myPlayer().isAnimating()) { handleAnimating(); } else { if (currentOre == null || !currentOre.exists()) { getCurrentOre(); } else if (customInteract(currentOre)) { ConditionalSleep2.sleep(5_000, 250, () -> myPlayer().isAnimating() || !currentOre.exists() || getDialogues().isPendingContinuation()); } } } return 250; } @Override public void onPaint(Graphics2D g) { int x = 10, y = 50; g.setFont(g.getFont().deriveFont(16.0f)); g.setColor(Color.BLUE); if (startTime != 0) { long elapsedTime = System.currentTimeMillis() - startTime; g.drawString(String.format("Runtime: %s", formatTime(elapsedTime)), x, y += 25); g.drawString(String.format("XP(/HR): %d(%d)", getExperienceTracker().getGainedXP(Skill.MINING), getExperienceTracker().getGainedXPPerHour(Skill.MINING)), x, y += 25); } } private void getCurrentOre() { if (nextOre != null) { // We finished mining currentOre, and we want to change it to nextOre and set nextOre to null currentOre = nextOre; nextOre = null; } else { // The script ran for the first time, we have to initialize currentOre currentOre = getClosestOre(); } } private void handleAnimating() { if (nextOre != null && nextOre.exists()) { if (!entityBoundsHasMyMouse(nextOre)) nextOre.hover(); } else { // We should find nextOre when we are mining to hover over nextOre = getNextOre(); } } private RS2Object getClosestOre() { return oreToMine.getClosestWithOre(this, rock -> positions.contains(rock.getPosition())); } private RS2Object getNextOre() { return oreToMine.getClosestWithOre(this, rock -> positions.contains(rock.getPosition()) & !rock.getPosition().equals(currentOre.getPosition())); } private void dropAll() throws InterruptedException { if (getSettings().isShiftDropActive()) { getKeyboard().pressKey(KeyEvent.VK_SHIFT); } for (int i : new int[]{ 0, 4, 8, 12, 16, 20, 24, 25, 21, 17, 13, 9, 5, 1, 2, 6, 10, 14, 18, 22, 26, 27, 23, 19, 15, 11, 7, 3 }) { Item item = getInventory().getItemInSlot(i); if (item != null) { if (getSettings().isShiftDropActive()) { getInventory().interact(i); } else { getInventory().interact(i, "Drop"); } sleep(random(50, 150)); } } if (getSettings().isShiftDropActive()) { getKeyboard().releaseKey(KeyEvent.VK_SHIFT); } } private boolean entityBoundsHasMyMouse(Entity entity) { List<Polygon> polygonList = getDisplay().getModelMeshTriangles(entity.getGridX(), entity.getGridY(), entity.getZ(), entity.getModel()); if (polygonList != null && !polygonList.isEmpty()) { return polygonList.stream().anyMatch(polygon -> polygon.contains(getMouse().getPosition())); } return false; } private boolean customInteract(Entity entity) { InteractionEvent interactionEvent = new InteractionEvent(entity, "Mine"); interactionEvent.setWalkTo(false); interactionEvent.setOperateCamera(false); return execute(interactionEvent).hasFinished(); } private String formatTime(long ms) { long sec = ms / 1000, d = sec / 86400, h = sec / 3600 % 24, m = sec / 60 % 60, s = sec % 60; return (d < 10 ? "0" + d : d) + ":" + (h < 10 ? "0" + h : h) + ":" + (m < 10 ? "0" + m : m) + ":" + (s < 10 ? "0" + s : s); } } Rock.java import org.osbot.rs07.api.filter.Filter; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.script.MethodProvider; import java.util.stream.Stream; //Author @Explv public enum Rock { CLAY(new short[]{6705}), COPPER(new short[]{4645, 4510}), TIN(new short[]{53}), IRON(new short[]{2576}), SILVER(new short[]{74}), COAL(new short[]{10508}), GOLD(new short[]{8885}), MITHRIL(new short[]{-22239}), ADAMANTITE(new short[]{21662}), RUNITE(new short[]{-31437}); private final short[] colours; Rock(final short[] colours) { this.colours = colours; } @SafeVarargs public final RS2Object getClosestWithOre(final MethodProvider methods, final Filter<RS2Object>... filters) { return methods.getObjects().closest( obj -> Stream.of(filters).allMatch(f -> f.match(obj)) && hasOre(obj) ); } public boolean hasOre(final Entity rockEntity) { if (rockEntity.getDefinition() == null) { return false; } short[] colours = rockEntity.getDefinition().getModifiedModelColors(); if (colours == null) { return false; } for (short rockColour : this.colours) { for (short entityColour : colours) { if (rockColour == entityColour) { return true; } } } return false; } }1 point
-
1 point
-
1 point
-
Yes I only started adding prayer support recently in a few quests, that specific quest can only be done with prayer on most accounts1 point
-
You could override the break manager, start a break when the boss exists, and finish the break after 10 minutes. Example break manager: import org.osbot.rs07.api.Client; import org.osbot.rs07.script.RandomEvent; import org.osbot.rs07.script.RandomSolver; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Explv", name = "Break Manager", info = "", version = 0.1, logo = "") public class CustomBreakManager extends RandomSolver { private long breakDuration = -1; private long breakStartTime = -1; private boolean shouldLogout; public CustomBreakManager() { super(RandomEvent.BREAK_MANAGER); } public void startBreaking(final long breakDuration, final boolean shouldLogout) { this.breakDuration = breakDuration; this.breakStartTime = System.currentTimeMillis(); this.shouldLogout = shouldLogout; } public long getBreakStartTime() { return breakStartTime; } @Override public boolean shouldActivate() { return breakDuration > 0 && !finishedBreaking(); } public boolean finishedBreaking() { return System.currentTimeMillis() - breakStartTime >= breakDuration; } @Override public int onLoop() throws InterruptedException { if (shouldLogout && getClient().getLoginState() == Client.LoginState.LOGGED_IN) { if (getWidgets().closeOpenInterface() && getLogoutTab().logOut()) { return 1000; } } if (getMouse().isOnScreen()) { getMouse().moveOutsideScreen(); } return 3000; } } Overriding (should be only done once, in onStart): CustomBreakManager customBreakManager = new CustomBreakManager(); customBreakManager.exchangeContext(getBot()); getBot().getRandomExecutor().overrideOSBotRandom(customBreakManager); Starting a break: if (getNpcs().closest("Boss name") != null) { customBreakManager.startBreaking(TimeUnit.MINUTES.toMillis(10), true); }1 point