function onUse(cid)
local t = {item = {5432, 1}, stor = {50040, 50041}} -- {item = {itemID, amount}, stor = {storage, globalstorage}}
if getGlobalStorageValue(t.stor[2]) - os.time() < 1 then
if getPlayerStorageValue(cid, t.stor[1]) < 1 then
setPlayerStorageValue(cid, t.stor[1], 1)
setGlobalStorageValue(t.stor[2], os.time() + (24 * 3600))
doPlayerAddItem(cid, t.item[1], t.item[2])
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You received '..t.item[2]..' '..t.item[1])
else
return doPlayerSendCancel(cid, 'You already have completed this quest.')
end
else
return doPlayerSendCancel(cid, 'Someone already has done this quest today, try tomorrow.')
end
return true
end
No caso, começará a valer o tempo de 24 horas, a partir do momento em que o player der use no item que contém o actionID/uniqueID estipulado na tag desse script.