Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.BasicStroke;
- import java.awt.Color;
- import java.awt.Container;
- import java.awt.Dimension;
- import java.awt.Font;
- import java.awt.Graphics;
- import java.awt.Graphics2D;
- import java.awt.Image;
- import java.awt.Insets;
- import java.awt.Point;
- import java.awt.Rectangle;
- import java.awt.event.ActionEvent;
- import java.awt.event.ActionListener;
- import java.io.BufferedReader;
- import java.io.IOException;
- import java.io.InputStreamReader;
- import java.net.URL;
- import java.net.URL;
- import java.net.MalformedURLException;
- import javax.imageio.ImageIO;
- import javax.swing.DefaultComboBoxModel;
- import javax.swing.GroupLayout;
- import javax.swing.ImageIcon;
- import javax.swing.JButton;
- import javax.swing.JComboBox;
- import javax.swing.JFrame;
- import javax.swing.JLabel;
- import javax.swing.JLayeredPane;
- import javax.swing.LayoutStyle;
- import javax.swing.SwingUtilities;
- 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.Calculations;
- import org.rsbot.script.methods.Camera;
- import org.rsbot.script.methods.Game;
- import org.rsbot.script.methods.GrandExchange;
- import org.rsbot.script.methods.GroundItems;
- import org.rsbot.script.methods.Players;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.wrappers.RSGroundItem;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSPath;
- import org.rsbot.script.wrappers.RSTile;
- import org.rsbot.script.wrappers.RSWeb;
- @ScriptManifest(authors = "PopGlass2", name = "AIO BankChopper", version = 1.83, description = "Cuts Logs and Banks")
- public class Woodcutter extends Script implements PaintListener,MessageListener {
- private boolean Varrock;
- private boolean NorthFalador;
- private boolean Draynor, guiWait = true;
- private boolean SouthFalador;
- private boolean TowerMagic;
- private boolean SeersMagic;
- private boolean CatherbayYew;
- private boolean BehindMaple;
- private boolean ResourceMaple;
- private boolean ChurchYew;
- private boolean Ivy;
- private boolean EastIvy;
- private boolean FallNorthIvy;
- private boolean FallSouthIvy;
- private boolean GEYew;
- private boolean GETree;
- private boolean DraynorWillow;
- private boolean DraynorTree;
- private boolean SouthVarrockOak;
- private boolean EdgeYew;
- private boolean GnomeMagic;
- private boolean CatherbayWillow;
- private boolean CatherbayOak;
- private boolean CandleOak;
- private static final RSTile BankTile = new RSTile(3254, 3420, 0); RSTile OakTile = new RSTile(3285, 3421, 0),DraynorBankTile = new RSTile(3093, 3245, 0),DraynorOakTile = new RSTile(3100, 3286, 0);
- private static final RSTile FaladorBankTile= new RSTile(3012, 3355, 0);
- private static final RSTile CatherbayWillowTile= new RSTile(2784, 3429, 0);
- private static final RSTile FaladorOakTile = new RSTile(3039, 3321, 0);
- private static final RSTile FaladorEastBankTile= new RSTile (2946, 3368, 0);
- private static final RSTile FaladorNorthOakTile= new RSTile (2949, 3405, 0);
- private static final int[] oakTreeID = { 38732, 38731, 1281};
- private static final RSTile CatherbayYewTile = new RSTile(2759, 3431, 0);
- private static final RSTile SeersBankTile= new RSTile (2724, 3493, 0);
- private static final RSTile SeersMaigcTile = new RSTile(2693, 3425, 0);
- private static final RSTile TowerMagicTile = new RSTile (2700, 3398, 0);
- private static final RSTile CatherbayBankTile = new RSTile(2811, 3441, 0);
- private static final RSTile MapleBehindTile = new RSTile(2728, 3500, 0);
- private static final RSTile DungBankTile = new RSTile(3449, 3720, 0);
- private static final RSTile ChurchYewTile = new RSTile(2711, 3462, 0);
- private static final RSTile EntranceTile = new RSTile(3513, 3666, 0);
- private static final RSTile GEYewTile = new RSTile(3211, 3502,0);
- private static final RSTile GEBankTile = new RSTile(3177, 3478,0);
- private static final RSTile GEIvyTile = new RSTile(3217, 3498,0);
- private static final RSTile EastIvyTile = new RSTile(3233, 3457,0);
- private static final RSTile FallNorthIvyTile = new RSTile(3014, 3392, 0);
- private static final RSTile FallSouthIvyTile = new RSTile(3048, 3328, 0);
- private static final RSTile GETreeTile = new RSTile(3139, 3435, 0);
- private static final RSTile DraynorWillowTile = new RSTile(3089, 3232, 0);
- private static final RSTile DraynorTreeTile = new RSTile(3078, 3266, 0);
- private static final RSTile SouthVarrockOakTile = new RSTile(3287, 3342, 0);
- private static final RSTile NorthVarrockBankTile = new RSTile(3186, 3441, 0);
- private static final RSTile EdgeYewTile = new RSTile(3087, 3475, 0);
- private static final RSTile EdgeBankTile = new RSTile(3094, 3491, 0);
- private static final RSTile GnomeBankTile = new RSTile (2446, 3424, 1);
- private static final RSTile GnomeMaigcTile = new RSTile(2434, 3411, 0);
- private static final RSTile GnomeStairTile = new RSTile(2443, 3414, 0);
- private static final RSTile GnomeStairTiledown = new RSTile(2445, 3416, 1);
- private static final RSTile CatherbayOakTile = new RSTile(2788, 3436, 0);
- private static final RSTile CatherbayCandleOakTile = new RSTile(2795, 3447, 0);
- int [] Nests = {5070, 5071, 5072, 5073, 5074, 5075, 5076, 7413, 11966};
- int[] ivyID = {46322, 46324, 46320, 46318};
- int[] yewTreeId = {1309, 38755};
- int[] magicTreeId= {1306};
- int[] mapleTReeID= {1307, 51843};
- int[]willowTreeId={58006, 38627, 38616, 2372, 142,139};
- int[] TreeID = {38786, 38784, 38760, 37860, 38782, 38785, 38783, 38787, 38788};
- int[] yewstumpId= {38759};
- int[] oakstumpid={38754};
- int []RING = {15707};
- int[] entrance = {52816};
- double maplexp =(100);
- double oakxp =(37.5);
- double yewxp =(175);
- double magicxp =(250);
- double ivyxp=(332.5);
- double willowxp=(67.5);
- double treexp=(25);
- int[] GnomeStairupId={1742};
- int[] GnomeStairdownId={1744};
- private long runTime;
- private long startTime;
- int expGained, startExp;
- private int logsPHR;
- private int oakLog = 1521;
- double Taken = 0;
- private int[] Hatchet = { 1349, 1351, 1353, 1355, 1357, 1359, 1361, 6739,
- 13470 };
- Tutorial g = new Tutorial();
- private double scriptVersion = Woodcutter.class.getAnnotation(ScriptManifest.class).version();
- public boolean onStart() {
- double currver = getCurrentVersion();
- if(currver > scriptVersion) {
- log(Color.RED,"The Script has been updated!");
- log("Your current version is " + scriptVersion + ". The newest version is " + currver);
- log("Update Availible At: ");
- log(Color.BLUE, "http://www.powerbot.org/community/topic/579731-aio-woodcutter-banker-with-ivy-and-birdnest-supportworks-with-27beta-and-261/"); //<- THAT IS WHERE YOUR SCRIPT'S URL GOES
- } else {
- log(Color.GREEN,"The Script Is Up To Date!");
- }
- startTime = System.currentTimeMillis();
- startExp = skills.getCurrentExp(Skills.WOODCUTTING);
- startTime = System.currentTimeMillis();
- g.setVisible(true);
- while (guiWait)
- sleep(500);
- try {
- SwingUtilities.invokeAndWait(new Runnable() {
- public void run() {
- new Tutorial();
- }
- });
- } catch (Throwable e) {
- }
- return game.isLoggedIn();
- }
- public void onFinish() {
- log("Thanks For Using");
- }
- public double getCurrentVersion() {
- try {
- BufferedReader r = new BufferedReader(new InputStreamReader(new URL("http://pastebin.com/raw.php?i=4KDGmPpu").openStream())); // DON'T FORGET TO FILL IN THE URL
- double d = Double.parseDouble(r.readLine());
- r.close();
- return d;
- } catch(Exception e) {
- log.warning("Error checking for latest version.");
- }
- return scriptVersion;
- }
- private void openBank() {
- bank.open();
- }
- private void depositYew() {
- bank.depositAllExcept(Hatchet);
- }
- private void closeBank() {
- bank.close();
- }
- private void bank() {
- openBank();
- depositYew();
- closeBank();
- }
- @Override
- public int loop() {
- mouse.setSpeed(random(1, 3));
- final RSGroundItem NEST = groundItems.getNearest(Nests);
- if (NEST != null && !inventory.isFull()) {
- if (NEST.interact("Take"))
- sleep(900);
- }
- if (CatherbayOak == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2811, 3441, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (CatherbayOak == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(2788, 3436, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject ivy = objects.getNearest(oakTreeID);
- if ((ivy != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- ivy.interact("Chop");
- sleep(1500);
- }}
- if (CandleOak == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2811, 3441, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (CandleOak == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(2795, 3447, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject ivy = objects.getNearest(oakTreeID);
- if ((ivy != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- ivy.interact("Chop");
- sleep(1500);
- }}
- if (DraynorWillow == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(3012, 3355, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (DraynorWillow == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(3089, 3232, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject ivy = objects.getNearest(willowTreeId);
- if ((ivy != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- ivy.interact("Chop");
- sleep(1500);
- }}
- if (FallSouthIvy == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(3012, 3355, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (FallSouthIvy == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(3048, 3328, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject ivy = objects.getNearest(ivyID);
- if ((ivy != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- ivy.interact("Chop");
- sleep(1500);
- }}
- if (FallNorthIvy == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2946, 3368, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (FallNorthIvy == true) {
- if (!inventory.isFull()) {
- RSObject ivy = objects.getNearest(ivyID);
- if ((ivy != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- ivy.interact("Chop");
- sleep(1500);
- RSTile yewTile = new RSTile(3014, 3392, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- }}
- if (EastIvy == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(3254, 3420, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (EastIvy == true) {
- if (!inventory.isFull()) {
- RSObject ivy = objects.getNearest(ivyID);
- if ((ivy != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- ivy.interact("Chop");
- sleep(1500);
- RSTile yewTile = new RSTile(3233, 3457,0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- }}
- if (Ivy == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(3177, 3478,0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (Ivy == true) {
- if (!inventory.isFull()) {
- RSObject ivy = objects.getNearest(ivyID);
- if ((ivy != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- ivy.interact("Chop");
- sleep(1500);
- RSTile yewTile = new RSTile(3217, 3498,0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- }}
- if (ChurchYew == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2724, 3493, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (ChurchYew == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(2711, 3462, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject oak = objects.getNearest(yewTreeId);
- if ((oak != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- oak.interact("Chop down");
- sleep(1500);
- }}
- if (BehindMaple == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2724, 3493, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (BehindMaple == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(2728, 3500, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject oak = objects.getNearest(mapleTReeID);
- if ((oak != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- oak.interact("Chop down");
- sleep(1500);
- }}
- if (CatherbayYew == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2811, 3441, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (CatherbayYew == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(2759, 3431, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject oak = objects.getNearest(yewTreeId);
- if ((oak != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- oak.interact("Chop down");
- sleep(1500);
- }}
- if (SeersMagic == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2724, 3493, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (SeersMagic == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(2693, 3425, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject oak = objects.getNearest(magicTreeId);
- if ((oak != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- oak.interact("Chop down");
- sleep(1500);
- }}
- if (TowerMagic == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2724, 3493, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (TowerMagic == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(2700, 3398, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject oak = objects.getNearest(magicTreeId);
- if ((oak != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- oak.interact("Chop down");
- sleep(1500);
- }}
- if (NorthFalador == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2946, 3368, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (NorthFalador == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(2949, 3405, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject oak = objects.getNearest(oakTreeID);
- if ((oak != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- oak.interact("Chop down");
- sleep(1500);
- }}
- if (SouthFalador == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(2946, 3368, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (SouthFalador == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(3039, 3321, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject oak = objects.getNearest(oakTreeID);
- if ((oak != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- oak.interact("Chop down");
- sleep(1500);
- }}
- if (Draynor == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(3012, 3355, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (Draynor == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(3100, 3286, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject oak = objects.getNearest(oakTreeID);
- if ((oak != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- oak.interact("Chop down");
- sleep(1500);
- }}
- if (Varrock == true) {
- if (inventory.isFull()) {
- RSTile bankTile = new RSTile(3254, 3420, 0);
- RSWeb webToBank = web.getWeb(getMyPlayer().getLocation(), bankTile);
- webToBank.step();
- bank();
- }}
- if (Varrock == true) {
- if (!inventory.isFull()) {
- RSTile yewTile = new RSTile(3285, 3421, 0);
- RSWeb webToYew = web.getWeb(getMyPlayer().getLocation(), yewTile);
- webToYew.step();
- RSObject oak = objects.getNearest(oakTreeID);
- if ((oak != null) && (getMyPlayer().getAnimation() == -1) && (!getMyPlayer().isMoving()))
- oak.interact("Chop down");
- sleep(1500);
- }}
- antiBanList();
- return (random(650, 950));}
- public void superAntiMoveMouse() {
- final int rand = random(0,65);
- switch (rand) {
- case 0:
- mouse.moveSlightly();
- mouse.moveSlightly();
- mouse.moveSlightly();
- break;
- case 1:
- mouse.moveSlightly();
- mouse.moveSlightly();
- break;
- case 2:
- mouse.moveSlightly();
- mouse.moveSlightly();
- mouse.moveSlightly();
- mouse.moveSlightly();
- mouse.moveSlightly();
- mouse.moveSlightly();
- break;
- case 3:
- mouse.moveOffScreen();
- sleep(random(2000, 3000));
- break;
- }
- }
- public void randomtab() {
- switch (random(0, 12)) {
- case 0:
- game.openTab(Game.Tab.STATS);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 1:
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 2:
- game.openTab(Game.Tab.CLAN_CHAT);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 3:
- game.openTab(Game.Tab.FRIENDS);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 4:
- game.openTab(Game.Tab.CLAN_CHAT);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 5:
- game.openTab(Game.Tab.EQUIPMENT);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 6:
- game.openTab(Game.Tab.MAGIC);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 7:
- game.openTab(Game.Tab.QUESTS);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 8:
- game.openTab(Game.Tab.FRIENDS_CHAT);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 9:
- game.openTab(Game.Tab.NOTES);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 10:
- game.openTab(Game.Tab.PRAYER);
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 11:
- game.openTab(Game.Tab.MUSIC);
- game.openTab(Game.Tab.INVENTORY);
- break;
- }
- }
- public void MouseObserve() {
- }
- {
- }
- public void mouseMoveDownMenu() {
- Point b = menu.getLocation();
- if (menu.isOpen()) {
- int x = b.x;
- int y = b.y;
- int x2 = (x + 218);
- int y2 = 0;
- y2 = y2 + menu.getSize() * 17;
- mouse.move(random(x, x2), random(y + 30, y2));
- }
- sleep(800);
- }
- public void moveMouseOffMenu() {
- Point b = menu.getLocation();
- if (menu.isOpen()) {
- int x = b.x;
- int y = b.y;
- if (random(0, 2) == 0) {
- x = x + random(-20, -50);
- } else {
- x = (x + 218) + random(+20, +50);
- }
- if (random(0, 2) == 0) {
- y = y + random(-20, -50);
- } else {
- y = (y + menu.getSize() * 17) + random(+20, +50);
- }
- mouse.move(x, y);
- sleep(random(100, 400));
- }
- }
- public void randomXPcheck() {
- game.openTab(Game.Tab.STATS);
- switch (random(0, 20)) {
- case 0:
- break;
- case 1:
- skills.doHover(skills.WOODCUTTING);
- sleep(random(5000, 7000));
- game.openTab(Game.Tab.INVENTORY);
- break;
- case 2:
- break;
- case 3:
- break;
- case 4:
- break;
- case 5:
- break;
- case 6:
- break;
- case 7:
- break;
- case 8:
- break;
- case 9:
- break;
- case 10:
- break;
- case 11:
- break;
- case 12:
- break;
- case 13:
- break;
- case 14:
- break;
- case 15:
- break;
- case 16:
- break;
- case 17:
- break;
- case 18:
- break;
- case 19:
- break;
- case 20:
- break;
- }
- }
- public int antiBanList() {
- switch (random(0, 28)) {
- case 8:
- superAntiMoveMouse();
- AntiBanCamera();
- break;
- case 5:
- MouseObserve();
- break;
- case 9:
- randomXPcheck();
- break;
- case 1:
- break;
- case 10:
- randomtab();
- AntiBanCamera();
- break;
- case 11:
- case 12:
- break;
- case 13:
- superAntiMoveMouse();
- AntiBanCamera();
- break;
- case 14:
- AntiBanCamera();
- break;
- case 15:
- case 16:
- MouseObserve();
- break;
- case 17:
- break;
- default:
- break;
- }
- return 500;
- }
- public void mouseHandler() {
- switch (random(0, 5)) {
- case 0:
- mouse.moveOffScreen();
- sleep(random(5000, 6000));
- case 1:
- mouse.moveOffScreen();
- sleep(random(2000, 7000));
- case 2:
- mouse.moveSlightly();
- case 3:
- mouse.moveSlightly();
- case 4:
- case 5:
- mouse.moveOffScreen();
- sleep(random(5000, 10000));
- }
- }
- 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);
- }
- }
- //Method
- private String formatTime(final long time) {
- if(time > 0){
- final int sec = (int) (time / 1000), h = sec / 3600, m = sec / 60 % 60, s = sec % 60;
- return (h < 10 ? "0" + h : h) + ":" + (m < 10 ? "0" + m : m) + ":"+ (s < 10 ? "0" + s : s);
- }
- return "--:--:--";
- }
- //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, 102, 0);
- private final Color color2 = new Color(0, 0, 0);
- private final Color color3 = new Color(204, 0, 51);
- private final Color color4 = new Color(51, 153, 0);
- private final Color color5 = new Color(0, 0, 255);
- private final Color color6 = new Color(0, 153, 0);
- private final Color color7 = new Color(204, 0, 0);
- private final Color color8 = new Color(255, 51, 51);
- private final Font font1 = new Font("Arial", 1, 17);
- private final Font font2 = new Font("MS Reference Sans Serif", 1, 13);
- private final Font font3 = new Font("MS Reference Sans Serif", 1, 21);
- private final Font font4 = new Font("MS Reference Sans Serif", 1, 10);
- private final BasicStroke stroke2 = new BasicStroke(5);
- private final BasicStroke stroke3 = new BasicStroke(3);
- private final Image img1 = getImage("http://i52.tinypic.com/mkg0uf.jpg");
- public void onRepaint(Graphics g1) {
- Graphics2D g = (Graphics2D)g1;
- if (GETree == true) {
- Taken=expGained/ treexp;}
- if (SouthVarrockOak == true) {
- Taken=expGained/ oakxp;}
- if (CandleOak == true) {
- Taken=expGained/ oakxp;}
- if (CatherbayOak == true) {
- Taken=expGained/ oakxp;}
- if (GEYew == true) {
- Taken=expGained/ yewxp;}
- if (DraynorTree == true) {
- Taken=expGained/ treexp;}
- if (BehindMaple == true) {
- Taken = expGained / maplexp;}
- if (EastIvy == true) {
- Taken = expGained / ivyxp;}
- if (FallNorthIvy == true) {
- Taken = expGained / ivyxp;}
- if (FallSouthIvy == true) {
- Taken = expGained / ivyxp;}
- if (Ivy == true) {
- Taken = expGained / ivyxp;}
- if (DraynorWillow == true) {
- Taken=expGained/ willowxp;}
- if (CatherbayWillow == true) {
- Taken=expGained/ willowxp;}
- if (ChurchYew == true) {
- Taken = expGained / yewxp;}
- if (Varrock == true) {
- Taken = expGained / oakxp;}
- if (Draynor == true) {
- Taken = expGained / oakxp;}
- if (SouthFalador == true) {
- Taken = expGained / oakxp;}
- if (CatherbayYew == true) {
- Taken=expGained/ yewxp;}
- if (TowerMagic == true) {
- Taken=expGained/ magicxp;
- }
- if (NorthFalador == true) {
- Taken = expGained / oakxp;}
- logsPHR = (int) ((Taken) * 3600000.0 / (System.currentTimeMillis() - startTime));
- int expHour = (int) ((expGained * 3600000D) / runTime);
- expGained = skills.getCurrentExp(skills.WOODCUTTING) - startExp;
- runTime = System.currentTimeMillis() - startTime;
- g.drawImage(img1, 4, 340, null);
- g.setFont(font1);
- g.setColor(color1);
- g.drawString("Time Ran:"+formatTime(runTime), 359, 385);
- g.drawString("XP Gained:"+ expGained, 287, 423);
- g.drawString("Chopped:"+ Taken, 29, 419);
- g.drawString("Chopped PHR:"+ logsPHR, 27, 458);
- g.drawString("XP PHR:"+ expHour, 287, 459);
- g.setColor(color2);
- g.drawString("Post Your Proggies Please", 557, 437);
- g.setFont(font2);
- g.setColor(color4);
- g.drawString("Post Your Proggies Please", 546, 401);
- g.setColor(color5);
- g.drawString("Thanks", 611, 235);
- g.drawString("For", 626, 279);
- g.drawString("Using", 617, 324);
- g.setColor(color6);
- g.drawRect(142, 18, 234, 33);
- g.setFont(font3);
- g.setColor(color7);
- g.drawString("Report Bugs Please", 146, 44);
- g.setColor(color6);
- g.drawString("AIO Banking Woodcutter", 12, 283);
- g.setFont(font4);
- g.drawString("Popglass2", 165, 313);
- g.setColor(color8);
- g.setStroke(stroke3);
- }
- @Override
- public void messageReceived(MessageEvent e) {
- String txt = e.getMessage().toLowerCase();
- if(txt.contains("you chop")) {
- Taken++;
- }
- }
- /**
- * @author bradley johnson
- */
- public class Tutorial extends JFrame {
- public Tutorial() {
- initComponents();
- }
- private void button1ActionPerformed(ActionEvent e) {
- // TODO add your code here
- }
- private void initComponents() {
- // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
- // Generated using JFormDesigner Evaluation license - bradley johnson
- layeredPane1 = new JLayeredPane();
- comboBox2 = new JComboBox();
- button1 = new JButton();
- label2 = new JLabel();
- //======== this ========
- setBackground(new Color(204, 0, 51));
- setForeground(new Color(204, 0, 0));
- Container contentPane = getContentPane();
- contentPane.setLayout(null);
- contentPane.add(layeredPane1);
- layeredPane1.setBounds(0, 10, 26, layeredPane1.getPreferredSize().height);
- //---- comboBox2 ----
- comboBox2.setModel(new DefaultComboBoxModel(new String[] {
- "Varrock East Oaks", "Draynor Oaks", "South Falador Oaks", "North Falador Oaks",
- "Sorcerer's Tower Magic",
- "Seers Village Magic",
- "Catherbay Yews",
- "EdgeVille Yews",
- "Seers Maple Behind Bank",
- "Seers Church Yews",
- "Grand Exchange Ivy",
- "Varrock Palace East Ivy",
- "Falador North Ivy",
- "Falador South Ivy",
- "GrandExchange Yews",
- "South of GrandExchange Trees",
- "Draynor Willows",
- "Draynor Trees",
- "Catherbay Willow",
- "Catherbay Oak",
- "North of CandleShop Catherbay Oaks"
- }));
- contentPane.add(comboBox2);
- comboBox2.setBounds(10, 120, 310, 40);
- // ---- button1 ----
- button1.setText("Start Script");
- button1.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- StartButton(e);
- }
- private void StartButton(ActionEvent e) {
- String chosen = comboBox2.getSelectedItem().toString();
- if (chosen.equals("North of CandleShop Catherbay Oaks")) {
- CandleOak = true;
- } else {
- CandleOak = false;
- }
- if (chosen.equals("South Varrock Oak")) {
- SouthVarrockOak = true;
- } else {
- SouthVarrockOak = false;
- }
- if (chosen.equals("Catherbay Oak")) {
- CatherbayOak = true;
- } else {
- CatherbayOak = false;
- }
- if (chosen.equals("Gnome Magic")) {
- GnomeMagic = true;
- } else {
- GnomeMagic = false;
- }
- if (chosen.equals("EdgeVille Yews")) {
- EdgeYew = true;
- } else {
- EdgeYew = false;
- }
- if (chosen.equals("Draynor Trees")) {
- DraynorTree = true;
- } else {
- DraynorTree = false;
- }
- if (chosen.equals("Draynor Willows")) {
- DraynorWillow = true;
- } else {
- DraynorWillow = false;
- }
- if (chosen.equals("South of GrandExchange Trees")) {
- GETree = true;
- } else {
- GETree = false;
- }
- if (chosen.equals("Falador South Ivy")) {
- FallSouthIvy = true;
- } else {
- FallSouthIvy = false;
- }
- if (chosen.equals("Falador North Ivy")) {
- FallNorthIvy = true;
- } else {
- FallNorthIvy = false;
- }
- if (chosen.equals("Varrock Palace East Ivy")) {
- EastIvy = true;
- } else {
- EastIvy = false;
- }
- if (chosen.equals("Grand Exchange Ivy")) {
- Ivy = true;
- } else {
- Ivy = false;
- }
- if (chosen.equals("GrandExchange Yews")) {
- GEYew= true;
- } else {
- GEYew = false;
- }
- if (chosen.equals("Varrock East Oaks")) {
- Varrock = true;
- } else {
- Varrock = false;
- }
- if (chosen.equals("Draynor Oaks")) {
- Draynor = true;
- } else {
- Draynor = false;
- }
- if (chosen.equals("South Falador Oaks")) {
- SouthFalador = true;
- } else {
- SouthFalador = false;
- }
- if (chosen.equals("North Falador Oaks")) {
- NorthFalador = true;
- } else {
- NorthFalador = false;
- }
- if (chosen.equals("Sorcerer's Tower Magic")) {
- TowerMagic = true;
- } else {
- TowerMagic = false;
- }
- if (chosen.equals("Seers Village Magic")) {
- SeersMagic = true;
- } else {
- SeersMagic = false;
- }
- if (chosen.equals("Catherbay Yews")) {
- CatherbayYew = true;
- } else {
- CatherbayYew = false;
- }
- if (chosen.equals("Seers Maple Behind Bank")) {
- BehindMaple = true;
- } else {
- BehindMaple = false;
- }
- if (chosen.equals("Resource Island Maple")) {
- ResourceMaple = true;
- } else {
- ResourceMaple = false;
- }
- if (chosen.equals("Seers Church Yews")) {
- ChurchYew = true;
- } else {
- ChurchYew = false;
- }
- if (chosen.equals("Catherbay Willow")) {
- CatherbayWillow = true;
- } else {
- CatherbayWillow = false;
- }
- guiWait = false;
- g.setVisible(false);
- }
- });
- contentPane.add(button1);
- button1.setBounds(110, 70, 154, button1.getPreferredSize().height);
- //---- label2 ----
- try {
- label2.setIcon(new ImageIcon(new URL("http://i892.photobucket.com/albums/ac124/gamemaste789/rs/GUIBack.jpg")));
- } catch (final java.net.MalformedURLException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- contentPane.add(label2);
- label2.setBounds(-5, -10, 400, 315);
- { // compute preferred size
- Dimension preferredSize = new Dimension();
- for(int i = 0; i < contentPane.getComponentCount(); i++) {
- Rectangle bounds = contentPane.getComponent(i).getBounds();
- preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width);
- preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height);
- }
- Insets insets = contentPane.getInsets();
- preferredSize.width += insets.right;
- preferredSize.height += insets.bottom;
- contentPane.setMinimumSize(preferredSize);
- contentPane.setPreferredSize(preferredSize);
- }
- 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 - bradley johnson
- private JLayeredPane layeredPane1;
- private JComboBox comboBox2;
- private JButton button1;
- private JLabel label2;
- // JFormDesigner - End of variables declaration //GEN-END:variables
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment