Skip to content

/varcalc

Syntax

/varcalc varname <formula>

Description

  • Sets a variable directly to the numeric result of a calculation (formula)
  • Keep in mind that the type of the variable may itself reject this value depending on what you give it
  • This will not work on strings!

Examples

/varcalc MyInt 1+2*2+1
/varcalc MyInt 1+(2*2)+1

/varcalc MyInt ${MyInt}+6

This command is added by MacroQuest.

Republished and possibly modified from https://docs.macroquest.org/reference/commands/varcalc/