Difference between revisions of "Put shop"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m (Created page with '{{#vardefine:name|put_shop}} {{#vardefine:return_type|boolean}} {{FunctionPage| name={{#var:name}}| function_category=Item Management| function1={{Function| name={{#var:name}}|…')
 
imported>StDoodle
m
Line 26: Line 26:
 
parameter4={{Param|item|it}}|
 
parameter4={{Param|item|it}}|
 
parameter5={{Param|DATATYPE|SHORT_DESC}}|
 
parameter5={{Param|DATATYPE|SHORT_DESC}}|
p1desc=LONG_{{pspan|price}} is the price to set; using 0 will result in the max-price of 999,999,999 if item is not currently in your store|
+
p1desc={{pspan|price}} is the price to set; using 0 will result in the max-price of 999,999,999 if item is not currently in your store|
p2desc=LONG_{{pspan|limit}} is the limit per player per day, or no limit if set to 0|
+
p2desc={{pspan|limit}} is the limit per player per day, or no limit if set to 0|
p3desc=LONG_{{pspan|qty}} an optional parameter for the quantity of items to put in your shop (defaults to all if not provided)|
+
p3desc={{pspan|qty}} an optional parameter for the quantity of items to put in your shop (defaults to all if not provided)|
p4desc=LONG_{{pspan|it}} is the item to put in your mall store.|
+
p4desc={{pspan|it}} is the item to put in your mall store.|
 
}}|
 
}}|
  
Line 40: Line 40:
 
code=
 
code=
 
<syntaxhighlight>
 
<syntaxhighlight>
CODE GOES HERE
+
//code
 
</syntaxhighlight>}}|
 
</syntaxhighlight>}}|
  

Revision as of 22:07, 1 March 2010



Function Syntax

boolean put_shop(int price ,int limit ,item it )

boolean put_shop(int price ,int limit ,int qty ,item it ,DATATYPE SHORT_DESC )

  • price is the price to set; using 0 will result in the max-price of 999,999,999 if item is not currently in your store
  • limit is the limit per player per day, or no limit if set to 0
  • qty an optional parameter for the quantity of items to put in your shop (defaults to all if not provided)
  • it is the item to put in your mall store.

Places items in your mall store with settings as described above. Returns true if placement is successful and false if placement fails.

Note that this function will fail and return false if you try to put items in your store below minimum mall value.

Code Sample

The following example will put all of your broken skulls in your mall store for 500 meat.

//code

CLI Equivalent

The CLI command "mallsell" works similarly.

See Also

FIRST() | SECOND() | ETC()