Kownikuzyt
Member
- Joined
- Feb 11, 2020
- Messages
- 171
- 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
Kod: data/actions/scripts/quests/the ancient tombs/activeTeleportSwitches.lua
Kod: data/actions/actions.xml
I am using the TFS 1.1 engine.
Dipthrah - Mountain Tomb
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)