local config = {
['rat'] = {amount = 50, storage = 6701, startstorage = 6700, startvalue = 1, name = "Rat"},
['behemoth'] = {amount = 500, storage = 6601, startstorage = 6602, startvalue = 1, name = "Behemoth"},
['demon'] = {amount = 500, storage = 6603, startstorage = 6604, startvalue = 1, name = "Demon"},
['deer'] = {amount = 100, storage = 6607, startstorage = 6608, startvalue = 1, name = "Deer"},
['dragon lord'] = {amount = 500, storage = 6611, startstorage = 6612, startvalue = 1, name = "Dragon Lord"},
['cyclops'] = {amount = 1000, storage = 6609, startstorage = 6610, startvalue = 1, name = "Cyclop"},
['cyclops drone'] = {amount = 1000, storage = 6609, startstorage = 6610, startvalue = 1, name = "Cyclop"},
['cyclops smith'] = {amount = 1000, storage = 6609, startstorage = 6610, startvalue = 1, name = "Cyclop"},
['minotaur'] = {amount = 1000, storage = 6605, startstorage = 6606, startvalue = 1, name = "Minotaur"},
['minotaur guard'] = {amount = 1000, storage = 6605, startstorage = 6606, startvalue = 1, name = "Minotaur"},
['minotaur mage'] = {amount = 1000, storage = 6605, startstorage = 6606, startvalue = 1, name = "Minotaur"},
['minotaur archer'] = {amount = 1000, storage = 6605, startstorage = 6606, startvalue = 1, name = "Minotaur"}
}
function onKill(cid, target)
if getCreatureName(target):lower() == "demodras" then
setPlayerStorageValue(cid,7200,1)
setPlayerStorageValue(cid,7201,1)
end
if getCreatureName(target):lower() == "the pit lord" then
setPlayerStorageValue(cid,7200,1)
setPlayerStorageValue(cid,7202,1)
end
if getCreatureName(target):lower() == "big foot" then
setPlayerStorageValue(cid,7200,1)
setPlayerStorageValue(cid,7203,1)
end
if getCreatureName(target):lower() == "undead tortoise" then
setPlayerStorageValue(cid,7200,1)
setPlayerStorageValue(cid,7204,1)
end
local monster = config[getCreatureName(target):lower()]
if isPlayer(target) == TRUE or not monster or isSummon(target) == TRUE then
return true
end
if getPlayerStorageValue(cid, monster.storage) >= -1 and getPlayerStorageValue(cid, monster.storage) < monster.amount and getPlayerStorageValue(cid, monster.startstorage) >= monster.startvalue then
setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'Task message: '..getPlayerStorageValue(cid, monster.storage)..' of '..monster.amount..' '..monster.name..'s killed.')
end
if getPlayerStorageValue(cid, monster.storage) == monster.amount then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations, you have killed '..getPlayerStorageValue(cid, monster.storage)..' '..getCreatureName(target)..'s and completed the '..monster.name..'s mission.')
setPlayerStorageValue(cid, monster.storage, getPlayerStorageValue(cid, monster.storage) + 1)
end
return true
end