ConfigKeyNot
Jump to navigation
Jump to search
- ConfigKeyNot
-
- Description: Checks if the at least one of the config key pairs doesn't match their desired value.
- Syntax:
ConfigKeyNot <comma separated list of pairs of config key and value>
- Config key and config value can be variables. (as in ConfigKeyNot attackAuto $myattack or ConfigKeyNot $vars{atk} 2)
- Example:
ConfigKeyNot $vars{atk} 2 ConfigKeyNot itemsTakeAuto 1, attackAuto 2
- Set variables:
$.ConfigKeyNotLastKey => Saves the key of the last config key that made ConfigKeyNot become true $.ConfigKeyNotLastWantedValue => Saves the desired value specified in the condifion of the last config key that made ConfigKeyNot become true $.ConfigKeyNotLastKeyValue => Saves the value of the last config key that made ConfigKeyNot become true $.ConfigKeyNotLastMemberIndex => Saves the list index in condition list that made ConfigKeyNot become true
- Note: Good to be sure your keys are the way you want, example below.
automacro ConfigWasWrong { exclusive 1 timeout 10 overrideAI 1 ConfigKeyNot itemsTakeAuto 2, attackAuto 2 call { log There is a config key with the wrong configuration log The key is $.ConfigKeyNotLastKey log The wanted value is $.ConfigKeyNotLastWantedValue log The current key Value is $.ConfigKeyNotLastKeyValue log The Index is $.ConfigKeyNotLastMemberIndex log Changing value of key $.ConfigKeyNotLastKey from $.ConfigKeyNotLastKeyValue to $.ConfigKeyNotLastWantedValue do conf $.ConfigKeyNotLastKey $.ConfigKeyNotLastWantedValue } }
This macro will make sure all config keys specified in ConfigKeyNot have the desired value.