DA
action

[AJUDA] EVENTO DOUBLE EXP

Por DavyziinC, 15 de out. de 2015 em Scripts

bug
ajuda
double exp
tibia
8.6
ot
baiak
2
962
DavyziinCD
15 de outubro de 2015 às 21:03

Ola

Utilizo uma script pra double exp, porem, quando eu ativo, o servidor laga muito!

segue script

 

creaturescripts/scripts

function onKill(cid, target)
if isPlayer(cid) and isMonster(target) then
if getGlobalStorageValue(102590) - os.time() >= 1 then
local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
local count = ((getMonsterInfo(string.lower(getCreatureName(target))).experience*1.5*exp)/2)
doPlayerAddExperience(cid, count)
addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60))
end
else
return TRUE
end
return TRUE
end
talkactions/scripts
function onSay(cid, words, param, channel)
local config = {
storage = 102590,
}
if(param == 'cancel') then
if getGlobalStorageValue(config.storage) > 0 then
setGlobalStorageValue(config.storage, -1)
doBroadcastMessage("Double Exp cancelado")
end
return true
end
param = tonumber(param)
if(not param or param < 0) then
doPlayerSendCancel(cid, "Apenas maiores que 0.")
return true
end
if getGlobalStorageValue(config.storage) - os.time() <= 0 then
setGlobalStorageValue(config.storage, os.time()+param*60*60)
doBroadcastMessage("Exp bonus ativado 50% + EXP por "..param.." horas! Aproveite.")
end
return true
end

 

 

 

Alguem pode me dizer aonde modificar para tirar o lag?

SkyLighS
15 de outubro de 2015 às 21:15

Como que o script trava seu sv? tem certeza que é ele?