Eat: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
No edit summary
imported>Heeheehee
mNo edit summary
Line 30: Line 30:
}}|
}}|


see_also={{SeeAlso|can_eat|eat_silent|fullness_limit|my_fullness}}|
see_also={{SeeAlso|can_eat|eatsilent|fullness_limit|my_fullness}}|
cli_equiv=The CLI command "eat" works similarly.|
cli_equiv=The CLI command "eat" works similarly.|
}}
}}

Revision as of 04:26, 9 May 2010

Function Syntax

boolean eat(int qty ,item consume )

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

Will attempt to eat qty amount of item consume. Returns true for food items and false for items that are not. (The return value does not reflect whether or not the items were actually consumed.) Using this command without Got Milk active, when you are currently capable of acquiring said effect, will issue a warning dialog about eating without Got Milk active.

Code Sample

Eat maximum amount of olive lo meins.

int amount = (fullness_limit() - my_fullness()) / 3;
eat(amount, $item[olive lo mein]);

CLI Equivalent

The CLI command "eat" works similarly.

See Also

can_eat() | eatsilent() | fullness_limit() | my_fullness()