• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Revscript Error Boss Event Canary 13 TFS 1.3

Qumora

New Member
Joined
Jun 4, 2023
Messages
27
Reaction score
4
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()
1698987606227.png
 
Please send entire error message if you get error not some screen shots. Your error indicates something about id 471 which does not make sense when this script should create teleport id 1949.

Lua:
local config = {
    teleportId = 1949,
    days = {
        ["Thursday"] = {Position(32345, 32221, 7), Position(31612, 32009, 7)},
    },
    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 true
            end
            item:setDestination(day[2])
        end
        addEvent(function()
            local monster = Game.createMonster(config.bossName, config.bossPosition, false, true)
            if monster then
                Game.broadcastMessage(config.bossName .. ' I will devastate this continent!', MESSAGE_GAME_HIGHLIGHT)
            end
        end, 5000)
    end
    return true
end

FrozenGolem:time(config.spawnTime)
FrozenGolem:register()
 
Back
Top