Difference between revisions of "useSelf item"

From OpenKore Wiki
Jump to navigation Jump to search
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
Automatically use items when certain conditions are met.
 
Automatically use items when certain conditions are met.
  
== Syntax: ==
+
== Syntax ==
  useSelf_item [<item names>] {
+
  useSelf_item <item name> [, <item name> [, ...] ] {
  dcOnEmpty [<boolean flag>]
+
  [dcOnEmpty <boolean flag>]
 
   
 
   
  # [[References#Self Conditions|Self Conditions]]
+
  # [[:Category:Self Condition|Self Conditions]]
 
  }
 
  }
  
Line 12: Line 12:
 
----
 
----
  
; useSelf_item [<[[References#Item Names|item names]]>]
+
; <[[References#Item_Names|item name]]>
 
: This option specifies a comma-separated list of items that will automatically be used on self.
 
: This option specifies a comma-separated list of items that will automatically be used on self.
  
Line 19: Line 19:
  
  
; dcOnEmpty [<boolean flag>]
+
; dcOnEmpty <[[boolean]]>
 
: If this option is set, disconnect if there are no more items in inventory to use.
 
: If this option is set, disconnect if there are no more items in inventory to use.
  
 +
== Notes ==
  
== Example ==
+
These blocks should have [[timeout]] set, otherwise they can instantly consume more items then you wanted them to. Treat it like timeout for server to process item usage and your client to receive environment changes (for other block conditions used).
 +
 
 +
== Examples ==
 
* Use Concentration Potion when Concentration Potion status is off and Kore is not sitting and it's in lockMap.
 
* Use Concentration Potion when Concentration Potion status is off and Kore is not sitting and it's in lockMap.
  
 
  useSelf_item Concentration Potion {
 
  useSelf_item Concentration Potion {
  whenStatusInactive Concentration Potion
+
  [[whenStatusInactive]] EFST_ATTHASTE_POTION1
  inLockOnly 1
+
  [[inLockOnly]] 1
  notWhileSitting 1
+
  [[notWhileSitting]] 1
 +
[[timeout]] 5
 
  }
 
  }
  
Line 36: Line 40:
 
[[Category:Items]]
 
[[Category:Items]]
 
[[Category:config block]]
 
[[Category:config block]]
 +
[[Category:auto disconnect]]

Revision as of 16:20, 9 February 2013

Automatically use items when certain conditions are met.

Syntax

useSelf_item <item name> [, <item name> [, ...] ] {
	[dcOnEmpty <boolean flag>]

	# Self Conditions
}


Attribute definitions


<item name>
This option specifies a comma-separated list of items that will automatically be used on self.
Note:
  • Only one of the listed items will be used, so if the listed items are Orange Potion, Red Potion, White Potion and the conditions are met and we have Orange Potion, it will be used.


dcOnEmpty <boolean>
If this option is set, disconnect if there are no more items in inventory to use.

Notes

These blocks should have timeout set, otherwise they can instantly consume more items then you wanted them to. Treat it like timeout for server to process item usage and your client to receive environment changes (for other block conditions used).

Examples

  • Use Concentration Potion when Concentration Potion status is off and Kore is not sitting and it's in lockMap.
useSelf_item Concentration Potion {
	whenStatusInactive EFST_ATTHASTE_POTION1
	inLockOnly 1
	notWhileSitting 1
	timeout 5
}