Command:/varset

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 /varset <varname> <new value>
Description Sets a variable directly to a new value. Keep in mind that the type of the variable may itself reject this value depending on what you give it. To clear the value of the variable, you may omit the new value.

Options

Examples

  • Concatenate a string variable

/varset MyString ${MyString}stuff

  • Inserts stuff at the front of ${MyString}

/varset MyString stuff${MyString}

  • Sets MyInt to 123

/varset MyInt 123

  • Sets MyTimer to 123 seconds

/varset MyTimer 123s

  • Sets MyFloat to 1.23

/varset MyFloat 1.23

  • Sets array element n to 123

/varset MyIntArray[n] 123

See also