Ir para conteúdo

[Encerrado] Systema De Invazao


BrunooMaciell

Posts Recomendados

Estou com um bug chato no meu systema de invazao !!

 

BUG

 

[17/08/2013 16:30:59] [Error - GlobalEvent Interface]
[17/08/2013 16:30:59] In a timer event called from:
[17/08/2013 16:30:59] data/globalevents/scripts/inv.lua:onThink
[17/08/2013 16:30:59] Description:
[17/08/2013 16:30:59] data/globalevents/scripts/inv.lua:110: attempt to index global 'tb' (a nil value)
[17/08/2013 16:31:00] stack traceback:
[17/08/2013 16:31:00] data/globalevents/scripts/inv.lua:110: in function

 

 

SCRIPT

 

local days = {
["Sunday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Saturday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Monday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Tuesday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Wednesday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Thursday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Friday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
}
}
function onThink(interval, lastExecution)
function getDayName()
local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
return days[os.date("*t")["wday"]]
end
hours = tostring(os.date("%X")):sub(1, 5)
tb = days[getDayName()][hours]
if tb then
function removeCreature()
for x = ((tb.pos.x)-10), ((tb.pos.x)+10) do
for y = ((tb.pos.y)-10), ((tb.pos.y)+10) do
local m = getTopCreature({x=x, y=y, z= tb.pos.z}).uid
if m ~= 0 and isMonster(m) then
doRemoveCreature(m)
end
end
end
return true
end
addEvent(removeCreature, tb.Time*10*60000)
doBroadcastMessage("Cuidado !! Esta Ocorrendo Uma Invazao No Castelo Abandonado.")
for _,x in pairs(tb.monster) do
for s = 1, tonumber(x:match("%d+")) do
doSummonCreature(x:match("%s(.+)"), tb.pos)
end
end

end
return true
end

 

 

Curti+

Link para o comentário
Compartilhar em outros sites

ta ae...

 

 

local days = {
["Sunday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Saturday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Monday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Tuesday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Wednesday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Thursday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
},
["Friday"] = {
["00:00"] = {nome = "Mew", pos = {x=746, y=1306, z=4}, monster = {"1 Mew"}, Time = 15},
["02:00"] = {nome = "Moltres", pos = {x=740, y=1286, z=4}, monster = {"1 Moltres"}, Time = 15},
["04:00"] = {nome = "Articuno", pos = {x=710, y=1296, z=4},monster = {"1 Articuno"}, Time = 15},
["08:00"] = {nome = "Zapdos", pos = {x=712, y=1313, z=4},monster = {"1 Zapdos"}, Time = 15},
["10:00"] = {nome = "Mew", pos = {x=718, y=1324, z=4}, monster = {"1 Mew"}, Time = 15},
["12:00"] = {nome = "Moltres", pos = {x=741, y=1320, z=4}, monster = {"1 Moltres"}, Time = 15},
["14:00"] = {nome = "Articuno", pos = {x=745, y=1307, z=4},monster = {"1 Articuno"}, Time = 15},
["16:00"] = {nome = "Zapdos", pos = {x=729, y=1284, z=4},monster = {"1 Zapdos"}, Time = 15},
["18:00"] = {nome = "Mew", pos = {x=728, y=1317, z=4}, monster = {"1 Mew"}, Time = 15},
["20:00"] = {nome = "Moltres", pos = {x=743, y=1289, z=4}, monster = {"1 Moltres"}, Time = 15},
["22:00"] = {nome = "Articuno", pos = {x=710, y=1297, z=4},monster = {"1 Articuno"}, Time = 15},
["23:59"] = {nome = "Zapdos", pos = {x=718, y=1322, z=4},monster = {"1 Zapdos"}, Time = 15},
}
}

local function getDayName(days)
   local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
return days[os.date("*t")["wday"]]
end

local function removeCreature(tb)
   for x = ((tb.pos.x)-10), ((tb.pos.x)+10) do
      for y = ((tb.pos.y)-10), ((tb.pos.y)+10) do
        local m = getTopCreature({x=x, y=y, z= tb.pos.z}).uid
        if m ~= 0 and isMonster(m) then
           doRemoveCreature(m)
        end
      end
   end
return true
end


function onThink(interval, lastExecution)
   local hours = tostring(os.date("%X")):sub(1, 5)
   local tb = days[getDayName(days)][hours]
   if tb then
      addEvent(removeCreature, tb.Time*10*60000, tb)
      doBroadcastMessage("Cuidado !! Esta Ocorrendo Uma Invazao No Castelo Abandonado.")
      for _,x in pairs(tb.monster) do
         for s = 1, tonumber(x:match("%d+")) do
            doSummonCreature(x:match("%s(.+)"), tb.pos)
         end
      end
   end
return true
end

Link para o comentário
Compartilhar em outros sites

  • 4 years later...
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...