Template:Call

From OpenKore Wiki
Jump to navigation Jump to search
This template describes the call parameter of the automacro eventMacros.
call [<macro_name> | macro_block ]
  • call is the only required parameter in every automacro.
  • call defines which macro the automacro will execute.
  • call can be a macro name or a macro block.

Example when using a macro name:

automacro <automacro name> {
    <automacro conditions and parameters (and only them)>
    call myMacro
}
macro myMacro {
    <macro instructions (and only them, as this is regular macro)>
    # for example:
    do move prontera
    do move payon
}

Example when using a macro block:

automacro <automacro name> {
    <automacro conditions and parameters (and only them)>
    call {
        <macro instructions (and only them, as this is regular macro)>
        # for example:
        do move prontera
        do move payon
    }
}


  • Two examples above do the same thing.
  • Note that the macro block used in the call parameter has the same rules as a normal macro block.


The first syntax is useful if you want more than one automacro to call one simple macro:

automacro First {
    <conditions> 
    call print
}
automacro Second {
    <conditions> 
    call print
}
macro print {
    log $.caller triggered
}