public class Map extends API
Modifier and Type | Field and Description |
---|---|
static int |
LOCAL_COORD_BITS |
bank, bot, camera, chatbox, client, colorPicker, combat, configs, depositBox, dialogues, diaries, display, doorHandler, equipment, experienceTracker, favour, grandExchange, graphicObjects, groundItems, hintArrow, inventory, keyboard, logger, logoutTab, magic, map, menu, mouse, npcs, objects, players, prayer, projectiles, quests, settings, skills, store, tabs, trade, walking, widgets, worlds
Constructor and Description |
---|
Map() |
Modifier and Type | Method and Description |
---|---|
boolean |
canReach(Entity entity)
Determines whether the specified entity can be reached from your current position.
|
boolean |
canReach(Position position)
Determines whether the specified position can be reached from your current position.
|
boolean |
contains(Entity entity)
Returns whether the specified entity exists in the loaded region.
|
int |
distance(Entity entity)
The absolute distance between your player's position and the specified position.
|
int |
distance(Position position)
The absolute distance between your player's position and the specified position.
|
int |
getBaseX()
Gets the absolute X coordinate of your map region.
|
int |
getBaseY()
Gets the absolute Y coordinate of your map region.
|
int[][] |
getClippingFlags()
Gets the clipping flags
|
Position |
getDestination()
Gets your walking destination.
|
int |
getPlane()
Gets your current plane or 'z'.
|
Region |
getRegion()
Gets the currently loaded region
|
int |
getWildernessLevel()
Retrieves your current wilderness level.
|
void |
initializeModule() |
boolean |
isInHouse()
Determines whether you are in your player owned house or not.
|
boolean |
isMinimapLocked()
Returns if the minimap has been locked/blacked out.
|
boolean |
isMultiway()
Checks if you are in multiway combat.
|
boolean |
isWithinRange(Entity entity,
int threshold)
Determines whether your character is within the specified range of an entity.
|
boolean |
isWithinRange(Position position,
Entity entity,
int threshold)
Determines whether the specified position is within the specified range of an entity.
|
int |
realDistance(Entity entity)
Determines the shortest real distance to the specified entity
as if you would be walking towards it.
|
int |
realDistance(Position position)
Determines the shortest real distance to the specified position
as if you would be walking towards it.
|
int |
realDistance(Position from,
Position to)
Determines the shortest real distance between the specified positions
|
exchangeContext, execute, getBank, getBot, getCamera, getChatbox, getClient, getColorPicker, getCombat, getConfigs, getDepositBox, getDialogues, getDiaries, getDisplay, getDoorHandler, getEquipment, getExperienceTracker, getFavour, getGrandExchange, getGraphicObjects, getGroundItems, getHintArrow, getInventory, getKeyboard, getLogoutTab, getMagic, getMap, getMenuAPI, getMouse, getNpcs, getObjects, getPlayers, getPrayer, getProjectiles, getQuests, getSettings, getSkills, getStore, getTabs, getTrade, getWalking, getWidgets, getWorlds, gRandom, gRandom, gRandom, initializeContext, log, log, myPlayer, myPosition, random, random, sleep, stripFormatting, warn
public static final int LOCAL_COORD_BITS
public void initializeModule()
initializeModule
in class API
public Region getRegion()
public int[][] getClippingFlags()
public int distance(Position position)
position
- The position to calculate for.public int distance(Entity entity)
entity
- The position to calculate for.public boolean canReach(Position position)
position
- The position to reach.public boolean canReach(Entity entity)
entity
- The entity to reach.public int realDistance(Position position)
position
- The position to calculate the distance to.public int realDistance(Position from, Position to)
from
- The position to calculate the distance from.to
- The position to calculate the distance to.public int realDistance(Entity entity)
entity
- The entity to calculate the distance to.public boolean contains(Entity entity)
entity
- The entity to check its existence for.public int getBaseX()
public int getBaseY()
public int getPlane()
Also known as height.
public Position getDestination()
This is the the flag on the minimap.
public boolean isInHouse()
public boolean isMinimapLocked()
public int getWildernessLevel()
public boolean isMultiway()
public boolean isWithinRange(Entity entity, int threshold)
entity
- The entity.threshold
- The threshold is the range you want to be in. The threshold is 1 if you are right next to an entity, 2 if there is one tile between etc.public boolean isWithinRange(Position position, Entity entity, int threshold)
entity
- The entity.threshold
- The threshold is the range you want to be in. The threshold is 1 if the position and entity are right next to each other, 2 if there is one tile between etc.