Package net.eternalclient.api.accessors
Class Combat
- java.lang.Object
-
- net.eternalclient.api.accessors.Combat
-
public class Combat extends java.lang.Object
Contains utility methods for fetching combat information and toggling special attack/auto retaliate.
-
-
Constructor Summary
Constructors Constructor Description Combat()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static AttackStyle
getAttackStyle()
Retrieves the attack style of the player's weapon based on the current player settings.static int
getHealthPercent()
Returns the health percentage of a player as an integer value.static int
getSpecialModifier()
Returns the special modifier value for the player based on the configuration.static int
getSpecialPercentage()
Calculates and returns the special percentage.static WeaponType
getWeaponType()
Returns the weapon type based on the bit value stored in PlayerSettings.static int
getWildernessLevel()
Returns the wilderness level based on the current player's tile.static int
getWildernessLevelFromTile(Positionable positionable)
Returns the wilderness level based on the provided positionable's world point.static boolean
hasPoisonImmunity()
Checks if the player has immunity to poison.static boolean
isAutoRetaliateOn()
Returns true if auto-retaliate is on, false otherwise.static boolean
isEnvenomed()
Checks if the player is envenomed.static boolean
isInWild()
Checks if the player is in the wilderness.static boolean
isMulti()
Returns true if the player is in a multi-combat area.static boolean
isPoisoned()
Returns true if the player is poisoned, false otherwise.static boolean
isSpecialActive()
Checks if the special feature is active.static boolean
openTab()
Checks if the "Attack" tab is open and opens it if needed.static boolean
toggleAutoRetaliate(boolean on)
Toggles auto retaliate on or off.static boolean
toggleSpecialAttack(boolean on)
Toggles the special attack.
-
-
-
Method Detail
-
getHealthPercent
public static int getHealthPercent()
Returns the health percentage of a player as an integer value.- Returns:
- The health percentage as an integer value.
-
getSpecialModifier
public static int getSpecialModifier()
Returns the special modifier value for the player based on the configuration.- Returns:
- the special modifier value.
-
getSpecialPercentage
public static int getSpecialPercentage()
Calculates and returns the special percentage.- Returns:
- the special percentage value.
-
isSpecialActive
public static boolean isSpecialActive()
Checks if the special feature is active.- Returns:
- true if active, false otherwise.
-
toggleSpecialAttack
public static boolean toggleSpecialAttack(boolean on)
Toggles the special attack.- Parameters:
on
- - true to activate, false to deactivate- Returns:
- true if successfully executed
-
getWildernessLevel
public static int getWildernessLevel()
Returns the wilderness level based on the current player's tile.- Returns:
- the wilderness level as an integer.
-
getWildernessLevelFromTile
public static int getWildernessLevelFromTile(Positionable positionable)
Returns the wilderness level based on the provided positionable's world point.- Parameters:
positionable
- the object for which the wilderness level is to be determined- Returns:
- the wilderness level as an integer
-
isInWild
public static boolean isInWild()
Checks if the player is in the wilderness.- Returns:
- true if player is in the wilderness, false otherwise.
-
isEnvenomed
public static boolean isEnvenomed()
Checks if the player is envenomed.- Returns:
- true if envenomed, false otherwise.
-
hasPoisonImmunity
public static boolean hasPoisonImmunity()
Checks if the player has immunity to poison.- Returns:
- true if the player is immune to poison, false otherwise.
-
isPoisoned
public static boolean isPoisoned()
Returns true if the player is poisoned, false otherwise.- Returns:
- true if the player is poisoned, false otherwise.
-
isAutoRetaliateOn
public static boolean isAutoRetaliateOn()
Returns true if auto-retaliate is on, false otherwise.- Returns:
- boolean indicating whether auto-retaliate is on or off.
-
toggleAutoRetaliate
public static boolean toggleAutoRetaliate(boolean on)
Toggles auto retaliate on or off.- Parameters:
on
- a boolean indicating whether to enable or disable auto retaliate- Returns:
- a boolean indicating the updated state of auto retaliate
-
openTab
public static boolean openTab()
Checks if the "Attack" tab is open and opens it if needed.- Returns:
- true if the "Attack" tab is open or successfully opened, false otherwise.
-
isMulti
public static boolean isMulti()
Returns true if the player is in a multi-combat area.- Returns:
- true if the player is in a multi-combat area, false otherwise.
-
getAttackStyle
public static AttackStyle getAttackStyle()
Retrieves the attack style of the player's weapon based on the current player settings.- Returns:
- The current attack style of the player's weapon, or null if the weapon type or attack style is not valid.
-
getWeaponType
public static WeaponType getWeaponType()
Returns the weapon type based on the bit value stored in PlayerSettings.- Returns:
- the weapon type, or null if the bit value is out of range.
-
-