Class Walking


  • public class Walking
    extends java.lang.Object
    The type Walking impl.
    • Constructor Detail

      • Walking

        @Deprecated
        public Walking()
        Deprecated.
    • 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 tile
        y - 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 tile
        y - The y position of the tile
        z - 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) See shouldWalk(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()