Command:/varcalc

From the wonderful RedGuides Wiki

This command is added by MacroQuest

Syntax Key
Notation Description
Text without brackets or braces Required items
<Text inside angle brackets> Placeholder for which you must supply a value
[Text inside square brackets] Optional items
Vertical bar (|) Separator for mutually exclusive items; choose one
{Text | inside | braces} Set of required items; choose one
Ellipsis () Items that can be repeated
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!

Options

Examples

/varcalc MyInt 1+2*2+1

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

/varcalc MyInt ${MyInt}+6

See also