Ir para conteúdo

(tfs 1.0) Item de double exp (2 horas, configurável)


Administrador

Posts Recomendados

  • Administrador

data/actions/double.lua

function onUse(cid, item, fromPosition, itemEx, toPosition)local player = Player(cid)player:setStorageValue(80000, os.time() + 2 * 60 * 60)Item(item.uid):remove()player:say("You have just activated 2 hours of Double Experience!", TALKTYPE_MONSTER_SAY)return trueend

 

data/actions.xml

<action itemid="8981" script="double.lua"/>


data/events/player.lua

function Player:onGainExperience(source, exp, rawExp)    local thing = self:getStorageValue(80000)    if thing > os.time() then        return exp * 2.0    end    return expend

 

data/events.xml
Mude

<event class="Player" method="onGainExperience" enabled="0" />

Para

<event class="Player" method="onGainExperience" enabled="1" />

 

Créditos: imkingran

Link para o comentário
Compartilhar em outros sites

  • 2 weeks later...
×
×
  • Criar Novo...