Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.rsbuddy.script.ActiveScript;
- import com.rsbuddy.script.Manifest;
- import com.rsbuddy.script.methods.Bank;
- import com.rsbuddy.script.methods.GroundItems;
- import com.rsbuddy.script.methods.Inventory;
- import com.rsbuddy.script.methods.Walking;
- import com.rsbuddy.script.util.Filter;
- import com.rsbuddy.script.wrappers.GroundItem;
- @SuppressWarnings("deprecation")
- @Manifest(authors={"wasup1"},name="nightshade",keywords={"nightshade"},version=0.3,description="Picks up nightshades, so you don't have too!")
- public class nightshade extends ActiveScript {
- public static int herbID = 2398;
- public int loop() {
- if (Inventory.isFull()) {
- if (Bank.isOpen()) {
- Bank.deposit(herbID, 26);
- } else {
- Bank.open();
- }
- } else {
- GroundItem adolf = GroundItems.getNearest(new Filter<GroundItem>() {
- public boolean accept(GroundItem adolf) {
- return adolf.getItem().getId() == 2398;
- }
- });
- if (adolf != null){
- if (adolf.isOnScreen()) {
- adolf.interact("Take");
- } else {
- Walking.setRun(true);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement