- YerenixAportador
- Mensajes : 98
Low Level Death Protection! Sistem
Dom Sep 25, 2011 12:16 am
Bueno Es uNa Modificacion del Player Death Que Cuando Es Lvl Bajo (tu decides hasta cuando) Muere Y Se Va Al Templo Sin perdida De Cosas Ni Exp O_O
replace data/creaturescripts/playerDeath.lua for:
and replace in data/creaturescripts/creaturescripts.xml
and in config.lua add:
Creditos:
OTLAND 99%
Yerenix 1%
replace data/creaturescripts/playerDeath.lua for:
- Código:
"SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
if(rows:getID() ~= -1) then
local amount = rows:getRows(true) - config.maxDeathRecords
if(amount > 0) then
if(config.sqlType == DATABASE_ENGINE_SQLITE) then
for i = 1, amount do
db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
end
else
db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")
end
end
end
return TRUE
end
end
end
and replace in data/creaturescripts/creaturescripts.xml
- Código:
<event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>
- Código:
<event type="preparedeath" name="PlayerDeath" event="script" value="playerdeath.lua"/>
and in config.lua add:
- Código:
deadProtection = 20 -- max lvl in protection
Creditos:
OTLAND 99%
Yerenix 1%
Permisos de este foro:
No puedes responder a temas en este foro.