local monsters = {
--name = storage
["rotworm"] = 55667,
["carrion worm"] = 55667
}
local taskmonsterstrv = 55667 -- Monster Storagevalue
local taskmonsters = "rotworms" --- Monsters name (many)
local Npc = "Alex the rotworm slayer" --- The npc name, to return to
local queststrv = 808605 --- Quest storagevalue
local kill = 30 --- How many you need to kill
local killi = "30" --- Becouse the npc can't say 50, it needs to say "50".
function onKill(cid, target)
local monster = monsters[getCreatureName(target):lower()]
if(isPlayer(target) == FALSE and monster and getPlayerStorageValue(cid, queststrv) == 2) then
if getPlayerStorageValue(cid, monster) < kill then
local killedMonsters = getPlayerStorageValue(cid, monster)
if(killedMonsters == -1) then
killedMonsters = 1
end
setPlayerStorageValue(cid, monster, killedMonsters + 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed ".. getPlayerStorageValue(cid, taskmonsterstrv) .." of ".. killi .." ".. taskmonsters ..". [".. getPlayerStorageValue(cid, taskmonsterstrv) .."/".. killi .."]")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have killed enough ".. taskmonsters ..". Return back to ".. Npc .." for more info.")
setPlayerStorageValue(cid, queststrv, 3)
end
end
return TRUE
end