Package rsb.methods

Class Tiles


public class Tiles extends MethodProvider
Tile related operations.
  • Method Details

    • doAction

      public boolean doAction(RSTile tile, double xd, double yd, int h, String action)
      Clicks a tile if it is on screen with given offsets in 3D space.
      Parameters:
      tile - The RSTile to do the action at.
      xd - Distance from bottom left of the tile to bottom right. Ranges from 0-1.
      yd - Distance from bottom left of the tile to top left. Ranges from 0-1.
      h - Height to click the RSTile at. Use 1 for tables, 0 by default.
      action - The action to perform at the given RSTile.
      Returns:
      true if no exceptions were thrown; otherwise false.
    • doAction

      public boolean doAction(RSTile tile, double xd, double yd, int h, String action, String option)
    • doAction

      public boolean doAction(RSTile tile, String action)
      Clicks a tile if it is on screen. It will left-click if the action is available as the default option, otherwise it will right-click and check for the action in the context methods.menu.
      Parameters:
      tile - The RSTile that you want to click.
      action - Action command to use click
      Returns:
      true if the tile was clicked; otherwise false.
    • doAction

      public boolean doAction(RSTile tile, String action, String option)
      Clicks a tile if it is on screen. It will left-click if the action is available as the default menu action, otherwise it will right-click and check for the action in the context methods.menu.
      Parameters:
      tile - The RSTile that you want to click.
      action - Action of the menu entry to click
      option - Option of the menu entry to click
      Returns:
      true if the tile was clicked; otherwise false.
    • getTileUnderMouse

      public RSTile getTileUnderMouse()
      Returns the RSTile under the mouse.
      Returns:
      The RSTile under the mouse, or null if the mouse is not over the viewport.
    • getTileUnderPoint

      public RSTile getTileUnderPoint(net.runelite.api.Point p)
      Gets the tile under a point.
      Parameters:
      p - a point (X, Y)
      Returns:
      RSTile at the point's location
    • isCloser

      public boolean isCloser(RSTile t, RSTile tt)
      Checks if the tile "t" is closer to the player than the tile "tt"
      Parameters:
      t - First tile.
      tt - Second tile.
      Returns:
      True if the first tile is closer to the player than the second tile, otherwise false.