Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.rsbot.script.*;
- import org.rsbot.script.wrappers.*;
- import org.rsbot.script.methods.*;
- import java.awt.*;
- import java.awt.Graphics;
- import java.awt.image.BufferedImage;
- import java.io.IOException;
- import java.net.MalformedURLException;
- import java.net.URL;
- import javax.imageio.ImageIO;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.script.Script;
- import java.io.BufferedReader;
- import java.io.InputStreamReader;
- import java.io.PrintWriter;
- import java.util.regex.Matcher;
- import java.util.regex.Pattern;
- import org.rsbot.Configuration;
- import java.net.InetAddress;
- import java.net.InetSocketAddress;
- import java.net.Socket;
- import java.net.SocketAddress;
- @ScriptManifest(authors = {"Dew"}, keywords = {"iron", "Rimmington"}, name = "Iron Picker Uper", description = "<html><style>div{background-color:red; color:white;}</tyle><div><h3>Picks up Iron ore from powerminers in Rimmington Mines<h3></div></html>", version = 2.38, website = "http://www.dewbots.org/")
- public class ironPickUpBETA extends Script implements PaintListener {
- //<editor-fold defaultstate="collapsed" desc="Variables">
- private int ORE = 440;
- private int BANK1 = 11758;
- private int BANK = 36788;
- private int GP[] = {995};
- RSObject BANK12;
- public int invCount = 0;
- private String status = "Setting up";
- public String status$ = "";
- public String antiBanStatus = "Setting up";
- public boolean isDoingAnti = false;
- ipuAntiban antiban = new ipuAntiban();
- hopper hop = new hopper();
- private int mouseHopx;
- private int mouseHopy;
- public boolean hasStarted = false;
- public long startTime = 0;
- public long millis = 0;
- public long hours = 0;
- public long minutes = 0;
- public long seconds = 0;
- public long last = 0;
- public long noOreTime;
- public long millis2 = 0;
- public long minutes2 = 0;
- public long seconds2 = 0;
- public int oree;
- public int switches = 0;
- private int oreCollected = 0;
- public int OreCollected = 0;
- private int banked;
- private int oreHr = 0;
- private String MouseSpeed = "Unknown";
- BufferedImage normal = null;
- BufferedImage clicked = null;
- public String cursorU;//Cursor unclicked
- public String cursorC;//Cursor clicked
- //GUI Stuff
- public boolean useMsRandom = true; //use Mouse Random
- public boolean doUpdate = true; //check for updates
- public boolean wHop = true; //world hop
- private org.rsbot.script.util.Timer timer = new org.rsbot.script.util.Timer(1000 * 30 * 8); //4 mins
- private org.rsbot.script.util.Timer GUITimer = new org.rsbot.script.util.Timer(1000); //1 sec
- public int maxPastWorlds = 10, maxPing = 150, //for worldswitcher
- currentWorld = 0, newWorld = 0, hopped = 0, skillTotal = 0, wSwitches = 0;
- public int pastWorld[] = new int[maxPastWorlds];
- public boolean worldHopping = false;
- public long switchTime = 0;
- //</editor-fold>
- //<editor-fold defaultstate="collapsed" desc="Walking/Area">
- RSTile mineTile = new RSTile(2970, 3240);
- RSTile bankTile = new RSTile(3012, 3355);
- RSTile[] toBank = new RSTile[]{
- new RSTile(2969, 3239),
- new RSTile(2975, 3244),
- new RSTile(2983, 3253),
- new RSTile(2991, 3250),
- new RSTile(2996, 3246),
- new RSTile(3001, 3242),
- new RSTile(3007, 3240),
- new RSTile(3015, 3241),
- new RSTile(3021, 3241),
- new RSTile(3026, 3241),
- new RSTile(3030, 3236),
- new RSTile(3034, 3236),
- new RSTile(3038, 3236),
- new RSTile(3042, 3236),
- new RSTile(3046, 3236)} ;
- RSTile toMine[] = new RSTile[]{
- new RSTile(3046, 3236),
- new RSTile(3042, 3236),
- new RSTile(3038, 3236),
- new RSTile(3034, 3236),
- new RSTile(3030, 3236),
- new RSTile(3026, 3241),
- new RSTile(3021, 3241),
- new RSTile(3015, 3241),
- new RSTile(3007, 3240),
- new RSTile(3001, 3242),
- new RSTile(2996, 3246),
- new RSTile(2991, 3250),
- new RSTile(2983, 3253),
- new RSTile(2975, 3244),
- new RSTile(2969, 3239) };
- ;
- private boolean atBank() {
- RSArea area = new RSArea(new RSTile(3043, 3234), new RSTile(3051, 3237));
- return area.contains(getMyPlayer().getLocation());
- }
- private boolean atBank1() {
- RSArea area = new RSArea(new RSTile(3018, 3358), new RSTile(3009, 3353));
- return area.contains(getMyPlayer().getLocation());
- }
- private boolean atMine() {
- RSArea area = new RSArea(new RSTile(2974, 3244), new RSTile(2965, 3235));
- return area.contains(getMyPlayer().getLocation());
- }
- private void walkToMine() {
- if (!atMine()) {
- RSTilePath walkingMine = walking.newTilePath(toMine);
- walkingMine.randomize(random(1, 2), random(1, 2));
- walkingMine.traverse();
- antiban.antiBanCamera();
- status = "Walking to the mine...";
- sleep(random(500, 1000));
- timer.reset();
- invCount = inventory.getCount(ORE);
- }
- }
- private void walkToBank() {
- if (!atBank()) {
- RSTilePath walkingBank = walking.newTilePath(toBank);
- walkingBank.randomize(random(1, 2), random(1, 2));
- walkingBank.traverse();
- antiban.antiBanCamera();
- status = "Walking to the bank...";
- sleep(random(500, 1000));
- timer.reset();
- }
- }
- //</editor-fold>
- public void pickingUp() {
- noOres();
- if (atMine() && !inventory.isFull()) {
- RSGroundItem ore = groundItems.getNearest(ORE);
- int randNum = random(1, 10);
- if (randNum > 1) {
- if (ore != null) {
- if (ore.isOnScreen()) {
- status = "Picking up ores";
- ore.doAction("Take");
- timer.reset();
- } else {
- camera.turnTo(ore.getLocation());
- }
- } else {
- noOres();
- sleep(100, 200);
- }
- } else {
- antiban.antiBanCamera();
- }
- }
- }
- private void noOres() {
- RSGroundItem item = groundItems.getNearest(ORE);
- if (game.isLoggedIn()) {
- if (atMine()) {
- if (item == null || !item.isOnScreen() || item == null && !item.isOnScreen()) {
- status = "Waiting for ores";
- antiban.antiban();
- if (!timer.isRunning()) {
- if (wHop == true) {
- hop.worldHop(false);
- timer.setEndIn(1000 * 60 * 8);
- }
- }
- }
- }
- }
- }
- private void banking1() {
- if (atBank()) {
- RSObject depositBox = objects.getNearest(BANK);
- if (!interfaces.get(11).isValid()) {
- status = "inter 11 is not valid!";
- if (depositBox != null && depositBox.isOnScreen()) {
- status = "box is on screen.";
- if (calc.distanceTo(depositBox.getLocation()) < 2) {
- status = "We are less than two tiles away from box.";
- log("Distance is less than 2");
- depositBox.doAction("Deposit");
- status = "Opening box.";
- sleep(1200, 2000);
- } else {
- walking.walkTileOnScreen(depositBox.getLocation());
- }
- }
- }
- if (interfaces.get(11).isValid()) {
- status = "inter 11 is valid!";
- interfaces.waitFor(interfaces.get(11), false, 1000*30*2);
- if (game.getCurrentTab() != 4) {
- status = "current tab is not 4";
- log("box is valid");
- status = "clicking on comp 1 to deposit all";
- interfaces.get(11).getComponent(17).getComponent(1).doAction("Deposit-All");
- sleep(1000, 1500);
- if (bank.getBoxCount() != 28) {
- status = "count is not 28 closing bank.";
- bank.close();
- log("Box is valid");
- }
- log("Box count is 28");
- }
- }
- log("Box is not valid");
- }
- }
- private void banking() {
- if (atBank()) {
- RSObject depositBox = objects.getNearest(BANK);
- if (depositBox.isOnScreen()) {
- depositBox.doAction("Deposit");
- sleep(random(2000, 4000));
- mouse.click(349, 280, 5, 5, true);
- sleep(random(1000, 4000));
- bank.close();
- }
- }
- }
- private void lowHP() {
- combat.getHealth();
- if (combat.getHealth() < 30) {
- if (atBank()) {
- int rand = random(1, 2);
- if (rand == 1) {
- antiban.antiban();
- } else {
- antiban.antiBanCamera();
- }
- sleep(100, 200);
- }
- if (!atMine() || !atBank()) {
- walking.setRun(true);
- }
- } else if (combat.getHealth() > 29) {
- return;
- }
- }
- private void runCapable() {
- walking.getEnergy();
- if (!walking.isRunEnabled() && walking.getEnergy() >= random(60, 80)) {
- walking.setRun(true);
- }
- }
- @Override
- public boolean onStart() {
- if (!game.isFixed()) {
- onFinish();
- log("Please set game to fixed!");
- }
- startTime = System.currentTimeMillis();
- cursorU = "http://i360.photobucket.com/albums/oo47/perez048/mouseReg.png";
- cursorC = "http://i360.photobucket.com/albums/oo47/perez048/mouseClicked.png";
- ipuGUI GUI = new ipuGUI();
- GUI.setVisible(true);
- while (GUI.isVisible()) {
- GUITimer.setEndIn(1000);
- }
- if (!GUITimer.isRunning())
- log("GUITimer has stopped! We will start the script!");
- // if (doUpdate == true) {
- // if (checkForUpdates() == false) {
- // log(Color.BLUE, "Server 1 update failed, attempting server 2.");
- // checkForUpdates2();
- // }
- // }
- log("This is Beta Version 2.35-Fixed some stuff! :)");
- try {
- final URL cursorURL = new URL(cursorU);
- final URL cursor80URL = new URL(cursorC);
- normal = ImageIO.read(cursorURL);
- clicked = ImageIO.read(cursor80URL);
- } catch (MalformedURLException e) {
- log("Unable to buffer cursor.");
- } catch (IOException e) {
- log("Unable to open cursor image.");
- }
- return true;
- }
- public int loop() {
- if (!atBank() || !bank.isDepositOpen()) {
- if (invCount < inventory.getCount(ORE)) {
- oreCollected++;
- invCount = inventory.getCount(ORE);
- }
- runCapable();
- if (!atBank()) {
- noOres();
- }
- lowHP();
- }
- mouseSpeed();
- if(atBank()) {
- if (bank.getBoxCount() == 0 || inventory.getCount() < 27) {
- runCapable();
- walkToMine();
- }
- if (interfaces.get(11).isValid() && bank.getBoxCount() > 0 || inventory.getCount() >= 27) {
- banking();
- }
- }
- if (atMine()) {
- if (bank.getBoxCount() == 0 || inventory.getCount() < 27) {
- int rand = random(1, 150);
- if (rand > 3) {
- pickingUp();
- } else {
- antiban.antiBanCamera();
- }
- }
- if (bank.getBoxCount() > 0 || inventory.getCount() >= 27) {
- runCapable();
- walkToBank();
- }
- }
- if (!atBank() || !atMine()) {
- if (bank.getBoxCount() == 0 || inventory.getCount() < 27) {
- walkToMine();
- }
- if (bank.getBoxCount() > 0 || inventory.getCount() >= 27) {
- walkToBank();
- }
- }
- return random(1000,1200);
- }
- @Override
- public void onFinish() {
- env.saveScreenshot(false);
- log("Total Ores Collected: "+oreCollected+" ores.");
- if (wHop == true) {
- log("Total world Hops: "+hopped);
- }
- log("http://www.powerbot.org/vb/showthread.php?t=770408 - my script thread. :)");
- }
- //<editor-fold defaultstate="collapsed" desc="MouseStuff">
- private void mouseSpeed() {
- if (useMsRandom == true) {
- int rand = random(1, 5);
- if (rand == 1) {
- mouse.setSpeed(random(4, 7));
- }
- if (rand == 2) {
- mouse.setSpeed(random(5, 10));
- }
- if (rand == 3) {
- mouse.setSpeed(random(2, 5));
- }
- if (rand == 4) {
- mouse.setSpeed(random(2, 10));
- }
- } else {
- mouse.setSpeed(random(4, 6));
- }
- mouseSet();
- }
- private void mouseSet() {
- if (mouse.getSpeed() >= 1 && mouse.getSpeed() <= 3) {
- MouseSpeed = "Extremely fast";
- }
- if (mouse.getSpeed() >= 4 && mouse.getSpeed() <= 6) {
- MouseSpeed = "Regular";
- }
- if (mouse.getSpeed() >= 7 && mouse.getSpeed() <= 10) {
- MouseSpeed = "Slow";
- }
- }
- //</editor-fold>
- //<editor-fold defaultstate="collapsed" desc="antiban">
- public class ipuAntiban {
- private void antiban() {
- if (random(1, 2) == 1) {
- antiBan1();
- } else {
- antiBan2();
- }
- }
- private void antiBan1() {
- int randomProd = random(1, 40);
- if (randomProd >= 2 && randomProd <= 4) {
- antiBanStatus = "Pause for a few seconds...";
- sleep(1000, 2500);
- }
- if (randomProd >= 32) {
- antiBanStatus = "Moving mouse Randomly..";
- mouse.moveRandomly(100, 600);
- } else {
- sleep(10, 30);
- }
- }
- public void antiBan2() {
- int antiType = random(0, 1);
- int b = random(0, 10);
- switch (antiType) {
- case 0:
- switch (b) {
- case 1:
- if (random(0, 10) == 5) {
- antiBanStatus = "Moving mouse randomly...";
- mouse.moveSlightly();
- sleep(200, 600);
- mouse.moveRandomly(150, 350);
- }
- break;
- case 2:
- if (random(0, 13) == 2) {
- antiBanStatus = "Changing camera angle...";
- camera.setAngle(random(30, 70));
- sleep(400, 1200);
- }
- break;
- case 3:
- if (random(0, 24) == 6) {
- antiBanStatus = "Moving mouse of screen...";
- mouse.moveOffScreen();
- sleep(random(600, random(1200, 2000)));
- }
- break;
- case 5:
- if (random(0, 28) == 0 && !bank.isOpen()) {
- antiBanStatus = "Checking friends list...";
- game.openTab(9);
- sleep(random(1000, 3400));
- } else if (game.getCurrentTab() != Game.TAB_INVENTORY) {
- game.openTab(4);
- }
- default:
- break;
- }
- case 1:
- switch (random(0, 70)) {
- case 1:
- antiBanStatus = "Mouse hopping...";
- camera.setAngle(random(0, 90));
- sleep(500, 1000);
- if (random(1, 3) == 1) {
- mouseHopx = random(0, 760);
- mouseHopy = random(0, 500);
- mouse.hop(mouseHopx, mouseHopy);
- }
- break;
- case 2:
- antiBanStatus = "Mouse hopping...";
- camera.setAngle(random(90, 180));
- sleep(500, 1000);
- if (random(1, 3) == 1) {
- mouseHopx = random(0, 760);
- mouseHopy = random(0, 500);
- mouse.hop(mouseHopx, mouseHopy);
- }
- break;
- case 3:
- antiBanStatus = "Mouse hopping...";
- mouse.moveSlightly();
- camera.setAngle(random(90, 180));
- if (random(1, 3) == 1) {
- mouseHopx = random(0, 760);
- mouseHopy = random(0, 500);
- mouse.hop(mouseHopx, mouseHopy);
- }
- break;
- case 4:
- antiBanStatus = "Mouse hopping...";
- if (random(1, 3) == 1) {
- mouseHopx = random(0, 760);
- mouseHopy = random(0, 500);
- mouse.hop(mouseHopx, mouseHopy);
- } else {
- antiBanStatus = "Mouse hopping...";
- if (random(1, 3) == 1) {
- mouseHopx = random(0, 760);
- mouseHopy = random(0, 500);
- mouse.hop(mouseHopx, mouseHopy);
- }
- }
- break;
- case 5:
- antiBanStatus = "Mouse hopping...";
- camera.setAngle(random(180, 360));
- sleep(500, 1000);
- if (random(1, 3) == 1) {
- mouseHopx = random(0, 760);
- mouseHopy = random(0, 500);
- mouse.hop(mouseHopx, mouseHopy);
- }
- break;
- }
- }
- }
- public void antiBanCamera() {
- isDoingAnti = true;
- int rand = random(1, 30);
- if (rand >= 1 && rand <= 3) {
- antiBanStatus = "randomizing Camera Movement...";
- camera.moveRandomly(random(2000, 5500));
- isDoingAnti = false;
- }
- if (rand >= 4 && rand <= 5) {
- antiBanStatus = "randomizing Camera Angle...";
- camera.setAngle(random(10, 100));
- isDoingAnti = false;
- }
- if (rand == 6) {
- antiBanStatus = "randomizing Camera Pitch...";
- camera.setPitch(random(40, 68));
- isDoingAnti = false;
- }
- if (rand == 7) {
- antiBanStatus = "randomizing Camera Pitch...";
- camera.setPitch(random(20, 45));
- isDoingAnti = false;
- }
- if (rand == 8) {
- antiBanStatus = "randomizing Camera Pitch...";
- camera.setPitch(random(68, 90));
- isDoingAnti = false;
- }
- if (rand >= 9) {
- isDoingAnti = false;
- }
- }
- }
- //</editor-fold>
- //<editor-fold defaultstate="collapsed" desc="GUI">
- public class ipuGUI extends javax.swing.JFrame {
- private static final long serialVersionUID = 1L;
- public ipuGUI() {
- initComponents();
- }
- private void initComponents() {
- jPanel1 = new javax.swing.JPanel();
- jLabel1 = new javax.swing.JLabel();
- switcher = new javax.swing.JCheckBox();
- update = new javax.swing.JCheckBox();
- jLabel2 = new javax.swing.JLabel();
- start = new javax.swing.JButton();
- jLabel5 = new javax.swing.JLabel();
- switcher1 = new javax.swing.JCheckBox();
- jLabel3 = new javax.swing.JLabel();
- jLabel4 = new javax.swing.JLabel();
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("Iron Picker Uper GUI");
- setAlwaysOnTop(true);
- setResizable(false);
- setVisible(true);
- jPanel1.setBackground(new java.awt.Color(177, 158, 58));
- jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
- jLabel1.setForeground(new java.awt.Color(96, 71, 8));
- jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
- jLabel1.setText("Iron Picker Uper Settings");
- switcher.setBackground(new java.awt.Color(177, 158, 58));
- switcher.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
- switcher.setForeground(new java.awt.Color(96, 71, 8));
- switcher.setText("Don't use World Switcher?");
- switcher.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- W_H_ActionPreformed(evt);
- }
- });
- update.setVisible(false);
- update.setBackground(new java.awt.Color(177, 158, 58));
- update.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
- update.setForeground(new java.awt.Color(96, 71, 8));
- update.setText("Don't check for Updates");
- update.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- updaterActionPreformed(evt);
- }
- });
- jLabel2.setForeground(new java.awt.Color(96, 71, 8));
- jLabel2.setText("If unchecked, this will not check for updates");
- start.setBackground(new java.awt.Color(177, 158, 58));
- start.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
- start.setForeground(new java.awt.Color(96, 71, 8));
- start.setText("Start Script");
- start.setCursor(new java.awt.Cursor(java.awt.Cursor.CROSSHAIR_CURSOR));
- start.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- startScriptActionPerformed(evt);
- }
- });
- jLabel5.setForeground(new java.awt.Color(96, 71, 8));
- jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
- jLabel5.setText("Script Written by Dew/Deww1(Powerbot)");
- jLabel5.setEnabled(false);
- switcher1.setVisible(false);
- switcher1.setBackground(new java.awt.Color(177, 158, 58));
- switcher1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
- switcher1.setForeground(new java.awt.Color(96, 71, 8));
- switcher1.setText("Don't use Mouse Speed Randomizer?");
- switcher1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- useMsActionPerformed(evt);
- }
- });
- jLabel3.setForeground(new java.awt.Color(96, 71, 8));
- jLabel3.setText("If no ores are available it will switch worlds");
- jLabel4.setVisible(false);
- jLabel4.setForeground(new java.awt.Color(96, 71, 8));
- jLabel4.setText("This will randomize speeds every second");
- javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
- jPanel1Layout.setHorizontalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 458, Short.MAX_VALUE).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addContainerGap(57, Short.MAX_VALUE).addComponent(start, javax.swing.GroupLayout.PREFERRED_SIZE, 321, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(80, 80, 80)).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(update).addContainerGap(237, Short.MAX_VALUE)).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(switcher).addContainerGap(265, Short.MAX_VALUE)).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addContainerGap(190, Short.MAX_VALUE).addComponent(jLabel2).addContainerGap()).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addContainerGap(165, Short.MAX_VALUE).addComponent(jLabel3).addGap(89, 89, 89)).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 438, Short.MAX_VALUE).addContainerGap()).addGroup(jPanel1Layout.createSequentialGroup().addGap(168, 168, 168).addComponent(jLabel4).addContainerGap(97, Short.MAX_VALUE)).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(switcher1).addContainerGap(179, Short.MAX_VALUE)));
- jPanel1Layout.setVerticalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jLabel1).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(update).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel2).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(switcher).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel3).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(switcher1).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel4).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE).addComponent(start, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap()));
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
- pack();
- }
- private void useMsActionPerformed(java.awt.event.ActionEvent evt) {
- if (switcher.isSelected()) {
- useMsRandom = false; //random mouse speed
- log(Color.GREEN, "We will NOT be using Random Mouse Speeds!");
- } else {
- useMsRandom = true; //no random mouse speed
- log(Color.YELLOW, "We will be using Random Mouse Speeds!");
- }
- }
- private void updaterActionPreformed(java.awt.event.ActionEvent evt) {
- if (update.isSelected()) {
- doUpdate = false; //Don't check
- log(Color.YELLOW, "We will NOT be checking for updates!");
- } else {
- doUpdate = true; //Do check
- log(Color.green, "We will be checking for updates!");
- }
- }
- private void W_H_ActionPreformed(java.awt.event.ActionEvent evt) {
- if (switcher.isSelected()) {
- wHop = false; //world hop
- log(Color.GREEN, "We will NOT be world hopping!");
- } else {
- wHop = true; //don't world hop
- log(Color.YELLOW, "We will be world hopping!");
- }
- }
- private void startScriptActionPerformed(java.awt.event.ActionEvent evt) {
- setVisible(false);
- dispose();
- }
- // Variables declaration - do not modify
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JLabel jLabel3;
- private javax.swing.JLabel jLabel4;
- private javax.swing.JLabel jLabel5;
- private javax.swing.JPanel jPanel1;
- private javax.swing.JButton start;
- private javax.swing.JCheckBox switcher;
- private javax.swing.JCheckBox switcher1;
- private javax.swing.JCheckBox update;
- // End of variables declaration
- }//</editor-fold>
- //<editor-fold defaultstate="collapsed" desc="Updater">
- // private static final String UPDATER_FILE_NAME = "ironPickUp.java";
- // private static final String UPDATER_URL1 = "";
- // private static final String UPDATER_URL = "";
- // private static final Pattern UPDATER_VERSION_PATTERN = Pattern.compile("version\\s*=\\s*([0-9.]+)");
- //
- //
- // private boolean checkForUpdates() {
- // try {
- // /* Get the current version from the Script Manifest annotation defined at the top of your script's class */
- // double currentVer = ironPickUp.class.getAnnotation(ScriptManifest.class).version();
- // double newVer = -1;
- // URL url = new URL(UPDATER_URL);
- // /* Open a stream to the newest script file hosted on your server */
- // BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
- // String line, lines = "";
- // Matcher m;
- // /* Look for the "version = x.x" string in the newer file to figure out the newest version number */
- // while ((line = in.readLine()) != null) {
- // lines += line + "\n";
- // if ((m = UPDATER_VERSION_PATTERN.matcher(line)).find()) {
- // newVer = Double.parseDouble(m.group(1));
- // break;
- // }
- // }
- // /* Check if the updater was unable to read the newest version number */
- // if (newVer < 0) {
- // in.close();
- // log("Unable to find the new version number. Update failed");
- // return false;
- // }
- // /* Compare the current version to the newest. */
- // if (currentVer == newVer) {
- // in.close();
- // log("You already have the latest version of the script.");
- // return true;
- // }
- // /* The current version is less than the newest version, so we need to download it */
- // log("Update found! Downloading version " + newVer);
- // /* Figure out where to save the file */
- // String scriptFilePath = Configuration.Paths.getScriptsSourcesDirectory() + "\\" + UPDATER_FILE_NAME;
- // PrintWriter out = new PrintWriter(scriptFilePath);
- // /* Print the cached lines from the version checking */
- // out.print(lines);
- // /* Print the rest of the file */
- // while ((line = in.readLine()) != null) {
- // out.println(line);
- // }
- // /* Close the streams */
- // out.close();
- // in.close();
- // log("Successfully saved " + UPDATER_FILE_NAME + " to " + Configuration.Paths.getScriptsSourcesDirectory());
- // log("Compiling...");
- // try {
- // /* Attempt to compile the downloaded version */
- // Runtime.getRuntime().exec(new String[]{
- // "javac",
- // "-classpath",
- // "RSBot.jar",
- // scriptFilePath
- // });
- // } catch (Exception ex) {
- // log("Could not compile the script. Please manually compile to finish the update.");
- // return true;
- // }
- // log(Color.orange, "Update successful!");
- // log(Color.green, "The new version will appear near the bottom of the script selector.");
- // log(Color.red, "Stop and restart the script to run the newer version.");
- // return true;
- // } catch (IOException e) {
- // log(e.toString());
- // log("Update failed.");
- // }
- // return false;
- // }
- //
- // private boolean checkForUpdates2() {
- // try {
- // /* Get the current version from the Script Manifest annotation defined at the top of your script's class */
- // double currentVer = ironPickUp.class.getAnnotation(ScriptManifest.class).version();
- // double newVer = -1;
- // URL url = new URL(UPDATER_URL1);
- // /* Open a stream to the newest script file hosted on your server */
- // BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
- // String line, lines = "";
- // Matcher m;
- // /* Look for the "version = x.x" string in the newer file to figure out the newest version number */
- // while ((line = in.readLine()) != null) {
- // lines += line + "\n";
- // if ((m = UPDATER_VERSION_PATTERN.matcher(line)).find()) {
- // newVer = Double.parseDouble(m.group(1));
- // break;
- // }
- // }
- // /* Check if the updater was unable to read the newest version number */
- // if (newVer < 0) {
- // in.close();
- // log("Unable to find the new version number. Update failed");
- // return false;
- // }
- // /* Compare the current version to the newest. */
- // if (currentVer == newVer) {
- // in.close();
- // log("You already have the latest version of the script.");
- // return false;
- // }
- // /* The current version is less than the newest version, so we need to download it */
- // log("Update found! Downloading version " + newVer);
- // /* Figure out where to save the file */
- // String scriptFilePath = Configuration.Paths.getScriptsSourcesDirectory() + "\\" + UPDATER_FILE_NAME;
- // PrintWriter out = new PrintWriter(scriptFilePath);
- // /* Print the cached lines from the version checking */
- // out.print(lines);
- // /* Print the rest of the file */
- // while ((line = in.readLine()) != null) {
- // out.println(line);
- // }
- // /* Close the streams */
- // out.close();
- // in.close();
- // log("Successfully saved " + UPDATER_FILE_NAME + " to " + Configuration.Paths.getScriptsSourcesDirectory());
- // log("Compiling...");
- // try {
- // /* Attempt to compile the downloaded version */
- // Runtime.getRuntime().exec(new String[]{
- // "javac",
- // "-classpath",
- // "RSBot.jar",
- // scriptFilePath
- // });
- // } catch (Exception ex) {
- // log("Could not compile the script. Please manually compile to finish the update.");
- // return false;
- // }
- // log(Color.orange, "Update successful!");
- // log(Color.green, "The new version will appear near the bottom of the script selector.");
- // log(Color.red, "Stop and restart the script to run the newer version.");
- // return true;
- // } catch (IOException e) {
- // log(e.toString());
- // log("Update failed.");
- // }
- // return false;
- // }
- //</editor-fold>
- //<editor-fold defaultstate="collapsed" desc="world hopper">
- public class hopper {
- public void worldHop(boolean members) {
- worldHop(members, 150, 1000);
- }
- public void worldHop(boolean members, int maxping) {
- worldHop(members, maxping, 1000);
- }
- public void worldHop(boolean members, int maxping, int maxpop) {
- final int LOBBY_PARENT = 906;
- final int WORLD_SELECT_TAB_PARENT = 910;
- final int WORLD_SELECT_COM = 77;
- final int WORLD_NUMBER_COM = 69;
- final int WORLD_POPULATION_COM = 71;
- final int WORLD_TYPE_COM = 74;
- final int WORLD_SELECT_BUTTON_COM = 188;
- final int WORLD_SELECT_BUTTON_BG_COM = 12;
- final int WORLD_SELECT_TAB_ACTIVE = 4671;
- final int WORLD_FULL_BACK_BUTTON_COM = 233;
- final int CURRENT_WORLD_COM = 11;
- final int SORT_POPULATION_BUTTON_PARENT = 30;
- final int SORT_PING_BUTTON_PARENT = 45;
- final int SORT_LOOTSHARE_BUTTON_PARENT = 47;
- final int SORT_TYPE_BUTTON_PARENT = 49;
- final int SORT_ACTIVITY_BUTTON_PARENT = 52;
- final int SORT_WORLD_BUTTON_PARENT = 55;
- final int SCROLL_BAR_PARENT = 86;
- final int HIGH_RISK_WARN_PARENT = 93;
- final int PLAY_BUTTON_COM = 171;
- final int RETURN_TEXT_COM = 221;
- final int SUBSCRIBE_BACK_BUTTON_COM = 233;
- final int CONNECT_ERROR_BACK_BUTTON_COM = 42;
- final int SKILL_WORLD_BACK_BUTTON_COM = 228;
- final int SKILL_WORLD_NUMBER = 113;
- long whileTimer = 0;
- log("Hopping worlds");
- status$ = "Hopping worlds";
- // logout
- while (game.isLoggedIn()) {
- if (game.logout(true)) {
- sleep(1000, 1500);
- while (game.getClientState() != 7) {
- sleep(random(200, 500));
- }
- }
- }
- status$ = "Selecting new world";
- sleep(random(1500, 2000));
- // click world select tab (if needed)
- RSComponent worldSelectTab = interfaces.getComponent(LOBBY_PARENT,
- WORLD_SELECT_BUTTON_BG_COM);
- whileTimer = System.currentTimeMillis();
- while (worldSelectTab.getBackgroundColor() != WORLD_SELECT_TAB_ACTIVE
- && System.currentTimeMillis() - whileTimer < 90000) {
- if (interfaces.get(LOBBY_PARENT).getComponent(WORLD_SELECT_BUTTON_BG_COM).doClick()) {
- //interfaces.getComponent(LOBBY_PARENT, WORLD_SELECT_BUTTON_BG_COM).doClick();
- sleep(random(1500, 2000));
- }
- }
- // get current world
- String cW = interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- CURRENT_WORLD_COM).getText();
- String[] cWS = cW.split(" ");
- currentWorld = Integer.parseInt(cWS[1]);
- newWorld = currentWorld;
- // randomly sort worlds
- if (random(0, 10) < 5) {
- RSComponent com = null;
- switch (random(0, 6)) {
- case 0: // population
- com = interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- SORT_POPULATION_BUTTON_PARENT).getComponent(
- random(0, 2));
- break;
- case 1: // ping
- com = interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- SORT_PING_BUTTON_PARENT).getComponent(random(0, 2));
- break;
- case 2: // loot share
- com = interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- SORT_LOOTSHARE_BUTTON_PARENT).getComponent(random(0, 2));
- break;
- case 3: // type
- com = interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- SORT_TYPE_BUTTON_PARENT).getComponent(random(0, 2));
- break;
- case 4: // activity
- com = interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- SORT_ACTIVITY_BUTTON_PARENT).getComponent(random(0, 2));
- break;
- case 5: // world
- com = interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- SORT_WORLD_BUTTON_PARENT).getComponent(random(0, 2));
- break;
- }
- if (com.doClick()) {
- sleep(random(1250, 1500));
- }
- }
- // check if we should sort by ptp/ftp
- boolean sort = false;
- RSComponent[] wt = interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- WORLD_TYPE_COM).getComponents();
- for (int i = 0; i < 10; i++) {
- if ((members && !wt[i].getText().contains("Members"))
- || (!members && wt[i].getText().contains("Members"))) {
- sort = true;
- break;
- }
- }
- // sort by ptp/ftp (if needed)
- if (sort) {
- status$ = "Sorting worlds by type";
- if (interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- SORT_TYPE_BUTTON_PARENT).getComponent(members ? 0 : 1).doClick()) {
- sleep(random(1000, 1500));
- }
- }
- /*-PICK-NEXT-WORLD-*/
- whileTimer = System.currentTimeMillis();
- while (currentWorld == newWorld
- && System.currentTimeMillis() - whileTimer < 90000) {
- RSComponent worldToHop = null;
- RSComponent[] comWorldNumber = interfaces.getComponent(
- WORLD_SELECT_TAB_PARENT, WORLD_NUMBER_COM).getComponents();
- int world = 0;
- int pop = 2000;
- int ping = -1;
- boolean member = false;
- while (worldToHop == null) {
- for (int i = 0; i < comWorldNumber.length - 1; i++) {
- RSComponent[] comWorldSelect = interfaces.getComponent(
- WORLD_SELECT_TAB_PARENT, WORLD_SELECT_COM).getComponents();
- RSComponent[] comWorldPopulation = interfaces.getComponent(
- WORLD_SELECT_TAB_PARENT, WORLD_POPULATION_COM).getComponents();
- RSComponent[] comWorldType = interfaces.getComponent(
- WORLD_SELECT_TAB_PARENT, WORLD_TYPE_COM).getComponents();
- comWorldNumber = interfaces.getComponent(
- WORLD_SELECT_TAB_PARENT, WORLD_NUMBER_COM).getComponents();
- try {
- world = Integer.parseInt(comWorldNumber[i].getText());
- } catch (NumberFormatException nfe) {
- world = 0;
- } catch (ArrayIndexOutOfBoundsException aie) {
- world = 0;
- }
- if (world == SKILL_WORLD_NUMBER && skillTotal < 1000) {
- world = 0;
- }
- try {
- pop = Integer.parseInt(comWorldPopulation[i].getText());
- } catch (NumberFormatException nfe) {
- pop = 2000;
- } catch (ArrayIndexOutOfBoundsException aie) {
- pop = 2000;
- }
- try {
- if (comWorldType[i].getText().contains("Members")) {
- member = true;
- }
- } catch (ArrayIndexOutOfBoundsException aie) {
- }
- if (world != 0 && !isPastWorld(world)
- && world != currentWorld && pop < maxpop && pop > 0
- && member == members) {
- ping = pingHost("world" + world + ".runescape.com",
- maxPing + 50);
- } else {
- ping = -1;
- }
- if (ping < maxping && ping > 0) {
- log("World " + world + " selected.");
- worldToHop = comWorldSelect[i];
- }
- if (worldToHop != null) {
- break;
- }
- }
- sleep(random(50, 150));
- }
- if (worldToHop != null) {
- int w = -1;
- String[] split = interfaces.getComponent(910, 8).getText().split(" ");
- try {
- w = Integer.parseInt(split[split.length - 1]);
- } catch (Exception e) {
- w = -1;
- }
- // click new world
- while (w != world) {
- if (worldToHop.getLocation().y <= 280
- && worldToHop.getLocation().y >= 0) {
- status$ = "Clicking new world";
- worldToHop.doClick();
- } else {
- RSComponent scrollBar = interfaces.getComponent(
- WORLD_SELECT_TAB_PARENT, SCROLL_BAR_PARENT);
- status$ = "Scrolling to new world";
- if (interfaces.scrollTo(worldToHop, scrollBar)) {
- status$ = "Clicking new world";
- worldToHop.doClick();
- }
- }
- split = interfaces.getComponent(910, 8).getText().split(" ");
- try {
- w = Integer.parseInt(split[split.length - 1]);
- } catch (Exception e) {
- w = -1;
- }
- }
- // get new world
- sleep(random(1000, 1500));
- String cW2 = interfaces.getComponent(WORLD_SELECT_TAB_PARENT,
- CURRENT_WORLD_COM).getText();
- String[] cWS2 = cW2.split(" ");
- newWorld = Integer.parseInt(cWS2[1]);
- }
- }
- /*-END-PICK-NEXT-WORLD-*/
- // set last & current world/s
- if (currentWorld != newWorld) {
- for (int i = 0; i < pastWorld.length; i++) {
- if (i < pastWorld.length - 1) {
- pastWorld[i] = pastWorld[i + 1];
- } else {
- pastWorld[i] = currentWorld;
- }
- }
- currentWorld = newWorld;
- }
- while (game.getClientState() != 10) {
- status$ = "Logging in...";
- // click play button
- if (interfaces.getComponent(LOBBY_PARENT, PLAY_BUTTON_COM).doClick()) {
- hopped++;
- timer.reset();
- }
- // check for high risk world warning during login
- long timeOut = System.currentTimeMillis() + 35000;
- while (game.getClientState() != 10
- && System.currentTimeMillis() < timeOut) {
- RSComponent hrParent = interfaces.getComponent(LOBBY_PARENT,
- HIGH_RISK_WARN_PARENT);
- if (hrParent.isValid()) {
- RSComponent LogIn = hrParent.getComponent(random(0,
- hrParent.getComponents().length));
- if (LogIn != null && LogIn.isValid()) {
- if (mouse.getLocation().getX() < 386
- || mouse.getLocation().getX() > 504
- || mouse.getLocation().getY() < 357
- || mouse.getLocation().getY() > 386) {
- if (LogIn.doHover()) {
- sleep(random(250, 500));
- if (menu.contains("Log In")) {
- // accept warning / click login
- mouse.click(true);
- log.warning("This is a high risk wilderness world.");
- sleep(random(250, 500));
- }
- }
- }
- }
- }
- sleep(100);
- }
- // check for login errors
- String returnText = interfaces.getComponent(LOBBY_PARENT, RETURN_TEXT_COM).getText().toLowerCase();
- if (!game.isLoggedIn()) {
- if (returnText.contains("update")) {
- status$ = "Stopping script";
- log("Runescape has been updated, please reload RSBot.");
- stopScript(false);
- }
- if (returnText.contains("disable")) {
- status$ = "Stopping script";
- log("Your account is banned/disabled.");
- stopScript(false);
- }
- if (returnText.contains("error connecting")) {
- status$ = "Stopping script";
- log("STOPPED = line 1045 - error connecting");
- interfaces.getComponent(LOBBY_PARENT,
- CONNECT_ERROR_BACK_BUTTON_COM).doClick();
- stopScript(false);
- }
- if (returnText.contains("full")) {
- log("World Is Full.");
- interfaces.getComponent(LOBBY_PARENT,
- WORLD_FULL_BACK_BUTTON_COM).doClick();
- sleep(random(1000, 1500));
- worldHop(members, maxping, maxpop); // try again
- }
- if (returnText.contains("subscribe")) {
- interfaces.getComponent(LOBBY_PARENT,
- SUBSCRIBE_BACK_BUTTON_COM).doClick();
- if (members) {
- status$ = "Stopping script";
- log("You neen to be a member to select this world.");
- stopScript(false);
- } else {
- sleep(random(500, 1000));
- worldHop(members, maxping, maxpop); // try again
- }
- }
- if (returnText.contains("must have a total")) {
- log("STOPPED = line 1069 - must have a total");
- interfaces.getComponent(LOBBY_PARENT,
- SKILL_WORLD_BACK_BUTTON_COM).doClick();
- sleep(random(500, 1000));
- worldHop(members, maxping, maxpop); // try again
- }
- }
- }
- }
- private boolean isPastWorld(int world) {
- for (int i = 0; i < pastWorld.length; i++) {
- if (pastWorld[i] == world) {
- return true;
- }
- }
- return false;
- }
- private int pingHost(String host, int timeout) {
- long start = -1;
- long end = -1;
- int total = -1;
- int defaultPort = 80;
- Socket theSock = new Socket();
- try {
- InetAddress addr = InetAddress.getByName(host);
- SocketAddress sockaddr = new InetSocketAddress(addr, defaultPort);
- start = System.currentTimeMillis();
- theSock.connect(sockaddr, timeout);
- end = System.currentTimeMillis();
- } catch (Exception e) {
- start = -1;
- end = -1;
- } finally {
- if (theSock != null) {
- try {
- theSock.close();
- } catch (IOException e) {
- }
- if ((start != -1) && (end != -1)) {
- total = (int) (end - start);
- log(host + "'s ping delay is " + total + "ms.");
- } else {
- log("Connection timed out or unable to connect to host: "
- + host);
- }
- }
- }
- return total; // returns -1 if timeout
- }
- }
- //</editor-fold>
- //<editor-fold defaultstate="collapsed" desc="Paint Stuff">
- //START: Code generated using Enfilade's Easel
- private Image getImage(String url) {
- try {
- return ImageIO.read(new URL(url));
- } catch(IOException e) {
- return null;
- }
- }
- private final Color color1 = new Color(0, 0, 0);
- private final Color color2 = new Color(240, 240, 240);
- private final Font font1 = new Font("Times New Roman", 0, 10);
- private final Font font2 = new Font("Times New Roman", 0, 12);
- private final Image img1 = getImage("http://i360.photobucket.com/albums/oo47/perez048/paint-2.png");
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D)g1;
- if (normal != null) {
- final int mouse_x = mouse.getLocation().x;
- final int mouse_y = mouse.getLocation().y;
- final int mouse_x2 = mouse.getPressLocation().x;
- final int mouse_y2 = mouse.getPressLocation().y;
- final long mpt = System.currentTimeMillis()
- - mouse.getPressTime();
- if (mouse.getPressTime() == -1 || mpt >= 1000) {
- g.drawImage(normal, mouse_x - 8, mouse_y - 8, null); //this show the mouse when its not clicked
- }
- if (mpt < 1000) {
- g.drawImage(clicked, mouse_x2 - 8, mouse_y2 - 8, null); //this show the four squares where you clicked.
- g.drawImage(normal, mouse_x - 8, mouse_y - 8, null); //this show the mouse as normal when its/just clicked
- }
- }
- if (game.isLoggedIn()) {
- oreHr = (int) ((oreCollected) * 3600000D / (System.currentTimeMillis() - startTime));
- millis = System.currentTimeMillis() - startTime;
- hours = millis / (1000 * 60 * 60);
- millis -= hours * (1000 * 60 * 60);
- minutes = millis / (1000 * 60);
- millis -= minutes * (1000 * 60);
- seconds = millis / 1000;
- millis2 = timer.getRemaining() - 60;
- seconds2 = millis2 / 1000;
- g.drawImage(img1, -2, 310, null);
- g.setFont(font1);
- g.setColor(color1);
- g.drawString("Ores/hr: "+ oreHr, 263, 443);
- g.drawString("Ores Collected: " + oreCollected, 263, 428);
- g.drawString("Run Time: " + hours + ":" + minutes + ":" + seconds, 263, 413);
- g.setColor(color2);
- g.drawString("Version: " + ironPickUpBETA.class.getAnnotation(ScriptManifest.class).version(), 91, 385);
- g.setFont(font2);
- g.drawString("Status: "+ status, 78, 473);
- g.setFont(font1);
- g.setColor(color1);
- g.drawString("Mouse Speed: "+ MouseSpeed, 16, 416);
- g.drawString("World Hops: " + hopped, 16, 431);
- g.drawString("Seconds to Switch: "+seconds2, 16, 446);
- } else {
- String s = "Status: " + status$
- + " || Times hopped: " + hopped;
- g.setColor(color1);
- g.fillRoundRect(240, 104, s.length() * 6, 17, 16, 16);
- g.setFont(new Font("Arial", 1, 12));
- g.setColor(color2);
- g.drawString(s, 250, 117);
- }
- }
- //END: Code generated using Enfilade's Easel
- //</editor-fold>
- //<editor-fold defaultstate="collapsed" desc="backup stuff">
- // public int bankOpen() {
- // if (atBank() && players.getMyPlayer().isIdle()) {
- // status = "Opening Bank.";
- // RSObject bankBooth = objects.getNearest(BANK);
- // if (random(1, 4) > 1) {
- // bankBooth.doAction("Use-quickly");
- // } else {
- // antiban.antiban();
- // }
- // }
- // return random(800, 1300);
- // }
- //
- // public int depositBank() {
- // status = "Depositing ores";
- // bank.depositAll();
- // return random(300, 1100);
- // }
- //
- // public int bankClose() {
- // if (bank.isOpen()) {
- // status = "Closing Bank.";
- // bank.close();
- // sleep(random(200, 1000));
- // }
- // return random(300, 800);
- // }
- //
- // public void banking() {
- // if (!bank.isOpen()) {
- // bankOpen();
- // antiban.antiban();
- // }
- // if (bank.isOpen()) {
- // depositBank();
- // antiban.antiban();
- // sleep(random(100, 500));
- // banked++;
- // }
- //
- // timer.reset();
- // }
- // RSTile toBank1[] = new RSTile[]{new RSTile(2970, 3239), new RSTile(2973, 3244),
- // new RSTile(2975, 3248), new RSTile(2976, 3253),
- // new RSTile(2978, 3258), new RSTile(2978, 3263),
- // new RSTile(2978, 3268), new RSTile(2980, 3273),
- // new RSTile(2986, 3277), new RSTile(2989, 3282),
- // new RSTile(2992, 3287), new RSTile(2997, 3292),
- // new RSTile(3001, 3296), new RSTile(3002, 3301),
- // new RSTile(3006, 3306), new RSTile(3006, 3312),
- // new RSTile(3006, 3316), new RSTile(3006, 3321),
- // new RSTile(3006, 3326), new RSTile(3006, 3331),
- // new RSTile(3006, 3336), new RSTile(3006, 3341),
- // new RSTile(3006, 3347), new RSTile(3008, 3352),
- // new RSTile(3008, 3357), new RSTile(3011, 3357),
- // new RSTile(3012, 3355)};
- // RSTile toMine1[] = new RSTile[]{new RSTile(3012, 3355), new RSTile(3011, 3359),
- // new RSTile(3008, 3359), new RSTile(3008, 3355),
- // new RSTile(3008, 3351), new RSTile(3008, 3346),
- // new RSTile(3008, 3341), new RSTile(3008, 3336),
- // new RSTile(3008, 3331), new RSTile(3007, 3326),
- // new RSTile(3007, 3321), new RSTile(3007, 3316),
- // new RSTile(3007, 3311), new RSTile(3002, 3305),
- // new RSTile(2997, 3300), new RSTile(2996, 3296),
- // new RSTile(2994, 3291), new RSTile(2994, 3286),
- // new RSTile(2994, 3281), new RSTile(2995, 3275),
- // new RSTile(2992, 3270), new RSTile(2988, 3266),
- // new RSTile(2983, 3262), new RSTile(2981, 3257),
- // new RSTile(2978, 3252), new RSTile(2973, 3248),
- // new RSTile(2971, 3244), new RSTile(2970, 3240)};
- //</editor-fold>
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement