Mod:Creation Kit/SellItem - ObjectReference

Member of: Mod:Creation Kit/ObjectReference Script

"Sells" X amount of the specified item from this reference's inventory.

Parameters

 * Item: what item we want to sell.
 * Value: How much each Item is worth (in other words, payment will be: Items sold * Value)
 * amountToSell: How many references to remove. If < 0 means sell ALL of the specified Item in the container
 * Default: -1
 * Silent: If true, no message will be printed to the screen when removing Item and adding paymentItem (only meaningful when calling on the Player)
 * Default: false
 * paymentItem: what Item to give as payment. If None, means caps001.
 * Default: None.
 * PaymentContainer: what container to place payment in. If None, means the calling container.
 * Default: None.

Return Value
How many items were sold. If you specifiy amountToSell which is greater than the actual amount of items, the return value can be used to determine how many actually were sold.