Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Ola pessoa do Tk , hj vim aqui pedir uma ajuda e que meu otserv quando o player ta morrendo ele perde o loot como faço pra isso não acontecer ?e ot war

Link para o post
Compartilhar em outros sites

é como se fosse uma bless:

 

Em data / talkactions / scripts / e renome algum arquivo.lua para loot e adicione
 

function onSay(cid, words, param)
local price = 1000 -- dinheiro que vai custa
if getPlayerStorageValue(cid,1254) > 0 or not doPlayerRemoveMoney(cid, price) then

doPlayerSendTextMessage(cid, 28, "Você, não tem dinheiro suficiente e/ou já tem Anti Drop.")
return true
end
doPlayerSendTextMessage(cid, 27, "Parabéns você comprou Anti Drop, por " .. price .. " gp's")
setPlayerStorageValue(cid, 1254, 1)
return true
end

talkactions.xml
 

<talkaction words="!loot" event="script" value="loot.lua"/>

data/creaturescripts/scripts renome algum arquivo pra antidrop e adicione
 

function onDeath(cid, deathList)
if getPlayerStorageValue(cid, 1254) > 0 then
setPlayerStorageValue(cid, 1254, 0)
doCreatureSetDropLoot(cid, false)

end
return true
end

em creaturescripts.xml
 

<event type="death" name="noDrop" script="antiDrop.lua"/>

em login.lua
 

registerCreatureEvent(cid, "noDrop")

Créditos
Skyligh
Skyforever

 

eu também tenho um script do Vilden, tava salvo aqui nunca usei

function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
local config = {
onlypremium = true, -- se precisa ser premium para não perder nada
levelandskills = false, -- se ao morrer o jogador irá perder level e skill
loot = false, -- se ao morrer o jogador irá perder o loot
level = 50 -- até que level irá proteger o player
pos = getTownTemplePosition(cid)

}
if isPlayer(cid) and getPlayerLevel(cid) <= config.level then
doTeleportThing(cid, config.pos, TRUE)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
doCreatureAddMana(cid, getCreatureMaxMana(cid))
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
return TRUE end return TRUE end

creaturescript.xml

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


creaturescript/script/login.lua adicione:

registerCreatureEvent(cid, "ProtectLevel")
Link para o post
Compartilhar em outros sites

em vocation.xml lessloss= coloque 0

 Whatsapp: +55 (48) 98815-0709 Discord: Qwizer#5713

 

Global 100% 7.40 com Website

TFS 1.2 10.97-11.00 + GlobalFull OtherWorld ...

 

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo