Nosso Amigo Ali já deu a resposta mais caso queria vir itens randon
local t = {
storage = 35350, -- Soh mexa se necessario.
temp = 24, -- Tempo em horas.
count = 1, -- quantidade da reward que sera ganha
reward = {2160, 2152} -- Item que irá ganhar. -- por ser o ultimo item do array nao necessita virgula
}
function onUse(cid, item, fromPos, itemEx, toPos)
if getPlayerStorageValue(cid, t.storage) < os.time() then
local randomZ = t.reward[math.random(1,#t.reward)]
doPlayerSendTextMessage(cid, 25, "Você encontrou um "..getItemNameById(randomZ)..".")
doPlayerAddItem(cid, randomZ, t.count)
setPlayerStorageValue(cid, t.storage, os.time() + (t.temp * 60 * 60))
else
doPlayerSendTextMessage(cid, 25, "Você precisa esperar ".. math.ceil((getPlayerStorageValue(cid, t.storage) - os.time())/3600) .." hora(s) para usar novamente.")
end
return true
end