Metatable:Container - RodrigoOt/forgottenserver GitHub Wiki
No description available at the moment.
###Available methods:
[addItem(itemId[, count/subType = 1[, index = INDEX_WHEREEVER[, flags = 0]]])](#addItem{itemId[, count/subType = 1[, index = INDEX_WHEREEVER[, flags = 0]]]})
[addItemEx(item[, index = INDEX_WHEREEVER[, flags = 0]])](#addItemEx{item[, index = INDEX_WHEREEVER[, flags = 0]]})
getCapacity()
[getEmptySlots([recursive = false])](#getEmptySlots{[recursive = false]})
getItem(index)
[getItemCountById(itemId[, subType = -1])](#getItemCountById{itemId[, subType = -1]})
getItemHoldingCount()
getSize()
hasItem(item)
isContainer()
###### addItem(itemId[, count/subType = 1[, index = INDEX_WHEREEVER[, flags = 0]]]) > **Description:** N/A > **Parameters:**
- _itemId_ - _No description_
- _count/subType_ - _(optional, default: 1)_
- _index_ - _(optional, default: INDEX_WHEREEVER)_
- _flags_ - _(optional, default: 0)_
###### addItemEx(item[, index = INDEX_WHEREEVER[, flags = 0]]) > **Description:** N/A > **Parameters:**
- _item_ - _No description_
- _index_ - _(optional, default: INDEX_WHEREEVER)_
- _flags_ - _(optional, default: 0)_
###### getCapacity() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:getCapacity() ``` > **Added in version:** 1.0
###### getEmptySlots([recursive = false]) > **Description:** N/A > **Parameters:**
- _recursive_ - _(optional, default: false)_
###### getItem(index) > **Description:** N/A > **Parameters:**
- _index_ - _No description_
###### getItemCountById(itemId[, subType = -1]) > **Description:** N/A > **Parameters:**
- _itemId_ - _No description_
- _subType_ - _(optional, default: -1)_
###### getItemHoldingCount() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:getItemHoldingCount() ``` > **Added in version:** 1.0
###### getSize() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:getSize() ``` > **Added in version:** 1.0
###### hasItem(item) > **Description:** N/A > **Parameters:**
- _item_ - _No description_
###### isContainer() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:isContainer() ``` > **Added in version:** 1.0