Action abaixo, escolha o item que quiser para o script.
Tempo (é em segundos): 7200 = 2 Horas
Como converter: https://www.google.com.br/#q=2+horas+em+segundos
function onUse(cid, item, fromPosition, itemEx, toPosition) local player = Player(cid) if player:getStorageValue(1234) >= os.time() then player:say('You already have double exp!', TALKTYPE_MONSTER_SAY) return true end player:setStorageValue(1234, os.time() + 7200) Item(item.uid):remove(1) player:say('Your 2 hours of double XP has started!', TALKTYPE_MONSTER_SAY) player:registerEvent("dblxp") return trueend
Em creaturescripts.xml
<event type="think" name="dblxp" script="dblxp.lua" />
Em creaturescripts/scripts crie dblxp.lua
function onThink(creature, interval) local player = Player(creature) if not player then return true end if player:getStorageValue(1234) < os.time() then player:sendTextMessage(MESSAGE_STATUS_WARNING, "Your double XP has ended!") player:unregisterEvent("dblxp") end return trueend
Créditos: RazorBlade