Guest User

Untitled

a guest
Jul 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. import java.awt.*;
  2. import java.util.*;
  3. import java.util.List;
  4. import java.util.logging.Level;
  5. import javax.accessibility.*;
  6. import javax.swing.*;
  7.  
  8. import org.rsbot.bot.Bot;
  9. import org.rsbot.script.*;
  10. import org.rsbot.script.wrappers.*;
  11. import org.rsbot.accessors.*;
  12. import org.rsbot.event.listeners.PaintListener;
  13. import org.rsbot.event.listeners.ServerMessageListener;
  14. import org.rsbot.event.events.ServerMessageEvent;
  15. import org.rsbot.util.ScreenshotUtil;
  16.  
  17. @ScriptManifest(authors = { "Silhouettic" }, category = "Other", name = "Accumulator", version = 1.00, description = "<html><head>Accumulator</head><body>Start the script in draynor bank with money and steel arrows in your inventory.</body></html\n")
  18. public class Accumulator extends Script implements PaintListener, ServerMessageListener {
  19.  
  20. // Path Arrays
  21. RSTile[] BankToManor = {new RSTile(3105, 3251), new RSTile(3104, 3267),
  22. new RSTile(3109, 3285), new RSTile(3109, 3299),
  23. new RSTile(3112, 3312), new RSTile(3112, 3325),
  24. new RSTile(3109, 3335), new RSTile(3109, 3346), };
  25. RSTile[] Door1 = { new RSTile(3108, 3352) };
  26. RSTile[] Door2 = { new RSTile(3109, 3357) };
  27. RSTile[] Door3 = {new RSTile(3107, 3362), new RSTile(3106, 3367) };
  28. RSTile[] Door4 = {new RSTile(3103, 3365) };
  29. RSTile[] Bookcase = { new RSTile(3098, 3359) };
  30. RSTile[] ToAva = { new RSTile(3094, 3357) };
  31.  
  32. private int runEnergy = random(40, 95);
  33.  
  34. private final int Ava = 5199;
  35.  
  36. private final ScriptManifest properties = getClass().getAnnotation(ScriptManifest.class);
  37.  
  38. public boolean onStart(Map<String, String> args) {
  39. return true;
  40. }
  41.  
  42. public int loop() {
  43. if (!isLoggedIn())
  44. return random(50, 100);
  45.  
  46. startRunning(runEnergy);
  47.  
  48. try {
  49. walkPath(BankToManor);
  50. return random(50, 100);
  51.  
  52. if (getObjectAt(Door1) == null && distanceTo(new RSTile(3109, 3347)) <= 3) {
  53. if (onTile(Door1, "Open", random(0.39, 0.61), random(0, 0.05), random(20, 50))) {
  54. failCount = 0;
  55. while (getObjectAt(Door1) {
  56. wait(random(50, 100));
  57. }
  58. }
  59. if (getObjectAt(Door1) == null)
  60. return random(50, 100);
  61. }
  62. return 100;
  63. }
  64.  
  65. public void serverMessageRecieved(final ServerMessageEvent arg0) {
  66. final String serverString = arg0.getMessage();
  67. }
  68.  
  69. public void onRepaint(Graphics g) {
  70. if(!isLoggedIn() || isLoginScreen()) {
  71. return;
  72. }
  73. /* TODO Paint here */
  74. }
  75.  
  76. public void onFinish() {
  77. ScreenshotUtil.takeScreenshot(true);
  78. }
  79. }
Add Comment
Please, Sign In to add comment