Package rsb.methods
Class Tiles
java.lang.Object
rsb.methods.MethodProvider
rsb.methods.Tiles
Tile related operations.
-
Field Summary
Fields inherited from class rsb.methods.MethodProvider
methods
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Clicks a tile if it is on screen with given offsets in 3D space.boolean
boolean
Clicks a tile if it is on screen.boolean
Clicks a tile if it is on screen.Returns the RSTile under the mouse.getTileUnderPoint
(net.runelite.api.Point p) Gets the tile under a point.boolean
Checks if the tile "t" is closer to the player than the tile "tt"
-
Method Details
-
doAction
Clicks a tile if it is on screen with given offsets in 3D space.- Parameters:
tile
- TheRSTile
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 theRSTile
at. Use 1 for tables, 0 by default.action
- The action to perform at the givenRSTile
.- Returns:
true
if no exceptions were thrown; otherwisefalse
.
-
doAction
-
doAction
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; otherwisefalse
.
-
doAction
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 clickoption
- Option of the menu entry to click- Returns:
true
if the tile was clicked; otherwisefalse
.
-
getTileUnderMouse
Returns the RSTile under the mouse.- Returns:
- The
RSTile
under the mouse, or null if the mouse is not over the viewport.
-
getTileUnderPoint
Gets the tile under a point.- Parameters:
p
- a point (X, Y)- Returns:
- RSTile at the point's location
-
isCloser
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.
-