Não Perder Skill e Magic Level

Bernalzz
em Scripts

Bernalzz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/01/13Posts: 3

Olá, eu tenho 1 ot de war que estou fazendo mas eu gostaria de que após os players morrerem perderem somente level, skill e magic level permanecessem. Obrigado.

Artigo

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/07/12Posts: 69Char no Tibia: ADM Aritgo

achei um do vodkart .

 

em data / creaturescripts / scripts .

 

function onDeath(cid, corpse, deathList)
local config = {
onlypremium = true, -- se precisa ser premium para não perder nada
exp = true, -- 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 = 700000 -- até que level irá proteger o player
}
if isPlayer(cid) and getPlayerLevel(cid) <= config.level 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

 

em creaturescripts.xml

 

<event type="death" name="ProtectLevel" event="script" value="levelprotection.lua"/>

 

creaturescripts / scripts / login.lua adicione

 

registerCreatureEvent(cid, "ProtectLevel")

 

agora divirta-se

<<Sings Feitas , By : Me>>

Anyur | Overpower | Tonynh | Anyur |

 

untitl31.png

Bernalzz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 26/01/13Posts: 3

Ok, vou testar jajá edito

 

@Edit

 

100% Funcional. Muito Obrigado !! +REP

Slicer

Insanity
avatar
Príncipe
Príncipe

INFOS

Grupo: PríncipeRegistrado: 19/08/10Posts: 4014Gênero: Masculino

sanado, movido

"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬

"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein