Difference between revisions of "My spleen use"
Jump to navigation
Jump to search
imported>StDoodle |
imported>Bale m |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{#vardefine:name|my_spleen_use}} | + | {{ |
− | {{#vardefine:return_type|int}} | + | #vardefine:name|my_spleen_use}}{{ |
+ | #vardefine:return_type|int}}{{ | ||
− | + | FunctionPage| | |
name={{#var:name}}| | name={{#var:name}}| | ||
− | |||
function1={{Function| | function1={{Function| | ||
Line 20: | Line 20: | ||
code= | code= | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | + | if (my_spleen_use() < spleen_limit()) { | |
− | retrieve_item( | + | int qty = spleen_limit()-my_spleen_use(); |
− | use( | + | retrieve_item(qty , $item[twinkly wad]); |
+ | use(qty, $item[twinkly wad]); | ||
} | } | ||
</syntaxhighlight>}}| | </syntaxhighlight>}}| | ||
Line 28: | 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]);
}