- ///////////////////////////
- //////////IMPORTS//////////
- ///////////////////////////
- import java.awt.BasicStroke;
- import java.awt.Color;
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import java.awt.GridLayout;
- import java.awt.Image;
- import java.awt.Point;
- import java.awt.Polygon;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import java.awt.event.MouseEvent;
- import java.awt.event.MouseMotionListener;
- import java.io.*;
- import java.net.*;
- import javax.imageio.ImageIO;
- import javax.swing.JButton;
- import javax.swing.JCheckBox;
- import javax.swing.JComboBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import org.rsbot.event.events.MessageEvent;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.event.listeners.MessageListener;
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.Game;
- import org.rsbot.script.methods.GrandExchange.GEItem;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.util.Filter;
- import org.rsbot.script.wrappers.RSArea;
- import org.rsbot.script.wrappers.RSComponent;
- import org.rsbot.script.wrappers.RSInterface;
- import org.rsbot.script.wrappers.RSItem;
- import org.rsbot.script.wrappers.RSNPC;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSTile;
- import org.rsbot.script.wrappers.RSTilePath;
- import org.rsbot.util.GlobalConfiguration;
- ////////////////////////////
- //////////MANIFEST//////////
- ////////////////////////////
- @ScriptManifest(authors = { "Zhrz" }, name = "DarkMiner", version = 1.9, description = "Start near mine location with a pickaxe.")
- public class DarkMiner extends Script implements PaintListener,
- MouseMotionListener, MessageListener {
- // ////////////////////////////////////////////////
- // ////////VARIABLES - INT, BOOLEAN, LONG//////////
- // ////////////////////////////////////////////////
- // for paint calc
- public long startTime = System.currentTimeMillis(); // timer
- long runTime, seconds, minutes = 0, hours = 0;
- long runTime2, seconds2, minutes2 = 0, hours2 = 0;
- int startexp = 0;
- int currentXP;
- int currentLVL;
- int gainedLVL;
- int oresPerHour;
- int expPerHour;
- int startLvl = 0;
- int gainedXP;
- int clayMined = 0, copperMined = 0, tinMined = 0, ironMined = 0,
- silverMined = 0, coalMined = 0, goldMined = 0, mithrilMined = 0;
- int priceEssence, priceClay = 0, priceCopper = 0, priceTin = 0,
- priceIron = 0, priceSilver = 0, priceCoal = 0, priceGold = 0,
- priceMithril = 0;
- int oresMined = 0;
- int gemsMined = 0;
- int superInt = 0;
- int kMade;
- int kPerHour;
- int antiBanCount = 0;
- int[] gems = { 1621, 1619, 1623, 1617 };
- int randomNum2 = 0;
- int xpPerEssence = 5;
- long returnTime = 0;
- // not2Bank
- final int pickID[] = { 1265, 1267, 1269, 1271, 1273, 1275, 14099, 14107,
- 15259, 15261 };
- final int superheatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
- 1275, 14099, 14107, 15259, 15261 };
- // not2Drop
- int doNotDrop[];
- final int clayHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
- 1275, 14099, 14107, 15259, 15261, 434 };
- final int copperHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
- 1275, 14099, 14107, 15259, 15261, 436, 2349 };
- final int tinHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
- 1275, 14099, 14107, 15259, 15261, 438, 2349 };
- final int ironHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
- 1275, 14099, 14107, 15259, 15261, 440, 2351 };
- final int silverHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
- 1275, 14099, 14107, 15259, 15261, 442, 2355 };
- final int coalHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
- 1275, 14099, 14107, 15259, 15261, 453, 2353 };
- final int goldHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
- 1275, 14099, 14107, 15259, 15261, 444, 2357 };
- final int mithrilHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
- 1275, 14099, 14107, 15259, 15261, 447, 2359 };
- Image img1;
- // tests to get info otherwise
- int minRunSoRest = 0;
- int stopRest = 0;
- int gotPickOn = 0;
- int gotFireStaffOn = 0;
- // different types of modes
- public boolean pickHold = false;
- public boolean gotFireStaff = false;
- public boolean mineEss = false;
- public boolean mineGuild = false;
- public boolean superWeCan = true;
- public boolean modeDrop = false;
- public boolean modeMine2 = false;
- public boolean modeHybrid = false;
- public boolean modeBank = false;
- public boolean modeSuperheat = false;
- public boolean mode2Drop = false;
- public boolean mode2Mine2 = false;
- public boolean mode2Hybrid = false;
- public boolean mode2Bank = false;
- public boolean mode2Superheat = false;
- public boolean mode2Null = false;
- public boolean yesUpdate = false;
- public boolean modeSecondOre = true;
- public boolean modeDepoBox = false;
- // for rock paint
- public RSObject paintRock;
- String addZero = "", addZero2 = "";
- // rockSpot
- RSTile rockSpot = null;
- // for status
- private String status = "Starting...";
- private String antiBanStatus = "Starting...";
- // for methods
- int primaryOreRatio = 0;
- int secondaryOreRatio = 0;
- int thisRockID[];
- int rockID[];
- int secondRockID[];
- int thisOreID;
- int oreID;
- int secondOreID = 0;
- final int strangeRockID[] = { 15532, 15533 };
- int DepoBox[] = { 36788 };
- // for essence
- private int portalID = 2492;
- private int auburyID = 553;
- // for guild
- private int StairID[] = { 6226, 2113 };
- // code for paint
- Color edgeColor = new Color(153, 153, 153);
- Color transDarkBlue = new Color(102, 153, 255, 120);
- Color transDarkRed = new Color(204, 0, 0, 120);
- Color transDarkGreen = new Color(51, 153, 0, 200);
- public boolean showPaint1 = false; // hover mouse
- public boolean showPaint2 = false;
- public boolean showPaint3 = false;
- public boolean showPaint4 = false;
- private final BasicStroke stroke1 = new BasicStroke(1);
- // game tiles
- RSTile toNW[];
- RSTile toNE[];
- RSTile toSW[];
- RSTile toSE[];
- RSTile toBank[];
- RSTile toMine[];
- RSTile secondMineTile = new RSTile(0000, 0000);
- RSTile mineTile;
- RSTile bankTile;
- RSTile doorTile = new RSTile(3253, 3398);
- RSTile runeShop = new RSTile(3253, 3401);
- // for GUI
- private static final String[] TYPE_OPTION = new String[] { "Essence",
- "Clay", "Copper", "Tin", "Iron", "Silver", "Coal", "Gold",
- "Mithril" };
- private static final String[] TYPE_OPTION2 = new String[] { "None", "Clay",
- "Copper", "Tin", "Iron", "Silver", "Coal", "Gold", "Mithril" };
- private static final String[] SELECT_OPTION = new String[] {
- "Barbarian Village", "Rimmington", "Al Kharid", "West Varrock",
- "Varrock (Aubury)", "Mining Guild" };
- private static final String[] MINE_OPTION = new String[] { "Bank", "M2D2",
- "Drop", "Hybrid", "Superheat" };
- private static final String[] MINE_OPTION2 = new String[] { "None", "Bank",
- "M2D2", "Drop", "Hybrid", "Superheat" };
- // rock ID's
- public int essence[] = { 2491 };
- public int clay[] = { 11504, 11503, 11505, 9711, 9713, 15503, 15505 };
- public int copper[] = { 11937, 11938, 9710, 9708, 9709 };
- public int tin[] = { 11933, 11934, 11935, 11957, 11958, 11959, 9714, 9716 };
- public int iron[] = { 37309, 37307, 37308, 11955, 11956, 9718, 9717, 9719 };
- public int silver[] = { 37306, 37304, 37305, 11950, 11949, 11948 };
- public int coal[] = { 11930, 11932, 11931, 5771, 5772, 5770 };
- public int gold[] = { 37312, 37310, 9720, 9722 };
- public int mithril[] = { 5784, 5786, 5785 };
- RSArea Guild = new RSArea(new RSTile(3024, 9732), new RSTile(3055, 9756));
- // rstiles for mining guild
- private boolean atGuildBank() {
- RSArea GuildBank = new RSArea(new RSTile(3009, 3355), new RSTile(3018,
- 3358));
- return (GuildBank.contains(getMyPlayer().getLocation()));
- }
- private boolean aboveGuildStairs() {
- RSArea GuildStairsTop = new RSArea(new RSTile(3015, 3336), new RSTile(
- 3024, 3342));
- return (GuildStairsTop.contains(getMyPlayer().getLocation()));
- }
- private boolean underGuildStairs() {
- RSArea GuildStairsBottom = new RSArea(new RSTile(3017, 9736),
- new RSTile(3023, 9742));
- return (GuildStairsBottom.contains(getMyPlayer().getLocation()));
- }
- private boolean inGuild() {
- RSArea Guild = new RSArea(new RSTile(3024, 9732),
- new RSTile(3055, 9756));
- return (Guild.contains(getMyPlayer().getLocation()));
- }
- private boolean atFally() {
- RSArea GuildStairsBottom = new RSArea(new RSTile(3005, 3326),
- new RSTile(3042, 3371));
- return (GuildStairsBottom.contains(getMyPlayer().getLocation()));
- }
- // rstiles for essence mining
- private boolean atNW() {
- RSArea NorthWest = new RSArea(new RSTile(2884, 4837), new RSTile(2901,
- 4859));
- return (NorthWest.contains(getMyPlayer().getLocation()));
- }
- private boolean atVarrock() {
- RSArea Varrock = new RSArea(new RSTile(3239, 3388), new RSTile(3263,
- 3431));
- return (Varrock.contains(getMyPlayer().getLocation()));
- }
- private boolean atNE() {
- RSArea NorthEast = new RSArea(new RSTile(2918, 4841), new RSTile(2935,
- 4857));
- return (NorthEast.contains(getMyPlayer().getLocation()));
- }
- private boolean atSW() {
- RSArea SouthWest = new RSArea(new RSTile(2885, 4807), new RSTile(2904,
- 4823));
- return (SouthWest.contains(getMyPlayer().getLocation()));
- }
- private boolean atSE() {
- RSArea SouthEast = new RSArea(new RSTile(2920, 4806), new RSTile(2936,
- 4823));
- return (SouthEast.contains(getMyPlayer().getLocation()));
- }
- private boolean atDoor() {
- RSArea DoorLocation = new RSArea(new RSTile(3251, 3396), new RSTile(
- 3255, 3405));
- return (DoorLocation.contains(getMyPlayer().getLocation()));
- }
- private boolean atBank() {
- RSArea Bank = new RSArea(new RSTile(3250, 3419), new RSTile(3257, 3423));
- return (Bank.contains(getMyPlayer().getLocation()));
- }
- private boolean atCenter() {
- RSArea Center = new RSArea(new RSTile(2903, 4824), new RSTile(2920,
- 4840));
- return (Center.contains(getMyPlayer().getLocation()));
- }
- private boolean atShop() {
- RSArea Shop = new RSArea(new RSTile(3251, 3403), new RSTile(3254, 3399));
- return (Shop.contains(getMyPlayer().getLocation()));
- }
- // /////////////////////////
- // ////////VERSION//////////
- // /////////////////////////
- private double getVersion() {
- return (1.9);
- }
- // /////////////////////////
- // ////////ONSTART//////////
- // /////////////////////////
- public boolean onStart() {
- log("Starting up, this may take a few seconds...");
- // gets image
- img1 = getImage("http://img593.imageshack.us/img593/4126/darkminer4.png");
- GUI GUI = new GUI();
- GUI.setVisible(true);
- while (GUI.isVisible()) {
- sleep(50);
- }
- yesUpdate = GUI.checkForUpdate.isSelected();
- if (yesUpdate == true) {
- // updater
- URLConnection url = null;
- BufferedReader in = null;
- try {
- // Open the version text file
- url = new URL(
- "http://cublex.50webs.com/scripts/DarkMinerVERSION.txt")
- .openConnection();
- // Create an input stream for it
- in = new BufferedReader(new InputStreamReader(
- url.getInputStream()));
- // Check if the current version is outdated
- if (Double.parseDouble(in.readLine()) > getVersion()) {
- // If it is, check if the user would like to update.
- log("Update is available. Please head over to our thread to download it.");
- } else
- log("You have the latest version of DarkMiner.");
- // User has the latest version. Tell them!
- if (in != null)
- in.close();
- } catch (IOException e) {
- log("A problem interrupted checking version.");
- return false;
- // Return false if there was a problem
- }
- // end of updater
- } else {
- log("You are using DarkMiner by Zhrz.");
- }
- // sets up the mining mode
- if (GUI.mineType.getSelectedItem().toString().equals("M2D2")) {
- modeMine2 = true;
- } else if (GUI.mineType.getSelectedItem().toString().equals("Drop")) {
- modeDrop = true;
- } else if (GUI.mineType.getSelectedItem().toString().equals("Hybrid")) {
- modeHybrid = true;
- } else if (GUI.mineType.getSelectedItem().toString()
- .equals("Superheat")) {
- modeSuperheat = true;
- } else if (GUI.mineType.getSelectedItem().toString().equals("Bank")) {
- modeBank = true;
- }
- // sorts out second mining mode
- if (GUI.mineType2.getSelectedItem().toString().equals("M2D2")) {
- mode2Mine2 = true;
- } else if (GUI.mineType2.getSelectedItem().toString().equals("Drop")) {
- mode2Drop = true;
- } else if (GUI.mineType2.getSelectedItem().toString().equals("Hybrid")) {
- mode2Hybrid = true;
- } else if (GUI.mineType2.getSelectedItem().toString()
- .equals("Superheat")) {
- mode2Superheat = true;
- } else if (GUI.mineType2.getSelectedItem().toString().equals("Bank")) {
- mode2Bank = true;
- } else {
- mode2Null = true;
- }
- // sorts out second ore to mine
- if (GUI.oreType2.getSelectedItem().toString().equals("None")
- || mode2Null) {
- secondOreID = 0;
- modeSecondOre = false;
- } else if (GUI.oreType2.getSelectedItem().toString().equals("Clay")) {
- secondRockID = clay;
- secondOreID = 434;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- secondMineTile = new RSTile(2986, 3240);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- secondMineTile = new RSTile(3180, 3371);
- }
- } else if (GUI.oreType2.getSelectedItem().toString().equals("Copper")) {
- secondRockID = copper;
- secondOreID = 436;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- secondMineTile = new RSTile(2977, 3246);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid)")) {
- secondMineTile = new RSTile(3297, 3314);
- }
- } else if (GUI.oreType2.getSelectedItem().toString().equals("Tin")) {
- secondRockID = tin;
- secondOreID = 438;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- secondMineTile = new RSTile(2984, 3236);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Barbarian Village")) {
- secondMineTile = new RSTile(3080, 3419);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid)")) {
- secondMineTile = new RSTile(3301, 3316);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- secondMineTile = new RSTile(3182, 3377);
- }
- } else if (GUI.oreType2.getSelectedItem().toString().equals("Iron")) {
- secondRockID = iron;
- secondOreID = 440;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- secondMineTile = new RSTile(2970, 3240);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid)")) {
- secondMineTile = new RSTile(3298, 3311);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- secondMineTile = new RSTile(3175, 3367);
- }
- } else if (GUI.oreType2.getSelectedItem().toString().equals("Silver")) {
- secondRockID = silver;
- secondOreID = 442;
- if (GUI.location1.getSelectedItem().toString().equals("Al Kharid)")) {
- secondMineTile = new RSTile(3295, 3301);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- secondMineTile = new RSTile(3176, 3368);
- }
- } else if (GUI.oreType2.getSelectedItem().toString().equals("Coal")) {
- secondRockID = coal;
- secondOreID = 453;
- if (GUI.location1.getSelectedItem().toString()
- .equals("Barbarian Village")) {
- mineTile = new RSTile(3083, 3422);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid)")) {
- mineTile = new RSTile(3300, 3299);
- }
- } else if (GUI.oreType2.getSelectedItem().toString().equals("Gold")) {
- secondRockID = gold;
- secondOreID = 444;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- mineTile = new RSTile(2977, 3234);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid)")) {
- mineTile = new RSTile(3297, 3287);
- }
- } else if (GUI.oreType2.getSelectedItem().toString().equals("Mithril")) {
- secondRockID = mithril;
- secondOreID = 447;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid)")) {
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Mining Guild")) {
- mineTile = new RSTile(3297, 3287);
- } else {
- log("Second ore and location do not match.");
- }
- }
- // sorts out bank tile + depo mode
- if (GUI.location1.getSelectedItem().toString()
- .equals("Barbarian Village")) {
- bankTile = new RSTile(3094, 3491);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Rimmington")) {
- bankTile = new RSTile(3047, 3236);
- modeDepoBox = true;
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- bankTile = new RSTile(3182, 3436);
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid")) {
- bankTile = new RSTile(3269, 3167);
- }
- // ore type + location +path
- if (GUI.oreType.getSelectedItem().toString().equals("Essence")) {
- mineEss = true;
- rockID = essence;
- oreID = 1436;
- primaryOreRatio = 0;
- secondaryOreRatio = 0;
- if (GUI.location1.getSelectedItem().toString()
- .equals("Varrock (Aubury)")) {
- bankTile = new RSTile(3254, 3420);
- toBank = new RSTile[] { new RSTile(3258, 3411),
- new RSTile(3261, 3422), new RSTile(3254, 3420) };
- toMine = new RSTile[] { new RSTile(3254, 3420),
- new RSTile(3257, 3412), new RSTile(3257, 3401),
- new RSTile(3253, 3398) };
- toNW = new RSTile[] { new RSTile(2911, 4831),
- new RSTile(2906, 4839), new RSTile(2900, 4842),
- new RSTile(2895, 4846) };
- toNE = new RSTile[] { new RSTile(2911, 4831),
- new RSTile(2919, 4840), new RSTile(2923, 4844),
- new RSTile(2926, 4847) };
- toSW = new RSTile[] { new RSTile(2911, 4831),
- new RSTile(2904, 4824), new RSTile(2899, 4820),
- new RSTile(2897, 4817) };
- toSE = new RSTile[] { new RSTile(2911, 4831),
- new RSTile(2918, 4822), new RSTile(2922, 4819),
- new RSTile(2926, 4819) };
- } else {
- log("[Error] = Selected ore and location do not match.");
- }
- } else if (GUI.oreType.getSelectedItem().toString().equals("Clay")) {
- rockID = clay;
- oreID = 434;
- primaryOreRatio = 0;
- secondaryOreRatio = 0;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- mineTile = new RSTile(2986, 3240);
- toMine = new RSTile[] { new RSTile(3012, 3355),
- new RSTile(3007, 3344), new RSTile(3007, 3332),
- new RSTile(3006, 3321), new RSTile(2997, 3310),
- new RSTile(2986, 3304), new RSTile(2985, 3293),
- new RSTile(2986, 3282), new RSTile(2979, 3274),
- new RSTile(2974, 3263), new RSTile(2977, 3254),
- new RSTile(2978, 3242), new RSTile(2986, 3240),
- new RSTile(2986, 3240) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- mineTile = new RSTile(3180, 3371);
- toMine = new RSTile[] { new RSTile(3182, 3436),
- new RSTile(3177, 3429), new RSTile(3171, 3420),
- new RSTile(3171, 3410), new RSTile(3171, 3402),
- new RSTile(3173, 3394), new RSTile(3176, 3387),
- new RSTile(3182, 3379), new RSTile(3184, 3373),
- new RSTile(3180, 3371) };
- } else {
- log("[Error] = Selected ore and location do not match.");
- }
- } else if (GUI.oreType.getSelectedItem().toString().equals("Copper")) {
- rockID = copper;
- oreID = 436;
- primaryOreRatio = 1;
- secondaryOreRatio = 1;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- mineTile = new RSTile(2977, 3246);
- toMine = new RSTile[] { new RSTile(3047, 3236),
- new RSTile(3040, 3236), new RSTile(3033, 3236),
- new RSTile(3027, 3240), new RSTile(3021, 3242),
- new RSTile(3015, 3242), new RSTile(3008, 3240),
- new RSTile(3001, 3238), new RSTile(2995, 3236),
- new RSTile(2989, 3232), new RSTile(2985, 3238),
- new RSTile(2980, 3243), new RSTile(2977, 3246) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid")) {
- mineTile = new RSTile(3297, 3314);
- toMine = new RSTile[] { new RSTile(3269, 3166),
- new RSTile(3275, 3170), new RSTile(3278, 3178),
- new RSTile(3283, 3185), new RSTile(3282, 3191),
- new RSTile(3282, 3199), new RSTile(3278, 3206),
- new RSTile(3278, 3212), new RSTile(3278, 3220),
- new RSTile(3279, 3226), new RSTile(3283, 3233),
- new RSTile(3287, 3240), new RSTile(3291, 3247),
- new RSTile(3293, 3255), new RSTile(3294, 3261),
- new RSTile(3295, 3268), new RSTile(3296, 3276),
- new RSTile(3298, 3283), new RSTile(3299, 3290),
- new RSTile(3298, 3297), new RSTile(3299, 3303),
- new RSTile(3300, 3310), new RSTile(3297, 3314) };
- } else {
- log("[Error] = Selected ore and location do not match.");
- }
- } else if (GUI.oreType.getSelectedItem().toString().equals("Tin")) {
- rockID = tin;
- oreID = 438;
- primaryOreRatio = 1;
- secondaryOreRatio = 1;
- if (GUI.location1.getSelectedItem().toString()
- .equals("Barbarian Village")) {
- mineTile = new RSTile(3080, 3419);
- toMine = new RSTile[] { new RSTile(3094, 3491),
- new RSTile(3088, 3488), new RSTile(3093, 3485),
- new RSTile(3100, 3483), new RSTile(3100, 3475),
- new RSTile(3100, 3466), new RSTile(3094, 3464),
- new RSTile(3087, 3462), new RSTile(3087, 3455),
- new RSTile(3087, 3448), new RSTile(3088, 3439),
- new RSTile(3089, 3432), new RSTile(3086, 3427),
- new RSTile(3083, 3423), new RSTile(3080, 3491) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Rimmington")) {
- mineTile = new RSTile(2984, 3236);
- toMine = new RSTile[] { new RSTile(3047, 3236),
- new RSTile(3040, 3236), new RSTile(3033, 3236),
- new RSTile(3027, 3240), new RSTile(3021, 3242),
- new RSTile(3015, 3242), new RSTile(3008, 3240),
- new RSTile(3001, 3238), new RSTile(2995, 3236),
- new RSTile(2989, 3232), new RSTile(2984, 3236) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid")) {
- mineTile = new RSTile(3301, 3316);
- toMine = new RSTile[] { new RSTile(3269, 3166),
- new RSTile(3275, 3170), new RSTile(3278, 3178),
- new RSTile(3283, 3185), new RSTile(3282, 3191),
- new RSTile(3282, 3199), new RSTile(3278, 3206),
- new RSTile(3278, 3212), new RSTile(3278, 3220),
- new RSTile(3279, 3226), new RSTile(3283, 3233),
- new RSTile(3287, 3240), new RSTile(3291, 3247),
- new RSTile(3293, 3255), new RSTile(3294, 3261),
- new RSTile(3295, 3268), new RSTile(3296, 3276),
- new RSTile(3298, 3283), new RSTile(3299, 3290),
- new RSTile(3298, 3297), new RSTile(3299, 3303),
- new RSTile(3300, 3310), new RSTile(3301, 3316) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- mineTile = new RSTile(3182, 3377);
- toMine = new RSTile[] { new RSTile(3182, 3436),
- new RSTile(3177, 3429), new RSTile(3171, 3420),
- new RSTile(3171, 3410), new RSTile(3171, 3402),
- new RSTile(3173, 3394), new RSTile(3176, 3387),
- new RSTile(3182, 3379), new RSTile(3182, 3376) };
- } else {
- log("[Error] = Selected ore and location do not match.");
- }
- } else if (GUI.oreType.getSelectedItem().toString().equals("Iron")) {
- rockID = iron;
- oreID = 440;
- primaryOreRatio = 1;
- secondaryOreRatio = 0;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- mineTile = new RSTile(2970, 3240);
- toMine = new RSTile[] { new RSTile(3047, 3236),
- new RSTile(3040, 3236), new RSTile(3033, 3236),
- new RSTile(3027, 3240), new RSTile(3021, 3242),
- new RSTile(3015, 3242), new RSTile(3008, 3240),
- new RSTile(3001, 3238), new RSTile(2995, 3236),
- new RSTile(2989, 3232), new RSTile(2982, 3235),
- new RSTile(2976, 3237), new RSTile(2970, 3240) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid")) {
- mineTile = new RSTile(3298, 3311);
- toMine = new RSTile[] { new RSTile(3269, 3166),
- new RSTile(3275, 3170), new RSTile(3278, 3178),
- new RSTile(3283, 3185), new RSTile(3282, 3191),
- new RSTile(3282, 3199), new RSTile(3278, 3206),
- new RSTile(3278, 3212), new RSTile(3278, 3220),
- new RSTile(3279, 3226), new RSTile(3283, 3233),
- new RSTile(3287, 3240), new RSTile(3291, 3247),
- new RSTile(3293, 3255), new RSTile(3294, 3261),
- new RSTile(3295, 3268), new RSTile(3296, 3276),
- new RSTile(3298, 3283), new RSTile(3299, 3290),
- new RSTile(3298, 3297), new RSTile(3299, 3303),
- new RSTile(3300, 3310), new RSTile(3298, 3311) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- mineTile = new RSTile(3175, 3367);
- toMine = new RSTile[] { new RSTile(3182, 3436),
- new RSTile(3177, 3429), new RSTile(3171, 3420),
- new RSTile(3171, 3410), new RSTile(3171, 3402),
- new RSTile(3173, 3394), new RSTile(3176, 3387),
- new RSTile(3182, 3379), new RSTile(3184, 3373),
- new RSTile(3175, 3367) };
- } else {
- log("[Error] = Selected ore and location do not match.");
- }
- } else if (GUI.oreType.getSelectedItem().toString().equals("Silver")) {
- rockID = silver;
- oreID = 442;
- primaryOreRatio = 1;
- secondaryOreRatio = 0;
- if (GUI.location1.getSelectedItem().toString().equals("Al Kharid")) {
- mineTile = new RSTile(3295, 3301);
- toMine = new RSTile[] { new RSTile(3269, 3166),
- new RSTile(3275, 3170), new RSTile(3278, 3178),
- new RSTile(3283, 3185), new RSTile(3282, 3191),
- new RSTile(3282, 3199), new RSTile(3278, 3206),
- new RSTile(3278, 3212), new RSTile(3278, 3220),
- new RSTile(3279, 3226), new RSTile(3283, 3233),
- new RSTile(3287, 3240), new RSTile(3291, 3247),
- new RSTile(3293, 3255), new RSTile(3294, 3261),
- new RSTile(3295, 3268), new RSTile(3296, 3276),
- new RSTile(3298, 3283), new RSTile(3299, 3290),
- new RSTile(3298, 3297), new RSTile(3295, 3301) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("West Varrock")) {
- mineTile = new RSTile(3176, 3368);
- toMine = new RSTile[] { new RSTile(3182, 3436),
- new RSTile(3177, 3429), new RSTile(3171, 3420),
- new RSTile(3171, 3410), new RSTile(3171, 3402),
- new RSTile(3173, 3394), new RSTile(3176, 3387),
- new RSTile(3182, 3379), new RSTile(3184, 3373),
- new RSTile(3177, 3368) };
- } else {
- log("[Error] = Selected ore and location do not match.");
- }
- } else if (GUI.oreType.getSelectedItem().toString().equals("Coal")) {
- rockID = coal;
- oreID = 453;
- primaryOreRatio = 2;
- secondaryOreRatio = 1;
- if (GUI.location1.getSelectedItem().toString()
- .equals("Barbarian Village")) {
- mineTile = new RSTile(3083, 3422);
- toMine = new RSTile[] { new RSTile(3094, 3491),
- new RSTile(3088, 3488), new RSTile(3093, 3485),
- new RSTile(3100, 3483), new RSTile(3100, 3475),
- new RSTile(3100, 3466), new RSTile(3094, 3464),
- new RSTile(3087, 3462), new RSTile(3087, 3455),
- new RSTile(3087, 3448), new RSTile(3088, 3439),
- new RSTile(3089, 3432), new RSTile(3086, 3427),
- new RSTile(3083, 3423), new RSTile(3083, 3422) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid")) {
- mineTile = new RSTile(3300, 3299);
- toMine = new RSTile[] { new RSTile(3269, 3166),
- new RSTile(3275, 3170), new RSTile(3278, 3178),
- new RSTile(3283, 3185), new RSTile(3282, 3191),
- new RSTile(3282, 3199), new RSTile(3278, 3206),
- new RSTile(3278, 3212), new RSTile(3278, 3220),
- new RSTile(3279, 3226), new RSTile(3283, 3233),
- new RSTile(3287, 3240), new RSTile(3291, 3247),
- new RSTile(3293, 3255), new RSTile(3294, 3261),
- new RSTile(3295, 3268), new RSTile(3296, 3276),
- new RSTile(3298, 3283), new RSTile(3299, 3290),
- new RSTile(3298, 3297), new RSTile(3300, 3300) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Mining Guild")) {
- mineGuild = true;
- mineTile = new RSTile(3037, 9738);
- bankTile = new RSTile(3012, 3355);
- toMine = new RSTile[] { new RSTile(3013, 3355),
- new RSTile(3018, 3362), new RSTile(3024, 3358),
- new RSTile(3024, 3351), new RSTile(3031, 3348),
- new RSTile(3031, 3341), new RSTile(3027, 3336),
- new RSTile(3021, 3339) };
- } else {
- log("[Error] = Selected ore and location do not match.");
- }
- } else if (GUI.oreType.getSelectedItem().toString().equals("Gold")) {
- rockID = gold;
- oreID = 444;
- primaryOreRatio = 1;
- secondaryOreRatio = 0;
- if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
- mineTile = new RSTile(2977, 3234);
- toMine = new RSTile[] { new RSTile(3047, 3236),
- new RSTile(3040, 3236), new RSTile(3033, 3236),
- new RSTile(3027, 3240), new RSTile(3021, 3242),
- new RSTile(3015, 3242), new RSTile(3008, 3240),
- new RSTile(3001, 3238), new RSTile(2995, 3236),
- new RSTile(2989, 3232), new RSTile(2981, 3232),
- new RSTile(2977, 3234) };
- } else if (GUI.location1.getSelectedItem().toString()
- .equals("Al Kharid")) {
- mineTile = new RSTile(3297, 3287);
- toMine = new RSTile[] { new RSTile(3269, 3166),
- new RSTile(3275, 3170), new RSTile(3278, 3178),
- new RSTile(3283, 3185), new RSTile(3282, 3191),
- new RSTile(3282, 3199), new RSTile(3278, 3206),
- new RSTile(3278, 3212), new RSTile(3278, 3220),
- new RSTile(3279, 3226), new RSTile(3283, 3233),
- new RSTile(3287, 3240), new RSTile(3291, 3247),
- new RSTile(3293, 3255), new RSTile(3294, 3261),
- new RSTile(3295, 3268), new RSTile(3296, 3276),
- new RSTile(3298, 3283), new RSTile(3297, 3287) };
- } else {
- log("[Error] = Selected ore and location do not match.");
- }
- } else if (GUI.oreType.getSelectedItem().toString().equals("Mithril")) {
- rockID = mithril;
- oreID = 447;
- primaryOreRatio = 1;
- secondaryOreRatio = 4;
- if (GUI.location1.getSelectedItem().toString()
- .equals("Mining Guild")) {
- mineGuild = true;
- mineTile = new RSTile(3050, 9737);
- bankTile = new RSTile(3012, 3355);
- toMine = new RSTile[] { new RSTile(3013, 3355),
- new RSTile(3018, 3362), new RSTile(3024, 3358),
- new RSTile(3024, 3351), new RSTile(3031, 3348),
- new RSTile(3031, 3341), new RSTile(3027, 3336),
- new RSTile(3021, 3339) };
- }
- }
- if (modeBank && mode2Bank) {
- doNotDrop = pickID;
- } else if (modeDrop || modeMine2 || modeHybrid) {
- doNotDrop = pickID;
- } else if (rockID == clay) {
- doNotDrop = clayHeatID;
- } else if (rockID == tin || thisRockID == copper) {
- doNotDrop = tinHeatID;
- } else if (rockID == iron) {
- doNotDrop = ironHeatID;
- } else if (rockID == silver) {
- doNotDrop = silverHeatID;
- } else if (rockID == gold) {
- doNotDrop = goldHeatID;
- } else if (rockID == coal) {
- doNotDrop = coalHeatID;
- } else if (rockID == mithril) {
- doNotDrop = mithrilHeatID;
- } else if (rockID == essence) {
- // nothing
- } else {
- log("Failed to set Not2Drop items");
- }
- /*
- * Not2Drop
- *
- * Start with pickaxes
- *
- * if banking first ore add that to not drop if banking second ore add
- * that not to drop
- *
- * if superheating add equipment not to drop
- */
- if (rockID == essence) {
- priceEssence = getPrice(1436);
- }
- if (rockID == clay || secondRockID == clay) {
- priceClay = getPrice(434);
- }
- if (rockID == copper || secondRockID == copper) {
- priceCopper = getPrice(436);
- }
- if (rockID == tin || secondRockID == tin) {
- priceTin = getPrice(438);
- }
- if (rockID == iron || secondRockID == iron) {
- priceIron = getPrice(440);
- }
- if (rockID == silver || secondRockID == silver) {
- priceSilver = getPrice(442);
- }
- if (rockID == coal || secondRockID == coal) {
- priceCoal = getPrice(453);
- }
- if (rockID == gold || secondRockID == gold) {
- priceGold = getPrice(444);
- }
- if (rockID == mithril || secondRockID == mithril) {
- priceMithril = getPrice(447);
- }
- mouse.setSpeed(random(3, 4)); // Lets sort out this mouse
- startTime = System.currentTimeMillis(); // start paint timer
- return true;
- }
- // ///////////////////////////////
- // ///////////GETPRICE////////////
- // ///////////////////////////////
- public int getPrice(int itemNumber){
- int price = 0;
- try {
- GEItem it = grandExchange.lookup(itemNumber);
- price = it.getGuidePrice();
- } catch (Exception ex) {
- log("Unable to get Market Price(s) of Item");
- }
- return price;
- }
- // ///////////////////////////////
- // ////////SERVERMESSAGE//////////
- // ///////////////////////////////
- public void messageReceived(MessageEvent e) {
- String svrmsg = e.getMessage();
- if (svrmsg.contains("clay")) {
- clayMined++;
- }
- if (svrmsg.contains("copper")) {
- copperMined++;
- }
- if (svrmsg.contains("tin")) {
- tinMined++;
- }
- if (svrmsg.contains("iron")) {
- ironMined++;
- }
- if (svrmsg.contains("silver")) {
- silverMined++;
- }
- if (svrmsg.contains("coal")) {
- coalMined++;
- }
- if (svrmsg.contains("gold")) {
- goldMined++;
- }
- if (svrmsg.contains("mithril")) {
- mithrilMined++;
- }
- if (svrmsg.contains("just found")) {
- gemsMined++;
- }
- }
- // ///////////////////////
- // //////FindRock/////////
- // ///////////////////////
- private RSObject newRock() {
- return objects.getNearest(new Filter<RSObject>() {
- public boolean accept(RSObject n) {
- return Guild.contains(n.getLocation())
- && (n.equals(thisRockID));
- }
- });
- }
- // ///////////////////////
- // /////RESTandRUN////////
- // ///////////////////////
- public boolean letsRun() {
- mouse.setSpeed(random(4, 9));
- if (minRunSoRest == 0) {
- if (mineEss) {
- minRunSoRest = random(78, 88);
- } else {
- minRunSoRest = random(1, 23);
- }
- stopRest = random(89, 97);
- }
- if (walking.isRunEnabled() == false
- || walking.getEnergy() < minRunSoRest) {
- if (walking.getEnergy() < stopRest) {
- status = "Resting";
- walking.rest(random(92, 100));
- int anim = players.getMyPlayer().getAnimation();
- do {
- sleep(250, 350);
- AntiBanPro();
- sleep(250, 350);
- AntiBanCamera();
- } while ((walking.getEnergy() < stopRest)
- && (anim == 12108 || anim == 2033 || anim == 2716
- || anim == 11786 || anim == 5713));
- }
- if (walking.getEnergy() > stopRest) {
- if (walking.isRunEnabled() == false) {
- status = "Turning run on";
- walking.setRun(true);
- sleep(850, 1200);
- minRunSoRest = 0;
- } else if (walking.isRunEnabled() == true) {
- sleep(20, 30);
- }
- }
- } else {
- sleep(12, 15);
- }
- return true;
- }
- // ///////////////////////
- // ////ReturnTime/////////
- // ///////////////////////
- public void calucateReturnTime() {
- if (thisRockID == secondRockID) {
- // then run off screaming
- } else if (seconds >= returnTime) {
- returnTime = 0;
- if (thisRockID == clay) {
- returnTime = seconds + 2;
- } else if (thisRockID == tin || thisRockID == copper) {
- returnTime = seconds + 3;
- } else if (thisRockID == iron) {
- returnTime = seconds + 8;
- } else if (thisRockID == silver || thisRockID == gold) {
- returnTime = seconds + 96;
- } else if (thisRockID == coal) {
- returnTime = seconds + 46;
- } else if (thisRockID == mithril) {
- returnTime = seconds + 192;
- } else {
- log("Failed to work out return time");
- }
- // in seconds we will
- // work out the time needed for respawn
- // find ore mining and use avarage
- // the add this to current time and smile
- }
- }
- // ///////////////////////
- // ////////BANK///////////
- // ///////////////////////
- public boolean bankGems() {
- while (inventory.getItem(gems) != null) {
- RSItem item = inventory.getItem(gems);
- item.doClick(true);
- sleep(500, 600);
- }
- return true;
- }
- public boolean bankIsOpen() {
- return interfaces.get(11).isValid();
- }
- public boolean bank() {
- mouse.setSpeed(random(5, 8));
- status = "Banking";
- if (bank.isOpen() == false && bankIsOpen() == false) {
- if (modeDepoBox) {
- RSObject box = objects.getNearest(DepoBox);
- if (box != null) {
- box.doAction("Deposit");
- }
- } else {
- bank.open();
- }
- sleep(500);
- while (players.getMyPlayer().isMoving()) {
- sleep(50);
- }
- sleep(700, 750);
- }
- if (bank.isOpen()) {
- if (gotPickOn == 0) { // holding a pickaxe?
- if (inventory.containsOneOf(pickID)) {
- pickHold = false;
- } else
- pickHold = true;
- }
- // if yes bank fast
- if (pickHold == true && !modeSuperheat) {
- bank.depositAll();
- sleep(random(250, 500));
- } else { // if not bank slowly
- if (modeSuperheat) {
- bank.depositAllExcept(superheatID);
- } else {
- bank.depositAllExcept(pickID);
- }
- bankGems();
- sleep(random(250, 500));
- }
- mouse.move(490, 36, 3, 3); // lets safely close the bank safely
- sleep(200, 500);
- mouse.click(true);
- sleep(random(300, 700));
- AntiBanCamera();
- AntiBanPro();
- } else if (bankIsOpen()) {
- if (pickHold == false) {
- RSComponent[] components = interfaces.get(11).getComponent(17)
- .getComponents();
- for (int i = 0; i < components.length; i++) {
- if (components[i].getComponentID() != -1) {
- boolean canDeposit = true;
- for (int y = 0; y < pickID.length; y++) {
- if (components[i].getComponentID() == pickID[y]) {
- canDeposit = false;
- break;
- }
- }
- if (canDeposit) {
- components[i].doAction("Deposit-All");
- sleep(600, 800);
- }
- }
- }
- } else {
- sleep(400, 500);
- interfaces.getComponent(11, 18).doClick();
- sleep(350, 450);
- }
- sleep(550, 700);
- interfaces.getComponent(11, 15).doClick();
- AntiBanCamera();
- AntiBanPro();
- }
- return true;
- }
- // //////////////////////
- // //////GetImage////////
- // //////////////////////
- private Image getImage(String url) {
- try {
- return ImageIO.read(new URL(url));
- } catch (IOException e) {
- return null;
- }
- }
- // //////////////////////
- // ///MiningMethods//////
- // //////////////////////
- // not used currently
- public boolean checkRock(RSObject x) {
- boolean z = true;
- if (mineGuild) {
- RSArea GuildishArea = new RSArea(new RSTile(3024, 9732),
- new RSTile(3055, 9756));
- if (!GuildishArea.contains(x.getLocation())) {
- walkToRock();
- z = false;
- }
- }
- return (z);
- }
- //
- public void mineState() { // special cases
- if (modeSuperheat) {
- superheat();
- } else if (mineEss) {
- defaultMine();
- } else if (!modeSecondOre) {
- thisRockID = rockID;
- thisOreID = oreID;
- if (modeHybrid == true) {
- hybrid();
- } else if (modeMine2 == true) {
- mTwo();
- } else {
- classicMine();
- }
- } else if (objects.getNearest(rockID) != null) {
- thisRockID = rockID;
- thisOreID = oreID;
- if (modeHybrid == true) {
- hybrid();
- } else if (modeMine2 == true) {
- mTwo();
- } else {
- classicMine();
- }
- } else if (seconds >= returnTime || returnTime == 0) {
- if (calc.distanceTo(mineTile) > 4) {
- RSTile[] path = walking.findPath(mineTile);
- RSTilePath newPath = walking.newTilePath(path);
- newPath.randomize(1, 1);
- newPath.traverse();
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- } else {
- sleep(25, 50);
- }
- } else if (calc.distanceTo(secondMineTile) > 4) {
- RSTile[] path = walking.findPath(secondMineTile);
- RSTilePath newPath = walking.newTilePath(path);
- newPath.randomize(1, 1);
- newPath.traverse();
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- } else if (objects.getNearest(secondRockID) != null) {
- thisRockID = secondRockID;
- thisOreID = secondOreID;
- if (mode2Hybrid == true) {
- hybrid();
- } else if (mode2Mine2 == true) {
- mTwo();
- } else {
- classicMine();
- }
- // mine second ore
- } else {
- sleep(250, 500);
- // we are fucked
- }
- }
- public boolean defaultMine() {
- mouse.setSpeed(random(4, 7));
- status = "Looking for Rock";
- RSObject rock = objects.getNearest(rockID);
- if (rock != null) {
- paintRock = rock; // paints rock
- RSTile rockSpot = rock.getLocation();
- if (mineEss) { // so doesn't just stand there
- camera.turnToObject(rock, random(2, 13));
- }
- rock.doAction("Mine");
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- while (getMyPlayer().getAnimation() != -1
- && (calc.distanceTo(rockSpot) < 2)) {
- status = "Mining Ore";
- AntiBanPro();
- AntiBanCamera();
- sleep(random(50, 150));
- }
- }
- return true;
- }
- public boolean classicMine() {
- mouse.setSpeed(random(4, 7));
- status = "Looking for Rock";
- RSObject rock = objects.getNearest(thisRockID);
- if (rock != null) {
- int test = rock.getID();
- paintRock = rock; // paints rock
- rockSpot = rock.getLocation(); // sets the title rock is on
- if (rock.isOnScreen()) {
- rock.doAction("Mine");
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- RSObject rocky = objects.getTopAt(rockSpot);
- while (rocky.getID() == test
- && getMyPlayer().getAnimation() != -1
- && (calc.distanceTo(rockSpot) < 2)) {
- status = "Mining Ore";
- AntiBanPro();
- rocky = objects.getTopAt(rockSpot);
- AntiBanCamera();
- sleep(random(50, 150));
- }
- calucateReturnTime();
- } else {
- walking.walkTileMM(walking.getClosestTileOnMap(rock
- .getLocation()));
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- do {
- sleep(100, 150);
- } while (getMyPlayer().isMoving());
- }
- }
- return true;
- }
- // superheat
- public boolean superheat() {
- superWeCan = true;
- mouse.setSpeed(random(4, 7));
- // checking invent to needed amounts
- if (gotFireStaffOn == 0) { // holding fire staff
- if (inventory.containsOneOf(1387)) {
- gotFireStaff = true;
- } else if (equipment.containsAll(1387)) {
- gotFireStaff = true;
- } else {
- gotFireStaff = false;
- }
- gotFireStaffOn = 1;
- }
- if (primaryOreRatio == 0) {
- log("Cannot Superheat this type of ore.");
- failLogOff();
- } else if (inventory.getCount(true, 561) < 1) {
- log("We have run out of Nature runes.");
- failLogOff();
- } else if (gotFireStaff == false && inventory.getCount(true, 554) <= 3) {
- log("We need a fire staff or more fire runes.");
- failLogOff(); // finished checking invent
- } else if ((inventory.getCount(oreID) >= primaryOreRatio) //
- && (inventory.getCount(secondOreID) >= secondaryOreRatio)) {
- status = "Lets Superheat"; // above - if there is enough of each ore
- if (game.getCurrentTab() != Game.TAB_MAGIC) {
- status = "Opening magic tab";
- game.openTab(Game.TAB_MAGIC);
- sleep(650, 700);
- }
- if (game.getCurrentTab() == Game.TAB_MAGIC) {
- status = "Selecting Spell";
- magic.castSpell(50);
- sleep(1650, 1700);
- if (game.getCurrentTab() == Game.TAB_INVENTORY) {
- do {
- status = "Selecting Ore";
- if (rockID == coal) {
- RSItem secondaryOre = inventory
- .getItem(secondOreID);
- secondaryOre.doClick(true);
- } else {
- RSItem primaryOre = inventory.getItem(oreID);
- primaryOre.doClick(true);
- }
- sleep(800, 900);
- } while ((getMyPlayer().getAnimation() != 725)
- || game.getCurrentTab() == Game.TAB_INVENTORY);
- }
- sleep(150, 250);
- superWeCan = false;
- } else {
- log("Failed to cast superheat.");
- sleep(20, 40);
- } // end of superheating
- } else {
- // lets mine
- int freeInventSpace = 28;
- int numFirstOre = inventory.getCount(oreID);
- int numSecondOre = inventory.getCount(secondOreID);
- freeInventSpace -= (inventory.getCount() - (numSecondOre
- + numFirstOre + 1));
- // decide which ore to mine
- int numFirstOreMine = (int) (freeInventSpace / (primaryOreRatio
- + secondaryOreRatio + 1));
- if (numFirstOre >= numFirstOreMine) {
- // if enough of the first ore then mine second ore type
- mouse.setSpeed(random(4, 7));
- status = "Looking for Rock";
- RSObject rock = objects.getNearest(secondRockID);
- if (rock != null) {
- int test = rock.getID();
- paintRock = rock; // paints rock
- rockSpot = rock.getLocation();
- if (rock.isOnScreen()) {
- rock.doAction("Mine");
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- RSObject rocky = objects.getTopAt(rockSpot);
- while (rocky.getID() == test
- && getMyPlayer().getAnimation() != -1
- && (calc.distanceTo(rockSpot) < 2)) {
- status = "Mining Ore";
- AntiBanPro();
- rocky = objects.getTopAt(rockSpot);
- AntiBanCamera();
- sleep(random(50, 150));
- }
- } else {
- walking.walkTileMM(walking.getClosestTileOnMap(rock
- .getLocation()));
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- do {
- sleep(100, 150);
- } while (getMyPlayer().isMoving());
- }
- }
- if (rock == null) {
- if (calc.distanceTo(secondMineTile) < 5) {
- RSTile[] path = walking.findPath(secondMineTile);
- RSTilePath newPath = walking.newTilePath(path);
- newPath.randomize(1, 1);
- newPath.traverse();
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- } else {
- sleep(20, 40);
- }
- }
- } else {
- // try to mine first ore first.
- mouse.setSpeed(random(4, 7));
- status = "Looking for Rock";
- RSObject rock = objects.getNearest(rockID);
- if (rock != null) {
- int test = rock.getID();
- paintRock = rock; // paints rock
- rockSpot = rock.getLocation();
- if (rock.isOnScreen()) {
- if (mineEss) { // so doesn't just stand there
- camera.turnToObject(rock, random(2, 13));
- }
- rock.doAction("Mine");
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- RSObject rocky = objects.getTopAt(rockSpot);
- while (rocky.getID() == test
- && getMyPlayer().getAnimation() != -1
- && (calc.distanceTo(rockSpot) < 2)) {
- status = "Mining Ore";
- AntiBanPro();
- rocky = objects.getTopAt(rockSpot);
- AntiBanCamera();
- sleep(random(50, 150));
- }
- } else {
- walking.walkTileMM(walking.getClosestTileOnMap(rock
- .getLocation()));
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- do {
- sleep(100, 150);
- } while (getMyPlayer().isMoving());
- }
- }
- if (rock == null) {
- if (calc.distanceTo(secondMineTile) < 5) {
- RSTile[] path = walking.findPath(secondMineTile);
- RSTilePath newPath = walking.newTilePath(path);
- newPath.randomize(1, 1);
- newPath.traverse();
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- } else {
- sleep(20, 40);
- }
- }
- }
- }
- return superWeCan;
- }
- // M2D2
- public void mTwo() {
- mouse.setSpeed(random(4, 7));
- status = "Looking for rock";
- RSObject rock = objects.getNearest(thisRockID);
- if (rock != null) {
- int test = rock.getID();
- rockSpot = rock.getLocation(); // sets the title rock is on
- paintRock = rock; // paints rock
- if (rock.isOnScreen()) {
- rock.doAction("Mine");
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- RSObject rocky = objects.getTopAt(rockSpot);
- while (rocky.getID() == test
- && getMyPlayer().getAnimation() != -1
- && (calc.distanceTo(rockSpot) < 2)) {
- status = "Mining ore";
- AntiBanPro();
- rocky = objects.getTopAt(rockSpot);
- AntiBanCamera();
- sleep(random(50, 150));
- if (inventory.getCount(thisOreID) >= 1
- && getMyPlayer().getAnimation() != -1) {
- inventory.getItem(thisOreID).getComponent().doHover();
- }
- }
- calucateReturnTime();
- if (inventory.getCount(thisOreID) >= 2) {
- status = "Dropping ore";
- mouse.setSpeed(random(6, 7));
- inventory.dropAllExcept(doNotDrop);
- }
- } else {
- walking.walkTileMM(walking.getClosestTileOnMap(rock
- .getLocation()));
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- do {
- sleep(100, 150);
- } while (getMyPlayer().isMoving());
- }
- }
- }
- // Hybrid
- private void hybrid() {
- mouse.setSpeed(random(5, 7));
- if (inventory.getCountExcept(pickID) >= 1) {
- RSObject rock = objects.getNearest(thisRockID);
- if (rock != null) {
- int test = rock.getID();
- paintRock = rock; // first set this up
- rockSpot = rock.getLocation();
- if (rock.isOnScreen()) {
- // next click on rock
- status = "Clicking on rock";
- rock.doAction("Mine");
- sleep(100, 150);
- // while walking towards rock drop all ore
- status = "Dropping ore";
- mouse.setSpeed(random(4, 7));
- inventory.dropAllExcept(doNotDrop);
- // then click to actually mine the ore
- mouse.setSpeed(random(5, 8));
- rock.doAction("Mine");
- sleep(random(1700, 1800));
- // only needs as one spot of hopefully
- RSObject rocky = objects.getTopAt(rockSpot);
- while (rocky.getID() == test
- && getMyPlayer().getAnimation() != -1
- && (calc.distanceTo(rockSpot) < 2)) {
- status = "Mining ore";
- AntiBanPro();
- rocky = objects.getTopAt(rockSpot);
- AntiBanCamera();
- sleep(random(50, 150));
- }
- calucateReturnTime();
- } else {
- walking.walkTileMM(walking.getClosestTileOnMap(rock
- .getLocation()));
- int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
- sleep(bedtime, (bedtime + 500));
- do {
- sleep(100, 150);
- } while (getMyPlayer().isMoving());
- }
- }
- } else {
- classicMine();
- }
- }
- // //////////////////////
- // ////////DROP//////////
- // //////////////////////
- private void dropOre() {
- mouse.setSpeed(random(6, 7));
- strangeRock();
- status = "Dropping ore";
- inventory.dropAllExcept(doNotDrop);
- sleep(200, 300);
- }
- // ///////////////////////
- // ///////MOUSE///////////
- // ///////////////////////
- public void mouseMoved(MouseEvent e) {
- if (e.getX() >= 6 && e.getX() < 6 + 60 && e.getY() >= 250
- && e.getY() < 250 + 20) {
- showPaint1 = true;
- showPaint2 = false;
- showPaint3 = false;
- showPaint4 = false;
- }
- if (e.getX() >= 70 && e.getX() < 70 + 60 && e.getY() >= 250
- && e.getY() < 250 + 20) {
- showPaint2 = true;
- showPaint1 = false;
- showPaint3 = false;
- showPaint4 = false;
- }
- if (e.getX() >= 134 && e.getX() < 134 + 60 && e.getY() >= 250
- && e.getY() < 250 + 20) {
- showPaint3 = true;
- showPaint1 = false;
- showPaint2 = false;
- showPaint4 = false;
- }
- if (e.getX() >= 198 && e.getX() < 198 + 13 && e.getY() >= 250
- && e.getY() < 250 + 20) {
- showPaint4 = true;
- showPaint1 = false;
- showPaint2 = false;
- showPaint3 = false;
- }
- } // all for interactive paint say 'aye'
- public void mouseDragged(MouseEvent e) {
- // complete utter waste,
- }
- // ///////////////////////
- // ////////WALK///////////
- // ///////////////////////
- public boolean walkToBank() {
- mouse.setSpeed(random(4, 9));
- status = "Walking to Bank";
- RSTilePath newPath = walking.newTilePath(toMine);
- newPath.randomize(2, 2);
- newPath.reverse();
- newPath.traverse();
- AntiBanCamera();
- sleep(350, 500);
- AntiBanCamera();
- return true;
- }
- public boolean walkToMine() {
- mouse.setSpeed(random(4, 9));
- RSTilePath newPath = walking.newTilePath(toMine);
- newPath.randomize(2, 2);
- newPath.traverse();
- sleep(350, 500);
- AntiBanCamera();
- return true;
- }
- public boolean walkFromGuild() {
- mouse.setSpeed(random(4, 9));
- status = "Walking to Bank";
- RSTile[] fromGuild = new RSTile[] { new RSTile(3046, 9753),
- new RSTile(3046, 9744), new RSTile(3040, 9738),
- new RSTile(3032, 9739), new RSTile(3020, 9740) };
- RSTilePath newPath = walking.newTilePath(fromGuild);
- newPath.randomize(2, 2);
- newPath.traverse();
- sleep(350, 500);
- AntiBanCamera();
- return true;
- }
- public boolean walkToRock() {
- mouse.setSpeed(random(4, 9));
- if (mineEss) {
- status = "Walking to Essence";
- if (randomNum2 == 0) {
- randomNum2 = random(1, 4);
- }
- if (randomNum2 == 1) {
- RSTilePath newPath = walking.newTilePath(toNE);
- newPath.randomize(2, 2);
- newPath.traverse();
- } else if (randomNum2 == 2) {
- RSTilePath newPath = walking.newTilePath(toNW);
- newPath.randomize(2, 2);
- newPath.traverse();
- } else if (randomNum2 == 3) {
- RSTilePath newPath = walking.newTilePath(toSE);
- newPath.randomize(2, 2);
- newPath.traverse();
- } else if (randomNum2 == 4) {
- RSTilePath newPath = walking.newTilePath(toSW);
- newPath.randomize(2, 2);
- newPath.traverse();
- }
- } else if (mineGuild) {
- status = "Walking to Rocks";
- if (randomNum2 == 0) {
- randomNum2 = random(1, 4);
- }
- if (randomNum2 == 1) {
- RSTile randomSpot = new RSTile(3034, 9736);
- RSTile[] path = walking.findPath(randomSpot);
- RSTilePath newPath = walking.newTilePath(path);
- newPath.randomize(3, 3);
- newPath.traverse();
- } else if (randomNum2 == 2) {
- RSTile randomSpot = new RSTile(3029, 9738);
- RSTile[] path = walking.findPath(randomSpot);
- RSTilePath newPath = walking.newTilePath(path);
- newPath.randomize(3, 3);
- newPath.traverse();
- } else if (randomNum2 == 3) {
- RSTile randomSpot = new RSTile(3036, 9740);
- RSTile[] path = walking.findPath(randomSpot);
- RSTilePath newPath = walking.newTilePath(path);
- newPath.randomize(3, 3);
- newPath.traverse();
- } else if (randomNum2 == 4) {
- RSTile randomSpot = new RSTile(3047, 9736);
- RSTile[] path = walking.findPath(randomSpot);
- RSTilePath newPath = walking.newTilePath(path);
- newPath.randomize(3, 3);
- newPath.traverse();
- }
- }
- sleep(350, 500);
- AntiBanCamera();
- return true;
- }
- // ///////////////////////
- // /////AuburyTele////////
- // ///////////////////////
- public void teleport() {
- RSNPC aubury = npcs.getNearest(auburyID);
- if (aubury != null) {
- status = "Teleporting.";
- aubury.doAction("Teleport");
- }
- sleep(2400, 3000);
- }
- // ///////////////////////
- // //////OpenDoor/////////
- // ///////////////////////
- public void openDoor() {
- RSObject door = objects.getTopAt(doorTile);
- if (door != null) {
- status = "Opening Door.";
- camera.turnToObject(door, random(2, 3));
- door.doAction("Open");
- sleep(random(500, 650));
- }
- if (door == null) {
- teleport();
- }
- }
- public void openDoor2() {
- RSObject door = objects.getTopAt(doorTile);
- if (door != null) {
- status = "Opening Door.";
- camera.turnToObject(door, random(2, 3));
- door.doAction("Open");
- sleep(500, 650);
- } else if (door == null) {
- status = "Walking To Bank.";
- sleep(550, 700); // maybe needed
- walkToBank();
- }
- }
- // ///////////////////////
- // ////ClickStairs////////
- // ///////////////////////
- public void stairs() {
- RSObject Stair = objects.getNearest(StairID);
- if (Stair != null) {
- randomNum2 = 0;
- if (getMyPlayer().getAnimation() == -1
- && Stair.getLocation() != null) {
- status = "Climbing Stairs";
- camera.turnToObject(Stair, 30);
- if (aboveGuildStairs()) {
- Stair.doAction("Climb-down");
- } else if (underGuildStairs()) {
- Stair.doAction("Climb-up");
- }
- sleep(2050, 3550);
- }
- }
- }
- // ///////////////////////
- // ////ClickPortal////////
- // ///////////////////////
- public void portal() {
- RSObject Portal = objects.getNearest(portalID);
- randomNum2 = 0;
- if (Portal != null) {
- RSTile spot = Portal.getLocation();
- if (!getMyPlayer().isMoving() && Portal.getLocation() != null) {
- status = "Using Portal";
- camera.setAngle(random(180, 90));
- if (calc.distanceTo(Portal) < 3) {
- int o = 1;
- while (Portal.doAction("Enter") == false && o < 4) {
- o++;
- sleep(50, 60);
- }
- sleep(1500, 2500);
- } else {
- walking.walkTileMM(spot);
- int i = 1;
- while ((calc.distanceTo(Portal) > 1) || i < 7) {
- camera.turnToObject(Portal, 10);
- mouse.move(calc.tileToScreen(spot), random(-10, 10),
- random(-10, 10));
- sleep(250, 350);
- i++;
- }
- }
- }
- } else {
- sleep(50, 60);
- }
- }
- // ///////////////////////
- // ////StrangeRock////////
- // ///////////////////////
- private void strangeRock() {
- mouse.setSpeed(random(4, 8));
- RSItem StrangeRock = inventory.getItem(strangeRockID);
- RSInterface inf = interfaces.get(94);
- RSComponent child;
- if (inventory.containsOneOf(strangeRockID)) {
- status = "Destroying strange rock";
- StrangeRock.doAction("Destroy");
- child = inf.getComponent(0);
- if (child != null && child.isValid()) {
- if (child.doAction("Continue")) {
- sleep(900);
- }
- }
- }
- }
- // ///////////////////////
- // /////DrawRocks/////////
- // ///////////////////////
- private void drawTile(Graphics render, RSTile tile, Color color,
- boolean drawCardinalDirections) {
- Point southwest = calc.tileToScreen(tile, 0, 0, 0);
- Point southeast = calc.tileToScreen(
- new RSTile(tile.getX() + 1, tile.getY()), 0, 0, 0);
- Point northwest = calc.tileToScreen(new RSTile(tile.getX(),
- tile.getY() + 1), 0, 0, 0);
- Point northeast = calc.tileToScreen(
- new RSTile(tile.getX() + 1, tile.getY() + 1), 0, 0, 0);
- if (calc.pointOnScreen(southwest) && calc.pointOnScreen(southeast)
- && calc.pointOnScreen(northwest)
- && calc.pointOnScreen(northeast)) {
- render.setColor(Color.BLACK);
- render.drawPolygon(new int[] { (int) northwest.getX(),
- (int) northeast.getX(), (int) southeast.getX(),
- (int) southwest.getX() },
- new int[] { (int) northwest.getY(), (int) northeast.getY(),
- (int) southeast.getY(), (int) southwest.getY() }, 4);
- render.setColor(color);
- render.fillPolygon(new int[] { (int) northwest.getX(),
- (int) northeast.getX(), (int) southeast.getX(),
- (int) southwest.getX() },
- new int[] { (int) northwest.getY(), (int) northeast.getY(),
- (int) southeast.getY(), (int) southwest.getY() }, 4);
- if (drawCardinalDirections) {
- render.setColor(Color.WHITE);
- }
- }
- }
- private void paintRockModel(final Graphics g, final RSObject o,
- final Color c, String s) {
- for (Polygon p : o.getModel().getTriangles()) {
- g.setColor(c);
- g.drawPolygon(p);
- if (c == Color.green) {
- g.setColor(new Color(0, 200, 0, 130));
- } else if (c == Color.red) {
- g.setColor(new Color(200, 0, 0, 130));
- } else if (c == Color.blue) {
- g.setColor(new Color(0, 0, 200, 70));
- }
- g.fillPolygon(p);
- }
- final Point p = calc.tileToScreen(o.getLocation());
- g.setColor(c);
- g.drawString(s, p.x - 30, p.y - 25);
- }
- // ///////////////////////
- // ////////PAINT//////////
- // ///////////////////////
- public void onRepaint(Graphics g) {
- if (game.isLoggedIn() == true) {
- drawTile(g, players.getMyPlayer().getLocation(), new Color(0, 0,
- 200, 70), true);
- if (paintRock != null) {
- paintRockModel(g, paintRock, Color.blue, "Rock");
- }
- g.setColor(transDarkBlue);
- g.fillRect(6, 250, 60, 20); // interactive square 1
- g.fillRect(70, 250, 60, 20); // interactive square 2
- g.fillRect(134, 250, 60, 20); // interactive square 3
- g.fillRect(198, 250, 13, 20); // interactive square 4
- g.setColor(Color.white); // words for interactive squares
- g.drawString("STATUS", 11, 267);
- g.drawString("PROFIT", 75, 267);
- g.drawString("EXTRA", 139, 267);
- g.drawString("X", 201, 267);
- runTime2 = System.currentTimeMillis() - startTime;
- seconds2 = runTime2 / 1000; // seconds
- if (seconds2 >= 60) { // minutes
- minutes2 = seconds2 / 60;
- seconds2 -= (minutes2 * 60);
- }
- if (minutes2 >= 60) { // hours
- hours2 = minutes2 / 60;
- minutes2 -= (hours2 * 60);
- }
- if (startexp == 0) {
- startexp = skills.getCurrentExp(14);
- }
- if (startLvl == 0) {
- startLvl = skills.getCurrentLevel(Skills.MINING);
- }
- // adds zero before minutes
- if (minutes2 >= 10) {
- addZero = "";
- } else if (minutes2 < 10) {
- addZero = "0";
- }
- // adds zero before seconds
- if (seconds2 >= 10) {
- addZero2 = "";
- } else if (seconds2 < 10) {
- addZero2 = "0";
- }
- kMade = (((priceClay * clayMined) + (priceCopper * copperMined)
- + (priceTin * tinMined) + (priceIron * ironMined)
- + (priceSilver * silverMined) + (priceCoal * coalMined)
- + (priceGold * goldMined) + (priceMithril * mithrilMined)) / 1000);
- oresMined = clayMined + copperMined + tinMined + ironMined
- + silverMined + coalMined + goldMined + mithrilMined;
- gainedXP = skills.getCurrentExp(14) - startexp;
- if (mineEss) {
- oresMined = (int) (gainedXP / xpPerEssence);
- kMade = ((oresMined * priceEssence) / 1000);
- }
- currentLVL = skills.getCurrentLevel(Skills.MINING);
- gainedLVL = currentLVL - startLvl;
- oresPerHour = (int) ((3600000.0 / (double) runTime2) * oresMined);
- expPerHour = (int) (3600000.0 / (double) runTime2 * gainedXP);
- kPerHour = (int) (3600000.0 / (double) runTime2 * kMade);
- if (showPaint1 == true) {
- final int percent = (skills.getPercentToNextLevel(14) * 2);
- g.setColor(transDarkRed);
- g.fillRoundRect(8, 282, 200, 18, 16, 16);
- g.setColor(transDarkGreen);
- g.fillRoundRect(8, 282, percent, 18, 16, 16);
- g.setColor(edgeColor);
- g.drawRoundRect(8, 282, 200, 18, 16, 16);
- g.drawRoundRect(8, 282, percent, 18, 16, 16);
- // Percentage bar till level
- g.setColor(transDarkBlue);
- g.fillRoundRect(4, 273, 208, 63, 16, 16);
- g.setColor(edgeColor);
- ((Graphics2D) g).setStroke(stroke1);
- g.drawRoundRect(4, 273, 208, 63, 16, 16);
- g.setColor(Color.white);
- g.drawString("Status: " + status, 23, 295);
- g.drawString("Runtime: " + hours2 + ":" + addZero + minutes2
- + ":" + addZero2 + seconds2, 12, 315);
- g.drawString("XP Gained: " + gainedXP + " (" + expPerHour
- + "/hour)", 12, 329);
- }
- if (showPaint2 == true) {
- g.setColor(transDarkBlue);
- g.fillRoundRect(4, 273, 208, 63, 16, 16);
- g.setColor(edgeColor);
- ((Graphics2D) g).setStroke(stroke1);
- g.drawRoundRect(4, 273, 208, 63, 16, 16);
- g.setColor(Color.white);
- g.drawString("Total Profit Made: " + kMade + "k", 12, 295);
- g.drawString("Profit Per Hour: " + kPerHour + "k", 12, 312);
- g.drawString("Total Ores Mined: " + oresMined + " ("
- + oresPerHour + "/hour)", 12, 329);
- }
- if (showPaint3 == true) {
- g.setColor(transDarkBlue);
- g.fillRoundRect(4, 273, 208, 63, 16, 16);
- g.setColor(edgeColor);
- ((Graphics2D) g).setStroke(stroke1);
- g.drawRoundRect(4, 273, 208, 63, 16, 16);
- g.setColor(Color.white);
- g.drawString("Total Gems Mined: " + gemsMined, 12, 295);
- g.drawString("[Anti-Ban]: " + "Total " + antiBanCount, 12, 312);
- g.drawString(antiBanStatus, 12, 329);
- }
- if (showPaint4 == true) {
- // nothing
- }
- // Draws the mouse
- g.setColor(transDarkBlue);
- g.drawLine(0, (int) (mouse.getLocation().getY()), 800,
- (int) (mouse.getLocation().getY()));
- g.drawLine((int) (mouse.getLocation().getX()), 0,
- (int) (mouse.getLocation().getX()), 800);
- // draws banner
- g.drawImage(img1, 1, 170, null);
- }
- }
- // /////////////////////////
- // ////////ANTIBAN//////////
- // /////////////////////////
- private void AntiBanPro() {
- int randomProd = random(1, 60);
- if (randomProd == 1) {
- int randomMore = random(1, 5);
- if (randomMore == 1) {
- antiBanStatus = "Checking mining level..";
- antiBanCount = antiBanCount + 1;
- if (game.getCurrentTab() != 1) {
- game.openTab(1);
- sleep(350, 500);
- mouse.move(random(678, 728), random(213, 232));
- sleep(2000, 3500);
- } else {
- mouse.move(random(678, 728), random(213, 232));
- sleep(2000, 3500);
- }
- } else {
- antiBanStatus = "Lets wait for a while..";
- antiBanCount = antiBanCount + 1;
- sleep(1200, 2500);
- }
- }
- if (randomProd == 2 || randomProd == 3 || randomProd == 4) {
- antiBanStatus = "Pause for a few seconds..";
- antiBanCount = antiBanCount + 1;
- sleep(1000, 2500);
- }
- if (randomProd >= 52) {
- antiBanStatus = "Moving mouse randomly..";
- antiBanCount = antiBanCount + 1;
- mouse.moveRandomly(65, 350);
- } else
- sleep(10, 30);
- }
- private void AntiBanCamera() {
- int randomNum = random(1, 50);
- if (randomNum == 1 || randomNum == 2 || randomNum == 3) {
- antiBanStatus = "Random camera movement..";
- antiBanCount = antiBanCount + 1;
- camera.moveRandomly(random(2000, 5500));
- }
- if (randomNum == 4 || randomNum == 5) {
- antiBanStatus = "Random camera angle change..";
- antiBanCount = antiBanCount + 1;
- camera.setAngle(random(10, 40));
- }
- if (randomNum == 6) {
- camera.setPitch(random(40, 68));
- antiBanStatus = "Random camera pitch change..";
- antiBanCount = antiBanCount + 1;
- }
- if (randomNum == 7) {
- camera.setPitch(random(20, 45));
- antiBanStatus = "Random camera pitch change..";
- antiBanCount = antiBanCount + 1;
- }
- if (randomNum == 8) {
- camera.setPitch(random(68, 90));
- antiBanStatus = "Random camera pitch change..";
- antiBanCount = antiBanCount + 1;
- } else
- sleep(50, 70);
- }
- // ///////////////////////
- // ////////EXTRAS/////////
- // ////////////////////