Difference between revisions of "My spleen use"

From Kolmafia
Jump to navigation Jump to search
imported>That FN Ninja
(Created page with 'int my_spleen_use() Returns the logged-in character's current spleen damage as an int.')
 
imported>Bale
m
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[int]] [[my_spleen_use()]]
+
{{
 +
#vardefine:name|my_spleen_use}}{{
 +
#vardefine:return_type|int}}{{
  
Returns the logged-in character's current spleen damage as an [[int]].
+
FunctionPage|
 +
name={{#var:name}}|
 +
 
 +
function1={{Function|
 +
name={{#var:name}}|
 +
aggregate={{#var:aggregate}}|
 +
return_type={{#var:return_type}}|
 +
return_also={{#var:return_also}}|
 +
}}|
 +
 
 +
function_description=Returns the number of spleen hits your character has taken this KoL day.|
 +
 
 +
code1={{CodeSample|
 +
title=Code Sample|
 +
description=Buy and use twinkly wads as many times as possible.|
 +
code=
 +
<syntaxhighlight>
 +
if (my_spleen_use() < spleen_limit()) {
 +
  int qty = spleen_limit()-my_spleen_use();
 +
  retrieve_item(qty , $item[twinkly wad]);
 +
  use(qty, $item[twinkly wad]);
 +
}
 +
</syntaxhighlight>}}|
 +
 
 +
see_also={{SeeAlso|spleen_limit|retrieve_item|use}}|
 +
}}
 +
 
 +
[[Category:Your Character]]

Latest revision as of 21:40, 21 May 2010

Function Syntax

int my_spleen_use()

Returns the number of spleen hits your character has taken this KoL day.

Code Sample

Buy and use twinkly wads as many times as possible.

if (my_spleen_use() < spleen_limit()) {
   int qty = spleen_limit()-my_spleen_use();
   retrieve_item(qty , $item[twinkly wad]);
   use(qty, $item[twinkly wad]);
}

See Also

spleen_limit() | retrieve_item() | use()