Put closet: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>Bale
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=Item Management|


function1={{Function|
function1={{Function|
Line 26: Line 25:
}}|
}}|


function_description=Attempts to move {{pspan|qty}} of {{pspan|it}} to your Colossal Closet from your main inventory. Returns true if the move succeeds and false if it does not. If used without {{pspan|it}} specified, this function will move meat instead of an item.|
function_description=Attempts to move {{pspan|qty}} of {{pspan|it}} to your Colossal Closet from your main inventory. Returns true if the move succeeds and false if it does not. </p>
<p>The one parameter version without {{pspan|it}} will move meat instead of items.|


needscode=yes|
code1={{CodeSample|
title=Code Sample|
description=Closets meat so that you only have 5,000 meat on hand.|
code=
<syntaxhighlight>
if(my_meat() > 5000)
  put_closet(my_meat() - 5000);
</syntaxhighlight>
}}|


see_also={{SeeAlso|put_display|put_stash|take_closet}}|
see_also={{SeeAlso|put_display|put_stash|take_closet}}|
cli_equiv=The CLI command "closet" with the parameter "put" works similarly.
cli_equiv=The CLI command "closet" with the parameter "put" works similarly.
}}
}}
[[Category:Item Management]]

Latest revision as of 22:02, 21 May 2010

Function Syntax

boolean put_closet(int qty )

boolean put_closet(int qty ,item it )

  • qty is the quantity to move
  • it is the item to move

Attempts to move qty of it to your Colossal Closet from your main inventory. Returns true if the move succeeds and false if it does not.

The one parameter version without it will move meat instead of items.

Code Sample

Closets meat so that you only have 5,000 meat on hand.

if(my_meat() > 5000)
   put_closet(my_meat() - 5000);

CLI Equivalent

The CLI command "closet" with the parameter "put" works similarly.

See Also

put_display() | put_stash() | take_closet()