AD
action

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

Por Administrador, 15 de ago. de 2016 em Actions e Talkactions

1.0
double exp
exp
xp
semanas
horas
dias
meses
2
2.1k
AdministradorA
15 de agosto de 2016 às 17:15

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

2 semanas depois...
julhinhuuJ
24 de agosto de 2016 às 02:36

Muito bom, com certeza ajudará muita gente... Existem poucos sistemas script para TFS 1x.