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)_
> **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:addItem(2400, 1, INDEX_WHEREEVER, 0) ``` > **Added in version:** 1.0
###### addItemEx(item[, index = INDEX_WHEREEVER[, flags = 0]]) > **Description:** N/A > **Parameters:**
  • _item_ - _No description_
  • _index_ - _(optional, default: INDEX_WHEREEVER)_
  • _flags_ - _(optional, default: 0)_
> **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:addItemEx(some_userdata, INDEX_WHEREEVER, 0) ``` > **Added in version:** 1.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)_
> **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:getEmptySlots(false) ``` > **Added in version:** 1.0
###### getItem(index) > **Description:** N/A > **Parameters:**
  • _index_ - _No description_
> **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:getItem(some_id) ``` > **Added in version:** 1.0
###### getItemCountById(itemId[, subType = -1]) > **Description:** N/A > **Parameters:**
  • _itemId_ - _No description_
  • _subType_ - _(optional, default: -1)_
> **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:getItemCountById(2400, -1) ``` > **Added in version:** 1.0
###### 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_
> **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:hasItem(some_userdata) ``` > **Added in version:** 1.0
###### isContainer() > **Description:** N/A > **Parameters:** None > **Returns:** N/A > **Example:** ```Lua local container = Container(...) container:isContainer() ``` > **Added in version:** 1.0
⚠️ **GitHub.com Fallback** ⚠️