How to get the killer?
Look the script:
Look the script:
Code:
function onDeath(cid, corpse, deathList)
local drop, nDrop = doCreatureSetDropLoot(cid, true), doCreatureSetDropLoot(cid, false)
local killer = ?????????
if getPlayerLevel(cid) <= 50 then
if isMonster(killer) == true then
nDrop
else
drop
end
else
local item_amuletOfLoss, slot = 2173, getPlayerSlotItem(cid, CONST_SLOT_NECKLACE)
if slot == item_amuletOfLoss.itemid then
doPlayerRemoveItem(cid, slot, 1)
nDrop
else
drop
end
end
return true
end