function onKill(cid, target, lastHit)
local items = {{8300,10},{8305,5},{8306,5}} -- Item ID / Chance to loot
local exmonster = {"Rat","Bug"} -- Monsters that doesn't loot this item
local teste = 0
if isMonster(target) then
for i=1,#exmonster do
if getCreatureName(target) == exmonster[i] then
teste = 1
end
end
if teste == 0 then
for i=1,#items do
rand = math.random(1,100000)
if (items[i][2]) >= rand then
doPlayerAddItem(cid,items[i][1])
doPlayerSendTextMessage(cid, 25,"You found ".. getItemNameById(items[i][1])..".")
end
end
end
end
return true
end