java.lang.Object
net.botwithus.rs3.game.vars.VarManager
A manager that provides easy access to the game's different types of vars.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
getInvVarbit
(int invId, int slot, int varbitId) static int
getVarbitValue
(int varbitId) Retrieves the value of the specified varbit.static int
getVarc
(int id) Retrieves the value of a client-side variable as an integer.static int
getVarcBitValue
(int id) static @Nullable String
getVarcString
(int id) Retrieves the value of a client variable as a String.static @Nullable VarDomainType
getVarDomain
(int varbitId) Gets theVarDomainType
associated with the given varbit Id.static int
getVarpValue
(int varpId) static int
getVarValue
(VarDomainType domain, int varId)
-
Method Details
-
getVarValue
-
getVarpValue
public static int getVarpValue(int varpId) -
getVarbitValue
public static int getVarbitValue(int varbitId) Retrieves the value of the specified varbit.- Parameters:
varbitId
- the id of the varbit to retrieve- Returns:
- the value of the varbit
-
getVarcString
Retrieves the value of a client variable as a String.- Parameters:
id
- The ID of the client variable.- Returns:
- The value of the client variable, or null if the variable does not exist.
-
getVarc
public static int getVarc(int id) Retrieves the value of a client-side variable as an integer.- Parameters:
id
- The id of the variable to retrieve.- Returns:
- The value of the variable as an integer, or -1 if the variable does not exist.
-
getVarcBitValue
public static int getVarcBitValue(int id) -
getVarDomain
Gets theVarDomainType
associated with the given varbit Id.- Parameters:
varbitId
- the varbit ID- Returns:
- the
VarDomainType
associated with the given varbit id's type, or null if it's unavailable.
-
getInvVarbit
public static int getInvVarbit(int invId, int slot, int varbitId)
-