CombatAPI
Your combat state: health, special attack, poison, attack style and retaliate.
ClassRLPlugins API
public class CombatAPIMembers
Static methods
- intgetAttackRange()
How many tiles your weapon reaches.
- AttackStylegetAttackStyle()
Gets the player's current attack style.
- StringgetAttackStyleName()
The name of your attack style.
- CombatAttackStylegetEquippedWeaponStyle()
Combat family of the worn weapon, including known hybrid-weapon overrides.
- intgetHealth()
Gets the player's current health.
- intgetNextPoisonDamage()
The damage of your next poison or venom hit.
- intgetRemainingTeleblockTicks()
How many ticks of Tele Block are left.
- intgetSpecEnergy()
Gets the player's current special attack energy.
- booleaninMultiWay()
Checks if the player is currently in multiway combat.
- booleanisAntifired()
Checks if the player has an antifire potion effect active.
- booleanisAntipoisoned()
Whether an antipoison is working.
- booleanisAntivenomed()
Whether an antivenom is working.
- booleanisInCombat()
Whether the local player has a combat health bar, an attack target or an incoming attacker.
- booleanisInPvpArea()
Checks if the player is currently in a PVP area.
- booleanisPoisoned()
Checks if the player is currently poisoned.
- booleanisRetaliating()
Checks if the player is currently retaliating.
- booleanisSpecEnabled()
Checks if the player's special attack is enabled.
- booleanisSuperAntifired()
Checks if the player has a super antifire potion effect active.
- booleanisVenomed()
Checks if the player is currently venomed.
- voidsetAttackStyle(AttackStyle)
Sets the player's attack style.
- voidtoggleRetaliate(boolean)
Toggles the player's auto-retaliate setting.
- voidtoggleSpec()
Toggles the player's special attack.
getAttackRange()static
public static int getAttackRange()How many tiles your weapon reaches.
getAttackStyle()static
public static AttackStyle getAttackStyle()Gets the player's current attack style.
Returns
The player's current attack style.
getAttackStyleName()static
public static String getAttackStyleName()The name of your attack style.
getEquippedWeaponStyle()static
public static CombatAttackStyle getEquippedWeaponStyle()Combat family of the worn weapon, including known hybrid-weapon overrides.
getHealth()static
public static int getHealth()Gets the player's current health.
Returns
The player's current health.
getNextPoisonDamage()static
public static int getNextPoisonDamage()The damage of your next poison or venom hit.
Returns
The damage that the next poison hitsplat will incur.
getRemainingTeleblockTicks()static
public static int getRemainingTeleblockTicks()How many ticks of Tele Block are left.
Returns
The number of remaining teleblock ticks.
getSpecEnergy()static
public static int getSpecEnergy()Gets the player's current special attack energy.
Returns
The player's special attack energy (0-100).
inMultiWay()static
public static boolean inMultiWay()Checks if the player is currently in multiway combat.
Returns
True if the player is in multiway combat, false otherwise.
isAntifired()static
public static boolean isAntifired()Checks if the player has an antifire potion effect active.
Returns
True if the player has an antifire potion effect active, false otherwise.
isAntipoisoned()static
public static boolean isAntipoisoned()Whether an antipoison is working.
Returns
True if an antipoison effect is active.
isAntivenomed()static
public static boolean isAntivenomed()Whether an antivenom is working.
Returns
True if an antivenom effect is active.
isInCombat()static
public static boolean isInCombat()Whether the local player has a combat health bar, an attack target or an incoming attacker.
isInPvpArea()static
public static boolean isInPvpArea()Checks if the player is currently in a PVP area.
Returns
True if the player is in a PVP area, false otherwise.
isPoisoned()static
public static boolean isPoisoned()Checks if the player is currently poisoned.
Returns
True if the player is poisoned, false otherwise.
isRetaliating()static
public static boolean isRetaliating()Checks if the player is currently retaliating.
Returns
True if the player is retaliating, false otherwise.
isSpecEnabled()static
public static boolean isSpecEnabled()Checks if the player's special attack is enabled.
Returns
True if the special attack is enabled, false otherwise.
isSuperAntifired()static
public static boolean isSuperAntifired()Checks if the player has a super antifire potion effect active.
Returns
True if the player has a super antifire potion effect active, false otherwise.
isVenomed()static
public static boolean isVenomed()Checks if the player is currently venomed.
Returns
True if the player is venomed, false otherwise.
setAttackStyle(AttackStyle)static
public static void setAttackStyle(AttackStyle attackStyle)Sets the player's attack style.
Parameters
attackStyle- The attack style to set.
toggleRetaliate(boolean)static
public static void toggleRetaliate(boolean bool)Toggles the player's auto-retaliate setting.
Parameters
bool- True to enable auto-retaliate, false to disable.
toggleSpec()static
public static void toggleSpec()Toggles the player's special attack.
Also allowed
Every class has these, as in plain Java.
equals, toString