No categories assigned

LUA:SetItemCount

LUA Functions: SetItemCount()

Syntax

SetItemCount(param1, param2, param3)


Parameters

Required - param1 (Item), param2 (Player), param3 (int16)
param1 is the item to change
param2 is the owner of the item
param3 is the new item count


Usage

function used(Item, Player)
    SetItemCount(Item, Player, GetItemCount(Item) - 1)
end

When this item is used, it will reduce the item count by 1.

Notes

The new count value must be <= the max stackcount of that item, if count is set to 0 the item is also destroyed.