My fullness: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
Added categories
imported>Zarqon
added example
Line 1: Line 1:
Will return and int value of your current fullness level.
[[int]] [[my_fullness()]]


<pre>if(my_fullness() < fullness_limit()){
Returns the logged-in character's current fullness as an [[int]].  This can be used in tandem with [[fullness_limit()]] to eat as much of something as possible:
eat(1, $item[papaya]);
}</pre>


<code>
  if ([[my_fullness()]] < ([[fullness_limit()]]-2))
    [[eat()|eat]]([[floor()|floor]](([[fullness_limit()]]-[[my_fullness()]]) / 3), $[[item]][peach pie]);
</code>
[[Category:Your Character | My fullness()]]
[[Category:Your Character | My fullness()]]
[[Category:Ash Functions |My fullness()]]
[[Category:Ash Functions | My fullness()]]
 
When not logged in, this function returns 0.

Revision as of 06:44, 29 January 2009

int my_fullness()

Returns the logged-in character's current fullness as an int. This can be used in tandem with fullness_limit() to eat as much of something as possible:

 if (my_fullness() < (fullness_limit()-2))
   eat(floor((fullness_limit()-my_fullness()) / 3), $item[peach pie]);

When not logged in, this function returns 0.