Skip to content

Metatable:Container

Stefan A. Brannfjell edited this page Dec 19, 2017 · 4 revisions

No description available at the moment.

Available methods:

addItem(itemId, count/subType = 1, index = INDEX_WHEREEVER, flags = 0)
addItemEx(item, index = INDEX_WHEREEVER, flags = 0)
getCapacity()
getEmptySlots(recursive = false)
getItem(index)
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:
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:
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:

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:
local container = Container(...)
container:getEmptySlots(false)

Added in version: 1.0


getItem(index)

Description: N/A
Parameters:

  • index - No description
Returns: N/A
Example:
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:
local container = Container(...)
container:getItemCountById(2400, -1)

Added in version: 1.0


getItemHoldingCount()

Description: N/A
Parameters: None
Returns: N/A
Example:

local container = Container(...)
container:getItemHoldingCount()

Added in version: 1.0


getSize()

Description: N/A
Parameters: None
Returns: N/A
Example:

local container = Container(...)
container:getSize()

Added in version: 1.0


hasItem(item)

Description: N/A
Parameters:

  • item - No description
Returns: N/A
Example:
local container = Container(...)
container:hasItem(some_userdata)

Added in version: 1.0


isContainer()

Description: N/A
Parameters: None
Returns: N/A
Example:

local container = Container(...)
container:isContainer()

Added in version: 1.0

Clone this wiki locally