To coinmaster: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Bale
It wasn't so hard to fix that you had to delete the entire code sample.
imported>Gnocchi masala
Make it a meaningful use of to_coinmaster again.
Line 17: Line 17:
code1={{CodeSample|
code1={{CodeSample|
title=Code Sample|
title=Code Sample|
description=This sells off all the Island War vendor trash to the appropriate coinmasters for quarters and dimes.|
description=This sells off all the Island War vendor Frat boy trash to the hippy coinmaster for dimes.|
code=
code=
<syntaxhighlight>
<syntaxhighlight>
foreach trash in $items[red class ring, blue class ring, white class ring, PADL Phone,
foreach trash in $items[red class ring, blue class ring, white class ring, PADL Phone]
pink clay bead, purple clay bead, green clay bead, communications windchimes]
   if(item_amount(trash) > 0)
   if(item_amount(trash) > 0)
       sell(trash.buyer, item_amount(trash), trash);
       sell(to_coinmaster("Dimemaster"), item_amount(trash), trash);
</syntaxhighlight>
</syntaxhighlight>
}}|
}}|

Revision as of 05:32, 18 March 2012

Function Syntax

boolean to_coinmaster(string store )

  • store is hopefully the name of a coinmaster

Code Sample

This sells off all the Island War vendor Frat boy trash to the hippy coinmaster for dimes.

foreach trash in $items[red class ring, blue class ring, white class ring, PADL Phone]
   if(item_amount(trash) > 0)
      sell(to_coinmaster("Dimemaster"), item_amount(trash), trash);

See Also

visit() | is_accessible() | buys_item() | sells_item()