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

TFS 1.X+ Problem with "The Ancient Tombs Quest"

Kownikuzyt

Member
Joined
Feb 11, 2020
Messages
170
Solutions
1
Reaction score
8
Hello, I have a problem with "The Ancient Tombs Quest" even though I drag all 11 levers that can't get through the portal.

I am using the TFS 1.1 engine.

Dipthrah - Mountain Tomb

Dipthrah - Mountain Tomb.png



Kod: data/actions/scripts/quests/the ancient tombs/activeTeleportSwitches.lua



Lua:
local config = {
    [50242] = GlobalStorage.TheAncientTombs.ThalasSwitchesGlobalStorage,
    [50243] = GlobalStorage.TheAncientTombs.DiprathSwitchesGlobalStorage,
    [50244] = GlobalStorage.TheAncientTombs.AshmunrahSwitchesGlobalStorage
}

local function resetScript(position, storage)
    local item = Tile(position):getItemById(1946)
    if item then
        item:transform(1945)
    end

    Game.setStorageValue(storage, Game.getStorageValue(storage) - 1)
end

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local storage = config[item.actionid]
    if not storage then
        return true
    end

    if item.itemid ~= 1945 then
        return false
    end

    Game.setStorageValue(storage, Game.getStorageValue(storage) + 1)
    item:transform(1946)
    addEvent(resetScript, 4 * 60 * 1000, toPosition, storage)
    return true
end



Kod: data/actions/actions.xml



XML:
    <action actionid="12107" script="quests/the ancient tombs/OasisTombLeverDoor.lua" />
    <action actionid="12105" script="quests/the ancient tombs/AncientRuinsTombInstruments.lua" />
    <action fromaid="50242" toaid="50244" script="quests/the ancient tombs/activeTeleportSwitches.lua" />



After the time has elapsed, all levers return to their starting position.
(addEvent(resetScript, 4 * 60 * 1000)
 
Back
Top