VarPlayer

Intermediate

net.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

int

VarPlayer 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

int

VarPlayer ID for special attack percentage (0-100)

java
1int specPercent = client.getVar(VarPlayer.SPECIAL_ATTACK_PERCENT);
2System.out.println("Special: " + specPercent + "%");

Related Classes

Plugins Using This Class