VarPlayer
Intermediatenet.runelite.api
Constants for accessing player-specific variables (varplayers). Used for run energy, special attack energy, and other player state values.
Category
Game State
Methods
0
Properties
2
Properties (2)
RUN_ENERGY
intVarPlayer ID for run energy (0-10000, where 10000 = 100%)
java
1int runEnergy = client.getVar(VarPlayer.RUN_ENERGY);
2int percent = (runEnergy * 100) / 10000;
3System.out.println("Run energy: " + percent + "%");SPECIAL_ATTACK_PERCENT
intVarPlayer ID for special attack percentage (0-100)
java
1int specPercent = client.getVar(VarPlayer.SPECIAL_ATTACK_PERCENT);
2System.out.println("Special: " + specPercent + "%");