Em data/creaturescripts/creaturescripts.xml adicione a seguinte tag:
<event type="death" name="LevelProtect" event="script" value="levelprotect.lua" />
Agora em data/creaturescripts/scripts crie o arquivo levelprotect.lua com o seguinte conteúdo:
local level = 50 -- até que level o script irá proteger o player
function onDeath(cid, lastHitKiller, mostDamageKiller)
if isPlayer(cid) and isPlayer(mostDamageKiller) and getCreatureSkullType(cid) == SKULL_NONE then
if getPlayerLevel(cid) <= level the
doPlayerSetLossPercent(cid, 0, 0)
doCreatureSetDropLoot(cid, false)
return true
end
end
return true
end
Ainda em scripts, abra o arquivo login.lua e registre o evento:
registerCreatureEvent(cid, "LevelProtect")






info
Grupo: Campones
Registrado: 05/11/12
Posts: 62
Reputação: +5
Char no Tibia: Scarlet Erza
Boa noite, to atrás desse script faz um bom tempo e não consigo achar, to querendo um script de lvl protection igual ao do underwar, ( player até lvl X não perder item se morrer pra pk, se morrer pra monstro ele dropa loot, se ele tiver no lvl da protection e pega pk dropa loot ao morrer, caso não esteja de aol)
Pvp livre...
@up