Postado Abril 26, 2014 11 anos 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
Postado Abril 26, 2014 11 anos é 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") Ot Design: https://discord.gg/VgtVRNmCD7
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.