Difference between revisions of "To coinmaster"
Jump to navigation
Jump to search
imported>Lostcalpolydude (The code sample didn't work. A new one is needed.) |
imported>Fronobulax m (Fixed typo - returns coinmaster, not boolean) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
name={{#var:name}}| | name={{#var:name}}| | ||
aggregate={{#var:aggregate}}| | aggregate={{#var:aggregate}}| | ||
− | return_type= | + | return_type=coinmaster| |
return_also={{#var:return_also}}| | return_also={{#var:return_also}}| | ||
parameter1={{Param|string|store}}| | parameter1={{Param|string|store}}| | ||
Line 15: | Line 15: | ||
}}| | }}| | ||
− | + | code1={{CodeSample| | |
+ | title=Code Sample| | ||
+ | description=This sells off all the Island War vendor Frat boy trash to the hippy coinmaster for dimes.| | ||
+ | code= | ||
+ | <syntaxhighlight> | ||
+ | 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); | ||
+ | </syntaxhighlight> | ||
+ | }}| | ||
+ | |||
see_also={{SeeAlso|visit|is_accessible|buys_item|sells_item}}| | see_also={{SeeAlso|visit|is_accessible|buys_item|sells_item}}| |
Latest revision as of 19:49, 11 July 2017
Function Syntax
coinmaster 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);