Package rsb.methods
Class Walking
java.lang.Object
rsb.methods.MethodProvider
rsb.methods.Walking
Walking related operations.
-
Field Summary
Fields inherited from class rsb.methods.MethodProvider
methods -
Method Summary
Modifier and TypeMethodDescriptionRSTile[]Deprecated.getClosestTileOnMap(RSTile tile) Returns the closest tile on the minimap to a given tile.int[][]getCollisionFlags(int plane) Gets the collision flags for a given floor level in the loaded region.Gets the destination tile (where the flag is on the minimap).intReturns the player's current run energy.Checks the obfuscated field to determine if it is collisiondata or not.Generates a path from the player's current location to a destination tile.booleanDetermines whether a given tile is in the loaded map area.booleanReturns whether run is enabled.newTilePath(RSTile[] tiles) Creates a new path based on a provided array of tile waypoints.Deprecated.Deprecated.Deprecated.RSTile[]randomizePath(RSTile[] path, int maxXDeviation, int maxYDeviation) Deprecated.randomizeTile(RSTile tile, int maxXDeviation, int maxYDeviation) Deprecated.RSTile[]reversePath(RSTile[] other) Deprecated.booleansetRun(boolean enable) Turns run on or off using the game GUI controls.booleanwalkPathMM(RSTile[] path) Deprecated.booleanwalkPathMM(RSTile[] path, int maxDist) Deprecated.booleanwalkPathMM(RSTile[] path, int randX, int randY) Deprecated.booleanwalkPathMM(RSTile[] path, int maxDist, int randX, int randY) Deprecated.booleanwalkPathOnScreen(RSTile[] path) Deprecated.booleanwalkPathOnScreen(RSTile[] path, int maxDist) Deprecated.booleanwalkTileMM(RSTile t) Walks to the given tile using the minimap with 1 tile randomness.booleanwalkTileMM(RSTile t, int r) Walks to the given tile using the minimap with given randomness.booleanwalkTileMM(RSTile t, int x, int y) Walks to the given tile using the minimap with given randomness.booleanwalkTileOnScreen(RSTile tileToWalk) Walks to a tile using onScreen clicks and not the MiniMap.booleanWalks one tile towards the given destination using a generated path.
-
Method Details
-
newTilePath
Creates a new path based on a provided array of tile waypoints.- Parameters:
tiles- The waypoint tiles.- Returns:
- An RSTilePath.
-
getPath
Generates a path from the player's current location to a destination tile.- Parameters:
destination- The destination tile.- Returns:
- The path as an RSPath.
-
isLocal
Determines whether a given tile is in the loaded map area.- Parameters:
tile- The tile to check.- Returns:
trueif local; otherwisefalse.
-
walkTo
Walks one tile towards the given destination using a generated path.- Parameters:
destination- The destination tile.- Returns:
trueif the next tile was walked to; otherwisefalse.
-
walkTileMM
Walks to the given tile using the minimap with 1 tile randomness.- Parameters:
t- The tile to walk to.- Returns:
trueif the tile was clicked; otherwisefalse.- See Also:
-
walkTileMM
Walks to the given tile using the minimap with given randomness.- Parameters:
t- The tile to walk to.x- The x randomness (between 0 and x-1).y- The y randomness (between 0 and y-1).- Returns:
trueif the tile was clicked; otherwisefalse.
-
walkTileMM
Walks to the given tile using the minimap with given randomness.- Parameters:
t- The tile to walk to.r- The maximum deviation from the tile to allow.- Returns:
trueif the tile was clicked; otherwisefalse.
-
walkTileOnScreen
Walks to a tile using onScreen clicks and not the MiniMap. If the tile is not on the screen, it will find the closest tile that is on screen and it will walk there instead.- Parameters:
tileToWalk- Tile to walk.- Returns:
- True if successful.
-
setRun
public boolean setRun(boolean enable) Turns run on or off using the game GUI controls.- Parameters:
enable-trueto enable run,falseto disable it.- Returns:
- if run was attempted to be enabled
true; otherwisefalse
-
findPath
Deprecated.Generates a path from the player's current location to a destination tile.- Parameters:
destination- The destination tile.- Returns:
- The path as an RSTile array.
-
randomize
Deprecated.Randomizes a single tile.- Parameters:
tile- The RSTile to randomize.maxXDeviation- Max X distance from tile.getX().maxYDeviation- Max Y distance from tile.getY().- Returns:
- The randomized tile.
-
getClosestTileOnMap
Returns the closest tile on the minimap to a given tile.- Parameters:
tile- The destination tile.- Returns:
- Returns the closest tile to the destination on the minimap.
-
isRunEnabled
public boolean isRunEnabled()Returns whether run is enabled.- Returns:
trueif run mode is enabled; otherwisefalse.
-
getEnergy
public int getEnergy()Returns the player's current run energy.- Returns:
- The player's current run energy.
-
getDestination
Gets the destination tile (where the flag is on the minimap). If there is no destination currently, null will be returned.- Returns:
- The current destination tile, or null.
-
getCollisionFlags
public int[][] getCollisionFlags(int plane) Gets the collision flags for a given floor level in the loaded region.- Parameters:
plane- The floor level (0, 1, 2 or 3).- Returns:
- the collision flags.
-
getObType
Checks the obfuscated field to determine if it is collisiondata or not. If it is, then the method will return its obfuscated name.- Parameters:
field- The field from the client class to check- Returns:
- The obfuscated type name for CollisionData[]
-
randomizeTile
Deprecated.Randomizes a single tile.- Parameters:
tile- The RSTile to randomize.maxXDeviation- Max X distance from tile.getX().maxYDeviation- Max Y distance from tile.getY().- Returns:
- The randomized tile. .
-
walkPathMM
Deprecated.Walks towards the end of a path. This method should be looped.- Parameters:
path- The path to walk along.- Returns:
trueif the next tile was reached; otherwisefalse.- See Also:
-
walkPathMM
Deprecated.Walks towards the end of a path. This method should be looped.- Parameters:
path- The path to walk along.maxDist- SeenextTile(RSTile[], int).- Returns:
trueif the next tile was reached; otherwisefalse.- See Also:
-
walkPathMM
Deprecated.Walks towards the end of a path. This method should be looped.- Parameters:
path- The path to walk along.randX- The X value to randomize each tile in the path by.randY- The Y value to randomize each tile in the path by.- Returns:
trueif the next tile was reached; otherwisefalse.- See Also:
-
walkPathMM
Deprecated.Walks towards the end of a path. This method should be looped.- Parameters:
path- The path to walk along.maxDist- SeenextTile(RSTile[], int).randX- The X value to randomize each tile in the path by.randY- The Y value to randomize each tile in the path by.- Returns:
trueif the next tile was reached; otherwisefalse.
-
walkPathOnScreen
Deprecated.Walks to the end of a path via the screen. This method should be looped.- Parameters:
path- The path to walk along.- Returns:
trueif the next tile was reached; otherwisefalse.- See Also:
-
walkPathOnScreen
Deprecated.Walks a path using onScreen clicks and not the MiniMap. If the next tile is not on the screen, it will find the closest tile that is on screen and it will walk there instead.- Parameters:
path- Path to walk.maxDist- Max distance between tiles in the path.- Returns:
- True if successful.
-
reversePath
Deprecated.Reverses an array of tiles.- Parameters:
other- TheRSTilepath array to reverse.- Returns:
- The reverse
RSTilepath for the givenRSTilepath.
-
nextTile
Deprecated.Returns the next tile to walk to on a path.- Parameters:
path- The path.- Returns:
- The next
RSTileto walk to on the provided path; ornullif far from path or at destination. - See Also:
-
nextTile
Deprecated.Returns the next tile to walk to in a path.- Parameters:
path- The path.skipDist- If the distance to the tile after the next in the path is less than or equal to this distance, the tile after next will be returned rather than the next tile, skipping one. This interlacing aids continuous walking.- Returns:
- The next
RSTileto walk to on the provided path; ornullif far from path or at destination.
-
randomizePath
Deprecated.Randomizes a path of tiles.- Parameters:
path- The RSTiles to randomize.maxXDeviation- Max X distance from tile.getX().maxYDeviation- Max Y distance from tile.getY().- Returns:
- The new, randomized path.
-