Package org.rsbot.script.wrappers

Examples of org.rsbot.script.wrappers.RSItem.interact()


    }
    while ((item = getItem(itemID)) != null) {
      if (methods.interfaces.get(94).isValid()) {
        methods.interfaces.getComponent(94, 3).doClick();
      } else {
        item.interact("Destroy");
      }
      sleep(random(700, 1100));
    }
    return true;
  }
View Full Code Here


    }
    if (col < 0 || col > 3 || row < 0 || row > 6) {
      return false;
    }
    final RSItem item = getItems()[col + row * 4];
    return item != null && item.getID() != -1 && item.interact("Drop");
  }

  /**
   * Drops the given RSItem
   *
 
View Full Code Here

        && !methods.interfaces.get(Bank.INTERFACE_BANK).isValid()
        && !methods.interfaces.get(Store.INTERFACE_STORE).isValid()) {
      methods.game.openTab(Game.Tab.INVENTORY);
    }
    RSItem item = getItem(id);
    return item != null && item.getID() != -1 && item.interact("Drop");
  }

  /**
   * Gets the count of all items in your inventory, ignoring stack sizes.
   *
 
View Full Code Here

    RSItem selItem = getSelectedItem();
    if (selItem != null && selItem.getID() == itemID) {
      return true;
    }
    if (selItem != null) {
      selItem.interact("Use");
    }
    if (!item.interact("Use")) {
      return false;
    }
    for (int c = 0; c < 5 && (selItem = getSelectedItem()) == null; c++) {
View Full Code Here

    }
    final int inventoryCount = methods.inventory.getCount(true);
    final RSItem item = getItem(itemID);
    if (item != null) {
      if (count >= 500) {
        if (item.interact("Buy 500")) {
          sleep(random(500, 700));
          return buy(itemID, (count - 500));
        } else {
          return false;
        }
View Full Code Here

          return buy(itemID, (count - 500));
        } else {
          return false;
        }
      } else if (count >= 50 && count < 500) {
        if (item.interact("Buy 50")) {
          sleep(random(500, 700));
          return buy(itemID, (count - 50));
        } else {
          return false;
        }
View Full Code Here

          return buy(itemID, (count - 50));
        } else {
          return false;
        }
      } else if (count >= 10 && count < 50) {
        if (item.interact("Buy 10")) {
          sleep(random(500, 700));
          return buy(itemID, (count - 10));
        } else {
          return false;
        }
View Full Code Here

          return buy(itemID, (count - 10));
        } else {
          return false;
        }
      } else if (count >= 5 && count < 10) {
        if (item.interact("Buy 5")) {
          sleep(random(500, 700));
          return buy(itemID, (count - 5));
        } else {
          return false;
        }
View Full Code Here

          return buy(itemID, (count - 5));
        } else {
          return false;
        }
      } else if (count >= 1 && count < 5) {
        if (item.interact("Buy 1")) {
          sleep(random(500, 700));
          return buy(itemID, (count - 1));
        } else {
          return false;
        }
View Full Code Here

        sleep(500, 800);
      }
    } else if ((undecidedID = getUndecidedCoffin()) != -1) {
      final RSItem item = inventory.getItem(undecidedID);
      if (item != null) {
        if (item.interact("Check")) {
          final long systemTime = System.currentTimeMillis();
          while (System.currentTimeMillis() - systemTime < 8000 && !interfaces.get(INTERFACE_COFFIN).isValid()) {
            sleep(50, 150);
          }
          sleep(1200, 2500);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.