function onUse(cid, item, frompos, item2, topos)
if item.uid == 10222 then
if getPlayerStorageValue(cid,10544) == -1 then
doPlayerSendTextMessage(cid,25,"You have chosen an arcane staff.")
doPlayerAddItem(cid,2453,1)
setPlayerStorageValue(cid,10544,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end
elseif item.uid == 10223 then
if getPlayerStorageValue(cid,10544) == -1 then
doPlayerSendTextMessage(cid,25,"You have chosen the avenger.")
doPlayerAddItem(cid,6528,1)
setPlayerStorageValue(cid,10544,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end
elseif item.uid == 10224 then
if getPlayerStorageValue(cid,10544) == -1 then
doPlayerSendTextMessage(cid,25,"You have chosen an arbalest.")
doPlayerAddItem(cid,5803,1)
setPlayerStorageValue(cid,10544,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end
elseif item.uid == 10225 then
if getPlayerStorageValue(cid,10547) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a pair of soft boots.")
doPlayerAddItem(cid,6132,1)
setPlayerStorageValue(cid,10547,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end
elseif item.uid == 10227 then
if getPlayerStorageValue(cid,10550) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a frozen starlight.")
doPlayerAddItem(cid,2361,1)
setPlayerStorageValue(cid,10550,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end
elseif item.uid == 10228 then
if getPlayerStorageValue(cid,10550) == -1 then
doPlayerSendTextMessage(cid,25,"You have found a backpack of holding.")
doPlayerAddItem(cid,2365,1)
setPlayerStorageValue(cid,10550,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end
elseif item.uid == 10226 then
if getPlayerStorageValue(cid,10550) == -1 then
doPlayerSendTextMessage(cid,25,"You have found 25 crystal coins.")
doPlayerAddItem(cid,2160,25)
setPlayerStorageValue(cid,10550,1)
else
doPlayerSendTextMessage(cid,25,"It is empty.")
end
return TRUE
end