Remove item condition

From Kolmafia
Revision as of 06:41, 23 February 2011 by imported>Bale (is new in r9093)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

void remove_item_condition(int qty ,item want )

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

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

Code Sample

In a Between Battle Script you can automatically account for Screambats being equivalent to a sonar-in-a-biscuit by reducing the number of sonar-in-a-biscuits that you need.

switch(my_location()) {
case $location[Guano Junction]:
case $location[Batrat and Ratbat Burrow]:
case $location[Beanbat Chamber]:
   if(last_monster() == $monster[Screambat] && is_goal($item[sonar-in-a-biscuit]))
      remove_item_condition(1, $item[sonar-in-a-biscuit]);
   break;
}

CLI Equivalent

The CLI command "condition remove" offers similar functionality.

See Also

adventure() | is_goal() | remove_item_condition()