Postado Julho 18, 2020 4 anos Olá. Eu estou finalizando meu servidor de PVP Enforced 8.60 (TFS 0.5 exclusive edition), onde os players nunca devem perder os items. Funciona no PVP, porém, os players red skull estão perdendo items quando morrem para monstros (no caso, o BOSS do servidor). Eu resolvi o isso colocando PVP tile na sala do boss, mas queria retirar essa tile e manter o NO DROP para red skull. Eu utilizo o seguinte script nodrop.lua em creaturescripts: Citar local array = { PLAYERLOSS_CONTAINERS, PLAYERLOSS_ITEMS } function onPrepareDeath(cid, deathList) for i = 1, #array do doPlayerSetLossPercent(cid, array, 0)endreturn trueend Alguém pode me ajudar? REP para quem tentar. Obrigado ? EDIT: Resolvi com o seguinte script: Citar function onDeath(cid, corpse, deathList) local config = { onlypremium = false, -- se precisa ser premium para não perder nada levelandskills = false, -- se ao morrer o jogador irá perder level e skill magic = false, -- se ao morrer o jogador irá perder level e skill loot = false, -- se ao morrer o jogador irá perder o loot level = 10000 -- 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.levelandskills == false then doPlayerSetLossSkill(cid, 0) end if config.magic == false then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) end return true end return true end em creaturescripts.xml: Citar <event type="death" name="nloot" event="script" value="nomedoseuarquivo.lua"/> em login.lua: Citar registerCreatureEvent(cid, "nloot") Editado Julho 20, 2020 4 anos por Mecianosz (veja o histórico de edições)
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.