local items = {
[1] = {itemId = 2365, actionID = 9000},
[2] = {itemId = 2651, actionID = 9001}
}
local chance = 90
function onDeath(player, corpse, killer, mostDamage, unjustified, mostDamage_unjustified)
local container = Container(corpse.uid)
local rand = math.random(1, 100)
if container and rand <= chance then
local item = items[math.random(#items)]
container:addItem(item.itemId, 1):setActionId(item.actionID)
return true
end
return true
end