Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/10/23 in all areas

  1. The only Runecrafting bot you will need Purchase this INSANE bot here You can setup a master account (preferably your main account, can be any account) and a worker account (a throwaway bot account, or any account) will trade the master account and go to bank to get more runes etc. The main account (master) does not need to bot, and can be achieved through the normal RS client without a bot client. Supports: Air runes (1) (normal) & (abyss) Mind runes (2) (normal) & (abyss) Water runes (5) (normal) & (abyss) Earth runes (9) (normal) & (abyss) Mud runes (13) (earth altar) Lava runes (23) (fire altar) Fire runes (14) (normal) & (abyss) Body runes (20) (normal) & (abyss) Cosmic runes (27) (normal) & (abyss) Chaos runes (35) (normal) & (abyss) Astral runes (40) (normal) & (abyss) Nature runes (44) (normal) & (abyss) Law runes (54) (normal) & (abyss) Blood runes (abyss) & (zeah) Auto Arceuus Favour Solver Gets 100% arceuus favour for you Auto GE Restocking Sells runes, buys more supplies automatically Auto-equips chosen armour/robes Use Blood Essences Death Handler gets items from Death's office and repeats (Abyss) Glory mode, ferox mode, house spell/tabs Avoids pkers and hops worlds Uses mouse invokes for quicker runecrafting (stealth) Muling (BETA) will give money to your mules every X hours or profit Creates colossal pouch if you have the needle Results and screenshots
    1 point
  2. So I created custombreakmanager and is there a way to track the time until the break/break duration on my mining script's paint? I've provided my custombreak manager/miner script's paint. package Breaks; import org.osbot.rs07.script.RandomEvent; import org.osbot.rs07.script.RandomSolver; import java.util.Random; public class CustomBreakManager extends RandomSolver { private long breakStartTime = 0; private long breakDuration = 0; private long remainingBreakTime = 0; private long nextLongBreakTime = System.currentTimeMillis() + longBreakInterval(); private long nextMediumBreakTime = System.currentTimeMillis() + mediumBreakInterval(); private long nextSmallBreakTime = System.currentTimeMillis() + smallBreakInterval(); private boolean isBreaking = false; private BreakType activeBreak = BreakType.NONE; // Track the active break type Random random = new Random(); private enum BreakType { NONE, SMALL, MEDIUM, LONG } public CustomBreakManager() { super(RandomEvent.BREAK_MANAGER); } @Override public boolean shouldActivate() { long timeUntilSmallBreak = nextSmallBreakTime - System.currentTimeMillis(); long timeUntilMediumBreak = nextMediumBreakTime - System.currentTimeMillis(); long timeUntilLongBreak = nextLongBreakTime - System.currentTimeMillis(); return (timeUntilSmallBreak <= 0 && activeBreak == BreakType.NONE) || (timeUntilMediumBreak <= 0 && activeBreak == BreakType.NONE) || (timeUntilLongBreak <= 0 && activeBreak == BreakType.NONE); } @Override public int onLoop() throws InterruptedException { if (isBreaking) { return 100; // Continue normal loop execution during the break } long nextSmallBreak = nextSmallBreakTime - System.currentTimeMillis(); long nextMediumBreak = nextMediumBreakTime - System.currentTimeMillis(); long nextLongBreak = nextLongBreakTime - System.currentTimeMillis(); if (nextSmallBreak <= 0 && activeBreak == BreakType.NONE) { activeBreak = BreakType.SMALL; startSmallBreak(); } else if (nextMediumBreak <= 0 && activeBreak == BreakType.NONE) { activeBreak = BreakType.MEDIUM; startMediumBreak(); } else if (nextLongBreak <= 0 && activeBreak == BreakType.NONE) { activeBreak = BreakType.LONG; startLongBreak(); } return 1000; // Return any suitable value here } private long longBreakInterval() { return (long) ((10 * 60 * 60 * 1000) + (Math.random() * (4 * 60 * 60 * 1000))); } private void startLongBreak() throws InterruptedException { long breakDurationLONG = (long) ((8 * 60 * 60 * 1000) + (Math.random() * (2 * 60 * 60 * 1000))); isBreaking = true; int randomChance = random.nextInt(100) + 1; if (randomChance <= 35) { getLogoutTab().logOut(); sleep(breakDurationLONG); } else { sleep(breakDurationLONG); } isBreaking = false; activeBreak = BreakType.NONE; nextLongBreakTime = System.currentTimeMillis() + longBreakInterval(); } private long mediumBreakInterval() { return (long) ((40 * 60 * 1000) + (Math.random() * (30 * 60 * 1000))); } private void startMediumBreak() throws InterruptedException { long breakDurationMED = (long) ((100 * 60 * 1000) + (Math.random() * (50 * 60 * 1000))); isBreaking = true; int randomChance = random.nextInt(100) + 1; if (randomChance <= 35) { getLogoutTab().logOut(); sleep(breakDurationMED); } else { sleep(breakDurationMED); } isBreaking = false; activeBreak = BreakType.NONE; nextMediumBreakTime = System.currentTimeMillis() + mediumBreakInterval(); } public long getNextBreakTime() { if (activeBreak == BreakType.NONE) { return Math.min(nextSmallBreakTime, Math.min(nextMediumBreakTime, nextLongBreakTime)); } else { return -1; // No break scheduled when active break is in progress } } private long smallBreakInterval() { return (long) ((20 * 60 * 1000) + (Math.random() * (14 * 60 * 1000))); } private void startSmallBreak() throws InterruptedException { long breakDuration = (long) ((6 * 60 * 1000) + (Math.random() * (5 * 60 * 1000))); isBreaking = true; int randomChance = random.nextInt(100) + 1; if (randomChance <= 35) { getLogoutTab().logOut(); sleep(breakDuration); } else { sleep(breakDuration); } isBreaking = false; activeBreak = BreakType.NONE; nextSmallBreakTime = System.currentTimeMillis() + smallBreakInterval(); } } MINER SCRIPT BELOW @Override public void onStart() { startTime = System.currentTimeMillis(); getExperienceTracker().start(Skill.MINING); // Initialize the customBreakManager instance CustomBreakManager breaker = new CustomBreakManager(); breaker.exchangeContext(getBot()); bot.getRandomExecutor().overrideOSBotRandom(breaker); } @Override public void onPaint(Graphics2D g) { // Call super method to draw the default paint first super.onPaint(g); // Mouse X crosshair Point mP = getMouse().getPosition(); g.setColor(Color.WHITE); g.drawLine(mP.x - 5, mP.y + 5, mP.x + 5, mP.y - 5); g.drawLine(mP.x + 5, mP.y + 5, mP.x - 5, mP.y - 5); // Trails while (!mousePath.isEmpty() && mousePath.peek().isUp()) mousePath.remove(); Point clientCursor = mouse.getPosition(); MousePathPoint mpp = new MousePathPoint(clientCursor.x, clientCursor.y, 500); if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp)) mousePath.add(mpp); MousePathPoint lastPoint = null; for (MousePathPoint a : mousePath) { if (lastPoint != null) { g.setColor(nextColor()); g.drawLine(a.x, a.y, lastPoint.x, lastPoint.y); } lastPoint = a; } // Get the runtime in milliseconds long runtime = System.currentTimeMillis() - startTime; // Format runtime as a string String runtimeString = String.format("Runtime: %02d:%02d:%02d", TimeUnit.MILLISECONDS.toHours(runtime), TimeUnit.MILLISECONDS.toMinutes(runtime) % 60, TimeUnit.MILLISECONDS.toSeconds(runtime) % 60); // Set font and color for the runtime display g.setFont(new Font("Arial", Font.PLAIN, 14)); g.setColor(Color.WHITE); // Draw the background rectangle Color bgColor = new Color(0, 0, 0, 140); Color nick = new Color(0, 0, 0, 255); int rectX = 6; int rectY = 345; int rectWidth = g.getFontMetrics().stringWidth(runtimeString) + 395; int rectHeight = g.getFontMetrics().getHeight() + 117; g.setColor(bgColor); g.fillRect(rectX, rectY, rectWidth, rectHeight); g.setColor(nick); g.fillRect(rectX, rectY + rectHeight + 18, rectWidth, g.getFontMetrics().getHeight() + 3); // Draw the runtime string on top of the background g.setColor(Color.WHITE); g.drawString(runtimeString, rectX + 4, rectY + 15); // Percentages double miningPercent = percentToNextLevel(Skill.MINING); g.drawString(getTimeToLevel(), rectX + 344, rectY + 65); g.drawString("Mining Level: " + getCurrentMiningLevel(), rectX + 404, rectY + 85); g.drawString("Mining: " + miningPercent + "%", rectX + 421, rectY + 105); // Retrieve the remaining time until the next break long timeUntilBreak = customBreakManager.getNextBreakTime() - System.currentTimeMillis(); // Format the time until the next break as a string String breakTimeString = String.format("Next Break: %02d:%02d:%02d", TimeUnit.MILLISECONDS.toHours(timeUntilBreak), TimeUnit.MILLISECONDS.toMinutes(timeUntilBreak) % 60, TimeUnit.MILLISECONDS.toSeconds(timeUntilBreak) % 60); // Set font and color for the break time display g.setFont(new Font("Arial", Font.PLAIN, 14)); g.setColor(Color.WHITE); // Draw the break time string on top of the background g.drawString(breakTimeString, rectX + 4, rectY + 35); }
    1 point
  3. Possible solution: Add a getter in your CustomBreakManager to calculate time left as you did in shouldActivate() public long getTimeLeft(){ //Logic here } In your main script extract the breakmanager variable: CustomBreakManager breaker; @Override public void onStart() { startTime = System.currentTimeMillis(); getExperienceTracker().start(Skill.MINING); // Initialize the customBreakManager instance breaker = new CustomBreakManager(); breaker.exchangeContext(getBot()); bot.getRandomExecutor().overrideOSBotRandom(breaker); } Add in your paint: if(breaker != null){ long timeLeft = breaker.getTimeLeft(); //print it out } EDIT: I see you already did something similar, but I believe you are using the wrong breakmanager variable? Where does the customBreakManager variable comes from so suddenly? This line -> long timeUntilBreak = customBreakManager.getNextBreakTime() - System.currentTimeMillis();
    1 point
  4. Try "C:\Program Files\Java\jdk1.8.0_361\bin\java.exe" -jar "OSbot 2.6.71.jar" And make sure OSbot 2.6.71.jar is the actual name of the jar, it is case sensitive
    1 point
  5. I can’t get mine to work
    1 point
  6. Script works ridiculously good!! Progress report later on.
    1 point
  7. The feedback has been removed as it's SDN script related. @MvL013 Market feedback isn't meant for SDN scripts. You can leave a review in the store specifically with a rating out of 5 stars
    1 point
  8. I need rested tut accounts, i live in AUS and they will be locked if they haven't been rested for long enough. Will pay well, thanks!
    0 points
Γ—
Γ—
  • Create New...