August 8, 201510 yr You'd have to compile it yourself... package org.flamezzz; import org.osbot.rs07.antiban.AntiBan; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.RS2Object; import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.api.ui.Skill; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; import org.osbot.rs07.utility.ConditionalSleep; import java.awt.*; /** * Created by Flamezzz on 16/07/2015. */ @ScriptManifest( name = "FFlaxSpinner", author = "Flamezzz", version = 2.1, info = "Spins flax in lumby.", logo = "" ) public class FFlaxSpinner extends Script { private long lastDeposit = 0; private int made = 0; private long start; private int total_flax = 0; private int total_bs = 0; public void onStart() { start = System.currentTimeMillis(); antiBan.unregisterBehavior(AntiBan.BehaviorType.RANDOM_MOUSE_MOVEMENT); } @Override public int onLoop() throws InterruptedException { log("Loop"); if(widgets.get(402,2,11) != null && widgets.get(402,2,11).isVisible()) { widgets.get(402,2,11).hover(); mouse.click(false); sleep(1000); } if(settings.getRunEnergy() >= random(20,40)) settings.setRunning(true); RS2Widget enterAmount = widgets.get(162,32); RS2Widget spinWidget; if(enterAmount != null && enterAmount.isVisible()) { log("Entering amount"); int rnd = random(3,9); keyboard.typeString(Integer.toString(rnd) + Integer.toString(rnd), true); sleep(random(600,900)); log("Waiting until done spinning"); int level = skills.getStatic(Skill.CRAFTING); int loops = 0; while(inventory.getAmount("Flax") > 0 && level == skills.getStatic(Skill.CRAFTING) && loops < 200) { sleep(random(300,600)); loops++; } sleep(random(400,700)); } else if( (spinWidget = widgets.get(459,93)) != null && spinWidget.isVisible()) { log("Make X"); spinWidget.interact("Make X"); sleep(random(200, 600)); } else if(myPosition().getZ() == 0) { objects.closest("Staircase").interact("Climb-up"); } else if(myPosition().getZ() == 2) { if(inventory.getAmount("Flax") > 0) { if(objects.get(3205,3208).get(0).interact("Climb-down")) { new ConditionalSleep(7000) { public boolean condition() throws InterruptedException { return myPosition().getZ() == 1; } }.sleep(); } } else { if(bank.isOpen()) { if(inventory.getAmount("Bow string") > 0) { bank.depositAll(); sleep(random(200,400)); if(System.currentTimeMillis() - lastDeposit > 20000) { made += 28; lastDeposit = System.currentTimeMillis(); } } else { if(bank.getAmount("Flax") <= 28) { log("Out of flax!"); bank.close(); stop(); } else { bank.withdrawAll("Flax"); } total_bs = (int) bank.getAmount("Bow string"); total_flax = (int) bank.getAmount("Flax"); } } else { if(map.getDestination() == null || map.getDestination().distance(myPosition()) < 6) { if(myPosition().distance(new Position(3208, 3218, 1)) > 6) { localWalker.walk(new Position(3208, 3218, 1)); } else { bank.open(); } } sleep(random(300,700)); } } } else if(myPosition().getZ() == 1) { if(inventory.getAmount("Flax") > 0) { if(myPlayer().isAnimating() && !myPlayer().isMoving()) { } else { RS2Object wheel = objects.closest("Spinning wheel"); if(map.canReach(wheel)) { if(wheel.interact("Spin")) { log("Interacted with wheel sleeping..."); new ConditionalSleep(7000) { public boolean condition() throws InterruptedException { return widgets.get(459,93) != null && widgets.get(459,93).isVisible(); } }.sleep(); log("Done"); } } else { doorHandler.handleNextObstacle(wheel); } } } else { RS2Object stairs = objects.get(3204, 3207).get(0); if(map.canReach(stairs)) { if(stairs.interact("Climb-up")) new ConditionalSleep(7000) { public boolean condition() throws InterruptedException { return myPosition().getZ() == 2; } }.sleep(); } else { doorHandler.handleNextObstacle(stairs); } } } return random(300,500); } public void onPaint(Graphics2D g) { g.setColor(Color.ORANGE); g.drawString("Running: " + format(start), 300, 100); g.drawString("Made: " + made, 300, 130); g.drawString("Total flax: " + total_flax, 300, 160); g.drawString("Total bowstring: " + total_bs, 300, 190); g.drawString("World: " + worlds.getCurrentWorld(), 300, 220); } public String format(long starttime) { long time = System.currentTimeMillis() - starttime; StringBuilder string = new StringBuilder(); long totalSeconds = time / 1000L; long totalMinutes = totalSeconds / 60L; long totalHours = totalMinutes / 60L; int seconds = (int)totalSeconds % 60; int minutes = (int)totalMinutes % 60; int hours = (int)totalHours % 24; if (hours > 0) { string.append(hours + "h "); } if (minutes > 0) { string.append(minutes + "m "); } string.append(seconds + "s"); return string.toString(); } }
August 8, 201510 yr no idea how to use that http://www.megafileupload.com/4Vzj/FFlaxSpinner.jar Local script folder = user/OSBot/Scripts
August 8, 201510 yr Author the script is working but the cpu usage is 5x times higher than any script something is broken most def. cpu usage with 18bots 20-30% and ur script 100% Edited August 8, 201510 yr by Eko
August 8, 201510 yr ill finish my spinner and put it on the sdn. i thought the other spinner was working
August 8, 201510 yr the script is working but the cpu usage is 5x times higher than any script something is broken most def. cpu usage with 18bots 20-30% and ur script 100% Don't complain considering it's completely free to you...
August 12, 201510 yr Author ill finish my spinner and put it on the sdn. i thought the other spinner was working hi, still not finished ? i plan on running 50+ spinners this weekend(must be flawless) bump Edited August 12, 201510 yr by Eko
August 12, 201510 yr hi, still not finished ? i plan on running 50+ spinners this weekend(must be flawless) bump I'll work on it today ;)
August 17, 201510 yr still working ? :lol: :P[/quote$] http://osbot.org/forum/topic/73306-the-return-of-lumby-spinner-aio/ Edited August 17, 201510 yr by jos3dpay