Examples of RSInterface


Examples of org.rsbot.script.wrappers.RSInterface

  private boolean solved() {
    if (index == -1) {
      return false;
    }
    final RSInterface solver = interfaces.get(CHEST_INTERFACE_PARENT);
    if (solver != null && solver.isValid()) {
      final RSComponent container = solver.getComponent(CHEST_INTERFACE_CENTER);
      final Rectangle centerArea = container.getArea();
      final Point p1 = solver.getComponent(INTERFACE_SOLVE_IDS[index][0]).getCenter();
      final Point p2 = solver.getComponent(INTERFACE_SOLVE_IDS[index][1]).getCenter();
      final Point p3 = solver.getComponent(INTERFACE_SOLVE_IDS[index][2]).getCenter();
      return centerArea.contains(p1) && centerArea.contains(p2) && centerArea.contains(p3);
    }
    return false;
  }
View Full Code Here

Examples of org.rsbot.script.wrappers.RSInterface

  public RSInterface getInterface() {
    return methods.interfaces.get(INTERFACE_LOBBY);
  }

  public RSComponent getComponent(int index) {
    RSInterface face = getInterface();
    if (face != null && face.isValid()) {
      return face.getComponent(index);
    }
    return null;
  }
View Full Code Here

Examples of org.rsbot.script.wrappers.RSInterface

@ScriptManifest(authors = {"ToshiXZ"}, name = "TeleotherCloser", version = 1.0)
public class TeleotherCloser extends Random {

  @Override
  public boolean activateCondition() {
    final RSInterface iface = interfaces.get(326);
    return iface.isValid() && iface.getComponent(2).getText().contains("wants to teleport");
  }
View Full Code Here

Examples of org.rsbot.script.wrappers.RSInterface

   *
   * @param action the action string
   * @return <tt>true</tt> if action is performed.
   */
  public boolean setLeftClickOption(final String action) {
    final RSInterface optionInterface = methods.interfaces.get(INTERFACE_OPTIONS);
    int index = -1;
    for (final RSComponent option : optionInterface.getComponents()) {
      if (option != null && option.getText() != null) {
        if (option.containsAction(action) || option.containsText(action)) {
          index = option.getIndex();
        }
      }
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.