function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.uid == 1003 then
queststatus = getPlayerStorageValue(cid,1003)
if queststatus == -1 then
local item = doCreateItemEx(1994, 1)
doAddContainerItem(item, 2187, 1)
doAddContainerItem(item, 2662, 1)
local bmw = doAddContainerItem(item, 2091, 1)
doSetItemActionId(bmw, 2091)
if item then
local ret = doPlayerAddItemEx(cid, item, false)
if ret == RETURNVALUE_NOERROR then
setPlayerStorageValue(cid,1003,1)
doPlayerSendTextMessage(cid,22,"Você encontrou uma sacola.")
elseif ret == RETURNVALUE_NOTENOUGHCAPACITY then
doPlayerSendTextMessage(cid,22,"Você encontrou uma recompensa pesando " .. getItemWeight(item) / 100 .. " oz. É muito pesado.")
elseif ret == RETURNVALUE_NOTENOUGHROOM or ret == RETURNVALUE_CONTAINERNOTENOUGHROOM then
doPlayerSendTextMessage(cid,22,"Você não tem espaço suficiente.")
else
doPlayerSendDefaultCancel(cid, ret)
end
end
else
doPlayerSendTextMessage(cid,22,"O baú está vazio.")
end
end
return true
end