Difference between revisions of "Category:Self Condition"

From OpenKore Wiki
Jump to navigation Jump to search
m
(adding custom conditions)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
These condition options are shared between the [[attackComboSlot]], [[attackSkillSlot]], [[buyAuto]], [[doCommand]], [[equipAuto]], [[monsterSkill]], [[partySkill]], [[useSelf_item]], and [[useSelf_skill]] configuration blocks.
 
These condition options are shared between the [[attackComboSlot]], [[attackSkillSlot]], [[buyAuto]], [[doCommand]], [[equipAuto]], [[monsterSkill]], [[partySkill]], [[useSelf_item]], and [[useSelf_skill]] configuration blocks.
 
<noinclude>
 
<noinclude>
== Developer Documentation ==
+
== Checking Self Conditions ==
Custom configuration blocks (maybe from plugins) can use these conditions too via <code>Misc::checkSelfCondition</code> sub.
+
<code>Misc::checkSelfCondition</code> (<config prefix>) - returns value evaluating to boolean true if condition check is passed.
  
Custom self conditions can be made via <code>checkSelfCondition</code> [[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>
 
</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