Put shop: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>StDoodle
mNo edit summary
Line 25: Line 25:
parameter3={{Param|int|qty}}|
parameter3={{Param|int|qty}}|
parameter4={{Param|item|it}}|
parameter4={{Param|item|it}}|
parameter5={{Param|DATATYPE|SHORT_DESC}}|
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|
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={{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|

Revision as of 00:24, 2 March 2010



Function Syntax

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

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

  • 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 attempting to put an item in your store at less than minimum mall price will automatically reset the price to mall minimum.

Note that attempting to put a negative amount of an item in your store will not do anything, but will still return true.

Note that you cannot specify a quantity of 0 to change prices, but the function will still return true.

Code Sample

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

put_shop(500 , 5 , $item[broken skull]);

CLI Equivalent

The CLI command "mallsell" works similarly.

See Also

have_shop() | shop_amount()