Guest User

Untitled

a guest
Jul 16th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1.  
  2. import java.awt.*;
  3. import java.util.*;
  4. import java.util.List;
  5. import java.util.logging.Level;
  6. import javax.accessibility.*;
  7. import javax.swing.*;
  8.  
  9. import org.rsbot.bot.Bot;
  10. import org.rsbot.script.*;
  11. import org.rsbot.script.wrappers.*;
  12. import org.rsbot.util.ScreenshotUtil;
  13. import org.rsbot.event.listeners.PaintListener;
  14. import org.rsbot.event.listeners.ServerMessageListener;
  15. import org.rsbot.event.events.ServerMessageEvent;
  16.  
  17. @ScriptManifest(authors = {"Slaven"}, category = "Thieving", name = "STealer", version = 1.00, description = "<html><head></head><body>All settings are in the GUI. Start in Varrock East bank.</body></html\n")
  18. public class STealer extends Script implements ServerMessageListener, PaintListener {
  19.  
  20. public int EXP_GAINED = 0;
  21. public int levelsGained = 0;
  22. public int TEA_ID = 1978;
  23. public int TEA_EXP = 16;
  24. public int stealingAnimation = 832;
  25. public int BANK_ID = 11402;
  26. RSTile[] toStall = {new RSTile(3265, 3419), new RSTile(3268, 3410)};
  27. public RSObject bankBooth = (RSObject) findObject(BANK_ID);
  28. public long startTime = System.currentTimeMillis();
  29. private String status = "";
  30. private final ScriptManifest properties = getClass().getAnnotation(ScriptManifest.class);
  31.  
  32. public boolean onStart(Map<String, String> args) {
  33. return true;
  34. }
  35. int teaStolen = 0;
  36.  
  37. public int loop() {
  38.  
  39. if(getMyPlayer().getAnimation() != -1) {
  40. return random(300,700);
  41. }
  42.  
  43. RSObject teaStall = findObject(635);
  44. if (teaStall != null) {
  45. RSTile stallTile = teaStall.getLocation();
  46. if (atTile(stallTile, "Steal")) {
  47. teaStolen++;
  48. }
  49. }
  50.  
  51. return random(150, 350);
  52. }
  53.  
  54. public void serverMessageRecieved(final ServerMessageEvent m) {
  55. if (m.getMessage().contains("You've just")) {
  56. levelsGained++;
  57. }
  58. }
  59.  
  60. public void onRepaint(Graphics g) {
  61. if (!isLoggedIn() || isLoginScreen()) {
  62. return;
  63. }
  64.  
  65.  
  66. }
  67.  
  68. public void onFinish() {
  69. }
  70. }
Add Comment
Please, Sign In to add comment