Class VarManager

java.lang.Object
net.botwithus.rs3.game.vars.VarManager

public class VarManager extends Object
A manager that provides easy access to the game's different types of vars.
  • Method Details

    • getVarValue

      public static int getVarValue(VarDomainType domain, int varId)
    • 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

      @Nullable public static @Nullable String getVarcString(int id)
      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

      @Nullable public static @Nullable VarDomainType getVarDomain(int varbitId)
      Gets the VarDomainType 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)