Hello! When u launch zombie event its running perfectly until the event is about to start..
first its like "zombie event will start in 10 minutes", and then "zombie event will start in 5 minutes" and after that the start message comes up "zombie event has started".
But at the same time i get this error in console. :blink:
Globalevent.lua
globalevent.xml
Please help !!!!!
first its like "zombie event will start in 10 minutes", and then "zombie event will start in 5 minutes" and after that the start message comes up "zombie event has started".
But at the same time i get this error in console. :blink:
Globalevent.lua
Code:
local TilePos = {x=1005, y=1002, z=7, stackpos = 2}
local config = {
arena = {
frompos = {x = 1131, y = 913, z =7},
topos = {x = 1161, y = 930, z=7}
}
}
function onThink(interval)
doBroadcastMessage("Deadly Spider event will start after 15 minutes! The teleport to arena is located in temple.", MESSAGE_EVENT_ADVANCE)
addEvent(BC2, 15 * 60 * 1000)
return true
end
function onThink(interval, lastExecution)
doBroadcastMessage("Deadly Spider event will start after 10 minutes! The teleport to arena is located in temple.", MESSAGE_EVENT_ADVANCE)
addEvent(BC3, 10 * 60 * 1000)
return true
end
function BC3()
doBroadcastMessage("Deadly Spider event will start after 5 minutes! The teleport to arena is located in temple. You can\'t enter arena during the event, so hurry up and don\'t be late!", MESSAGE_EVENT_ADVANCE)
addEvent(Spawn, 5 * 60 * 1000)
addEvent(BC4, 5 * 60 * 1000)
return true
end
function BC4()
doItemSetAttribute(getThingFromPos(TilePos).uid, "aid", 7796)
doBroadcastMessage("The event started and Deadly Spiders are being summoned. Winner is the player who dies last. Good luck!", MESSAGE_EVENT_ADVANCE)
doSendMagicEffect({x=1005, y=1002, z=7}, 6)
return true
end
function Spawn()
if #getPlayersfromArea(config.arena.frompos, config.arena.topos) < 1 then
local monsters = getMonstersfromArea(config.arena.frompos, config.arena.topos)
doItemSetAttribute(getThingFromPos(TilePos).uid, "aid", 7795)
for _, monster in ipairs(monsters) do
doRemoveCreature(monster)
end
else
addEvent(Spawn, 20 * 1000)
doSummonCreature("Deadly Zombie", {x = 1145, y = 922, z=7})
doSendMagicEffect({x = 1145, y = 922, z=7}, 10)
end
return true
end
globalevent.xml
HTML:
<globalevent name="onThink" interval="1800000" event="script" value="deadlyArena.lua"/>
Please help !!!!!