• 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!

[TFS1.3] Svargrond Arena, monster dont respawn

ivvanek

New Member
Joined
Mar 24, 2009
Messages
113
Reaction score
3
Svargrond Arena
When enter into teleport and was teleported into arena the monsters doesn't respawn.
I have put in mapeditor on Teleport ActionID 26100

Here is scripts:

XML
XML:
    <!-- Arena Quest-->
    <action actionid="13100" script="quests/svargrond arena/arena_door.lua" />
    <action actionid="26100" script="quests/svargrond arena/arena_door.lua" />
    <action actionid="27100" script="quests/svargrond arena/arena_door.lua" />
    <action actionid="28100" script="quests/svargrond arena/arena_door.lua" />

LUA
Lua:
local storages = {
    [26100] = Storage.SvargrondArena.Greenhorn,
    [27100] = Storage.SvargrondArena.Scrapper,
    [28100] = Storage.SvargrondArena.Warlord
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    -- Cannot use opened door
    if item.itemid == 5133 then
        return false
    end

    if player:getStorageValue(Storage.SvargrondArena.Arena) < 1 then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'This door seems to be sealed against unwanted intruders.')
        return true
    end

    -- Doors to rewards
    local cStorage = storages[item.actionid]
    if cStorage then
        if player:getStorageValue(cStorage) ~= 1 then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'It\'s locked.')
            return true
        end

        item:transform(item.itemid + 1)
        player:teleportTo(toPosition, true)

    -- Arena entrance doors
    else
        if player:getStorageValue(Storage.SvargrondArena.Pit) ~= 1 then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'This door seems to be sealed against unwanted intruders.')
            return true
        end

        item:transform(item.itemid + 1)
        player:teleportTo(toPosition, true)
    end

    return true
end
 
Last edited:
Svargrond Arena
When enter into teleport and was teleported into arena the monsters doesn't respawn.
I have put in mapeditor on Teleport ActionID 26100

Here is scripts:

XML
XML:
    <!-- Arena Quest-->
    <action actionid="13100" script="quests/svargrond arena/arena_door.lua" />
    <action actionid="26100" script="quests/svargrond arena/arena_door.lua" />
    <action actionid="27100" script="quests/svargrond arena/arena_door.lua" />
    <action actionid="28100" script="quests/svargrond arena/arena_door.lua" />

LUA
Lua:
local storages = {
    [26100] = Storage.SvargrondArena.Greenhorn,
    [27100] = Storage.SvargrondArena.Scrapper,
    [28100] = Storage.SvargrondArena.Warlord
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    -- Cannot use opened door
    if item.itemid == 5133 then
        return false
    end

    if player:getStorageValue(Storage.SvargrondArena.Arena) < 1 then
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'This door seems to be sealed against unwanted intruders.')
        return true
    end

    -- Doors to rewards
    local cStorage = storages[item.actionid]
    if cStorage then
        if player:getStorageValue(cStorage) ~= 1 then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'It\'s locked.')
            return true
        end

        item:transform(item.itemid + 1)
        player:teleportTo(toPosition, true)

    -- Arena entrance doors
    else
        if player:getStorageValue(Storage.SvargrondArena.Pit) ~= 1 then
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'This door seems to be sealed against unwanted intruders.')
            return true
        end

        item:transform(item.itemid + 1)
        player:teleportTo(toPosition, true)
    end

    return true
end
This only seems to control the doors of svargrond arena.

Is there not a movement script? onKill creaturevent?
 
This only seems to control the doors of svargrond arena.

Is there not a movement script? onKill creaturevent?
I felt so, there is no more files in this folder.
So i have missing file with the script of respawning monsters on arena.
Have you any good working repositories for TFS1.3 with quests on github?
 
Last edited:
I have additional data files but dunno how to fix it. any solution?

The problem is:
When i go to teleport, monsters doesn't respawn.
 
Anyone knows which ActionID should have the Stone on svargrond arena? it should to make a teleport, right?
 
no, no actionid is required in the stone, only their position need to be correct

View attachment 55757

Still don't understand :|
When i killed a monster i should have access to enter next room... how the stone has been removed?

Lua:
function onKill(creature, target)
    local targetMonster = target:getMonster()
    if not targetMonster then
        return
    end

    local player = creature:getPlayer()
    local pit = player:getStorageValue(Storage.SvargrondArena.Pit)
    if pit < 1 or pit > 10 then
        return
    end

    local arena = player:getStorageValue(Storage.SvargrondArena.Arena)
    if arena < 1 then
        return
    end

    if not isInArray(ARENA[arena].creatures, targetMonster:getName():lower()) then
        return
    end

    -- Remove pillar and create teleport
    local pillarTile = Tile(PITS[pit].pillar)
    if pillarTile then
        local pillarItem = pillarTile:getItemById(SvargrondArena.itemPillar)
        if pillarItem then
            pillarItem:remove()

            local teleportItem = Game.createItem(SvargrondArena.itemTeleport, 1, PITS[pit].tp)
            if teleportItem then
                teleportItem:setActionId(25200)
            end

            SvargrondArena.sendPillarEffect(pit)
        end
    end

    player:setStorageValue(Storage.SvargrondArena.Pit, pit + 1)
    player:say('Victory! Head through the new teleporter into the next room.', TALKTYPE_MONSTER_SAY)
    return true
end
 
Last edited:
Back
Top