Interface IVars


public interface IVars
Provides access to game variables (vars).

Game variables store various state information including player settings, quest progress, interface states, and other game data. There are several types of variables:

  • Varbits - Individual bit-packed values within varps
  • Varps (VarPlayer) - Player-specific 32-bit variables
  • VarcInt - Client-side integer variables
  • VarcStr - Client-side string variables
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getBit(int id)
    Gets the value of a varbit.
    int
    getVarcInt(int varClientInt)
    Gets the value of a client integer variable.
    getVarcStr(int varClientStr)
    Gets the value of a client string variable.
    int
    getVarp(int id)
    Gets the value of a varp (VarPlayer).
    void
    setBit(int id, int value)
    Sets the value of a varbit.
  • Method Details

    • getBit

      int getBit(int id)
      Gets the value of a varbit.

      Varbits are individual values stored as bit-packed data within varps. They are used to store smaller values efficiently. Values are cached for performance and automatically invalidated when changed.

      Parameters:
      id - the varbit ID
      Returns:
      the current value of the varbit
    • setBit

      void setBit(int id, int value)
      Sets the value of a varbit.

      Note: This is a client-side operation and may not persist or affect server-side state. Use with caution.

      Parameters:
      id - the varbit ID
      value - the value to set
    • getVarp

      int getVarp(int id)
      Gets the value of a varp (VarPlayer).

      Varps are 32-bit player-specific variables used to store various game state information such as combat settings, quest progress, and interface states.

      Parameters:
      id - the varp ID
      Returns:
      the current value of the varp
    • getVarcInt

      int getVarcInt(int varClientInt)
      Gets the value of a client integer variable.

      VarcInt values are client-side integers used for interface state and other client-specific data that doesn't need server synchronization.

      Parameters:
      varClientInt - the varc int ID
      Returns:
      the current value of the client variable
    • getVarcStr

      String getVarcStr(int varClientStr)
      Gets the value of a client string variable.

      VarcStr values are client-side strings used for interface text and other client-specific string data.

      Parameters:
      varClientStr - the varc string ID
      Returns:
      the current value of the client string variable