Guest User

Untitled

a guest
Jan 21st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.72 KB | None | 0 0
  1. import java.awt.*;
  2.  
  3. import com.rsbuddy.event.listeners.PaintListener;
  4. import com.rsbuddy.script.ActiveScript;
  5. import com.rsbuddy.script.Manifest;
  6. import com.rsbuddy.script.methods.Bank;
  7. import com.rsbuddy.script.methods.Camera;
  8. import com.rsbuddy.script.methods.Environment;
  9. import com.rsbuddy.script.methods.Inventory;
  10. import com.rsbuddy.script.methods.Magic;
  11. import com.rsbuddy.script.methods.Mouse;
  12. import com.rsbuddy.script.methods.Skills;
  13. import com.rsbuddy.script.util.Random;
  14. import com.rsbuddy.script.util.Timer;
  15. import java.text.NumberFormat;
  16.  
  17. @Manifest(authors={"Remi"}, name="RHumidify", keywords={"magic, humidify, clay, money, making, remi"}, version=1, description="Start at any bank or chest.")
  18. public class RHumidify extends ActiveScript implements PaintListener {
  19.  
  20. private long startXP;
  21. private int startLevel;
  22. private long startTime;
  23. private long seconds = 0, minutes = 0, hours = 0;
  24. long runTime = System.currentTimeMillis() - startTime;
  25.  
  26. final Font comicPlain10 = new Font("Comic Sans MS", Font.PLAIN, 10);
  27. final Color black = new Color(0, 0, 0);
  28.  
  29. private void idle() {
  30. if (Random.nextInt(0, 500) == 0) {
  31. Mouse.setSpeed(10);
  32. int rand2 = Random.nextInt(1, 3);
  33. for (int i = 0; i < rand2; i++) {
  34. Mouse.move(Random.nextInt(100, 700), Random.nextInt(100, 500));
  35. sleep(Random.nextInt(200, 700));
  36. }
  37. Mouse.move(Random.nextInt(0, 800), 647, 50, 100);
  38. sleep(Random.nextInt(100, 1500));
  39. Mouse.move(Random.nextInt(75, 400), Random.nextInt(75, 400), 30);
  40. Mouse.setSpeed(Random.nextInt(3, 5));
  41. }
  42. if (Random.nextInt(0, 500) == 0) {
  43. Mouse.setSpeed(10);
  44. Point curPos = Mouse.getLocation();
  45. Mouse.move(Random.nextInt(0, 750), Random.nextInt(0, 500), 20);
  46. sleep(Random.nextInt(100, 300));
  47. Mouse.move(curPos, 20, 20);
  48. Mouse.setSpeed(Random.nextInt(3, 5));
  49. }
  50. if (Random.nextInt(0, 500) == 0) {
  51. int angle = Camera.getCompassAngle();
  52. int rand = Random.nextInt(0, 40);
  53. if (Random.nextInt(0, 2) == 0) {
  54. angle += rand;
  55. } else {
  56. angle -= rand;
  57. }
  58. if (angle < 0) {
  59. angle += 359;
  60. }
  61. if (angle > 359) {
  62. angle -= 359;
  63. }
  64. Camera.setCompassAngle(angle);
  65. }
  66. if (Random.nextInt(0, 500) == 0) {
  67. if (Random.nextInt(0, 4) == 0) {
  68. Camera.setPitch(Random.nextInt(50, 80));
  69. } else {
  70. Camera.setPitch(true);
  71. }
  72. }
  73. }
  74.  
  75. @Override
  76. public int loop() {
  77. if (Inventory.contains(434)) {
  78. humidify();
  79. } else
  80. if (Inventory.contains(1761)) {
  81. bank();
  82. } else
  83. if (Inventory.contains(9075) && !Inventory.contains(434) && !Inventory.contains(1761)) {
  84. bank();
  85. }
  86. return 500;
  87. }
  88.  
  89. public void humidify() {
  90. if (Inventory.isFull() && Inventory.contains(434)) {
  91.  
  92. } else {
  93. bank();
  94. }
  95. }
  96.  
  97. private void bank() {
  98. Bank.open();
  99. sleep(300, 600);
  100. Bank.depositAllExcept(9075);
  101. Bank.withdraw(434, 27);
  102. Bank.close();
  103. }
  104.  
  105. @Override
  106. public boolean onStart() {
  107. idle();
  108. Mouse.setSpeed(1);
  109. t = new Timer(0);
  110. startTime = System.currentTimeMillis();
  111. startXP = Skills.getCurrentExp(Skills.MAGIC);
  112. startLevel = Skills.getMaxLevel(Skills.MAGIC);
  113. return true;
  114. }
  115.  
  116. @Override
  117. public void onFinish() {
  118. Environment.saveScreenshot(true);
  119. }
  120.  
  121. public void onRepaint(Graphics g1) {
  122. Graphics2D g = (Graphics2D)g1;
  123. seconds = runTime / 1000;
  124. if (seconds >= 60) {
  125. minutes = seconds / 60;
  126. seconds -= (minutes * 60);
  127. }
  128. if (minutes >= 60) {
  129. hours = minutes / 60;
  130. minutes -= (hours * 60);
  131. }
  132. int levelGain = (Skills.getMaxLevel(Skills.MAGIC) - startLevel);
  133. int expGain = (int)(Skills.getCurrentExp(Skills.MAGIC) - startXP);
  134. g.drawString("lol", 30, 30);
  135. }
  136. }
Add Comment
Please, Sign In to add comment