forked from opentibia/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Thing.getName
Hampus Joakim Nilsson edited this page Aug 3, 2012
·
1 revision
Returns the name of the thing.
[[String]] [[Thing]].getName()
Returns the name of the thing. This is either the name of the item (without the count / article) or the name of the player / creature.
If you want the name of an item including the article, use Item.getLongName.
A simple command that displays the name of the item in one of the player's hands.
local cmd = Command:new("GetItemName")
cmd.words = "/getitemname"
function cmd.handler(event)
event.creature:sendNote("You are holding '" .. event.creature:getInventoryItem(SLOT_HAND) .. "'.")
end
-- Registers the name of the item
cmd:register()
Thing Reference |
---|
destroy | getName | getParent | getPosition | getDescription | getParentTile | isMoveable | moveTo |