function onUse(cid, item, frompos, item2, topos)
if item.actionid == XXXX and getPlayerStorageValue(cid,3523) == -1 then
local key = doPlayerAddItem(cid,2088,1)
doItemSetAttribute(key, "aid", XXXX)
doPlayerSendTextMessage(cid,25,"You have found key.")
setPlayerStorageValue(cid,3523,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
return true
end