Package com.epicbot.api.shared.methods
Interface ICalculationsAPI
public interface ICalculationsAPI
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int[]static final doublestatic final intThe max allowed plane by the gamestatic final intThe minimap culling radius in tiles.static final intstatic final int[]static final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptiondoubledistanceBetween(int x, int y, int x1, int y1) Gets the Euclidean distance between two points.doubledistanceBetween(Locatable locatable1, Locatable locatable2) Gets the Euclidean distance between two locatables.doubledistanceBetween(Point point1, Point point2) Gets the Euclidean distance between two points.doubledistanceTo(int x, int y) Gets the Euclidean distance between the local player and the given coordinates.doubledistanceTo(int x, int y, int plane) Gets the Euclidean distance between the local player and the given coordinates.doubledistanceTo(Locatable locatable) Gets the Euclidean distance between the local player and the given locatable.intintintgetTileHeight(int x, int z, int plane) intintbooleanisClickable(int x, int y) Returns whether or not the given point is clickable on the viewport of the game (seeIGameAPI.getViewportWidth()andIGameAPI.getViewportHeight()).booleanisClickable(Point point) Returns whether or not the given point is clickable on the viewport of the game (seeIGameAPI.getViewportWidth()andIGameAPI.getViewportWidth()).booleanbooleanisOnScreen(int x, int y) Returns whether or not the given point is on screen (the entire width and height of the game client).booleanisOnScreen(Point point) Returns whether or not the given point is on screen (the entire width and height of the game client).inttileDistanceBetween(int x, int y, int x1, int y1) Gets the Chebyshev distance (tile distance) between two points.inttileDistanceBetween(Locatable locatable1, Locatable locatable2) Gets the Chebyshev distance (tile distance) between the two locatables.inttileDistanceTo(Locatable locatable) Gets the Chebyshev distance (tile distance) between the local player and the given locatable.tileToScreen(Tile tile, double dX, double dY, int height) tileToScreen(Tile tile, int height) worldToMap(double x, double y) worldToScreen(int x, int y, int z) worldToScreen(int x, int y, int plane, int zOffset)
-
Field Details
-
SINE
static final int[] SINE -
COSINE
static final int[] COSINE -
VIEW_RADIUS
static final int VIEW_RADIUS- See Also:
-
TILE_BITS
static final int TILE_BITS- See Also:
-
TILE_MASK
static final int TILE_MASK- See Also:
-
TILE_SIZE
static final int TILE_SIZE- See Also:
-
SCENE_SIZE
static final int SCENE_SIZE- See Also:
-
MINIMAP_DISTANCE
static final int MINIMAP_DISTANCEThe minimap culling radius in tiles. Derived from the game's internal distance check:
square(distance / 32) < 6400
Solving: sqrt(6400) * 32 = 2560 local units, 2560 / 128 = 20 tiles.- See Also:
-
MAX_Z
static final int MAX_ZThe max allowed plane by the game- See Also:
-
TILE_FLAG_BRIDGE
static final int TILE_FLAG_BRIDGE- See Also:
-
MAX_WALKABLE_DIST
static final double MAX_WALKABLE_DIST- See Also:
-
-
Method Details
-
isOnScreen
Returns whether or not the given point is on screen (the entire width and height of the game client).- Parameters:
point- the point- Returns:
trueif the point is on screen, otherwisefalse
-
isOnScreen
boolean isOnScreen(int x, int y) Returns whether or not the given point is on screen (the entire width and height of the game client).- Parameters:
x- the x-coordinatey- the y-coordinate- Returns:
trueif the point is on screen, otherwisefalse
-
isClickable
boolean isClickable(int x, int y) Returns whether or not the given point is clickable on the viewport of the game (seeIGameAPI.getViewportWidth()andIGameAPI.getViewportHeight()). Primarily used to check if objects are clickable and are not blocked by the UI (minimap and chat).- Parameters:
x- the x-coordinatey- the y-coordinate- Returns:
trueif the point is clickable, otherwisefalse
-
isClickable
Returns whether or not the given point is clickable on the viewport of the game (seeIGameAPI.getViewportWidth()andIGameAPI.getViewportWidth()). Primarily used to check if objects are clickable and are not blocked by the UI (minimap and chat).- Parameters:
point- the point- Returns:
trueif the point is clickable, otherwisefalse
-
distanceTo
double distanceTo(int x, int y) Gets the Euclidean distance between the local player and the given coordinates.- Parameters:
x- the x-coordinatey- the y-coordinate- Returns:
- distance
-
distanceTo
double distanceTo(int x, int y, int plane) Gets the Euclidean distance between the local player and the given coordinates.- Parameters:
x- the x-coordinatey- the y-coordinateplane- the plane- Returns:
- distance
-
distanceBetween
Gets the Euclidean distance between two points.- Parameters:
point1- the first pointpoint2- the second point- Returns:
- distance
-
distanceBetween
double distanceBetween(int x, int y, int x1, int y1) Gets the Euclidean distance between two points.- Parameters:
x- the x-coordinate of the first pointy- the y-coordinate of the first pointx1- the x-coordinate of the second pointy1- the y-coordinate of the second point- Returns:
- distance
-
tileDistanceBetween
int tileDistanceBetween(int x, int y, int x1, int y1) Gets the Chebyshev distance (tile distance) between two points.- Parameters:
x- the x-coordinate of the first pointy- the y-coordinate of the first pointx1- the x-coordinate of the second pointy1- the y-coordinate of the second point- Returns:
- tile distance
-
worldToScreen
-
worldToScreen
-
worldToMap
-
getTileHeight
int getTileHeight(int x, int z, int plane) -
getTileBits
int getTileBits() -
getTileMask
int getTileMask() -
getTileSize
int getTileSize() -
getSceneSize
int getSceneSize()
-