Varbits
Intermediatenet.runelite.api
Constants for accessing game state variables (varbits). Used for special attack energy, run energy, combat style, and many other game values.
Category
Game State
Methods
0
Properties
3
Properties (3)
SPECIAL_ATTACK_PERCENT
intVarbit ID for special attack energy percentage (0-100)
java
1int specEnergy = client.getVar(Varbits.SPECIAL_ATTACK_PERCENT);
2System.out.println("Special attack: " + specEnergy + "%");RUN_SLOWED_DEPLETION_ACTIVE
intVarbit ID for whether run energy depletion is slowed
java
1boolean runSlowed = client.getVar(Varbits.RUN_SLOWED_DEPLETION_ACTIVE) == 1;COMBAT_STYLE
intVarbit ID for current combat style (0=Aggressive, 1=Accurate, 2=Defensive, 3=Controlled)
java
1int style = client.getVar(Varbits.COMBAT_STYLE);
2String styleName = style == 0 ? "Aggressive" :
3 style == 1 ? "Accurate" :
4 style == 2 ? "Defensive" : "Controlled";