rendered paste bodyimport impsoft.nexus.bots.color.*;
import impsoft.nexus.bots.color.constants.*;
import impsoft.nexus.bots.color.util.*;
import impsoft.nexus.bots.color.scriptable.*;
import impsoft.nexus.bots.color.scriptable.interfaces.*;
import impsoft.nexus.bots.color.scriptable.objects.*;
import impsoft.nexus.bots.color.structures.*;
import impsoft.nexus.bots.reflection.objects.*;
import impsoft.nexus.bots.reflection.structures.*;
import impsoft.nexus.storage.SettingsManager;
import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;
import java.awt.*;
public class AdvancedFlaxSpinner extends ColorScript implements AutoPaint {
public static double version = 1.2;
public static String[] commands = new String[] { "" };
public String author = "Beezkneez";
public String description = "Advanced Flaxer Spinner v1.0";
private RGB BankBoothCloseButton = new RGB(484, 38);
public int TotalStringsStrung;
public int Trips;
public Timer StartTimer;
public AdvancedFlaxSpinner (ColorBot c) {
super(c);
}
// Declare tiles and paths.
AryanTile Lumby_Bank = new AryanTile(3208, 3220);
AryanTile Bank_Stairs = new AryanTile(3205, 3209);
AryanTile Flax_Room = new AryanTile(3209, 3215);
AryanTile Flax_Stairs = new AryanTile(3206, 3208);
// K1ttens method of random clicking.
private int randomClick(int start, int range) {
if (random(0, 1) == 0) // negative
return start + random(-range, 0);
return start + random(range, 0);
}
// Solars method of random sleep time.
private long rsleep(int min, int max) throws InterruptedException {
long time = random(min, max);
sleep(time);
return time;
}
public void paint(Graphics g) {
g.setColor(Color.RED);
g.drawString("Total Bow Strings Made: " + TotalStringsStrung, 10, 55);
g.setColor(Color.RED);
g.drawString("Total Trips to the Bank: " + Trips, 10, 70);
g.setColor(Color.RED);
g.drawString("Total Time Running: " + StartTimer.timePassed(), 10, 85);
}
private void walkToTile(AryanTile t) throws InterruptedException {
new AryanPath(t, this).walkToEnd();
}
public void script() throws InterruptedException {
log("******** Advanced Flax Stringer v1.2 ********");
log("******* By: Beezkneez *******");
log("****** Questions/Comments? ******");
log("*** MSN: Beezkneez2007@hotmail.com ***");
log("***********************************");
theTabs.Inventory.setSelected();
StartTimer = new Timer(0);
WithdrawFlaxStart();
while (true) {
rsleep(500, 1000);
walkToTile(Bank_Stairs);
DownStairs();
rsleep(1000, 1200);
walkToTile(Flax_Room);
spinFlax();
rsleep(1000, 1500);
mouseClickRight(randomClick(260, 3), randomClick(127, 3));
Rectangle spinX = new Rectangle(getCurrentMouseXY().x + (230 - 219),
getCurrentMouseXY().y + (182 - 118), 42, 9);
rsleep(1000, 1200);
mouseClickLeft(spinX);
rsleep(1500, 2000);
SendText("9");
rsleep(250, 500);
SendText("9");
rsleep(250, 500);
SendKey(10);
rsleep(51000, 52000);
TotalStringsStrung = TotalStringsStrung + 28;
walkToTile(Flax_Stairs);
rsleep(500, 1000);
UpStairs();
rsleep(500, 1000);
walkToTile(Lumby_Bank);
StoreStrings();
WithdrawFlax();
Trips++;
}
}
private void WithdrawFlaxStart() throws InterruptedException {
log("Withdrawing Flax from the bank.");
theBank.doWithDrawAll("lax");
theBank.exit();
log("Walking to stairs.");
}
private void WithdrawFlax() throws InterruptedException {
// Rectangle FirstBankSlot = new Rectangle(81, 63, 25, 25);
// mouseMove(FirstBankSlot);
// rsleep(300, 700);
// if (getTopText().contains("lax")) {
// log("Walking to stairs.");
// } else {
// log("You have no Flax. Stopping script.");
// shutDown();
// }
// sleep(random(1, 100));
// mouseClickRight(currentMouseXY());
// sleep(random(200, 700));
// getMenu(Areas.GAME, 2000).selectContains("ll");
// sleep(random(200, 700));
//
// log("Closing bank.");
// lumbyBank.closeBankInterface();
// CloseBankInterface();
theBank.doWithDrawAll("lax");
}
private void StoreStrings() throws InterruptedException {
log("Storing Completed Bow Strings.");
theBank.doDepositAll("Bow string", "Store All", 28);
}
private RGBCluster spinner = new RGBCluster(new RGB[] { new RGB(122, 83, 12) }, this);
private void spinFlax() throws InterruptedException {
int i = 0;
while (true) {
spinner.gatherNewPoints(20);
if(!spinner.doTopTextAndMenu("Spinning", "Spin Spinning")) {
i++;
} else {
break;
}
if(i>=10) { // 10 times and we couldnt find it DIE!!!!!!!
error("Couldn't find staircase!");
shutDown();
break;
}
rsleep(500,1000);
}
}
private RGBCluster bankStairs = new RGBCluster(new RGB[] { new RGB(80, 54,8) }, this);
private void DownStairs() throws InterruptedException {
int i = 0;
while (true) {
bankStairs.gatherNewPoints(20);
if(!bankStairs.doTopTextAndMenu("Staircase", "down")) {
rsleep(500,1000);
i++;
} else {
break;
}
if(i>=10) { // 10 times and we couldnt find it DIE!!!!!!!
error("Couldn't find staircase!");
shutDown();
break;
}
rsleep(500,1000);
}
}
private RGBCluster spinnerStairs = new RGBCluster(new RGB[] { new RGB(74, 50, 8) }, this);
private void UpStairs() throws InterruptedException {
int i = 0;
while (true){
spinnerStairs.gatherNewPoints(20);
if(!spinnerStairs.doTopTextAndMenu("Staircase", "up Staircase")) {
i++;
} else {
break;
}
if(i>=10) { // 10 times and we couldnt find it DIE!!!!!!!
error("Couldn't find staircase!");
shutDown();
break;
}
rsleep(1500,2000);
}
}
}