Chew

From Kolmafia
Revision as of 23:12, 17 October 2015 by imported>Relyk (Created page with "{{ #vardefine:name|chew}}{{ #vardefine:return_type|boolean}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggregate}}| retu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

boolean chew(int qty ,item consume )

  • qty is the quantity to chew
  • consume is the item to chew

Will attempt to chew qty amount of item consume. Returns true for chewable items and false for items that are not. (The return value does not reflect whether or not the items were actually consumed.)

Code Sample

Chew as many coffee pixie sticks as possible.

item it = $item[coffee pixie stick];
int spleenUsed = it.spleen;
int amount = (spleen_limit() - my_spleen_use()) / spleenUsed;
chew(amount, it);

CLI Equivalent

The CLI command "chew" works similarly.

See Also

eat() | drink()