Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 11th, 2012  |  syntax: None  |  size: 66.13 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ///////////////////////////
  2. //////////IMPORTS//////////
  3. ///////////////////////////
  4.  
  5. import java.awt.BasicStroke;
  6. import java.awt.Color;
  7. import java.awt.Graphics;
  8. import java.awt.Graphics2D;
  9. import java.awt.GridLayout;
  10. import java.awt.Image;
  11. import java.awt.Point;
  12. import java.awt.Polygon;
  13. import java.awt.event.ActionEvent;
  14. import java.awt.event.ActionListener;
  15. import java.awt.event.MouseEvent;
  16. import java.awt.event.MouseMotionListener;
  17.  
  18. import java.io.*;
  19. import java.net.*;
  20.  
  21. import javax.imageio.ImageIO;
  22. import javax.swing.JButton;
  23. import javax.swing.JCheckBox;
  24. import javax.swing.JComboBox;
  25. import javax.swing.JFrame;
  26. import javax.swing.JLabel;
  27.  
  28. import org.rsbot.event.events.MessageEvent;
  29. import org.rsbot.event.listeners.PaintListener;
  30. import org.rsbot.event.listeners.MessageListener;
  31. import org.rsbot.script.Script;
  32. import org.rsbot.script.ScriptManifest;
  33. import org.rsbot.script.methods.Game;
  34. import org.rsbot.script.methods.GrandExchange.GEItem;
  35. import org.rsbot.script.methods.Skills;
  36. import org.rsbot.script.util.Filter;
  37. import org.rsbot.script.wrappers.RSArea;
  38. import org.rsbot.script.wrappers.RSComponent;
  39. import org.rsbot.script.wrappers.RSInterface;
  40. import org.rsbot.script.wrappers.RSItem;
  41. import org.rsbot.script.wrappers.RSNPC;
  42. import org.rsbot.script.wrappers.RSObject;
  43. import org.rsbot.script.wrappers.RSTile;
  44. import org.rsbot.script.wrappers.RSTilePath;
  45. import org.rsbot.util.GlobalConfiguration;
  46.  
  47. ////////////////////////////
  48. //////////MANIFEST//////////
  49. ////////////////////////////
  50.  
  51. @ScriptManifest(authors = { "Zhrz" }, name = "DarkMiner", version = 1.9, description = "Start near mine location with a pickaxe.")
  52. public class DarkMiner extends Script implements PaintListener,
  53.                 MouseMotionListener, MessageListener {
  54.  
  55.         // ////////////////////////////////////////////////
  56.         // ////////VARIABLES - INT, BOOLEAN, LONG//////////
  57.         // ////////////////////////////////////////////////
  58.  
  59.         // for paint calc
  60.         public long startTime = System.currentTimeMillis(); // timer
  61.         long runTime, seconds, minutes = 0, hours = 0;
  62.         long runTime2, seconds2, minutes2 = 0, hours2 = 0;
  63.  
  64.         int startexp = 0;
  65.         int currentXP;
  66.         int currentLVL;
  67.         int gainedLVL;
  68.         int oresPerHour;
  69.         int expPerHour;
  70.         int startLvl = 0;
  71.         int gainedXP;
  72.  
  73.         int clayMined = 0, copperMined = 0, tinMined = 0, ironMined = 0,
  74.                         silverMined = 0, coalMined = 0, goldMined = 0, mithrilMined = 0;
  75.         int priceEssence, priceClay = 0, priceCopper = 0, priceTin = 0,
  76.                         priceIron = 0, priceSilver = 0, priceCoal = 0, priceGold = 0,
  77.                         priceMithril = 0;
  78.         int oresMined = 0;
  79.         int gemsMined = 0;
  80.  
  81.         int superInt = 0;
  82.         int kMade;
  83.         int kPerHour;
  84.         int antiBanCount = 0;
  85.         int[] gems = { 1621, 1619, 1623, 1617 };
  86.         int randomNum2 = 0;
  87.         int xpPerEssence = 5;
  88.         long returnTime = 0;
  89.  
  90.         // not2Bank
  91.         final int pickID[] = { 1265, 1267, 1269, 1271, 1273, 1275, 14099, 14107,
  92.                         15259, 15261 };
  93.         final int superheatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
  94.                         1275, 14099, 14107, 15259, 15261 };
  95.  
  96.         // not2Drop
  97.         int doNotDrop[];
  98.         final int clayHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
  99.                         1275, 14099, 14107, 15259, 15261, 434 };
  100.         final int copperHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
  101.                         1275, 14099, 14107, 15259, 15261, 436, 2349 };
  102.         final int tinHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
  103.                         1275, 14099, 14107, 15259, 15261, 438, 2349 };
  104.         final int ironHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
  105.                         1275, 14099, 14107, 15259, 15261, 440, 2351 };
  106.         final int silverHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
  107.                         1275, 14099, 14107, 15259, 15261, 442, 2355 };
  108.         final int coalHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
  109.                         1275, 14099, 14107, 15259, 15261, 453, 2353 };
  110.         final int goldHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
  111.                         1275, 14099, 14107, 15259, 15261, 444, 2357 };
  112.         final int mithrilHeatID[] = { 561, 1387, 554, 1265, 1267, 1269, 1271, 1273,
  113.                         1275, 14099, 14107, 15259, 15261, 447, 2359 };
  114.  
  115.         Image img1;
  116.  
  117.         // tests to get info otherwise
  118.         int minRunSoRest = 0;
  119.         int stopRest = 0;
  120.         int gotPickOn = 0;
  121.         int gotFireStaffOn = 0;
  122.  
  123.         // different types of modes
  124.         public boolean pickHold = false;
  125.         public boolean gotFireStaff = false;
  126.         public boolean mineEss = false;
  127.         public boolean mineGuild = false;
  128.         public boolean superWeCan = true;
  129.  
  130.         public boolean modeDrop = false;
  131.         public boolean modeMine2 = false;
  132.         public boolean modeHybrid = false;
  133.         public boolean modeBank = false;
  134.         public boolean modeSuperheat = false;
  135.  
  136.         public boolean mode2Drop = false;
  137.         public boolean mode2Mine2 = false;
  138.         public boolean mode2Hybrid = false;
  139.         public boolean mode2Bank = false;
  140.         public boolean mode2Superheat = false;
  141.         public boolean mode2Null = false;
  142.  
  143.         public boolean yesUpdate = false;
  144.         public boolean modeSecondOre = true;
  145.         public boolean modeDepoBox = false;
  146.  
  147.         // for rock paint
  148.         public RSObject paintRock;
  149.  
  150.         String addZero = "", addZero2 = "";
  151.  
  152.         // rockSpot
  153.         RSTile rockSpot = null;
  154.  
  155.         // for status
  156.         private String status = "Starting...";
  157.         private String antiBanStatus = "Starting...";
  158.  
  159.         // for methods
  160.         int primaryOreRatio = 0;
  161.         int secondaryOreRatio = 0;
  162.         int thisRockID[];
  163.         int rockID[];
  164.         int secondRockID[];
  165.         int thisOreID;
  166.         int oreID;
  167.         int secondOreID = 0;
  168.         final int strangeRockID[] = { 15532, 15533 };
  169.         int DepoBox[] = { 36788 };
  170.  
  171.         // for essence
  172.         private int portalID = 2492;
  173.         private int auburyID = 553;
  174.  
  175.         // for guild
  176.         private int StairID[] = { 6226, 2113 };
  177.  
  178.         // code for paint
  179.         Color edgeColor = new Color(153, 153, 153);
  180.         Color transDarkBlue = new Color(102, 153, 255, 120);
  181.         Color transDarkRed = new Color(204, 0, 0, 120);
  182.         Color transDarkGreen = new Color(51, 153, 0, 200);
  183.  
  184.         public boolean showPaint1 = false; // hover mouse
  185.         public boolean showPaint2 = false;
  186.         public boolean showPaint3 = false;
  187.         public boolean showPaint4 = false;
  188.  
  189.         private final BasicStroke stroke1 = new BasicStroke(1);
  190.  
  191.         // game tiles
  192.         RSTile toNW[];
  193.         RSTile toNE[];
  194.         RSTile toSW[];
  195.         RSTile toSE[];
  196.  
  197.         RSTile toBank[];
  198.         RSTile toMine[];
  199.         RSTile secondMineTile = new RSTile(0000, 0000);
  200.         RSTile mineTile;
  201.         RSTile bankTile;
  202.         RSTile doorTile = new RSTile(3253, 3398);
  203.         RSTile runeShop = new RSTile(3253, 3401);
  204.  
  205.         // for GUI
  206.         private static final String[] TYPE_OPTION = new String[] { "Essence",
  207.                         "Clay", "Copper", "Tin", "Iron", "Silver", "Coal", "Gold",
  208.                         "Mithril" };
  209.         private static final String[] TYPE_OPTION2 = new String[] { "None", "Clay",
  210.                         "Copper", "Tin", "Iron", "Silver", "Coal", "Gold", "Mithril" };
  211.         private static final String[] SELECT_OPTION = new String[] {
  212.                         "Barbarian Village", "Rimmington", "Al Kharid", "West Varrock",
  213.                         "Varrock (Aubury)", "Mining Guild" };
  214.         private static final String[] MINE_OPTION = new String[] { "Bank", "M2D2",
  215.                         "Drop", "Hybrid", "Superheat" };
  216.         private static final String[] MINE_OPTION2 = new String[] { "None", "Bank",
  217.                         "M2D2", "Drop", "Hybrid", "Superheat" };
  218.  
  219.         // rock ID's
  220.         public int essence[] = { 2491 };
  221.         public int clay[] = { 11504, 11503, 11505, 9711, 9713, 15503, 15505 };
  222.         public int copper[] = { 11937, 11938, 9710, 9708, 9709 };
  223.         public int tin[] = { 11933, 11934, 11935, 11957, 11958, 11959, 9714, 9716 };
  224.         public int iron[] = { 37309, 37307, 37308, 11955, 11956, 9718, 9717, 9719 };
  225.         public int silver[] = { 37306, 37304, 37305, 11950, 11949, 11948 };
  226.         public int coal[] = { 11930, 11932, 11931, 5771, 5772, 5770 };
  227.         public int gold[] = { 37312, 37310, 9720, 9722 };
  228.         public int mithril[] = { 5784, 5786, 5785 };
  229.  
  230.         RSArea Guild = new RSArea(new RSTile(3024, 9732), new RSTile(3055, 9756));
  231.  
  232.         // rstiles for mining guild
  233.         private boolean atGuildBank() {
  234.                 RSArea GuildBank = new RSArea(new RSTile(3009, 3355), new RSTile(3018,
  235.                                 3358));
  236.                 return (GuildBank.contains(getMyPlayer().getLocation()));
  237.         }
  238.  
  239.         private boolean aboveGuildStairs() {
  240.                 RSArea GuildStairsTop = new RSArea(new RSTile(3015, 3336), new RSTile(
  241.                                 3024, 3342));
  242.                 return (GuildStairsTop.contains(getMyPlayer().getLocation()));
  243.         }
  244.  
  245.         private boolean underGuildStairs() {
  246.                 RSArea GuildStairsBottom = new RSArea(new RSTile(3017, 9736),
  247.                                 new RSTile(3023, 9742));
  248.                 return (GuildStairsBottom.contains(getMyPlayer().getLocation()));
  249.         }
  250.  
  251.         private boolean inGuild() {
  252.                 RSArea Guild = new RSArea(new RSTile(3024, 9732),
  253.                                 new RSTile(3055, 9756));
  254.                 return (Guild.contains(getMyPlayer().getLocation()));
  255.         }
  256.  
  257.         private boolean atFally() {
  258.                 RSArea GuildStairsBottom = new RSArea(new RSTile(3005, 3326),
  259.                                 new RSTile(3042, 3371));
  260.                 return (GuildStairsBottom.contains(getMyPlayer().getLocation()));
  261.         }
  262.  
  263.         // rstiles for essence mining
  264.         private boolean atNW() {
  265.                 RSArea NorthWest = new RSArea(new RSTile(2884, 4837), new RSTile(2901,
  266.                                 4859));
  267.                 return (NorthWest.contains(getMyPlayer().getLocation()));
  268.         }
  269.  
  270.         private boolean atVarrock() {
  271.                 RSArea Varrock = new RSArea(new RSTile(3239, 3388), new RSTile(3263,
  272.                                 3431));
  273.                 return (Varrock.contains(getMyPlayer().getLocation()));
  274.         }
  275.  
  276.         private boolean atNE() {
  277.                 RSArea NorthEast = new RSArea(new RSTile(2918, 4841), new RSTile(2935,
  278.                                 4857));
  279.                 return (NorthEast.contains(getMyPlayer().getLocation()));
  280.         }
  281.  
  282.         private boolean atSW() {
  283.                 RSArea SouthWest = new RSArea(new RSTile(2885, 4807), new RSTile(2904,
  284.                                 4823));
  285.                 return (SouthWest.contains(getMyPlayer().getLocation()));
  286.         }
  287.  
  288.         private boolean atSE() {
  289.                 RSArea SouthEast = new RSArea(new RSTile(2920, 4806), new RSTile(2936,
  290.                                 4823));
  291.                 return (SouthEast.contains(getMyPlayer().getLocation()));
  292.         }
  293.  
  294.         private boolean atDoor() {
  295.                 RSArea DoorLocation = new RSArea(new RSTile(3251, 3396), new RSTile(
  296.                                 3255, 3405));
  297.                 return (DoorLocation.contains(getMyPlayer().getLocation()));
  298.         }
  299.  
  300.         private boolean atBank() {
  301.                 RSArea Bank = new RSArea(new RSTile(3250, 3419), new RSTile(3257, 3423));
  302.                 return (Bank.contains(getMyPlayer().getLocation()));
  303.         }
  304.  
  305.         private boolean atCenter() {
  306.                 RSArea Center = new RSArea(new RSTile(2903, 4824), new RSTile(2920,
  307.                                 4840));
  308.                 return (Center.contains(getMyPlayer().getLocation()));
  309.         }
  310.  
  311.         private boolean atShop() {
  312.                 RSArea Shop = new RSArea(new RSTile(3251, 3403), new RSTile(3254, 3399));
  313.                 return (Shop.contains(getMyPlayer().getLocation()));
  314.         }
  315.  
  316.         // /////////////////////////
  317.         // ////////VERSION//////////
  318.         // /////////////////////////
  319.  
  320.         private double getVersion() {
  321.                 return (1.9);
  322.         }
  323.  
  324.         // /////////////////////////
  325.         // ////////ONSTART//////////
  326.         // /////////////////////////
  327.  
  328.         public boolean onStart() {
  329.                 log("Starting up, this may take a few seconds...");
  330.  
  331.                 // gets image
  332.                 img1 = getImage("http://img593.imageshack.us/img593/4126/darkminer4.png");
  333.  
  334.                 GUI GUI = new GUI();
  335.                 GUI.setVisible(true);
  336.                 while (GUI.isVisible()) {
  337.                         sleep(50);
  338.                 }
  339.  
  340.                 yesUpdate = GUI.checkForUpdate.isSelected();
  341.  
  342.                 if (yesUpdate == true) {
  343.                         // updater
  344.                         URLConnection url = null;
  345.                         BufferedReader in = null;
  346.                         try {
  347.                                 // Open the version text file
  348.                                 url = new URL(
  349.                                                 "http://cublex.50webs.com/scripts/DarkMinerVERSION.txt")
  350.                                                 .openConnection();
  351.                                 // Create an input stream for it
  352.                                 in = new BufferedReader(new InputStreamReader(
  353.                                                 url.getInputStream()));
  354.                                 // Check if the current version is outdated
  355.                                 if (Double.parseDouble(in.readLine()) > getVersion()) {
  356.                                         // If it is, check if the user would like to update.
  357.                                         log("Update is available. Please head over to our thread to download it.");
  358.                                 } else
  359.                                         log("You have the latest version of DarkMiner.");
  360.                                 // User has the latest version. Tell them!
  361.                                 if (in != null)
  362.                                         in.close();
  363.                         } catch (IOException e) {
  364.                                 log("A problem interrupted checking version.");
  365.                                 return false;
  366.                                 // Return false if there was a problem
  367.                         }
  368.                         // end of updater
  369.                 } else {
  370.                         log("You are using DarkMiner by Zhrz.");
  371.                 }
  372.  
  373.                 // sets up the mining mode
  374.                 if (GUI.mineType.getSelectedItem().toString().equals("M2D2")) {
  375.                         modeMine2 = true;
  376.                 } else if (GUI.mineType.getSelectedItem().toString().equals("Drop")) {
  377.                         modeDrop = true;
  378.                 } else if (GUI.mineType.getSelectedItem().toString().equals("Hybrid")) {
  379.                         modeHybrid = true;
  380.                 } else if (GUI.mineType.getSelectedItem().toString()
  381.                                 .equals("Superheat")) {
  382.                         modeSuperheat = true;
  383.                 } else if (GUI.mineType.getSelectedItem().toString().equals("Bank")) {
  384.                         modeBank = true;
  385.                 }
  386.  
  387.                 // sorts out second mining mode
  388.                 if (GUI.mineType2.getSelectedItem().toString().equals("M2D2")) {
  389.                         mode2Mine2 = true;
  390.                 } else if (GUI.mineType2.getSelectedItem().toString().equals("Drop")) {
  391.                         mode2Drop = true;
  392.                 } else if (GUI.mineType2.getSelectedItem().toString().equals("Hybrid")) {
  393.                         mode2Hybrid = true;
  394.                 } else if (GUI.mineType2.getSelectedItem().toString()
  395.                                 .equals("Superheat")) {
  396.                         mode2Superheat = true;
  397.                 } else if (GUI.mineType2.getSelectedItem().toString().equals("Bank")) {
  398.                         mode2Bank = true;
  399.                 } else {
  400.                         mode2Null = true;
  401.                 }
  402.  
  403.                 // sorts out second ore to mine
  404.                 if (GUI.oreType2.getSelectedItem().toString().equals("None")
  405.                                 || mode2Null) {
  406.                         secondOreID = 0;
  407.                         modeSecondOre = false;
  408.  
  409.                 } else if (GUI.oreType2.getSelectedItem().toString().equals("Clay")) {
  410.                         secondRockID = clay;
  411.                         secondOreID = 434;
  412.  
  413.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  414.                                 secondMineTile = new RSTile(2986, 3240);
  415.  
  416.                         } else if (GUI.location1.getSelectedItem().toString()
  417.                                         .equals("West Varrock")) {
  418.                                 secondMineTile = new RSTile(3180, 3371);
  419.  
  420.                         }
  421.  
  422.                 } else if (GUI.oreType2.getSelectedItem().toString().equals("Copper")) {
  423.                         secondRockID = copper;
  424.                         secondOreID = 436;
  425.  
  426.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  427.                                 secondMineTile = new RSTile(2977, 3246);
  428.  
  429.                         } else if (GUI.location1.getSelectedItem().toString()
  430.                                         .equals("Al Kharid)")) {
  431.                                 secondMineTile = new RSTile(3297, 3314);
  432.  
  433.                         }
  434.  
  435.                 } else if (GUI.oreType2.getSelectedItem().toString().equals("Tin")) {
  436.                         secondRockID = tin;
  437.                         secondOreID = 438;
  438.  
  439.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  440.                                 secondMineTile = new RSTile(2984, 3236);
  441.  
  442.                         } else if (GUI.location1.getSelectedItem().toString()
  443.                                         .equals("Barbarian Village")) {
  444.                                 secondMineTile = new RSTile(3080, 3419);
  445.  
  446.                         } else if (GUI.location1.getSelectedItem().toString()
  447.                                         .equals("Al Kharid)")) {
  448.                                 secondMineTile = new RSTile(3301, 3316);
  449.  
  450.                         } else if (GUI.location1.getSelectedItem().toString()
  451.                                         .equals("West Varrock")) {
  452.                                 secondMineTile = new RSTile(3182, 3377);
  453.                         }
  454.  
  455.                 } else if (GUI.oreType2.getSelectedItem().toString().equals("Iron")) {
  456.                         secondRockID = iron;
  457.                         secondOreID = 440;
  458.  
  459.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  460.                                 secondMineTile = new RSTile(2970, 3240);
  461.  
  462.                         } else if (GUI.location1.getSelectedItem().toString()
  463.                                         .equals("Al Kharid)")) {
  464.                                 secondMineTile = new RSTile(3298, 3311);
  465.  
  466.                         } else if (GUI.location1.getSelectedItem().toString()
  467.                                         .equals("West Varrock")) {
  468.                                 secondMineTile = new RSTile(3175, 3367);
  469.                         }
  470.  
  471.                 } else if (GUI.oreType2.getSelectedItem().toString().equals("Silver")) {
  472.                         secondRockID = silver;
  473.                         secondOreID = 442;
  474.  
  475.                         if (GUI.location1.getSelectedItem().toString().equals("Al Kharid)")) {
  476.                                 secondMineTile = new RSTile(3295, 3301);
  477.  
  478.                         } else if (GUI.location1.getSelectedItem().toString()
  479.                                         .equals("West Varrock")) {
  480.                                 secondMineTile = new RSTile(3176, 3368);
  481.                         }
  482.  
  483.                 } else if (GUI.oreType2.getSelectedItem().toString().equals("Coal")) {
  484.                         secondRockID = coal;
  485.                         secondOreID = 453;
  486.  
  487.                         if (GUI.location1.getSelectedItem().toString()
  488.                                         .equals("Barbarian Village")) {
  489.                                 mineTile = new RSTile(3083, 3422);
  490.  
  491.                         } else if (GUI.location1.getSelectedItem().toString()
  492.                                         .equals("Al Kharid)")) {
  493.                                 mineTile = new RSTile(3300, 3299);
  494.                         }
  495.  
  496.                 } else if (GUI.oreType2.getSelectedItem().toString().equals("Gold")) {
  497.                         secondRockID = gold;
  498.                         secondOreID = 444;
  499.  
  500.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  501.                                 mineTile = new RSTile(2977, 3234);
  502.  
  503.                         } else if (GUI.location1.getSelectedItem().toString()
  504.                                         .equals("Al Kharid)")) {
  505.                                 mineTile = new RSTile(3297, 3287);
  506.                         }
  507.  
  508.                 } else if (GUI.oreType2.getSelectedItem().toString().equals("Mithril")) {
  509.                         secondRockID = mithril;
  510.                         secondOreID = 447;
  511.  
  512.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  513.                         } else if (GUI.location1.getSelectedItem().toString()
  514.                                         .equals("Al Kharid)")) {
  515.                         } else if (GUI.location1.getSelectedItem().toString()
  516.                                         .equals("West Varrock")) {
  517.                         } else if (GUI.location1.getSelectedItem().toString()
  518.                                         .equals("Mining Guild")) {
  519.                                 mineTile = new RSTile(3297, 3287);
  520.                         } else {
  521.                                 log("Second ore and location do not match.");
  522.                         }
  523.                 }
  524.  
  525.                 // sorts out bank tile + depo mode
  526.                 if (GUI.location1.getSelectedItem().toString()
  527.                                 .equals("Barbarian Village")) {
  528.                         bankTile = new RSTile(3094, 3491);
  529.  
  530.                 } else if (GUI.location1.getSelectedItem().toString()
  531.                                 .equals("Rimmington")) {
  532.                         bankTile = new RSTile(3047, 3236);
  533.                         modeDepoBox = true;
  534.  
  535.                 } else if (GUI.location1.getSelectedItem().toString()
  536.                                 .equals("West Varrock")) {
  537.                         bankTile = new RSTile(3182, 3436);
  538.  
  539.                 } else if (GUI.location1.getSelectedItem().toString()
  540.                                 .equals("Al Kharid")) {
  541.                         bankTile = new RSTile(3269, 3167);
  542.  
  543.                 }
  544.  
  545.                 // ore type + location +path
  546.                 if (GUI.oreType.getSelectedItem().toString().equals("Essence")) {
  547.                         mineEss = true;
  548.                         rockID = essence;
  549.                         oreID = 1436;
  550.                         primaryOreRatio = 0;
  551.                         secondaryOreRatio = 0;
  552.                         if (GUI.location1.getSelectedItem().toString()
  553.                                         .equals("Varrock (Aubury)")) {
  554.                                 bankTile = new RSTile(3254, 3420);
  555.  
  556.                                 toBank = new RSTile[] { new RSTile(3258, 3411),
  557.                                                 new RSTile(3261, 3422), new RSTile(3254, 3420) };
  558.  
  559.                                 toMine = new RSTile[] { new RSTile(3254, 3420),
  560.                                                 new RSTile(3257, 3412), new RSTile(3257, 3401),
  561.                                                 new RSTile(3253, 3398) };
  562.  
  563.                                 toNW = new RSTile[] { new RSTile(2911, 4831),
  564.                                                 new RSTile(2906, 4839), new RSTile(2900, 4842),
  565.                                                 new RSTile(2895, 4846) };
  566.  
  567.                                 toNE = new RSTile[] { new RSTile(2911, 4831),
  568.                                                 new RSTile(2919, 4840), new RSTile(2923, 4844),
  569.                                                 new RSTile(2926, 4847) };
  570.  
  571.                                 toSW = new RSTile[] { new RSTile(2911, 4831),
  572.                                                 new RSTile(2904, 4824), new RSTile(2899, 4820),
  573.                                                 new RSTile(2897, 4817) };
  574.  
  575.                                 toSE = new RSTile[] { new RSTile(2911, 4831),
  576.                                                 new RSTile(2918, 4822), new RSTile(2922, 4819),
  577.                                                 new RSTile(2926, 4819) };
  578.                         } else {
  579.                                 log("[Error] = Selected ore and location do not match.");
  580.                         }
  581.                 } else if (GUI.oreType.getSelectedItem().toString().equals("Clay")) {
  582.                         rockID = clay;
  583.                         oreID = 434;
  584.                         primaryOreRatio = 0;
  585.                         secondaryOreRatio = 0;
  586.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  587.                                 mineTile = new RSTile(2986, 3240);
  588.  
  589.                                 toMine = new RSTile[] { new RSTile(3012, 3355),
  590.                                                 new RSTile(3007, 3344), new RSTile(3007, 3332),
  591.                                                 new RSTile(3006, 3321), new RSTile(2997, 3310),
  592.                                                 new RSTile(2986, 3304), new RSTile(2985, 3293),
  593.                                                 new RSTile(2986, 3282), new RSTile(2979, 3274),
  594.                                                 new RSTile(2974, 3263), new RSTile(2977, 3254),
  595.                                                 new RSTile(2978, 3242), new RSTile(2986, 3240),
  596.                                                 new RSTile(2986, 3240) };
  597.  
  598.                         } else if (GUI.location1.getSelectedItem().toString()
  599.                                         .equals("West Varrock")) {
  600.                                 mineTile = new RSTile(3180, 3371);
  601.  
  602.                                 toMine = new RSTile[] { new RSTile(3182, 3436),
  603.                                                 new RSTile(3177, 3429), new RSTile(3171, 3420),
  604.                                                 new RSTile(3171, 3410), new RSTile(3171, 3402),
  605.                                                 new RSTile(3173, 3394), new RSTile(3176, 3387),
  606.                                                 new RSTile(3182, 3379), new RSTile(3184, 3373),
  607.                                                 new RSTile(3180, 3371) };
  608.  
  609.                         } else {
  610.                                 log("[Error] = Selected ore and location do not match.");
  611.                         }
  612.  
  613.                 } else if (GUI.oreType.getSelectedItem().toString().equals("Copper")) {
  614.                         rockID = copper;
  615.                         oreID = 436;
  616.                         primaryOreRatio = 1;
  617.                         secondaryOreRatio = 1;
  618.  
  619.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  620.                                 mineTile = new RSTile(2977, 3246);
  621.  
  622.                                 toMine = new RSTile[] { new RSTile(3047, 3236),
  623.                                                 new RSTile(3040, 3236), new RSTile(3033, 3236),
  624.                                                 new RSTile(3027, 3240), new RSTile(3021, 3242),
  625.                                                 new RSTile(3015, 3242), new RSTile(3008, 3240),
  626.                                                 new RSTile(3001, 3238), new RSTile(2995, 3236),
  627.                                                 new RSTile(2989, 3232), new RSTile(2985, 3238),
  628.                                                 new RSTile(2980, 3243), new RSTile(2977, 3246) };
  629.  
  630.                         } else if (GUI.location1.getSelectedItem().toString()
  631.                                         .equals("Al Kharid")) {
  632.                                 mineTile = new RSTile(3297, 3314);
  633.  
  634.                                 toMine = new RSTile[] { new RSTile(3269, 3166),
  635.                                                 new RSTile(3275, 3170), new RSTile(3278, 3178),
  636.                                                 new RSTile(3283, 3185), new RSTile(3282, 3191),
  637.                                                 new RSTile(3282, 3199), new RSTile(3278, 3206),
  638.                                                 new RSTile(3278, 3212), new RSTile(3278, 3220),
  639.                                                 new RSTile(3279, 3226), new RSTile(3283, 3233),
  640.                                                 new RSTile(3287, 3240), new RSTile(3291, 3247),
  641.                                                 new RSTile(3293, 3255), new RSTile(3294, 3261),
  642.                                                 new RSTile(3295, 3268), new RSTile(3296, 3276),
  643.                                                 new RSTile(3298, 3283), new RSTile(3299, 3290),
  644.                                                 new RSTile(3298, 3297), new RSTile(3299, 3303),
  645.                                                 new RSTile(3300, 3310), new RSTile(3297, 3314) };
  646.  
  647.                         } else {
  648.                                 log("[Error] = Selected ore and location do not match.");
  649.                         }
  650.  
  651.                 } else if (GUI.oreType.getSelectedItem().toString().equals("Tin")) {
  652.                         rockID = tin;
  653.                         oreID = 438;
  654.                         primaryOreRatio = 1;
  655.                         secondaryOreRatio = 1;
  656.  
  657.                         if (GUI.location1.getSelectedItem().toString()
  658.                                         .equals("Barbarian Village")) {
  659.                                 mineTile = new RSTile(3080, 3419);
  660.  
  661.                                 toMine = new RSTile[] { new RSTile(3094, 3491),
  662.                                                 new RSTile(3088, 3488), new RSTile(3093, 3485),
  663.                                                 new RSTile(3100, 3483), new RSTile(3100, 3475),
  664.                                                 new RSTile(3100, 3466), new RSTile(3094, 3464),
  665.                                                 new RSTile(3087, 3462), new RSTile(3087, 3455),
  666.                                                 new RSTile(3087, 3448), new RSTile(3088, 3439),
  667.                                                 new RSTile(3089, 3432), new RSTile(3086, 3427),
  668.                                                 new RSTile(3083, 3423), new RSTile(3080, 3491) };
  669.  
  670.                         } else if (GUI.location1.getSelectedItem().toString()
  671.                                         .equals("Rimmington")) {
  672.                                 mineTile = new RSTile(2984, 3236);
  673.  
  674.                                 toMine = new RSTile[] { new RSTile(3047, 3236),
  675.                                                 new RSTile(3040, 3236), new RSTile(3033, 3236),
  676.                                                 new RSTile(3027, 3240), new RSTile(3021, 3242),
  677.                                                 new RSTile(3015, 3242), new RSTile(3008, 3240),
  678.                                                 new RSTile(3001, 3238), new RSTile(2995, 3236),
  679.                                                 new RSTile(2989, 3232), new RSTile(2984, 3236) };
  680.  
  681.                         } else if (GUI.location1.getSelectedItem().toString()
  682.                                         .equals("Al Kharid")) {
  683.                                 mineTile = new RSTile(3301, 3316);
  684.  
  685.                                 toMine = new RSTile[] { new RSTile(3269, 3166),
  686.                                                 new RSTile(3275, 3170), new RSTile(3278, 3178),
  687.                                                 new RSTile(3283, 3185), new RSTile(3282, 3191),
  688.                                                 new RSTile(3282, 3199), new RSTile(3278, 3206),
  689.                                                 new RSTile(3278, 3212), new RSTile(3278, 3220),
  690.                                                 new RSTile(3279, 3226), new RSTile(3283, 3233),
  691.                                                 new RSTile(3287, 3240), new RSTile(3291, 3247),
  692.                                                 new RSTile(3293, 3255), new RSTile(3294, 3261),
  693.                                                 new RSTile(3295, 3268), new RSTile(3296, 3276),
  694.                                                 new RSTile(3298, 3283), new RSTile(3299, 3290),
  695.                                                 new RSTile(3298, 3297), new RSTile(3299, 3303),
  696.                                                 new RSTile(3300, 3310), new RSTile(3301, 3316) };
  697.  
  698.                         } else if (GUI.location1.getSelectedItem().toString()
  699.                                         .equals("West Varrock")) {
  700.                                 mineTile = new RSTile(3182, 3377);
  701.  
  702.                                 toMine = new RSTile[] { new RSTile(3182, 3436),
  703.                                                 new RSTile(3177, 3429), new RSTile(3171, 3420),
  704.                                                 new RSTile(3171, 3410), new RSTile(3171, 3402),
  705.                                                 new RSTile(3173, 3394), new RSTile(3176, 3387),
  706.                                                 new RSTile(3182, 3379), new RSTile(3182, 3376) };
  707.                         } else {
  708.                                 log("[Error] = Selected ore and location do not match.");
  709.                         }
  710.  
  711.                 } else if (GUI.oreType.getSelectedItem().toString().equals("Iron")) {
  712.                         rockID = iron;
  713.                         oreID = 440;
  714.                         primaryOreRatio = 1;
  715.                         secondaryOreRatio = 0;
  716.  
  717.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  718.                                 mineTile = new RSTile(2970, 3240);
  719.  
  720.                                 toMine = new RSTile[] { new RSTile(3047, 3236),
  721.                                                 new RSTile(3040, 3236), new RSTile(3033, 3236),
  722.                                                 new RSTile(3027, 3240), new RSTile(3021, 3242),
  723.                                                 new RSTile(3015, 3242), new RSTile(3008, 3240),
  724.                                                 new RSTile(3001, 3238), new RSTile(2995, 3236),
  725.                                                 new RSTile(2989, 3232), new RSTile(2982, 3235),
  726.                                                 new RSTile(2976, 3237), new RSTile(2970, 3240) };
  727.  
  728.                         } else if (GUI.location1.getSelectedItem().toString()
  729.                                         .equals("Al Kharid")) {
  730.                                 mineTile = new RSTile(3298, 3311);
  731.  
  732.                                 toMine = new RSTile[] { new RSTile(3269, 3166),
  733.                                                 new RSTile(3275, 3170), new RSTile(3278, 3178),
  734.                                                 new RSTile(3283, 3185), new RSTile(3282, 3191),
  735.                                                 new RSTile(3282, 3199), new RSTile(3278, 3206),
  736.                                                 new RSTile(3278, 3212), new RSTile(3278, 3220),
  737.                                                 new RSTile(3279, 3226), new RSTile(3283, 3233),
  738.                                                 new RSTile(3287, 3240), new RSTile(3291, 3247),
  739.                                                 new RSTile(3293, 3255), new RSTile(3294, 3261),
  740.                                                 new RSTile(3295, 3268), new RSTile(3296, 3276),
  741.                                                 new RSTile(3298, 3283), new RSTile(3299, 3290),
  742.                                                 new RSTile(3298, 3297), new RSTile(3299, 3303),
  743.                                                 new RSTile(3300, 3310), new RSTile(3298, 3311) };
  744.  
  745.                         } else if (GUI.location1.getSelectedItem().toString()
  746.                                         .equals("West Varrock")) {
  747.                                 mineTile = new RSTile(3175, 3367);
  748.  
  749.                                 toMine = new RSTile[] { new RSTile(3182, 3436),
  750.                                                 new RSTile(3177, 3429), new RSTile(3171, 3420),
  751.                                                 new RSTile(3171, 3410), new RSTile(3171, 3402),
  752.                                                 new RSTile(3173, 3394), new RSTile(3176, 3387),
  753.                                                 new RSTile(3182, 3379), new RSTile(3184, 3373),
  754.                                                 new RSTile(3175, 3367) };
  755.  
  756.                         } else {
  757.                                 log("[Error] = Selected ore and location do not match.");
  758.                         }
  759.  
  760.                 } else if (GUI.oreType.getSelectedItem().toString().equals("Silver")) {
  761.                         rockID = silver;
  762.                         oreID = 442;
  763.                         primaryOreRatio = 1;
  764.                         secondaryOreRatio = 0;
  765.  
  766.                         if (GUI.location1.getSelectedItem().toString().equals("Al Kharid")) {
  767.                                 mineTile = new RSTile(3295, 3301);
  768.  
  769.                                 toMine = new RSTile[] { new RSTile(3269, 3166),
  770.                                                 new RSTile(3275, 3170), new RSTile(3278, 3178),
  771.                                                 new RSTile(3283, 3185), new RSTile(3282, 3191),
  772.                                                 new RSTile(3282, 3199), new RSTile(3278, 3206),
  773.                                                 new RSTile(3278, 3212), new RSTile(3278, 3220),
  774.                                                 new RSTile(3279, 3226), new RSTile(3283, 3233),
  775.                                                 new RSTile(3287, 3240), new RSTile(3291, 3247),
  776.                                                 new RSTile(3293, 3255), new RSTile(3294, 3261),
  777.                                                 new RSTile(3295, 3268), new RSTile(3296, 3276),
  778.                                                 new RSTile(3298, 3283), new RSTile(3299, 3290),
  779.                                                 new RSTile(3298, 3297), new RSTile(3295, 3301) };
  780.  
  781.                         } else if (GUI.location1.getSelectedItem().toString()
  782.                                         .equals("West Varrock")) {
  783.                                 mineTile = new RSTile(3176, 3368);
  784.  
  785.                                 toMine = new RSTile[] { new RSTile(3182, 3436),
  786.                                                 new RSTile(3177, 3429), new RSTile(3171, 3420),
  787.                                                 new RSTile(3171, 3410), new RSTile(3171, 3402),
  788.                                                 new RSTile(3173, 3394), new RSTile(3176, 3387),
  789.                                                 new RSTile(3182, 3379), new RSTile(3184, 3373),
  790.                                                 new RSTile(3177, 3368) };
  791.  
  792.                         } else {
  793.                                 log("[Error] = Selected ore and location do not match.");
  794.                         }
  795.  
  796.                 } else if (GUI.oreType.getSelectedItem().toString().equals("Coal")) {
  797.                         rockID = coal;
  798.                         oreID = 453;
  799.                         primaryOreRatio = 2;
  800.                         secondaryOreRatio = 1;
  801.  
  802.                         if (GUI.location1.getSelectedItem().toString()
  803.                                         .equals("Barbarian Village")) {
  804.                                 mineTile = new RSTile(3083, 3422);
  805.  
  806.                                 toMine = new RSTile[] { new RSTile(3094, 3491),
  807.                                                 new RSTile(3088, 3488), new RSTile(3093, 3485),
  808.                                                 new RSTile(3100, 3483), new RSTile(3100, 3475),
  809.                                                 new RSTile(3100, 3466), new RSTile(3094, 3464),
  810.                                                 new RSTile(3087, 3462), new RSTile(3087, 3455),
  811.                                                 new RSTile(3087, 3448), new RSTile(3088, 3439),
  812.                                                 new RSTile(3089, 3432), new RSTile(3086, 3427),
  813.                                                 new RSTile(3083, 3423), new RSTile(3083, 3422) };
  814.  
  815.                         } else if (GUI.location1.getSelectedItem().toString()
  816.                                         .equals("Al Kharid")) {
  817.                                 mineTile = new RSTile(3300, 3299);
  818.  
  819.                                 toMine = new RSTile[] { new RSTile(3269, 3166),
  820.                                                 new RSTile(3275, 3170), new RSTile(3278, 3178),
  821.                                                 new RSTile(3283, 3185), new RSTile(3282, 3191),
  822.                                                 new RSTile(3282, 3199), new RSTile(3278, 3206),
  823.                                                 new RSTile(3278, 3212), new RSTile(3278, 3220),
  824.                                                 new RSTile(3279, 3226), new RSTile(3283, 3233),
  825.                                                 new RSTile(3287, 3240), new RSTile(3291, 3247),
  826.                                                 new RSTile(3293, 3255), new RSTile(3294, 3261),
  827.                                                 new RSTile(3295, 3268), new RSTile(3296, 3276),
  828.                                                 new RSTile(3298, 3283), new RSTile(3299, 3290),
  829.                                                 new RSTile(3298, 3297), new RSTile(3300, 3300) };
  830.  
  831.                         } else if (GUI.location1.getSelectedItem().toString()
  832.                                         .equals("Mining Guild")) {
  833.  
  834.                                 mineGuild = true;
  835.                                 mineTile = new RSTile(3037, 9738);
  836.                                 bankTile = new RSTile(3012, 3355);
  837.  
  838.                                 toMine = new RSTile[] { new RSTile(3013, 3355),
  839.                                                 new RSTile(3018, 3362), new RSTile(3024, 3358),
  840.                                                 new RSTile(3024, 3351), new RSTile(3031, 3348),
  841.                                                 new RSTile(3031, 3341), new RSTile(3027, 3336),
  842.                                                 new RSTile(3021, 3339) };
  843.  
  844.                         } else {
  845.                                 log("[Error] = Selected ore and location do not match.");
  846.                         }
  847.  
  848.                 } else if (GUI.oreType.getSelectedItem().toString().equals("Gold")) {
  849.                         rockID = gold;
  850.                         oreID = 444;
  851.                         primaryOreRatio = 1;
  852.                         secondaryOreRatio = 0;
  853.  
  854.                         if (GUI.location1.getSelectedItem().toString().equals("Rimmington")) {
  855.                                 mineTile = new RSTile(2977, 3234);
  856.  
  857.                                 toMine = new RSTile[] { new RSTile(3047, 3236),
  858.                                                 new RSTile(3040, 3236), new RSTile(3033, 3236),
  859.                                                 new RSTile(3027, 3240), new RSTile(3021, 3242),
  860.                                                 new RSTile(3015, 3242), new RSTile(3008, 3240),
  861.                                                 new RSTile(3001, 3238), new RSTile(2995, 3236),
  862.                                                 new RSTile(2989, 3232), new RSTile(2981, 3232),
  863.                                                 new RSTile(2977, 3234) };
  864.  
  865.                         } else if (GUI.location1.getSelectedItem().toString()
  866.                                         .equals("Al Kharid")) {
  867.                                 mineTile = new RSTile(3297, 3287);
  868.  
  869.                                 toMine = new RSTile[] { new RSTile(3269, 3166),
  870.                                                 new RSTile(3275, 3170), new RSTile(3278, 3178),
  871.                                                 new RSTile(3283, 3185), new RSTile(3282, 3191),
  872.                                                 new RSTile(3282, 3199), new RSTile(3278, 3206),
  873.                                                 new RSTile(3278, 3212), new RSTile(3278, 3220),
  874.                                                 new RSTile(3279, 3226), new RSTile(3283, 3233),
  875.                                                 new RSTile(3287, 3240), new RSTile(3291, 3247),
  876.                                                 new RSTile(3293, 3255), new RSTile(3294, 3261),
  877.                                                 new RSTile(3295, 3268), new RSTile(3296, 3276),
  878.                                                 new RSTile(3298, 3283), new RSTile(3297, 3287) };
  879.  
  880.                         } else {
  881.                                 log("[Error] = Selected ore and location do not match.");
  882.                         }
  883.                 } else if (GUI.oreType.getSelectedItem().toString().equals("Mithril")) {
  884.                         rockID = mithril;
  885.                         oreID = 447;
  886.                         primaryOreRatio = 1;
  887.                         secondaryOreRatio = 4;
  888.  
  889.                         if (GUI.location1.getSelectedItem().toString()
  890.                                         .equals("Mining Guild")) {
  891.  
  892.                                 mineGuild = true;
  893.                                 mineTile = new RSTile(3050, 9737);
  894.                                 bankTile = new RSTile(3012, 3355);
  895.  
  896.                                 toMine = new RSTile[] { new RSTile(3013, 3355),
  897.                                                 new RSTile(3018, 3362), new RSTile(3024, 3358),
  898.                                                 new RSTile(3024, 3351), new RSTile(3031, 3348),
  899.                                                 new RSTile(3031, 3341), new RSTile(3027, 3336),
  900.                                                 new RSTile(3021, 3339) };
  901.  
  902.                         }
  903.                 }
  904.  
  905.                 if (modeBank && mode2Bank) {
  906.                         doNotDrop = pickID;
  907.                 } else if (modeDrop || modeMine2 || modeHybrid) {
  908.                         doNotDrop = pickID;
  909.                 } else if (rockID == clay) {
  910.                         doNotDrop = clayHeatID;
  911.                 } else if (rockID == tin || thisRockID == copper) {
  912.                         doNotDrop = tinHeatID;
  913.                 } else if (rockID == iron) {
  914.                         doNotDrop = ironHeatID;
  915.                 } else if (rockID == silver) {
  916.                         doNotDrop = silverHeatID;
  917.                 } else if (rockID == gold) {
  918.                         doNotDrop = goldHeatID;
  919.                 } else if (rockID == coal) {
  920.                         doNotDrop = coalHeatID;
  921.                 } else if (rockID == mithril) {
  922.                         doNotDrop = mithrilHeatID;
  923.                 } else if (rockID == essence) {
  924.                         // nothing
  925.                 } else {
  926.                         log("Failed to set Not2Drop items");
  927.                 }
  928.  
  929.                 /*
  930.                  * Not2Drop
  931.                  *
  932.                  * Start with pickaxes
  933.                  *
  934.                  * if banking first ore add that to not drop if banking second ore add
  935.                  * that not to drop
  936.                  *
  937.                  * if superheating add equipment not to drop
  938.                  */
  939.                
  940.                 if (rockID == essence) {
  941.                         priceEssence = getPrice(1436);
  942.                 }
  943.                 if (rockID == clay || secondRockID == clay) {
  944.                         priceClay = getPrice(434);
  945.                 }
  946.                 if (rockID == copper || secondRockID == copper) {
  947.                         priceCopper = getPrice(436);
  948.                 }
  949.                 if (rockID == tin || secondRockID == tin) {
  950.                         priceTin = getPrice(438);
  951.                 }
  952.                 if (rockID == iron || secondRockID == iron) {
  953.                         priceIron = getPrice(440);
  954.                 }
  955.                 if (rockID == silver || secondRockID == silver) {
  956.                         priceSilver = getPrice(442);
  957.                 }
  958.                 if (rockID == coal || secondRockID == coal) {
  959.                         priceCoal = getPrice(453);
  960.                 }
  961.                 if (rockID == gold || secondRockID == gold) {
  962.                         priceGold = getPrice(444);
  963.                 }
  964.                 if (rockID == mithril || secondRockID == mithril) {
  965.                         priceMithril = getPrice(447);
  966.                 }
  967.  
  968.                 mouse.setSpeed(random(3, 4)); // Lets sort out this mouse
  969.                 startTime = System.currentTimeMillis(); // start paint timer
  970.                 return true;
  971.         }
  972.  
  973.         // ///////////////////////////////
  974.         // ///////////GETPRICE////////////
  975.         // ///////////////////////////////
  976.        
  977.         public int getPrice(int itemNumber){
  978.                 int price = 0;
  979.                 try {
  980.                         GEItem it = grandExchange.lookup(itemNumber);
  981.                         price = it.getGuidePrice();
  982.             } catch (Exception ex) {
  983.                 log("Unable to get Market Price(s) of Item");
  984.             }
  985.             return price;
  986.         }
  987.        
  988.         // ///////////////////////////////
  989.         // ////////SERVERMESSAGE//////////
  990.         // ///////////////////////////////
  991.  
  992.         public void messageReceived(MessageEvent e) {
  993.                 String svrmsg = e.getMessage();
  994.  
  995.                 if (svrmsg.contains("clay")) {
  996.                         clayMined++;
  997.                 }
  998.                 if (svrmsg.contains("copper")) {
  999.                         copperMined++;
  1000.                 }
  1001.                 if (svrmsg.contains("tin")) {
  1002.                         tinMined++;
  1003.                 }
  1004.                 if (svrmsg.contains("iron")) {
  1005.                         ironMined++;
  1006.                 }
  1007.                 if (svrmsg.contains("silver")) {
  1008.                         silverMined++;
  1009.                 }
  1010.                 if (svrmsg.contains("coal")) {
  1011.                         coalMined++;
  1012.                 }
  1013.                 if (svrmsg.contains("gold")) {
  1014.                         goldMined++;
  1015.                 }
  1016.                 if (svrmsg.contains("mithril")) {
  1017.                         mithrilMined++;
  1018.                 }
  1019.                 if (svrmsg.contains("just found")) {
  1020.                         gemsMined++;
  1021.                 }
  1022.         }
  1023.  
  1024.         // ///////////////////////
  1025.         // //////FindRock/////////
  1026.         // ///////////////////////
  1027.  
  1028.         private RSObject newRock() {
  1029.                 return objects.getNearest(new Filter<RSObject>() {
  1030.                         public boolean accept(RSObject n) {
  1031.                                 return Guild.contains(n.getLocation())
  1032.                                                 && (n.equals(thisRockID));
  1033.                         }
  1034.                 });
  1035.         }
  1036.  
  1037.         // ///////////////////////
  1038.         // /////RESTandRUN////////
  1039.         // ///////////////////////
  1040.  
  1041.         public boolean letsRun() {
  1042.                 mouse.setSpeed(random(4, 9));
  1043.                 if (minRunSoRest == 0) {
  1044.                         if (mineEss) {
  1045.                                 minRunSoRest = random(78, 88);
  1046.                         } else {
  1047.                                 minRunSoRest = random(1, 23);
  1048.                         }
  1049.                         stopRest = random(89, 97);
  1050.                 }
  1051.                 if (walking.isRunEnabled() == false
  1052.                                 || walking.getEnergy() < minRunSoRest) {
  1053.                         if (walking.getEnergy() < stopRest) {
  1054.                                 status = "Resting";
  1055.                                 walking.rest(random(92, 100));
  1056.                                 int anim = players.getMyPlayer().getAnimation();
  1057.                                 do {
  1058.                                         sleep(250, 350);
  1059.                                         AntiBanPro();
  1060.                                         sleep(250, 350);
  1061.                                         AntiBanCamera();
  1062.                                 } while ((walking.getEnergy() < stopRest)
  1063.                                                 && (anim == 12108 || anim == 2033 || anim == 2716
  1064.                                                                 || anim == 11786 || anim == 5713));
  1065.                         }
  1066.                         if (walking.getEnergy() > stopRest) {
  1067.                                 if (walking.isRunEnabled() == false) {
  1068.                                         status = "Turning run on";
  1069.                                         walking.setRun(true);
  1070.                                         sleep(850, 1200);
  1071.                                         minRunSoRest = 0;
  1072.                                 } else if (walking.isRunEnabled() == true) {
  1073.                                         sleep(20, 30);
  1074.                                 }
  1075.                         }
  1076.                 } else {
  1077.                         sleep(12, 15);
  1078.                 }
  1079.                 return true;
  1080.         }
  1081.  
  1082.         // ///////////////////////
  1083.         // ////ReturnTime/////////
  1084.         // ///////////////////////
  1085.  
  1086.         public void calucateReturnTime() {
  1087.                 if (thisRockID == secondRockID) {
  1088.                         // then run off screaming
  1089.                 } else if (seconds >= returnTime) {
  1090.                         returnTime = 0;
  1091.                         if (thisRockID == clay) {
  1092.                                 returnTime = seconds + 2;
  1093.                         } else if (thisRockID == tin || thisRockID == copper) {
  1094.                                 returnTime = seconds + 3;
  1095.                         } else if (thisRockID == iron) {
  1096.                                 returnTime = seconds + 8;
  1097.                         } else if (thisRockID == silver || thisRockID == gold) {
  1098.                                 returnTime = seconds + 96;
  1099.                         } else if (thisRockID == coal) {
  1100.                                 returnTime = seconds + 46;
  1101.                         } else if (thisRockID == mithril) {
  1102.                                 returnTime = seconds + 192;
  1103.                         } else {
  1104.                                 log("Failed to work out return time");
  1105.                         }
  1106.                         // in seconds we will
  1107.                         // work out the time needed for respawn
  1108.                         // find ore mining and use avarage
  1109.                         // the add this to current time and smile
  1110.                 }
  1111.         }
  1112.  
  1113.         // ///////////////////////
  1114.         // ////////BANK///////////
  1115.         // ///////////////////////
  1116.  
  1117.         public boolean bankGems() {
  1118.                 while (inventory.getItem(gems) != null) {
  1119.                         RSItem item = inventory.getItem(gems);
  1120.                         item.doClick(true);
  1121.                         sleep(500, 600);
  1122.                 }
  1123.                 return true;
  1124.         }
  1125.  
  1126.         public boolean bankIsOpen() {
  1127.                 return interfaces.get(11).isValid();
  1128.         }
  1129.  
  1130.         public boolean bank() {
  1131.                 mouse.setSpeed(random(5, 8));
  1132.                 status = "Banking";
  1133.                 if (bank.isOpen() == false && bankIsOpen() == false) {
  1134.                         if (modeDepoBox) {
  1135.                                 RSObject box = objects.getNearest(DepoBox);
  1136.                                 if (box != null) {
  1137.                                         box.doAction("Deposit");
  1138.                                 }
  1139.                         } else {
  1140.                                 bank.open();
  1141.                         }
  1142.                         sleep(500);
  1143.                         while (players.getMyPlayer().isMoving()) {
  1144.                                 sleep(50);
  1145.                         }
  1146.                         sleep(700, 750);
  1147.                 }
  1148.  
  1149.                 if (bank.isOpen()) {
  1150.                         if (gotPickOn == 0) { // holding a pickaxe?
  1151.                                 if (inventory.containsOneOf(pickID)) {
  1152.                                         pickHold = false;
  1153.                                 } else
  1154.                                         pickHold = true;
  1155.                         }
  1156.  
  1157.                         // if yes bank fast
  1158.                         if (pickHold == true && !modeSuperheat) {
  1159.                                 bank.depositAll();
  1160.                                 sleep(random(250, 500));
  1161.                         } else { // if not bank slowly
  1162.                                 if (modeSuperheat) {
  1163.                                         bank.depositAllExcept(superheatID);
  1164.                                 } else {
  1165.                                         bank.depositAllExcept(pickID);
  1166.                                 }
  1167.                                 bankGems();
  1168.                                 sleep(random(250, 500));
  1169.                         }
  1170.  
  1171.                         mouse.move(490, 36, 3, 3); // lets safely close the bank safely
  1172.                         sleep(200, 500);
  1173.                         mouse.click(true);
  1174.                         sleep(random(300, 700));
  1175.                         AntiBanCamera();
  1176.                         AntiBanPro();
  1177.  
  1178.                 } else if (bankIsOpen()) {
  1179.                         if (pickHold == false) {
  1180.                                 RSComponent[] components = interfaces.get(11).getComponent(17)
  1181.                                                 .getComponents();
  1182.                                 for (int i = 0; i < components.length; i++) {
  1183.                                         if (components[i].getComponentID() != -1) {
  1184.                                                 boolean canDeposit = true;
  1185.                                                 for (int y = 0; y < pickID.length; y++) {
  1186.                                                         if (components[i].getComponentID() == pickID[y]) {
  1187.                                                                 canDeposit = false;
  1188.                                                                 break;
  1189.                                                         }
  1190.                                                 }
  1191.                                                 if (canDeposit) {
  1192.                                                         components[i].doAction("Deposit-All");
  1193.                                                         sleep(600, 800);
  1194.                                                 }
  1195.                                         }
  1196.                                 }
  1197.                         } else {
  1198.                                 sleep(400, 500);
  1199.                                 interfaces.getComponent(11, 18).doClick();
  1200.                                 sleep(350, 450);
  1201.                         }
  1202.                         sleep(550, 700);
  1203.                         interfaces.getComponent(11, 15).doClick();
  1204.                         AntiBanCamera();
  1205.                         AntiBanPro();
  1206.  
  1207.                 }
  1208.                 return true;
  1209.         }
  1210.  
  1211.         // //////////////////////
  1212.         // //////GetImage////////
  1213.         // //////////////////////
  1214.  
  1215.         private Image getImage(String url) {
  1216.                 try {
  1217.                         return ImageIO.read(new URL(url));
  1218.                 } catch (IOException e) {
  1219.                         return null;
  1220.                 }
  1221.         }
  1222.  
  1223.         // //////////////////////
  1224.         // ///MiningMethods//////
  1225.         // //////////////////////
  1226.  
  1227.         // not used currently
  1228.         public boolean checkRock(RSObject x) {
  1229.                 boolean z = true;
  1230.                 if (mineGuild) {
  1231.                         RSArea GuildishArea = new RSArea(new RSTile(3024, 9732),
  1232.                                         new RSTile(3055, 9756));
  1233.                         if (!GuildishArea.contains(x.getLocation())) {
  1234.                                 walkToRock();
  1235.                                 z = false;
  1236.                         }
  1237.                 }
  1238.                 return (z);
  1239.         }
  1240.  
  1241.         //
  1242.  
  1243.         public void mineState() { // special cases
  1244.                 if (modeSuperheat) {
  1245.                         superheat();
  1246.                 } else if (mineEss) {
  1247.                         defaultMine();
  1248.                 } else if (!modeSecondOre) {
  1249.                         thisRockID = rockID;
  1250.                         thisOreID = oreID;
  1251.  
  1252.                         if (modeHybrid == true) {
  1253.                                 hybrid();
  1254.                         } else if (modeMine2 == true) {
  1255.                                 mTwo();
  1256.                         } else {
  1257.                                 classicMine();
  1258.                         }
  1259.                 } else if (objects.getNearest(rockID) != null) {
  1260.                         thisRockID = rockID;
  1261.                         thisOreID = oreID;
  1262.  
  1263.                         if (modeHybrid == true) {
  1264.                                 hybrid();
  1265.                         } else if (modeMine2 == true) {
  1266.                                 mTwo();
  1267.                         } else {
  1268.                                 classicMine();
  1269.                         }
  1270.                 } else if (seconds >= returnTime || returnTime == 0) {
  1271.                         if (calc.distanceTo(mineTile) > 4) {
  1272.                                 RSTile[] path = walking.findPath(mineTile);
  1273.                                 RSTilePath newPath = walking.newTilePath(path);
  1274.                                 newPath.randomize(1, 1);
  1275.                                 newPath.traverse();
  1276.                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1277.                                 sleep(bedtime, (bedtime + 500));
  1278.                         } else {
  1279.                                 sleep(25, 50);
  1280.                         }
  1281.                 } else if (calc.distanceTo(secondMineTile) > 4) {
  1282.                         RSTile[] path = walking.findPath(secondMineTile);
  1283.                         RSTilePath newPath = walking.newTilePath(path);
  1284.                         newPath.randomize(1, 1);
  1285.                         newPath.traverse();
  1286.                         int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1287.                         sleep(bedtime, (bedtime + 500));
  1288.                 } else if (objects.getNearest(secondRockID) != null) {
  1289.                         thisRockID = secondRockID;
  1290.                         thisOreID = secondOreID;
  1291.  
  1292.                         if (mode2Hybrid == true) {
  1293.                                 hybrid();
  1294.                         } else if (mode2Mine2 == true) {
  1295.                                 mTwo();
  1296.                         } else {
  1297.                                 classicMine();
  1298.                         }
  1299.                         // mine second ore
  1300.                 } else {
  1301.                         sleep(250, 500);
  1302.                         // we are fucked
  1303.                 }
  1304.         }
  1305.  
  1306.         public boolean defaultMine() {
  1307.                 mouse.setSpeed(random(4, 7));
  1308.                 status = "Looking for Rock";
  1309.                 RSObject rock = objects.getNearest(rockID);
  1310.                 if (rock != null) {
  1311.                         paintRock = rock; // paints rock
  1312.                         RSTile rockSpot = rock.getLocation();
  1313.                         if (mineEss) { // so doesn't just stand there
  1314.                                 camera.turnToObject(rock, random(2, 13));
  1315.                         }
  1316.                         rock.doAction("Mine");
  1317.                         int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1318.                         sleep(bedtime, (bedtime + 500));
  1319.                         while (getMyPlayer().getAnimation() != -1
  1320.                                         && (calc.distanceTo(rockSpot) < 2)) {
  1321.                                 status = "Mining Ore";
  1322.                                 AntiBanPro();
  1323.                                 AntiBanCamera();
  1324.                                 sleep(random(50, 150));
  1325.                         }
  1326.                 }
  1327.                 return true;
  1328.         }
  1329.  
  1330.         public boolean classicMine() {
  1331.                 mouse.setSpeed(random(4, 7));
  1332.                 status = "Looking for Rock";
  1333.                 RSObject rock = objects.getNearest(thisRockID);
  1334.                 if (rock != null) {
  1335.                         int test = rock.getID();
  1336.                         paintRock = rock; // paints rock
  1337.                         rockSpot = rock.getLocation(); // sets the title rock is on
  1338.                         if (rock.isOnScreen()) {
  1339.                                 rock.doAction("Mine");
  1340.  
  1341.                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1342.                                 sleep(bedtime, (bedtime + 500));
  1343.                                 RSObject rocky = objects.getTopAt(rockSpot);
  1344.                                 while (rocky.getID() == test
  1345.                                                 && getMyPlayer().getAnimation() != -1
  1346.                                                 && (calc.distanceTo(rockSpot) < 2)) {
  1347.                                         status = "Mining Ore";
  1348.                                         AntiBanPro();
  1349.                                         rocky = objects.getTopAt(rockSpot);
  1350.                                         AntiBanCamera();
  1351.                                         sleep(random(50, 150));
  1352.                                 }
  1353.                                 calucateReturnTime();
  1354.                         } else {
  1355.                                 walking.walkTileMM(walking.getClosestTileOnMap(rock
  1356.                                                 .getLocation()));
  1357.                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1358.                                 sleep(bedtime, (bedtime + 500));
  1359.                                 do {
  1360.                                         sleep(100, 150);
  1361.                                 } while (getMyPlayer().isMoving());
  1362.                         }
  1363.                 }
  1364.                 return true;
  1365.         }
  1366.  
  1367.         // superheat
  1368.         public boolean superheat() {
  1369.                 superWeCan = true;
  1370.                 mouse.setSpeed(random(4, 7));
  1371.                 // checking invent to needed amounts
  1372.                 if (gotFireStaffOn == 0) { // holding fire staff
  1373.                         if (inventory.containsOneOf(1387)) {
  1374.                                 gotFireStaff = true;
  1375.                         } else if (equipment.containsAll(1387)) {
  1376.                                 gotFireStaff = true;
  1377.                         } else {
  1378.                                 gotFireStaff = false;
  1379.                         }
  1380.                         gotFireStaffOn = 1;
  1381.                 }
  1382.                 if (primaryOreRatio == 0) {
  1383.                         log("Cannot Superheat this type of ore.");
  1384.                         failLogOff();
  1385.                 } else if (inventory.getCount(true, 561) < 1) {
  1386.                         log("We have run out of Nature runes.");
  1387.                         failLogOff();
  1388.                 } else if (gotFireStaff == false && inventory.getCount(true, 554) <= 3) {
  1389.                         log("We need a fire staff or more fire runes.");
  1390.                         failLogOff(); // finished checking invent
  1391.  
  1392.                 } else if ((inventory.getCount(oreID) >= primaryOreRatio) //
  1393.                                 && (inventory.getCount(secondOreID) >= secondaryOreRatio)) {
  1394.                         status = "Lets Superheat"; // above - if there is enough of each ore
  1395.                         if (game.getCurrentTab() != Game.TAB_MAGIC) {
  1396.                                 status = "Opening magic tab";
  1397.                                 game.openTab(Game.TAB_MAGIC);
  1398.                                 sleep(650, 700);
  1399.                         }
  1400.                         if (game.getCurrentTab() == Game.TAB_MAGIC) {
  1401.                                 status = "Selecting Spell";
  1402.                                 magic.castSpell(50);
  1403.                                 sleep(1650, 1700);
  1404.                                 if (game.getCurrentTab() == Game.TAB_INVENTORY) {
  1405.                                         do {
  1406.                                                 status = "Selecting Ore";
  1407.                                                 if (rockID == coal) {
  1408.                                                         RSItem secondaryOre = inventory
  1409.                                                                         .getItem(secondOreID);
  1410.                                                         secondaryOre.doClick(true);
  1411.                                                 } else {
  1412.                                                         RSItem primaryOre = inventory.getItem(oreID);
  1413.                                                         primaryOre.doClick(true);
  1414.                                                 }
  1415.                                                 sleep(800, 900);
  1416.                                         } while ((getMyPlayer().getAnimation() != 725)
  1417.                                                         || game.getCurrentTab() == Game.TAB_INVENTORY);
  1418.                                 }
  1419.                                 sleep(150, 250);
  1420.                                 superWeCan = false;
  1421.                         } else {
  1422.                                 log("Failed to cast superheat.");
  1423.                                 sleep(20, 40);
  1424.                         } // end of superheating
  1425.                 } else {
  1426.                         // lets mine
  1427.                         int freeInventSpace = 28;
  1428.                         int numFirstOre = inventory.getCount(oreID);
  1429.                         int numSecondOre = inventory.getCount(secondOreID);
  1430.                         freeInventSpace -= (inventory.getCount() - (numSecondOre
  1431.                                         + numFirstOre + 1));
  1432.                         // decide which ore to mine
  1433.                         int numFirstOreMine = (int) (freeInventSpace / (primaryOreRatio
  1434.                                         + secondaryOreRatio + 1));
  1435.                         if (numFirstOre >= numFirstOreMine) {
  1436.                                 // if enough of the first ore then mine second ore type
  1437.                                 mouse.setSpeed(random(4, 7));
  1438.                                 status = "Looking for Rock";
  1439.                                 RSObject rock = objects.getNearest(secondRockID);
  1440.                                 if (rock != null) {
  1441.                                         int test = rock.getID();
  1442.                                         paintRock = rock; // paints rock
  1443.                                         rockSpot = rock.getLocation();
  1444.                                         if (rock.isOnScreen()) {
  1445.                                                 rock.doAction("Mine");
  1446.  
  1447.                                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1448.                                                 sleep(bedtime, (bedtime + 500));
  1449.                                                 RSObject rocky = objects.getTopAt(rockSpot);
  1450.                                                 while (rocky.getID() == test
  1451.                                                                 && getMyPlayer().getAnimation() != -1
  1452.                                                                 && (calc.distanceTo(rockSpot) < 2)) {
  1453.                                                         status = "Mining Ore";
  1454.                                                         AntiBanPro();
  1455.                                                         rocky = objects.getTopAt(rockSpot);
  1456.                                                         AntiBanCamera();
  1457.                                                         sleep(random(50, 150));
  1458.                                                 }
  1459.                                         } else {
  1460.                                                 walking.walkTileMM(walking.getClosestTileOnMap(rock
  1461.                                                                 .getLocation()));
  1462.                                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1463.                                                 sleep(bedtime, (bedtime + 500));
  1464.                                                 do {
  1465.                                                         sleep(100, 150);
  1466.                                                 } while (getMyPlayer().isMoving());
  1467.                                         }
  1468.                                 }
  1469.                                 if (rock == null) {
  1470.                                         if (calc.distanceTo(secondMineTile) < 5) {
  1471.                                                 RSTile[] path = walking.findPath(secondMineTile);
  1472.                                                 RSTilePath newPath = walking.newTilePath(path);
  1473.                                                 newPath.randomize(1, 1);
  1474.                                                 newPath.traverse();
  1475.                                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1476.                                                 sleep(bedtime, (bedtime + 500));
  1477.                                         } else {
  1478.                                                 sleep(20, 40);
  1479.                                         }
  1480.                                 }
  1481.                         } else {
  1482.                                 // try to mine first ore first.
  1483.                                 mouse.setSpeed(random(4, 7));
  1484.                                 status = "Looking for Rock";
  1485.                                 RSObject rock = objects.getNearest(rockID);
  1486.                                 if (rock != null) {
  1487.                                         int test = rock.getID();
  1488.                                         paintRock = rock; // paints rock
  1489.                                         rockSpot = rock.getLocation();
  1490.                                         if (rock.isOnScreen()) {
  1491.                                                 if (mineEss) { // so doesn't just stand there
  1492.                                                         camera.turnToObject(rock, random(2, 13));
  1493.                                                 }
  1494.                                                 rock.doAction("Mine");
  1495.  
  1496.                                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1497.                                                 sleep(bedtime, (bedtime + 500));
  1498.                                                 RSObject rocky = objects.getTopAt(rockSpot);
  1499.                                                 while (rocky.getID() == test
  1500.                                                                 && getMyPlayer().getAnimation() != -1
  1501.                                                                 && (calc.distanceTo(rockSpot) < 2)) {
  1502.                                                         status = "Mining Ore";
  1503.                                                         AntiBanPro();
  1504.                                                         rocky = objects.getTopAt(rockSpot);
  1505.                                                         AntiBanCamera();
  1506.                                                         sleep(random(50, 150));
  1507.                                                 }
  1508.                                         } else {
  1509.                                                 walking.walkTileMM(walking.getClosestTileOnMap(rock
  1510.                                                                 .getLocation()));
  1511.                                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1512.                                                 sleep(bedtime, (bedtime + 500));
  1513.                                                 do {
  1514.                                                         sleep(100, 150);
  1515.                                                 } while (getMyPlayer().isMoving());
  1516.                                         }
  1517.                                 }
  1518.                                 if (rock == null) {
  1519.                                         if (calc.distanceTo(secondMineTile) < 5) {
  1520.                                                 RSTile[] path = walking.findPath(secondMineTile);
  1521.                                                 RSTilePath newPath = walking.newTilePath(path);
  1522.                                                 newPath.randomize(1, 1);
  1523.                                                 newPath.traverse();
  1524.                                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1525.                                                 sleep(bedtime, (bedtime + 500));
  1526.                                         } else {
  1527.                                                 sleep(20, 40);
  1528.                                         }
  1529.                                 }
  1530.                         }
  1531.                 }
  1532.                 return superWeCan;
  1533.         }
  1534.  
  1535.         // M2D2
  1536.         public void mTwo() {
  1537.                 mouse.setSpeed(random(4, 7));
  1538.                 status = "Looking for rock";
  1539.                 RSObject rock = objects.getNearest(thisRockID);
  1540.                 if (rock != null) {
  1541.                         int test = rock.getID();
  1542.                         rockSpot = rock.getLocation(); // sets the title rock is on
  1543.                         paintRock = rock; // paints rock
  1544.                         if (rock.isOnScreen()) {
  1545.                                 rock.doAction("Mine");
  1546.  
  1547.                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1548.                                 sleep(bedtime, (bedtime + 500));
  1549.                                 RSObject rocky = objects.getTopAt(rockSpot);
  1550.                                 while (rocky.getID() == test
  1551.                                                 && getMyPlayer().getAnimation() != -1
  1552.                                                 && (calc.distanceTo(rockSpot) < 2)) {
  1553.                                         status = "Mining ore";
  1554.                                         AntiBanPro();
  1555.                                         rocky = objects.getTopAt(rockSpot);
  1556.                                         AntiBanCamera();
  1557.                                         sleep(random(50, 150));
  1558.                                         if (inventory.getCount(thisOreID) >= 1
  1559.                                                         && getMyPlayer().getAnimation() != -1) {
  1560.                                                 inventory.getItem(thisOreID).getComponent().doHover();
  1561.                                         }
  1562.                                 }
  1563.                                 calucateReturnTime();
  1564.                                 if (inventory.getCount(thisOreID) >= 2) {
  1565.                                         status = "Dropping ore";
  1566.                                         mouse.setSpeed(random(6, 7));
  1567.                                         inventory.dropAllExcept(doNotDrop);
  1568.                                 }
  1569.                         } else {
  1570.                                 walking.walkTileMM(walking.getClosestTileOnMap(rock
  1571.                                                 .getLocation()));
  1572.                                 int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1573.                                 sleep(bedtime, (bedtime + 500));
  1574.                                 do {
  1575.                                         sleep(100, 150);
  1576.                                 } while (getMyPlayer().isMoving());
  1577.                         }
  1578.                 }
  1579.         }
  1580.  
  1581.         // Hybrid
  1582.         private void hybrid() {
  1583.                 mouse.setSpeed(random(5, 7));
  1584.  
  1585.                 if (inventory.getCountExcept(pickID) >= 1) {
  1586.                         RSObject rock = objects.getNearest(thisRockID);
  1587.  
  1588.                         if (rock != null) {
  1589.                                 int test = rock.getID();
  1590.                                 paintRock = rock; // first set this up
  1591.                                 rockSpot = rock.getLocation();
  1592.                                 if (rock.isOnScreen()) {
  1593.                                         // next click on rock
  1594.                                         status = "Clicking on rock";
  1595.                                         rock.doAction("Mine");
  1596.                                         sleep(100, 150);
  1597.  
  1598.                                         // while walking towards rock drop all ore
  1599.                                         status = "Dropping ore";
  1600.                                         mouse.setSpeed(random(4, 7));
  1601.                                         inventory.dropAllExcept(doNotDrop);
  1602.  
  1603.                                         // then click to actually mine the ore
  1604.                                         mouse.setSpeed(random(5, 8));
  1605.                                         rock.doAction("Mine");
  1606.                                         sleep(random(1700, 1800));
  1607.                                         // only needs as one spot of hopefully
  1608.  
  1609.                                         RSObject rocky = objects.getTopAt(rockSpot);
  1610.                                         while (rocky.getID() == test
  1611.                                                         && getMyPlayer().getAnimation() != -1
  1612.                                                         && (calc.distanceTo(rockSpot) < 2)) {
  1613.                                                 status = "Mining ore";
  1614.                                                 AntiBanPro();
  1615.                                                 rocky = objects.getTopAt(rockSpot);
  1616.                                                 AntiBanCamera();
  1617.                                                 sleep(random(50, 150));
  1618.                                         }
  1619.                                         calucateReturnTime();
  1620.                                 } else {
  1621.                                         walking.walkTileMM(walking.getClosestTileOnMap(rock
  1622.                                                         .getLocation()));
  1623.                                         int bedtime = (calc.distanceTo(rockSpot) * 400 + 1400);
  1624.                                         sleep(bedtime, (bedtime + 500));
  1625.                                         do {
  1626.                                                 sleep(100, 150);
  1627.                                         } while (getMyPlayer().isMoving());
  1628.                                 }
  1629.                         }
  1630.                 } else {
  1631.                         classicMine();
  1632.                 }
  1633.         }
  1634.  
  1635.         // //////////////////////
  1636.         // ////////DROP//////////
  1637.         // //////////////////////
  1638.  
  1639.         private void dropOre() {
  1640.                 mouse.setSpeed(random(6, 7));
  1641.                 strangeRock();
  1642.                 status = "Dropping ore";
  1643.                 inventory.dropAllExcept(doNotDrop);
  1644.                 sleep(200, 300);
  1645.         }
  1646.  
  1647.         // ///////////////////////
  1648.         // ///////MOUSE///////////
  1649.         // ///////////////////////
  1650.  
  1651.         public void mouseMoved(MouseEvent e) {
  1652.  
  1653.                 if (e.getX() >= 6 && e.getX() < 6 + 60 && e.getY() >= 250
  1654.                                 && e.getY() < 250 + 20) {
  1655.                         showPaint1 = true;
  1656.                         showPaint2 = false;
  1657.                         showPaint3 = false;
  1658.                         showPaint4 = false;
  1659.                 }
  1660.                 if (e.getX() >= 70 && e.getX() < 70 + 60 && e.getY() >= 250
  1661.                                 && e.getY() < 250 + 20) {
  1662.                         showPaint2 = true;
  1663.                         showPaint1 = false;
  1664.                         showPaint3 = false;
  1665.                         showPaint4 = false;
  1666.                 }
  1667.                 if (e.getX() >= 134 && e.getX() < 134 + 60 && e.getY() >= 250
  1668.                                 && e.getY() < 250 + 20) {
  1669.                         showPaint3 = true;
  1670.                         showPaint1 = false;
  1671.                         showPaint2 = false;
  1672.                         showPaint4 = false;
  1673.                 }
  1674.                 if (e.getX() >= 198 && e.getX() < 198 + 13 && e.getY() >= 250
  1675.                                 && e.getY() < 250 + 20) {
  1676.                         showPaint4 = true;
  1677.                         showPaint1 = false;
  1678.                         showPaint2 = false;
  1679.                         showPaint3 = false;
  1680.                 }
  1681.         } // all for interactive paint say 'aye'
  1682.  
  1683.         public void mouseDragged(MouseEvent e) {
  1684.                 // complete utter waste,
  1685.         }
  1686.  
  1687.         // ///////////////////////
  1688.         // ////////WALK///////////
  1689.         // ///////////////////////
  1690.  
  1691.         public boolean walkToBank() {
  1692.                 mouse.setSpeed(random(4, 9));
  1693.                 status = "Walking to Bank";
  1694.                 RSTilePath newPath = walking.newTilePath(toMine);
  1695.                 newPath.randomize(2, 2);
  1696.                 newPath.reverse();
  1697.                 newPath.traverse();
  1698.                 AntiBanCamera();
  1699.                 sleep(350, 500);
  1700.                 AntiBanCamera();
  1701.                 return true;
  1702.         }
  1703.  
  1704.         public boolean walkToMine() {
  1705.                 mouse.setSpeed(random(4, 9));
  1706.                 RSTilePath newPath = walking.newTilePath(toMine);
  1707.                 newPath.randomize(2, 2);
  1708.                 newPath.traverse();
  1709.                 sleep(350, 500);
  1710.                 AntiBanCamera();
  1711.                 return true;
  1712.         }
  1713.  
  1714.         public boolean walkFromGuild() {
  1715.                 mouse.setSpeed(random(4, 9));
  1716.                 status = "Walking to Bank";
  1717.                 RSTile[] fromGuild = new RSTile[] { new RSTile(3046, 9753),
  1718.                                 new RSTile(3046, 9744), new RSTile(3040, 9738),
  1719.                                 new RSTile(3032, 9739), new RSTile(3020, 9740) };
  1720.                 RSTilePath newPath = walking.newTilePath(fromGuild);
  1721.                 newPath.randomize(2, 2);
  1722.                 newPath.traverse();
  1723.                 sleep(350, 500);
  1724.                 AntiBanCamera();
  1725.                 return true;
  1726.         }
  1727.  
  1728.         public boolean walkToRock() {
  1729.                 mouse.setSpeed(random(4, 9));
  1730.                 if (mineEss) {
  1731.                         status = "Walking to Essence";
  1732.                         if (randomNum2 == 0) {
  1733.                                 randomNum2 = random(1, 4);
  1734.                         }
  1735.                         if (randomNum2 == 1) {
  1736.                                 RSTilePath newPath = walking.newTilePath(toNE);
  1737.                                 newPath.randomize(2, 2);
  1738.                                 newPath.traverse();
  1739.                         } else if (randomNum2 == 2) {
  1740.                                 RSTilePath newPath = walking.newTilePath(toNW);
  1741.                                 newPath.randomize(2, 2);
  1742.                                 newPath.traverse();
  1743.                         } else if (randomNum2 == 3) {
  1744.                                 RSTilePath newPath = walking.newTilePath(toSE);
  1745.                                 newPath.randomize(2, 2);
  1746.                                 newPath.traverse();
  1747.                         } else if (randomNum2 == 4) {
  1748.                                 RSTilePath newPath = walking.newTilePath(toSW);
  1749.                                 newPath.randomize(2, 2);
  1750.                                 newPath.traverse();
  1751.                         }
  1752.                 } else if (mineGuild) {
  1753.                         status = "Walking to Rocks";
  1754.                         if (randomNum2 == 0) {
  1755.                                 randomNum2 = random(1, 4);
  1756.                         }
  1757.                         if (randomNum2 == 1) {
  1758.                                 RSTile randomSpot = new RSTile(3034, 9736);
  1759.                                 RSTile[] path = walking.findPath(randomSpot);
  1760.                                 RSTilePath newPath = walking.newTilePath(path);
  1761.                                 newPath.randomize(3, 3);
  1762.                                 newPath.traverse();
  1763.                         } else if (randomNum2 == 2) {
  1764.                                 RSTile randomSpot = new RSTile(3029, 9738);
  1765.                                 RSTile[] path = walking.findPath(randomSpot);
  1766.                                 RSTilePath newPath = walking.newTilePath(path);
  1767.                                 newPath.randomize(3, 3);
  1768.                                 newPath.traverse();
  1769.                         } else if (randomNum2 == 3) {
  1770.                                 RSTile randomSpot = new RSTile(3036, 9740);
  1771.                                 RSTile[] path = walking.findPath(randomSpot);
  1772.                                 RSTilePath newPath = walking.newTilePath(path);
  1773.                                 newPath.randomize(3, 3);
  1774.                                 newPath.traverse();
  1775.                         } else if (randomNum2 == 4) {
  1776.                                 RSTile randomSpot = new RSTile(3047, 9736);
  1777.                                 RSTile[] path = walking.findPath(randomSpot);
  1778.                                 RSTilePath newPath = walking.newTilePath(path);
  1779.                                 newPath.randomize(3, 3);
  1780.                                 newPath.traverse();
  1781.                         }
  1782.                 }
  1783.                 sleep(350, 500);
  1784.                 AntiBanCamera();
  1785.                 return true;
  1786.         }
  1787.  
  1788.         // ///////////////////////
  1789.         // /////AuburyTele////////
  1790.         // ///////////////////////
  1791.  
  1792.         public void teleport() {
  1793.                 RSNPC aubury = npcs.getNearest(auburyID);
  1794.                 if (aubury != null) {
  1795.                         status = "Teleporting.";
  1796.                         aubury.doAction("Teleport");
  1797.                 }
  1798.                 sleep(2400, 3000);
  1799.         }
  1800.  
  1801.         // ///////////////////////
  1802.         // //////OpenDoor/////////
  1803.         // ///////////////////////
  1804.  
  1805.         public void openDoor() {
  1806.                 RSObject door = objects.getTopAt(doorTile);
  1807.                 if (door != null) {
  1808.                         status = "Opening Door.";
  1809.                         camera.turnToObject(door, random(2, 3));
  1810.                         door.doAction("Open");
  1811.                         sleep(random(500, 650));
  1812.                 }
  1813.                 if (door == null) {
  1814.                         teleport();
  1815.                 }
  1816.         }
  1817.  
  1818.         public void openDoor2() {
  1819.                 RSObject door = objects.getTopAt(doorTile);
  1820.                 if (door != null) {
  1821.                         status = "Opening Door.";
  1822.                         camera.turnToObject(door, random(2, 3));
  1823.                         door.doAction("Open");
  1824.                         sleep(500, 650);
  1825.                 } else if (door == null) {
  1826.                         status = "Walking To Bank.";
  1827.                         sleep(550, 700); // maybe needed
  1828.                         walkToBank();
  1829.                 }
  1830.         }
  1831.  
  1832.         // ///////////////////////
  1833.         // ////ClickStairs////////
  1834.         // ///////////////////////
  1835.  
  1836.         public void stairs() {
  1837.                 RSObject Stair = objects.getNearest(StairID);
  1838.                 if (Stair != null) {
  1839.                         randomNum2 = 0;
  1840.                         if (getMyPlayer().getAnimation() == -1
  1841.                                         && Stair.getLocation() != null) {
  1842.                                 status = "Climbing Stairs";
  1843.                                 camera.turnToObject(Stair, 30);
  1844.                                 if (aboveGuildStairs()) {
  1845.                                         Stair.doAction("Climb-down");
  1846.                                 } else if (underGuildStairs()) {
  1847.                                         Stair.doAction("Climb-up");
  1848.                                 }
  1849.                                 sleep(2050, 3550);
  1850.                         }
  1851.                 }
  1852.         }
  1853.  
  1854.         // ///////////////////////
  1855.         // ////ClickPortal////////
  1856.         // ///////////////////////
  1857.  
  1858.         public void portal() {
  1859.                 RSObject Portal = objects.getNearest(portalID);
  1860.                 randomNum2 = 0;
  1861.                 if (Portal != null) {
  1862.                         RSTile spot = Portal.getLocation();
  1863.                         if (!getMyPlayer().isMoving() && Portal.getLocation() != null) {
  1864.                                 status = "Using Portal";
  1865.                                 camera.setAngle(random(180, 90));
  1866.                                 if (calc.distanceTo(Portal) < 3) {
  1867.                                         int o = 1;
  1868.                                         while (Portal.doAction("Enter") == false && o < 4) {
  1869.                                                 o++;
  1870.                                                 sleep(50, 60);
  1871.                                         }
  1872.                                         sleep(1500, 2500);
  1873.                                 } else {
  1874.                                         walking.walkTileMM(spot);
  1875.                                         int i = 1;
  1876.                                         while ((calc.distanceTo(Portal) > 1) || i < 7) {
  1877.                                                 camera.turnToObject(Portal, 10);
  1878.                                                 mouse.move(calc.tileToScreen(spot), random(-10, 10),
  1879.                                                                 random(-10, 10));
  1880.                                                 sleep(250, 350);
  1881.                                                 i++;
  1882.                                         }
  1883.                                 }
  1884.                         }
  1885.                 } else {
  1886.                         sleep(50, 60);
  1887.                 }
  1888.         }
  1889.  
  1890.         // ///////////////////////
  1891.         // ////StrangeRock////////
  1892.         // ///////////////////////
  1893.  
  1894.         private void strangeRock() {
  1895.                 mouse.setSpeed(random(4, 8));
  1896.                 RSItem StrangeRock = inventory.getItem(strangeRockID);
  1897.                 RSInterface inf = interfaces.get(94);
  1898.                 RSComponent child;
  1899.                 if (inventory.containsOneOf(strangeRockID)) {
  1900.                         status = "Destroying strange rock";
  1901.                         StrangeRock.doAction("Destroy");
  1902.                         child = inf.getComponent(0);
  1903.                         if (child != null && child.isValid()) {
  1904.                                 if (child.doAction("Continue")) {
  1905.                                         sleep(900);
  1906.                                 }
  1907.                         }
  1908.                 }
  1909.         }
  1910.  
  1911.         // ///////////////////////
  1912.         // /////DrawRocks/////////
  1913.         // ///////////////////////
  1914.  
  1915.         private void drawTile(Graphics render, RSTile tile, Color color,
  1916.                         boolean drawCardinalDirections) {
  1917.                 Point southwest = calc.tileToScreen(tile, 0, 0, 0);
  1918.                 Point southeast = calc.tileToScreen(
  1919.                                 new RSTile(tile.getX() + 1, tile.getY()), 0, 0, 0);
  1920.                 Point northwest = calc.tileToScreen(new RSTile(tile.getX(),
  1921.                                 tile.getY() + 1), 0, 0, 0);
  1922.                 Point northeast = calc.tileToScreen(
  1923.                                 new RSTile(tile.getX() + 1, tile.getY() + 1), 0, 0, 0);
  1924.  
  1925.                 if (calc.pointOnScreen(southwest) && calc.pointOnScreen(southeast)
  1926.                                 && calc.pointOnScreen(northwest)
  1927.                                 && calc.pointOnScreen(northeast)) {
  1928.                         render.setColor(Color.BLACK);
  1929.                         render.drawPolygon(new int[] { (int) northwest.getX(),
  1930.                                         (int) northeast.getX(), (int) southeast.getX(),
  1931.                                         (int) southwest.getX() },
  1932.                                         new int[] { (int) northwest.getY(), (int) northeast.getY(),
  1933.                                                         (int) southeast.getY(), (int) southwest.getY() }, 4);
  1934.                         render.setColor(color);
  1935.                         render.fillPolygon(new int[] { (int) northwest.getX(),
  1936.                                         (int) northeast.getX(), (int) southeast.getX(),
  1937.                                         (int) southwest.getX() },
  1938.                                         new int[] { (int) northwest.getY(), (int) northeast.getY(),
  1939.                                                         (int) southeast.getY(), (int) southwest.getY() }, 4);
  1940.  
  1941.                         if (drawCardinalDirections) {
  1942.                                 render.setColor(Color.WHITE);
  1943.  
  1944.                         }
  1945.                 }
  1946.         }
  1947.  
  1948.         private void paintRockModel(final Graphics g, final RSObject o,
  1949.                         final Color c, String s) {
  1950.                 for (Polygon p : o.getModel().getTriangles()) {
  1951.                         g.setColor(c);
  1952.                         g.drawPolygon(p);
  1953.                         if (c == Color.green) {
  1954.                                 g.setColor(new Color(0, 200, 0, 130));
  1955.                         } else if (c == Color.red) {
  1956.                                 g.setColor(new Color(200, 0, 0, 130));
  1957.                         } else if (c == Color.blue) {
  1958.                                 g.setColor(new Color(0, 0, 200, 70));
  1959.                         }
  1960.                         g.fillPolygon(p);
  1961.                 }
  1962.                 final Point p = calc.tileToScreen(o.getLocation());
  1963.                 g.setColor(c);
  1964.                 g.drawString(s, p.x - 30, p.y - 25);
  1965.         }
  1966.  
  1967.         // ///////////////////////
  1968.         // ////////PAINT//////////
  1969.         // ///////////////////////
  1970.  
  1971.         public void onRepaint(Graphics g) {
  1972.                 if (game.isLoggedIn() == true) {
  1973.  
  1974.                         drawTile(g, players.getMyPlayer().getLocation(), new Color(0, 0,
  1975.                                         200, 70), true);
  1976.                         if (paintRock != null) {
  1977.                                 paintRockModel(g, paintRock, Color.blue, "Rock");
  1978.                         }
  1979.  
  1980.                         g.setColor(transDarkBlue);
  1981.                         g.fillRect(6, 250, 60, 20); // interactive square 1
  1982.                         g.fillRect(70, 250, 60, 20); // interactive square 2
  1983.                         g.fillRect(134, 250, 60, 20); // interactive square 3
  1984.                         g.fillRect(198, 250, 13, 20); // interactive square 4
  1985.  
  1986.                         g.setColor(Color.white); // words for interactive squares
  1987.                         g.drawString("STATUS", 11, 267);
  1988.                         g.drawString("PROFIT", 75, 267);
  1989.                         g.drawString("EXTRA", 139, 267);
  1990.                         g.drawString("X", 201, 267);
  1991.  
  1992.                         runTime2 = System.currentTimeMillis() - startTime;
  1993.                         seconds2 = runTime2 / 1000; // seconds
  1994.                         if (seconds2 >= 60) { // minutes
  1995.                                 minutes2 = seconds2 / 60;
  1996.                                 seconds2 -= (minutes2 * 60);
  1997.                         }
  1998.                         if (minutes2 >= 60) { // hours
  1999.                                 hours2 = minutes2 / 60;
  2000.                                 minutes2 -= (hours2 * 60);
  2001.                         }
  2002.  
  2003.                         if (startexp == 0) {
  2004.                                 startexp = skills.getCurrentExp(14);
  2005.                         }
  2006.                         if (startLvl == 0) {
  2007.                                 startLvl = skills.getCurrentLevel(Skills.MINING);
  2008.                         }
  2009.  
  2010.                         // adds zero before minutes
  2011.                         if (minutes2 >= 10) {
  2012.                                 addZero = "";
  2013.                         } else if (minutes2 < 10) {
  2014.                                 addZero = "0";
  2015.                         }
  2016.  
  2017.                         // adds zero before seconds
  2018.                         if (seconds2 >= 10) {
  2019.                                 addZero2 = "";
  2020.                         } else if (seconds2 < 10) {
  2021.                                 addZero2 = "0";
  2022.                         }
  2023.  
  2024.                         kMade = (((priceClay * clayMined) + (priceCopper * copperMined)
  2025.                                         + (priceTin * tinMined) + (priceIron * ironMined)
  2026.                                         + (priceSilver * silverMined) + (priceCoal * coalMined)
  2027.                                         + (priceGold * goldMined) + (priceMithril * mithrilMined)) / 1000);
  2028.  
  2029.                         oresMined = clayMined + copperMined + tinMined + ironMined
  2030.                                         + silverMined + coalMined + goldMined + mithrilMined;
  2031.  
  2032.                         gainedXP = skills.getCurrentExp(14) - startexp;
  2033.                         if (mineEss) {
  2034.                                 oresMined = (int) (gainedXP / xpPerEssence);
  2035.                                 kMade = ((oresMined * priceEssence) / 1000);
  2036.                         }
  2037.                         currentLVL = skills.getCurrentLevel(Skills.MINING);
  2038.                         gainedLVL = currentLVL - startLvl;
  2039.                         oresPerHour = (int) ((3600000.0 / (double) runTime2) * oresMined);
  2040.                         expPerHour = (int) (3600000.0 / (double) runTime2 * gainedXP);
  2041.                         kPerHour = (int) (3600000.0 / (double) runTime2 * kMade);
  2042.  
  2043.                         if (showPaint1 == true) {
  2044.  
  2045.                                 final int percent = (skills.getPercentToNextLevel(14) * 2);
  2046.                                 g.setColor(transDarkRed);
  2047.                                 g.fillRoundRect(8, 282, 200, 18, 16, 16);
  2048.                                 g.setColor(transDarkGreen);
  2049.                                 g.fillRoundRect(8, 282, percent, 18, 16, 16);
  2050.                                 g.setColor(edgeColor);
  2051.                                 g.drawRoundRect(8, 282, 200, 18, 16, 16);
  2052.                                 g.drawRoundRect(8, 282, percent, 18, 16, 16);
  2053.                                 // Percentage bar till level
  2054.  
  2055.                                 g.setColor(transDarkBlue);
  2056.                                 g.fillRoundRect(4, 273, 208, 63, 16, 16);
  2057.                                 g.setColor(edgeColor);
  2058.                                 ((Graphics2D) g).setStroke(stroke1);
  2059.                                 g.drawRoundRect(4, 273, 208, 63, 16, 16);
  2060.                                 g.setColor(Color.white);
  2061.                                 g.drawString("Status: " + status, 23, 295);
  2062.                                 g.drawString("Runtime: " + hours2 + ":" + addZero + minutes2
  2063.                                                 + ":" + addZero2 + seconds2, 12, 315);
  2064.                                 g.drawString("XP Gained: " + gainedXP + " (" + expPerHour
  2065.                                                 + "/hour)", 12, 329);
  2066.                         }
  2067.  
  2068.                         if (showPaint2 == true) {
  2069.                                 g.setColor(transDarkBlue);
  2070.                                 g.fillRoundRect(4, 273, 208, 63, 16, 16);
  2071.                                 g.setColor(edgeColor);
  2072.                                 ((Graphics2D) g).setStroke(stroke1);
  2073.                                 g.drawRoundRect(4, 273, 208, 63, 16, 16);
  2074.                                 g.setColor(Color.white);
  2075.                                 g.drawString("Total Profit Made: " + kMade + "k", 12, 295);
  2076.                                 g.drawString("Profit Per Hour: " + kPerHour + "k", 12, 312);
  2077.                                 g.drawString("Total Ores Mined: " + oresMined + " ("
  2078.                                                 + oresPerHour + "/hour)", 12, 329);
  2079.                         }
  2080.  
  2081.                         if (showPaint3 == true) {
  2082.                                 g.setColor(transDarkBlue);
  2083.                                 g.fillRoundRect(4, 273, 208, 63, 16, 16);
  2084.                                 g.setColor(edgeColor);
  2085.                                 ((Graphics2D) g).setStroke(stroke1);
  2086.                                 g.drawRoundRect(4, 273, 208, 63, 16, 16);
  2087.                                 g.setColor(Color.white);
  2088.                                 g.drawString("Total Gems Mined: " + gemsMined, 12, 295);
  2089.                                 g.drawString("[Anti-Ban]: " + "Total " + antiBanCount, 12, 312);
  2090.                                 g.drawString(antiBanStatus, 12, 329);
  2091.                         }
  2092.                         if (showPaint4 == true) {
  2093.                                 // nothing
  2094.                         }
  2095.  
  2096.                         // Draws the mouse
  2097.                         g.setColor(transDarkBlue);
  2098.                         g.drawLine(0, (int) (mouse.getLocation().getY()), 800,
  2099.                                         (int) (mouse.getLocation().getY()));
  2100.                         g.drawLine((int) (mouse.getLocation().getX()), 0,
  2101.                                         (int) (mouse.getLocation().getX()), 800);
  2102.  
  2103.                         // draws banner
  2104.                         g.drawImage(img1, 1, 170, null);
  2105.  
  2106.                 }
  2107.         }
  2108.  
  2109.         // /////////////////////////
  2110.         // ////////ANTIBAN//////////
  2111.         // /////////////////////////
  2112.  
  2113.         private void AntiBanPro() {
  2114.                 int randomProd = random(1, 60);
  2115.                 if (randomProd == 1) {
  2116.                         int randomMore = random(1, 5);
  2117.                         if (randomMore == 1) {
  2118.                                 antiBanStatus = "Checking mining level..";
  2119.                                 antiBanCount = antiBanCount + 1;
  2120.                                 if (game.getCurrentTab() != 1) {
  2121.                                         game.openTab(1);
  2122.                                         sleep(350, 500);
  2123.                                         mouse.move(random(678, 728), random(213, 232));
  2124.                                         sleep(2000, 3500);
  2125.                                 } else {
  2126.                                         mouse.move(random(678, 728), random(213, 232));
  2127.                                         sleep(2000, 3500);
  2128.                                 }
  2129.                         } else {
  2130.                                 antiBanStatus = "Lets wait for a while..";
  2131.                                 antiBanCount = antiBanCount + 1;
  2132.                                 sleep(1200, 2500);
  2133.                         }
  2134.                 }
  2135.                 if (randomProd == 2 || randomProd == 3 || randomProd == 4) {
  2136.                         antiBanStatus = "Pause for a few seconds..";
  2137.                         antiBanCount = antiBanCount + 1;
  2138.                         sleep(1000, 2500);
  2139.                 }
  2140.                 if (randomProd >= 52) {
  2141.                         antiBanStatus = "Moving mouse randomly..";
  2142.                         antiBanCount = antiBanCount + 1;
  2143.                         mouse.moveRandomly(65, 350);
  2144.                 } else
  2145.                         sleep(10, 30);
  2146.         }
  2147.  
  2148.         private void AntiBanCamera() {
  2149.                 int randomNum = random(1, 50);
  2150.                 if (randomNum == 1 || randomNum == 2 || randomNum == 3) {
  2151.                         antiBanStatus = "Random camera movement..";
  2152.                         antiBanCount = antiBanCount + 1;
  2153.                         camera.moveRandomly(random(2000, 5500));
  2154.                 }
  2155.                 if (randomNum == 4 || randomNum == 5) {
  2156.                         antiBanStatus = "Random camera angle change..";
  2157.                         antiBanCount = antiBanCount + 1;
  2158.                         camera.setAngle(random(10, 40));
  2159.                 }
  2160.                 if (randomNum == 6) {
  2161.                         camera.setPitch(random(40, 68));
  2162.                         antiBanStatus = "Random camera pitch change..";
  2163.                         antiBanCount = antiBanCount + 1;
  2164.                 }
  2165.                 if (randomNum == 7) {
  2166.                         camera.setPitch(random(20, 45));
  2167.                         antiBanStatus = "Random camera pitch change..";
  2168.                         antiBanCount = antiBanCount + 1;
  2169.                 }
  2170.                 if (randomNum == 8) {
  2171.                         camera.setPitch(random(68, 90));
  2172.                         antiBanStatus = "Random camera pitch change..";
  2173.                         antiBanCount = antiBanCount + 1;
  2174.                 } else
  2175.                         sleep(50, 70);
  2176.         }
  2177.  
  2178.         // ///////////////////////
  2179.         // ////////EXTRAS/////////
  2180.         // ////////////////////