Difference between revisions of "inInventory"

From OpenKore Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 +
== [[:Category:Self Condition|Self Condition]] from [[config.txt]]: ==
 
; inInventory <[[References#Item_Names|item name]]> <[[References#Range_Operators|range]]>
 
; inInventory <[[References#Item_Names|item name]]> <[[References#Range_Operators|range]]>
 
: If this option is set, the block will only be used if the amount of each of the specified list of items in inventory are within the corresponding specified ranges. The value could be a comma-separated list of (<item name> <range>) pairs:
 
: If this option is set, the block will only be used if the amount of each of the specified list of items in inventory are within the corresponding specified ranges. The value could be a comma-separated list of (<item name> <range>) pairs:
  
Syntax:
+
: Syntax:
 
  <item> <[[References#Range_Operators|range]]>[, <item1> <[[References#Range_Operators|range1]]>[, ...]]
 
  <item> <[[References#Range_Operators|range]]>[, <item1> <[[References#Range_Operators|range1]]>[, ...]]
  
== Examples ==
+
: Examples:
 
It will use Aqua Benedicta if there are any Empty Bottle in your inventory and you are not sitting:
 
It will use Aqua Benedicta if there are any Empty Bottle in your inventory and you are not sitting:
 
  [[useSelf_skill]] [[References#Skill_Names|AL_HOLYWATER]] {
 
  [[useSelf_skill]] [[References#Skill_Names|AL_HOLYWATER]] {
Line 12: Line 13:
 
  }
 
  }
  
== Notes ==
+
: Notes:
 
It will not recognize items that are equipped.
 
It will not recognize items that are equipped.
 +
 +
== [[EventMacro#State|State Conditions]] of the automacro eventMacros: ==
 +
{{Template:InInventory}}
  
 
[[Category:Self Condition]]
 
[[Category:Self Condition]]
 +
[[Category:EventMacro_Automacros]]
 +
[[Category:EventMacro_Conditions_State]]

Revision as of 09:53, 4 July 2019

Self Condition from config.txt:

inInventory <item name> <range>
If this option is set, the block will only be used if the amount of each of the specified list of items in inventory are within the corresponding specified ranges. The value could be a comma-separated list of (<item name> <range>) pairs:
Syntax:
<item> <range>[, <item1> <range1>[, ...]]
Examples:

It will use Aqua Benedicta if there are any Empty Bottle in your inventory and you are not sitting:

useSelf_skill AL_HOLYWATER {
	notWhileSitting 1
	inInventory Empty Bottle > 0
}
Notes:

It will not recognize items that are equipped.

State Conditions of the automacro eventMacros:

InInventory
  • Description: Checks if the player has a certain quantity of an item in the inventory, uses item name.
  • Does not support percentages.
Syntax:
InInventory "<item name>" <Math condition operators>
Note the quotation marks.
Example:
InInventory "Red Potion" < 10
Set variables:
$.InInventoryLast => Saves the name of the last item that made InInventory become true
$.InInventoryLastAmount => Saves the amount in inventory of the last item that made InInventory become true