Difference between revisions of "InCart"

From OpenKore Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 +
== [[:Category:Self Condition|Self Condition]] from [[config.txt]]: ==
 
; inCart <[[References#Item_Names|item name]]> <[[References#Range_Operators|range]]>
 
; inCart <[[References#Item_Names|item name]]> <[[References#Range_Operators|range]]>
 
: If this option is set, the block will be used if the amount of each of the specified list of items in cart 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 be used if the amount of each of the specified list of items in cart 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 Cart Termination on Porings if there are 80 Emperiums inside the cart:
 
It will use Cart Termination on Porings if there are 80 Emperiums inside the cart:
 
  attackSkillSlot Cart Termination {
 
  attackSkillSlot Cart Termination {
Line 11: Line 12:
 
  monsters Poring
 
  monsters Poring
 
  }
 
  }
 +
 +
== [[EventMacro#State|State Conditions]] of the automacro eventMacros: ==
 +
{{Template:InCart}}
  
 
[[Category:Self Condition]]
 
[[Category:Self Condition]]
 +
[[Category:EventMacro_Automacros]]
 +
[[Category:EventMacro_Conditions_State]]

Latest revision as of 06:12, 4 July 2019

Self Condition from config.txt:

inCart <item name> <range>
If this option is set, the block will be used if the amount of each of the specified list of items in cart 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 Cart Termination on Porings if there are 80 Emperiums inside the cart:

attackSkillSlot Cart Termination {
	inCart Emperium 80
	monsters Poring
}

State Conditions of the automacro eventMacros:

InCart
  • Description: Checks if the player has a certain quantity of an item in the cart, uses item name.
  • Does not support percentages.
Syntax:
InCart "<item name>" <Math condition operators>
Note the quotation marks.
Example:
InCart "Blue Potion" > 100
Set variables:
$.InCartLast => Saves the name of the last item that made InCart become true
$.InCartLastAmount => Saves the amount in cart of the last item that made InCart become true