Combat

public class Combat

Contains utility methods for interacting with the combat tab and obtaining other combat related information

Types

AttackStyle
Link copied to clipboard
public enum AttackStyle
An attack style that is selectable on the combat tab
AutocastableSpell
Link copied to clipboard
public enum AutocastableSpell
A spell that can be autocast
WeaponType
Link copied to clipboard
public enum WeaponType

Functions

activateSpecialAttack
Link copied to clipboard
static boolean activateSpecialAttack()
Attempts to activate special attack, using the spec orb if able
static boolean activateSpecialAttack(boolean orb)
Attempts to activate special attack
canUseSpecialAttack
Link copied to clipboard
static boolean canUseSpecialAttack()
Checks if we have enough special attack energy to use a special attack
getAttackingPlayer
Link copied to clipboard
static Optional<PlayergetAttackingPlayer()
Gets the player that we are attacking
getAttackStyleIndexFor
Link copied to clipboard
static Optional<IntegergetAttackStyleIndexFor(Combat.AttackStyle style)
Gets the current attack style index for the specified attack style
getAttackStyleNames
Link copied to clipboard
static List<StringgetAttackStyleNames()
Gets the available attack actions (the text on the combat style tabs).
getAutocastSpell
Link copied to clipboard
static Optional<Combat.AutocastableSpellgetAutocastSpell()
Gets the currently selected autocast spell
getCurrentAttackStyle
Link copied to clipboard
static Combat.AttackStyle getCurrentAttackStyle()
Gets the current AttackStyle
getSelectedAttackStyleIndex
Link copied to clipboard
static int getSelectedAttackStyleIndex()
Gets the selected attack style index
getSpecialAttackPercent
Link copied to clipboard
static int getSpecialAttackPercent()
Gets the current amount of special attack available (out of 100)
getWeaponName
Link copied to clipboard
static Optional<StringgetWeaponName()
Gets the current weapon name
getWeaponSpecialAttackPercent
Link copied to clipboard
static int getWeaponSpecialAttackPercent()
Gets the special attack percent required for the current weapon
static int getWeaponSpecialAttackPercent(int id)
Gets the special attack percent required for the specified weapon
getWeaponType
Link copied to clipboard
static Combat.WeaponType getWeaponType()
Gets the current weapon type
getWildernessLevel
Link copied to clipboard
static int getWildernessLevel()
Gets the level of wilderness the player character is in, based on WorldTile position.
isAttackStyleAvailable
Link copied to clipboard
static boolean isAttackStyleAvailable(Combat.AttackStyle style)
Checks if the specified attack style is currently available
isAttackStyleSet
Link copied to clipboard
static boolean isAttackStyleSet(Combat.AttackStyle style)
Checks if the specified attack style is currently set
isAutoRetaliateOn
Link copied to clipboard
static boolean isAutoRetaliateOn()
Checks if auto retaliate is on
isDefensiveAutocasting
Link copied to clipboard
static boolean isDefensiveAutocasting()
Checks if we are defensive autocasting
isInMultiCombat
Link copied to clipboard
static boolean isInMultiCombat()
Checks if we are in a multi combat zone
isInWilderness
Link copied to clipboard
static boolean isInWilderness()
Determines if the player character is in the wilderness.
isSpecialAttackEnabled
Link copied to clipboard
static boolean isSpecialAttackEnabled()
Checks if special attack is enabled (ex.
isSpecOrbDisabled
Link copied to clipboard
static boolean isSpecOrbDisabled()
Checks if the spec orb is disabled due to being in a PvP zone
isWeaponSpecialAttackAvailable
Link copied to clipboard
static boolean isWeaponSpecialAttackAvailable()
Checks if the currently equipped weapon supports special attacks
setAttackByIndex
Link copied to clipboard
static boolean setAttackByIndex(int index)
Attempts to select the specified combat style index if not already selected
setAttackByName
Link copied to clipboard
static boolean setAttackByName(String actionName)
Attempts to select the specified attack action if not already selected.
setAttackStyle
Link copied to clipboard
static boolean setAttackStyle(Combat.AttackStyle style)
Sets the specified attack style
setAutocastSpell
Link copied to clipboard
static boolean setAutocastSpell(Combat.AutocastableSpell spell)
Attempts to autocast the specified autocastable spell, not using defensive
static boolean setAutocastSpell(Combat.AutocastableSpell spell, boolean defensive)
Attempts to autocast the specified autocastable spell
setAutoRetaliate
Link copied to clipboard
static boolean setAutoRetaliate(boolean active)
Attempts to enable or disable auto retaliate