Command:/multiline

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 /multiline <delimiter> <command> [<delimiter> <command> [...] ]
Description Executes multiple commands using a single line, with each command separated by a delimiter of your choosing.

Options

Option Description
<delimiter> The delimiter may be anything of your choosing, such as ; word @ # ! * |, but there must be a space before and after the defined delimiter. e.g. /multiline ; command. After it's defined, you don't need to put a space between individual commands. /multiline @ /command@/command@/etc

Notes

  • This command is extremely useful for keybinds
  • /call, /return and /delay are line-based and their use on a /multiline line is unpredictable. Avoid them if possible, and use /timed for pauses.

Examples

  • Using one multline
/if ( ${Target.ID} && ${Target.Type.Equal[NPC]} && !${Me.Combat} ) 
       /multiline ; /echo Attacking ${Target.DisplayName}; /attack on
}
  • Use more than one multiline
/multiline ; /target clear; /mqp on; /timed 200 /multiline | mqp off | /beep

Kaen01 has a great explanation with examples here: https://www.redguides.com/community/threads/multiline-help.73809/

See also