My spleen use: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
m Server hits are bad, mmkay?
imported>Bale
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=Your Character|


function1={{Function|
function1={{Function|
Line 22: Line 21:
<syntaxhighlight>
<syntaxhighlight>
if (my_spleen_use() < spleen_limit()) {
if (my_spleen_use() < spleen_limit()) {
   retrieve_item(spleen_limit()-my_spleen_use() , $item[twinkly wad]);
   int qty = spleen_limit()-my_spleen_use();
   use(spleen_limit()-my_spleen_use() , $item[twinkly wad]);
  retrieve_item(qty , $item[twinkly wad]);
   use(qty, $item[twinkly wad]);
}
}
</syntaxhighlight>}}|
</syntaxhighlight>}}|
Line 29: Line 29:
see_also={{SeeAlso|spleen_limit|retrieve_item|use}}|
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()