Examples of RSItem


Examples of org.rsbot.script.wrappers.RSItem

   *
   * @param slot The slot from where the item should be retrieved.
   * @return The equipped item.
   */
  public RSItem getItem(final Slot slot) {
    return new RSItem(methods, getInterface().getComponent(slot.componentID()));
  }
View Full Code Here

Examples of org.rsbot.script.wrappers.RSItem

      return new RSGroundItem[0];
    }

    final Deque<org.rsbot.client.RSItem> itemNL = new Deque<org.rsbot.client.RSItem>(itemNLC.getNodeList());
    for (org.rsbot.client.RSItem item = itemNL.getHead(); item != null; item = itemNL.getNext()) {
      list.add(new RSGroundItem(methods, new RSTile(x, y, methods.game.getPlane()), new RSItem(methods, item)));
    }

    return list.toArray(new RSGroundItem[list.size()]);
  }
View Full Code Here

Examples of org.rsbot.script.wrappers.RSItem

      if (interfaces.get(INTERFACE_GRAVE).isValid()) {
        atCloseInterface(INTERFACE_GRAVE, INTERFACE_GRAVE_CLOSE);
        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);
          if (interfaces.getComponent(INTERFACE_COFFIN) != null) {
            final Integer[] allItems = new Integer[INTERFACE_COFFIN_IDS.length];
            final List<Integer> ids = new ArrayList<Integer>();
            for (final int index : INTERFACE_COFFIN_IDS) {
              ids.add(interfaces.getComponent(INTERFACE_COFFIN, index).getComponentID());
            }
            ids.toArray(allItems);
            boolean found = false;
            for (Coffin coffin : coffins) {
              if (coffin.doesMatch(allItems)) {
                coffin.setCoffinID(undecidedID);
                found = true;
                break;
              }
            }
            if (!found) {
              log("IDs have changed, please alert Timer.");
              return -1;
            }
          }
        }
        if (interfaces.get(INTERFACE_COFFIN).isValid()) {
          atCloseInterface(INTERFACE_COFFIN, INTERFACE_COFFIN_CLOSE);
          sleep(500, 800);
        }
      }
    } else {
      boolean done = true;
      for (Coffin coffin : coffins) {
        if (!coffin.set) {
          done = false;
          final int graveID = getEmptyGrave(coffin.stoneID);
          final RSObject grave = objects.getNearest(graveID);
          if (grave != null) {
            getObjectInView(grave);
            final RSItem theCoffin = inventory.getItem(coffin.coffinID);
            if (theCoffin != null) {
              if (useItem(theCoffin, grave)) {
                final long systemTime = System.currentTimeMillis();
                while (System.currentTimeMillis() - systemTime < 8000 && !(getMyPlayer().getAnimation() == 827)) {
                  sleep(50, 150);
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.