Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////
- ///Imports///
- ////////////
- import java.awt.*;
- import java.io.IOException;
- import java.net.URL;
- import java.util.LinkedList;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import java.awt.event.MouseEvent;
- import java.awt.event.MouseListener;
- import javax.imageio.ImageIO;
- import javax.swing.DefaultComboBoxModel;
- import javax.swing.GroupLayout;
- import javax.swing.JButton;
- import javax.swing.JComboBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JPanel;
- import javax.swing.JTabbedPane;
- import javax.swing.JTextField;
- import javax.swing.LayoutStyle;
- import org.rsbot.event.events.MessageEvent;
- import org.rsbot.event.listeners.MessageListener;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.wrappers.RSComponent;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSTile;
- import org.rsbot.script.wrappers.RSTilePath;
- @ScriptManifest(
- authors = {"Rudie"},
- version = 2.0,
- keywords = ("miner, mining, rudie, worldminer"),
- description = "Mines and banks ores at different locations more info is in the thread",
- name = "MultiMiner"
- )
- public class MultiMiner extends Script implements PaintListener, MessageListener, MouseListener {
- ////////////////
- ///Variables///
- //////////////
- private final static int[] boothID = {26972, 11402, 2213, 34752, 11758, 2213, 35647, 782, 2012, 2015, 2019};
- private final static int[] coal_ID = {11931, 11932, 11930, 2096, 2097, 5770, 5771, 5772};
- private final static int[] iron_ID = {37307, 37308, 37309, 9717, 9718, 9719, 11954, 11956, 2092, 2093};
- private final static int[] gold_ID = {9722, 9720, 37310, 37312};
- private final static int[] copper_ID = {9708, 9709, 11960, 11962};
- private final static int[] tin_ID = {9714, 9716, 11959, 11958, 11957, 11935, 11933};
- private final static int[] clay_ID = {15504, 10579};
- private final static int[] silver_ID = {11948, 11949, 11950};
- private final static int[] pickID = {1265, 1267, 1269, 1271, 1273, 1275};
- private final static int dstairID = 2113;
- private final static int ustairID = 6226;
- private static final int coal_ORE = 453;
- private static final int iron_ORE = 440;
- private static final int gold_ORE = 444;
- private static final int copper_ORE = 436;
- private static final int tin_ORE = 438;
- private static final int clay_ORE = 434;
- private static final int silver_ORE = 442;
- ////////////
- ///Tiles///
- //////////
- RSTile[] barbarian = {new RSTile(3084, 3423), new RSTile(3089, 3436),
- new RSTile(3090, 3449), new RSTile(3087, 3461), new RSTile(3079, 3471), new RSTile(3079, 3484),
- new RSTile(3085, 3489), new RSTile(3092, 3491)};
- RSTilePath barbarianVillage;
- RSTile[] barbarianC = {new RSTile(3082, 3400), new RSTile(3081, 3414)};
- RSTilePath barbarianVillageC;
- RSTile[] draynorv = {new RSTile(3141, 3317), new RSTile(3134, 3305),
- new RSTile(3125, 3297), new RSTile(3113, 3293), new RSTile(3109, 3283), new RSTile(3104, 3274),
- new RSTile(3104, 3263), new RSTile(3104, 3250), new RSTile(3094, 3248),
- new RSTile(3092, 3243)};
- RSTilePath draynor;
- RSTile[] ardy = {new RSTile(2693, 3334), new RSTile(2697, 3322),
- new RSTile(2692, 3312), new RSTile(2681, 3305), new RSTile(2667, 3304), new RSTile(2656, 3299),
- new RSTile(2649, 3293), new RSTile(2644, 3284), new RSTile(2652, 3285)};
- RSTilePath ardougne;
- RSTile[] ALK = {new RSTile(3299, 3293), new RSTile(3298, 3285),
- new RSTile(3297, 3275), new RSTile(3295, 3266),
- new RSTile(3293, 3255), new RSTile(3291, 3246), new RSTile(3287, 3237),
- new RSTile(3283, 3229), new RSTile(3279, 3221), new RSTile(3277, 3211),
- new RSTile(3281, 3201), new RSTile(3281, 3191), new RSTile(3281, 3183),
- new RSTile(3276, 3175), new RSTile(3269, 3168)};
- RSTilePath alKharid;
- RSTile[] port = {new RSTile(2626, 3151), new RSTile(2623, 3142),
- new RSTile(2620, 3131), new RSTile(2619, 3119), new RSTile(2617, 3109),
- new RSTile(2608, 3100), new RSTile(2611, 3093)};
- RSTilePath khazard;
- RSTile[] varrock = {new RSTile(3182, 3372), new RSTile(3182, 3376),
- new RSTile(3176, 3387),new RSTile(3169, 3399),
- new RSTile(3168, 3411), new RSTile(3169, 3423),
- new RSTile(3178, 3429), new RSTile(3183, 3438)};
- RSTilePath varrockw;
- RSTile[] fromBankToStairs = {new RSTile(3015, 3355)};
- RSTilePath bankToStairs;
- RSTile[] fromStairsToBank = {new RSTile(3019, 3342)};
- RSTilePath stairsToBank;
- RSTile[] MiningAreaE = {new RSTile(3027, 9739), new RSTile(3034, 9738),
- new RSTile(3044, 9738)};
- RSTilePath MiningArea;
- long startTime;
- private static final Color MOUSE_COLOR = new Color(255, 0, 0),
- MOUSE_BORDER_COLOR = new Color(255, 0, 0),
- MOUSE_CENTER_COLOR = new Color(0, 0, 0);
- private boolean pressed = false;
- int expGained = 0;
- int startExp = 0;
- int oresMined = 0;
- int gemsMined = 0;
- int gainedLvl = 0;
- public boolean showPaint = true ;
- Point p;
- Point p2;
- private final LinkedList<MousePathPoint> mousePath = new LinkedList<MousePathPoint>();
- private int[] oresToMine;
- public int oreID = 0;
- private boolean guiWait = true;
- GUI g = new GUI();
- private String Status = "Loading...";
- ////////////////////
- ///OnStart method///
- ///////////////////
- public boolean onStart() {
- bankToStairs = walking.newTilePath(fromBankToStairs);
- stairsToBank = walking.newTilePath(fromStairsToBank);
- MiningArea = walking.newTilePath(MiningAreaE);
- barbarianVillage = walking.newTilePath(barbarian);
- barbarianVillageC = walking.newTilePath(barbarianC);
- varrockw = walking.newTilePath(varrock);
- draynor = walking.newTilePath(draynorv);
- ardougne = walking.newTilePath(ardy);
- khazard = walking.newTilePath(port);
- alKharid = walking.newTilePath(ALK);
- startTime = System.currentTimeMillis();
- mouse.setSpeed(random(3, 5));
- startExp = skills.getCurrentExp(Skills.MINING);
- log(new Color (30, 144, 255), "Welcome to MultiMiner V 2.0!");
- log(Color.RED, "PLEASE READ:");
- log(new Color (30, 144, 255), "Please check the thread every day for new updates.");
- log(new Color (30, 144, 255), "V 2.0 has been released 13-6-11.");
- log(new Color (30, 144, 255), "MultiMiner ® © 2011 ");
- log(Color.RED, "Happy botting!");
- g.setVisible(true);
- while(guiWait) sleep(500);
- return true;
- }
- ///////////
- ///Loop///
- /////////
- @Override
- public int loop() {
- if(inventory.isFull()) {
- if(atBank()) {
- doBank();
- } else if(atUp()) {
- goUp();
- } else {
- BarbarianVillage();
- BarbarianVillageC();
- varrock();
- draynor();
- ardy();
- BtS();
- StB();
- MiningPlace();
- khazard();
- kharid();
- }
- } else {
- if(atMine()) {
- mineOres();
- } else if(atDown()) {
- goDown();
- } else {
- barbarianVillage();
- barbarianVillageC();
- varrockwest();
- draynorvillage();
- ardougne();
- BtSS();
- StBB();
- MiningPlacee();
- portKhazard();
- alKharid();
- }
- }
- return random(600, 800);
- }
- //////////////
- ///Methods///
- ////////////
- private void mineOres() {
- RSObject rock = objects.getNearest(oresToMine);
- if (rock != null && getMyPlayer().getAnimation() == -1) {
- rock.interact("Mine");
- AntiBan();
- AntiBanCamera();
- Status = "Mining.";
- }
- }
- private void goDown() {
- RSObject ladder = objects.getNearest(dstairID);
- if (ladder != null && getMyPlayer().getAnimation() == -1) {
- ladder.doAction("Climb-down");
- Status = "Going down.";
- AntiBan();
- AntiBanCamera();
- }
- sleep(3000, 4500);
- }
- private void goUp() {
- RSObject ladder = objects.getNearest(ustairID);
- if (ladder != null && getMyPlayer().getAnimation() == -1) {
- ladder.doAction("Climb-up");
- Status = "Going up.";
- AntiBan();
- AntiBanCamera();
- }
- sleep(5000, 6500);
- }
- private void barbarianVillage() {
- barbarianVillage.reverse();
- barbarianVillage.traverse();
- barbarianVillage.reverse();
- Status = "Walking to mine.";
- }
- private void BarbarianVillage() {
- barbarianVillage.traverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- private void barbarianVillageC() {
- barbarianVillageC.reverse();
- barbarianVillageC.traverse();
- barbarianVillageC.reverse();
- Status = "Walking to mine.";
- }
- private void BarbarianVillageC() {
- barbarianVillageC.traverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- private void varrockwest() {
- varrockw.reverse();
- varrockw.traverse();
- varrockw.reverse();
- Status = "Walking to mine.";
- }
- private void varrock() {
- varrockw.traverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- private void BtS() {
- bankToStairs.reverse();
- bankToStairs.traverse();
- bankToStairs.reverse();
- AntiBanCamera();
- Status = "Walking to mine.";
- }
- private void BtSS() {
- bankToStairs.traverse();
- AntiBanCamera();
- Status = "Walking to mine.";
- }
- private void StB() {
- stairsToBank.reverse();
- stairsToBank.traverse();
- stairsToBank.reverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- private void StBB() {
- stairsToBank.traverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- private void MiningPlace() {
- MiningArea.reverse();
- MiningArea.traverse();
- MiningArea.reverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- private void MiningPlacee() {
- MiningArea.traverse();
- AntiBanCamera();
- Status = "Walking to mine.";
- }
- private void draynorvillage() {
- draynor.reverse();
- draynor.traverse();
- draynor.reverse();
- Status = "Walking to mine.";
- }
- private void draynor() {
- draynor.traverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- private void ardougne() {
- ardougne.reverse();
- ardougne.traverse();
- ardougne.reverse();
- Status = "Walking to mine.";
- }
- private void ardy() {
- ardougne.traverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- private void portKhazard() {
- khazard.reverse();
- khazard.traverse();
- khazard.reverse();
- Status = "Walking to mine.";
- }
- private void khazard() {
- khazard.traverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- private void alKharid() {
- alKharid.reverse();
- alKharid.traverse();
- alKharid.reverse();
- Status = "Walking to mine.";
- }
- private void kharid() {
- alKharid.traverse();
- AntiBanCamera();
- Status = "Walking to bank.";
- }
- public void mouseClicked(MouseEvent e) {
- RSComponent inter = interfaces.get(137).getComponent(0);
- if (inter.getArea().contains(e.getPoint())) {
- showPaint = !showPaint;
- }
- }
- private void drawMouse(Graphics g) {
- ((Graphics2D) g).setRenderingHints(new RenderingHints(
- RenderingHints.KEY_ANTIALIASING,
- RenderingHints.VALUE_ANTIALIAS_ON));
- Point p = mouse.getLocation();
- Graphics2D spinG = (Graphics2D) g.create();
- Graphics2D spinGRev = (Graphics2D) g.create();
- Graphics2D spinG2 = (Graphics2D) g.create();
- spinG.setColor(MOUSE_BORDER_COLOR);
- spinGRev.setColor(MOUSE_COLOR);
- spinG.rotate(System.currentTimeMillis() % 2000d / 2000d * (360d) * 2
- * Math.PI / 180.0, p.x, p.y);
- spinGRev.rotate(System.currentTimeMillis() % 2000d / 2000d * (-360d)
- * 2 * Math.PI / 180.0, p.x, p.y);
- final int outerSize = 20;
- final int innerSize = 12;
- spinG.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
- BasicStroke.JOIN_ROUND));
- spinGRev.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
- BasicStroke.JOIN_ROUND));
- spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize,
- outerSize, 100, 75);
- spinG.drawArc(p.x - (outerSize / 2), p.y - (outerSize / 2), outerSize,
- outerSize, -100, 75);
- spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2),
- innerSize, innerSize, 100, 75);
- spinGRev.drawArc(p.x - (innerSize / 2), p.y - (innerSize / 2),
- innerSize, innerSize, -100, 75);
- g.setColor(MOUSE_CENTER_COLOR);
- g.fillOval(p.x, p.y, 2, 2);
- spinG2.setColor(MOUSE_CENTER_COLOR);
- spinG2.rotate(System.currentTimeMillis() % 2000d / 2000d * 360d
- * Math.PI / 180.0, p.x, p.y);
- spinG2.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND,
- BasicStroke.JOIN_ROUND));
- spinG2.drawLine(p.x - 5, p.y, p.x + 5, p.y);
- spinG2.drawLine(p.x, p.y - 5, p.x, p.y + 5);
- }
- @SuppressWarnings("serial")
- private class MousePathPoint extends Point { // credits to Enfilade
- private int toColor(double d) {
- return Math.min(255, Math.max(0, (int) d));
- }
- private long finishTime;
- private double lastingTime;
- public MousePathPoint(int x, int y, int lastingTime) {
- super(x, y);
- this.lastingTime = lastingTime;
- finishTime = System.currentTimeMillis() + lastingTime;
- }
- public boolean isUp() {
- return System.currentTimeMillis() > finishTime;
- }
- public Color getColor() {
- return new Color(
- 0,
- 0,
- 0,
- toColor(256 * ((finishTime - System.currentTimeMillis()) / lastingTime)));
- }
- }
- private final RenderingHints antialiasing = new RenderingHints(
- RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
- //////////////////////
- ///OnFinish Method///
- ////////////////////
- public void onFinish() {
- log("Ty for using MultiMiner by Rudie.");
- env.saveScreenshot(true);
- }
- ///////////////////
- ///Other Methods///
- //////////////////
- private boolean atBank() {
- RSObject bank = objects.getNearest(boothID);
- if(bank != null) {
- if(bank.isOnScreen()) {
- return true;
- }
- }
- return false;
- }
- private boolean atDown() {
- RSObject ladder = objects.getNearest(dstairID);
- AntiBan();
- AntiBanCamera();
- if(ladder != null) {
- if(ladder.isOnScreen()) {
- return true;
- }
- }
- return false;
- }
- private boolean atUp() {
- RSObject ladder = objects.getNearest(ustairID);
- AntiBan();
- AntiBanCamera();
- if(ladder != null) {
- if(ladder.isOnScreen()) {
- return true;
- }
- }
- return false;
- }
- private void doBank() {
- if(bank.isOpen()) {
- bank.depositAllExcept(pickID);
- sleep(800, 1200);
- Status = "Banking.";
- } else {
- bank.open();
- Status = "Banking.";
- sleep(1800, 2200);
- }
- }
- private boolean atMine() {
- RSObject ore = objects.getNearest(oresToMine);
- AntiBan();
- AntiBanCamera();
- if(ore != null) {
- if(ore.isOnScreen()) {
- return true;
- }
- }
- return false;
- }
- ////////////
- ///Paint///
- //////////
- private Image getImage(String url) {
- try {
- return ImageIO.read(new URL(url));
- } catch(IOException e) {
- return null;
- }
- }
- private final Color color1 = new Color(51, 51, 51);
- private final Color color2 = new Color(255, 0, 0);
- private final Color color3 = new Color(255, 255, 255);
- private final Color color4 = new Color(0, 0, 0);
- private final BasicStroke stroke1 = new BasicStroke(1);
- private final Font font1 = new Font("Comic Sans MS", 2, 15);
- private final Font font2 = new Font("Comic Sans MS", 0, 32);
- private final Font font3 = new Font("Arial", 3, 15);
- private final Font font4 = new Font("Arial", 0, 13);
- private final Image img1 = getImage("http://i52.tinypic.com/2aahqgp.png");
- @Override
- public void onRepaint(Graphics g) {
- drawModel(g, objects.getNearest(coal_ID), Color.BLACK, "", Color.GREEN);
- drawModel(g, objects.getNearest(tin_ID), Color.GRAY, "", Color.GREEN);
- drawModel(g, objects.getNearest(copper_ID), Color.ORANGE, "", Color.GREEN);
- drawModel(g, objects.getNearest(gold_ID), Color.YELLOW, "", Color.GREEN);
- drawModel(g, objects.getNearest(silver_ID), Color.LIGHT_GRAY, "", Color.GREEN);
- drawModel(g, objects.getNearest(iron_ID), Color.RED, "", Color.GREEN);
- drawModel(g, objects.getNearest(clay_ID), Color.DARK_GRAY, "", Color.GREEN);
- drawModel(g, objects.getNearest(boothID), Color.GREEN, "", Color.GREEN);
- expGained = skills.getCurrentExp(Skills.MINING) - startExp;
- long millis = System.currentTimeMillis() - startTime;
- long hours = millis / (1000 * 60 * 60);
- millis -= hours * (1000 * 60 * 60);
- long minutes = millis / (1000 * 60);
- millis -= minutes * (1000 * 60);
- long seconds = millis / 1000;
- float xpsec = 0;
- if((minutes > 0 || hours > 0 || seconds > 0)&& expGained > 0) {
- xpsec = ((float) expGained)/(float)(seconds + (minutes*60) + (hours*60*60));
- }
- float xpmin = xpsec * 60;
- float xphour = xpmin * 60;
- float oresec = 0;
- if((minutes > 0 || hours > 0 || seconds > 0)&& oresMined > 0) {
- oresec = ((float) oresMined)/(float)(seconds + (minutes*60) + (hours*60*60));
- }
- float oremin = oresec * 60;
- float orehour = oremin * 60;
- Graphics2D g1 = (Graphics2D)g;
- g1.setColor(color4);
- g1.fillRect(396, 459, 98, 12);
- g1.setColor(color2);
- g1.drawRect(396, 459, 98, 12);
- g1.setColor(color3);
- g1.setFont(font4);
- g1.drawString("Hide/Show Paint.", 396, 470);
- drawMouse(g1);
- Point p = mouse.getLocation();
- while (!mousePath.isEmpty() && mousePath.peek().isUp())
- mousePath.remove();
- Point clientCursor = mouse.getLocation();
- MousePathPoint mpp = new MousePathPoint(clientCursor.x,
- clientCursor.y, 3000);
- if (mousePath.isEmpty() || !mousePath.getLast().equals(mpp))
- mousePath.add(mpp);
- MousePathPoint lastPoint = null;
- for (MousePathPoint a : mousePath) {
- if (lastPoint != null) {
- g1.setColor(a.getColor());
- g1.drawLine(a.x, a.y, lastPoint.x, lastPoint.y);
- }
- lastPoint = a;
- }
- g1.fillRect(p.x - 5, p.y, 12, 2);
- g1.fillRect(p.x, p.y - 5, 2, 12);
- if(showPaint){
- g1.setColor(color1);
- g1.fillRoundRect(8, 345, 488, 112, 16, 16);
- g1.setColor(color2);
- g1.setStroke(stroke1);
- g1.drawRoundRect(8, 345, 488, 112, 16, 16);
- g1.drawLine(7, 362, 494, 362);
- g1.drawImage(img1, 435, 269, null);
- g1.setFont(font1);
- g1.setColor(color3);
- g1.drawString("More human then you", 253, 338);
- g1.setFont(font2);
- g1.setColor(color2);
- g1.drawString("MultiMiner", 75, 338);
- g1.setFont(font3);
- g1.setColor(color3);
- g1.drawString("Status: " + Status, 12, 361);
- g1.drawString("RunTime: " + hours + ":" + minutes + ":" + seconds, 17, 390);
- g1.drawString("Current Lvl: " + skills.getCurrentLevel(Skills.MINING), 17, 405);
- g1.drawString("Lvl's Gained: " + gainedLvl, 17, 420);
- g1.drawString("XP/TNL: " + skills.getExpToNextLevel(Skills.MINING), 17, 435);
- g1.drawString("Ores Mined: " + oresMined, 250, 390);
- g1.drawString("Ores/H: " + (int) orehour, 250, 405);
- g1.setColor(color4);
- g1.fillRect(8, 459, 98, 12);
- g1.setColor(color2);
- g1.drawRect(8, 459, 98, 12);
- g1.setColor(color4);
- g1.fillRect(396, 459, 98, 12);
- g1.setColor(color2);
- g1.drawRect(396, 459, 98, 12);
- g1.setColor(color3);
- g1.drawString("XP/H: " + (int) xphour, 250, 435);
- g1.drawString("Gems Found: " + gemsMined, 250, 450);
- g1.drawString("%/TNL: " + skills.getPercentToNextLevel(Skills.MINING) + "%", 17, 450);
- g1.drawString("XP Gained: " + expGained, 250, 420);
- g1.setFont(font4);
- g1.drawString("Hide/Show Paint.", 396, 470);
- }
- }
- public void drawModel(Graphics g, RSObject o, Color c, String s, Color tc) {
- if(o != null) {
- Polygon[] model = o.getModel().getTriangles();
- Point point = calc.tileToScreen(o.getLocation());
- for(Polygon p : model) {
- g.setColor(c);
- g.fillPolygon(p);
- g.setColor(c.darker());
- g.drawPolygon(p);
- }
- g.setColor(tc);
- g.drawString(s, point.x - 75, point.y - 35);
- }
- }
- public RSTile[] reversePath(RSTile[] other) {
- RSTile[] t = new RSTile[other.length];
- for (int i = 0; i < t.length; i++) {
- t[i] = other[other.length - i - 1];
- }
- return t;
- }
- @Override
- public void mouseEntered(MouseEvent e) {
- // TODO Auto-generated method stub
- }
- @Override
- public void mouseExited(MouseEvent e) {
- // TODO Auto-generated method stub
- }
- @Override
- public void mousePressed(MouseEvent e) {
- // TODO Auto-generated method stub
- }
- @Override
- public void mouseReleased(MouseEvent e) {
- // TODO Auto-generated method stub
- }
- @Override
- public void messageReceived(MessageEvent e) {
- String txt = e.getMessage().toLowerCase();
- if(txt.contains("you manage to mine some")) {
- oresMined++;
- }
- if(txt.contains("just found")) {
- gemsMined++;
- }
- if(txt.contains("mining level")) {
- gainedLvl++;
- }
- }
- //////////////
- ///AntiBan///
- ////////////
- @SuppressWarnings("deprecation")
- private void AntiBan() {
- int randomProd = random(1, 60);
- if (randomProd == 1) {
- int randomMore = random(1, 5);
- if (randomMore == 1) {
- if (game.getCurrentTab() != 2) {
- game.openTab(2);
- Status = "Checking Mining XP + Level.";
- sleep(350, 500);
- mouse.move(random(678, 728), random(213, 232));
- sleep(2000, 3500);
- } else {
- mouse.move(random(678, 728), random(213, 232));
- sleep(2000, 3500);
- }
- } else {
- sleep(1200, 2500);
- }
- }
- if (randomProd == 2 || randomProd == 3 || randomProd == 4) {
- sleep(1000, 2500);
- }
- if (randomProd >= 52) {
- mouse.moveRandomly(65, 350);
- } else
- sleep(10, 30);
- }
- private void AntiBanCamera() {
- int randomNum = random(1, 50);
- if (randomNum == 1 || randomNum == 2 || randomNum == 3) {
- camera.moveRandomly(random(2000, 5500));
- }
- if (randomNum == 4 || randomNum == 5) {
- camera.setAngle(random(10, 40));
- }
- if (randomNum == 6) {
- camera.setPitch(random(40, 68));
- }
- if (randomNum == 7) {
- camera.setPitch(random(20, 45));
- }
- if (randomNum == 8) {
- camera.setPitch(random(68, 90));
- } else
- sleep(50, 70);
- }
- //////////
- ///GUI///
- ////////
- class GUI extends JFrame {
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- public GUI() {
- initComponents();
- }
- private void button1ActionPerformed(ActionEvent e) {
- String chosennnnnnn = comboBox7.getSelectedItem().toString();
- if(chosennnnnnn.equals("Iron")) {
- oreID = iron_ORE;
- oresToMine = iron_ID;
- }
- guiWait = false;
- g.dispose();
- }
- private void button2ActionPerformed(ActionEvent e) {
- String chosennnnnn = comboBox6.getSelectedItem().toString();
- if(chosennnnnn.equals("Clay")) {
- oreID = clay_ORE;
- oresToMine = clay_ID;
- }
- guiWait = false;
- g.dispose();
- }
- private void button3ActionPerformed(ActionEvent e) {
- String chosennnnn = comboBox5.getSelectedItem().toString();
- if(chosennnnn.equals("Coal")) {
- oreID = coal_ORE;
- oresToMine = coal_ID;
- } else {
- oreID = iron_ORE;
- oresToMine = iron_ID;
- }
- guiWait = false;
- g.dispose();
- }
- private void button4ActionPerformed(ActionEvent e) {
- String chosennnn = comboBox4.getSelectedItem().toString();
- if(chosennnn.equals("Coal")) {
- oreID = coal_ORE;
- oresToMine = coal_ID;
- } else if(chosennnn.equals("Iron")) {
- oreID = iron_ORE;
- oresToMine = iron_ID;
- } else {
- oreID = gold_ORE;
- oresToMine = gold_ID;
- }
- guiWait = false;
- g.dispose();
- }
- private void button5ActionPerformed(ActionEvent e) {
- String chosennn = comboBox3.getSelectedItem().toString();
- if(chosennn.equals("Clay")) {
- oreID = clay_ORE;
- oresToMine = clay_ID;
- } else if(chosennn.equals("Tin")) {
- oreID = tin_ORE;
- oresToMine = tin_ID;
- } else if(chosennn.equals("Iron")) {
- oreID = iron_ORE;
- oresToMine = iron_ID;
- } else {
- oreID = silver_ORE;
- oresToMine = silver_ID;
- }
- guiWait = false;
- g.dispose();
- }
- private void button6ActionPerformed(ActionEvent e) {
- String chosenn = comboBox2.getSelectedItem().toString();
- if(chosenn.equals("Coal")) {
- oreID = coal_ORE;
- oresToMine = coal_ID;
- } else if(chosenn.equals("Tin")) {
- oreID = tin_ORE;
- oresToMine = tin_ID;
- } else {
- oreID = clay_ORE;
- oresToMine = clay_ID;
- }
- guiWait = false;
- g.dispose();
- }
- private void button7ActionPerformed(ActionEvent e) {
- String chosen = comboBox1.getSelectedItem().toString();
- if(chosen.equals("Coal")) {
- oreID = coal_ORE;
- oresToMine = coal_ID;
- }
- guiWait = false;
- g.dispose();
- }
- private void button8ActionPerformed(ActionEvent e) {
- log(Color.RED, "Essence mine will be added later go mine somewhere else.");
- }
- private void initComponents() {
- // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
- // Generated using JFormDesigner Evaluation license - Loliejap poepjes
- tabbedPane3 = new JTabbedPane();
- panel2 = new JPanel();
- label2 = new JLabel();
- label3 = new JLabel();
- comboBox1 = new JComboBox();
- label4 = new JLabel();
- comboBox2 = new JComboBox();
- label5 = new JLabel();
- comboBox3 = new JComboBox();
- label6 = new JLabel();
- comboBox4 = new JComboBox();
- label7 = new JLabel();
- comboBox5 = new JComboBox();
- label8 = new JLabel();
- comboBox6 = new JComboBox();
- label9 = new JLabel();
- comboBox7 = new JComboBox();
- button1 = new JButton();
- button2 = new JButton();
- button3 = new JButton();
- button4 = new JButton();
- button5 = new JButton();
- button6 = new JButton();
- button7 = new JButton();
- label1 = new JLabel();
- comboBox8 = new JComboBox();
- button8 = new JButton();
- panel3 = new JPanel();
- label10 = new JLabel();
- textField1 = new JTextField();
- label11 = new JLabel();
- //======== this ========
- setTitle("MultiMiner GUI");
- Container contentPane = getContentPane();
- //======== tabbedPane3 ========
- {
- //======== panel2 ========
- {
- // JFormDesigner evaluation mark
- panel2.setBorder(new javax.swing.border.CompoundBorder(
- new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0),
- "MultiMiner GUI", javax.swing.border.TitledBorder.LEFT,
- javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Arial", java.awt.Font.BOLD, 12),
- java.awt.Color.red), panel2.getBorder())); panel2.addPropertyChangeListener(new java.beans.PropertyChangeListener(){public void propertyChange(java.beans.PropertyChangeEvent e){if("border".equals(e.getPropertyName()))throw new RuntimeException();}});
- //---- label2 ----
- label2.setText("MultiMiner by Rudie");
- label2.setForeground(Color.red);
- label2.setFont(new Font("Comic Sans MS", Font.BOLD, 28));
- //---- label3 ----
- label3.setText("Mining Guild");
- label3.setFont(label3.getFont().deriveFont(label3.getFont().getSize() + 2f));
- //---- comboBox1 ----
- comboBox1.setModel(new DefaultComboBoxModel(new String[] {
- "Coal"
- }));
- //---- label4 ----
- label4.setText("Barbarian Village");
- label4.setFont(label4.getFont().deriveFont(label4.getFont().getSize() + 2f));
- //---- comboBox2 ----
- comboBox2.setModel(new DefaultComboBoxModel(new String[] {
- "Coal",
- "Tin",
- "Clay"
- }));
- //---- label5 ----
- label5.setText("Varrock West");
- label5.setFont(label5.getFont().deriveFont(label5.getFont().getSize() + 2f));
- //---- comboBox3 ----
- comboBox3.setModel(new DefaultComboBoxModel(new String[] {
- "Clay",
- "Tin",
- "Iron",
- "Silver"
- }));
- //---- label6 ----
- label6.setText("Al Kharid");
- label6.setFont(label6.getFont().deriveFont(label6.getFont().getSize() + 2f));
- //---- comboBox4 ----
- comboBox4.setModel(new DefaultComboBoxModel(new String[] {
- "Coal",
- "Iron",
- "Gold"
- }));
- //---- label7 ----
- label7.setText("Ardougne");
- label7.setFont(label7.getFont().deriveFont(label7.getFont().getSize() + 2f));
- //---- comboBox5 ----
- comboBox5.setModel(new DefaultComboBoxModel(new String[] {
- "Coal",
- "Iron"
- }));
- //---- label8 ----
- label8.setText("Draynor Village");
- label8.setFont(label8.getFont().deriveFont(label8.getFont().getSize() + 2f));
- //---- comboBox6 ----
- comboBox6.setModel(new DefaultComboBoxModel(new String[] {
- "Clay"
- }));
- //---- label9 ----
- label9.setText("Yanille");
- label9.setFont(label9.getFont().deriveFont(label9.getFont().getSize() + 2f));
- //---- comboBox7 ----
- comboBox7.setModel(new DefaultComboBoxModel(new String[] {
- "Iron"
- }));
- //---- button1 ----
- button1.setText("Start For Yanille");
- button1.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button1ActionPerformed(e);
- }
- });
- //---- button2 ----
- button2.setText("Start For Draynor");
- button2.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button2ActionPerformed(e);
- }
- });
- //---- button3 ----
- button3.setText("Start For Ardougne");
- button3.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button3ActionPerformed(e);
- }
- });
- //---- button4 ----
- button4.setText("Start For Al Kharid");
- button4.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button4ActionPerformed(e);
- }
- });
- //---- button5 ----
- button5.setText("Start For Varrock West");
- button5.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button5ActionPerformed(e);
- }
- });
- //---- button6 ----
- button6.setText("Start For Barbarian Village");
- button6.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button6ActionPerformed(e);
- }
- });
- //---- button7 ----
- button7.setText("Start For Mining Guild");
- button7.setSelectedIcon(null);
- button7.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button7ActionPerformed(e);
- }
- });
- //---- label1 ----
- label1.setText("Varrock West");
- label1.setFont(label1.getFont().deriveFont(label1.getFont().getSize() + 2f));
- //---- comboBox8 ----
- comboBox8.setModel(new DefaultComboBoxModel(new String[] {
- "Essence"
- }));
- //---- button8 ----
- button8.setText("Start For Varrock West");
- button8.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- button8ActionPerformed(e);
- }
- });
- GroupLayout panel2Layout = new GroupLayout(panel2);
- panel2.setLayout(panel2Layout);
- panel2Layout.setHorizontalGroup(
- panel2Layout.createParallelGroup()
- .addGroup(panel2Layout.createSequentialGroup()
- .addGroup(panel2Layout.createParallelGroup()
- .addGroup(panel2Layout.createSequentialGroup()
- .addGap(132, 132, 132)
- .addComponent(label2))
- .addGroup(panel2Layout.createSequentialGroup()
- .addGap(20, 20, 20)
- .addGroup(panel2Layout.createParallelGroup()
- .addComponent(label3)
- .addComponent(label4)
- .addComponent(label5)
- .addComponent(label6)
- .addComponent(label7)
- .addComponent(label8)
- .addComponent(label9)
- .addComponent(label1))
- .addGap(55, 55, 55)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
- .addComponent(comboBox8, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(comboBox7, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(comboBox6, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(comboBox5, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(comboBox4, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(comboBox3, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(comboBox2, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(comboBox1, 0, 83, Short.MAX_VALUE))
- .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
- .addGroup(panel2Layout.createParallelGroup()
- .addComponent(button8)
- .addComponent(button7)
- .addComponent(button6)
- .addComponent(button5)
- .addComponent(button4)
- .addComponent(button3)
- .addComponent(button2)
- .addComponent(button1))))
- .addContainerGap(15, Short.MAX_VALUE))
- );
- panel2Layout.setVerticalGroup(
- panel2Layout.createParallelGroup()
- .addGroup(panel2Layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(label2)
- .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label3)
- .addComponent(comboBox1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button7))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label4)
- .addComponent(comboBox2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button6))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label5)
- .addComponent(comboBox3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button5))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label6)
- .addComponent(comboBox4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button4))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label7)
- .addComponent(comboBox5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button3))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label8)
- .addComponent(comboBox6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button2))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label9)
- .addComponent(comboBox7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button1))
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(panel2Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
- .addComponent(label1)
- .addComponent(comboBox8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addComponent(button8))
- .addContainerGap(12, Short.MAX_VALUE))
- );
- }
- tabbedPane3.addTab("Settings", panel2);
- //======== panel3 ========
- {
- //---- label10 ----
- label10.setText("More information is in the powerbot thread");
- //---- textField1 ----
- textField1.setText("http://www.powerbot.org/community/topic/438062-multiminer-mines-at-many-mining-spots-fast-flawless-always-banks/#entry5662592");
- //---- label11 ----
- label11.setText("Copy and paste this in your internet browser to see the powerbot thread");
- GroupLayout panel3Layout = new GroupLayout(panel3);
- panel3.setLayout(panel3Layout);
- panel3Layout.setHorizontalGroup(
- panel3Layout.createParallelGroup()
- .addGroup(panel3Layout.createSequentialGroup()
- .addGroup(panel3Layout.createParallelGroup()
- .addGroup(panel3Layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(label10))
- .addGroup(panel3Layout.createSequentialGroup()
- .addGap(75, 75, 75)
- .addGroup(panel3Layout.createParallelGroup()
- .addComponent(label11)
- .addComponent(textField1, GroupLayout.PREFERRED_SIZE, 294, GroupLayout.PREFERRED_SIZE))))
- .addContainerGap(11, Short.MAX_VALUE))
- );
- panel3Layout.setVerticalGroup(
- panel3Layout.createParallelGroup()
- .addGroup(panel3Layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(label10)
- .addGap(41, 41, 41)
- .addComponent(label11)
- .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(textField1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
- .addContainerGap(194, Short.MAX_VALUE))
- );
- }
- tabbedPane3.addTab("Info", panel3);
- }
- GroupLayout contentPaneLayout = new GroupLayout(contentPane);
- contentPane.setLayout(contentPaneLayout);
- contentPaneLayout.setHorizontalGroup(
- contentPaneLayout.createParallelGroup()
- .addComponent(tabbedPane3, GroupLayout.DEFAULT_SIZE, 442, Short.MAX_VALUE)
- );
- contentPaneLayout.setVerticalGroup(
- contentPaneLayout.createParallelGroup()
- .addGroup(contentPaneLayout.createSequentialGroup()
- .addComponent(tabbedPane3, GroupLayout.PREFERRED_SIZE, 328, GroupLayout.PREFERRED_SIZE)
- .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- pack();
- setLocationRelativeTo(getOwner());
- // JFormDesigner - End of component initialization //GEN-END:initComponents
- }
- // JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
- // Generated using JFormDesigner Evaluation license - Loliejap poepjes
- private JTabbedPane tabbedPane3;
- private JPanel panel2;
- private JLabel label2;
- private JLabel label3;
- private JComboBox comboBox1;
- private JLabel label4;
- private JComboBox comboBox2;
- private JLabel label5;
- private JComboBox comboBox3;
- private JLabel label6;
- private JComboBox comboBox4;
- private JLabel label7;
- private JComboBox comboBox5;
- private JLabel label8;
- private JComboBox comboBox6;
- private JLabel label9;
- private JComboBox comboBox7;
- private JButton button1;
- private JButton button2;
- private JButton button3;
- private JButton button4;
- private JButton button5;
- private JButton button6;
- private JButton button7;
- private JLabel label1;
- private JComboBox comboBox8;
- private JButton button8;
- private JPanel panel3;
- private JLabel label10;
- private JTextField textField1;
- private JLabel label11;
- // JFormDesigner - End of variables declaration //GEN-END:variables
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement