Ejemplo n.º 1
0
  public boolean useInteract() {

    if (Inventory.getCount(craftable.getRawID()) > 0) {
      RSItem[] items = Inventory.find(craftable.getRawID());

      int size = items.length;

      RSItem item = items[General.random(0, size)];

      if (item.click("Use")) {
        RSObject oa[] = Objects.findNearest(station.getMaxDist(), station.getID());

        if (oa != null && oa.length > 0) {
          RSObject o = oa[0];

          if (o.isOnScreen()) {
            o.click(station.getOption());
            General.sleep(400, 800);
          }
        }
      }
    }

    return false;
  }
Ejemplo n.º 2
0
  public boolean forgeRing() {

    RSObject oa[] = Objects.findNearest(station.getMaxDist(), station.getID());

    if (oa != null && oa.length > 0) {
      RSObject o = oa[0];
      RSInterface menu = Interfaces.get(0, 0);

      if (o.isOnScreen()) {
        if (menu != null) {

        } else {
          useInteract();
        }

        return true;

      } else {
        Walking.walkTo(o.getPosition());
      }
    }

    return false;
  }