it works the first time you use it, but it doesnt work after. therefor players are stuck in the room.
PHP:
local stone = {x=757, y=590, z=7}
local tpDest = {x=15042, y=764, z=7}
local tpCreate = {x=756, y=589, z=7}
local function f(p)
doRemoveItem(getTileItemById(tpCreate, 1387).uid)
doSendMagicEffect(tpCreate, CONST_ME_POFF)
doCreateItem(1355, 1, stone)
doTransformItem(getTileItemById(p, 1946).uid, 1945)
end
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 1945 then
doTransformItem(item.uid, 1946)
doRemoveItem(getTileItemById(stone, 1355).uid)
doCreateTeleport(1387, tpDest, tpCreate)
doSendMagicEffect(tpCreate, CONST_ME_TELEPORT)
doCreatureSay(cid, 'The stone is removed, get the reward before the time runs out!', TALKTYPE_ORANGE_1)
addEvent(f, 60000, fromPosition)
else
doPlayerSendCancel(cid, 'Sorry, not possible.')
end
return true
end