data/actions/scripts/doublexp.lua
function onUse(cid, item, fromPosition, itemEx, toPosition)
local minutos = 5 -- duração em minutos
if getConfigInfo('experienceStages') == true then
xp = getExperienceStage(getPlayerLevel(cid))
else
xp = getConfigInfo('rateExperience')
end
doPlayerSetExperienceRate(cid, xp*2) -- doble xp
doRemoveItem(item.uid, 1)
doSendAnimatedText(getPlayerPosition(cid), "Double Xp", math.random(1,256))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Double Experience por "..minutos.." minutos.")
doSendMagicEffect(getPlayerPosition(cid),49)
addEvent(doPlayerSetExperienceRate, minutos * 60 * 1000, cid, xp)
addEvent(doPlayerSendTextMessage, minutos * 60 * 1000, cid, MESSAGE_STATUS_CONSOLE_BLUE, "Experience normal.")
return true
end
data/actions/actions.xml
<action itemid="10570" script="doublexp.lua"/>
data/creatureevents/scripts/exp normal.lua
function onLogin(cid)
if getConfigInfo('experienceStages') == true then
xp = getExperienceStage(getPlayerLevel(cid))
else
xp = getConfigInfo('rateExperience')
end
doPlayerSetExperienceRate(cid, xp)
return TRUE
end
data/creatureevents/creatureevents.xml
<event type="login" name="PlayerXp" event="script" value="Outros/xp normal.lua"/>
Qualquer erro informe.
Att,
Paulo
@edit
Puts eu vi agora "Tibia 7.92"
não ira funcionar ;\
É por isso que eu gosto de ajudar (pelo menos tentar ajudar) este fórum, os caras sabe Agradecer né?
Att,
ஓ PẫulǾ ஓ
paulo.boc@hotmail.com