blahs44

Untitled

Oct 14th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.91 KB | None | 0 0
  1. String[] LOOT_NAMES = { "Green dragonhide", "Dragon bones", "Nature rune",
  2.             "Rune dagger", "Clue scroll", "Dragon spear", "Shield left half" };
  3.  
  4. public boolean checkLoot() throws InterruptedException {
  5.  
  6.         GroundItem GROUND_ITEM = closestGroundItemForName(this.LOOT_NAMES);
  7.         if (GROUND_ITEM == null) {
  8.             return false;
  9.         }
  10.         if ((this.client.getInventory().isFull())
  11.                 && (this.client.getInventory().contains(vars.UsedFoodId))) {
  12.             this.client.getInventory().interactWithId(vars.UsedFoodId, "Eat");
  13.         }
  14.  
  15.         if (!GROUND_ITEM.isVisible()) {
  16.             try {
  17.                 walk(GROUND_ITEM);
  18.             } catch (UnsupportedOperationException localUnsupportedOperationException) {
  19.             }
  20.             sleep(500);
  21.             while (this.client.getMyPlayer().isMoving()) {
  22.                 sleep(200);
  23.             }
  24.         }
  25.         GROUND_ITEM.interact("Take");
  26.         sleep(500);
  27.         while (this.client.getMyPlayer().isMoving()) {
  28.             sleep(200);
  29.         }
  30.         return true;
  31.     }
  32.  
  33. checkLoot();
Advertisement
Add Comment
Please, Sign In to add comment