Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.08 KB | None | 0 0
  1. import com.rsbuddy.script.ActiveScript;
  2. import com.rsbuddy.script.Manifest;
  3. import com.rsbuddy.script.methods.Bank;
  4. import com.rsbuddy.script.methods.GroundItems;
  5. import com.rsbuddy.script.methods.Inventory;
  6. import com.rsbuddy.script.methods.Walking;
  7. import com.rsbuddy.script.util.Filter;
  8. import com.rsbuddy.script.wrappers.GroundItem;
  9.  
  10. @SuppressWarnings("deprecation")
  11. @Manifest(authors={"wasup1"},name="nightshade",keywords={"nightshade"},version=0.3,description="Picks up nightshades, so you don't have too!")
  12. public class nightshade extends ActiveScript {
  13.     public static int herbID = 2398;
  14.  
  15.     public int loop() {    
  16.         if (Inventory.isFull()) {
  17.             if (Bank.isOpen()) {
  18.                 Bank.deposit(herbID, 26);
  19.             } else {
  20.                 Bank.open();
  21.             }
  22.         } else {
  23.             GroundItem adolf = GroundItems.getNearest(new Filter<GroundItem>() {
  24.                 public boolean accept(GroundItem adolf) {
  25.                     return adolf.getItem().getId() == 2398;
  26.                 }
  27.             });
  28.            
  29.             if (adolf != null){
  30.                 if (adolf.isOnScreen()) {
  31.                     adolf.interact("Take");
  32.                 } else {
  33.                     Walking.setRun(true);
  34.                 }
  35.             }
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement