daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ///////////////////////////////////////////////////////
  2. /////////////////////SAVE AS //////////////////////////
  3. //////////////////////ManWomenThiever.java/////////////
  4. ///////////////////////////////////////////////////////
  5. ///////////////////////////////////////////////////////
  6. //Official Script As Of March 15, 2011 5:00PM PST//////
  7. //New Things With V-2.0 of script//////////////////////
  8. //Eats Food At 1/2 of HP (constitution) Level//////////
  9. ///////////////////////////////////////////////////////
  10. ///////////////////////////////////////////////////////
  11.  
  12. import java.awt.*;
  13. import java.io.*;
  14. import java.net.URL;
  15.  
  16. import javax.imageio.ImageIO;
  17. import org.rsbot.event.events.MessageEvent;
  18. import org.rsbot.event.listeners.*;
  19. import org.rsbot.script.*;
  20. import org.rsbot.script.wrappers.*;
  21. import org.rsbot.event.listeners.MessageListener;
  22. import org.rsbot.script.ScriptManifest;
  23. import org.rsbot.event.listeners.PaintListener;
  24. import org.rsbot.script.Script;
  25. import org.rsbot.script.methods.Equipment;
  26. import org.rsbot.script.methods.Game;
  27. import org.rsbot.script.methods.Skills;
  28. import org.rsbot.script.wrappers.RSItem;
  29. import org.rsbot.script.util.Filter;
  30. import org.rsbot.script.util.Timer;
  31. import org.rsbot.script.wrappers.*;
  32. import org.rsbot.util.GlobalConfiguration;
  33.  
  34. import javax.imageio.ImageIO;
  35. import javax.swing.*;
  36. import javax.swing.filechooser.FileFilter;
  37. import java.awt.Graphics2D;
  38.  
  39. import java.awt.*;
  40. import java.awt.event.*;
  41. import java.awt.geom.RoundRectangle2D;
  42. import java.awt.image.BufferedImage;
  43. import java.io.BufferedReader;
  44. import java.io.IOException;
  45. import java.io.InputStreamReader;
  46. import java.io.PrintWriter;
  47. import java.net.URL;
  48. import java.util.regex.Matcher;
  49. import java.util.regex.Pattern;
  50. import org.rsbot.util.GlobalConfiguration;
  51. import java.io.*;
  52. import java.net.URL;
  53. import java.text.DecimalFormat;
  54. import java.util.*;
  55. import java.util.List;
  56. import java.util.logging.Level;
  57.  
  58. @ScriptManifest(authors = { "Xplsn" }, keywords = "Thieving", name = "Xplsns Bandits", version = 2.0, description = "Steal from those rich cunts")
  59. public class XplsnsBandits extends Script implements MessageListener, PaintListener {
  60.  
  61.     Point p;
  62.     public int anim = 881;
  63. ///////////////////////////////////// -If Your Food ID Is Not Listed, Then Add It, And Send Me A PM With Food ID's That Need To Be Added
  64. /////////////////////////////////////
  65.  
  66.    
  67.  
  68.     private int[] foodID = {379, 373, 329, 325, 319, 315, 333, 1891, 1893, 1895};
  69.  
  70. /////////////////////////////////////
  71. /////////////////////////////////////
  72.  
  73.     private int badFoodCount = 0;
  74.     public int adrm = 5;
  75.     private int[] NPCvictim = {1879};
  76.     public int thieving = 0;
  77.     public int bank = 199692;
  78.     public int bankz = 199693;
  79.     public int pickPocketsHour = 0;
  80.     public int expForPick = 8;
  81.     public int expGained = 0;
  82.     private int expHour;
  83.     private int startExp;
  84.     public int currLevel;
  85.     public int picksTNL;
  86.     private int pickPockets = 0;
  87.     private int failPockets = 0;
  88.     public int startLevel;
  89.     public int lvlsGained;
  90.     long startTime = System.currentTimeMillis();
  91.     String Status = "";
  92.  
  93.  
  94.  
  95.  
  96.     public boolean onStart() {
  97.         mouse.setSpeed(random(3, 6));
  98.         startLevel = skills.getCurrentLevel(skills.THIEVING);
  99.         startExp = skills.getCurrentExp(skills.THIEVING);
  100.         camera.setCompass('e');
  101.         camera.setPitch(true);
  102.         return true;
  103.     }
  104.  
  105.  
  106.  
  107.   public void messageReceived(MessageEvent e) {
  108.     String x = e.getMessage().toLowerCase();
  109.     if (x.contains("pick the woman's pocket.")){
  110.      pickPockets++;;
  111.         }
  112.     if (x.contains("fail to pick the woman's pocket.")){
  113.      failPockets++;;
  114.         }
  115.     }
  116.  
  117.     public Point mouse() {
  118.         return mouse.getLocation();
  119.     }
  120.  
  121.  
  122.  
  123. //////////////////////
  124. //////PAINT START/////
  125. //////////////////////
  126.  
  127.  
  128.     public String getRuntime() {
  129.         try {
  130.             long millis = System.currentTimeMillis() - startTime;
  131.             long hours = millis / (1000 * 60 * 60);
  132.             millis -= hours * (1000 * 60 * 60);
  133.             long minutes = millis / (1000 * 60);
  134.             millis -= minutes * (1000 * 60);
  135.             long seconds = millis / 1000;
  136.             return ("" + (hours < 10 ? "0" : "") + hours + ":"
  137.                     + (minutes < 10 ? "0" : "") + minutes + ":"
  138.                     + (seconds < 10 ? "0" : "") + seconds + "");
  139.         } catch (Exception e) {
  140.             return "";
  141.         }
  142.     }
  143.  
  144.     private Image getImage(String url) {
  145.         try {
  146.             return ImageIO.read(new URL(url));
  147.         } catch (IOException e) {
  148.             return null;
  149.         }
  150.     }
  151.     private final Color color1 = new Color(0, 0, 0, 162);
  152.     private final Color color2 = new Color(0, 0, 0);
  153.     private final Color color3 = new Color(255, 255, 255);
  154.     private final Color color4 = new Color(255, 0, 51);
  155.     private final Color color5 = new Color(0, 255, 0);
  156.     private final Color color6 = new Color(0, 0, 0);
  157.     private final Color color7 = new Color(102, 0, 102);
  158.  
  159.  
  160.     private final BasicStroke stroke1 = new BasicStroke(1);
  161.     private final BasicStroke stroke2 = new BasicStroke(2);
  162.  
  163.     private final Font font1 = new Font("Arial", 0, 12);
  164.     private final Font font2 = new Font("Arial", 0, 18);
  165.     private final Font font3 = new Font("Arial", 0, 9);
  166.  
  167.  
  168.     public void onRepaint(Graphics g1) {
  169.         Graphics2D g = (Graphics2D)g1;
  170. currLevel = skills.getCurrentLevel(skills.THIEVING);
  171. lvlsGained = currLevel - startLevel;
  172. pickPocketsHour = (int) ((pickPockets) * 3600000D / (System.currentTimeMillis() - startTime));
  173. expHour = (int) ((expGained) * 3600000D / (System.currentTimeMillis() - startTime));
  174. picksTNL = skills.getExpToNextLevel(skills.THIEVING)/expForPick;
  175. expGained = skills.getCurrentExp(skills.THIEVING) - startExp;
  176. picksTNL = skills.getExpToNextLevel(skills.THIEVING)/expForPick;
  177.         g.setColor(color1);
  178.         g.fillRect(4, 4, 187, 233);
  179.         g.setColor(color2);
  180.         g.setStroke(stroke1);
  181.         g.drawRect(4, 4, 187, 233);
  182.         g.setFont(font1);
  183.         g.setColor(color3);
  184.         g.drawString("Status: " + Status, 7, 19);
  185.         g.drawString("Runtime: " + getRuntime(), 8, 34);
  186.         g.drawString("Exp Gained: " + expGained, 8, 50);
  187.         g.drawString("Exp/Hr: " + expHour, 9, 66);
  188.         g.drawString("PickPockets: " + pickPockets, 10, 97);
  189.         g.setColor(color4);
  190.         g.drawString("Failed PickPockets: " + failPockets, 10, 128);
  191.         g.setColor(color5);
  192.         g.drawString("Exp TNL: " + skills.getExpToNextLevel(skills.THIEVING), 10, 81);
  193.         g.drawString("PickPockets TNL:", 10, 113);
  194.         g.drawString("Levels Gained: " + currLevel + " (" + lvlsGained + ")", 10, 158);
  195.         g.setColor(color6);
  196.         g.setStroke(stroke2);
  197.         g.fillRect(8, 458, 0, 0);
  198.         g.drawRect(8, 458, 0, 0);
  199.         g.fillRect(8, 458, 0, 0);
  200.         g.drawRect(8, 458, 0, 0);
  201.         g.fillRect(8, 458, 83, 16);
  202.         g.drawRect(8, 458, 83, 16);
  203.         g.setFont(font2);
  204.     g.setColor(color6);
  205.         g.drawString("", 290, 359);
  206.         g.drawString("", 356, 375);
  207.         g.drawString("", 331, 390);
  208.         g.setColor(color7);
  209.         g.drawString("", 330, 391);
  210.         g.drawString("", 354, 376);
  211.         g.drawString("", 288, 360);
  212.         g.setFont(font3);
  213.         g.drawString("", 383, 472);
  214.     g.setColor(color5);
  215.             g.drawLine(0, (int)(mouse.getLocation().getY()), 800, (int)(mouse.getLocation().getY()));
  216.             g.drawLine((int)(mouse.getLocation().getX()), 0, (int)(mouse.getLocation().getX()), 800);
  217.             g.setColor(Color.green);
  218.             g.drawLine(0, (int)(mouse.getLocation().getY()) +1, 800, (int)(mouse.getLocation().getY())+1);
  219.             g.drawLine((int)(mouse.getLocation().getX()) +1, 0, (int)(mouse.getLocation().getX())+1, 800);
  220.  
  221.  
  222.     }
  223.  
  224. ////////////////////
  225. //////PAINT END/////
  226. ////////////////////
  227.  
  228.  
  229.  
  230.     public boolean atBank() {
  231.         if (objects.getNearest(bankz) == null)
  232.             return false;
  233.         return (objects.getNearest(bankz).isOnScreen());
  234.     }
  235.  
  236.     private void antiban() {
  237.         Status = "Antiban:";
  238.         int r = random(1, 50);
  239.         if (r == 1) {
  240.             Status = "Antiban: Mouse";
  241.             mouse.moveRandomly(100, 200);
  242.             sleep(random(250, 500));
  243.  
  244.         }
  245.         if (r == 6) {
  246.             Status = "Antiban: Mouse";
  247.             mouse.moveRandomly(25, 150);
  248.             sleep(random(250, 500));
  249.         }
  250.         if (r == 13) {
  251.             Status = "Antiban: Camera";
  252.             camera.setCompass('s');
  253.             sleep(random(250, 500));
  254.         }
  255.         if (r == 19) {
  256.             Status = "Antiban: AFK";
  257.             sleep(random(1000, 1800));
  258.        
  259.         }
  260.         if (r == 10) {
  261.             Status = "Antiban: Off Screen";
  262.             mouse.moveOffScreen();
  263.             sleep(random(500, 700));
  264.         }
  265.     }
  266.  
  267.     public void pickPocket() {
  268.             RSNPC volnpc = npcs.getNearest(NPCvictim);
  269.                 if (volnpc != null){
  270.                     if (volnpc.isOnScreen()){
  271.                         volnpc.doAction("Pickpocket");
  272.                             thieving = 1;
  273.             }
  274.             Status = "PickPocketing...";
  275.         while (getMyPlayer().getAnimation() == 881) {
  276.             sleep(5);
  277.                                 }
  278.         }
  279.     }
  280.  
  281.     public int loop() {
  282. ////////////////////////////////
  283. ////////////Script Update///////
  284. ////////////////////////////////
  285. //Script Now Eats @ 1/2 Of Your HP///
  286. /////////////////////////////////////
  287.         if (combat.getLifePoints() < (skills.getRealLevel(3) * 10) / 2) {
  288.             inventory.getItem(foodID).doAction("Eat");
  289.                 return random(900, 1100);
  290.             }      
  291.         pickPocket();
  292.         antiban();
  293.         return (random(400, 800));
  294.     }
  295.  
  296. }
RAW Paste Data
Top