All pastes #517888 Raw Edit

Lumby Flax Spinner

public java v1 · immutable
#517888 ·published 2007-05-29 04:32 UTC
rendered paste body
import impsoft.nexus.bots.color.constants.Info;import impsoft.nexus.bots.color.methods.ColorScript;import impsoft.nexus.bots.color.scriptobjects.RGBCluster;import impsoft.nexus.bots.color.scriptobjects.RGB;import impsoft.nexus.bots.color.constants.*;import impsoft.nexus.bots.color.methods.*;import impsoft.nexus.bots.color.scriptobjects.RGBClusters.*;import impsoft.nexus.bots.reflection.scriptobjects.walking.*;import impsoft.nexus.bots.color.scriptobjects.*;import java.awt.*;public class lumbyflaxspinner extends ColorScript {	public static double version = 1.0;	public static String[] commands = new String[] { "" };	public String author = "Beezkneez";	public String description = "Lumby Flaxer Spinner v1.0";	private BankBooth lumbyBank = new BankBooth(this);	private RGB BankBoothCloseButton = new RGB(484, 38);	//Declare tiles and paths.	AryanTile Lumby_Bank = new AryanTile(3208, 3220, 0, this);	AryanTile Bank_Stairs = new AryanTile(3205, 3209, 0, this);	AryanTile Flax_Room = new AryanTile(3209, 3214, 0, this);	AryanTile Flax_Stairs = new AryanTile(3205, 3209, 0, this);	AryanPath bank = new AryanPath(new AryanTile[] { Lumby_Bank, Bank_Stairs },			this);	private int randomClick(int start, int range) {		if (random(0, 1) == 0) // negative			return start + random(-range, 0);		return start + random(range, 0);	}	private long rsleep(int min, int max) throws InterruptedException {		long time = random(min, max);		sleep(time);		return time;	}	public boolean doStart(String cmd, String[] args)			throws InterruptedException {		lumbyBank = new BankBooth(new RGB[] { new RGB(119, 92, 56) }, this);		return true;	}	public void script() throws InterruptedException {		log("Starting Flax Spinner...");		setTab(Info.TAB_INVENTORY);		while (isLoggedIn()) {			WithdrawFlax();			sleep(3000);			bank.walkToEndTile();			RGBCluster bankStairs = new RGBCluster(new RGB[] { new RGB(80, 54,					8) }, this);			bankStairs.gatherNewPoints(20);			bankStairs.doTopTextAndMenu("Staircase", "down");			Flax_Room.walkTo();			RGBCluster spinner = new RGBCluster(					new RGB[] { new RGB(122, 83, 12) }, this);			spinner.gatherNewPoints(20);			spinner.doTopTextAndMenu("Spinning", "Spin Spinning");			rsleep(1000, 1500);			mouseClickRight(randomClick(260, 3), randomClick(127, 3));			XY myXY = findGameScreenText("Make X", Areas.GAME, new RGB(255,					255, 255), 0, 0, 0);			mouseMove(myXY);			if (myXY != null) {				mouseClickLeft(myXY);			}			rsleep(1000, 1500);			SendText("2");			SendText("8");			rsleep(30000, 35000);			Flax_Stairs.walkTo();			rsleep(500, 1000);			RGBCluster spinnerStairs = new RGBCluster(new RGB[] { new RGB(74,					50, 8) }, this);			spinnerStairs.gatherNewPoints(20);			spinnerStairs.doTopTextAndMenu("Staircase", "up Staircase");			rsleep(1000, 2000);			bank.walkToStartTile();			StoreStrings();		}	}	private void WithdrawFlax() throws InterruptedException {		log("Withdrawing Flax from the bank.");		lumbyBank.openBankInterface();		sleep(random(1000, 2000));		Rectangle FirstBankSlot = new Rectangle(81, 63, 25, 25);		mouseMove(FirstBankSlot);		rsleep(300, 700);		if (getTopText().contains("lax")) {			log("Withdrawing...");		} else {			log("You have no Flax. Stopping script.");			shutDown();		}		sleep(random(1, 100));		mouseClickRight(currentMouseXY());		sleep(random(200, 1000));		getMenu(Areas.GAME, 2000).selectContains("ll");		sleep(random(200, 1000));		log("Closing bank.");		lumbyBank.closeBankInterface();		CloseBankInterface();	}	private void StoreStrings() throws InterruptedException {		log("Storing Completed Bow Strings.");		lumbyBank.openBankDepositAllBut(new String[] { "string" });		rsleep(500, 1000);		CloseBankInterface();	}	private void CloseBankInterface() throws InterruptedException {		if (getRGB(484, 38).r == BankBoothCloseButton.r) {			log("Bank booth is open, closing.");			lumbyBank.closeBankInterface();			rsleep(1000, 3000);		} else {			log("Bank booth is already closed.");		}	}	private RGB GetBankCloseButtonColour() throws InterruptedException {		return getRGB(484, 38);	}	private void DepositAndWithdraw() throws InterruptedException {		StoreStrings();		WithdrawFlax();	}}