Package org.rsbot.script.wrappers

Examples of org.rsbot.script.wrappers.RSComponent.doClick()


   * @return <tt>true</tt> if continue component was clicked; otherwise
   *         <tt>false</tt>.
   */
  public boolean clickContinue() {
    final RSComponent cont = getContinueComponent();
    return cont != null && cont.isValid() && cont.doClick(true);
  }

  /**
   * @return <tt>RSComponent</tt> containing "Click here to continue";
   *         otherwise null.
View Full Code Here


                 CONFIRM = interfaces.getComponent(Values.INTERFACE_MAIN_BOX, Values.INTERFACE_BOX_CONFIRM_BUTTON);
                if (REWARD_INTERFACE == null || CONFIRM == null) {
                    return 10;
                }
                /** Click reward & Confirm */
                return REWARD_INTERFACE.doClick() && CONFIRM.doClick() ? random(500, 1500) : 10;
            case HANDLE_XP_REWARD:
                if (SELECTED_REWARD == null) {
                    return 100;
                }
                if (XP_POINT != null && XP_POINT.length > 0) {
View Full Code Here

        final RSComponent inf = window.getComponent(i);
        if (DEBUG) {
          log.info("child[" + i + "] ID: " + inf.getModelID() + " == " + ID_Items[offset]);
        }
        if (inf.getModelID() == ID_Items[offset]) {
          inf.doClick();
          sleep(900, 1200); // Yea, use a sleep here! (Waits are allowed in randoms.)
          if (!interfaces.get(ID_InterfaceSandwhichWindow).isValid()) {
            log.info("Solved the Sandwich Lady, by eating a " + Item_Names[offset]);
            sleep(6000);
            return random(900, 1500);
View Full Code Here

        if (interfaces.clickContinue()) {
          return random(1000, 1500);
        }
        final RSComponent okay = interfaces.getComponent(TALK_INTERFACE, 3);
        if (okay.isValid()) {
          if (okay.doClick()) {
            return random(200, 500);
          }
        }
        break;
View Full Code Here

              direction = random(0, 2);
            }
            final RSComponent arrow = solver.getComponent(ARROWS[i][direction]);
            while (container.isValid() && target.isValid() && arrow.isValid() &&
                !container.getArea().contains(target.getCenter()) && new Timer(10000).isRunning()) {
              if (arrow.doClick()) {
                sleep(random(800, 1200));
              }
            }
          }
        }
View Full Code Here

   */
  public void setAutoRetaliate(final boolean enable) {
    if (isAutoRetaliateEnabled() != enable && methods.game.openTab(Game.Tab.ATTACK)) {
      final RSComponent autoRetal = methods.interfaces.getComponent(884, 15);
      if (autoRetal != null) {
        autoRetal.doClick();
      }
    }
  }

  /**
 
View Full Code Here

    if (styleIndex == getFightMode()) {
      return true;
    }
    if (methods.game.openTab(Game.Tab.ATTACK)) {
      final RSComponent button = methods.interfaces.getComponent(884, styleIndex + 11);
      if (button != null && button.doClick(true)) {
        final Timer timer = new Timer(800);
        while (timer.isRunning() && getFightMode() != styleIndex) {
          sleep(50);
        }
        return getFightMode() == styleIndex;
View Full Code Here

  public boolean setSpecialAttack(final boolean enabled) {
    if (isSpecialEnabled() != enabled) {
      methods.game.openTab(Game.Tab.ATTACK);
      final RSComponent specBar = methods.interfaces.getComponent(884, 4);
      if (specBar != null && isSpecialEnabled() != enabled) {
        return specBar.doClick();
      }
    }
    return false;
  }
}
View Full Code Here

   * @return <tt>true</tt> if the setting was clicked; otherwise <tt>false</tt>.
   */
  public boolean disableAid() {
    if (methods.settings.getSetting(427) == 1 && openTab(Tab.OPTIONS)) {
      final RSComponent toggle = methods.interfaces.getComponent(Tab.OPTIONS.interfaceID(), 7);
      return toggle != null && toggle.doClick();
    }
    return false;
  }

  /**
 
View Full Code Here

      return false;
    }
    if (getTab() != Tab.LOGOUT) {
      final int idx = methods.client.getGUIRSInterfaceIndex();
      RSComponent exitComponent = methods.interfaces.getComponent(idx, isFixed() ? 182 : 176);
      if (exitComponent == null || !exitComponent.doClick()) {
        return false;
      }
      long time = System.currentTimeMillis();
      while (getTab() != Tab.LOGOUT) {
        if (System.currentTimeMillis() - time > 2000) {
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.