function onUse(cid, item, fromPosition, itemEx, toPosition)
--start of config--
local teleportPosition = {x=1000, y=1000, z=7, stackpos=254} --coordinates of the location you wish to teleport to
local removeOriginal = false --remove the original item when you teleport?
local itemToReceive = 2160 --itemid of the item you wish to recieve when you teleport
local storageValue = 13001 --storage value to determine if you teleported before or not
--end of config--
if(removeOriginal) then
doRemoveItem(cid, item.uid, 1)
end
if(getPlayerStorageValue(cid, storageValue) == 1) then
doPlayerSendTextMessage(cid, MessageClasses, 'You\'ve already retrieved ' .. getItemArticleById(itemToReceive) .. ' ' .. getItemNameById(itemToReceive) .. '.')
else
doPlayerAddItem(cid, itemToReceive, 1, FALSE)
doPlayerSetStorageValue(cid, storageValue, 1)
end
doTeleportThing(cid, teleportPosition)
return true
end