Package com.epicbot.api.shared.methods
Interface IWalkingAPI
public interface IWalkingAPI
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Function<APIContext, Boolean> static final Function<APIContext, Boolean> -
Method Summary
Modifier and TypeMethodDescriptionFinds a local path.Finds a local path.Finds a local path.Finds a local path.findPathOnScreen(Locatable destination) Finds a screen path.findPathOnScreen(Locatable destination, double precision) Finds a screen path.getBlockingObjectBetween(Locatable start, Locatable end) Searches for a local blocking object between two tiles provided and returns it if it exists.getClosestTileOnMap(Locatable destination) Gets the closest tile on the minimap towards the given destination.getClosestTileOnScreen(Locatable destination) Gets the closest tile that is on screen towards the given destination.int[][]getCollisionFlags(int plane) getCollisionOffset(int plane) Gets the current walking destination.Gets the next best available tile to use.getNextOnScreen(Tile[] tiles) Gets the next best available tile to use on screen.intGets the current run energy.bytegetTileFlag(int x, int y, int plane) intgetTileHeight(int x, int y, int plane) booleanGets whether or not running is enabled.default booleanisWalkingTo(Locatable destination) Determines if we are walking towards the given destination.booleanisWalkingTo(Locatable destination, double precision) Determines if we are walking towards the given destination with precision.booleansetRun(boolean enabled) Toggles running by using the running orb.voidsetSleepFunction(Function<APIContext, Boolean> sleepFunction) Set the sleep function used after clicking on the minimap or a tile to walk to on screen.booleanClicks the given destination on the minimap to walk towards it.booleanClicks the given destination on the minimap to walk towards with precision.booleanwalkOnScreen(Locatable destination) Click the given destination tile on screen.booleanwalkOnScreen(Locatable destination, double precision) Click the given destination tile on screen.booleanWalks along the given path.booleanWalks along the given path.booleanWalks along the given path with precision.booleanwalkPathOnScreen(ScreenPath tilePath) Walks along the given path on screen.booleanwalkPathOnScreen(Tile[] tilePath) Walks along the given path on screen.booleanwalkPathOnScreen(Tile[] tilePath, double precision) Walks along the given path on screen with precision.booleanWalks towards the destination.booleanWalks towards the destination with precision.booleanwalkToOnScreen(Locatable destination) Walks towards the destination by clicking on screen.booleanwalkToOnScreen(Locatable destination, double precision) Walks towards the destination with precision by clicking on screen.
-
Field Details
-
NO_SLEEP
-
SLEEP
-
-
Method Details
-
setSleepFunction
Set the sleep function used after clicking on the minimap or a tile to walk to on screen. By default the API usesSLEEPand it's implementation looks like this:
Useboolean moving = Time.sleep(1000, () -> ctx.localPlayer().isMoving(), 5); if(!moving) return false; Time.sleep(500, 1200, () -> !ctx.localPlayer().isMoving(), 200); return moving;}NO_SLEEPwhich simply returns true if you want NO sleeping at all.- Parameters:
sleepFunction-
-
getDestination
Tile getDestination()Gets the current walking destination.- Returns:
Tileor null
-
getRunEnergy
int getRunEnergy()Gets the current run energy.- Returns:
- int
-
isRunEnabled
boolean isRunEnabled()Gets whether or not running is enabled.- Returns:
- true if enabled, false otherwise
-
setRun
boolean setRun(boolean enabled) Toggles running by using the running orb.- Parameters:
enabled- whether or not to enable running- Returns:
- true if successful, false otherwise
-
getCollisionOffset
-
getCollisionFlags
int[][] getCollisionFlags(int plane) -
getTileFlag
byte getTileFlag(int x, int y, int plane) -
getTileHeight
int getTileHeight(int x, int y, int plane)
-