Buy: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
Created page with '{{#vardefine:name|buy}} {{#vardefine:return_type|boolean}} {{FunctionPage| name={{#var:name}}| function_category=CATEGORY| function1={{Function| name={{#var:name}}| aggregate={…'
 
imported>StDoodle
mNo edit summary
Line 4: Line 4:
{{FunctionPage|
{{FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=CATEGORY|
function_category=Item Management|


function1={{Function|
function1={{Function|

Revision as of 23:41, 1 March 2010



Function Syntax

boolean buy(int qty ,item it )

int buy(int qty ,item it ,int price )

  • qty is the number to purchase
  • it is the item to purchase
  • price is the (optional) maximum price to spend per item

Buys stuff.

Code Sample

Buy a broken skull.

buy(1 , $item[broken skull]);

CLI Equivalent

The CLI commands "buy" and "acquire" work similarly.

See Also

use()