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 intgetInvVarbit(int invId, int slot, int varbitId) static intgetVarbitValue(int varbitId) Retrieves the value of the specified varbit.static intgetVarc(int id) Retrieves the value of a client-side variable as an integer.static intgetVarcBitValue(int id) static @Nullable StringgetVarcString(int id) Retrieves the value of a client variable as a String.static @Nullable VarDomainTypegetVarDomain(int varbitId) Gets theVarDomainTypeassociated with the given varbit Id.static intgetVarpValue(int varpId) static intgetVarValue(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 theVarDomainTypeassociated with the given varbit Id.- Parameters:
varbitId- the varbit ID- Returns:
- the
VarDomainTypeassociated with the given varbit id's type, or null if it's unavailable.
-
getInvVarbit
public static int getInvVarbit(int invId, int slot, int varbitId)
-