local KILL_STORAGE = {
{level = 100, storage = 1234},
{level = 200, storage = 5678},
}
function onKill(player, target, lastHit)
if target:isPlayer() then
for i = #KILL_STORAGE, 1, -1 do
local temp = KILL_STORAGE[i]
if target:getLevel() >= temp.level then
if player:getStorageValue(temp.storage) == -1 then
player:setStorageValue(temp.storage, 1)
else
player:setStorageValue(temp.storage, player:getStorageValue(temp.storage) + 1)
end
break
end
end
end
return true
end