local item = 2160 --Item id of a reward
local count = 10 --How many?
local stroage = 1158
function onUse(cid, item, frompos, item2, topos)
if item.uid == 1158 then
queststatus = getPlayerStorageValue(cid,stroage)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"You have found a purple tome.")
doPlayerAddItem(cid,item,count)
setPlayerStorageValue(cid,stroage,1)
else
doPlayerSendTextMessage(cid,22,"It is empty.")
end
end
return TRUE
end