Skip to content

Item

getActionType

Returns the item's action type (e.g., clothing, seed).

lua
getActionType()

getCategoryType

Returns the category type of an item (as a bitflag integer).

lua
getCategoryType()

getClothingType

Returns the clothing type of an item.

lua
getClothingType()

getEditableType

Returns the editable type of an item.

lua
getEditableType()

getGems

Returns the number of gems an item would drop. Pass world and player arguments (optional) to include buffs.

lua
item:getGems(world, player)

getGrowTime

Returns the item's grow time in seconds.

lua
getGrowTime()

getID

Returns the item's ID.

lua
getID()

getName

Returns the item's name.

lua
getName()

getNetID

Returns the item's net ID (same as item ID).

lua
getNetID()

getRarity

Returns the item's rarity.

lua
getRarity()

getXP

Returns the amount of XP an item would give. Pass world and player arguments (optional) to include buffs.

lua
item:getXP(world, player)

isObtainable

Returns true if the item is obtainable.

lua
isObtainable()

setActionType

Sets the action type for an item globally.

lua
item:setActionType(type)

setCategoryType

Sets the category type for an item globally, using bit flags.

lua
item:setCategoryType(value)

setClothingType

Sets the clothing type for an item globally.

lua
item:setClothingType(typeID)

setDescription

Sets the description for an item globally.

lua
item:setDescription(text)

setEditableType

Sets the editable type for an item globally.

lua
item:setEditableType(value)

setGrowTime

Sets the grow time for an item globally.

lua
item:setGrowTime(seconds)

setPrice

Sets the price of the item.

lua
item:setPrice(price)

Released under the MIT License.