Skip to content

Item

getID

Returns the item's ID.

lua
item:getID()

getXP

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

lua
item:getXP(world, player)

getGems

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

lua
item:getGems(world, player)

getName

Returns the item's name.

lua
item:getName()

getNetID

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

lua
item:getNetID()

getRarity

Returns the item's rarity.

lua
item:getRarity()

getGrowTime

Returns the item's grow time in seconds.

lua
item:getGrowTime()

getActionType

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

lua
item:getActionType()

getCategoryType

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

lua
item:getCategoryType()

getClothingType

Returns the clothing type of an item.

lua
item:getClothingType()

getEditableType

Returns the editable type of an item.

lua
item:getEditableType()

setPrice

Sets the price of the item.

lua
item:setPrice(price)

setGrowTime

Sets the grow time for an item globally.

lua
item:setGrowTime(seconds)

setActionType

Sets the action type for an item globally.

lua
item:setActionType(type)

setDescription

Sets the description for an item globally.

lua
item:setDescription(text)

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)

setEditableType

Sets the editable type for an item globally.

lua
item:setEditableType(value)

isObtainable

Returns true if the item is obtainable.

lua
item:isObtainable()

Released under the MIT License.