PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free!
Click here to download the new Pastebin App for iOS
.
Public Pastes
Untitled
7 sec ago
Untitled
7 sec ago
Maken-Ki! - Especi...
9 sec ago
navv
16 sec ago
Untitled
11 sec ago
Untitled
12 sec ago
Untitled
16 sec ago
Untitled
17 sec ago
New Paste
package com.scripts; import java.awt.*; import javax.swing.*; import java.awt.Point; import java.awt.event.KeyEvent; import com.kbot2.scriptable.Script; import com.kbot2.scriptable.methods.wrappers.*; import com.kbot2.scriptable.methods.data.Objects; import com.kbot2.handlers.eventSystem.eventListeners.PaintListener; import com.kbot2.handlers.eventSystem.eventListeners.ServerMessageListener; public class CrisisGuildMiner extends Script implements ServerMessageListener, PaintListener { private int ladderUpID = 2113; private int ladderDownID = 30941; private Tile[] toGuildUp = new Tile[]{new Tile(3013,3356), new Tile(3017,3359), new Tile(3022,3357), new Tile(3024,3352), new Tile(3029,3351), new Tile(3032,3346), new Tile(3034,3341), new Tile(3030,3338), new Tile(3025,3337), new Tile(3020,3338), }; private Tile[] toBankUp = walking.reversePath(toGuildUp); private Tile[] toGuildDown = new Tile[]{new Tile(3019,9737), new Tile(3024,9739), new Tile(3029,9738), new Tile(3034,9738),new Tile(3039,9737), new Tile(3045,9738), }; private Tile[] toBankDown = walking.reversePath(toGuildDown); private Tile[] guildPath = new Tile[]{new Tile(3046,9755), new Tile(3046,9750), new Tile(3046,9745), new Tile(3044,9740), }; private int bankBoothID = 11758; private int[] coalID = new int[] { 11930, 11931, 11932, 11930, 11963, 11964, 2096, 2097, 14850, 14851, 14852, 32426, 32426, 31068, 31069, 31070, 31068 }; private int[] mithID = new int[] { 11942, 11943, 11944, 11943, 32438, 32439, 31086, 31088 }; private int[] rockID = coalID; private Obj rock; private int[] axeID = { 1265, 1275, 1269, 1271, 1273, 1267 }; private boolean mith = false; private int[] priorityRock1ID; private final static int TO_BANK_DOWN = 10; private final static int TO_BANK_UP = 15; private final static int TO_GUILD_UP = 20; private final static int TO_GUILD_DOWN = 25; private final static int MINE = 50; String state; private gui gui; private boolean startScript = false; long estimatedHourly; int startExp = 0; private long startTime = System.currentTimeMillis(); String mining; int mined; int startLevel = 0; int antiBanSpeed = 10; public boolean active() { return true; } public String getName() { return "Crisis Guild Miner"; } @Override public String getAuthor() { return "WantedCrisis"; } @Override public String getDescription() { return "Mines at guild"; } public double getVersion() { return 0.2; } public boolean onStart() { try { gui = new gui(); gui.setVisible(true); state = "Set Your Settings On GUI!!! >.<"; return true; } catch (Exception e) { e.printStackTrace(); return false; } } public int loop() { while(!startScript) { wait(10, 20); log("Waiting"); } if(startExp == 0) startExp = skills.getExperience(skills.SKILL_MINING); if(startLevel == 0) startLevel = skills.getLevel(skills.SKILL_MINING); if(getMyPlayer().isMoving() && state != "Walking to ladders!" && state != "Walking to rocks" && state != "Walking to bank.. finally :)") return random(200,300); if(getMyPlayer().getAnimation() != -1) { return random(100,200); } if(walking.getEnergy() >= random(20, 30) && botEnv.settings.getSetting(173) != (true ? 1 : 0)) { state = "Setting Run Energy"; walking.setRunning(true); sleep(random(500,1000)); } camera.setAltitude(true); /*if(inArea(3055, 9730, 3027, 9755) log("At Guild Rocks!!!!"); if(inArea(3026, 9732, 3016, 9755)) log("AT GUILD ENTRANCE!!!!"); if(inArea(3032, 3329, 3006, 3361)) log("Above Guild");*/ setMouseSpeed(); switch (state()) { case 3: //Walking to guild ladders log("Walking to guild ladders"); state = "Walking to Guild Ladders"; if(distanceTo(objects.getClosestObject(30, ladderUpID)) > 3) walking.walkPath(walking.randomizePath(toGuildUp, 3, 3)); wait(300, 500); break; case 4: //Clicking ladder! log("Clicking ladder"); state = "Climbing Down Da Ladder!"; if(distanceTo(objects.getClosestObject(30, ladderUpID)) <= 3) { Obj ladder2 = objects.getClosestObject(30, ladderUpID); if(ladder2 != null) { if(!clickLadder(ladder2, "Climb")) camera.setAngle(camera.getAngle() + random(20,30)); } } wait(300, 500); break; case 5: log("state = 5; "); state = "Walking to rocks"; walking.walkPath(walking.randomizePath(toGuildDown, -5, 5)); log("Should be near rocks now!"); break; case 6: log("state = 6; "); log("Mining"); if(mith) { clickRock(); } else { clickPriority1Rock(); } break; case 7: log("state = 7; "); state = "Walking to ladders!"; walking.walkPath(walking.randomizePath(toBankDown, 5, -5)); wait(300, 500); break; case 8: log("state = 8; "); state = "Climbing Ahoy!"; Obj ladder1 = objects.getClosestObject(30, ladderDownID); if(ladder1 != null) { if(!clickLadder(ladder1, "Climb")){ camera.setAngle(camera.getAngle() + random(20,30)); } } wait(300, 500); break; case 9: log("state = 9; "); state = "Walking to bank.. finally :)"; walking.walkPath(walking.randomizePath(toBankUp, -3, 3)); wait(300, 500); break; case 10: log("state = 10; "); state = "Depositing.. zz!"; depositOres(); wait(300, 500); break; } return random(100, 300); } public int state() { if(!isInventoryFull()) { if(inArea(3036, 3329, 3006, 3361)) { if(distanceTo(objects.getClosestObject(30, ladderUpID)) > 3) return 3; if(distanceTo(objects.getClosestObject(30, ladderUpID)) <= 3) return 4; } if(inArea(3026, 9732, 3016, 9755)) { return 5; }else if(inArea(3057, 9729, 3025, 9756)) { return 6; } } if(isInventoryFull()) { if(inArea(3055, 9730, 3027, 9743)) { return 7; } if(inArea(3026, 9732, 3016, 9755)) { return 8; } if(inArea(3036, 3329, 3006, 3361)) { if(distanceTo(toBankUp[toBankUp.length - 1]) > 5) return 9; if(distanceTo(toBankUp[toBankUp.length - 1]) <= 3) return 10; } } return 100; } public boolean inArea(int maxX, int minY, int minX, int maxY) { int x = getMyPlayer().getLocation().getX(); int y = getMyPlayer().getLocation().getY(); //log("is " + x + " > " + minX + " is " + x + " < " + maxX + " is " + y + " > " + minY + " is " + y + " < " + maxY); if (x >= minX && x <= maxX && y >= minY && y <= maxY) { return true; } return false; } private boolean isInventoryFull() { if(inventory.isFull()) return true; return false; } public boolean checkRest() { if(walking.getEnergy() < 10 && walking.getEnergy() > -1) return true; return false; } public void activateRest() { interfaces.getInterface(750, 1).doAction("Rest"); while(walking.getEnergy() < random(20, 30)) { sleep(random(300,500)); } } private void wait(int z, int c) { sleep(random(z, c)); } public boolean clickRock() { try { rock = getClosestObject(30, mithID); if(rock == null){ clickPriority1Rock(); return false; } if(!inRockArea(3055, 9730, 3027, 9755, rock.getLocation().getX(), rock.getLocation().getY())) { walking.walkToMM(toGuildDown[toGuildDown.length -1]); walking.walkPath(walking.randomizePath(guildPath, 5, 5)); return false; } if(rock != null) { if(distanceTo(rock) > 7) { state = "Walking To Rock"; walking.walkToMM(rock.getLocation()); } state = "Mining Rock"; if(!clickRock(rock, "Mine")); camera.setAngle(camera.getAngle() + random(-50,50)); int gamble = random(0, 2); if(gamble >= 1) moveMouse(new Point(random(1, 500), random(1, 334)), 30, 30); else actHuman(); sleep(random(100,200)); } return true; } catch (Exception e) { e.printStackTrace(); } return false; } public boolean clickPriority1Rock() { try { Obj rock = getClosestObject(20, priorityRock1ID); if(rock == null) { state = "Trying to find a rock.."; return false; } if(!inRockArea(3055, 9730, 3027, 9755, rock.getLocation().getX(), rock.getLocation().getY())) { walking.walkToMM(toGuildDown[toGuildDown.length -1]); walking.walkPath(walking.randomizePath(guildPath, 5, 5)); return false; } if(rock != null) { if(distanceTo(rock) > 7) { state = "Walking To Rock"; walking.walkToMM(rock.getLocation()); } state = "Mining Rock"; if(!rock.doAction("Mine")) camera.setAngle(camera.getAngle() + random(30,50)); int gamble = random(0, 2); if(gamble >= 1) moveMouse(new Point(random(1, 500), random(1, 334)), 30, 30); else actHuman(); sleep(random(100,200)); } return true; } catch (Exception e) { e.printStackTrace(); } return false; } public boolean inRockArea(int maxX, int minY, int minX, int maxY, int x3, int y3) { int x = getMyPlayer().getLocation().getX(); int y = getMyPlayer().getLocation().getY(); log("is " + x3 + " > " + minX + " is " + x3 + " < " + maxX + " is " + y3 + " > " + minY + " is " + y3 + " < " + maxY); if (x3 >= minX && x3 <= maxX && y3 >= minY && y3 <= maxY) { log("Rock is mineable"); return true; } log("Rock is not minable"); return false; } public boolean openBank() { Obj bankBooth = getClosestObject(100, bankBoothID); if (bank.isOpen()) return false; if (bankBooth != null && !bank.isOpen()) { state = "Opening Bank"; return bankBooth.doAction("Use-quickly"); } return false; } public boolean depositOres() { if(!bank.isOpen()) return openBank(); if(bank.isOpen()) { state = "Depositing.."; bank.depositAllExcept(axeID); } return true; } public void setMouseSpeed() { int gambleInt = random(1, 20); double speed; switch (gambleInt) { case 1: speed = 1.5; setMouseSpeed(speed); log("Mouse Speed Set To " + speed); case 2: speed = 1.8; setMouseSpeed(speed); log("Mouse Speed Set To " + speed); case 3: speed = 2.1; setMouseSpeed(speed); log("Mouse Speed Set To " + speed); } } public boolean clickRock(Obj r, String action) { for (int i = 0; i < 20; i++) { if (r != null && getCalculations().onScreen(r.getScreenPos())) { mouse.moveMouse(r.getScreenPos().x, r.getScreenPos().y, 3, 3); for (String s : menu.getMenuItems()) { if (s.contains(action)) { if (atMenu(action)) { return true; } } } } } return false; } public boolean clickLadder(Obj ladder, String action) { for (int i = 0; i < 20; i++) { if (ladder != null && getCalculations().onScreen(ladder.getScreenPos())) { mouse.moveMouse(ladder.getScreenPos().x, ladder.getScreenPos().y, 10, 10); for (String s : menu.getMenuItems()) { if (s.contains(action)) { if (atMenu(action)) { return true; } } } } } return false; } public void actHuman() { int gamble = random(0, 2); log("Gamble = " + gamble + " and is now antibanning"); switch (gamble) { case 1: if(gameScreen.getCurrentTab() != gameScreen.TAB_STATS) gameScreen.openTab(gameScreen.TAB_STATS); mouse.moveMouse(new Point(688, 239), 9, 9); wait(1000,1500); case 2: Point randMouse = null; int randA = random(1, 5); for(int i = 0; i <= randA; i++) { randMouse = new Point(random(15, 730), random(15, 465)); moveMouse(randMouse); sleep(random(50, 800)); } case 3: final int currentAngle = camera.getAngle(); switch (random(0, 1)) { case 0: botEnv.camera.setAngle(currentAngle + random(0, 650)); sleep(random(710, 1000)); case 1: botEnv.camera.setAngle(currentAngle - random(0, 650)); sleep(random(600, 1000)); } } } public void onRepaint(Graphics g) { int expGained = skills.getExperience(skills.SKILL_MINING) - startExp; long millis = System.currentTimeMillis() - startTime; long time = (System.currentTimeMillis() - startTime) / 1000; if(time > 0 ) estimatedHourly = (mined * 60 * 60 ) / time; final long hours = millis / (1000 * 60 * 60); millis -= hours * 1000 * 60 * 60; final long minutes = millis / (1000 * 60); millis -= minutes * 1000 * 60; final long seconds = millis / 1000; int gainedLevels = skills.getLevel(skills.SKILL_MINING) - startLevel; g.setColor(new Color(0, 0, 0, 100)); g.fillRoundRect(12, 173, 245, 160, 10, 10); g.setColor(new Color(100, 10, 20, 100)); g.fillRoundRect(9, 170, 245, 160, 10, 10); g.setColor(Color.white); g.setFont(new Font("Verdana", Font.BOLD, 12)); g.drawString("Crisis Guild Miner ~ Version:" + getVersion(), 20, 190); g.setFont(new Font("Verdana", Font.PLAIN, 10)); int y = 210; g.drawString("Time Running: " + hours + "h " + minutes + "m "+ seconds + "s", 20, y); y += 15; g.drawString("Mining: " + mining, 20, y); y += 15; g.drawString("Mined: " + mined, 20, y); y += 15; g.drawString("Rocks Per Hour: " + estimatedHourly , 20, y); y += 15; g.drawString("Exp To Next Level: " + skills.getExperienceToNextLevel(skills.SKILL_MINING), 20, y); y += 15; g.drawString("Current Level: " + skills.getLevel(skills.SKILL_MINING), 20, y); y += 15; g.drawString("Levels Gained: " + gainedLevels, 20, y); y += 15; g.drawString("State : " + state, 20, y); y += 15; } public void onServerMessage(String e) { if (e.contains("manage to mine")) { mined++; } } public class gui extends javax.swing.JFrame { public gui() { initComponents(); } private void initComponents() { startButton = new javax.swing.JButton(); mithCheck = new javax.swing.JCheckBox(); jLabel1 = new javax.swing.JLabel(); setTitle("Crisis Guild Miner"); setBackground(new java.awt.Color(51, 0, 51)); setCursor(new java.awt.Cursor(java.awt.Cursor.CROSSHAIR_CURSOR)); setForeground(new java.awt.Color(0, 0, 0)); startButton.setText("Start"); startButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { startHandler(evt); } }); mithCheck.setText("Mine Mith ores?"); mithCheck.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); mithCheck.setMargin(new java.awt.Insets(0, 0, 0, 0)); jLabel1.setFont(new java.awt.Font("Arial Black", 0, 11)); jLabel1.setText("Crisis Guild Miner"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(149, Short.MAX_VALUE) .addComponent(startButton) .addGap(22, 22, 22)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(mithCheck) .addContainerGap(127, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addGap(9, 9, 9) .addComponent(jLabel1) .addContainerGap(111, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(11, 11, 11) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE) .addGap(12, 12, 12) .addComponent(mithCheck) .addGap(38, 38, 38)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(62, Short.MAX_VALUE) .addComponent(startButton) .addContainerGap()) ); pack(); } private void startHandler(java.awt.event.ActionEvent evt) { gui.setVisible(false); if(mithCheck.isSelected()){ mith = true; priorityRock1ID = coalID; log("Mith = " + mith); mining = "Mith And Coal"; startScript = true; } if(!mithCheck.isSelected()) { log("Mith = " + mith); mith = false; mining = "Coal"; priorityRock1ID = coalID; startScript = true; } startScript = true; } private javax.swing.JLabel jLabel1; private javax.swing.JCheckBox mithCheck; private javax.swing.JButton startButton; } }
Optional Paste Settings
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
HTML 5
Java
JavaScript
Lua
None
Perl
PHP
Python
Rails
-------------
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
ActionScript
ActionScript 3
Ada
ALGOL 68
Apache Log
AppleScript
APT Sources
ASM (NASM)
ASP
autoconf
Autohotkey
AutoIt
Avisynth
Awk
BASCOM AVR
Bash
Basic4GL
BibTeX
Blitz Basic
BNF
BOO
BrainFuck
C
C for Macs
C Intermediate Language
C#
C++
C++ (with QT extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
ChaiScript
Clojure
Clone C
Clone C++
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
DCS
Delphi
Delphi Prism (Oxygene)
Diff
DIV
DOS
DOT
E
ECMAScript
Eiffel
Email
EPC
Erlang
F#
Falcon
FO Language
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
Game Maker
GDB
Genero
Genie
GetText
Go
Groovy
GwBasic
Haskell
HicEst
HQ9 Plus
HTML
HTML 5
Icon
IDL
INI file
Inno Script
INTERCAL
IO
J
Java
Java 5
JavaScript
jQuery
KiXtart
Latex
Liberty BASIC
Linden Scripting
Lisp
LLVM
Loco Basic
Logtalk
LOL Code
Lotus Formulas
Lotus Script
LScript
Lua
M68000 Assembler
MagikSF
Make
MapBasic
MatLab
mIRC
MIX Assembler
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MPASM
MXML
MySQL
newLISP
None
NullSoft Installer
Oberon 2
Objeck Programming Langua
Objective C
OCalm Brief
OCaml
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
Pascal
PAWN
PCRE
Per
Perl
Perl 6
PHP
PHP Brief
Pic 16
Pike
Pixel Bender
PL/SQL
PostgreSQL
POV-Ray
Power Shell
PowerBuilder
ProFTPd
Progress
Prolog
Properties
ProvideX
PureBasic
PyCon
Python
q/kdb+
QBasic
R
Rails
REBOL
REG
Robots
RPM Spec
Ruby
Ruby Gnuplot
SAS
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
SQL
SystemVerilog
T-SQL
TCL
Tera Term
thinBasic
TypoScript
Unicon
UnrealScript
Vala
VB.NET
VeriLog
VHDL
VIM
Visual Pro Log
VisualBasic
VisualFoxPro
WhiteSpace
WHOIS
Winbatch
XBasic
XML
Xorg Config
XPP
YAML
Z80 Assembler
ZXBasic
Paste Expiration:
Never
10 Minutes
1 Hour
1 Day
1 Month
Paste Exposure:
Public
Unlisted
Private (members only)
Paste Name / Title:
Hello
Guest
Sign Up
or
Login
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login