local corpse_ids = {
[0] = 3065,
[1] = 3058
}
function onPrepareDeath(cid, deathList)
if getCreatureSkullType(cid) < 6 then
if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 11387 then
doCreatureSetDropLoot(cid, false)
doPlayerSetLossPercent(cid, experience, 5)
doItemSetAttribute(doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by " .. (isMonster(deathList[1]) and "a " .. string.lower(getCreatureName(deathList[1])) or isCreature(deathList[1]) and getCreatureName(deathList[1]) or "a field item") .. "")
end
end
return true
end
<item id="11387" name="lucky clover amulet">
<attribute key="description" value="It is rumoured to bring you good luck! Luck full blees." />
<attribute key="weight" value="150" />
<attribute key="charges" value="5" />
<attribute key="showattributes" value="1" />
<attribute key="slotType" value="necklace" />
<attribute key="preventDrop" value="1" />
quero que ele tenha 5 cargas ,porque quando o player morre 5 vezes não ta sumindo ele . item usado em creaturescripts.
info
Grupo: Campones
Registrado: 23/08/18
Posts: 48
Reputação: 0
local corpse_ids = { [0] = 3065, [1] = 3058 } function onPrepareDeath(cid, deathList) if getCreatureSkullType(cid) < 6 then if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 11387 then doCreatureSetDropLoot(cid, false) doPlayerSetLossPercent(cid, experience, 5) doItemSetAttribute(doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by " .. (isMonster(deathList[1]) and "a " .. string.lower(getCreatureName(deathList[1])) or isCreature(deathList[1]) and getCreatureName(deathList[1]) or "a field item") .. "") end end return true end<item id="11387" name="lucky clover amulet">
<attribute key="description" value="It is rumoured to bring you good luck! Luck full blees." />
<attribute key="weight" value="150" />
<attribute key="charges" value="5" />
<attribute key="showattributes" value="1" />
<attribute key="slotType" value="necklace" />
<attribute key="preventDrop" value="1" />
quero que ele tenha 5 cargas ,porque quando o player morre 5 vezes não ta sumindo ele . item usado em creaturescripts.