import impsoft.nexus.bots.color.methods.ColorRandom; import impsoft.nexus.bots.color.methods.StaticColorMethods; import impsoft.nexus.bots.color.scriptobjects.MiniMap; import impsoft.nexus.bots.color.scriptobjects.NPCChat; import impsoft.nexus.bots.color.scriptobjects.RGBXY; import impsoft.nexus.bots.color.scriptobjects.Timer; import impsoft.nexus.bots.reflection.scriptobjects.walking.AryanPath; import impsoft.nexus.bots.reflection.scriptobjects.walking.AryanTile; import impsoft.nexus.storage.SettingsManager; import java.awt.event.KeyEvent; import impsoft.nexus.bots.color.methods.InventoryMethods; import impsoft.nexus.bots.color.constants.Areas; import impsoft.nexus.bots.color.constants.Compass; import impsoft.nexus.bots.color.constants.Info; import impsoft.nexus.bots.color.methods.ColorScript; import java.awt.Rectangle; import impsoft.nexus.bots.color.scriptobjects.Menu; import impsoft.nexus.bots.color.scriptobjects.RGB; import impsoft.nexus.bots.color.scriptobjects.RGBCluster; import impsoft.nexus.bots.color.scriptobjects.XY; public class fattyRunner extends ColorScript{ public static double version = 1.0; //This line contains the version of your script. public static String[] commands = new String[] { "FattyRunner" }; //This line lists the arguments. public String author = "FattyBank"; //This line contains the author of the script. public String description = "Conquers Tut-Island"; //This is the description of your script. public boolean doStart(String cmd, String[] args) throws InterruptedException { return true; //This function must return true and is standard in all iBot scripts. } public void script() throws InterruptedException { log("Starting script..."); sleep(1500); int i; stopAllRandoms(); sleep(500); String ClickHereContinue = "ClickHereContinue"; startRandom(ClickHereContinue); {//Male/Female???//////////// Rectangle buttonLocation; if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(334, 278, 60, 27); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(426, 278, 60, 27); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } }/////////End of Male/Female Pick //////////////HEAD - 1////////////////////////// { int x = 36; int q = 150; { Rectangle buttonLocation; int w = 0; int z = Random(4); if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } //////////////////JAW - 2///////////////////////// { Rectangle buttonLocation; int w = 1; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } ///////////////////TORSO - 3//////////////////////// { Rectangle buttonLocation; int w = 2; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } ///////////////////ARM - 4//////////////////////// { Rectangle buttonLocation; int w = 3; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } ///////////////////HAND - 5//////////////////////// { Rectangle buttonLocation; int w = 4; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } ///////////////////LEG - 6//////////////////////// { Rectangle buttonLocation; int w = 5; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 80 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } } // Done selecting for first column first column // Second Column Selections { int x = 335; int q = 448; //////////////////HAIR - 1///////////// { Rectangle buttonLocation; int w = 0; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } ///////////////////TORSO - 2////////////// { Rectangle buttonLocation; int w = 1; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } //////////////////LEGS - 3////////////////// { Rectangle buttonLocation; int w = 2; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } /////////////////FEET - 4///////////////////// { Rectangle buttonLocation; int w = 3; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } /////////////////SKIN - 5//////////////////// { Rectangle buttonLocation; int w = 4; int z = Random(4); { if ((int)(Math.random()*100)%2 == 0) { buttonLocation = new Rectangle(x, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } else { buttonLocation = new Rectangle(q, 85 + (35*w), 35, 20); mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } for(i = 0; i < z; i++){ mouseMove(buttonLocation); mouseClickLeft(buttonLocation); } } } }//////////End second column////////////////// ///////////////////ACCEPT?//////////////// { mouseMove(new Rectangle(228, 271, 64, 29)); mouseClickLeft(new Rectangle(228, 271, 64, 29)); sleep(1500); log("Character created!!!"); } findAndTalkToGuide(); } public void findAndTalkToGuide() throws InterruptedException { log("Finding Guide"); String ClickHereContinue = "ClickHereContinue"; startRandom(ClickHereContinue); talkToGuide(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 10); } private void talkToGuide(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) {//can always use an int so it scritpt never dies XY guideLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (guideLocation != null) { mouseMove(guideLocation.x + xOff, guideLocation.y + 20); // ^Makes it so that even if another character is in the way the guide is still found sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); sleep(2000); clickContinue("rdm", 1, 1); } else { npcMenu.exit(); } } } else { } } } } public void clickContinue(String ClickHereContinue, int i, int z) throws InterruptedException { log("Click sht"); Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 6; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } sleep(5000); mouseClickLeft(Info.TAB_OPTIONS_RECTANGLE); script3(); } public void script3() throws InterruptedException { sleep(1500); talkToGuide2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 10); } private void talkToGuide2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { // /Now talk to guide again mouseMove(Info.TAB_OPTIONS_RECTANGLE); sleep(500); mouseClickLeft(Info.TAB_OPTIONS_RECTANGLE); mouseMove(714, 228); sleep(1500); mouseClickLeft(714, 228); sleep(500); log("Talking to guide AGAIN"); int i = 1; while (i == 1) { XY guideLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (guideLocation != null) { mouseMove(guideLocation.x + xOff, guideLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { log("Talking to Guide"); waitTillStopMoving(); clickContinue2("rdm", 0); } else { npcMenu.exit(); } } } else { } } } } public void clickContinue2(String ClickHereContinue, int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 4; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } sleep(5000); mouseClickLeft(Info.TAB_OPTIONS_RECTANGLE); script5(); } public void script5() throws InterruptedException { sleep(1500); openDoor(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 10); } private void openDoor(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { sleep(1000); int i = 1; while (i == 1) { XY doorLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (doorLocation != null) { mouseMove(doorLocation.x + xOff, doorLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains("Open")) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains("Open")) { waitTillStopMoving(); surivalExpert(); } else { npcMenu.exit(); } } } else { } } } } public void surivalExpert() throws InterruptedException { log("Walking to Suvival Expert"); sleep(1500); surivalExpert2(new RGB(250, 247, 26), 10); } private void surivalExpert2(RGB rgb, int tolerance) throws InterruptedException { int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), rgb, Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { //MMClick(mmArrow); mouseClickLeft(mmArrow); waitTillStopMoving(); clickSurvivalExpert(); return; } } } public void clickSurvivalExpert() throws InterruptedException { sleep(1500); clickSurvivalExpert2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 10); } private void clickSurvivalExpert2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { // /Now talk to guide again new Rectangle(225, 190, 545, 234); log("Talking to guide"); int qwe = 1; while (qwe == 1) { XY guideLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (guideLocation != null) { mouseMove(guideLocation.x + xOff, guideLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { log("Talking to Guide"); waitTillStopMoving(); sleep(10000); mouseClickLeft(Info.TAB_INVENTORY_RECTANGLE, 0); chopTree(); return; } else { npcMenu.exit(); } } } else { log("Top Text " + getTopText() + " is not correct"); } } } } public void chopTree() throws InterruptedException { sleep(1500); RGBCluster trees = new RGBCluster(new RGB[]{new RGB(59, 41, 33)}, this); while (inventoryCount()!=4) { trees.gatherNewPoints(10); if (trees.doTopTextAndMenu("Chop", "Chop")){ waitTillStopMoving(); sleep(defaultmaxAgeInMillisecs * 3); inventoryCount(); sleep(5000); if (inventoryCount()==4){ makeDaFire(); return;} log("1"); } } } public void makeDaFire() throws InterruptedException{ int i = 1; while (i == 1){ sleep(4500); mouseClickLeft(Info.TAB_INVENTORY_RECTANGLE); mouseMove(getInventorySlotRectangle(2)); mouseClickLeft(getInventorySlotRectangle(2)); sleep(500); mouseMove(getInventorySlotRectangle(3)); mouseClickLeft(getInventorySlotRectangle(3)); sleep(6500);//FirstFire Made hoverMouseOverInventoryIndex(3); if (getTopText().contains("Use")) { log("Fire failed, waiting till fire dies"); sleep(30000); }else{ log("Fire made"); i++; } } waitTillStopMoving(); sleep(15000); mouseMove(Info.TAB_STATS_RECTANGLE); mouseClickLeft(Info.TAB_STATS_RECTANGLE); sleep(500); mouseMove(Info.TAB_INVENTORY_RECTANGLE); mouseClickLeft(Info.TAB_INVENTORY_RECTANGLE); sleep(500); mouseMove(Info.TAB_STATS_RECTANGLE); mouseClickLeft(Info.TAB_STATS_RECTANGLE); sleep(500); mouseMove(Info.TAB_INVENTORY_RECTANGLE); mouseClickLeft(Info.TAB_INVENTORY_RECTANGLE); sleep(1500); talkExpert(); } public void talkExpert() throws InterruptedException { sleep(1500); talkExpert2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 10); } private void talkExpert2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { ///Now talk to guide again log("Talking to guide AGAIN"); int chatter = 1; while (chatter == 1) { XY guideLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (guideLocation != null) { mouseMove(guideLocation.x + xOff, guideLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); findFish(); return; } else { npcMenu.exit(); } } } else { } } } } public void findFish() throws InterruptedException { log("Walking to Fishing vicinity"); sleep(1500); findFish2(new RGB(250, 247, 26), 10); } private void findFish2(RGB rgb, int tolerance) throws InterruptedException { int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), rgb, Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { //MMClick(mmArrow); mouseClickLeft(mmArrow); waitTillStopMoving(); fish(); return; } } } public void fish() throws InterruptedException { sleep(1500); fish2(new RGB(160, 192, 236), 0, 0, "Net", "Net", 10, 1); } private void fish2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance, int ff) throws InterruptedException { log("Fishing"); while (inventoryCount()!=9){ XY fishLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (fishLocation != null) { mouseMove(fishLocation.x + xOff, fishLocation.y + 1); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); sleep(defaultmaxAgeInMillisecs * 3); inventoryCount(); sleep(5000); if (inventoryCount()==9){ makeFire(); return; } log("1"); } else { npcMenu.exit(); } } } else { } } } } public void makeFire() throws InterruptedException { sleep(1500); makeFire2( 0, 0, "-> Fire", "-> Fire", "Eat", 4, 5); } private void makeFire2(int xOff, int yOff, String menuText, String topText, String eat, int tolerance, int ff) throws InterruptedException { log("Cooking"); // sleep(3000); setTab(Info.TAB_INVENTORY); hoverMouseOverInventoryIndex(2); mouseClickLeft(getInventorySlotRectangle(2)); hoverMouseOverInventoryIndex(4); mouseClickLeft(getInventorySlotRectangle(4)); sleep(4000); //////// /FIRE MADE////////////// while (ff != 9){ hoverMouseOverInventoryIndex(ff); mouseClickLeft(getInventorySlotRectangle(ff)); sleep(5000); XY fireLocation = findXYspiral(getColorArray2d(), new RGB(58, 46, 0), Areas.GAME, tolerance, tolerance, tolerance); if (fireLocation != null) { mouseMove(fireLocation.x + xOff, fireLocation.y); mouseClickRight(fireLocation.x + xOff, fireLocation.y); waitTillStopMoving(); Menu fireMenu = getMenu(Areas.GAME, 2000); if (fireMenu != null) { if (fireMenu.selectContains(menuText)) { sleep(4000); waitTillStopMoving(); hoverMouseOverInventoryIndex(ff-1); sleep(1000); if (getTopText().contains(eat)) { walkToFirstGate(); return; }else { ff++; } } else { fireMenu.exit(); } }else {//Belongs to the second if command } }else{ log("null"); } } } public void walkToFirstGate() throws InterruptedException { sleep(1500); int yy = 1; while (yy == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { mouseClickLeft(mmArrow); waitTillStopMoving(); clickGate(); return; } } } public void clickGate() throws InterruptedException { sleep(1500); clickGate2(new RGB(250, 247, 34), 0, 0, "Open", "Open", 10, 1); } private void clickGate2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance, int gt) throws InterruptedException { setCompass(Compass.EAST); while (gt == 1) { XY gateLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (gateLocation != null) { mouseMove(gateLocation.x + xOff, gateLocation.y + 5); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { mouseClickRight(currentMouseX(), currentMouseY()); Menu gateMenu = getMenu(Areas.GAME, 2000); if (gateMenu != null) { if (gateMenu.selectContains(menuText)) { arrowMMOnExit(); return; } else { gateMenu.exit(); } } } else { } } } } public void arrowMMOnExit() throws InterruptedException{ int qw = 1; setCompass(Compass.NORTH); while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { mouseClickLeft(mmArrow); waitTillStopMoving(); secondDoorLocation(); return; } } } public void secondDoorLocation() throws InterruptedException{ int i = 1; setCompass(Compass.EAST); while (i == 1) { XY doorLocation = findXYspiral(getColorArray2d(), new RGB(250, 247, 34), Areas.GAME); if (doorLocation != null) { mouseMove(doorLocation.x, doorLocation.y + 13); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains("Open")) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains("Open")) { waitTillStopMoving(); dropInventory(); } else { npcMenu.exit(); } } } else { } } } } public void dropInventory() throws InterruptedException { String drop = "Drop"; inventoryCount(); int ic = inventoryCount() + 1; setCompass(Compass.NORTH); while (ic!=0){ sleep(2000); mouseMove(getInventorySlotRectangle(ic)); mouseClickRight(getInventorySlotRectangle(ic)); sleep(1000); Menu itemMenu = getMenu(Areas.INVENTORY, 2000); if (itemMenu.selectContains(drop)) { sleep(700); ic--; if (inventoryCount() == 0){ talkToChef(); return; } log("1"); }else{ itemMenu.selectContains("Cancel"); ic--; } } } public void talkToChef() throws InterruptedException { talkToChef2(new RGB(250, 247, 34), 0, 0, "Talk", "Master", 1); } private void talkToChef2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; sleep(2500); log("talking to chef"); while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains("Talk")) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu chefsMenu = getMenu(Areas.GAME, 2000); if (chefsMenu != null) { if (chefsMenu.selectContains(menuText)) { waitTillStopMoving(); sleep(2000); clickContinue3("rdm", 0); } else { chefsMenu.exit(); } } } } } } public void clickContinue3(String ClickHereContinue, int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 5; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } sleep(700); makeDough(); } public void makeDough() throws InterruptedException { hoverMouseOverInventoryIndex(1); mouseClickLeft(getInventorySlotRectangle(1)); sleep(700); hoverMouseOverInventoryIndex(2); mouseClickLeft(getInventorySlotRectangle(2)); sleep(1000); findRange(); } public void findRange() throws InterruptedException{ int qw = 1; log("Finding Range"); setCompass(Compass.SOUTH); while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { mouseClickLeft(mmArrow); waitTillStopMoving(); useDoughOnRange(); } } } public void useDoughOnRange() throws InterruptedException { useDoughOnRange2(new RGB(250, 247, 34), 0, 0, "Use", "Use Bread dough -> Range", 1); } private void useDoughOnRange2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY rangeLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (rangeLocation != null) { hoverMouseOverInventoryIndex(3); mouseClickLeft(getInventorySlotRectangle(3)); sleep(2000); mouseMove(rangeLocation.x, rangeLocation.y + 10); log("about to sleep"); sleep(2000); if (getTopText().contains(topText)) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); sleep(2000); clickJukeBox(); } else { npcMenu.exit(); } } } }else{ log("null"); } } } public void clickJukeBox() throws InterruptedException { sleep(1000); setTab(Info.TAB_MUSIC); sleep(500); findDoorOnMM(); } public void findDoorOnMM() throws InterruptedException{ int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { mouseClickLeft(mmArrow); waitTillStopMoving(); secondDoorLocation2(); } } } public void secondDoorLocation2() throws InterruptedException{ int i = 1; setCompass(Compass.EAST); while (i == 1) { XY doorLocation = findXYspiral(getColorArray2d(), new RGB(250, 247, 34), Areas.GAME); if (doorLocation != null) { mouseMove(doorLocation.x, doorLocation.y + 13); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains("Open")) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains("Open")) { waitTillStopMoving(); clickEmoteTab(); } else { npcMenu.exit(); } } } } } } public void clickEmoteTab() throws InterruptedException { setCompass(Compass.NORTH); sleep(1000); mouseMove(Info.TAB_CONTROLS_RECTANGLE); mouseClickLeft(Info.TAB_CONTROLS_RECTANGLE); sleep(500); //Make clicking emote a rectangle instead or cordinates!!! //mouseMove(new Rectangle(567, 216, 200, 173)); //mouseClickLeft(new Rectangle(567, 216, 200, 173)); mouseMove(574, 228); mouseClickLeft(574, 228); sleep(1600); mouseMove(Info.TAB_OPTIONS_RECTANGLE); mouseClickLeft(Info.TAB_OPTIONS_RECTANGLE); sleep(800); mouseClickLeft(new Rectangle(630, 414, 35, 35)); sleep(700); mouseClickLeft(575, 231); sleep(1700); walkToRedArrowOnMM(); } public void walkToRedArrowOnMM() throws InterruptedException { sleep(1500); walkToRedArrowOnMM2(new RGB(255, 0, 0), 1); } private void walkToRedArrowOnMM2(RGB rgb, int tolerance) throws InterruptedException { int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), rgb, Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { mouseClickLeft(mmArrow); waitTillStopMoving(); walkToRedArrowAgain(); return; } } } public void walkToRedArrowAgain() throws InterruptedException { sleep(1500); walkToRedArrowAgain2(new RGB(255, 0, 0), 1); } private void walkToRedArrowAgain2(RGB rgb, int tolerance) throws InterruptedException { int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), rgb, Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { mouseClickLeft(mmArrow); waitTillStopMoving(); clickNurmalMM(); return; } } } public void clickNurmalMM() throws InterruptedException { sleep(1500); clickNurmalMM2(new RGB(250, 247, 26), 10); } private void clickNurmalMM2(RGB rgb, int tolerance) throws InterruptedException { int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), rgb, Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { mouseClickLeft(mmArrow); waitTillStopMoving(); clickYetAnotherDoor(); return; } } } public void clickYetAnotherDoor() throws InterruptedException{ int i = 1; while (i == 1) { XY doorLocation = findXYspiral(getColorArray2d(), new RGB(250, 247, 34), Areas.GAME); if (doorLocation != null) { mouseMove(doorLocation.x, doorLocation.y + 13); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains("Open")) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains("Open")) { waitTillStopMoving(); talkQuestGuide(); } else { npcMenu.exit(); } } } } } } public void talkQuestGuide() throws InterruptedException { talkQuestGuide2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkQuestGuide2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { log("Talking to Quest Guide"); int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); sleep(2000); clickContinuehj("rdm", 0); } else { npcMenu.exit(); } } } } } } public void clickContinuehj(String ClickHereContinue, int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); sleep(6000); for(i = 0; i < 2; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } sleep(700); clickQuestTab(); } public void clickQuestTab() throws InterruptedException { sleep(600); mouseMove(Info.TAB_QUESTS_RECTANGLE); mouseClickLeft(Info.TAB_QUESTS_RECTANGLE); sleep(1500); talkQuestGuideAgain(); } public void talkQuestGuideAgain() throws InterruptedException { talkQuestGuideAgain2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkQuestGuideAgain2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); sleep(2000); clickContinuegj(0); } else { npcMenu.exit(); } } } } } } public void clickContinuegj(int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 6; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } sleep(700); clickLaderMM(); } public void clickLaderMM() throws InterruptedException { sleep(1500); clickLaderMM2(new RGB(250, 247, 26), 10); } private void clickLaderMM2(RGB rgb, int tolerance) throws InterruptedException { int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), rgb, Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { sleep(2000); mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); waitTillStopMoving(); ladderLocation(); return; } } } public void ladderLocation() throws InterruptedException{ int i = 1; setCompass(Compass.SOUTH); while (i == 1) { XY ladderLocation = findXYspiral(getColorArray2d(), new RGB(250, 247, 34), Areas.GAME); if (ladderLocation != null) { mouseMove(ladderLocation.x, ladderLocation.y); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains("Climb")) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains("Climb")) { waitTillStopMoving(); setCompass(Compass.NORTH); dropingDas(); return; } else { npcMenu.exit(); } } } } } } public void dropingDas() throws InterruptedException { log("Droping Inventory"); String drop = "Drop"; inventoryCount(); int ic = inventoryCount() + 1; while (ic!=0){ sleep(2000); mouseMove(getInventorySlotRectangle(ic)); mouseClickRight(getInventorySlotRectangle(ic)); sleep(1000); Menu itemMenu = getMenu(Areas.INVENTORY, 2000); if (itemMenu.selectContains(drop)) { sleep(700); ic--; if (inventoryCount() == 0){ arrowMMInCaves(); return; } log("1"); }else{ itemMenu.selectContains("Cancel"); ic--; } } } public void arrowMMInCaves() throws InterruptedException { log("starting"); mouseMove(new Rectangle (640, 156, 17, 1)); mouseClickLeft(new Rectangle (640, 156, 17, 1)); waitTillStopMoving(); arrowMMInCave(); } public void arrowMMInCave() throws InterruptedException{ int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 0); if (mmArrow != null) { mouseClickLeft(mmArrow); waitTillStopMoving(); mouseClickLeft(Info.TAB_INVENTORY_RECTANGLE, 0); sleep(700); clickMiningExpert(); return; } } } public void clickMiningExpert() throws InterruptedException { sleep(1500); clickMiningExpert2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 10); } private void clickMiningExpert2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { log("Talking Mining Instructor"); stopAllRandoms(); int qwe = 1; while (qwe == 1) { XY guideLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (guideLocation != null) { mouseMove(guideLocation.x + xOff, guideLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { log("Talking to Guide"); waitTillStopMoving(); sleep(1500); checkTalk(); return; } else { npcMenu.exit(); } } } } } } public void checkTalk() throws InterruptedException { XY hatLocation = findXYspiral(getColorArray2d(), new RGB (139, 68, 143), Areas.CHAT, 10,10,10); if (hatLocation == null) { clickMiningExpert2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 10); }else{ clickContinueCave(0); } } public void clickContinueCave(int i) throws InterruptedException { //startRandom("ClickHereContinue"); Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); log("Clicking Continue"); for(i = 0; i < 4; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } sleep(1000); arrowMMInCave2(); } public void arrowMMInCave2() throws InterruptedException{ log("Finding Arrow in MM 2"); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); sleep(700); prospectTin(); return; } } } public void prospectTin() throws InterruptedException { log("Pospecting Tin"); RGBCluster tin = new RGBCluster(new RGB[]{new RGB(125, 116, 116)}, this); tin.gatherNewPoints(10); tin.doTopTextAndMenu("Mine", "Prospect"); sleep(700); arrowMMInCave3(); } public void arrowMMInCave3() throws InterruptedException{ log("Arrow in MM 3"); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); sleep(700); prospectCopper(); }else{ log("null"); } } } public void prospectCopper() throws InterruptedException { log("Prospecting Copper"); RGBCluster copper = new RGBCluster(new RGB[]{new RGB(125, 96, 70)}, this); sleep(3000); int qw = 1; while (qw == 1) { copper.gatherNewPoints(10); if (copper != null) { copper.doTopTextAndMenu("Mine", "Prospect"); sleep(700); arrowMMInCave4(); }else{ log("Copper = null"); } } } public void arrowMMInCave4() throws InterruptedException{ log("Arrow in MM 4"); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); sleep(700); clickMiningExpertAgain(); return; } } } public void clickMiningExpertAgain() throws InterruptedException { sleep(1500); clickMiningExpertAgain2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 10); } private void clickMiningExpertAgain2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { log("Talking Mining Instructor"); int qwe = 1; while (qwe == 1) { XY guideLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (guideLocation != null) { mouseMove(guideLocation.x + xOff, guideLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { log("Talking to Guide"); waitTillStopMoving(); sleep(1500); clickContinueCave2(0); return; } else { npcMenu.exit(); } } } } } } public void clickContinueCave2(int i) throws InterruptedException { log("Click continue Cave2"); Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 5; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } sleep(1000); mineTin(); } public void mineTin() throws InterruptedException { log("Mining Tin"); RGBCluster tin = new RGBCluster(new RGB[]{new RGB(125, 116, 116)}, this); tin.gatherNewPoints(10); tin.doTopTextAndMenu("Mine", "Mine"); sleep(2700); log("Done mining tin"); arrowMMInCave5(); } public void arrowMMInCave5() throws InterruptedException{ log("Arrow in MM 5"); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); sleep(700); mineCopper(); return; } } } public void mineCopper() throws InterruptedException { log("Mining Copper"); RGBCluster copper = new RGBCluster(new RGB[]{new RGB(125, 96, 70)}, this); copper.gatherNewPoints(10); copper.doTopTextAndMenu("Mine", "Mine"); sleep(2700); log("Done mining copper"); arrowMMInCave7(); return; } public void arrowMMInCave7() throws InterruptedException{ log("Arrow in MM Cave7"); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); sleep(700); smeltBar(); return; } } } public void smeltBar() throws InterruptedException { log("Smelt Bar"); int x = 1; //setCompass(Compass.SOUTH); hoverMouseOverInventoryIndex(3); sleep(700); mouseClickLeft(getInventorySlotRectangle(3)); sleep(1000); while (x == 1){ //RGBCluster fredy = new RGBCluster(new RGB[]{new RGB(157, 46, 26)}, this); //fredy.gatherNewPoints(10); //fredy.doTopTextAndMenu("Furnace", "Use"); XY smelter = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.GAME, 0, 0, 10); if (smelter != null) { mouseMove(smelter); sleep(700); mouseClickRight(currentMouseX(), currentMouseY()); sleep(700); Menu smelterMenu = getMenu(Areas.GAME, 2000); smelterMenu.selectContains("Use"); sleep(3500); startRandom("ClickHereContinue"); sleep(1000); sleep(1000); arrowMMInCave8(); } } } public void arrowMMInCave8() throws InterruptedException{ log("Arrow in MM Cave8"); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); sleep(700); talkDude(); return; } } } public void talkDude() throws InterruptedException { sleep(1500); talkDude2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 10); } private void talkDude2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { log("Talking Mining Instructor (Talk Dude)"); int qwe = 1; while (qwe == 1) { XY guideLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (guideLocation != null) { mouseMove(guideLocation.x + xOff, guideLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { log("Talking to Guide"); waitTillStopMoving(); sleep(1500); clickContinueCaveBa(0); return; } else { npcMenu.exit(); } } } } } } public void clickContinueCaveBa(int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 4; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } sleep(1000); arrowMMInCave9(); } public void arrowMMInCave9() throws InterruptedException{ int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); makeBar(); return; } } } public void makeBar() throws InterruptedException{ hoverMouseOverInventoryIndex(2); mouseClickLeft(getInventorySlotRectangle(2)); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.GAME, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); mouseClickRight(currentMouseX(), currentMouseY() + 13); waitTillStopMoving(); Menu anvilMenu = getMenu(Areas.GAME, 2000); if (anvilMenu != null) { if (anvilMenu.selectContains("bar -> Anvil")) { waitTillStopMoving(); sleep(2500); hoverMouseOverShopIndex(1); sleep(1000); mouseMove(getShopSlotRectangle(1));//actually slot 2 sleep(1000); mouseClickLeft(currentMouseX() - 78, currentMouseY()); sleep(6500); redFenceInMM(); return; } else { anvilMenu.exit(); } } } } } public void redFenceInMM() throws InterruptedException{ log("Red Fence in MM"); int qw = 1; while (qw == 1) { XY redFence = findXYspiral(getColorArray2d(), new RGB(240, 0, 0), Areas.MINI_MAP, 10, 10, 10); if (redFence != null) { mouseMove(redFence); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); sleep(700); setCompass(Compass.EAST); openSecondGate(); return; } } } public void openSecondGate() throws InterruptedException{ int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.GAME, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); mouseClickRight(currentMouseX(), currentMouseY() + 13); waitTillStopMoving(); Menu gateMenu = getMenu(Areas.GAME, 2000); if (gateMenu != null) { if (gateMenu.selectContains("Open")) { //waitTillStopMoving(); redFenceInMM(); return; } else { gateMenu.exit(); } } } } } public void arrowMMInCombat1() throws InterruptedException{ int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); talkCombatInstructor(); return; } } } public void talkCombatInstructor() throws InterruptedException { talkCombatInstructor2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkCombatInstructor2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); sleep(2000); clickContinueCombat1(0); } else { npcMenu.exit(); } } } } } } public void clickContinueCombat1(int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 4; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } sleep(1000); equipDagger(); } public void equipDagger() throws InterruptedException { sleep(600); setTab(Info.TAB_EQUIPMENT); mouseMove(new Rectangle (580, 416, 135, 31)); mouseClickLeft(new Rectangle (580, 416, 135, 31)); doActionAtInventory("Wear Bronze dagger", "Wear Bronze dagger", 7); closeShopInterface(); talkCombatInstructor3(); } public void talkCombatInstructor3() throws InterruptedException { talkCombatInstructor4(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkCombatInstructor4(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); sleep(2000); clickContinueCombat2(0); } else { npcMenu.exit(); } } } } } } public void clickContinueCombat2(int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 2; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } unEquipDagger(); } public void unEquipDagger() throws InterruptedException { setTab(Info.TAB_EQUIPMENT); mouseMove(new Rectangle (580, 416, 135, 31)); mouseClickLeft(new Rectangle (580, 416, 135, 31)); mouseMove(new Rectangle (35, 157, 26, 25)); mouseClickRight(new Rectangle (35, 157, 26, 25)); Menu daggerMenu = getMenu(Areas.GAME, 2000); daggerMenu.selectContains("Remove"); doActionAtInventory("Wear Wooden shield", "Wear Wooden shield", 7); doActionAtInventory("Wear Bronze sword", "Wear Bronze sword", 7); closeShopInterface(); setTab(Info.TAB_ATTACK); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); enterRatPit(); return; } } } public void enterRatPit() throws InterruptedException { //int qw = 1; //while (qw == 1) { log("Entering Rat Ring"); //XY startLocation = new XY(getLocation().x, getLocation().y); RGBCluster gate = new RGBCluster(new RGB[]{new RGB(155, 144, 144)}, this); gate.gatherNewPoints(10); gate.doTopTextAndMenu("Open", "Open Gate"); waitTillStopMoving(); /*XY endLocation = new XY(getLocation().x, getLocation().y); if (startLocation != endLocation){ log("We are in Rat Pit"); killRats(); } }*/ killRats(); } public void killRats() throws InterruptedException { RGBCluster rat = new RGBCluster(new RGB[]{new RGB(150, 150, 139)}, this); rat.gatherNewPoints(10); rat.doTopTextAndMenu("Attack", "Attack"); fightingRat(); } private boolean inFight() throws InterruptedException { Rectangle HitBox = new Rectangle(210, 110, 300, 175); XY GreenHealthBar = findXY(getColorArray2d(), new RGB(0, 255, 0), HitBox); if (GreenHealthBar != null) { return true; } else { return false; } } public void fightingRat() throws InterruptedException { int i = 1; while (i == 1){ if(inFight() == true){ log("In Fight"); sleep(3000); }else{ log("Fight over"); redFenceInMM2(); } } } public void redFenceInMM2() throws InterruptedException{ log("Red Fence in MM"); int qw = 1; while (qw == 1) { XY redFence = findXYspiral(getColorArray2d(), new RGB(240, 0, 0), Areas.MINI_MAP, 10, 10, 10); if (redFence != null) { mouseMove(redFence); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); exitRatPit(); } } } public void exitRatPit() throws InterruptedException { //int qw = 1; //while (qw == 1) { log("Leaving Rat Ring"); //XY startLocation = new XY(getLocation().x, getLocation().y); RGBCluster gate = new RGBCluster(new RGB[]{new RGB(155, 144, 144)}, this); gate.gatherNewPoints(10); gate.doTopTextAndMenu("Open", "Open Gate"); waitTillStopMoving(); /*XY endLocation = new XY(getLocation().x, getLocation().y); if (startLocation != endLocation){ log("We are in Rat Pit"); killRats(); } }*/ arrowMMInCombat2(); } public void arrowMMInCombat2() throws InterruptedException{ int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); talkCombatInstructor5(); return; } } } public void talkCombatInstructor5() throws InterruptedException { talkCombatInstructor6(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkCombatInstructor6(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); clickContinueCombat3(0); } else { npcMenu.exit(); } } } } } } public void clickContinueCombat3(int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 4; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } setTab(Info.TAB_INVENTORY); doActionAtInventory("Wield Bronze arrow", "Wield Bronze arrow", 7); doActionAtInventory("Wield Shortbow", "Wield Shortbow", 7); redFenceInMM3(); } public void redFenceInMM3() throws InterruptedException{ log("Red Fence in MM"); int qw = 1; while (qw == 1) { XY redFence = findXYspiral(getColorArray2d(), new RGB(240, 0, 0), Areas.MINI_MAP, 10, 10, 10); if (redFence != null) { mouseMove(redFence); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); killRats2(); } } } public void killRats2() throws InterruptedException { RGBCluster rat = new RGBCluster(new RGB[]{new RGB(150, 150, 139)}, this); rat.gatherNewPoints(10); rat.doTopTextAndMenu("Attack", "Attack"); XY ladder = findXYspiral(getColorArray2d(), new RGB(65, 38, 0), Areas.MINI_MAP, 10, 10, 10); mouseMove(ladder); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); RGBCluster ladder2 = new RGBCluster(new RGB[]{new RGB(72, 48, 0)}, this); ladder2.gatherNewPoints(6); ladder2.doTopTextAndMenu("Climb", "Climb"); arrowMMInBank(); } public void arrowMMInBank() throws InterruptedException{ int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); RGBCluster bank = new RGBCluster(new RGB[]{new RGB(150, 150, 139)}, this); bank.gatherNewPoints(10); bank.doTopTextAndMenu("Use", "Use"); mouseMove(new Rectangle(220, 393, 10, 7)); mouseClickLeft(currentMouseX(), currentMouseY()); doActionAtInventory("Store 1", "Store 1", 8); closeShopInterface(); bankDoorLocation(); return; } } } public void bankDoorLocation() throws InterruptedException{ int i = 1; while (i == 1) { XY doorLocation = findXYspiral(getColorArray2d(), new RGB(250, 247, 34), Areas.GAME); if (doorLocation != null) { mouseMove(doorLocation.x, doorLocation.y + 13); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains("Open")) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains("Open")) { waitTillStopMoving(); talkFinancialAdvisor(); } else { npcMenu.exit(); } } } else { } } } } public void talkFinancialAdvisor() throws InterruptedException { talkFinancialAdvisor2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkFinancialAdvisor2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); clickContinueFinacial(0); } else { npcMenu.exit(); } } } } } } public void clickContinueFinacial(int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 9; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } bankDoorLocation2(); } public void bankDoorLocation2() throws InterruptedException{ int i = 1; while (i == 1) { XY doorLocation = findXYspiral(getColorArray2d(), new RGB(250, 247, 34), Areas.GAME); if (doorLocation != null) { mouseMove(doorLocation.x, doorLocation.y + 13); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains("Open")) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains("Open")) { waitTillStopMoving(); bottomMMToChapel(); } else { npcMenu.exit(); } } } else { } } } } public void bottomMMToChapel() throws InterruptedException { log("starting"); mouseMove(new Rectangle (640, 156, 17, 1)); mouseClickLeft(new Rectangle (640, 156, 17, 1)); waitTillStopMoving(); openChapelDoor(); } public void openChapelDoor() throws InterruptedException { openChapelDoor2(new RGB(124, 89, 56), 0, 0, "Large door", 10); } private void openChapelDoor2(RGB rgb, int xOff, int yOff, String topText, int tolerance) throws InterruptedException { log("Talking Mining Instructor"); int qwe = 1; while (qwe == 1) { XY guideLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (guideLocation != null) { mouseMove(guideLocation.x, guideLocation.y); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains("Open")) { log("Talking to Guide"); waitTillStopMoving(); arrowMMInChapel(); return; } /*else { npcMenu.exit(); }*/ if (npcMenu.selectContains("Close")) { openChapelDoor(); } } } } } } public void arrowMMInChapel() throws InterruptedException{ int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); talkBrother(); return; } } } public void talkBrother() throws InterruptedException { talkBrother2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkBrother2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); clickContinueBrother(0); } else { npcMenu.exit(); } } } } } } public void clickContinueBrother(int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 2; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } setTab(Info.TAB_PRAYER); talkBrother3(); } public void talkBrother3() throws InterruptedException { talkBrother4(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkBrother4(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); clickContinueBrother2(0); } else { npcMenu.exit(); } } } } } } public void clickContinueBrother2(int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 4; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } setTab(Info.TAB_FRIENDS); sleep(1000); setTab(Info.TAB_IGNORE); talkBrother5(); } public void talkBrother5() throws InterruptedException { talkBrother6(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkBrother6(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); clickContinueBrother3(0); } else { npcMenu.exit(); } } } } } } public void clickContinueBrother3(int i) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 8; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } setTab(Info.TAB_FRIENDS); sleep(1000); setTab(Info.TAB_IGNORE); arrowMMInChapel2(); } public void arrowMMInChapel2() throws InterruptedException{ log("Arrow in MM Chapel2"); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); sleep(700); chapelDoorExit(); return; } } } public void chapelDoorExit() throws InterruptedException{ int i = 1; while (i == 1) { XY doorLocation = findXYspiral(getColorArray2d(), new RGB(250, 247, 34), Areas.GAME); if (doorLocation != null) { mouseMove(doorLocation.x, doorLocation.y + 13); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains("Open")) { mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains("Open")) { waitTillStopMoving(); magicPath(); } else { npcMenu.exit(); } } } else { } } } } public void magicPath() throws InterruptedException { log("Going to Magic Instructor"); mouseMove(new Rectangle (640, 156, 17, 1)); mouseClickLeft(new Rectangle (640, 156, 17, 1)); waitTillStopMoving(); magicPath2(); } public void magicPath2() throws InterruptedException{ int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); sleep(700); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); talkMagicInstructor(); return; } } } public void talkMagicInstructor() throws InterruptedException { talkMagicInstructor2(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkMagicInstructor2(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); clickContinueMagic(0, 0); } else { npcMenu.exit(); } } } } } } public void clickContinueMagic(int i, int q) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 2; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } setTab(Info.TAB_MAGIC); sleep(1000); setTab(Info.TAB_IGNORE); for(q = 0; q < 2; q++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } arrowMMInMagic(); } public void arrowMMInMagic() throws InterruptedException{ log("Arrow in MM Magic"); int qw = 1; while (qw == 1) { XY mmArrow = findXYspiral(getColorArray2d(), new RGB(250, 247, 26), Areas.MINI_MAP, 0, 0, 10); if (mmArrow != null) { mouseMove(mmArrow); mouseClickLeft(currentMouseX(), currentMouseY()); sleep(1000); waitTillStopMoving(); sleep(700); mouseClickLeft(new Rectangle(220, 393, 10, 7)); killChicken(); }else{ log("null"); } } } public void killChicken() throws InterruptedException { RGBCluster chicken = new RGBCluster(new RGB[]{new RGB(199, 177, 138)}, this); chicken.gatherNewPoints(10); chicken.doTopTextAndMenu("Attack", "Attack");//<----FIX talkMagicInstructor3(); } public void talkMagicInstructor3() throws InterruptedException { talkMagicInstructor4(new RGB(250, 247, 34), 0, 0, "Talk", "Talk", 1); } private void talkMagicInstructor4(RGB rgb, int xOff, int yOff, String menuText, String topText, int tolerance) throws InterruptedException { int i = 1; while (i == 1) { XY chefLocation = findXYspiral(getColorArray2d(), rgb, Areas.GAME, tolerance, tolerance, tolerance); if (chefLocation != null) { mouseMove(chefLocation.x + xOff, chefLocation.y + 20); sleep(defaultmaxAgeInMillisecs * 3); if (getTopText().contains(topText)) { log("Top Text " + topText + " found"); mouseClickRight(currentMouseX(), currentMouseY()); Menu npcMenu = getMenu(Areas.GAME, 2000); if (npcMenu != null) { if (npcMenu.selectContains(menuText)) { waitTillStopMoving(); clickContinueMagic2(0, 0); } else { npcMenu.exit(); } } } } } } public void clickContinueMagic2(int i, int q) throws InterruptedException { Rectangle clickToContinue = new Rectangle(210, 440, 170, 10); for(i = 0; i < 1; i++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } mouseMove(new Rectangle(220, 393, 10, 7)); mouseClickLeft(currentMouseX(), currentMouseY()); for(q = 0; q < 5; q++){ mouseMove(clickToContinue); mouseClickLeft(clickToContinue); } log("Tutorial Island Complete"); return; } }//The last braket ALWAYS