blessedplayer.lua
(data\creaturescripts\scripts
function onDeath(cid) for b = 1, 5 do if isPlayer(cid) and getPlayerBlessing(cid, b) and getCreatureSkullType(cid) < 4 then doCreatureSetDropLoot(cid, false) end end return true end
creaturescripts.xml
<event type="death" name="BlessedPlayer" event="script" value="blessedplayer.lua"/
Em login.lua
registerCreatureEvent(cid, "BlessedPlayer")






info
Grupo: Visconde
Registrado: 27/01/13
Posts: 443
Reputação: +83
Gênero: Masculino
Olá, gostaria de pedir um script que fizesse com quê o player com bless não perdesse loot de jeito nenhum! Eu já usei creaturescripts e tudo e continua caindo o loot dos players! Alguém ajuda?
São essas maneiras de adquirir bless no meu servidor, caso precisem:
TALKACTIONS:
function onSay(cid, words, param)
local bless = {1, 2, 3, 4, 5}
for i = 1, #bless do
if getPlayerBlessing(cid, i) then
doPlayerSendCancel(cid, "Você já tem todas as blessings.")
else
if doPlayerRemoveMoney(cid, 10000) then
doPlayerAddBlessing(cid, i)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, "Você agora está protegido por todas as blessings.")
else
doPlayerSendCancel(cid, "Você precisa de 50k para bless.")
end
end
end
return true
end
ACTION;BOOK DE BLESS:
local cfg = {
bless = { 1, 2, 3, 4, 5 },
level = 8
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1, table.maxn(cfg.bless) do
if(getPlayerBlessing(cid, cfg.bless)) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doCreatureSay(cid, "Você já tem todas as blessings.", TALKTYPE_ORANGE_1)
return true
end
end
if getPlayerLevel(cid) >= cfg.level then
for i = 1, table.maxn(cfg.bless) do
doPlayerAddBlessing(cid, cfg.bless)
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você agora está protegido com todas as blessings.")
end
return true
end