local zombieSpawns = {
[1]={x=1071, y=1098, z=7},
[2]={x=1072, y=1098, z=7},
[3]={x=1070, y=1107, z=7},
[4]={x=1073, y=1110, z=7},
[5]={x=1074, y=1104, z=7},
[6]={x=1073, y=1119, z=7},
[7]={x=1008, y=1005, z=7},
[8]={x=1080, y=1122, z=7},
[9]={x=1089, y=1116, z=7},
[10]={x=1091, y=1118, z=7},
[11]={x=1094, y=1102, z=7},
[12]={x=1096, y=1093, z=7},
[13]={x=1099, y=1096, z=7},
[14]={x=1099, y=1099, z=7},
[15]={x=1086, y=1093, z=7} --- BOSS SPAWN POS
}
local zombieBoss={
[1]='zombie boss one',
[2]='zombie boss two',
[3]='zombie boss three'
}
local zombieUnlockPoints = 10259 --- Zombie Game Unlock Points Player Storage
local zombieEventPoints = 10258 --- Zombie Event Item Points :D
local killStorage = 1001
local difficultyStorage = 1002
function onKill(cid, target, lastHit)
if lastHit and isMonster(target) then
local v = getCreatureName(target):lower()
if v:find('zombie') then
local zombiesKilled = math.max(1, getStorage(killStorage) + 1)
doSetStorage(killStorage, zombiesKilled)
doCreatureSay(cid, zombiesKilled)
doCreatureSetStorage(cid, zombieUnlockPoints, getCreatureStorage(cid,zombieUnlockPoints) + 1)
if zombiesKilled == 14 then
doCreateMonster(zombieBoss[1], zombieSpawns[15])
elseif v == zombieBoss[1] then
doCreatureSetStorage(cid,zombieEventPoints, math.max(0, getCreatureStorage(cid, zombieEventPoints)) + 1)
doSetStorage(difficultyStorage, math.max(1, getStorage(difficultyStorage) + 1))
doCreateMonster('Zombie', zombieSpawns[15])
elseif zombiesKilled == 28 then
doCreateMonster(zombieBoss[2], zombieSpawns[15])
elseif v == zombieBoss[2] then
doCreatureSetStorage(cid,zombieEventPoints, math.max(0, getCreatureStorage(cid, zombieEventPoints)) + 2)
doSetStorage(difficultyStorage, getStorage(difficultyStorage) + 1)
doCreateMonster('Zombie', zombieSpawns[15])
elseif zombiesKilled == 42 then
doCreateMonster(zombieBoss[3], zombieSpawns[15])
elseif v == zombieBoss[3] then
doCreatureSetStorage(cid,zombieEventPoints, math.max(0, getCreatureStorage(cid, zombieEventPoints)) + 3)
for x = 100, 200 do
for y = 100, 200 do
for z = 7, 7 do
local k = getTopCreature({x=x, y=y, z=z}).uid
if k ~= 0 and isPlayer(k) then
doRemoveCreature(k)
end
end
end
end
end
end
end
return true
end