Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
import java.awt.*; @ScriptManifest(authors = {"Tarth, Thondar"}, keywords = {"Cow, Hide, Lumbridge"}, name = "CowHider", description = "A Cowhide looter, loots cowhides near Lumbridge", version = 1.1) public class CowHider extends Script implements PaintListener{ int lumbridgecheck = 6539; int bankerID = 9710; int gateID = 45212; int cowhide = 1739; int bones = 526; int cowhideprice; int bonesprice; int bankerLU = 36786; int staircase1 = 36773; int staircase2 = 36774; int staircase3 = 36775; int luBankTop = 33505; long starttime; public int Inventory = 0; public int bonesInv = 0; public int hidesgot; public int bonesgot; private boolean bankTele; RSTile lootpath = new RSTile(3256,3284); RSTile cowpath = new RSTile(3251,3266); RSTile BankTile = new RSTile (3449,3720); RSTile LUBankTile = new RSTile (3206,3209); RSTile TopBankTile = new RSTile (3208,3220,2); private boolean restCheck; private boolean antibanCheck; private boolean guiWait = true; cowhider g = new cowhider(); @Override public boolean onStart() { mouse.setSpeed(random(4, 6)); starttime = System.currentTimeMillis(); g.setVisible(true); while(guiWait) sleep(500); walking.setRun(true); cowhideprice = grandExchange.lookup(cowhide).getGuidePrice(); bonesprice = grandExchange.lookup(bones).getGuidePrice(); atLumbridge(); if (atLumbridge() == false && atField() == false){ lumbridgeTeleport(); } return true; } public void lumbridgeTeleport(){ final int lumbridge = Magic.SPELL_HOME_TELEPORT; if (players.getMyPlayer().getAnimation() == -1) magic.castSpell(lumbridge); sleep(1250, 1750); } public boolean atLumbridge(){ RSArea LUArea = new RSArea(new RSTile(3201, 3201), new RSTile(3262, 3253)); return LUArea.contains(getMyPlayer().getLocation()); } public boolean atLumbridgeTop(){ RSObject BankTop = objects.getNearest(luBankTop); if(BankTop != null) if(BankTop.isOnScreen()); return true; } public boolean atField(){ RSArea TopArea = new RSArea(new RSTile(3237, 3248), new RSTile(3269, 3299)); return TopArea.contains(getMyPlayer().getLocation()); } public boolean atDaem(){ RSArea DaemArea = new RSArea(new RSTile(3391, 3651), new RSTile(3490, 3773)); return DaemArea.contains(getMyPlayer().getLocation()); } public void bankLumbridge() { RSObject stairs = objects.getNearest(staircase1, staircase2); if (restCheck == true) { rest(); } if(stairs.isOnScreen()) stairs.doAction("Climb-up Staircase"); sleep(300, 500); } public void bankLumbridgeTop() { RSObject banker = objects.getNearest(bankerLU); RSObject stairs = objects.getNearest(staircase2); if (restCheck == true) { rest(); } if(stairs != null) if(stairs.isOnScreen()) stairs.doAction("Climb-up Staircase"); sleep(300, 500); if (bank.isOpen()) { bank.depositAll(); Inventory = inventory.getCount(cowhide); hidesgot += Inventory; bonesInv = inventory.getCount(bones); bonesgot += bonesInv; sleep(800, 1100); bank.close(); } else { if(banker != null) { if(banker.isOnScreen()) banker.doAction("Use-quickly Bank booth");{ } sleep(1800, 2100); }else{ walking.getPath(TopBankTile); } } } public void moveToCowField(){ walking.getPath(cowpath).traverse(); return; } private void rest() { if(restCheck == true); if(walking.getEnergy() < 30) walking.rest(random(70,95)); } public void loot(){ RSGroundItem hide = groundItems.getNearest(cowhide); if (restCheck == true) { rest(); } if(!inventory.isFull()) if(hide != null) { if(hide.isOnScreen()){ hidePickup(); camera.moveRandomly(300); if (hide.doAction("Take Cowhide")){ sleep(800,1000); while(getMyPlayer().isMoving()) sleep(100,150); } } else { walking.walkTileMM(new RSTile(hide.getLocation().getX(), hide.getLocation().getY())); camera.moveRandomly(200); } } else { walking.getPath(lootpath).traverse(); } } private void antiBan() { int t = random(0, 10); int r = random(0, 15); if (t == 7); if (r == 2) { mouse.moveSlightly(); sleep(500, 800); } if (r == 3) { mouse.moveRandomly(10, 50); } if (r == 5) { camera.moveRandomly(random(350, 650)); } if (r == 6) { camera.moveRandomly(random(450, 750)); } if (r == 8) { camera.moveRandomly(random(150, 450)); } if (r == 10) { camera.moveRandomly(random(750, 1250)); } if (r == 12) { mouse.moveOffScreen(); } if (r == 14) { camera.moveRandomly(random(500, 900)); } } public void Bank() { RSNPC banker = npcs.getNearest(bankerID); if (restCheck == true) { rest(); } if (bank.isOpen()) { bank.depositAll(); Inventory = inventory.getCount(cowhide); hidesgot += Inventory; bonesInv = inventory.getCount(bones); bonesgot += bonesInv; sleep(800, 1100); bank.close(); } else { if(banker != null) { if(banker.isOnScreen()) banker.doAction("Bank Fremennik banker");{ } sleep(1800, 2100); } else { walking.getPath(BankTile).traverse(); } } } private void teleport() { if (game.getCurrentTab() != Game.TAB_EQUIPMENT) { game.openTab(Game.TAB_EQUIPMENT); sleep(random(300, 600)); } interfaces.get(Equipment.INTERFACE_EQUIPMENT) .getComponent(Equipment.RING).doAction("Teleport"); sleep(750, 1250); } private RSGroundItem hidePickup() { return groundItems.getNearest(new Filter<RSGroundItem>() { public boolean accept(RSGroundItem g) { return g.getItem().getID() == cowhide; } }); } public int loop() { if(atLumbridge() && !inventory.isFull()) { moveToCowField(); return 0;} if(atField() && !inventory.isFull()) { loot(); return 0;} if(atDaem() && !inventory.isFull()) { lumbridgeTeleport(); return 0;} if(atDaem() && inventory.isFull()) { walking.walkTo(BankTile); Bank(); return 0;} if(atLumbridgeTop() && !inventory.isFull()) { lumbridgeTeleport(); return 0;} if(atLumbridge() && inventory.isFull()) { walking.walkTileMM(LUBankTile); bankLumbridge(); return 0;} if(atField() && inventory.isFull() && bankTele == true) { if (players.getMyPlayer().getAnimation() == -1) lumbridgeTeleport(); sleep(900, 1300); return 0;} if(atField() && inventory.isFull() && bankTele == false) { if (players.getMyPlayer().getAnimation() == -1) teleport(); sleep(900, 1300); return 0;} if(atLumbridgeTop() && inventory.isFull()) { bankLumbridgeTop(); return 0;} if(antibanCheck == true) { antiBan(); } return random(500, 1500); } @Override public void onFinish() { env.saveScreenshot(true); } // --------------- PAINT --------------- // private Image getImage(String url) { try { return ImageIO.read(new URL(url)); } catch(IOException e) { return null; } } private final Color color1 = new Color(150, 110, 75); private final Font font1 = new Font("Calibri", 0, 18); private final Image img1 = getImage("http://i.imgur.com/Rxa1A.jpg"); private final Image img2 = getImage("http://i.imgur.com/pzrmW.gif"); private final Image img3 = getImage("http://i.imgur.com/cwGcs.gif"); private final Image img4 = getImage("http://i.imgur.com/wJiPx.png"); private final Image img5 = getImage("http://imageshack.us/m/713/2005/cooltext524990002.png"); private final Image img6 = getImage("http://imageshack.us/m/29/834/cooltext524988541.png"); private final Image img7 = getImage("http://imageshack.us/m/811/825/cooltext524990524.png"); private final Image img8 = getImage("http://imageshack.us/m/36/5995/cooltext524986645.png"); private final Image img9 = getImage("http://imageshack.us/m/7/4655/cooltext524991734.png"); private final Image img14 = getImage("http://i.imgur.com/eUH7L.png"); private final Image img15 = getImage("http://i.imgur.com/JWplE.png"); private final Image img16 = getImage("http://i.imgur.com/aUisg.png"); public void onRepaint(Graphics g1) { long millis = System.currentTimeMillis() - starttime; long hours = millis / (1000 * 60 * 60); millis -= hours * (1000 * 60 * 60); long minutes = millis / (1000 * 60); millis -= minutes * (1000 * 60); long seconds = millis / 1000; float hidesec = 0; if ((minutes > 0 || hours > 0 || seconds > 0) && hidesgot > 0) { hidesec = ((float) hidesgot)/(float)(seconds + (minutes*60) + (hours*60*60)); } float bonessec = 0; if ((minutes > 0 || hours > 0 || seconds > 0) && bonesgot > 0) { bonessec = ((float) bonesgot)/(float)(seconds + (minutes*60) + (hours*60*60)); } float bonesmin = bonessec * 60; float bboneshour = bonesmin * 60; float bgoldhour = bboneshour * bonesprice; float hidemin = hidesec * 60; float hhidehour = hidemin * 60; float hgoldhour = hhidehour * cowhideprice; float agoldhour = bgoldhour + hgoldhour; int agoldearned = hidesgot * cowhideprice; int bgoldearned = bonesgot * bonesprice; int goldearned = agoldearned + bgoldearned; int hidehour = Math.round(hhidehour); int goldhour = Math.round(agoldhour); Graphics2D g = (Graphics2D)g1; g.drawImage(img1, 7, 345, null); g.drawImage(img2, 11, 439, null); g.drawImage(img3, 9, 392, null); g.drawImage(img4, 10, 349, null); g.setFont(font1); g.setColor(color1); g.drawString(+ hours + ":" + minutes + ":" + seconds, 190, 371); g.drawString("" + goldearned, 70, 417); g.drawString("" + goldhour, 240, 417); g.drawString("" + hidesgot, 70, 462); g.drawString("" + hidehour, 240, 462); g.drawImage(img5, -4, 342, null); g.drawImage(img5, -4, 388, null); g.drawImage(img6, -25, 304, null); g.drawImage(img6, -25, 343, null); g.drawImage(img7, 371, 327, null); g.drawImage(img7, 33, 328, null); g.drawImage(img8, -19, 249, null); g.drawImage(img6, -25, 380, null); g.drawImage(img6, 488, 302, null); g.drawImage(img6, 488, 338, null); g.drawImage(img7, 371, 428, null); g.drawImage(img7, 33, 427, null); g.drawImage(img7, 200, 427, null); g.drawImage(img8, -18, 383, null); g.drawImage(img6, 488, 378, null); g.drawImage(img7, 371, 370, null); g.drawImage(img7, 371, 400, null); g.drawImage(img7, 200, 370, null); g.drawImage(img7, 200, 397, null); g.drawImage(img7, 371, 343, null); g.drawImage(img7, 33, 353, null); g.drawImage(img7, 33, 381, null); g.drawImage(img7, 33, 402, null); g.drawImage(img9, 28, 258, null); g.drawImage(img14, 144, 395, null); g.drawImage(img14, 144, 440, null); g.drawImage(img15, 316, 395, null); g.drawImage(img15, 316, 440, null); g.drawImage(img16, 398, 356, null); } class cowhider extends JFrame { public cowhider() { initComponents(); } private void startButtonActionPerformed(ActionEvent e) { String chosen = comboBox1.getSelectedItem().toString(); if(chosen.equals("Lumbridge")) { bankTele = true; }else{ bankTele = false; } if(checkBox1.isSelected()) { restCheck = true; } if(checkBox2.isSelected()) { antibanCheck = true; } guiWait = false; g.dispose(); } private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - Jonas Bill Jensen label1 = new JLabel(); comboBox1 = new JComboBox(); label2 = new JLabel(); startButton = new JButton(); label3 = new JLabel(); checkBox1 = new JCheckBox(); checkBox2 = new JCheckBox(); //======== this ======== Container contentPane = getContentPane(); //---- label1 ---- label1.setText("Cowhider"); label1.setFont(new Font("Calibri", Font.PLAIN, 30)); label1.setHorizontalAlignment(SwingConstants.CENTER); //---- comboBox1 ---- comboBox1.setModel(new DefaultComboBoxModel(new String[] { "Lumbridge", "Daemonheim" })); //---- label2 ---- label2.setText("Where to bank:"); //---- startButton ---- startButton.setText("Start"); startButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { startButtonActionPerformed(e); } }); //---- label3 ---- label3.setText("NB! Daemonheim banking requiers a \"Ring of kinship\""); label3.setFont(new Font("Tahoma", Font.ITALIC, 11)); //---- checkBox1 ---- checkBox1.setText("Rest"); //---- checkBox2 ---- checkBox2.setText("Antiban"); GroupLayout contentPaneLayout = new GroupLayout(contentPane); contentPane.setLayout(contentPaneLayout); contentPaneLayout.setHorizontalGroup( contentPaneLayout.createParallelGroup() .addGroup(contentPaneLayout.createSequentialGroup() .addContainerGap() .addGroup(contentPaneLayout.createParallelGroup() .addComponent(startButton, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE) .addComponent(label1, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE) .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup() .addComponent(label2) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE) .addComponent(comboBox1, GroupLayout.PREFERRED_SIZE, 180, GroupLayout.PREFERRED_SIZE)) .addComponent(label3, GroupLayout.Alignment.TRAILING, GroupLayout.PREFERRED_SIZE, 262, GroupLayout.PREFERRED_SIZE) .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup() .addComponent(checkBox1, GroupLayout.PREFERRED_SIZE, 86, GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28) .addComponent(checkBox2, GroupLayout.PREFERRED_SIZE, 99, GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); contentPaneLayout.setVerticalGroup( contentPaneLayout.createParallelGroup() .addGroup(contentPaneLayout.createSequentialGroup() .addContainerGap() .addComponent(label1) .addGap(18, 18, 18) .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(label2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(comboBox1, GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(label3) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE) .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(checkBox1) .addComponent(checkBox2)) .addGap(18, 18, 18) .addComponent(startButton, GroupLayout.PREFERRED_SIZE, 39, GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); 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 - Jonas Bill Jensen private JLabel label1; private JComboBox comboBox1; private JLabel label2; private JButton startButton; private JLabel label3; private JCheckBox checkBox1; private JCheckBox checkBox2; // JFormDesigner - End of variables declaration //GEN-END:variables } }
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
other setups
CSS | 29 min ago | 0.15 KB
Ziz Status Messages
3 hours ago | 1.03 KB
setups
9 hours ago | 0.16 KB
Untitled
10 hours ago | 0.36 KB
my-push Script
10 hours ago | 0.61 KB
cholibrium
1 day ago | 1.65 KB
SMB BIS - Dimble Woods - Virtual Piano
2 days ago | 3.15 KB
buscar-productos.blade.php
PHP | 2 days ago | 2.44 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!