Is tradeable: Difference between revisions
Jump to navigation
Jump to search
imported>Heeheehee mNo edit summary |
imported>Heeheehee m Whoever wrote this code sample apparently didn't know what the parameters of put_shop() were. I think. =D |
||
Line 25: | Line 25: | ||
if(have_shop()) { | if(have_shop()) { | ||
foreach i in get_inventory() | foreach i in get_inventory() | ||
if(is_tradeable(i)) put_shop(0 | if(is_tradeable(i)) put_shop(999999999, 0, i); | ||
} | } | ||
} | } |
Revision as of 14:19, 20 August 2010
Function Syntax
boolean is_tradeable(item check_me )
- check_me is an item to test
This function checks to see if the item check_me can be traded via the Mall, returning true if it can and false otherwise.
Code Samples
The following function dumps your entire inventory into your mall store.
void inv_dump() {
if(have_shop()) {
foreach i in get_inventory()
if(is_tradeable(i)) put_shop(999999999, 0, i);
}
}