Class Walking
- java.lang.Object
-
- org.dreambot.api.methods.walking.impl.Walking
-
public class Walking extends java.lang.Object
The type Walking impl.
-
-
Field Summary
Fields Modifier and Type Field Description static int
RUN_ORB_CHILD_ID
static int
RUN_SETTINGS_ID
static int
RUN_WIDGET_CHILD
static int
RUN_WIDGET_ID
-
Constructor Summary
Constructors Constructor Description Walking()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
canWalk(Tile destination)
Returns whether you are able to walk to the tile, only works with local tiles.static boolean
canWalk(Entity destination)
Checks whether you can walk to a given entity using local walk.static boolean
clickTileOnMinimap(Tile tile)
Interacts with a tile on the minimapstatic AStarPathFinder
getAStarPathFinder()
Gets the local AStarPathFinderstatic Tile
getClosestTileOnMap(Tile tile)
Returns the closest tile on the minimap to offset given tile.static Tile
getDestination()
Gets destination tile (red mini map flag).static int
getDestinationDistance()
Gets the distance from the destinationstatic DijkstraPathFinder
getDijPathFinder()
Gets the local DijkstraPathFinderstatic int
getRunEnergy()
Gets the current run energystatic int
getRunThreshold()
Gets energy level which run will be toggled when using default walk methods.static Walking
getWalking()
Deprecated.static WebFinder
getWebPathFinder()
Gets the web path finder.static boolean
isRunEnabled()
Checks whether running is currently enabled via playerSettings.static void
setObstacleSleeping(boolean shouldSleep)
static void
setRunThreshold(int runThreshold)
Sets energy level which run will be toggled when using default walk methods.static boolean
shouldObstacleSleep()
static boolean
shouldWalk()
Calls shouldWalk(4) SeeshouldWalk(int)
static boolean
shouldWalk(int distance)
Returns whether you should walk - if you're moving, it'll check if your distance to destination is less than specifiedstatic boolean
toggleRun()
Turns on/off run.static boolean
walk(int x, int y)
Walks to the tile at (x, y, 0)static boolean
walk(int x, int y, int z)
Walks to the tile at (x, y, z)static boolean
walk(Tile tile)
Walks to any tile, using a combination of web and local pathfinders.static boolean
walk(Entity entity)
Walks to the tile (or nearest walkable tile) of the entity.static boolean
walk(Locatable locatable)
Walks to any locatable, using a combination of web and local pathfinders.static boolean
walkExact(Tile tile)
Attempts to walk to the exact tilestatic boolean
walkOnScreen(Tile tile)
Walks to a tile on the main game screen
-
-
-
Field Detail
-
RUN_WIDGET_ID
public static final int RUN_WIDGET_ID
- See Also:
- Constant Field Values
-
RUN_SETTINGS_ID
public static final int RUN_SETTINGS_ID
- See Also:
- Constant Field Values
-
RUN_WIDGET_CHILD
public static final int RUN_WIDGET_CHILD
- See Also:
- Constant Field Values
-
RUN_ORB_CHILD_ID
public static final int RUN_ORB_CHILD_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getWalking
@Deprecated public static Walking getWalking()
Deprecated.
-
walk
public static boolean walk(int x, int y)
Walks to the tile at (x, y, 0)- Parameters:
x
- The x position of the tiley
- The y position of the tile- Returns:
- True if successfully moved
-
walk
public static boolean walk(int x, int y, int z)
Walks to the tile at (x, y, z)- Parameters:
x
- The x position of the tiley
- The y position of the tilez
- The z position of the tile- Returns:
- True if successfully moved
-
walk
public static boolean walk(Entity entity)
Walks to the tile (or nearest walkable tile) of the entity.- Parameters:
entity
- Entity to walk to.- Returns:
- True if successfully moved
-
walk
public static boolean walk(Tile tile)
Walks to any tile, using a combination of web and local pathfinders.- Parameters:
tile
- the destination tile.- Returns:
- true if the client made progress or reached the tile
-
walk
public static boolean walk(Locatable locatable)
Walks to any locatable, using a combination of web and local pathfinders.- Parameters:
locatable
- the destination locatable- Returns:
- true if the client made progress or reached the locatable
-
clickTileOnMinimap
public static boolean clickTileOnMinimap(Tile tile)
Interacts with a tile on the minimap- Parameters:
tile
- Tile to interact with- Returns:
- True if clicked successfully
-
walkOnScreen
public static boolean walkOnScreen(Tile tile)
Walks to a tile on the main game screen- Parameters:
tile
- Tile to walk to- Returns:
- True if successfully interacted with Tile
-
walkExact
public static boolean walkExact(Tile tile)
Attempts to walk to the exact tile- Parameters:
tile
- Tile to walk to- Returns:
- true if successfully interacted with Tile
-
shouldWalk
public static boolean shouldWalk(int distance)
Returns whether you should walk - if you're moving, it'll check if your distance to destination is less than specified- Parameters:
distance
- Distance to check from destination- Returns:
- True if distance to current destination is less than specified, True if not moving, else false.
-
shouldWalk
public static boolean shouldWalk()
Calls shouldWalk(4) SeeshouldWalk(int)
- Returns:
- true if it should walk or not based off movement and distance to the destination flag
-
toggleRun
public static boolean toggleRun()
Turns on/off run.- Returns:
- true if run setting was successfully changed.
-
isRunEnabled
public static boolean isRunEnabled()
Checks whether running is currently enabled via playerSettings.- Returns:
- true if the run option is enabled.
-
getRunEnergy
public static int getRunEnergy()
Gets the current run energy- Returns:
- 0 to 100
-
getClosestTileOnMap
public static Tile getClosestTileOnMap(Tile tile)
Returns the closest tile on the minimap to offset given tile.- Parameters:
tile
- The destination tile.- Returns:
- Returns the closest tile to the destination on the minimap.
-
getRunThreshold
public static int getRunThreshold()
Gets energy level which run will be toggled when using default walk methods.- Returns:
- runThreshold the energy level which you would like to start running.
-
setRunThreshold
public static void setRunThreshold(int runThreshold)
Sets energy level which run will be toggled when using default walk methods.- Parameters:
runThreshold
- the energy level which you would like to start running.
-
getAStarPathFinder
public static AStarPathFinder getAStarPathFinder()
Gets the local AStarPathFinder- Returns:
- local AStarPathFinder
-
getDijPathFinder
public static DijkstraPathFinder getDijPathFinder()
Gets the local DijkstraPathFinder- Returns:
- local DijkstraPathFinder
-
getDestinationDistance
public static int getDestinationDistance()
Gets the distance from the destination- Returns:
- Distance from destination, -1 if there is no destination
-
getWebPathFinder
public static WebFinder getWebPathFinder()
Gets the web path finder.- Returns:
- the web path finder
-
getDestination
public static Tile getDestination()
Gets destination tile (red mini map flag).- Returns:
- Your player's destination, null if not moving
-
canWalk
public static boolean canWalk(Tile destination)
Returns whether you are able to walk to the tile, only works with local tiles.- Parameters:
destination
- Tile to check if you can walk to- Returns:
- True if able to find a path, false if not local or unable to find a path to tile.
-
canWalk
public static boolean canWalk(Entity destination)
Checks whether you can walk to a given entity using local walk.- Parameters:
destination
- Entity to check against- Returns:
- True if able to find a path to entity, false if entity is null, not local, or not able to find a path
-
setObstacleSleeping
public static void setObstacleSleeping(boolean shouldSleep)
-
shouldObstacleSleep
public static boolean shouldObstacleSleep()
-
-