<item id="115" article="a" name="Skull Amulet">
<attribute key="weight" value="660"/>
<attribute key="slotType" value="necklace"/>
<attribute key="preventDrop" value="1"/>
</item>
registerCreatureEvent(cid, "skull amulet")
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if (getCreatureSkullType(cid) >= 4) then
if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2131) then
doCreatureSetDropLoot(cid, false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doCreatureSay(cid, "Skull Amulet!", TALKTYPE_ORANGE_1)
doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
end
return true
end
<event type="preparedeath" name="skull amulet" event="script" value="skull amulet.lua"/>
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if(isPlayer(cid) and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 115) then
for i = 1, 5 do
doCreatureSetDropLoot(cid, false)
doPlayerAddBlessing(cid, i)
doCreatureSetDropLoot(cid, false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doCreatureSay(cid, "Forever Aol I WILL NOT DIE!!!", TALKTYPE_ORANGE_1)
end
return true
end
end
local corpse_ids = {
[0] = 3065,
[1] = 3058
}