Difference between revisions of "Template:OverrideAI"

From OpenKore Wiki
Jump to navigation Jump to search
(Created page with "<noinclude>This template describes the '''overrideAI''' parameter of the automacro eventMacros.</noinclude> ; overrideAI :* '''overrideAI''' is an op...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<noinclude>This template describes the '''overrideAI''' [[EventMacro#Parameters|parameter]] of the automacro eventMacros.</noinclude>
 
<noinclude>This template describes the '''overrideAI''' [[EventMacro#Parameters|parameter]] of the automacro eventMacros.</noinclude>
; overrideAI
+
; overrideAI <[[boolean]]>
 
:* '''overrideAI''' is an optional parameter.
 
:* '''overrideAI''' is an optional parameter.
 
:* '''overrideAI''' defines if eventMacro will put itself in the AI queue.
 
:* '''overrideAI''' defines if eventMacro will put itself in the AI queue.
Line 8: Line 8:
 
:* It's important to note that when it's value is 1 since it won't be put into AI queue normal AI functions will continue as normal, like mob hunting or autostorage.
 
:* It's important to note that when it's value is 1 since it won't be put into AI queue normal AI functions will continue as normal, like mob hunting or autostorage.
  
  automacro MyAuto {
+
  automacro MyAuto1 {
 
     <automacro conditions and parameters (and only them)>
 
     <automacro conditions and parameters (and only them)>
 
     overrideAI 0
 
     overrideAI 0
     call myMacro
+
     call myMacro1
 
  }
 
  }
  macro myMacro {
+
  macro myMacro1 {
 
     <macro instructions (and only them, as this is regular macro)>
 
     <macro instructions (and only them, as this is regular macro)>
 
     do move prontera
 
     do move prontera
Line 22: Line 22:
 
     <automacro conditions and parameters (and only them)>
 
     <automacro conditions and parameters (and only them)>
 
     overrideAI 1
 
     overrideAI 1
     call myMacro
+
     call myMacro2
 
  }
 
  }
 
  macro myMacro2 {
 
  macro myMacro2 {

Latest revision as of 20:24, 18 October 2020

This template describes the overrideAI parameter of the automacro eventMacros.

overrideAI <boolean>
  • overrideAI is an optional parameter.
  • overrideAI defines if eventMacro will put itself in the AI queue.
  • If not used in the automacro the default value will be used, which is: 0.
  • When it's value is 0 the macro will be put into AI queue as 'eventMacro' and the next macro command will only be run if current AI is 'eventMacro'.
  • When it's value is 1 the macro will not be put into AI queue and the next macro command will always be run.
  • It's important to note that when it's value is 1 since it won't be put into AI queue normal AI functions will continue as normal, like mob hunting or autostorage.
automacro MyAuto1 {
    <automacro conditions and parameters (and only them)>
    overrideAI 0
    call myMacro1
}
macro myMacro1 {
    <macro instructions (and only them, as this is regular macro)>
    do move prontera
    log This will only be printed when the 'move prontera' has been completed, since 'move' takes the first place in AI queue.
}

automacro MyAuto2 {
    <automacro conditions and parameters (and only them)>
    overrideAI 1
    call myMacro2
}
macro myMacro2 {
    <macro instructions (and only them, as this is regular macro)>
    do move prontera
    log This will be printed after a macro_delay has passed before the last command, because it won't check AI queue.
}