local roomPos =
{
x = 65,
y = 246,
z = 11
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 30330 then
if getPlayerStorageValue(cid, 20000) == TRUE then
doTeleportThing(cid, roomPos, TRUE)
doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
elseif getPlayerStorageValue(cid, 20000) == FALSE then
doPlayerSendCancel(cid, "Sorry, not possible.")
if getPlayerStorageValue(cid, 20001) == TRUE then
doTeleportThing(cid, roomPos, TRUE)
doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
elseif getPlayerStorageValue(cid, 20001) == FALSE then
doPlayerSendCancel(cid, "Sorry, not possible.")
if getPlayerStorageValue(cid, 20002) == TRUE then
doTeleportThing(cid, roomPos, TRUE)
doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
elseif getPlayerStorageValue(cid, 20002) == FALSE then
doPlayerSendCancel(cid, "Sorry, not possible.")
if getPlayerStorageValue(cid, 20003) == TRUE then
doTeleportThing(cid, roomPos, TRUE)
doSendMagicEffect(roomPos, CONST_ME_TELEPORT)
elseif getPlayerStorageValue(cid, 20003) == FALSE then
doPlayerSendCancel(cid, "Sorry, not possible.")
end
end
end
end
end
return TRUE
end