Code:
import impsoft.nexus.bots.color.*;
import impsoft.nexus.bots.color.constants.*;
import impsoft.nexus.bots.color.scriptable.*;
import impsoft.nexus.bots.color.scriptable.components.*;
import impsoft.nexus.bots.color.scriptable.components.bottom.*;
import impsoft.nexus.bots.color.scriptable.components.gamescreen.*;
import impsoft.nexus.bots.color.scriptable.components.minimap.*;
import impsoft.nexus.bots.color.scriptable.components.tab.*;
import impsoft.nexus.bots.color.scriptable.interfaces.*;
import impsoft.nexus.bots.color.scriptable.objects.*;
import impsoft.nexus.bots.color.scriptable.objects.items.*;
import impsoft.nexus.bots.color.structures.*;
import impsoft.nexus.bots.color.util.*;
import impsoft.nexus.bots.reflection.scriptable.components.*;
import impsoft.nexus.bots.reflection.objects.*;
import impsoft.nexus.bots.reflection.structures.*;
import java.awt.*;
public class l33tCutPro extends ColorScript implements AutoPaint, ChatListener {
public l33tCutPro(ColorBot c) {
super(c);
}
// Int's
public int Coins;
public boolean NeedCoins;
public int Fights = 0;
public int Trips = 0;
public int AxeLost = 0;
public int LogsChoped = 0;
public int WcLvl = 0;
public String AxeType = "";
public int tolerance = 40;
public int Checks = 0;
public int Ents = 0;
public String TreeText;
public String TreeType = "";
public String theChat;
static final short[][][] EntTextBmp = ColorMap.load("EntBmp.bmp");
// RGB's
RGB BankBooth = new RGB(80, 61, 8);
RGB[] Door = { new RGB(104, 79, 26), new RGB(100, 74, 9),
new RGB(100, 77, 23) };
RGB[] BobRGB = { new RGB(112, 34, 26), new RGB(104, 31, 26),
new RGB(108, 31, 26) };
//
RGB[] WillowRGB = { new RGB(100, 92, 56), new RGB(91, 83, 51),
new RGB(79, 73, 44), new RGB(81, 87, 58), new RGB(75, 84, 35) };
RGB[] TreeRGB = { new RGB(143, 111, 67), new RGB(119, 92, 56),
new RGB(126, 97, 58), new RGB(146, 113, 68), new RGB(63, 76, 21),
new RGB(83, 91, 40) };
RGB[] OakRGB = { new RGB(30, 30, 8), new RGB(58, 67, 39),
new RGB(59, 72, 33) };
//
public TreeWithTreantCheck theWillow = new TreeWithTreantCheck(WillowRGB,
"illow", this);
public TreeWithTreantCheck theTree = new TreeWithTreantCheck(WillowRGB,
"ree", this);
public TreeWithTreantCheck theOak = new TreeWithTreantCheck(OakRGB, "ak",
this);
public TreeWithTreantCheck TreeChop;
// EdgeRGBCluster's
EdgeRGBCluster DoorColor = new EdgeRGBCluster(Door, this);
EdgeRGBCluster Bob = new EdgeRGBCluster(BobRGB, this);
// AryanTile's
AryanTile Bank = new AryanTile(3092, 3245);
AryanTile GenStore = new AryanTile(3211, 3249);
AryanTile AxeStoreOut = new AryanTile(3234, 3203);
//
AryanTile RunAwayWillow = new AryanTile(3160, 3285);
AryanTile RunAwayOak = new AryanTile(3211, 3246);
AryanTile RunAwayTree = new AryanTile(3199, 3245);
//
AryanTile Willow = new AryanTile(3162, 3269);
AryanTile Oak = new AryanTile(3204, 3242);
AryanTile Tree = new AryanTile(3186, 3255);
//
AryanTile TreeTile;
AryanTile TreeRun;
AryanTile AxeStoreInside = new AryanTile(3231, 3203);
// AryanPath's
AryanPath AxeStoreIn = new AryanPath(new AryanTile[] { new AryanTile(3231,
3203) }, this);
// Rectangle's
Rectangle Close = new Rectangle(482, 36, 6, 6);
Rectangle MainStock = new Rectangle(35, 68, 91, 12);
Rectangle SteelAxe = new Rectangle(187, 106, 10, 9);
Rectangle IronAxe = new Rectangle(148, 107, 9, 10);
Rectangle BronzeAxe = new Rectangle(109, 108, 11, 8);
Rectangle Slot1 = new Rectangle(571, 223, 12, 6);
Rectangle Slot3 = new Rectangle(657, 221, 10, 8);
Rectangle Yes = new Rectangle(224, 396, 66, 7);
Rectangle TopText = new Rectangle(74, 6, 50, 18);
public void script() throws InterruptedException {
CheckAxeType();
while (true) {
log("Starting loop.");
theCamera.setCameraUp();
theCompass.setNorthEast();
CheckLevel();
Walk();
Chop();
}
}
public void paint(Graphics g) {
g.setColor(Color.CYAN);
g.drawString("Thank you for using l33tCutPro, by Ckeboss! V3.15!", 4,
40);
g.drawString("You are using a " + AxeType + " axe.", 4, 60);
g.setColor(Color.GREEN);
g.drawString("You have choped " + LogsChoped + " logs!", 4, 80);
g.drawString("You have banked/sold to shop " + Trips + " times!", 4,
100);
g.drawString("You are choping a(n) " + TreeType + " tree", 4, 120);
g.setColor(Color.RED);
g.drawString("You have needed to fix your axe " + AxeLost + " times!",
4, 140);
g.drawString("You are on " + Checks + " checks.", 4, 160);
g.drawString("You have ran away from " + Ents + " ENT's", 4, 180);
g.drawString("You have ran away from combat " + Fights + " times", 4,
200);
}
public void chat(String chat) throws InterruptedException {
chat = theChat;
}
public void CheckLevel() throws InterruptedException {
WcLvl = theTabs.Statistics
.getStatBottom(StatisticsTab.STAT_WOODCUTTING);
theTabs.Options.setRun(true);
if (WcLvl < 15) {
TreeType = "Tree";
TreeTile = Tree;
TreeRun = RunAwayTree;
TreeChop = theTree;
TreeText = "Chop down tree";
}
if (WcLvl >= 15 && WcLvl < 30) {
TreeType = "Oak";
TreeTile = Oak;
TreeRun = RunAwayOak;
TreeChop = theOak;
TreeText = "Chop down oak";
}
if (WcLvl >= 30) {
TreeType = "Willow";
TreeTile = Willow;
TreeRun = RunAwayWillow;
TreeChop = theWillow;
TreeText = "Chop down willow";
}
}
public void CheckAxeType() throws InterruptedException {
if (theTabs.InventoryV3.count("Rune axe") >= 1) {
log("We have a Rune axe.");
AxeType = "Rune";
NeedCoins = true;
Coins = 427;
}
if (theTabs.InventoryV3.count("Adamant axe") >= 1) {
log("We have a Addy axe.");
AxeType = "Addy";
NeedCoins = true;
Coins = 43;
}
if (theTabs.InventoryV3.count("Mithril axe") >= 1) {
log("We have a Mith axe.");
AxeType = "Mith";
NeedCoins = true;
Coins = 18;
}
if (theTabs.InventoryV3.count("Black axe") >= 1) {
log("We have a Black axe.");
AxeType = "Black";
NeedCoins = true;
Coins = 10;
}
if (theTabs.InventoryV3.count("Steel axe") >= 1) {
log("We have a Steel axe.");
AxeType = "Steel";
}
if (theTabs.InventoryV3.count("Iron axe") >= 1) {
log("We have a Iron axe.");
AxeType = "Iron";
}
if (theTabs.InventoryV3.count("Bronze axe") >= 1) {
log("We have a Bronze axe.");
AxeType = "Bronze";
}
}
public void Walk() throws InterruptedException {
theTabs.Options.setRun(true);
theWorldMap.walkTo(TreeTile);
}
public void Chop() throws InterruptedException {
while (Fight() == false && InvFull() == false && CheckAxe() == false
&& CheckLocation() == false) {
stopRandom("MouseMover");
TreeChop.setSortingFromCenter(true);
TreeChop.doTopText(TreeText);
sleep(500);
while (Ent() == false) {
log("No ent");
sleep(500);
if (TreeChopping() == true) {
log("Still choping");
sleep(random(1000, 1500));
++Checks;
if (Checks == 15) {
startRandom("MouseMover");
Checks = 0;
doAntiBan();
}
}
if (TreeChopping() == false) {
log("Tree is down");
doAntiBan();
}
}
if (Ent() == true) {
++Ents;
doEnt();
}
}
if (Fight() == true) {
++Fights;
doFight();
}
if (InvFull() == true) {
++Trips;
doFull();
}
if (CheckAxe() == true) {
GetCoins();
FixAxe();
++AxeLost;
}
if (CheckLocation() == true) {
doLost();
}
doAntiBan();
}
public void doEnt() throws InterruptedException {
startRandom("MouseMover");
log("Theres an Ent.");
theWorldMap.walkTo(TreeRun);
sleep(random(10000, 14000));
theWorldMap.walkTo(TreeTile);
}
public void doFight() throws InterruptedException {
startRandom("MouseMover");
log("Fight");
theTabs.Options.setRun(true);
theWorldMap.walkTo(TreeRun);
sleep(random(3000, 5000));
theWorldMap.walkTo(TreeTile);
}
public void doFull() throws InterruptedException {
startRandom("MouseMover");
log("Banking");
theWorldMap.walkTo(Bank);
theBankV3.open();
theBankV2.doDepositAllButAxe();
if (theTabs.InventoryV3.getCount() < 20) {
LogsChoped = LogsChoped + 28;
script();
} else {
doFull();
}
}
public void doLost() throws InterruptedException {
startRandom("MouseMover");
theTabs.Options.setRun(true);
theWorldMap.walkTo(TreeTile);
}
public void doAntiBan() throws InterruptedException {
int AntiBan = RandomGenerator.random(0, 40);
if (AntiBan == 0) {
if (!theTabs.Attack.isSelected()) {
AttackTab();
} else {
doAntiBan();
}
} else if (AntiBan == 1) {
if (!theTabs.Controls.isSelected()) {
ControlTab();
} else {
doAntiBan();
}
} else if (AntiBan == 2) {
if (!theTabs.Equipment.isSelected()) {
EquipmentTab();
} else {
doAntiBan();
}
} else if (AntiBan == 3) {
if (!theTabs.Friends.isSelected()) {
FriendsTab();
} else {
doAntiBan();
}
} else if (AntiBan == 4) {
if (!theTabs.Ignore.isSelected()) {
IgnoreTab();
} else {
doAntiBan();
}
} else if (AntiBan == 5) {
if (!theTabs.InventoryV3.isSelected()) {
InventoryTab();
} else {
doAntiBan();
}
} else if (AntiBan == 6) {
if (!theTabs.Logout.isSelected()) {
LogoutTab();
} else {
doAntiBan();
}
} else if (AntiBan == 7) {
if (!theTabs.Magic.isSelected()) {
MagicTab();
} else {
doAntiBan();
}
} else if (AntiBan == 8) {
if (!theTabs.Music.isSelected()) {
MusicTab();
} else {
doAntiBan();
}
} else if (AntiBan == 9) {
if (!theTabs.Options.isSelected()) {
OptionsTab();
} else {
doAntiBan();
}
} else if (AntiBan == 10) {
if (!theTabs.Prayer.isSelected()) {
PrayerTab();
} else {
doAntiBan();
}
} else if (AntiBan == 11) {
if (!theTabs.Quest.isSelected()) {
QuestTab();
} else {
doAntiBan();
}
} else if (AntiBan == 12) {
if (!theTabs.Statistics.isSelected()) {
StatisticsTab();
} else {
doAntiBan();
}
} else if (AntiBan >= 13 && AntiBan < 15) {
Camera();
} else if (AntiBan >= 15 && AntiBan < 20) {
Compass();
} else {
log("No antiban.");
}
Chop();
}
public void AttackTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Attack.click();
} else {
theTabs.Attack.key();
}
}
public void ControlTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Controls.click();
} else {
theTabs.Controls.key();
}
}
public void EquipmentTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Equipment.click();
} else {
theTabs.Equipment.key();
}
}
public void FriendsTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Friends.click();
} else {
theTabs.Friends.key();
}
}
public void IgnoreTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Ignore.click();
} else {
theTabs.Ignore.key();
}
}
public void InventoryTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.InventoryV3.click();
} else {
theTabs.InventoryV3.key();
}
}
public void LogoutTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Logout.click();
} else {
theTabs.Logout.key();
}
}
public void MagicTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Magic.click();
} else {
theTabs.Magic.key();
}
}
public void MusicTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Music.click();
} else {
theTabs.Music.key();
}
}
public void OptionsTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Options.click();
} else {
theTabs.Options.key();
}
}
public void PrayerTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Prayer.click();
} else {
theTabs.Prayer.key();
}
}
public void QuestTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Quest.click();
} else {
theTabs.Quest.key();
}
}
public void StatisticsTab() throws InterruptedException {
int Random = RandomGenerator.random(1, 2);
if (Random == 1) {
theTabs.Statistics.click();
} else {
theTabs.Statistics.key();
}
}
public void Camera() throws InterruptedException {
theCamera.setCameraDown();
theCamera.setCameraUp();
}
public void Compass() throws InterruptedException {
theCompass.setTo(random(0, 360));
theCompass.setNorthEast();
}
public boolean TreeChopping() throws InterruptedException {
if (getAnimation() == -1) {
return false;
} else {
return true;
}
}
public boolean Fight() throws InterruptedException {
if (theHPBars.failSafeInCombat()) {
return true;
} else {
return false;
}
}
public boolean InvFull() throws InterruptedException {
if (theTabs.InventoryV3.isSelected() == false) {
theTabs.InventoryV3.click();
if (theTabs.InventoryV3.isFull()) {
return true;
} else {
return false;
}
} else {
if (theTabs.InventoryV3.isFull()) {
return true;
} else {
return false;
}
}
}
public boolean Ent() throws InterruptedException {
XY location = ColorMapSearch.findColorMap(getColorMap(), EntTextBmp,
TopText, tolerance);
if (location != null) {
return true;
} else {
return false;
}
}
public boolean CheckAxe() throws InterruptedException {
if (theTabs.InventoryV3.count("Broken axe") == 1) {
theTabs.InventoryV3.key();
waitTillNextFrame();
mouseMove(Slot1);
sleep(random(1000, 2000));
if (theTopText.isTopTextContaining("Broken")) {
return true;
} else {
return false;
}
} else {
return false;
}
}
public boolean CheckLocation() throws InterruptedException {
if (getLocation().distanceTo(TreeTile) > 4) {
return true;
} else {
return false;
}
}
public void GetCoins() throws InterruptedException {
if (NeedCoins = true) {
theTabs.Options.setRun(true);
theWorldMap.walkTo(Bank);
theBankV2.doDepositAllButAxe();
theBankV3.doWithDrawX("Coins", Coins);
if (theTabs.InventoryV3.countStackOf("Coins") == Coins) {
log("Walking to Bob.");
theWorldMap.walkTo(AxeStoreOut);
mouseClickLeft(theAryanTileFinder
.toOnScreenMiniMap(AxeStoreInside));
sleep(1000);
while (theMiddleMan.isMoving() == true) {
log("Still walking there.");
sleep(1000);
}
if (getLocation().distanceTo(AxeStoreInside) < 2) {
log("Walked inside fast.");
} else {
log("Opening.");
theWorldMap.walkTo(AxeStoreOut);
DoorColor.setSortingFromCenter(true);
DoorColor.doTopTextAndMenuOnMoving("Open", "Open");
theWorldMap.walkTo(AxeStoreInside);
}
} else {
log("No more coins in bank, shuting down");
shutDown();
}
} else {
log("No coins needed.");
log("Walking to Bob.");
theWorldMap.walkTo(AxeStoreOut);
mouseClickLeft(theAryanTileFinder.toOnScreenMiniMap(AxeStoreInside));
sleep(1000);
while (theMiddleMan.isMoving() == true) {
log("Still walking there.");
sleep(1000);
}
if (getLocation().distanceTo(AxeStoreInside) < 2) {
log("Walked inside fast.");
} else {
log("Opening.");
theWorldMap.walkTo(AxeStoreOut);
DoorColor.setSortingFromCenter(true);
DoorColor.doTopTextAndMenuOnMoving("Open", "Open");
theWorldMap.walkTo(AxeStoreInside);
}
}
}
public void FixAxe() throws InterruptedException {
theTabs.InventoryV3.key();
sleep(random(500, 1000));
mouseClickLeft(Slot1);
Bob.doTopText("Use Broken axe -> Bob");
sleep(random(1000, 2000));
mouseClickLeft(Yes);
sleep(random(500, 1000));
theTabs.InventoryV3.key();
mouseMove(Slot1);
sleep(random(1000, 2000));
if (theTopText.isTopTextContaining("Broken")) {
log("Tring to fix axe again");
FixAxe();
} else {
log("Axe fix worked!");
}
}
}