Class Character

    • Method Detail

      • getIndex

        public abstract int getIndex()
        Gets the index of this Character.
        Returns:
        this index location.
      • getUID

        public long getUID()
        Gets UID of this Character.
        Returns:
        the UID of this Character.
      • getRenderableHeight

        public int getRenderableHeight()
        Gets the height of this character
        Specified by:
        getRenderableHeight in class Entity
        Returns:
        the height of this character
      • getWalkAnimation

        public int getWalkAnimation()
        Gets walking animation ID.
        Returns:
        the walk animation ID.
      • getStandAnimation

        public int getStandAnimation()
        Gets the resting stand animation ID.
        Returns:
        the stand animation ID.
      • getAnimationDelay

        public int getAnimationDelay()
        Gets the delay between animations.
        Returns:
        the animation delay in milliseconds.
      • getHeadFrame

        public int getHeadFrame()
        Gets the head frame ID from the current animation.
        Returns:
        head ID frame from current animation.
      • getTailFrame

        public int getTailFrame()
        Gets the tail frame ID from the current animation.
        Returns:
        tail ID frame from current animation.
      • exists

        public boolean exists()
        Determines where or not this object exists in game.
        Specified by:
        exists in interface Verified
        Overrides:
        exists in class Entity
        Returns:
        true, if the object exist, otherwise false.
      • isAnimating

        public boolean isAnimating()
        Determines if this Character is animating.

        Note: This does not include walking animations, that can be checked separately with isMoving()

        Returns:
        true if this Character is animating, otherwise false.
      • getAnimation

        public int getAnimation()
        Gets the Character's current animation ID.

        Note: This does not include walking animations.

        Returns:
        the current animations ID.
      • getCombatTime

        public int getCombatTime()
        Gets the current time in combat for this Character.
        Returns:
        the current time in combat.
      • getFacingDirection

        public Direction getFacingDirection()
        Gets the closest facing direction for this Character in the game world.
        Returns:
        the closest facing direction of this Character.
      • getHitSplatCycles

        public int[] getHitSplatCycles()
        Get hit splat cycles for this Character.
        Returns:
        the int array of hit splat cycles for this Character.
      • getHitSplatTypes

        public int[] getHitSplatTypes()
        Get hit splat types for this Character.
        Returns:
        the int array of hit splat types for this Character.
      • getHitSplats

        public int[] getHitSplats()
        Get hit splat for this Character.
        Returns:
        the int array of hit splat for this Character.
      • getHitSplatIds

        public int[] getHitSplatIds()
      • getHitSplatSpecials

        public int[] getHitSplatSpecials()
      • getInteractingIndex

        public int getInteractingIndex()
        Gets the interacting character's index.
        Returns:
        the interacting character's index if interacting, otherwise -1.
      • getLevel

        public abstract int getLevel()
        Gets the Character's combat level.
        Returns:
        the combat level of this Character.
      • getOrientation

        public int getOrientation()
        Gets orientation for this Character.
        Returns:
        the orientation value for this Character.
      • getSmoothOrientation

        public int getSmoothOrientation()
        Gets the smooth orientation for this Character.
        Returns:
        the smooth orientation value for this Character.
      • getOverhead

        public java.lang.String getOverhead()
        Gets overhead message for this Character.
        Returns:
        the overhead message for this character if valid, otherwise null.
      • getQueueSize

        public int getQueueSize()
        Gets walking queue size for this Character.
        Returns:
        the walking queue size for this Character.
      • getWalkingQueueSpeed

        public WalkingQueueSpeed[] getWalkingQueueSpeed()
        Gets walking queue traversed index's for this Character.
        Returns:
        the walking queue traversed indices for this Character.
      • getQueueX

        public int[] getQueueX()
        Get walking queue X coordinates.
        Returns:
        the array of X coordinates for the current walking queue.
      • getQueueY

        public int[] getQueueY()
        Get walking queue Y coordinates.
        Returns:
        the array of Y coordinates for the current walking queue.
      • isMoving

        public boolean isMoving()
        Determines if this Character is moving.
        Returns:
        true if this Character is moving, otherwise false.
      • getInteractingCharacter

        public Character getInteractingCharacter()
        Gets interacting character for this Character.
        Returns:
        the interacting character if interaction, otherwise null.
      • isStandingStill

        public boolean isStandingStill()
        Determines if the Character is standing still.
        Returns:
        true if Character is not moving, not in combat, not animating, and not interacting; otherwise false.
      • getX

        public int getX()
        Gets X coordinate of the given object.
        Returns:
        the X coordinate of the object.
      • getY

        public int getY()
        Gets Y coordinate of the given object.
        Returns:
        the Y coordinate of the object.
      • getZ

        public int getZ()
        Gets Z coordinate of the given object.
        Returns:
        the Z coordinate of the object.
      • getGridX

        public int getGridX()
        Gets grid (local) X coordinate of the given object.
        Returns:
        the grid X coordinate of the object.
      • getGridY

        public int getGridY()
        Gets grid (local) Y coordinate of the given object.
        Returns:
        the grid Y coordinate of the object.
      • getLocalX

        public int getLocalX()
        Gets local X coordinate of this Character.
        Returns:
        the local X coordinate.
      • getLocalY

        public int getLocalY()
        Gets local Y coordinate of this Character Character.
        Returns:
        the local Y coordinate.
      • canAttack

        public boolean canAttack()
        Determines if this Character can be attacked.
        Returns:
        true if the Character has health and is either not in combat (unless in a multicombat area) or is already attacking the player
      • isInCombat

        public boolean isInCombat()
        Determines if this Character is in combat.
        Returns:
        true if the Character is interacting with another Character with a health bar showing or if the Character's own health bar is showing
      • isInteractedWith

        public boolean isInteractedWith()
        Determines if there is a Character that is interacting with this Character
        Returns:
        true if there's any other Character interacting with this Character
      • getCharacterInteractingWithMe

        public Character getCharacterInteractingWithMe()
        Gets the Character currently interacting with this Character. If none interacting, returns null.
        Returns:
        The closest Character interacting with this Character, null if there aren't any
      • isInteracting

        public boolean isInteracting​(Character character)
        Determines if this Character is interacting with the given argument.
        Parameters:
        character - the character you wish to check interaction.
        Returns:
        true if this Character is interacting with the given argument, otherwise false.
      • getHealthPercent

        public int getHealthPercent()
        Get health percent of this Character if in combat.
        Returns:
        this Character's health percent from 0 (dead) to 100 (full health)
      • isHealthBarVisible

        public boolean isHealthBarVisible()
        Determines if the health bar visible for this Character.
        Returns:
        true if the health bar is visible, otherwise false.
      • getServerTile

        public Tile getServerTile()
        Gets the current tile according to the server
        Returns:
        the server tile
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Entity
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class Entity
      • getSpotAnimation

        public int getSpotAnimation()