Guest User

Untitled

a guest
Apr 22nd, 2020
18
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2. public int onLoop() throws InterruptedException {
  3. if(players.myPlayer().isAnimating()){
  4. log("animating");
  5. if(random(1,30) == 1){
  6. if(random(1,2) == 1){
  7. log("backspace");
  8. getKeyboard().pressKey(8);
  9. getKeyboard().releaseKey(8);
  10. }else{
  11. log("random letter");
  12. Random r = new Random();
  13. char c = (char)(r.nextInt(26) + 'a');
  14. new TypeStringEvent(Character.toString(c), false);
  15. }
  16.  
  17. }
  18. }else{
  19. log("not animating");
  20. if(random(1,5) == 1){
  21. new ConditionalSleep(30000) {
  22. @Override
  23. public boolean condition() {
  24. return objects.closest("Pump") != null;
  25. }
  26. }.sleep();
  27. RS2Object pump = objects.closest("Pump");
  28. if(pump == null){
  29. log("null");
  30. return 200;
  31. }else{
  32. log("operate");
  33. pump.interact("Operate");
  34. }
  35.  
  36. }else{
  37. return 1000;
  38. }
  39. }
  40.  
  41. return 4000;
  42. }
RAW Paste Data