So this is my script but i want it do spawn a boss then when the boss dies it waits a few seconds then spawns another. atm it spawns a monster every 30 seconds or so.
Can anyone help me plz.
local boss = 0
local room = {fromx = 31905, tox = 31940, fromy = 32376, toy = 32413, z = 10}
local spawnLoc = {x = 31924, y = 32390, z = 10}
local monsters = {"morgaroth", "ghazbaran"}
function onThink(cid, interval, lastExecution)
local choice = monsters[math.random( 1, #monsters)]
for x = room.fromx, room.tox do
for y = room.fromy, room.toy do
for z = room.z, room.z do
creature = {x = x, y = y, z = z}
mob = getTopCreature(creature).uid
if isMonster(mob) and not(isPlayer(getCreatureMaster(mob))) then
boss = 1
end
end
end
end
if boss == 1 then
return true
else
doSummonCreature(choice, spawnLoc)
end
return true
end
Can anyone help me plz.
local boss = 0
local room = {fromx = 31905, tox = 31940, fromy = 32376, toy = 32413, z = 10}
local spawnLoc = {x = 31924, y = 32390, z = 10}
local monsters = {"morgaroth", "ghazbaran"}
function onThink(cid, interval, lastExecution)
local choice = monsters[math.random( 1, #monsters)]
for x = room.fromx, room.tox do
for y = room.fromy, room.toy do
for z = room.z, room.z do
creature = {x = x, y = y, z = z}
mob = getTopCreature(creature).uid
if isMonster(mob) and not(isPlayer(getCreatureMaster(mob))) then
boss = 1
end
end
end
end
if boss == 1 then
return true
else
doSummonCreature(choice, spawnLoc)
end
return true
end