- import java.awt.Color;
- import java.awt.Graphics;
- import java.awt.Image;
- import java.awt.Point;
- import java.io.IOException;
- import java.net.MalformedURLException;
- import java.net.URL;
- import org.rsbot.event.events.ServerMessageEvent;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.event.listeners.ServerMessageListener;
- import org.rsbot.script.Script;
- import org.rsbot.script.ScriptManifest;
- import org.rsbot.script.methods.Skills;
- import org.rsbot.script.util.Filter;
- import org.rsbot.script.util.Timer;
- import org.rsbot.script.util.WindowUtil;
- import org.rsbot.script.wrappers.RSCharacter;
- import org.rsbot.script.wrappers.RSGroundItem;
- import org.rsbot.script.wrappers.RSNPC;
- import org.rsbot.script.wrappers.RSObject;
- import org.rsbot.script.wrappers.RSTile;
- @ScriptManifest(authors = {"Revnge"}, name = "Auto BDK", version = 1.0, description = "Auto BDK")
- public class AutoBDK extends Script implements PaintListener,
- ServerMessageListener {
- //Walking
- RSTile[] agilitysctotravdung = {new RSTile(2922, 3364), new RSTile(2912, 3373), new RSTile(2898, 3377), new RSTile(2890, 3391), new RSTile(2884, 3395)};
- RSTile[] walktodungeon = {new RSTile(2903, 9804), new RSTile(2911, 9808)};
- RSTile[] toBank = {new RSTile(2952, 3379), new RSTile(2946, 3368)};
- //AREAS
- int[] bankBoundry = {2943, 3368, 2949, 3373};
- private RSTile[] centerDung = {new RSTile(1011, 4520), new RSTile(1002, 4509), new RSTile(987, 4502)};
- int[] totravladderboundary = {2934, 3355, 2879, 3402};
- int[] atbluedragonsboundary = {3914, 9796, 2901, 9820};
- //INTS
- final int[] strengthPots = {2440, 157, 159, 161};
- final int[] attackPots = {2436, 145, 147, 149};
- final int[] antiPots = {2452, 2454, 2456, 2458};
- public int[] drop = {229, 995, 1355, 1069, 555, 1179};
- private RSGroundItem lootz;
- private RSGroundItem charmz;
- private RSGroundItem lootzd;
- int food, withdraw;
- public int agility1 = 11844;
- public int fallytab = 8009;
- int[] loots = {536, 985, 1213, 1163, 18778, 1149};
- String[] names = {"Dragon bones", "Tooth", "Rune da", "Rune ful", "Ancient", "Dragon Med"};
- public int[] charms = {12158, 12159, 12160, 12161, 12162, 12163, 12164, 12165, 12166, 12167};
- int tab;
- //PAINT INTS
- private String st;
- Image paint;
- private int totalLoot;
- private int lph;
- private int bankRun = 0;
- String stat;
- Timer tm = new Timer(0);
- public long startTime = System.currentTimeMillis();
- public int[] prices = new int[6];
- public int startBone, startHide, bankBone, bankHide, totalBone, totalHide, ivenBone, ivenHide;
- //BOOLEANS
- boolean dungeon = false;
- boolean dPots = false, dAnti = false, lCharms = false;
- private boolean nanti;
- boolean tabTaken = false;
- boolean shortcut;
- boolean lootCharms;
- boolean startScript = false;
- boolean nBank = false;
- //NPC's
- final Filter<RSNPC> filt1 = new Filter<RSNPC>() {
- public boolean accept(RSNPC npc) {
- if ((npc.getInteracting() == getMyPlayer() || (npc.getName().equals("Blue dragon")
- && !npc.isInCombat() && !npc.isInteractingWithLocalPlayer()))) {
- return true;
- }
- return false;
- }
- };
- final Filter<RSNPC> filt2 = new Filter<RSNPC>() {
- public boolean accept(RSNPC npc) {
- if (npc.getName().equals("Blue dragon")
- && (npc.getInteracting() == getMyPlayer()
- || (getMyPlayer().getInteracting() == npc))) {
- return true;
- }
- return false;
- }
- };
- //ONSTART
- @Override
- public boolean onStart() {
- if (game.isLoggedIn()) {
- if (skills.getRealLevel(Skills.AGILITY) >= 70) {
- shortcut = true;
- }
- if (skills.getRealLevel(Skills.DUNGEONEERING) >= 60) {
- dungeon = true;
- }
- try {
- paint = java.awt.Toolkit.getDefaultToolkit().getImage(new URL("http://2.bp.blogspot.com/_cFIjMju8udw/SOmIyToR1_I/AAAAAAAAACk/1cUtVvgEEXo/s400/Blue_Dragon.gif")).getScaledInstance(516, 140, Image.SCALE_DEFAULT);
- } catch (MalformedURLException ex) {
- }
- if (!shortcut) {
- WindowUtil.showDialog("You dont have the required agility level (70). Script will now stop.");
- log("Don't have agility requirement for blue dragons.");
- return false;
- }
- BDKGUI g = new BDKGUI();
- g.setVisible(true);
- while (!startScript) {
- sleep(10);
- }
- combat.setAutoRetaliate(true);
- mouse.setSpeed(random(5, 6));
- ivenBone = inventory.getCount(536);
- ivenHide = inventory.getCount(1753);
- tm.reset();
- return true;
- }
- log("Not logged in.");
- return false;
- }
- private void checkTabs() {
- if (inventory.getCount(fallytab) <= 1) {
- log("Out Of Fally Tabs Loging Out");
- stopScript();
- }
- }
- //LOOP
- @Override
- public int loop() {
- for (int i = 0; i < drop.length; i++) {
- if (inventory.contains(drop[i])) {
- inventory.getItem(drop[i]).doAction("Drop");
- }
- }
- if (!lCharms) {
- if (inventory.containsOneOf(charms)) {
- inventory.getItem(charms).doAction("Drop");
- }
- }
- camera.setPitch(true);
- if (walking.getEnergy() > random(20, 40)) {
- walking.setRun(true);
- }
- if (nBank) {
- stat = "Walking to Bank";
- walking.walkPathMM(toBank);
- if (isInArea(bankBoundry)) {
- bankRun++;
- nBank = false;
- }
- } else if (isInArea(bankBoundry)) {
- stat = "Banking";
- if (inventory.contains(fallytab) && inventory.contains(food)
- && !inventory.contains(1751) && !inventory.contains(536)) {
- stat = "Walking to wall";
- walking.walkTo(walking.getPath(new RSTile(2939, 3356)).getNext());
- } else {
- RSObject b = objects.getNearest(11758);
- if (b != null) {
- camera.turnToObject(b);
- if (!b.isOnScreen()) {
- walking.walkTileMM(b.getLocation());
- } else {
- bank.open();
- sleep(random(2000, 2200));
- if (bank.isOpen()) {
- if (!tabTaken) {
- sleep(random(4000, 5000));
- tab = bank.getCurrentTab();
- log("Current tab is" + tab);
- tabTaken = true;
- startBone = bank.getCount(loots[0]);
- startHide = bank.getCount(loots[1]);
- } else {
- if (bank.getCurrentTab() != tab) {
- openBankTab(tab); //!tab
- sleep(random(2000, 3000));
- }
- }
- if (bank.depositAllExcept(fallytab)) {
- totalBone = bank.getCount(loots[0]) - startBone - ivenBone;
- totalHide = bank.getCount(loots[1]) - startHide - ivenHide;
- ivenBone = 0;
- ivenHide = 0;
- sleep(random(1000, 2000));
- if ((food != 0) && bank.isOpen()) {
- while (!inventory.contains(food)) {
- if (bank.getCurrentTab() != tab) {
- openBankTab(tab);
- sleep(random(2000, 3000));
- }
- bank.withdraw(food, withdraw);
- sleep(random(800, 1000));
- }
- }
- if (dPots) {
- bank.withdraw(gap(strengthPots), 1);
- sleep(random(800, 1000));
- bank.withdraw(gap(attackPots), 1);
- sleep(random(800, 1000));
- }
- if (dAnti) {
- bank.withdraw(gap(antiPots), 1);
- sleep(random(800, 1000));
- }
- if (bank.close()) {
- sleep(random(600, 700)); //close
- if (dPots) {
- if (didPot(strengthPots)) {
- sleep(random(800, 1000));
- }
- if (didPot(attackPots)) {
- sleep(random(800, 1000));
- }
- }
- if (dAnti) {
- if (didPot(antiPots)) {
- nanti = false;
- sleep(random(800, 1000));
- }
- } else {
- nanti = false;
- }
- if (dPots) {
- if (bank.open()) {
- while (!bank.getInterface().isValid()) {
- sleep(random(1500, 2000));
- bank.open();
- }
- }
- if (bank.isOpen()) {
- if (!inventory.containsOneOf(antiPots[0], antiPots[1], antiPots[2], antiPots[3]) && dAnti) { //no pots depsot
- bank.depositAllExcept(fallytab, food);
- if (bank.getCurrentTab() != tab) {
- openBankTab(tab);
- sleep(random(1000, 1800));
- }
- bank.withdraw(gap(antiPots), 1);
- sleep(random(500, 600));
- } else {
- bank.depositAllExcept(fallytab, food, antiPots[0], antiPots[1], antiPots[2], antiPots[3]);
- sleep(random(500, 600));
- }
- }
- }
- }
- }
- }
- }
- }
- }
- } else if (isInArea(new int[]{2936, 3352, 2942, 3376})) {
- stat = "Walking to wall";
- RSObject a = objects.getNearest(agility1);
- if (a != null) {
- if (calc.distanceTo(a) <= 4) {
- camera.turnToObject(a);
- a.doAction("Climb");
- waitToMove();
- } else {
- walking.walkTo(walking.getPath(new RSTile(2939, 3356)).getNext());
- }
- } else {
- walking.walkTo(walking.getPath(new RSTile(2939, 3356)).getNext());
- }
- } else if (isInArea(new int[]{2878, 3350, 2943, 3422})) {
- stat = "Walking to dungeon";
- RSObject l = objects.getNearest(55404);
- if (l != null) {
- if (l.isOnScreen()) {
- l.doAction("Climb");
- sleep(random(800, 1200));
- } else {
- walking.walkPathMM(agilitysctotravdung);
- }
- } else {
- walking.walkPathMM(agilitysctotravdung);
- }
- } else if (isInArea(new int[]{2881, 9794, 2887, 9801})) {
- RSObject h = objects.getNearest(9293);
- if (h != null) {
- if (h.isOnScreen()) {
- h.doAction("Squeeze");
- sleep(random(3000, 4000));
- waitToMove();
- } else {
- camera.turnToObject(h);
- }
- }
- } else if (isInArea(new int[]{2889, 9793, 2923, 9813})) {
- stat = "Fighting drags";
- if (dungeon) {
- RSObject d = objects.getNearest(52852);
- if (d != null) {
- if (d.isOnScreen()) {
- d.doAction("Enter");
- sleep(random(1500, 2200));
- } else {
- walking.walkPathMM(walktodungeon);
- }
- } else {
- walking.walkPathMM(walktodungeon);
- }
- } else {
- fight();
- }
- } else if ((Math.floor(getMyPlayer().getLocation().getY() / 1000) == 4.0)) {
- fight();
- } else {
- }
- return (random(200, 400));
- }
- public void waitToMove() {
- sleep(random(1500, 2000));
- while (getMyPlayer().isMoving()) {
- sleep(random(100, 200));
- }
- }
- public int gap(int[] pots) {
- if (bank.isOpen()) {
- if (bank.getCount(pots[0]) > 0) {
- return pots[0];
- } else if (bank.getCount(pots[1]) > 0) {
- return pots[1];
- } else if (bank.getCount(pots[2]) > 0) {
- return pots[2];
- } else if (bank.getCount(pots[3]) > 0) {
- return pots[3];
- }
- } else {
- return 0;
- }
- return 0;
- }
- private boolean isInArea(int[] xy) {//Creds Ownageful
- final int x = getMyPlayer().getLocation().getX();
- final int y = getMyPlayer().getLocation().getY();
- if (x >= xy[0] && x <= xy[2] && y >= xy[1] && y <= xy[3]) {
- return true;
- } else {
- return false;
- }
- }
- public boolean openBankTab(int tab) {
- if (!bank.isOpen() || (63 - (tab * 2) < 47)) {
- return false;
- }
- try {
- return bank.getInterface().getComponent(63 - (tab * 2)).doClick();
- } catch (NullPointerException e) {
- return false;
- }
- }
- public boolean didPot(int[] pots) {
- if (inventory.containsOneOf(pots)) {
- if (inventory.getItem(pots).doAction("Drink")) {
- return true;
- }
- }
- return false;
- }
- private void performHumanAction() {
- int randomNum = random(1, 30);
- int r = random(1, 35);
- if (randomNum == 6) {
- if (r == 1) {
- if (game.getCurrentTab() != game.TAB_STATS) {
- game.openTab(game.TAB_STATS);
- mouse.move(random(680, 730), random(355, 370));
- sleep(random(1000, 1500));
- }
- }
- if (r == 2) {
- game.openTab(random(1, 14));
- }
- if (r == 3) {
- Point mPos = mouse.getLocation();
- mouse.move(mPos.x + random(-90, 90), mPos.y + random(-90, 90));
- }
- if (r == 4) {
- Point mPos = mouse.getLocation();
- mouse.move(mPos.x + random(-90, 90), mPos.y + random(-90, 90));
- }
- if (r == 5) {
- Point mPos = mouse.getLocation();
- mouse.move(mPos.x + random(-90, 90), mPos.y + random(-90, 90));
- }
- if (r == 6) {
- Point mPos = mouse.getLocation();
- mouse.move(mPos.x + random(-90, 90), mPos.y + random(-90, 90));
- }
- if (r == 7) {
- Point mPos = mouse.getLocation();
- mouse.move(mPos.x + random(-90, 90), mPos.y + random(-90, 90));
- }
- if (r == 8) {
- camera.setAngle(random(100, 360));
- }
- if (r == 9) {
- camera.setAngle(random(100, 360));
- }
- if (r == 10) {
- camera.setAngle(random(100, 360));
- }
- }
- }
- private int fight() {
- if (nanti) {
- if (inventory.containsOneOf(antiPots[0], antiPots[1], antiPots[2], antiPots[3])) {
- if (inventory.getItem(antiPots).doAction("Drink")) {
- sleep(random(800, 900));
- nanti = false;
- return 20;
- }
- }
- }
- if (inventory.isFull() && inventory.getCount(food) == 0) {
- try {
- inventory.getItem(fallytab).doAction("Break");
- nBank = true;
- return 100;
- } catch (NullPointerException e) {
- log("Out of fally teleport.");
- stopScript();
- }
- sleep(random(100, 200));
- }
- if (game.isLoggedIn()) {
- if (getMyPlayer().getHPPercent() < 30) {
- if (inventory.contains(food)) {
- inventory.getItem(food).doAction("Eat");
- sleep(random(600, 800));
- return 100;
- } else {
- inventory.getItem(fallytab).doAction("Break");
- sleep(random(4000, 5500));
- nBank = true;
- return 100;
- }
- }
- }
- if (lCharms) {
- charmz = groundItems.getNearest(charms);
- if (charmz != null) {
- if (calc.tileOnScreen(charmz.getLocation())) {
- if (inventory.isFull() && inventory.contains(food) && !inventory.contains(charmz.getItem().getID())) {
- inventory.getItem(food).doAction("Eat");
- sleep(random(100, 300));
- }
- charmz.doAction("Take");
- while (getMyPlayer().isMoving()) {
- sleep(200, 400);
- }
- return 100;
- } else {
- if (calc.tileOnMap(charmz.getLocation())) {
- walking.walkTileMM(charmz.getLocation());
- while (getMyPlayer().isMoving()) {
- sleep(200, 400);
- }
- return 100;
- }
- }
- }
- }
- lootzd = groundItems.getNearest(loots[0]);
- if (lootzd != null) {
- if (calc.tileOnScreen(lootzd.getLocation())) {
- if (inventory.isFull() && inventory.contains(food)) {
- inventory.getItem(food).doAction("Eat");
- sleep(random(400, 500));
- }
- lootzd.doAction("Take Drag");
- while (getMyPlayer().isMoving()) {
- sleep(100, 300);
- }
- return (random(400, 600));
- } else {
- if (calc.tileOnMap(lootzd.getLocation())) {
- walking.walkTileMM(lootzd.getLocation());
- while (getMyPlayer().isMoving()) {
- sleep(300, 400);
- }
- return (random(150,200));
- }
- }
- }
- lootz = groundItems.getNearest(loots);
- if (lootz != null) {
- for (int i = 0; i < loots.length; i++) {
- if (lootz.getItem().getID() == loots[i]) {
- if (calc.tileOnScreen(lootz.getLocation())) {
- if (inventory.isFull() && inventory.contains(food)) {
- inventory.getItem(food).doAction("Eat");
- sleep(random(700, 900));
- }
- lootz.doAction("Take " + names[i]);
- while (getMyPlayer().isMoving()) {
- sleep(400, 500);
- }
- return (random(150,200));
- } else {
- if (calc.tileOnMap(lootz.getLocation())) {
- walking.walkTileMM(lootz.getLocation());
- while (getMyPlayer().isMoving()) {
- sleep(200, 400);
- }
- return (random(100,200));
- }
- }
- }
- }
- }
- RSCharacter inter = getMyPlayer().getInteracting();
- if (inter != null) {
- if (inter.getName().contains("Blue dragon")) {
- if (inter.getAnimation() == 12250) {
- sleep(random(1000, 1500));
- return (random(400, 700));
- } else {
- sleep(random(400, 500));
- }
- }
- } else {
- RSNPC drag = npcs.getNearest(filt1);
- if (drag != null) {
- if (drag.isOnScreen()) {
- drag.doAction("Attack");
- sleep(random(600, 650));
- } else {
- walking.walkTileMM(drag.getLocation());
- }
- } else {
- if (dungeon) {
- walking.walkPathMM(centerDung);
- }
- }
- return (random(550,700));
- }
- return (random(200, 300));
- }
- //GUI
- class BDKGUI extends javax.swing.JFrame {
- public BDKGUI() {
- initComponents();
- }
- private void initComponents() {
- jPanel1 = new javax.swing.JPanel();
- jButton1 = new javax.swing.JButton();
- jTextField2 = new javax.swing.JTextField();
- jTextField1 = new javax.swing.JTextField();
- jLabel2 = new javax.swing.JLabel();
- jLabel1 = new javax.swing.JLabel();
- jLabel4 = new javax.swing.JLabel();
- jCheckBox1 = new javax.swing.JCheckBox();
- jLabel3 = new javax.swing.JLabel();
- jCheckBox2 = new javax.swing.JCheckBox();
- jCheckBox3 = new javax.swing.JCheckBox();
- jLabel5 = new javax.swing.JLabel();
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle("Rev's Auto BDK .");
- setAlwaysOnTop(true);
- setBackground(new java.awt.Color(255, 255, 255));
- setFocusable(false);
- jPanel1.setBackground(new java.awt.Color(255, 255, 255));
- jPanel1.setForeground(new java.awt.Color(255, 255, 255));
- jButton1.setText("Start");
- jButton1.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
- jButton1ActionPerformed(evt);
- }
- });
- jLabel2.setText("Withdraw:");
- jLabel1.setText("Food ID:");
- jLabel4.setText("Fally Teleport Tabs In The First Slot");
- jCheckBox1.setBackground(new java.awt.Color(255, 255, 255));
- jCheckBox1.setText("Loot Charms?(not working)");
- jLabel3.setText("Start script in fally bank with:");
- jLabel5.setText("<html><img src=http://2.bp.blogspot.com/_cFIjMju8udw/SOmIyToR1_I/AAAAAAAAACk/1cUtVvgEEXo/s400/Blue_Dragon.gif /></html>");
- jCheckBox2.setText("Drink Antifire");
- jCheckBox3.setText("Drink Super Pots");
- javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
- jPanel1Layout.setHorizontalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addComponent(jCheckBox1).addGap(28, 28, 28).addComponent(jLabel1).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel2).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap()).addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false).addGroup(jPanel1Layout.createSequentialGroup().addComponent(jCheckBox2).addGap(18, 18, 18).addComponent(jCheckBox3).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)).addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 332, javax.swing.GroupLayout.PREFERRED_SIZE)).addGap(28, 28, 28)))));
- jPanel1Layout.setVerticalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addContainerGap(11, Short.MAX_VALUE).addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jCheckBox1).addComponent(jLabel1).addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel2).addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel3).addGap(1, 1, 1).addComponent(jLabel4).addGap(7, 7, 7).addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jCheckBox2).addComponent(jCheckBox3)).addContainerGap()));
- jLabel5.setBackground(new java.awt.Color(255, 255, 255));
- jLabel5.setForeground(new java.awt.Color(255, 255, 255));
- 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.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 436, Short.MAX_VALUE));
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 216, Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));
- pack();
- }
- private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
- if (jCheckBox1.isSelected()) {
- lCharms = true;
- }
- if (jCheckBox2.isSelected()) {
- dAnti = true;
- }
- if (jCheckBox3.isSelected()) {
- dPots = true;
- }
- food = Integer.parseInt(jTextField1.getText());
- withdraw = Integer.parseInt(jTextField2.getText());
- startScript = true;
- }
- private javax.swing.JButton jButton1;
- private javax.swing.JCheckBox jCheckBox1;
- private javax.swing.JCheckBox jCheckBox2;
- private javax.swing.JCheckBox jCheckBox3;
- 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.JTextField jTextField1;
- private javax.swing.JTextField jTextField2;
- }
- //PAINT
- private void drawMouse(final Graphics g) {
- final Point loc = mouse.getLocation();
- if (System.currentTimeMillis()
- - mouse.getPressTime() < 500) {
- g.setColor(Color.red);
- g.fillOval(loc.x - 5, loc.y - 5, 10, 10);
- } else {
- g.setColor(Color.black);
- }
- g.drawLine(0, loc.y, game.getWidth(), loc.y);
- g.drawLine(loc.x, 0, loc.x, game.getHeight());
- }
- public void onRepaint(Graphics g) {
- st = tm.toElapsedString();
- totalLoot = ((totalBone + inventory.getCount(loots[0]) - ivenBone) * prices[0])
- + ((totalHide + inventory.getCount(loots[1]) - ivenHide) * prices[1]);
- lph = (int) (totalLoot / ((Double.parseDouble(st.substring(0, 2))) + (Double.parseDouble(st.substring(3, 5)) / 60)
- + (Double.parseDouble(st.substring(6, 8)) / 3600)));
- g.setColor(Color.blue);
- g.drawImage(paint, 1, 340, null);
- g.drawString(st + "", 290, 389);
- g.drawString("" + totalLoot, 321, 406);
- g.drawString(lph + "", 307, 427);
- g.drawString(bankRun + "", 279, 445);
- g.drawString(stat, 289, 462);
- }
- //SERVER MESS
- public void serverMessageRecieved(ServerMessageEvent sme) {
- String str = sme.getMessage().toString();
- if (str.contains("fiery breath") && dAnti) {
- nanti = true;
- }
- }
- }