Difference between revisions of "Category:Self Condition"

From OpenKore Wiki
Jump to navigation Jump to search
(Created page with 'Conditions about the character status/information. These condition options are shared between the attackComboSlot, attackSkillSlot, buyAuto, doCommand, [[equipAu…')
 
(adding custom conditions)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Conditions about the character status/information.
 
Conditions about the character status/information.
  
These condition options are shared between the [[attackComboSlot]], [[attackSkillSlot]], [[buyAuto]], [[doCommand]], [[equipAuto]], [[monsterSkill]], [[partySkill]], [[useSelf_item]], and [[useSelf_skill]] configuration blocks. Custom configuration blocks (maybe from plugins) can use these conditions too via '''Misc::checkSelfCondition''' sub.
+
These condition options are shared between the [[attackComboSlot]], [[attackSkillSlot]], [[buyAuto]], [[doCommand]], [[equipAuto]], [[monsterSkill]], [[partySkill]], [[useSelf_item]], and [[useSelf_skill]] configuration blocks.
 +
<noinclude>
 +
== Checking Self Conditions ==
 +
<code>Misc::checkSelfCondition</code> (<config prefix>) - returns value evaluating to boolean true if condition check is passed.
  
Custom self conditions can be made via '''checkSelfCondition''' hook.
+
== Adding Custom Self Conditions ==
 +
 
 +
Hook <code>checkSelfCondition</code> has the following fields in argument hash:
 +
* <code>prefix</code> - currently checked config block's prefix (blockOption's value would be <code>$config{$prefix."_blockOption"}</code>)
 +
* <code>return</code> - set to '''0''' to indicate that condition failed
 +
 
 +
[[Category:Reference]]
 +
</noinclude>

Latest revision as of 08:44, 8 September 2010

Conditions about the character status/information.

These condition options are shared between the attackComboSlot, attackSkillSlot, buyAuto, doCommand, equipAuto, monsterSkill, partySkill, useSelf_item, and useSelf_skill configuration blocks.

Checking Self Conditions

Misc::checkSelfCondition (<config prefix>) - returns value evaluating to boolean true if condition check is passed.

Adding Custom Self Conditions

Hook checkSelfCondition has the following fields in argument hash:

  • prefix - currently checked config block's prefix (blockOption's value would be $config{$prefix."_blockOption"})
  • return - set to 0 to indicate that condition failed