Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. public int onLoop()throws InterruptedException{
  2. Inventory inven = getInventory();
  3. Player player = myPlayer();
  4. Bank bank = getBank();
  5.  
  6. if ((settings.getRunEnergy() > 30) && (!settings.isRunning())) {
  7. settings.setRunning(true);
  8. }
  9. if (!inven.isFull()){
  10. Entity gate = objects.closest(GATE, 7160);
  11. if (gate != null) {
  12. if (gate.exists() && gate.isVisible() && (!player.isAnimating())) {
  13. gate.interact("Open");
  14. sleep(random(1000, 2000));
  15. map.walk(PICK_AREA);
  16. }
  17. }
  18. if (PICK_AREA.contains(player)){
  19. Entity po = objects.closest(PICK_AREA, POTATO);
  20. if (po != null) {
  21. if (po.exists() && po.isVisible() && (!player.isAnimating())) {
  22. po.interact("Pick");
  23. sleep(random(1000, 2000));
  24. }else{
  25. camera.toEntity(po);
  26. }
  27. }else{
  28. walkPath(path1);
  29. }
  30. }
  31. } else if (this.BANK_AREA.contains(player)){
  32. Entity bankbooth = objects.closest(BANK_BOOTH_ID);
  33. Entity gate = objects.closest(GATE, 7160);
  34. if (gate != null) {
  35. if (gate.exists() && gate.isVisible() && (!player.isAnimating())) {
  36. gate.interact("Open");
  37. sleep(random(1000, 2000));
  38. map.walk(BANK_AREA);
  39. }else{
  40. camera.toEntity(gate);
  41. }
  42. }
  43. if (!bank.isOpen() && bankbooth != null) {
  44. if (bankbooth.isVisible())
  45. {
  46. bankbooth.interact("Bank");
  47. sleep(random(2000, 4000));
  48. }{
  49. camera.toEntity(bankbooth);
  50. }
  51. }
  52. }else{
  53. walkPath(path2);
  54. }
  55. return random(300, 400);
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement