the following error "
LUA:
local config = {
teleportId = 1949,
days = {
["Thursday"] = {Position(32345, 32221, 7), Position(31612, 32009, 7)}, -- Morshabaal - monday-Segunda, tuesday-Terça, wednesday-Quarta, thursday-Quinta, friday-Sexta, saturday-Sabado and sunday-Domingo
},
bossPosition = Position(31612, 32006, 7),
bossName = 'Frozen Golem',
spawnTime = '12:00:00'
}
local FrozenGolem = GlobalEvent("Frozen Golem")
function FrozenGolem.onTime(interval)
local day = config.days[os.date("%A")]
if day then
local item = Game.createItem(config.teleportId, 1, day[1])
if item then
if not item:isTeleport() then
item:remove()
return false
end
item:setDestination(day[2])
end
addEvent(function()
Game.createMonster(config.bossName, config.bossPosition, false, true)
Game.broadcastMessage(config.bossName .. ' I will devastate this continent!', MESSAGE_GAME_HIGHLIGHT)
end, 5000)
end
return true
end
FrozenGolem:time(config.spawnTime)
FrozenGolem:register()