Difference between revisions of "Autosell"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
imported>StDoodle
m
Line 16: Line 16:
 
}}|
 
}}|
  
function_description=Attempts to autosell {{pspan|qty}} of {{pspan|it}}. Returns true if all items are sold as specified, or as many as possible, and false.</p>
+
function_description=Attempts to autosell {{pspan|qty}} of {{pspan|it}}. Returns true if all items are sold as specified, or as many as possible, and false otherwise.</p>
 
<p>Note that specifying a higher {{pspan|qty}} than you have of an item, or an item that cannot be autosold, will still return true as the function has done as much as it could.|
 
<p>Note that specifying a higher {{pspan|qty}} than you have of an item, or an item that cannot be autosold, will still return true as the function has done as much as it could.|
  

Revision as of 00:47, 5 March 2010


needs(code_samples);

Function Syntax

boolean autosell(int qty ,item it )

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

Attempts to autosell qty of it. Returns true if all items are sold as specified, or as many as possible, and false otherwise.

Note that specifying a higher qty than you have of an item, or an item that cannot be autosold, will still return true as the function has done as much as it could.

CLI Equivalent

The CLI commands "sell" and "autosell" function similarly.