Package com.epicbot.api.shared.methods
Interface ILocalPlayerAPI
public interface ILocalPlayerAPI
-
Method Summary
Modifier and TypeMethodDescriptionget()intGets the animation id.int[]Gets the appearance ids of this player.intGets the combat level of this player.Gets the walking destination of this player.Gets the current cardinal direction of this player based ongetRotation().intGets the health of this player.intgetHealthPercent(int id) Get the health of a healthbar with specified id.int[]int[]int[]intgetId()Gets the id of this player.intGets the idle animation id.Gets the actor that this player is interacting with (e.g.intGets the interacting index in the npc or players array.Gets the tile that this player is located on in the world.intGets the membership days on the account.Gets the dialogue/message above the players head.intGets the height of the model.getName()Gets the name of the player.intGets the id of this player when in npc-based form.default HeadIconintint[]getPathX()int[]getPathY()intgetPlane()Gets the z-coordinate, also known as the floor or level.intGets the prayer icon above this players head.intGets the current rotation as an angle.Gets the scene offset for this player.Gets the server tile that this player is located on in the world.intGets the skull icon above this players head.default SkullIconint[]Gets the spot animation ids of this player.intgetTeam()Gets the team id of this player.intGets the current wilderness level.intgetX()Gets the x-coordinate.intgetY()Gets the y-coordinate.booleanGets whether or not we have membership.default booleanDetermines if the player is animating based ongetAnimation().booleanGets whether or not this player is attacking.booleanDetermines if the player is facing the given locatable.booleanGets whether or not this player is in combat.booleanGets whether or not we are in the wilderness.booleanisMoving()Gets whether or not this player is moving.boolean
-
Method Details
-
get
Player get() -
getId
int getId()Gets the id of this player.- Returns:
- int
-
getName
String getName()Gets the name of the player.- Returns:
- String
-
getCombatLevel
int getCombatLevel()Gets the combat level of this player.- Returns:
- int
-
getTeam
int getTeam()Gets the team id of this player.- Returns:
- int
-
getPrayerIcon
int getPrayerIcon()Gets the prayer icon above this players head.- Returns:
- int
-
getOverheadIconType
-
getSkullIcon
int getSkullIcon()Gets the skull icon above this players head.- Returns:
- int
-
getSkullIconType
-
getMessage
String getMessage()Gets the dialogue/message above the players head.- Returns:
- String or null if no message
-
getX
int getX()Gets the x-coordinate.- Returns:
- int
-
getY
int getY()Gets the y-coordinate.- Returns:
- int
-
getPlane
int getPlane()Gets the z-coordinate, also known as the floor or level.- Returns:
- int
-
getLocation
Tile getLocation()Gets the tile that this player is located on in the world.- Returns:
Tile
-
getServerLocation
Tile getServerLocation()Gets the server tile that this player is located on in the world.- Returns:
Tile
-
getSceneOffset
SceneOffset getSceneOffset()Gets the scene offset for this player.- Returns:
SceneOffset
-
getPathX
int[] getPathX() -
getPathY
int[] getPathY() -
getPathSize
int getPathSize() -
getDestination
Tile getDestination()Gets the walking destination of this player.- Returns:
- the destination tile or null
-
isMoving
boolean isMoving()Gets whether or not this player is moving.- Returns:
- true if moving, false otherwise
-
getRotation
int getRotation()Gets the current rotation as an angle.- Returns:
- the rotation
- See Also:
-
getDirection
Direction getDirection()Gets the current cardinal direction of this player based ongetRotation().- Returns:
Direction- See Also:
-
getAnimation
int getAnimation()Gets the animation id.- Returns:
- -1 when we are not animating
-
getIdleAnimation
int getIdleAnimation()Gets the idle animation id.- Returns:
- int
-
isAnimating
default boolean isAnimating()Determines if the player is animating based ongetAnimation().- Returns:
- true if
getAnimation()is not -1, false otherwise
-
getInteracting
Actor getInteracting()Gets the actor that this player is interacting with (e.g. talking or attacking)- Returns:
- the actor or null if this actor is not interacting
-
getLocalPlayerIndex
int getLocalPlayerIndex()Gets the interacting index in the npc or players array.- Returns:
- int
-
getModelHeight
int getModelHeight()Gets the height of the model.- Returns:
- int
-
getHitsplatValues
int[] getHitsplatValues() -
getHitsplatTypes
int[] getHitsplatTypes() -
getHitsplatCycles
int[] getHitsplatCycles() -
getHealthPercent
int getHealthPercent()Gets the health of this player.- Returns:
- the health percentage. If the health cannot be determined (e.g. not in combat), then 100 is returned.
-
getHealthPercent
int getHealthPercent(int id) Get the health of a healthbar with specified id.- Parameters:
id-- Returns:
- the health percentage or -1
-
isInCombat
boolean isInCombat()Gets whether or not this player is in combat.- Returns:
- true if in combat, false otherwise
-
isAttacking
boolean isAttacking()Gets whether or not this player is attacking. This is basically a convenience method for the conditionsisInCombat()andgetInteracting()not being null.- Returns:
- true if we are attacking, false otherwise
-
getAppearanceIds
int[] getAppearanceIds()Gets the appearance ids of this player.- Returns:
- int[]
-
getNPCTransformationId
int getNPCTransformationId()Gets the id of this player when in npc-based form. For example when transforming to a monkey on Ape Atoll.- Returns:
- the npc id
-
getWildernessLevel
int getWildernessLevel()Gets the current wilderness level.- Returns:
- int
-
isInWilderness
boolean isInWilderness()Gets whether or not we are in the wilderness.- Returns:
- true if in wilderness, false otherwise
-
getMembershipDays
int getMembershipDays()Gets the membership days on the account.- Returns:
- int
-
hasMembership
boolean hasMembership()Gets whether or not we have membership.- Returns:
- true if account has membership, false otherwise
-
isStaminaActive
boolean isStaminaActive() -
getSpotAnimationIds
int[] getSpotAnimationIds()Gets the spot animation ids of this player.- Returns:
- int[]
-