https://openkore.com/index.php?title=Template:ConfigKeyNot&feed=atom&action=historyTemplate:ConfigKeyNot - Revision history2024-03-28T11:11:13ZRevision history for this page on the wikiMediaWiki 1.34.1https://openkore.com/index.php?title=Template:ConfigKeyNot&diff=4187&oldid=prev4epT: Created page with " <noinclude>This template describes the '''ConfigKeyNot''' state Conditions of the automacro eventMacros.</noinclude> ;ConfigKeyNot :* Description: Checks..."2019-07-04T21:09:56Z<p>Created page with " <noinclude>This template describes the '''ConfigKeyNot''' <a href="/wiki/EventMacro#State" class="mw-redirect" title="EventMacro">state Conditions</a> of the automacro eventMacros.</noinclude> ;ConfigKeyNot :* Description: Checks..."</p>
<p><b>New page</b></p><div> <noinclude>This template describes the '''ConfigKeyNot''' [[EventMacro#State|state Conditions]] of the automacro eventMacros.</noinclude><br />
;ConfigKeyNot<br />
:* Description: Checks if the at least one of the config key pairs doesn't match their desired value.<br />
<br />
: Syntax:<br />
ConfigKeyNot <comma separated list of pairs of config key and value><br />
<br />
: Config key and config value can be variables. (as in ConfigKeyNot attackAuto $myattack or ConfigKeyNot $vars{atk} 2)<br />
<br />
: Example:<br />
ConfigKeyNot $vars{atk} 2<br />
ConfigKeyNot itemsTakeAuto 1, attackAuto 2<br />
<br />
: Set variables:<br />
$.ConfigKeyNotLastKey => Saves the key of the last config key that made ConfigKeyNot become true<br />
$.ConfigKeyNotLastWantedValue => Saves the desired value specified in the condifion of the last config key that made ConfigKeyNot become true<br />
$.ConfigKeyNotLastKeyValue => Saves the value of the last config key that made ConfigKeyNot become true<br />
$.ConfigKeyNotLastMemberIndex => Saves the list index in condition list that made ConfigKeyNot become true<br />
<br />
: Note: Good to be sure your keys are the way you want, example below.<br />
automacro ConfigWasWrong {<br />
exclusive 1<br />
timeout 10<br />
overrideAI 1<br />
ConfigKeyNot itemsTakeAuto 2, attackAuto 2<br />
call {<br />
log There is a config key with the wrong configuration<br />
log The key is $.ConfigKeyNotLastKey<br />
log The wanted value is $.ConfigKeyNotLastWantedValue<br />
log The current key Value is $.ConfigKeyNotLastKeyValue<br />
log The Index is $.ConfigKeyNotLastMemberIndex<br />
log Changing value of key $.ConfigKeyNotLastKey from $.ConfigKeyNotLastKeyValue to $.ConfigKeyNotLastWantedValue<br />
do conf $.ConfigKeyNotLastKey $.ConfigKeyNotLastWantedValue<br />
}<br />
}<br />
<br />
This macro will make sure all config keys specified in ConfigKeyNot have the desired value.</div>4epT