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

Untitled

By: a guest on Jun 4th, 2012  |  syntax: None  |  size: 49.54 KB  |  hits: 19  |  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. import java.awt.BorderLayout;
  3. import java.awt.Color;
  4. import java.awt.Component;
  5. import java.awt.FlowLayout;
  6. import java.awt.Font;
  7. import java.awt.Graphics;
  8. import java.awt.Graphics2D;
  9. import java.awt.Point;
  10. import java.awt.event.ActionEvent;
  11. import java.awt.event.ActionListener;
  12. import java.awt.event.ItemEvent;
  13. import java.awt.event.ItemListener;
  14. import java.util.Arrays;
  15.  
  16. import javax.swing.DefaultComboBoxModel;
  17. import javax.swing.GroupLayout;
  18. import javax.swing.GroupLayout.Alignment;
  19. import javax.swing.JButton;
  20. import javax.swing.JCheckBox;
  21. import javax.swing.JComboBox;
  22. import javax.swing.JDialog;
  23. import javax.swing.JLabel;
  24. import javax.swing.JPanel;
  25. import javax.swing.JTextField;
  26. import javax.swing.LayoutStyle.ComponentPlacement;
  27. import javax.swing.SwingUtilities;
  28. import javax.swing.border.EmptyBorder;
  29. import javax.swing.border.EtchedBorder;
  30.  
  31. import org.powerbot.concurrent.Task;
  32. import org.powerbot.concurrent.strategy.Condition;
  33. import org.powerbot.concurrent.strategy.Strategy;
  34. import org.powerbot.game.api.ActiveScript;
  35. import org.powerbot.game.api.Manifest;
  36. import org.powerbot.game.api.methods.Calculations;
  37. import org.powerbot.game.api.methods.Game;
  38. import org.powerbot.game.api.methods.Walking;
  39. import org.powerbot.game.api.methods.Widgets;
  40. import org.powerbot.game.api.methods.input.Mouse;
  41. import org.powerbot.game.api.methods.interactive.Players;
  42. import org.powerbot.game.api.methods.node.Menu;
  43. import org.powerbot.game.api.methods.node.SceneEntities;
  44. import org.powerbot.game.api.methods.tab.Inventory;
  45. import org.powerbot.game.api.methods.tab.Skills;
  46. import org.powerbot.game.api.methods.widget.Camera;
  47. import org.powerbot.game.api.util.Random;
  48. import org.powerbot.game.api.util.Time;
  49. import org.powerbot.game.api.wrappers.Area;
  50. import org.powerbot.game.api.wrappers.Tile;
  51. import org.powerbot.game.api.wrappers.map.TilePath;
  52. import org.powerbot.game.api.wrappers.node.Item;
  53. import org.powerbot.game.api.wrappers.node.SceneObject;
  54. import org.powerbot.game.bot.event.MessageEvent;
  55. import org.powerbot.game.bot.event.listener.MessageListener;
  56. import org.powerbot.game.bot.event.listener.PaintListener;
  57.  
  58.  
  59. @Manifest(authors = { "LocBot", "Xiffs" }, name = "ParaMine",description = "One of the best")
  60. public class ParaMine extends ActiveScript implements PaintListener,
  61.                 MessageListener {
  62.  
  63.         Mine mine;
  64.         GUI gui;
  65.  
  66.         boolean test = false;
  67.  
  68.         static int[] pickaxe = { 1265, 1267, 1269, 1271, 1273, 1275, 14099, 14107,
  69.                         15259, 1831, 1829, 1827, 1825, 1823, 946 };
  70.  
  71.         public static Mine m;
  72.         private SceneObject currentRock = null;
  73.  
  74.         // Paint
  75.         public int startLevel;
  76.         public int startExp;
  77.         long startTime;
  78.         boolean show = true;
  79.  
  80.         @Override
  81.         protected void setup() {
  82.                 Repaint.startTime = System.currentTimeMillis();
  83.                 Repaint.startLev = Skills.getRealLevel(Skills.MINING);
  84.                 Repaint.startExp = Skills.getExperience(Skills.MINING);
  85.  
  86.                 m = new Mine(AllSettings.bank, AllSettings.pathToBank,
  87.                                 AllSettings.rockToMine1, AllSettings.rockToMine2,
  88.                                 AllSettings.rockToMine3, AllSettings.area);
  89.                 try {
  90.                         SwingUtilities.invokeLater(new Runnable() {
  91.                                 public void run() {
  92.                                         gui = new GUI();
  93.                                         gui.setVisible(true);
  94.                                 }
  95.                         });
  96.                 } catch (Exception e) {
  97.  
  98.                 }
  99.                 provide(new Strategy(new MineMethod(), new MineMethod()));
  100.                 provide(new Strategy(new Full(), new Full()));
  101.                 provide(new Strategy(new Alternate(), new Alternate()));
  102.                 provide(new Strategy(new WalkBankMethod(), new WalkBankMethod()));
  103.                 provide(new Strategy(new WalkMineMethod(), new WalkMineMethod()));
  104.  
  105.         }
  106.  
  107.         private final class Alternate implements Task, Condition {
  108.                 @Override
  109.                 public boolean validate() {
  110.                         return currentRock != null && rock() != null
  111.                                         && !rock().getLocation().equals(currentRock.getLocation());
  112.                 }
  113.  
  114.                 @Override
  115.                 public void run() {
  116.                         currentRock = null;
  117.                 }
  118.         }
  119.  
  120.         private class MineMethod implements Condition, Task {
  121.                 @Override
  122.                 public void run() {
  123.                         if (rock() != null) {
  124.                                 if (rock().isOnScreen()) {
  125.                                         if (!Players.getLocal().isMoving()) {
  126.                                                 final Point p = rock().getNextViewportPoint();
  127.                                                 Mouse.hop(p.x, p.y);
  128.                                                 if (rock().interact("Mine")) {
  129.                                                         Time.sleep(1500);
  130.                                                         if (Players.getLocal().getAnimation() != -1) {
  131.                                                                 currentRock = rock();
  132.                                                         }
  133.                                                 }
  134.                                         }
  135.                                 } else if (!rock().getLocation().isOnScreen()) {
  136.                                         Camera.turnTo(rock());
  137.                                         Time.sleep(org.powerbot.game.api.util.Random.nextInt(200,
  138.                                                         350));
  139.                                 } else {
  140.                                         if (rock().getLocation().click(true))
  141.                                                 Time.sleep(Random.nextInt(800, 1200));
  142.                                 }
  143.                         } else {
  144.                                 Time.sleep(100);
  145.                         }
  146.  
  147.                         if (!Walking.isRunEnabled()) {
  148.                                 if (Walking.getEnergy() > 30) {
  149.                                         Walking.setRun(true);
  150.                                 }
  151.                         }
  152.                 }
  153.  
  154.                 @Override
  155.                 public boolean validate() {
  156.                         return AllSettings.start
  157.                                         && (Game.isLoggedIn()
  158.                                                         && (currentRock == null || (currentRock != null
  159.                                                                         && rock() != null
  160.                                                                         && rock().getLocation().equals(
  161.                                                                                         currentRock.getLocation()) && Players
  162.                                                                         .getLocal().getAnimation() == -1))
  163.                                                         && Inventory.getCount() < AllSettings.Ore_to_Drop
  164.                                                         && m.atMine() && !Players.getLocal().isMoving());
  165.  
  166.                 }
  167.  
  168.         }
  169.  
  170.         private class WalkBankMethod implements Condition, Task {
  171.  
  172.                 @Override
  173.                 public void run() {
  174.                         log.info("Walking to bank");
  175.                         m.walkToBank();
  176.  
  177.                         if (!Walking.isRunEnabled()) {
  178.                                 if (Walking.getEnergy() > 30) {
  179.                                         Walking.setRun(true);
  180.                                 }
  181.                         }
  182.                 }
  183.  
  184.                 @Override
  185.                 public boolean validate() {
  186.                         return AllSettings.start
  187.                                         && AllSettings.Banking
  188.                                         && (Game.isLoggedIn()
  189.                                                         && Inventory.getCount() >= AllSettings.Ore_to_Drop && !m
  190.                                                         .getBank().atBank());
  191.                 }
  192.         }
  193.  
  194.         private class Full implements Condition, Task {
  195.  
  196.                 @Override
  197.                 public void run() {
  198.                         if (AllSettings.Banking) {
  199.                                 if (m.getBank().atBank())
  200.                                         log.info("Banking ");
  201.                                 if (org.powerbot.game.api.methods.widget.Bank.isOpen()) {
  202.                                         depositAllExcept(pickaxe);
  203.                                 } else {
  204.                                         if (m.getBank().open()) {
  205.                                                 Time.sleep(Random.nextInt(300, 500));
  206.                                         }
  207.                                 }
  208.                                 if (!Walking.isRunEnabled()) {
  209.                                         if (Walking.getEnergy() > 30) {
  210.                                                 Walking.setRun(true);
  211.                                         }
  212.                                 }
  213.  
  214.                                 System.out.println(Inventory.getCount());
  215.                         } else {
  216.                                 for (Item item : Inventory.getItems()) {
  217.                                         Arrays.sort(pickaxe);
  218.                                         if (Arrays.binarySearch(pickaxe, item.getId()) == -1) {
  219.                                                 if (item.getWidgetChild().interact("drop")) {
  220.                                                         Time.sleep(Random.nextInt(200, 300));
  221.                                                 }
  222.                                         }
  223.                                 }
  224.                         }
  225.                 }
  226.  
  227.                 @Override
  228.                 public boolean validate() {
  229.                         return AllSettings.start
  230.  
  231.                                         && (Game.isLoggedIn() && (Inventory.getCount() >= AllSettings.Ore_to_Drop));
  232.  
  233.                 }
  234.  
  235.         }
  236.  
  237.         private class WalkMineMethod implements Condition, Task {
  238.  
  239.                 @Override
  240.                 public void run() {
  241.                         log.info("Walking back");
  242.                         m.walkToMine();
  243.                         if (!Walking.isRunEnabled()) {
  244.                                 if (Walking.getEnergy() > 30) {
  245.                                         Walking.setRun(true);
  246.                                 }
  247.                         }
  248.                         log.info("Walking back");
  249.                 }
  250.  
  251.                 @Override
  252.                 public boolean validate() {
  253.                         return AllSettings.start
  254.  
  255.                                         && (Game.isLoggedIn()
  256.                                                         && Inventory.getCount() < AllSettings.Ore_to_Drop && !m
  257.                                                                 .atMine());
  258.  
  259.                 }
  260.         }
  261.  
  262.         private SceneObject rock() {
  263.  
  264.                 if (m.getRock().getRock() != null) {
  265.                         return m.getRock().getRock();
  266.                 } else if (m.getRock2().getRock() != null) {
  267.                         return m.getRock2().getRock();
  268.                 } else if (m.getRock3().getRock() != null) {
  269.                         return m.getRock3().getRock();
  270.                 } else {
  271.                         return m.getRock().getRock();
  272.                 }
  273.         }
  274.  
  275.         @Override
  276.         public void onRepaint(Graphics x) {
  277.                 Repaint.go(x);
  278.         }
  279.  
  280.         @Override
  281.         public void messageReceived(MessageEvent e) {
  282.                 String f = e.getMessage().toString().toLowerCase();
  283.                 if (f.equals("manage to mine")) {
  284.                         Repaint.oreC++;
  285.                 }
  286.         }
  287.  
  288.         public boolean depositAllExcept(int... IDs) {
  289.  
  290.                 boolean deposited = false;
  291.                 int var = 0;
  292.                 final int count = Inventory.getCount(true), itemCount = Inventory
  293.                                 .getCount(true, IDs);
  294.                 w: while (var < (count - itemCount)) {
  295.                         l: for (final Item item : Inventory.getItems()) {
  296.                                 if (!Widgets.get(762).validate()) {
  297.                                         break w;
  298.                                 }
  299.                                 for (final int id : IDs) {
  300.                                         if (item.getId() == id)
  301.                                                 continue l;
  302.                                 }
  303.                                 final int invCount = Inventory.getCount(true, item.getId());
  304.                                 if (item.getWidgetChild().validate()) {
  305.                                         if (item.getWidgetChild().interact(
  306.                                                         invCount > 1 ? "Deposit-All" : "Deposit")) {
  307.                                                 if (waitFor(new Condition() {
  308.                                                         public boolean validate() {
  309.                                                                 return Inventory.getCount(true, item.getId()) < invCount;
  310.                                                         }
  311.                                                 }, 3000)) {
  312.                                                         var += invCount;
  313.                                                 }
  314.                                                 if (var == (count - itemCount)) {
  315.                                                         deposited = true;
  316.                                                         break w;
  317.                                                 }
  318.                                         }
  319.                                 }
  320.                         }
  321.                 }
  322.                 return deposited;
  323.         }
  324.  
  325.         private boolean waitFor(final Condition c, final long timeout) {
  326.                 boolean isValid = false;
  327.                 final long past = System.currentTimeMillis();
  328.                 final long total = (past + timeout);
  329.                 while (System.currentTimeMillis() < total) {
  330.                         if (c.validate()) {
  331.                                 isValid = true;
  332.                                 break;
  333.                         }
  334.                         Time.sleep(50);
  335.                 }
  336.                 return isValid;
  337.         }
  338.  
  339. public class GUI extends JDialog {
  340.  
  341.         /**
  342.          *
  343.          */
  344.         private static final long serialVersionUID = 1L;
  345.         private JTextField textField;
  346.  
  347.         private void change(String[] x) {
  348.                 try {
  349.                         GUI2 dialog = new GUI2(x);
  350.                         dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
  351.                         dialog.setVisible(true);
  352.                 } catch (Exception e) {
  353.                         e.printStackTrace();
  354.                 }
  355.         }
  356.  
  357.         public GUI() {
  358.                 System.out.println("Setting Title");
  359.                 setTitle("LocMiner");
  360.                 System.out.println("Setting size");
  361.                 setBounds(100, 100, 487, 199);
  362.  
  363.                 System.out.println("Setting a checkbox");
  364.                 chckbxBanking = new JCheckBox("Banking");
  365.                 chckbxBanking.addItemListener(new ItemListener() {
  366.                         public void itemStateChanged(ItemEvent arg0) {
  367.                                 System.out.println("Action Triggered");
  368.                                 if (chckbxBanking.isSelected()) {
  369.                                         Component[] all = panel.getComponents();
  370.                                         for (int i = 0; i < all.length; i++) {
  371.                                                 all[i].setEnabled(false);
  372.                                         }
  373.                                         Component[] all2 = panel_1.getComponents();
  374.                                         for (int i = 0; i < all2.length; i++) {
  375.                                                 all2[i].setEnabled(true);
  376.                                         }
  377.                                 } else {
  378.                                         Component[] all = panel_1.getComponents();
  379.                                         for (int i = 0; i < all.length; i++) {
  380.                                                 all[i].setEnabled(false);
  381.                                         }
  382.                                         Component[] all2 = panel.getComponents();
  383.                                         for (int i = 0; i < all2.length; i++) {
  384.                                                 all2[i].setEnabled(true);
  385.                                         }
  386.                                 }
  387.                         }
  388.                 });
  389.                 System.out.println("Setting up button");
  390.                 btnNextWindow = new JButton("Next Window!");
  391.                 btnNextWindow.addActionListener(new ActionListener() {
  392.                         public void actionPerformed(ActionEvent arg0) {
  393.  
  394.                                 try {
  395.                                         if (!chckbxBanking.isSelected()) {
  396.                                                 int x = Integer.parseInt(textField.getText());
  397.                                                 AllSettings.Ore_to_Drop = x;
  398.                                         } else {
  399.                                                 AllSettings.Ore_to_Drop = 28;
  400.                                         }
  401.                                 } catch (Exception e) {
  402.                                         System.out.println("Setting full to 28");
  403.                                         AllSettings.Ore_to_Drop = 28;
  404.                                 }
  405.                                 if (chckbxBanking.isSelected()) {
  406.                                         AllSettings.Banking = true;
  407.                                 } else {
  408.                                         AllSettings.Banking = false;
  409.                                         System.out.println("Powermining does not work");
  410.                                 }
  411.                                 String loc = comboBox.getSelectedItem().toString();
  412.                                 if (chckbxBanking.isSelected()) {
  413.                                         if (loc.equals("Varrock East")) {
  414.                                                 AllSettings.area = ParaMine.Mines.Areas.VARROCK_EAST_MINE;
  415.                                                 AllSettings.bank = ParaMine.Mines.Banks.V_EAST_BANK;
  416.                                                 AllSettings.pathToBank = ParaMine.Mines.Paths.VE_BANK;
  417.                                                 change(new String[] { "Tin", "Copper", "Iron" });
  418.                                         } else if (loc.equals("Varrock West")) {
  419.                                                 AllSettings.area = ParaMine.Mines.Areas.VARROCK_WEST_MINE;
  420.                                                 AllSettings.bank = ParaMine.Mines.Banks.V_WEST_BANK;
  421.                                                 AllSettings.pathToBank = ParaMine.Mines.Paths.VW_BANK;
  422.                                                 change(new String[] { "Iron", "Tin", "Silver", "Clay" });
  423.                                         } else if (loc.equals("Al-Karhid")) {
  424.                                                 AllSettings.area = ParaMine.Mines.Areas.AL_MINE;
  425.                                                 AllSettings.bank = ParaMine.Mines.Banks.AL_BANK;
  426.                                                 AllSettings.pathToBank = ParaMine.Mines.Paths.Al_BANK;
  427.                                                 change(new String[] { "Iron", "Tin", "Copper",
  428.                                                                 "Silver", "Coal", "Mitrhil" });
  429.                                         } else if (loc.equals("Barbarian Village")) {
  430.                                                 AllSettings.area = ParaMine.Mines.Areas.BARBARIAN_MINE;
  431.                                         //TODO  AllSettings.bank = ParaMine.Mines.Banks.b;
  432.                                                 AllSettings.pathToBank = ParaMine.Mines.Paths.Al_BANK;
  433.                                                 change(new String[] { "Tin", "Coal" });
  434.                                         } else if (loc.equals("Lumbridge East")) {
  435.                                                 AllSettings.area = ParaMine.Mines.Areas.L_EAST_MINE;
  436.                                                 AllSettings.bank = ParaMine.Mines.Banks.L_EAST_BANK;
  437.                                                 AllSettings.pathToBank = (Tile[]) (ParaMine.Mines.Paths.LUM_EAST_BANK);
  438.                                                 change(new String[] { "Tin", "Copper" });
  439.                                         } else if (loc.equals("Lumbridge West")) {
  440.                                                 AllSettings.area = ParaMine.Mines.Areas.L_WEST_MINE;
  441.                                                 AllSettings.bank = ParaMine.Mines.Banks.L_WEST_BANK;
  442.                                                 AllSettings.pathToBank = ParaMine.Mines.Paths.LUM_WEST_BANK;
  443.                                                 change(new String[] { "Coal", "Mithril", "Adamantite" });
  444.                                         } else if (loc.equals("Shilo Village")) {
  445.                                                 change(new String[] { "Gems" });
  446.                                         } else if (loc.equals("LRC(GOLD)")) {
  447.                                                 AllSettings.LRC = true;
  448.                                         } else if (loc.equals("Rimmington")) {
  449.                                                 change(new String[] { "Iron", "Gold", "Clay", "Copper",
  450.                                                                 "Tin" });
  451.                                         }
  452.                                 } else {
  453.                                         change(new String[] { "Iron", "Gold", "Clay", "Copper",
  454.                                                         "Tin", "Silver", "Coal" });
  455.                                 }
  456.  
  457.                                 dispose();
  458.                         }
  459.                 });
  460.                 System.out.println("Setting up panel");
  461.                 panel = new JPanel();
  462.                 panel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
  463.                 System.out.println("Setting up panel");
  464.                 panel_1 = new JPanel();
  465.                 panel_1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
  466.                 System.out.println("setting up layout");
  467.                 groupLayout = new GroupLayout(getContentPane());
  468.                 groupLayout
  469.                                 .setHorizontalGroup(groupLayout
  470.                                                 .createParallelGroup(Alignment.LEADING)
  471.                                                 .addGroup(
  472.                                                                 groupLayout
  473.                                                                                 .createSequentialGroup()
  474.                                                                                 .addContainerGap()
  475.                                                                                 .addGroup(
  476.                                                                                                 groupLayout
  477.                                                                                                                 .createParallelGroup(
  478.                                                                                                                                 Alignment.TRAILING)
  479.                                                                                                                 .addGroup(
  480.                                                                                                                                 Alignment.LEADING,
  481.                                                                                                                                 groupLayout
  482.                                                                                                                                                 .createSequentialGroup()
  483.                                                                                                                                                 .addComponent(
  484.                                                                                                                                                                 panel,
  485.                                                                                                                                                                 GroupLayout.PREFERRED_SIZE,
  486.                                                                                                                                                                 220,
  487.                                                                                                                                                                 GroupLayout.PREFERRED_SIZE)
  488.                                                                                                                                                 .addPreferredGap(
  489.                                                                                                                                                                 ComponentPlacement.RELATED)
  490.                                                                                                                                                 .addComponent(
  491.                                                                                                                                                                 panel_1,
  492.                                                                                                                                                                 GroupLayout.PREFERRED_SIZE,
  493.                                                                                                                                                                 217,
  494.                                                                                                                                                                 GroupLayout.PREFERRED_SIZE)
  495.                                                                                                                                                 .addContainerGap())
  496.                                                                                                                 .addGroup(
  497.                                                                                                                                 groupLayout
  498.                                                                                                                                                 .createSequentialGroup()
  499.                                                                                                                                                 .addComponent(
  500.                                                                                                                                                                 btnNextWindow,
  501.                                                                                                                                                                 GroupLayout.PREFERRED_SIZE,
  502.                                                                                                                                                                 175,
  503.                                                                                                                                                                 GroupLayout.PREFERRED_SIZE)
  504.                                                                                                                                                 .addGap(118))))
  505.                                                 .addGroup(
  506.                                                                 Alignment.TRAILING,
  507.                                                                 groupLayout.createSequentialGroup()
  508.                                                                                 .addContainerGap(205, Short.MAX_VALUE)
  509.                                                                                 .addComponent(chckbxBanking)
  510.                                                                                 .addGap(203)));
  511.                 groupLayout
  512.                                 .setVerticalGroup(groupLayout
  513.                                                 .createParallelGroup(Alignment.TRAILING)
  514.                                                 .addGroup(
  515.                                                                 groupLayout
  516.                                                                                 .createSequentialGroup()
  517.                                                                                 .addGap(9)
  518.                                                                                 .addComponent(chckbxBanking,
  519.                                                                                                 GroupLayout.PREFERRED_SIZE, 23,
  520.                                                                                                 GroupLayout.PREFERRED_SIZE)
  521.                                                                                 .addPreferredGap(
  522.                                                                                                 ComponentPlacement.UNRELATED)
  523.                                                                                 .addGroup(
  524.                                                                                                 groupLayout
  525.                                                                                                                 .createParallelGroup(
  526.                                                                                                                                 Alignment.TRAILING)
  527.                                                                                                                 .addComponent(
  528.                                                                                                                                 panel,
  529.                                                                                                                                 GroupLayout.DEFAULT_SIZE,
  530.                                                                                                                                 64,
  531.                                                                                                                                 Short.MAX_VALUE)
  532.                                                                                                                 .addComponent(
  533.                                                                                                                                 panel_1,
  534.                                                                                                                                 GroupLayout.PREFERRED_SIZE,
  535.                                                                                                                                 GroupLayout.DEFAULT_SIZE,
  536.                                                                                                                                 GroupLayout.PREFERRED_SIZE))
  537.                                                                                 .addPreferredGap(
  538.                                                                                                 ComponentPlacement.RELATED)
  539.                                                                                 .addComponent(btnNextWindow)
  540.                                                                                 .addContainerGap()));
  541.                 System.out.println("Setting comboBox");
  542.  
  543.                 comboBox = new JComboBox();
  544.                 comboBox.setModel(new DefaultComboBoxModel(
  545.                                 new String[] { "Lumbridge East","Lumbridge West","Al-Karhid","Varrock East","Varrock West" }));
  546.                 gl_panel_1 = new GroupLayout(panel_1);
  547.                 gl_panel_1.setHorizontalGroup(gl_panel_1.createParallelGroup(
  548.                                 Alignment.LEADING).addGroup(
  549.                                 gl_panel_1
  550.                                                 .createSequentialGroup()
  551.                                                 .addGap(42)
  552.                                                 .addComponent(comboBox, GroupLayout.PREFERRED_SIZE,
  553.                                                                 GroupLayout.DEFAULT_SIZE,
  554.                                                                 GroupLayout.PREFERRED_SIZE)
  555.                                                 .addContainerGap(48, Short.MAX_VALUE)));
  556.                 gl_panel_1.setVerticalGroup(gl_panel_1.createParallelGroup(
  557.                                 Alignment.LEADING).addGroup(
  558.                                 Alignment.TRAILING,
  559.                                 gl_panel_1
  560.                                                 .createSequentialGroup()
  561.                                                 .addContainerGap(33, Short.MAX_VALUE)
  562.                                                 .addComponent(comboBox, GroupLayout.PREFERRED_SIZE,
  563.                                                                 GroupLayout.DEFAULT_SIZE,
  564.                                                                 GroupLayout.PREFERRED_SIZE).addContainerGap()));
  565.                 panel_1.setLayout(gl_panel_1);
  566.  
  567.                 lblMine = new JLabel("Mine");
  568.  
  569.                 textField = new JTextField();
  570.                 textField.setColumns(10);
  571.  
  572.                 lblDropAll = new JLabel("drop all.");
  573.                 gl_panel = new GroupLayout(panel);
  574.                 gl_panel.setHorizontalGroup(gl_panel.createParallelGroup(
  575.                                 Alignment.LEADING).addGroup(
  576.                                 gl_panel.createSequentialGroup()
  577.                                                 .addContainerGap()
  578.                                                 .addComponent(lblMine)
  579.                                                 .addGap(5)
  580.                                                 .addComponent(textField, GroupLayout.PREFERRED_SIZE,
  581.                                                                 GroupLayout.DEFAULT_SIZE,
  582.                                                                 GroupLayout.PREFERRED_SIZE).addGap(5)
  583.                                                 .addComponent(lblDropAll)
  584.                                                 .addContainerGap(28, Short.MAX_VALUE)));
  585.                 gl_panel.setVerticalGroup(gl_panel
  586.                                 .createParallelGroup(Alignment.LEADING)
  587.                                 .addGroup(
  588.                                                 Alignment.TRAILING,
  589.                                                 gl_panel.createSequentialGroup()
  590.                                                                 .addContainerGap(29, Short.MAX_VALUE)
  591.                                                                 .addGroup(
  592.                                                                                 gl_panel.createParallelGroup(
  593.                                                                                                 Alignment.LEADING)
  594.                                                                                                 .addGroup(
  595.                                                                                                                 gl_panel.createSequentialGroup()
  596.                                                                                                                                 .addGap(3)
  597.                                                                                                                                 .addComponent(
  598.                                                                                                                                                 lblMine))
  599.                                                                                                 .addComponent(
  600.                                                                                                                 textField,
  601.                                                                                                                 GroupLayout.PREFERRED_SIZE,
  602.                                                                                                                 GroupLayout.DEFAULT_SIZE,
  603.                                                                                                                 GroupLayout.PREFERRED_SIZE)
  604.                                                                                                 .addGroup(
  605.                                                                                                                 gl_panel.createSequentialGroup()
  606.                                                                                                                                 .addGap(3)
  607.                                                                                                                                 .addComponent(
  608.                                                                                                                                                 lblDropAll)))
  609.                                                                 .addContainerGap()));
  610.                 panel.setLayout(gl_panel);
  611.                 getContentPane().setLayout(groupLayout);
  612.                 Component[] all = panel_1.getComponents();
  613.                 for (int i = 0; i < all.length; i++) {
  614.                         all[i].setEnabled(false);
  615.                 }
  616.         }
  617.  
  618.         private JCheckBox chckbxBanking;
  619.         private JComboBox comboBox;
  620.         private JPanel panel;
  621.         private JPanel panel_1;
  622.         private JButton btnNextWindow;
  623.         private GroupLayout groupLayout;
  624.         private GroupLayout gl_panel_1;
  625.         private JLabel lblMine;
  626.         private JLabel lblDropAll;
  627.         private GroupLayout gl_panel;
  628. }
  629.  
  630. public class GUI2 extends JDialog {
  631.  
  632.         /**
  633.          *
  634.          */
  635.         private static final long serialVersionUID = 1L;
  636.         private final JPanel contentPanel = new JPanel();
  637.  
  638.        
  639.  
  640.         /**
  641.          * Create the dialog.
  642.          */
  643.         public GUI2(String[] rocks) {
  644.                 String[] Done = new String[rocks.length + 1];
  645.                 Done[0] = "none";
  646.                 for (int i = 0; i < rocks.length; i++) {
  647.                         Done[i + 1] = rocks[i];
  648.                 }
  649.                 setTitle("Choose your rocks");
  650.                 setBounds(100, 100, 450, 120);
  651.                 getContentPane().setLayout(new BorderLayout());
  652.                 contentPanel.setLayout(new FlowLayout());
  653.                 contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
  654.                 getContentPane().add(contentPanel, BorderLayout.CENTER);
  655.                 {
  656.                         comboBox = new JComboBox();
  657.                         comboBox.setModel(new DefaultComboBoxModel(rocks));
  658.                         contentPanel.add(comboBox);
  659.                 }
  660.                 {
  661.                         comboBox_0 = new JComboBox();
  662.                         comboBox_0.setModel(new DefaultComboBoxModel(Done));
  663.                         comboBox_0.setEnabled(true);
  664.                         contentPanel.add(comboBox_0);
  665.                 }
  666.                 {
  667.                         comboBox_1 = new JComboBox();
  668.                         comboBox_1.setEnabled(true);
  669.                         comboBox_1.setModel(new DefaultComboBoxModel(Done));
  670.                         contentPanel.add(comboBox_1);
  671.                 }
  672.                 {
  673.                         JPanel buttonPane = new JPanel();
  674.                         buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
  675.                         getContentPane().add(buttonPane, BorderLayout.SOUTH);
  676.                         {
  677.                                 JButton okButton = new JButton("OK");
  678.                                 okButton.addActionListener(new ActionListener() {
  679.  
  680.                                         public void actionPerformed(ActionEvent arg0) {
  681.                                                 String c = comboBox.getSelectedItem().toString();
  682.                                                 String c1 = comboBox_0.getSelectedItem().toString();
  683.                                                 String c2 = comboBox_1.getSelectedItem().toString();
  684.                                                 if (!c.equals("none")) {
  685.                                                         if (c.equals("Tin")) {
  686.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.TIN_ROCKS ;
  687.                                                                 Repaint.rName = "Tin";
  688.                                                         } else if (c.equals("Iron")) {
  689.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.IRON_ROCKS;
  690.                                                                 Repaint.rName = "Iron";
  691.                                                         } else if (c.equals("Silver")) {
  692.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.SILVER_ROCKS;
  693.                                                                 Repaint.rName = "Silver";
  694.                                                         } else if (c.equals("Coal")) {
  695.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.COAL_ROCKS;
  696.                                                                 Repaint.rName = "Coal";
  697.                                                         } else if (c.equals("Mithril")) {
  698.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.MITHRIL_ROCKS;
  699.                                                                 Repaint.rName = "Mithril";
  700.                                                         } else if (c.equals("Gold")) {
  701.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.GOLD_ROCKS;
  702.                                                                 Repaint.rName = "Gold";
  703.                                                         } else if (c.equals("Clay")) {
  704.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.CLAY_ROCKS;
  705.                                                                 Repaint.rName = "Clay";
  706.                                                         } else if (c.equals("Adamantite")) {
  707.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.ADAMANTITE_ROCKS;
  708.                                                                 Repaint.rName = "Admantite";
  709.                                                         } else if (c.equals("Copper")) {
  710.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.COPPER_ROCKS;
  711.                                                                 Repaint.rName = "Copper";
  712.                                                         } else if (c.equals("Gems")) {
  713.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.GEM_ROCKS;
  714.                                                                 Repaint.rName = "Gem Rocks";
  715.                                                         }
  716.                                                 } else {
  717.                                                         AllSettings.rockToMine1 = null;
  718.                                                 }
  719.  
  720.                                                 if (!c1.equals("none")) {
  721.                                                         if (c1.equals("Tin")) {
  722.                                                                 AllSettings.rockToMine2 = ParaMine.Mines.Rocks.TIN_ROCKS;
  723.                                                                 Repaint.rName = "Tin";
  724.                                                         } else if (c1.equals("Iron")) {
  725.                                                                 AllSettings.rockToMine2 = ParaMine.Mines.Rocks.IRON_ROCKS;
  726.                                                                 Repaint.rName = "Iron";
  727.                                                         } else if (c1.equals("Silver")) {
  728.                                                                 AllSettings.rockToMine2 = ParaMine.Mines.Rocks.SILVER_ROCKS;
  729.                                                                 Repaint.rName = "Silver";
  730.                                                         } else if (c1.equals("Coal")) {
  731.                                                                 AllSettings.rockToMine2 = ParaMine.Mines.Rocks.COAL_ROCKS;
  732.                                                                 Repaint.rName = "Coal";
  733.                                                         } else if (c1.equals("Mithril")) {
  734.                                                                 AllSettings.rockToMine2 = ParaMine.Mines.Rocks.MITHRIL_ROCKS;
  735.                                                                 Repaint.rName = "Mithril";
  736.                                                         } else if (c1.equals("Gold")) {
  737.                                                                 AllSettings.rockToMine2 = ParaMine.Mines.Rocks.GOLD_ROCKS;
  738.                                                                 Repaint.rName = "Gold";
  739.                                                         } else if (c1.equals("Clay")) {
  740.                                                                 AllSettings.rockToMine2 = ParaMine.Mines.Rocks.CLAY_ROCKS;
  741.                                                                 Repaint.rName = "Clay";
  742.                                                         } else if (c1.equals("Adamantite")) {
  743.                                                                 AllSettings.rockToMine2 = ParaMine.Mines.Rocks.ADAMANTITE_ROCKS;
  744.                                                                 Repaint.rName = "Admantite";
  745.                                                         } else if (c1.equals("Copper")) {
  746.                                                                 AllSettings.rockToMine2 = ParaMine.Mines.Rocks.COPPER_ROCKS;
  747.                                                                 Repaint.rName = "Copper";
  748.                                                         } else if (c.equals("Gems")) {
  749.                                                                 AllSettings.rockToMine1 = ParaMine.Mines.Rocks.GEM_ROCKS;
  750.                                                                 Repaint.rName = "Gem Rocks";
  751.                                                         }
  752.  
  753.                                                 } else {
  754.                                                         AllSettings.rockToMine2 = null;
  755.                                                 }
  756.                                                 if (!c2.equals("none")) {
  757.                                                         if (c2.equals("Tin")) {
  758.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.TIN_ROCKS;
  759.                                                                 Repaint.rName = "Tin";
  760.                                                         } else if (c2.equals("Iron")) {
  761.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.IRON_ROCKS;
  762.                                                                 Repaint.rName = "Iron";
  763.                                                         } else if (c2.equals("Silver")) {
  764.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.SILVER_ROCKS;
  765.                                                                 Repaint.rName = "Silver";
  766.                                                         } else if (c2.equals("Coal")) {
  767.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.COAL_ROCKS;
  768.                                                                 Repaint.rName = "Coal";
  769.                                                         } else if (c2.equals("Mithril")) {
  770.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.MITHRIL_ROCKS;
  771.                                                                 Repaint.rName = "Mithril";
  772.                                                         } else if (c2.equals("Gold")) {
  773.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.GOLD_ROCKS;
  774.                                                                 Repaint.rName = "Gold";
  775.                                                         } else if (c2.equals("Clay")) {
  776.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.CLAY_ROCKS;
  777.                                                                 Repaint.rName = "Clay";
  778.                                                         } else if (c2.equals("Adamantite")) {
  779.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.ADAMANTITE_ROCKS;
  780.                                                                 Repaint.rName = "Admantite";
  781.                                                         } else if (c2.equals("Copper")) {
  782.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.COPPER_ROCKS;
  783.                                                                 Repaint.rName = "Copper";
  784.                                                         } else if (c2.equals("Gems")) {
  785.                                                                 AllSettings.rockToMine3 = ParaMine.Mines.Rocks.GEM_ROCKS;
  786.                                                                 Repaint.rName = "Gem Rocks";
  787.                                                         }
  788.                                                 } else {
  789.                                                         AllSettings.rockToMine3 = null;
  790.                                                 }
  791.  
  792.                                                 AllSettings.start = true;
  793.                                                 AllSettings.mine = new Mine(AllSettings.bank,
  794.                                                                 AllSettings.pathToBank,
  795.                                                                 AllSettings.rockToMine1,
  796.                                                                 AllSettings.rockToMine2,
  797.                                                                 AllSettings.rockToMine3, AllSettings.area);
  798.                                                 dispose();
  799.  
  800.                                         }
  801.                                 });
  802.                                 okButton.setActionCommand("OK");
  803.                                 buttonPane.add(okButton);
  804.                                 getRootPane().setDefaultButton(okButton);
  805.                         }
  806.                 }
  807.  
  808.         }
  809.  
  810.         JComboBox comboBox;
  811.         JComboBox comboBox_0;
  812.         JComboBox comboBox_1;
  813. }
  814.  
  815. public class Bank {
  816.  
  817.         public Area bankArea;
  818.         public int ID = 0;
  819.         public boolean normalBank;
  820.  
  821.         public Bank(Area area, boolean normal) {
  822.                 bankArea = area;
  823.                 normalBank = normal;
  824.         }
  825.  
  826.         public Bank(Area area, int bankID, boolean depositBox) {
  827.                 bankArea = area;
  828.                 normalBank = depositBox;
  829.                 ID = bankID;
  830.         }
  831.  
  832.         public Area getArea() {
  833.                 return bankArea;
  834.         }
  835.  
  836.         public boolean isDepositBox() {
  837.                 return normalBank;
  838.         }
  839.  
  840.         public SceneObject getBank() {
  841.                 if (isDepositBox()) {
  842.                         return (SceneObject) org.powerbot.game.api.methods.widget.DepositBox
  843.                                         .getNearest();
  844.                 } else {
  845.                         return (SceneObject) org.powerbot.game.api.methods.widget.Bank
  846.                                         .getNearest();
  847.                 }
  848.         }
  849.  
  850.         public Tile getTile() {
  851.                 return getBank().getLocation();
  852.         }
  853.  
  854.         public boolean atBank() {
  855.                 return getArea().contains(Players.getLocal().getLocation());
  856.         }
  857.  
  858.         public boolean open() {
  859.                 if (!isDepositBox()) {
  860.                         return org.powerbot.game.api.methods.widget.Bank.open();
  861.                 } else {
  862.                         return org.powerbot.game.api.methods.widget.DepositBox.open();
  863.                 }
  864.         }
  865.  
  866.         public boolean isOpen() {
  867.                 return org.powerbot.game.api.methods.widget.Bank.isOpen();
  868.         }
  869.  
  870.         public boolean depositAllExcept(int... IDs) {
  871.                 if(isDepositBox()){
  872.                         System.out.println("Deposit does not work.");
  873.                         return false;
  874.                 }else{
  875.                 boolean deposited = false;
  876.                 int var = 0;
  877.                 final int count = Inventory.getCount(true), itemCount = Inventory
  878.                                 .getCount(true, IDs);
  879.                 w: while (var < (count - itemCount)) {
  880.                         l: for (final Item item : Inventory.getItems()) {
  881.                                 if (!Widgets.get(762).validate()) {
  882.                                         break w;
  883.                                 }
  884.                                 for (final int id : IDs) {
  885.                                         if (item.getId() == id)
  886.                                                 continue l;
  887.                                 }
  888.                                 final int invCount = Inventory.getCount(true, item.getId());
  889.                                 if (item.getWidgetChild().validate()) {
  890.                                         if (item.getWidgetChild().interact(
  891.                                                         invCount > 1 ? "Deposit-All" : "Deposit")) {
  892.                                                 if (waitFor(new Condition() {
  893.                                                         public boolean validate() {
  894.                                                                 return Inventory.getCount(true, item.getId()) < invCount;
  895.                                                         }
  896.                                                 }, 3000)) {
  897.                                                         var += invCount;
  898.                                                 }
  899.                                                 if (var == (count - itemCount)) {
  900.                                                         deposited = true;
  901.                                                         break w;
  902.                                                 }
  903.                                         }
  904.                                 }
  905.                         }
  906.                 }
  907.                 return deposited;
  908.                 }
  909.         }
  910.  
  911.         private boolean waitFor(final Condition c, final long timeout) {
  912.                 boolean isValid = false;
  913.                 final long past = System.currentTimeMillis();
  914.                 final long total = (past + timeout);
  915.                 while (System.currentTimeMillis() < total) {
  916.                         if (c.validate()) {
  917.                                 isValid = true;
  918.                                 break;
  919.                         }
  920.                         Time.sleep(50);
  921.                 }
  922.                 return isValid;
  923.         }
  924.  
  925.         public boolean depositAll() {
  926.  
  927.                 return org.powerbot.game.api.methods.widget.Bank.depositInventory();
  928.         }
  929.  
  930.         public boolean withdraw(int ID, int amount) {
  931.                 return org.powerbot.game.api.methods.widget.Bank.withdraw(ID, amount);
  932.         }
  933.  
  934.         public boolean depositEquipped() {
  935.                 return org.powerbot.game.api.methods.widget.Bank.depositEquipment();
  936.         }
  937.  
  938. }
  939.  
  940. public static class Mine {
  941.  
  942.         public static Bank bank;
  943.         public static Rock rock;
  944.         public static Tile[] bankPath;
  945.         public static Area area;
  946.         public static Rock rock2 = null;
  947.         public static Rock rock3 = null;
  948.  
  949.        
  950.  
  951.         public Mine(Bank b, Tile[] toBank, Rock theRock, Rock theRock2,
  952.                         Rock theRock3, Area mineArea) {
  953.                 bank = b;
  954.                 rock = theRock;
  955.                 bankPath = toBank;
  956.                 area = mineArea;
  957.                 rock2 = theRock2;
  958.                 rock3 = theRock3;
  959.         }
  960.  
  961.         public TilePath getWalkingPath() {
  962.                 return Walking.newTilePath(bankPath);
  963.         }
  964.  
  965.         public Rock getRock() {
  966.                 return rock;
  967.         }
  968.  
  969.         public Rock getRock2() {
  970.                 if (rock2 != null) {
  971.                         return rock2;
  972.                 }
  973.                 return rock;
  974.         }
  975.  
  976.         public Rock getRock3() {
  977.                 if (rock3 != null) {
  978.                         return rock3;
  979.                 }
  980.                 return rock;
  981.         }
  982.  
  983.         public Area getMineArea() {
  984.                 return area;
  985.         }
  986.  
  987.         public boolean atMine() {
  988.                 if(AllSettings.Banking){
  989.                 return getMineArea().contains(Players.getLocal().getLocation());
  990.                 }else{
  991.                         return true;
  992.                 }
  993.         }
  994.  
  995.         public void walkToBank() {
  996.                 WalkMethods.walkPath(bankPath);
  997.         }
  998.  
  999.         public void walkToMine() {
  1000.                 WalkMethods.walkReversed(bankPath);
  1001.         }
  1002.  
  1003.         public Bank getBank() {
  1004.                 return bank;
  1005.         }
  1006.  
  1007. }
  1008.  
  1009. public static class WalkMethods {
  1010.  
  1011.        
  1012.         private static Tile[] reversePath(Tile tiles[]) {
  1013.                 Tile r[] = new Tile[tiles.length];
  1014.                 int i;
  1015.                 for (i = 0; i < tiles.length; i++) {
  1016.                         r[i] = tiles[(tiles.length - 1) - i];
  1017.                 }
  1018.                 return r;
  1019.         }
  1020.  
  1021.         public static boolean walkReversed(final Tile[] path) {
  1022.                 return walkPath(reversePath(path));
  1023.         }
  1024.  
  1025.  
  1026.         public static boolean walkPath(final Tile[] path) {
  1027.                 boolean a = false;
  1028.                 final Tile next = getNext(path);
  1029.                 final Tile start = getStart(path);
  1030.                 final Tile dest = Walking.getDestination();
  1031.                 final Tile myTile = Players.getLocal().getLocation();
  1032.                 if ((dest == null || Calculations.distance(myTile, dest) < 6 || Calculations
  1033.                                 .distance(next, Walking.getDestination()) > 3)) {
  1034.                         if (!Walking.walk(next)) {
  1035.                                 if (Walking.walk(start)) {
  1036.                                         Time.sleep(500);
  1037.                                         a = true;
  1038.                                 } else {
  1039.                                         walkTile(getClosestTileOnMap(next));
  1040.                                         Time.sleep(500);
  1041.                                 }
  1042.                         } else {
  1043.                                 Time.sleep(500);
  1044.                                 a = true;
  1045.                         }
  1046.                 }
  1047.                 return a;
  1048.         }
  1049.  
  1050.         public static Tile getClosestTileOnMap(final Tile tile) {
  1051.                 if (Game.isLoggedIn()) {
  1052.                         final Tile loc = Players.getLocal().getLocation();
  1053.                         final Tile walk = new Tile((loc.getX() + tile.getX()) / 2,
  1054.                                         (loc.getY() + tile.getY()) / 2, Game.getPlane());
  1055.                         return Calculations.distance(loc, walk) < 15 ? walk
  1056.                                         : getClosestTileOnMap(walk);
  1057.                 }
  1058.                 return tile;
  1059.         }
  1060.  
  1061.         public static boolean walkTile(final Tile tile) {
  1062.                 if ((Walking.getDestination() == null || (Calculations.distance(Players
  1063.                                 .getLocal().getLocation(), Walking.getDestination()) < 6 && Calculations
  1064.                                 .distance(tile, Walking.getDestination()) > 3))) {
  1065.                         Time.sleep(500);
  1066.                         if (tile.isOnScreen()) {
  1067.                                 return tile.click(true);
  1068.                         } else if (Calculations.distance(Players.getLocal().getLocation(),
  1069.                                         tile) < 15) {
  1070.                                 return Walking.walk(tile);
  1071.                         } else {
  1072.                                 return walkTile(getClosestTileOnMap(tile));
  1073.                         }
  1074.                 }
  1075.                 return false;
  1076.         }
  1077.  
  1078.         public static Tile getStart(final Tile[] tiles) {
  1079.                 return tiles[0];
  1080.         }
  1081.  
  1082.         public static Tile getNext(final Tile[] tiles) {
  1083.                 for (int i = tiles.length - 1; i >= 0; --i) {
  1084.                         if (Calculations.distance(Players.getLocal().getLocation(),
  1085.                                         tiles[i]) < 15) {
  1086.                                 return tiles[i];
  1087.                         }
  1088.                 }
  1089.                 return null;
  1090.         }
  1091.  
  1092.  
  1093.  
  1094.        
  1095.  
  1096.  
  1097.  
  1098. }
  1099. public static class AllSettings {
  1100.         public static int Ore_to_Drop = 28;
  1101.         public static boolean Banking = false;
  1102.        
  1103.         public static Rock rockToMine1;
  1104.         public static Rock rockToMine2;
  1105.         public static Rock rockToMine3;
  1106.        
  1107.         public static Bank bank;
  1108.         public static Area area;
  1109.         public static Tile[] pathToBank;
  1110.        
  1111.         public static Mine mine;
  1112.        
  1113.         public static String Style;
  1114.         public static boolean start = false;
  1115.         public static boolean LRC = false;
  1116.        
  1117.         public static double getVersion(){
  1118.                 return 1.3;
  1119.         }
  1120.        
  1121. }
  1122.  
  1123. public class Rock {
  1124.  
  1125.         public int[] rockID;
  1126.  
  1127.         public Rock(int... ID) {
  1128.                 rockID = ID;
  1129.         }
  1130.         private boolean waitFor(final Condition c, final long timeout) {
  1131.         final long past = System.currentTimeMillis();
  1132.         final long total = (past + timeout);
  1133.         while (System.currentTimeMillis() < total) {
  1134.                 if (c.validate()) {
  1135.                         break;
  1136.                 }
  1137.                 Time.sleep(50);
  1138.         }
  1139.         return c.validate();
  1140. }
  1141.         public SceneObject getRock() {
  1142.                 return SceneEntities.getNearest(rockID);
  1143.         }
  1144.  
  1145.         public int getID() {
  1146.                 return getRock().getId();
  1147.         }
  1148.  
  1149.         public void interact(String action, boolean click) {
  1150.                 if (!click) {
  1151.                         getRock().interact(action);
  1152.                 } else {
  1153.                         Mouse.move(getRock().getLocation().getCentralPoint());
  1154.                         Mouse.click(true);
  1155.                 }
  1156.         }
  1157.  
  1158.         public void hopInteract(String action, boolean click) {
  1159.                 if (!click) {
  1160.                         Mouse.hop(getRock().getCentralPoint().x, getRock()
  1161.                                         .getCentralPoint().y);
  1162.                         Mouse.click(false);
  1163.                         Mouse.hop(Menu.getLocation().x, Menu.getLocation().y);
  1164.                         Menu.select(action);
  1165.                 } else {
  1166.                         Mouse.hop(getRock().getCentralPoint().x, getRock()
  1167.                                         .getCentralPoint().y);
  1168.                         Mouse.click(true);
  1169.                 }
  1170.         }
  1171.  
  1172. }
  1173.  
  1174. public static class Repaint {
  1175.         public static String state = "Unkown";
  1176.         public static int    startExp;
  1177.         public static int    startLev;
  1178.         public static int    oreC = 0;
  1179.         public static String   Style;
  1180.         public static long  startTime;
  1181.         public static String rName;
  1182.  
  1183.         public static int getPerHour(int current) {
  1184.                 return (int) ((current) * 3600000D / (System.currentTimeMillis() - startTime));
  1185.         }
  1186.  
  1187.         public static int getExperienceGained() {
  1188.                 return Skills.getExperience(14) - startExp;
  1189.         }
  1190.  
  1191.         public static int getLevelsGained() {
  1192.                 return Skills.getRealLevel(14) - startLev;
  1193.         }
  1194.  
  1195.         /*public static Image getImage(String url) {
  1196.                 try {
  1197.                         return ImageIO.read(new URL(url));
  1198.                 } catch (IOException e) {
  1199.                         return null;
  1200.                 }
  1201.         }*/
  1202.  
  1203.         public final static Color color1 = new Color(255, 255, 255);
  1204.  
  1205.         public final static Font font1 = new Font("Arial Narrow", 0, 14);
  1206.         public final static Font font2 = new Font("Arial Narrow", 0, 11);
  1207.  
  1208.         /*public final static Image img1 = getImage("http://i1209.photobucket.com/albums/cc400/rwkjh/LocMiner.png");
  1209.         public final static Image img2 = getImage("http://fc06.deviantart.net/fs71/f/2010/347/9/d/red_crosshair_by_aeroguardian-d34tgmr.png");
  1210. */
  1211.         public static void go(Graphics g1) {
  1212.                 Graphics2D g = (Graphics2D) g1;
  1213.                 long xpHour = (long) (3600000.0 / (System.currentTimeMillis() - startTime) * (Skills
  1214.                                 .getExperiences()[14] - startExp));
  1215.                 /*int MouseX = (int) Mouse.getLocation().x - img2.getWidth(null) / 2;  
  1216.                 int MouseY = (int) Mouse.getLocation().y - img2.getHeight(null) / 2;
  1217.                
  1218.                 g.drawImage(img1, 10, 345, null);
  1219.                 g.drawImage(img2, MouseX, MouseY, null);*/
  1220.                 g.setFont(font1);
  1221.                 g.setColor(Color.green);
  1222.                 g.drawString("Xp Gained: " + getExperienceGained(), 24, 408);
  1223.                 g.drawString("Xp P/H: " + xpHour, 25, 422);
  1224.                 g.drawString(
  1225.                                 "Xp TNL: "
  1226.                                                 + Skills.getExperienceToLevel(14,
  1227.                                                                 Skills.getRealLevel(14) + 1), 24, 436);
  1228.                 g.drawString(
  1229.                                 "Runtime: "
  1230.                                                 + Time.format(System.currentTimeMillis() - startTime),
  1231.                                 181, 407);
  1232.                 g.drawString("Status: " + state, 181, 420);
  1233.                 g.drawString("Mining: " + rName, 181, 432);
  1234.                 g.drawString("Ores Mined: " + oreC, 349, 409);
  1235.                 g.drawString("Ores P/H: "+getPerHour(oreC), 349, 421);
  1236.                 g.drawString("Style: " + AllSettings.Style, 182, 445);
  1237.                 g.drawString("Profit: " + "Not yet supported", 350, 434);
  1238.                 g.drawString("Level: " + Skills.getLevel(14) + "(+" + getLevelsGained()
  1239.                                 + ")", 25, 449);
  1240.                 g.setFont(font2);
  1241.                 g.drawString("v" + AllSettings.getVersion(), 214, 382);
  1242.  
  1243.         }
  1244.  
  1245. }
  1246.  
  1247. public static class Mines {
  1248.  
  1249.         public static class Paths {
  1250.  
  1251.                 public static final Tile[] LUM_EAST_BANK = { new Tile(3228, 3148, 0),
  1252.                                 new Tile(3232, 3154, 0), new Tile(3236, 3161, 0),
  1253.                                 new Tile(3239, 3170, 0), new Tile(3252, 3173, 0),
  1254.                                 new Tile(3263, 3173, 0), new Tile(3269, 3168, 0) };
  1255.  
  1256.                 public static final Tile[] LUM_WEST_BANK = { new Tile(3146, 3147, 0),
  1257.                                 new Tile(3144, 3153, 0), new Tile(3145, 3160, 0),
  1258.                                 new Tile(3145, 3165, 0), new Tile(3145, 3172, 0),
  1259.                                 new Tile(3144, 3177, 0), new Tile(3143, 3183, 0),
  1260.                                 new Tile(3142, 3189, 0), new Tile(3140, 3195, 0),
  1261.                                 new Tile(3138, 3200, 0), new Tile(3136, 3205, 0),
  1262.                                 new Tile(3133, 3209, 0), new Tile(3131, 3214, 0),
  1263.                                 new Tile(3127, 3218, 0), new Tile(3124, 3221, 0),
  1264.                                 new Tile(3120, 3225, 0), new Tile(3114, 3229, 0),
  1265.                                 new Tile(3110, 3233, 0), new Tile(3104, 3236, 0),
  1266.                                 new Tile(3101, 3241, 0), new Tile(3097, 3243, 0),
  1267.                                 new Tile(3092, 3246, 0) };
  1268.  
  1269.                 public static final Tile[] Al_BANK = { new Tile(3297, 3302, 0),
  1270.                                 new Tile(3298, 3295, 0), new Tile(3296, 3288, 0),
  1271.                                 new Tile(3292, 3281, 0), new Tile(3288, 3274, 0),
  1272.                                 new Tile(3285, 3267, 0), new Tile(3283, 3259, 0),
  1273.                                 new Tile(3282, 3253, 0), new Tile(3282, 3246, 0),
  1274.                                 new Tile(3280, 3239, 0), new Tile(3276, 3233, 0),
  1275.                                 new Tile(3275, 3227, 0), new Tile(3272, 3220, 0),
  1276.                                 new Tile(3272, 3213, 0), new Tile(3274, 3208, 0),
  1277.                                 new Tile(3276, 3202, 0), new Tile(3278, 3196, 0),
  1278.                                 new Tile(3281, 3192, 0), new Tile(3281, 3187, 0),
  1279.                                 new Tile(3279, 3180, 0), new Tile(3278, 3175, 0),
  1280.                                 new Tile(3274, 3168, 0), new Tile(3270, 3166, 0) };
  1281.  
  1282.                 public static final Tile[] VE_BANK = { new Tile(3286, 3364, 0),
  1283.                                 new Tile(3287, 3370, 0), new Tile(3290, 3376, 0),
  1284.                                 new Tile(3292, 3381, 0), new Tile(3291, 3388, 0),
  1285.                                 new Tile(3291, 3393, 0), new Tile(3290, 3397, 0),
  1286.                                 new Tile(3289, 3403, 0), new Tile(3288, 3408, 0),
  1287.                                 new Tile(3288, 3412, 0), new Tile(3287, 3420, 0),
  1288.                                 new Tile(3285, 3426, 0), new Tile(3283, 3428, 0),
  1289.                                 new Tile(3277, 3430, 0), new Tile(3271, 3429, 0),
  1290.                                 new Tile(3268, 3430, 0), new Tile(3261, 3430, 0),
  1291.                                 new Tile(3256, 3428, 0), new Tile(3252, 3427, 0),
  1292.                                 new Tile(3252, 3422, 0), new Tile(3252, 3419, 0) };
  1293.  
  1294.                 public static final Tile[] VW_BANK = { new Tile(3180, 3371, 0),
  1295.                                 new Tile(3183, 3375, 0), new Tile(3180, 3379, 0),
  1296.                                 new Tile(3176, 3382, 0), new Tile(3174, 3387, 0),
  1297.                                 new Tile(3173, 3392, 0), new Tile(3173, 3397, 0),
  1298.                                 new Tile(3173, 3402, 0), new Tile(3171, 3407, 0),
  1299.                                 new Tile(3170, 3412, 0), new Tile(3170, 3417, 0),
  1300.                                 new Tile(3170, 3422, 0), new Tile(3170, 3427, 0),
  1301.                                 new Tile(3175, 3429, 0), new Tile(3180, 3431, 0),
  1302.                                 new Tile(3185, 3431, 0), new Tile(3188, 3435, 0),
  1303.                                 new Tile(3185, 3439, 0) };
  1304.  
  1305.                 public static final Tile[] BARB_BANK = { new Tile(3082, 3421, 0),
  1306.                                 new Tile(3088, 3421, 0), new Tile(3094, 3421, 0),
  1307.                                 new Tile(3100, 3421, 0), new Tile(3106, 3420, 0),
  1308.                                 new Tile(3112, 3420, 0), new Tile(3118, 3419, 0),
  1309.                                 new Tile(3124, 3416, 0), new Tile(3130, 3414, 0),
  1310.                                 new Tile(3136, 3416, 0), new Tile(3142, 3417, 0),
  1311.                                 new Tile(3148, 3417, 0), new Tile(3154, 3419, 0),
  1312.                                 new Tile(3160, 3422, 0), new Tile(3166, 3425, 0),
  1313.                                 new Tile(3172, 3429, 0), new Tile(3178, 3430, 0),
  1314.                                 new Tile(3184, 3430, 0), new Tile(3187, 3436, 0),
  1315.                                 new Tile(3183, 3439, 0) };
  1316.  
  1317.                 public static final Tile[] KHAZARD_BANK = { new Tile(2630, 3141, 0),
  1318.                                 new Tile(2627, 3147, 0), new Tile(2625, 3153, 0),
  1319.                                 new Tile(2625, 3159, 0), new Tile(2626, 3165, 0),
  1320.                                 new Tile(2632, 3165, 0), new Tile(2638, 3165, 0),
  1321.                                 new Tile(2643, 3161, 0), new Tile(2649, 3159, 0),
  1322.                                 new Tile(2655, 3158, 0), new Tile(2661, 3159, 0) };
  1323.  
  1324.                 public static final Tile[] RIMMINGTON_BANK = { new Tile(2976, 3240, 0),
  1325.                                 new Tile(2970, 3240, 0), new Tile(2968, 3247, 0),
  1326.                                 new Tile(2974, 3250, 0), new Tile(2974, 3256, 0),
  1327.                                 new Tile(2973, 3263, 0), new Tile(2975, 3269, 0),
  1328.                                 new Tile(2981, 3270, 0), new Tile(2987, 3272, 0),
  1329.                                 new Tile(2993, 3273, 0), new Tile(2998, 3277, 0),
  1330.                                 new Tile(3003, 3281, 0), new Tile(3004, 3287, 0),
  1331.                                 new Tile(3005, 3293, 0), new Tile(3006, 3300, 0),
  1332.                                 new Tile(3006, 3306, 0), new Tile(3006, 3312, 0),
  1333.                                 new Tile(3007, 3318, 0), new Tile(3006, 3324, 0),
  1334.                                 new Tile(3005, 3330, 0), new Tile(3006, 3336, 0),
  1335.                                 new Tile(3007, 3342, 0), new Tile(3007, 3348, 0),
  1336.                                 new Tile(3009, 3354, 0), new Tile(3012, 3355, 0) };
  1337.                
  1338.                 public static final Tile[] TAVERLY_BANK = { new Tile(2929, 3334, 0),
  1339.                                 new Tile(2928, 3339, 0), new Tile(2928, 3344, 0),
  1340.                                 new Tile(2928, 3349, 0), new Tile(2930, 3354, 0),
  1341.                                 new Tile(2931, 3359, 0), new Tile(2931, 3364, 0),
  1342.                                 new Tile(2932, 3369, 0), new Tile(2930, 3374, 0),
  1343.                                 new Tile(2927, 3379, 0), new Tile(2922, 3380, 0),
  1344.                                 new Tile(2917, 3381, 0), new Tile(2912, 3382, 0),
  1345.                                 new Tile(2909, 3386, 0), new Tile(2907, 3391, 0),
  1346.                                 new Tile(2904, 3395, 0), new Tile(2902, 3400, 0),
  1347.                                 new Tile(2903, 3405, 0), new Tile(2903, 3410, 0),
  1348.                                 new Tile(2900, 3414, 0), new Tile(2895, 3413, 0),
  1349.                                 new Tile(2890, 3415, 0), new Tile(2885, 3417, 0),
  1350.                                 new Tile(2881, 3420, 0), new Tile(2877, 3424, 0),
  1351.                                 new Tile(2872, 3424, 0), new Tile(2869, 3420, 0),
  1352.                                 new Tile(2873, 3417, 0) };
  1353.                
  1354.                 public static final Tile[] HOBGLOBIN_BANK = { new Tile(3094, 3493, 0),
  1355.                                 new Tile(3093, 3498, 0), new Tile(3092, 3503, 0),
  1356.                                 new Tile(3088, 3506, 0), new Tile(3085, 3510, 0),
  1357.                                 new Tile(3084, 3515, 0), new Tile(3084, 3520, 0),
  1358.                                 new Tile(3080, 3524, 0), new Tile(3076, 3528, 0),
  1359.                                 new Tile(3073, 3532, 0), new Tile(3069, 3538, 0),
  1360.                                 new Tile(3064, 3541, 0), new Tile(3058, 3546, 0),
  1361.                                 new Tile(3053, 3550, 0), new Tile(3046, 3555, 0),
  1362.                                 new Tile(3040, 3559, 0), new Tile(3034, 3564, 0),
  1363.                                 new Tile(3030, 3567, 0), new Tile(3028, 3572, 0),
  1364.                                 new Tile(3026, 3577, 0), new Tile(3023, 3583, 0),
  1365.                                 new Tile(3022, 3588, 0), new Tile(3020, 3593, 0),
  1366.                                 new Tile(3018, 3598, 0), new Tile(3016, 3604, 0),
  1367.                                 new Tile(3013, 3609, 0), new Tile(3012, 3614, 0),
  1368.                                 new Tile(3010, 3620, 0), new Tile(3008, 3625, 0),
  1369.                                 new Tile(3007, 3630, 0), new Tile(3006, 3635, 0),
  1370.                                 new Tile(3005, 3641, 0), new Tile(3005, 3647, 0),
  1371.                                 new Tile(3005, 3653, 0), new Tile(3005, 3659, 0),
  1372.                                 new Tile(3005, 3664, 0), new Tile(3004, 3670, 0),
  1373.                                 new Tile(3004, 3676, 0), new Tile(3004, 3681, 0),
  1374.                                 new Tile(3004, 3688, 0), new Tile(3004, 3695, 0),
  1375.                                 new Tile(3004, 3700, 0), new Tile(3004, 3705, 0),
  1376.                                 new Tile(3003, 3710, 0), new Tile(3003, 3715, 0),
  1377.                                 new Tile(3003, 3720, 0), new Tile(3003, 3725, 0),
  1378.                                 new Tile(3003, 3730, 0), new Tile(3004, 3735, 0),
  1379.                                 new Tile(3005, 3740, 0), new Tile(3006, 3746, 0),
  1380.                                 new Tile(3008, 3751, 0), new Tile(3010, 3756, 0),
  1381.                                 new Tile(3011, 3762, 0), new Tile(3013, 3768, 0),
  1382.                                 new Tile(3014, 3774, 0), new Tile(3016, 3779, 0),
  1383.                                 new Tile(3017, 3784, 0), new Tile(3019, 3789, 0),
  1384.                                 new Tile(3022, 3794, 0), new Tile(3023, 3799, 0),
  1385.                                 new Tile(3024, 3804, 0), new Tile(3026, 3809, 0) };
  1386.                
  1387.                 public static final Tile[] S_ARDOUGNE_BANK = {
  1388.                 new Tile(2651, 3284, 0), new Tile(2646, 3284, 0),
  1389.                 new Tile(2641, 3282, 0), new Tile(2641, 3277, 0),
  1390.                 new Tile(2640, 3272, 0), new Tile(2640, 3267, 0),
  1391.                 new Tile(2639, 3263, 0), new Tile(2636, 3258, 0),
  1392.                 new Tile(2633, 3254, 0), new Tile(2628, 3252, 0),
  1393.                 new Tile(2624, 3249, 0), new Tile(2619, 3246, 0),
  1394.                 new Tile(2614, 3245, 0), new Tile(2609, 3245, 0),
  1395.                 new Tile(2605, 3242, 0), new Tile(2604, 3237, 0),
  1396.                 new Tile(2605, 3232, 0), new Tile(2605, 3227, 0),
  1397.                 new Tile(2605, 3222, 0)
  1398. };
  1399.         }
  1400.  
  1401.         public static class AreaRocks {
  1402.  
  1403.                 public static final int[] IRON_ID = { 11956, 11955, 11954, 2093, 2092,
  1404.                                 9719, 9717, 9718, 11956, 11954, 37307, 37309, 37308, 31072,
  1405.                                 31073, 31071, 9719, 5774, 5775, 14914, 14913 };
  1406.  
  1407.                 public static final int[] TIN_ID = { 3038, 3245, 9716, 9714, 5777,
  1408.                                 5778, 5776, 11934, 11933, 11935, 11959, 11957, 11958, 2094,
  1409.                                 2095, 3038, 3245, 5776, 5777, 5778, 9714, 9716, 11933, 11934,
  1410.                                 11935, 11957, 11958, 11959, 14902, 14903, 21293, 21294, 21295 };
  1411.  
  1412.                 public static final int[] COPPER_ID = { 3229, 3027, 9710, 9708, 9709,
  1413.                                 5779, 5780, 5781, 11961, 11960, 11962, 11936, 11937, 11938,
  1414.                                 3027 };
  1415.  
  1416.                 public static int SILVER_ID[] = { 2311, 11186, 11187, 11188, 11948,
  1417.                                 11949, 11950, 15580, 15581, 29224, 29225, 29226, 32444, 32445,
  1418.                                 32446, 37304, 37305, 37306 };
  1419.  
  1420.                 public static int COAL_ID[] = { 3032, 2097, 3233, 5770, 5771, 5772,
  1421.                                 10948, 11930, 11931, 11932, 14850, 14851, 21287, 21288, 21289,
  1422.                                 29215, 29216, 29217, 32426, 32427, 32428 };
  1423.  
  1424.                 public static int GOLD_ID[] = { 5768, 5769, 9720, 9722, 10574, 10575,
  1425.                                 10576, 11183, 11184, 11185, 11943, 15576, 15577, 15578, 32432,
  1426.                                 32433, 32434, 45067, 45068 };
  1427.  
  1428.                 public static int MITHRIL_ID[] = { 2102, 2103, 3041, 3280, 5784, 5785,
  1429.                                 5786, 11942, 11943, 11944, 21278, 21279, 21280, 32438, 32439,
  1430.                                 32440 };
  1431.  
  1432.                 public static int ADAMANTITE_ID[] = { 3040, 3273, 5782, 5783, 11939,
  1433.                                 11941, 21275, 21276, 21277, 29233, 29235, 32425, 32436, 32437 };
  1434.  
  1435.                 public static int CLAY_ID[] = { 11504, 11503, 11505, 9711, 9713, 15503,
  1436.                                 15505, 46320, 46322, 46324 };
  1437.  
  1438.                 public static int GEMROCK_ID[] = { 11195, 11194, 11364 };
  1439.  
  1440.                 public static int LIME_ID[] = { 4027 };
  1441.  
  1442.                 public static int[] COAL_LRC_ID = { 5999 };
  1443.  
  1444.                 public static int[] GOLD_LRC_ID = { 45076 };
  1445.  
  1446.         }
  1447.  
  1448.         public static class Areas {
  1449.  
  1450.                 public static final Area L_EAST_MINE = new Area(
  1451.                                 new Tile(3236, 3153, 0), new Tile(3221, 3144, 0));
  1452.  
  1453.                 public static final Area L_EAST_BANK = new Area(
  1454.                                 new Tile(3270, 3172, 0), new Tile(3269, 3161, 0));
  1455.  
  1456.                 public static final Area L_WEST_MINE = new Area(
  1457.                                 new Tile(3149, 3142, 0), new Tile(3141, 3152, 0));
  1458.  
  1459.                 public static final Area L_WEST_BANK = new Area(
  1460.                                 new Tile(3097, 3240, 0), new Tile(3085, 3249, 0));
  1461.  
  1462.                 public static final Area AL_MINE = new Area(new Tile(3309, 3286, 0),
  1463.                                 new Tile(3282, 3318, 0));
  1464.  
  1465.                 public static final Area VARROCK_EAST_MINE = new Area(new Tile(3296,
  1466.                                 3356, 0), new Tile(3275, 3372, 0));
  1467.  
  1468.                 public static final Area VARROCK_EAST_BANK = new Area(new Tile(3258,
  1469.                                 3414, 0), new Tile(3248, 3427, 0));
  1470.  
  1471.                 public static final Area VARROCK_WEST_MINE = new Area(new Tile(3186,
  1472.                                 3360, 0), new Tile(3170, 3383, 0));
  1473.  
  1474.                 public static final Area VARROCK_WEST_BANK = new Area(new Tile(3177,
  1475.                                 3448, 0), new Tile(3194, 3431, 0));
  1476.  
  1477.                 public static final Area BARBARIAN_MINE = new Area(new Tile(3070, 3412,
  1478.                                 0), new Tile(3088, 3432, 0));
  1479.  
  1480.                 public static final Area KHAZARD_MINE = new Area(
  1481.                                 new Tile(2640, 3131, 0), new Tile(2621, 3158, 0));
  1482.  
  1483.                 public static final Area KHAZARD_BANK = new Area(
  1484.                                 new Tile(2668, 3155, 0), new Tile(2658, 3167, 0));
  1485.  
  1486.                 public static final Area RIMMINGTON_MINE = new Area(new Tile(2992,
  1487.                                 3225, 0), new Tile(2961, 3253, 0));
  1488.  
  1489.                 public static final Area FALADOR_BANK = new Area(
  1490.                                 new Tile(3007, 3360, 0), new Tile(3022, 3351, 0));
  1491.  
  1492.                 public static final Area TAVERLY_MINE = new Area(
  1493.                                 new Tile(2932, 3331, 0), new Tile(2925, 3343, 0));
  1494.  
  1495.                 public static final Area TAVERLY_BANK = new Area(
  1496.                                 new Tile(2873, 3419, 0), new Tile(2878, 3412, 0));
  1497.  
  1498.                 public static final Area HOBGLOBIN_MINE = new Area(new Tile(3018, 3813,
  1499.                                 0), new Tile(3035, 3785, 0));
  1500.  
  1501.                 public static final Area HOBGLOBIN_BANK = new Area(new Tile(3090, 3497,
  1502.                                 0), new Tile(3098, 3487, 0));
  1503.  
  1504.                 public static final Area BARBARIAN_CLAY = new Area(new Tile(3075, 3405,
  1505.                                 0), new Tile(3088, 3392, 0));
  1506.                
  1507.                 public static final Area SHILO_MINE = new Area(new Tile(2830, 3008,
  1508.                                 0), new Tile(2815, 2990, 0));
  1509.                
  1510.                 public static final Area SHILO_BANK = new Area(new Tile(2842, 2957,
  1511.                                 0), new Tile(2862, 2952, 0));
  1512.                
  1513.                 public static final Area S_ARDOUGNE_MINE = new Area(new Tile(2830, 3008,
  1514.                                 0), new Tile(2815, 2990, 0));
  1515.                
  1516.                 public static final Area S_ARDOUGNE_BANK = new Area(new Tile(2608, 3221, 0
  1517.                         ), new Tile(2601, 3237, 0));
  1518.                
  1519.  
  1520.         }
  1521.  
  1522.         public static class Banks {
  1523.  
  1524.                 public static final Bank AL_BANK = new Bank(Areas.L_EAST_BANK, true);
  1525.                 public static final Bank L_EAST_BANK = new Bank(Areas.L_EAST_BANK, true);
  1526.                 public static final Bank L_WEST_BANK = new Bank(Areas.L_WEST_BANK, true);
  1527.                 public static final Bank V_EAST_BANK = new Bank(Areas.VARROCK_EAST_BANK, true);
  1528.                 public static final Bank V_WEST_BANK = new Bank(Areas.VARROCK_WEST_BANK, true);
  1529.                 public static final Bank KHAZARD_BANK = new Bank(Areas.KHAZARD_BANK,true);
  1530.                 public static final Bank FALADOR_BANK = new Bank(Areas.FALADOR_BANK,true);
  1531.                 public static final Bank TAVERLY_BANK = new Bank(Areas.TAVERLY_BANK,true);
  1532.                 public static final Bank HOBGLOBIN_BANK = new Bank(Areas.HOBGLOBIN_BANK, true);
  1533.                 public static final Bank S_ARDOUGNE_BANK = new Bank(Areas.S_ARDOUGNE_BANK, true);
  1534.         }
  1535.  
  1536.         public static class Rocks {
  1537.  
  1538.                 public static final Rock TIN_ROCKS = new Rock(AreaRocks.TIN_ID);
  1539.  
  1540.                 public static final Rock COPPER_ROCKS = new Rock(AreaRocks.COPPER_ID);
  1541.  
  1542.                 public static final Rock COAL_ROCKS = new Rock(AreaRocks.COAL_ID);
  1543.  
  1544.                 public static final Rock MITHRIL_ROCKS = new Rock(AreaRocks.MITHRIL_ID);
  1545.  
  1546.                 public static final Rock ADAMANTITE_ROCKS = new Rock(
  1547.                                 AreaRocks.ADAMANTITE_ID);
  1548.  
  1549.                 public static final Rock IRON_ROCKS = new Rock(AreaRocks.IRON_ID);
  1550.  
  1551.                 public static final Rock GOLD_ROCKS = new Rock(AreaRocks.GOLD_ID);
  1552.  
  1553.                 public static final Rock SILVER_ROCKS = new Rock(AreaRocks.SILVER_ID);
  1554.  
  1555.                 public static final Rock CLAY_ROCKS = new Rock(AreaRocks.CLAY_ID);
  1556.                 public static final Rock GEM_ROCKS = new Rock(AreaRocks.GEMROCK_ID);
  1557.         }
  1558.  
  1559. }
  1560. }