function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == DOOR UID and item.itemid == ID OF THE DOOR then
if getPlayerStorageValue(cid,XXX) == 1 then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, TRUE)
else
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'The door seems to be sealed against unwanted intruders.')
end
end
end