Class Character

    • Constructor Detail

      • Character

        public Character​(java.lang.Object reference)
    • Method Detail

      • getIndex

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

        public long getUID()
        Gets UID of this Character object.
        Returns:
        the UID of this object.
      • 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 the current Character is animating. (Does not include walking animations!)
        Returns:
        true if the current player is animating, otherwise false.
      • getAnimation

        public int getAnimation()
        Gets the Characters current animation ID. (Does not include walking animations!)
        Returns:
        the current animations ID.
      • getCombatCycles

        public int getCombatCycles()
        Gets combat cycle of the current Character.
        Returns:
        the combat cycle of this object.
      • getCombatTime

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

        public int getRotation()
        Gets rotation degree of the current Character object.
        Returns:
        the rotation in degrees.
      • getFacingDirection

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

        @Deprecated
        public int getHealth()
        Deprecated.
        see getHealthPercent() Scheduled for removal 02/01/2021
      • getHitSplatCycles

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

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

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

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

        @Deprecated
        public int getMaxHealth()
        Deprecated.
        Will return the max health of players if in combat, otherwise will return 10 For NPCs it will return 30 as max health if in combat, otherwise 10
        Returns:
        Max health (if in combat) otherwise 10
      • 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 the current Character object.
        Returns:
        the orientation value for this object.
      • 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 the current Character object.
        Returns:
        the walking queue size for the current object.
      • getQueueTraversed

        public byte[] getQueueTraversed()
        Gets walking queue traversed index's for the current Character object.
        Returns:
        the walking queue traversed index's for the current object.
      • 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 the current Character is moving.
        Returns:
        true if the Character is moving, otherwise false.
      • getInteractingCharacter

        public Character getInteractingCharacter()
        Gets interacting character for this object.
        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 object.
        Returns:
        the local X coordinate.
      • getLocalY

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

        public boolean canAttack()
        Determines if the current Character can be attacked.
        Returns:
        true if the Character can be attacked, otherwise false.
      • isInCombat

        public boolean isInCombat()
        Determines if the current Character is in combat.
        Returns:
        true if the Character is currently in combat, otherwise false.
      • isInteractedWith

        public boolean isInteractedWith()
        Determines if there is a Character that is interacting with this Character
        Returns:
      • getCharacterInteractingWithMe

        public Character getCharacterInteractingWithMe()
        Gets the Character currently interacting with this Character. If none interacting, returns null.
        Returns:
      • isInteracting

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

        public Model getAnimatedModel()
      • getAnimatedModel

        public Model getAnimatedModel​(Model model)
        Gets animated model for the current Character object.
        Parameters:
        model - the un-animated model you wish to animate.
        Returns:
        the animated model if animation was loaded successfully, otherwise the un-animated model.
      • getHealthPercent

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

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

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

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