local config = {
['roc'] = {amount = 1000, storage = 29691, startstorage = 93046, startvalue = 1},
['eradicator'] = {amount = 750, storage = 29692, startstorage = 93046, startvalue = 3},
['hellflayer'] = {amount = 2, storage = 29693, startstorage = 93046, startvalue = 5},
['mad mage'] = {amount = 2, storage = 29695, startstorage = 93046, startvalue = 5},
['glooth slasher'] = {amount = 2, storage = 29696, startstorage = 93046, startvalue = 5},
['deathstrike'] = {amount = 2, storage = 29694, startstorage = 93046, startvalue = 5},
['crystal wolf'] = {amount = 500, storage = 29697, startstorage = 94046, startvalue = 2},
['thornfire wolf'] = {amount = 500, storage = 29698, startstorage = 94046, startvalue = 2},
['midnight panther'] = {amount = 500, storage = 29700, startstorage = 94046, startvalue = 2},
['starving wolf'] = {amount = 500, storage = 29699, startstorage = 94046, startvalue = 2},
['verminor'] = {amount = 2, storage = 29701, startstorage = 94046, startvalue = 3},
['rupture'] = {amount = 1500, storage = 29702, startstorage = 94046, startvalue = 3},
['despair'] = {amount = 1000, storage = 29703, startstorage = 94046, startvalue = 3},
['humongous covid-19'] = {amount = 2, storage = 29705, startstorage = 94046, startvalue = 5},
['fatal'] = {amount = 2, storage = 29704, startstorage = 94046, startvalue = 5},
}
function onKill(player, target)
local monster = config[target:getName():lower()]
if target:isPlayer() or not monster or target:getMaster() then
return true
end
local stor = player:getStorageValue(monster.storage)+1
if player:getIsSVip() then
if stor < monster.amount and player:getStorageValue(monster.startstorage) >= monster.startvalue then
player:setStorageValue(monster.storage, stor)
if monster.startstorage == 93046 then
player:sendChannelMessage(nil, '[Zilor]: '..(stor +1)..' of '..monster.amount..' '..target:getName()..'s killed.', TALKTYPE_CHANNEL_R1, 11)
else
player:sendChannelMessage(nil, '[Kaur]: '..(stor +1)..' of '..monster.amount..' '..target:getName()..'s killed.', TALKTYPE_CHANNEL_R1, 11)
end
end
if (stor +1) == monster.amount then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Congratulations, you have killed '..(stor +1)..' '..target:getName()..'s and completed the '..target:getName()..'s mission.')
player:setStorageValue(monster.storage, stor +1)
end
end
stor = player:getStorageValue(monster.storage)+1
if stor < monster.amount and player:getStorageValue(monster.startstorage) >= monster.startvalue then
player:setStorageValue(monster.storage, stor)
if monster.startstorage == 93046 then
player:sendChannelMessage(nil, '[Zilor]: '..(stor +1)..' of '..monster.amount..' '..target:getName()..'s killed.', TALKTYPE_CHANNEL_R1, 11)
else
player:sendChannelMessage(nil, '[Kaur]: '..(stor +1)..' of '..monster.amount..' '..target:getName()..'s killed.', TALKTYPE_CHANNEL_R1, 11)
end
end
if (stor +1) == monster.amount then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Congratulations, you have killed '..(stor +1)..' '..target:getName()..'s and completed the '..target:getName()..'s mission.')
player:setStorageValue(monster.storage, stor +1)
end
return true
end