List of Resources
See MKB through human eyesFilter by Category:
All Calculations Control Flow Equipped Armor Equipped Tool GUI Input Looking at Mod related Player Position Server Settings Time and Date Variables WorldFiltros ativos: Categoria: "Control Flow" Tipo: "Action"
ASSIGN
ActionInternal function
Category: Control FlowBREAK
ActionInterrupts exection of the innermost loop. Can be used with: * `DO;LOOP` * `DO;UNTIL` * `DO;WHILE` * `FOR;NEXT` * `FOREACH;NEXT`
Category: Control FlowDO
ActionBegins a loop. Needs to be closed with `LOOP,` `WHILE`, or `UNTIL`. The loop can be exited early by using `BREAK`. It is possible to specify a `[count]` number for it to have a maximum amount of loops. If this number is not specified, it will loop indefinitely.
Category: Control FlowELSE
ActionThe actions following this action will only be executed if no if-clause before evaluated to `true`. Can be used with: * `IF` * `IFBEGINSWITH` * `IFCONTAINS` * `IFENDSWITH` * `IFMATCHES` * `ELSEIF`
Category: Control FlowELSEIF
ActionThe actions following this action will only be executed when the `<condition>` evaluates to `true` and no if-clause before evaluated to true. Can be used with: * `IF` * `IFBEGINSWITH` * `IFCONTAINS` * `IFENDSWITH` * `IFMATCHES`
Category: Control FlowENDIF
ActionEnds an if-clause.
Category: Control FlowENDUNSAFE
ActionEnds an active UNSAFE block
Category: Control FlowFOR
ActionBegins a for loop using the specified `<#var>` as a loop counter. Needs to be closed with `NEXT`. The loop can be exited early by using `BREAK`. Alternative syntax: ``` FOR(<#var> = <start> to <end>) FOR(<#var> = <start> to <end> step <step>) ```
Category: Control FlowFOREACH
ActionRuns a loop over the specified iterator. Needs to be closed with `NEXT`. The iterator can either be [one of the these](/docs/iterators/) or an array. The loop can be exited early by using `BREAK`. Alternative Syntax: ``` FOREACH(<&array[]>,<&content>,[#index]) FOREACH(<&array[]> as <&content>) FOREACH(<&array[]> as <#index> => <&content>) ```
Category: Control FlowIF
ActionThe actions following this action will only be executed when the `<condition>` evaluates to `true`. Needs to be closed with an `ENDIF`.
Category: Control FlowIFBEGINSWITH
ActionThe actions following this action will only be executed when the `<haystack>` starts with `<needle>`.
Category: Control FlowIFCONTAINS
ActionThe actions following this action will only be executed when the `<haystack>` contains the `<needle>`.
Category: Control FlowIFENDSWITH
ActionThe actions following this action will only be executed when the `<haystack>` ends with `<needle>`.
Category: Control FlowIFMATCHES
ActionThe actions following this action will only be executed when the `<subject>` matches the `<pattern>`. Optionally the whole match (or only a group specified by `[group]`) can be saved into `[&target]`.
Category: Control FlowIIF
ActionInline IF statement. Sends `<truetext>` as a chat message if condition succeeds, or sends `<falsetext>` if not.
Category: Control FlowLOOP
ActionEnds a loop that was started with DO
Category: Control FlowNEXT
ActionCompletes a for or foreach loop
Category: Control FlowSTOP
ActionStops the current macro, or macros matching the specified ID For stopping all macros you can use either `"all"` or `"*"`. The ID of a script is displayed in the "Macro Activate" screen, and will be always the task name, when it was started through [EXEC](/docs/actions/exec), or the name of the key/button, if it was started with file includes ($$<file.txt>) or ran directly from a key/button.
Category: Control FlowUNSAFE
ActionBegins an `UNSAFE` block with maximum executions set to `<executions>`. `<executions>` has to be between `0` and `10000`. Default is `100`.
Category: Control FlowUNTIL
ActionCompletes a loop started with DO but exits the loop if `<condition>` is met.
Category: Control FlowWAIT
ActionPauses the script for the time (in seconds) specified, suffix `ms` for a wait in milliseconds or `t` to wait in ticks. It is not possible to wait less than the duration of a tick (`~50ms`), because the mod checks each tick if it should continue.
Category: Control FlowWHILE
ActionCompletes a loop started with DO but exits the loop if `<condition>` is not met
Category: Control Flow