Fiz aqui, testa ai
Em creaturescript/scripts crie um arquivo com o nome qualquer e coloque isto dentro:
-- Script by Yan Liima(Night)
function onDeath(cid, corpse, deathList)
if not isPlayer(cid) then
return true
end
local loot = false -- Se o jogador morrer ele irá perder o loot?
local xp = false -- Se o jogador morrer ele irá perder EXP?
local loss = getConfigValue('deathLostPercent')
local killer = deathList[1] -- Não mexa aqui
if isMonster(killer) then
doCreatureSetDropLoot(cid, loot)
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILLS, 0)
doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0)
if xp == false then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 1)
end
end
return TRUE
end
XML:
<event type="death" name="ProtegerPlayer" event="script" value="nome_do_arquivo.lua"/>
Login.lua:
registerCreatureEvent(cid, "ProtegerPlayer")
Cara o unico problema vai ser o PLAYERLOSS_EXPERIENCE, bem provavel que ele buga e faz o jogador voltar pro nv1. Muitos reclamam sobre isso. Se acontecer o mesmo, tente trocar para Blessing