Package com.epicbot.api.shared.methods
Interface ILocalPlayerAPI
-
public interface ILocalPlayerAPI
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Player
get()
int
getAnimation()
Gets the animation id.int[]
getAppearanceIds()
Gets the appearance ids of this player.int
getCombatLevel()
Gets the combat level of this player.Tile
getDestination()
Gets the walking destination of this player.Direction
getDirection()
Gets the current cardinal direction of this player based ongetRotation()
.int
getHealthPercent()
Gets the health of this player.int
getHeight()
Gets the height of the player.int[]
getHitsplatCycles()
int[]
getHitsplatTypes()
int[]
getHitsplatValues()
int
getId()
Gets the id of this player.int
getIdleAnimation()
Gets the idle animation id.Actor
getInteracting()
Gets the actor that this player is interacting with (e.g.Tile
getLocation()
Gets the tile that this player is located on in the world.int
getMembershipDays()
Gets the membership days on the account.java.lang.String
getMessage()
Gets the dialogue/message above the players head.Model
getModel()
Gets the model.int
getModelHeight()
Gets the height of the model.java.lang.String
getName()
Gets the name of the player.int
getNPCTransformationId()
Gets the id of this player when in npc-based form.default HeadIcon
getOverheadIconType()
int
getPathSize()
int[]
getPathX()
int[]
getPathY()
int
getPlane()
Gets the z-coordinate, also known as the floor or level.int
getPrayerIcon()
Gets the prayer icon above this players head.int
getRotation()
Gets the current rotation as an angle.SceneOffset
getSceneOffset()
Gets the scene offset for this player.int
getSelfInteracting()
Gets the interacting index in the npc or players array.Tile
getServerLocation()
Gets the server tile that this player is located on in the world.int
getSkullIcon()
Gets the skull icon above this players head.default SkullIcon
getSkullIconType()
int[]
getSpecialHitsplatValues()
int
getTeam()
Gets the team id of this player.int
getWildernessLevel()
Gets the current wilderness level.int
getX()
Gets the x-coordinate.int
getY()
Gets the y-coordinate.boolean
hasMembership()
Gets whether or not we have membership.default boolean
isAnimating()
Determines if the player is animating based ongetAnimation()
.boolean
isAttacking()
Gets whether or not this player is attacking.boolean
isFacing(Locatable locatable)
Determines if the player is facing the given locatable.boolean
isFemale()
Gets whether or not this player is a female character.boolean
isInCombat()
Gets whether or not this player is in combat.boolean
isInWilderness()
Gets whether or not we are in the wilderness.default boolean
isMale()
Gets whether or not this player is a male character.boolean
isMoving()
Gets whether or not this player is moving.boolean
isStaminaActive()
-
-
-
Method Detail
-
get
Player get()
-
getId
int getId()
Gets the id of this player.- Returns:
- int
-
getName
java.lang.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
default HeadIcon getOverheadIconType()
-
getSkullIcon
int getSkullIcon()
Gets the skull icon above this players head.- Returns:
- int
-
getSkullIconType
default SkullIcon getSkullIconType()
-
getMessage
java.lang.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:
Direction
-
getDirection
Direction getDirection()
Gets the current cardinal direction of this player based ongetRotation()
.
-
isFacing
boolean isFacing(Locatable locatable)
Determines if the player is facing the given locatable.- Parameters:
locatable
- the locatable- Returns:
- true if the player is facing towards the locatable, false otherwise
-
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
-
getSelfInteracting
int getSelfInteracting()
Gets the interacting index in the npc or players array.- Returns:
- int
-
getModelHeight
int getModelHeight()
Gets the height of the model.- Returns:
- int
-
getHeight
int getHeight()
Gets the height of the player.- Returns:
- int
-
getHitsplatValues
int[] getHitsplatValues()
-
getHitsplatTypes
int[] getHitsplatTypes()
-
getHitsplatCycles
int[] getHitsplatCycles()
-
getSpecialHitsplatValues
int[] getSpecialHitsplatValues()
-
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.
-
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
-
isFemale
boolean isFemale()
Gets whether or not this player is a female character.- Returns:
- true if female, otherwise false
-
isMale
default boolean isMale()
Gets whether or not this player is a male character.- Returns:
- true if male, otherwise false
-
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()
-
-