Gostaria de adicionar um check, se já existir o monstro/npc de mesmo nome no mapa a invasão não ocorre:
Citar
local i = {
["17:00"] = {nome = "boss", pos = {x=2637, y=2504, z=10}, npc = {"1 boss"}},
}
function onTime()
hours = tostring(os.date("%X")):sub(1, 5)
tb = i[hours]
if tb then
doBroadcastMessage(hours .. " - " .. tb.nome .. " invasao!.")
for _,x in pairs(tb.npc) dofor s = 1, tonumber(x:match("%d+")) do
doSummonCreature(x:match("%s(.+)"), tb.pos)
end
end
end
return true
end