Class Combat


  • public class Combat
    extends java.lang.Object
    A class used to handle and retrieve data related to combat.
    • Method Detail

      • getCombatLevel

        public static int getCombatLevel()
        Returns the current player's combat level
        Returns:
        Combat level if logged in, -1 otherwise
      • isPoisoned

        public static boolean isPoisoned()
        Checks whether your player is poisoned.
        Returns:
        true if poisoned
      • isEnvenomed

        public static boolean isEnvenomed()
        Checks whether your player is envenomed.
        Returns:
        true if envenomed
      • hasPoisonImmunity

        public static boolean hasPoisonImmunity()
        Checks whether your player is immune to poison.
        Returns:
        true if immune
      • isDiseased

        public static boolean isDiseased()
        Checks whether your player is diseased.
        Returns:
        true if diseased
      • isAntiFireEnabled

        public static boolean isAntiFireEnabled()
        Checks antifire potion protection is active
        Returns:
        true if antifire potion active
      • isExtAntiFireEnabled

        @Deprecated
        public static boolean isExtAntiFireEnabled()
        Deprecated.
        see isAntiFireEnabled() for the normal antifire or isSuperAntiFireEnabled() for the super antifire
        Checks if the super antifire potion protection is active
        Returns:
        true if the super antifire potion active
      • isSuperAntiFireEnabled

        public static boolean isSuperAntiFireEnabled()
        Checks if the super antifire potion protection is active
        Returns:
        true if the super antifire potion active
      • isSpecialActive

        public static boolean isSpecialActive()
        Checks whether special attack is active.
        Returns:
        true if active
      • getSpecialPercentage

        public static int getSpecialPercentage()
        Gets the percentage of special attack bar.
        Returns:
        percentage of special attack bar
      • getSpecialModifier

        public static int getSpecialModifier()
        Gets the actual value of the special attack bar
        Returns:
        Value of special attack bar
      • isAutoRetaliateOn

        public static boolean isAutoRetaliateOn()
        Checks whether autoretaliate is on.
        Returns:
        true if autoretaliate is on
      • openTab

        public static boolean openTab()
        Opens the Combat tab.
        Returns:
        true if tab successfully opened
      • toggleAutoRetaliate

        public static boolean toggleAutoRetaliate​(boolean enable)
        Toggles the autoretaliate option. Will do nothing if already toggled to desired state.
        Parameters:
        enable - true to turn on autoretaliate, false to turn off
        Returns:
        true if toggled successfully (or already at desired state)
      • toggleSpecialAttack

        public static boolean toggleSpecialAttack​(boolean enable)
        Toggles the special attack option. Will do nothing if already toggled to desired state. Will use the orb if available, otherwise it'll fallback to the combat tab.
        Parameters:
        enable - true to turn on special attack, false to turn off
        Returns:
        true if toggled successfully (or already at desired state)
      • isInWild

        public static boolean isInWild()
        Checks whether your player is in the wilderness.
        Returns:
        true if in wilderness
      • isInMultiCombat

        public static boolean isInMultiCombat()
        Checks whether your player is in multiway combat zone.
        Returns:
        true if in multiway combat zone
      • getWildernessLevel

        public static int getWildernessLevel()
        Gets the wilderness level that your player is in.
        Returns:
        wilderness level, 0 if not in wilderness
      • getHealthPercent

        public static int getHealthPercent()
        Gets your players health percentage as a int (0 - 100), based skills.
        Returns:
        the percent of health your players has as represented by your skills.
      • setCombatStyle

        public static boolean setCombatStyle​(CombatStyle combatStyle)
        Sets your active combat style
        Parameters:
        combatStyle - the desired combat style
        Returns:
        true if changed successfully, false otherwise
      • getCombatStyle

        public static CombatStyle getCombatStyle()
        Returns the current combat style
        Returns:
        Active combat style if logged in, null otherwise