Skip to content

Metatable:Item

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

No description available at the moment.

Available methods:

clone()
decay()
getActionId()
getArticle()
getAttribute(key)
getCharges()
getCount()
getDescription(distance)
getFluidType()
getId()
getName()
getParent()
getPluralName()
getPosition()
getSubType()
getTile()
getTopParent()
getType()
getUniqueId()
getWeight()
hasAttribute(key)
hasProperty(property)
isContainer()
isCreature()
isItem()
isPlayer()
isTeleport()
isTile()
moveTo(position or cylinder)
remove(count = -1)
removeAttribute(key)
setActionId(actionId)
setAttribute(key, value)
split(count = 1)
transform(itemId, count/subType = -1)


clone()

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

local item = Item(...)
item:clone()

[To the top] Added in version: 1.0


decay()

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

local item = Item(...)
item:decay()

[To the top] Added in version: 1.0


getActionId()

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

local item = Item(...)
item:getActionId()

[To the top] Added in version: 1.0


getArticle()

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

local item = Item(...)
item:getArticle()

[To the top] Added in version: 1.0


getAttribute(key)

Description: N/A
Parameters:

  • key - No description
Returns: N/A
Example:
local item = Item(...)
item:getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)

[To the top] Added in version: 1.0


getCharges()

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

local item = Item(...)
item:getCharges()

[To the top] Added in version: 1.0


getCount()

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

local item = Item(...)
item:getCount()

[To the top] Added in version: 1.0


getDescription(distance)

Description: N/A
Parameters:

  • distance - No description
Returns: N/A
Example:
local item = Item(...)
item:getDescription(1)

[To the top] Added in version: 1.0


getFluidType()

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

local item = Item(...)
item:getFluidType()

[To the top] Added in version: 1.0


getId()

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

local item = Item(...)
item:getId()

[To the top] Added in version: 1.0


getName()

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

local item = Item(...)
item:getName()

[To the top] Added in version: 1.0


getParent()

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

local item = Item(...)
item:getParent()

[To the top] Added in version: 1.0


getPluralName()

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

local item = Item(...)
item:getPluralName()

[To the top] Added in version: 1.0


getPosition()

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

local item = Item(...)
item:getPosition()

[To the top] Added in version: 1.0


getSubType()

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

local item = Item(...)
item:getSubType()

[To the top] Added in version: 1.0


getTile()

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

local item = Item(...)
item:getTile()

[To the top] Added in version: 1.0


getTopParent()

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

local item = Item(...)
item:getTopParent()

[To the top] Added in version: 1.0


getType()

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

local item = Item(...)
item:getType()

[To the top] Added in version: 1.0


getUniqueId()

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

local item = Item(...)
item:getUniqueId()

[To the top] Added in version: 1.0


getWeight()

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

local item = Item(...)
item:getWeight()

[To the top] Added in version: 1.1


hasAttribute(key)

Description: N/A
Parameters:

  • key - No description
Returns: N/A
Example:
local item = Item(...)
item:hasAttribute(ITEM_ATTRIBUTE_DESCRIPTION)

[To the top] Added in version: 1.1


hasProperty(property)

Description: N/A
Parameters:

  • property - No description
Returns: N/A
Example:
local item = Item(...)
item:hasProperty(unknown)

[To the top] Added in version: 1.0


isContainer()

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

local item = Item(...)
item:isContainer()

[To the top] Added in version: 1.0


isCreature()

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

local item = Item(...)
item:isCreature()

[To the top] Added in version: 1.0


isItem()

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

local item = Item(...)
item:isItem()

[To the top] Added in version: 1.0


isPlayer()

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

local item = Item(...)
item:isPlayer()

[To the top] Added in version: 1.1


isTeleport()

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

local item = Item(...)
item:isTeleport()

[To the top] Added in version: 1.0


isTile()

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

local item = Item(...)
item:isTile()

[To the top] Added in version: 1.1


moveTo(position or cylinder)

Description: N/A
Parameters:

  • position or cylinder - Supported cylinders are: Container, Player and Tile.
Returns: N/A
Example:
local item = Item(...)
item:moveTo(Position())

[To the top] Added in version: 1.0 (only position), extended with support for cylinders in 1.1


remove([count = -1])

Description: N/A
Parameters:

  • count - (optional, default: -1)
Returns: N/A
Example:
local item = Item(...)
item:remove(-1)

[To the top] Added in version: 1.0


removeAttribute(key)

Description: N/A
Parameters:

  • key - No description
Returns: N/A
Example:
local item = Item(...)
item:removeAttribute(ITEM_ATTRIBUTE_DESCRIPTION)

[To the top] Added in version: 1.0


setActionId(actionId)

Description: N/A
Parameters:

  • actionId - No description
Returns: N/A
Example:
local item = Item(...)
item:setActionId(1000)

[To the top] Added in version: 1.0


setAttribute(key, value)

Description: N/A
Parameters:

  • key - No description
  • value - No description
Returns: N/A
Example:
local item = Item(...)
item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, any_string)

[To the top] Added in version: 1.0


split([count = 1])

Description: N/A
Parameters:

  • count - (optional, default: 1)
Returns: N/A
Example:
local item = Item(...)
item:split(1)

[To the top] Added in version: 1.0


transform(itemId[, count/subType = -1])

Description: N/A
Parameters:

  • itemId - No description
  • count/subType - (optional, default: -1)
Returns: N/A
Example:
local item = Item(...)
item:transform(2400, -1)

[To the top] Added in version: 1.0

Clone this wiki locally