Add item condition: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
Created page with '{{#vardefine:name|add_item_condition}} {{#vardefine:return_type|void}} {{FunctionPage| name={{#var:name}}| function_category=Adventuring| function1={{Function| name={{#var:name…'
 
imported>StDoodle
mNo edit summary
Line 1: Line 1:
{{#vardefine:name|add_item_condition}}
{{
{{#vardefine:return_type|void}}
#vardefine:name|add_item_condition}}{{
#vardefine:return_type|void}}{{


{{FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=Adventuring|
function_category=Adventuring|
Line 17: Line 18:
}}|
}}|


function_description=Adds {{pspan|qty}} of {{pspan|want}} to your current adventuring conditions. Auto-adventuring through KoLmafia or the [[adventure|adventure()]] function will stop if your current conditions are met.|
function_description=Adds {{pspan|qty}} of {{pspan|want}} to your current adventuring conditions. Auto-adventuring through KoLmafia or the [[adventure|adventure()]] function will stop if your current conditions are met.</p>
<p>Note that this function adds items in "+ mode" rather than the standard "total mode" done via the Adventuring pane of KoLmafia; ie it will add a condition to get {{pspan|qty}} additional items, rather than a condition to have {{pspan|qty}} total items in inventory.|


needscode=yes|
needscode=yes|

Revision as of 19:42, 8 March 2010

needs(code_samples);

Function Syntax

void add_item_condition(int qty ,item want )

  • qty is the desired quantity
  • want is the desired item

Adds qty of want to your current adventuring conditions. Auto-adventuring through KoLmafia or the adventure() function will stop if your current conditions are met.

Note that this function adds items in "+ mode" rather than the standard "total mode" done via the Adventuring pane of KoLmafia; ie it will add a condition to get qty additional items, rather than a condition to have qty total items in inventory.

CLI Equivalent

The CLI command "condition" offers similar functionality.

See Also

adventure()