Ir para conteúdo

Posts Recomendados

Tipo do script: Slayer Yourots v11

Protocolo (versão do Tibia): 8.40

Servidor utilizado: The Forgotten Server

Nível de experiência:

Adicionais/Informações: quero um script que n perda nada nen a bp .

Link para o comentário
https://xtibia.com/forum/topic/183291-nao-perder-os-itens-nen-a-bp/
Compartilhar em outros sites

vai em data/creaturescripts crie um arquivo lua e coloque

 

function onDeath(cid, corpse, killer)
if isPlayer(cid) == TRUE then
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILL, 0)
doPdoPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
doCreatureSetDropLoot(cid,FALSE)
return TRUE
end
end

 

na msm pasta em login coloque

 

registerCreatureEvent(cid,"Loss")

 

 

em creaturescripts.xml cloque

 

<event type="death" name="Loss" script="nome do arquivo.lua"/>

Link para o comentário
https://xtibia.com/forum/topic/183291-nao-perder-os-itens-nen-a-bp/#findComment-1225922
Compartilhar em outros sites

Warning: [Event::loadScript] Event onLogin not found. data/creaturescripts/scripts/login.lua

 

oq tem no meu login.lua

 

 

function onLogin(cid)

local loss = getConfigValue('deathLostPercent')

if(loss ~= nil) then

for i = PLAYERLOSS_EXPERIENCE, PLAYERLOSS_ITEMS do

doPlayerSetLossPercent(cid, i, getConfigValue('deathLostPercent'))

end

end

 

registerCreatureEvent(cid, "GuildMotd")

registerCreatureEvent(cid, "PlayerDeath")

return TRUE

end

aecuando vo loga um personagen o ot cai

Editado por Felipefox34
Link para o comentário
https://xtibia.com/forum/topic/183291-nao-perder-os-itens-nen-a-bp/#findComment-1225937
Compartilhar em outros sites

tesnta assim!

 

 

function onLogin(cid)
if isPlayer(cid) == TRUE then
doPlayerSetLossPercent(cid, PLAYERLOSS_SKILL, 0)
doPdoPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
doCreatureSetDropLoot(cid,FALSE)
return TRUE
end

registerCreatureEvent(cid, "GuildMotd")
registerCreatureEvent(cid, "PlayerDeath")
registerCreatureEvent(cid,"Loss")
return TRUE
end

Link para o comentário
https://xtibia.com/forum/topic/183291-nao-perder-os-itens-nen-a-bp/#findComment-1225950
Compartilhar em outros sites

×
×
  • Criar Novo...