Functions for working with items.
local Item = ELONA.require("core.Item")
count () | Returns the number of items on the ground. |
has_enchantment (item, enchantment_id) | Checks if an item has an enchantment. |
itemname (item[, number][, use_article]) | Returns the item's name. |
create (position, id, number) | Attempts to create an item of the given quantity at a position. |
memory (type, id) | Retrieves the player's memory of an item type. |
trade_rate (item) | Returns the trading rate of a cargo item. |
find (item_id, location) | Tries to find an item in the player's inventory, the ground, or both. |
weight_string (weight) | Returns the string representation of a weight value. |
Returns the number of items on the ground.
Returns:
Checks if an item has an enchantment.
Parameters:
Returns the item's name.
Parameters:
Attempts to create an item of the given quantity at a position.
Returns the item stack if it was created, nil otherwise.
Parameters:Retrieves the player's memory of an item type.
Parameters:
Returns the trading rate of a cargo item.
Parameters:
Tries to find an item in the player's inventory, the ground, or both.
Parameters:
Returns the string representation of a weight value.
Parameters: