function onUse(cid, item, fromPosition, itemEx, toPosition)
local chest = {
storage = 43418,
level = 100
}
if getPlayerStorageValue(cid, chest.storage) == -1 then
if getPlayerLevel(cid) >= chest.level then
doPlayerAddItem(cid, 2136, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have claimed your prize!")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS)
setPlayerStorageValue(cid, chest.storage, 1)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Only the worthy may open this chest.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
end
return true
end