Difference between revisions of "Craft"

From Kolmafia
Jump to navigation Jump to search
imported>Bale
(Created page with '{{FunctionPage | page_name=craft| function_category=Miscellaneous| function1_return_type=int | function1_parameter1={{Param|string|mode}} | function1_parameter2={{Param|int|count…')
 
imported>Bale
Line 20: Line 20:
 
title=Simple Example|
 
title=Simple Example|
 
description=Just an example of how to make vials of brown slime in two different ways.|
 
description=Just an example of how to make vials of brown slime in two different ways.|
code=<syntaxhighlight lang="c">
+
code=<syntaxhighlight>
 
craft("cook", 1, to_int($item[vial of red slime]), to_int($item[vial of green slime]));
 
craft("cook", 1, to_int($item[vial of red slime]), to_int($item[vial of green slime]));
 
craft("cook", 1, to_int($item[vial of red slime]), to_int($item[vial of chartreuse slime]));
 
craft("cook", 1, to_int($item[vial of red slime]), to_int($item[vial of chartreuse slime]));

Revision as of 21:50, 27 February 2010

Function Syntax

This is a raw crafting function that will attempt to craft raw materials without considering the outcome of that crafting.

It can be useful for specialized tasks such as gaining the "Color Wheel of Yuck" trophy since that requires you to craft many items using different methods to create the same results. It returns the number of each ingredient used. Ideally, this is equal to the "count" parameter, but could be less if, for example, your box servant blew up, you require box servants, and auto-repair was either disabled or failed.

Simple Example

Just an example of how to make vials of brown slime in two different ways.

craft("cook", 1, to_int($item[vial of red slime]), to_int($item[vial of green slime]));
craft("cook", 1, to_int($item[vial of red slime]), to_int($item[vial of chartreuse slime]));