function onDeath(cid, corpse, deathList)
function getResets(cid)
local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid))
return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset")
end
local config = {
onlypremium = false, -- se precisa ser premium para não perder nada
exp = false, -- se ao morrer o jogador irá perder exp
skills = false, -- se ao morrer vai perder skills
magic = false, -- se vai perder magic level
loot = false, -- se ao morrer o jogador irá perder o loot
level = 100 -- até que level irá proteger o player
}
if isPlayer(cid) and getPlayerLevel(cid) <= config.level and getResets(cid) == 0 then
if config.onlypremium == true and not isPremium(cid) then return TRUE end
if config.loot == false then doCreatureSetDropLoot(cid, false) end
if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end
if config.skills == false then doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0) end
if config.exp == false then doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end
return TRUE end return TRUE end
KE
dúvida
Ajuda Com Esse Creaturescripts De Level Protection
By KennyConrad, 26 de ago. de 2012 in Scripts
script
3
777
info
Group: Herói
Joined: 20/05/10
Posts: 3.4k
Reputation: +1.5k
Gender: Masculino

26 de agosto de 2012 às 21:11
info
Group: Visconde
Joined: 21/08/11
Posts: 470
Reputation: +5
Tibia Character: ...

26 de agosto de 2012 às 23:07
vlw vodkart REP + ajudando como sempre xD ^^
duvida sanada topico reportado.


info
Group: Visconde
Joined: 21/08/11
Posts: 470
Reputation: +5
Tibia Character: ...
Galera achei esse script feito pelo vodkart gostei dele ai queria colocar pra funcionar assim Até o level 100 (sem reset) jogadores não perdem itens nen skills ao morrer.
meu sistema de resets não da storage pra quem não entendeu quero que esse script so protega players com 0 resets porque se não um jogador com 50 resets tiver level 90 morrer ele não vai perder skills nen lot e não quero isso. por isso quero que so proteja players com 0 resets. uso o advanced reset system 2.0 se presisar posto o script aki ok ?
Edited Agosto 26 by KennyxD