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.
      • getCombatCycles

        @Deprecated
        public int getCombatCycles()
        Deprecated.
        hook not valid, see getCombatTime()
      • getCombatTime

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

        @Deprecated
        public int getRotation()
        Deprecated.
      • 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 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.
      • 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 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.
      • getQueueTraversed

        @Deprecated
        public byte[] getQueueTraversed()
        Deprecated.
        see @getWalkingQueueSpeed() scheduled for removal 3/9/2022
        Gets walking queue traversed index's for this Character.
        Returns:
        the walking queue traversed indices 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.
      • getAnimatedModel

        @Deprecated
        public Model getAnimatedModel()
        Deprecated.
        all models are animated now
        Returns:
        this character's model
      • getAnimatedModel

        @Deprecated
        public Model getAnimatedModel​(Model model)
        Deprecated.
        all models are animated now
        Gets animated model for this Character.
        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 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.
      • hashCode

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

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