From ede9b6ac1be514f871c9a6361db93354de5290f9 Mon Sep 17 00:00:00 2001 From: Majesty <32709570+majestyotbr@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:17:03 -0300 Subject: [PATCH] fix: ferumbras ascension quest bosses (#3297) --- .../ferumbras_ascension/actions_mazoran.lua | 71 +++++----------- .../ferumbras_ascension/actions_plagirath.lua | 71 +++++----------- .../ferumbras_ascension/actions_ragiaz.lua | 81 ++++++------------ .../ferumbras_ascension/actions_razzagorn.lua | 68 +++++---------- .../ferumbras_ascension/actions_shulgrax.lua | 70 +++++----------- .../ferumbras_ascension/actions_tarbaz.lua | 67 +++++---------- .../ferumbras_ascension/actions_zamulosh.lua | 83 +++++++------------ 7 files changed, 153 insertions(+), 358 deletions(-) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua index aa564b94fd6..83ab13b7613 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua @@ -1,57 +1,24 @@ local config = { - centerRoom = Position(33584, 32689, 14), - BossPosition = Position(33584, 32689, 14), + boss = { + name = "Mazoran", + position = Position(33584, 32689, 14), + }, + + timeToDefeat = 30 * 60, playerPositions = { - Position(33593, 32644, 14), - Position(33593, 32645, 14), - Position(33593, 32646, 14), - Position(33593, 32647, 14), - Position(33593, 32648, 14), + { pos = Position(33593, 32644, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32645, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32646, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32647, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32648, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, }, - newPosition = Position(33585, 32693, 14), + specPos = { + from = Position(33570, 32677, 14), + to = Position(33597, 32700, 14), + }, + exit = Position(33319, 32318, 13), } -local leverMazoran = Action() - -function leverMazoran.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= Position(33593, 32644, 14) then - item:transform(8912) - return true - end - end - - if item.itemid == 8911 then - local playersTable = {} - if player:doCheckBossRoom("Mazoran", Position(33572, 32679, 14), Position(33599, 32701, 14)) then - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with Mazoran.") - return true - end - end - Game.createMonster("Mazoran", config.BossPosition, true, true) - for y = 32644, 32648 do - local playerTile = Tile(Position(33593, y, 14)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPosition) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.MazoranTimer, os.time() + os.time() + 60 * 60 * 2 * 24) - table.insert(playersTable, playerTile:getId()) - end - end - addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, Position(33572, 32679, 14), Position(33599, 32701, 14), Position(33319, 32318, 13)) - item:transform(8912) - end - elseif item.itemid == 8912 then - item:transform(8911) - end - - return true -end - -leverMazoran:uid(1025) -leverMazoran:register() +local lever = BossLever(config) +lever:position(Position(33593, 32643, 14)) +lever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua index 82d5535f8e6..a29930503a8 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua @@ -1,57 +1,24 @@ local config = { - centerRoom = Position(33172, 31501, 13), - BossPosition = Position(33172, 31501, 13), + boss = { + name = "Plagirath", + position = Position(33172, 31501, 13), + }, + + timeToDefeat = 30 * 60, playerPositions = { - Position(33229, 31500, 13), - Position(33229, 31501, 13), - Position(33229, 31502, 13), - Position(33229, 31503, 13), - Position(33229, 31504, 13), + { pos = Position(33229, 31500, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31501, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31502, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31503, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31504, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33159, 31488, 13), + to = Position(33190, 31515, 13), }, - newPosition = Position(33173, 31504, 13), + exit = Position(33319, 32318, 13), } -local leverPlagirath = Action() - -function leverPlagirath.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= Position(33229, 31500, 13) then - item:transform(8912) - return true - end - end - if item.itemid == 8911 then - if Game.getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.PlagirathTimer) >= 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait a while, recently someone challenge Plagirath.") - return true - end - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with Plagirath.") - return true - end - end - Game.createMonster("Plagirath", config.BossPosition, true, true) - for y = 31500, 31504 do - local playerTile = Tile(Position(33229, y, 13)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPosition) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.PlagirathTimer, os.time() + 60 * 60 * 24 * 2) - end - end - Game.setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.PlagirathTimer, 1) - addEvent(clearForgotten, 30 * 60 * 1000, Position(33159, 31491, 13), Position(33185, 31513, 13), Position(33319, 32318, 13), Storage.Quest.U10_90.FerumbrasAscension.PlagirathTimer) - item:transform(8912) - elseif item.itemid == 8912 then - item:transform(8911) - end - - return true -end - -leverPlagirath:uid(1022) -leverPlagirath:register() +local lever = BossLever(config) +lever:position(Position(33229, 31499, 13)) +lever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua index e63df82d82d..36533dbdb33 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua @@ -1,59 +1,30 @@ local config = { - centerRoom = Position(33481, 32334, 13), - BossPosition = Position(33481, 32334, 13), - newPosition = Position(33482, 32339, 13), - deathDragons = { - Position(33476, 32331, 13), - Position(33476, 32340, 13), - Position(33487, 32340, 13), - Position(33488, 32331, 13), + boss = { + name = "Ragiaz", + position = Position(33481, 32334, 13), }, -} - -local leverRagiaz = Action() - -function leverRagiaz.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= Position(33456, 32356, 13) then - item:transform(8912) - return true - end - end - - if item.itemid == 8911 then - local playersTable = {} - if player:doCheckBossRoom("Ragiaz", Position(33472, 32323, 13), Position(33493, 32347, 13)) then - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with Ragiaz.") - return true - end - end - Game.createMonster("Ragiaz", config.BossPosition, true, true) - for d = 1, #config.deathDragons do - Game.createMonster("Death Dragon", config.deathDragons[d], true, true) - end - for x = 33456, 33460 do - local playerTile = Tile(Position(x, 32356, 13)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPosition) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.RagiazTimer, os.time() + 60 * 60 * 2 * 24) - table.insert(playersTable, playerTile:getId()) - end - end - addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, Position(33472, 32323, 13), Position(33493, 32347, 13), Position(33319, 32318, 13)) - item:transform(8912) - end - elseif item.itemid == 8912 then - item:transform(8911) - end - return true -end + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33456, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33457, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33458, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33459, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33460, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + }, + monsters = { + { name = "Death Dragon", pos = Position(33476, 32331, 13) }, + { name = "Death Dragon", pos = Position(33476, 32340, 13) }, + { name = "Death Dragon", pos = Position(33487, 32340, 13) }, + { name = "Death Dragon", pos = Position(33488, 32331, 13) }, + }, + specPos = { + from = Position(33468, 32319, 13), + to = Position(33495, 32347, 13), + }, + exit = Position(33319, 32318, 13), +} -leverRagiaz:uid(1023) -leverRagiaz:register() +local lever = BossLever(config) +lever:position(Position(33455, 32356, 13)) +lever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua index fe5b4e06ed9..ca4f464a1b1 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua @@ -1,50 +1,24 @@ local config = { - centerRoom = Position(33422, 32467, 14), - BossPosition = Position(33422, 32467, 14), - newPosition = Position(33419, 32467, 14), -} - -local leverRazzagorn = Action() + boss = { + name = "Razzagorn", + position = Position(33422, 32467, 14), + }, -function leverRazzagorn.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= Position(33386, 32455, 14) then - item:transform(8912) - return true - end - end - if item.itemid == 8911 then - if Game.getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.RazzagornTimer) >= 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait a while, recently someone challenge Razzagorn.") - return true - end - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with Razzagorn.") - return true - end - end - Game.createMonster("Razzagorn", config.BossPosition, true, true) - for x = 33386, 33390 do - local playerTile = Tile(Position(x, 32455, 14)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPosition) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.RazzagornTimer, os.time() + 60 * 60 * 2 * 24) - end - end - Game.setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.RazzagornTimer, 1) - addEvent(clearForgotten, 30 * 60 * 1000, Position(33408, 32454, 14), Position(33440, 32480, 14), Position(33319, 32318, 13), Storage.Quest.U10_90.FerumbrasAscension.RazzagornTimer) - item:transform(8912) - elseif item.itemid == 8912 then - item:transform(8911) - end - - return true -end + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33386, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33387, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33388, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33389, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33390, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33407, 32453, 14), + to = Position(33439, 32481, 14), + }, + exit = Position(33319, 32318, 13), +} -leverRazzagorn:uid(1024) -leverRazzagorn:register() +local lever = BossLever(config) +lever:position(Position(33385, 32455, 14)) +lever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua index 2b1792a9261..a9106ce224d 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua @@ -1,56 +1,24 @@ local config = { - centerRoom = Position(33485, 32786, 13), - BossPosition = Position(33485, 32786, 13), + boss = { + name = "Shulgrax", + position = Position(33485, 32786, 13), + }, + + timeToDefeat = 30 * 60, playerPositions = { - Position(33434, 32785, 13), - Position(33434, 32786, 13), - Position(33434, 32787, 13), - Position(33434, 32788, 13), - Position(33434, 32789, 13), + { pos = Position(33434, 32785, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32786, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32787, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32788, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32789, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33474, 32775, 13), + to = Position(33496, 32798, 13), }, - newPosition = Position(33485, 32790, 13), + exit = Position(33319, 32318, 13), } -local leverShulgrax = Action() - -function leverShulgrax.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= Position(33434, 32785, 13) then - item:transform(8912) - return true - end - end - if item.itemid == 8911 then - local playersTable = {} - if player:doCheckBossRoom("Shulgrax", Position(33473, 32776, 13), Position(33496, 32798, 13)) then - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with Shulgrax.") - return true - end - end - Game.createMonster("Shulgrax", config.BossPosition, true, true) - for y = 32785, 32789 do - local playerTile = Tile(Position(33434, y, 13)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPosition) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ShulgraxTimer, os.time() + 60 * 60 * 2 * 24) - table.insert(playersTable, playerTile:getId()) - end - end - addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, Position(33473, 32776, 13), Position(33496, 32798, 13), Position(33319, 32318, 13)) - item:transform(8912) - end - elseif item.itemid == 8912 then - item:transform(8911) - end - - return true -end - -leverShulgrax:uid(1028) -leverShulgrax:register() +local lever = BossLever(config) +lever:position(Position(33434, 32784, 13)) +lever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua index 7423b8f3820..135b5f4940c 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua @@ -1,49 +1,24 @@ local config = { - centerRoom = Position(33459, 32844, 11), - BossPosition = Position(33459, 32844, 11), - newPosition = Position(33459, 32848, 11), -} - -local leverTarbaz = Action() + boss = { + name = "Tarbaz", + position = Position(33459, 32844, 11), + }, -function leverTarbaz.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= Position(33418, 32849, 11) then - item:transform(8912) - return true - end - end - if item.itemid == 8911 then - local playersTable = {} - if player:doCheckBossRoom("Tarbaz", Position(33446, 32833, 11), Position(33515, 32875, 12)) then - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with Tarbaz.") - return true - end - end - Game.createMonster("Tarbaz", config.BossPosition, true, true) - for y = 32849, 32853 do - local playerTile = Tile(Position(33418, y, 11)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPosition) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TarbazTimer, os.time() + 60 * 60 * 2 * 24) - table.insert(playersTable, playerTile:getId()) - end - end - addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, Position(33446, 32833, 11), Position(33515, 32875, 12), Position(33319, 32318, 13)) - item:transform(8912) - end - elseif item.itemid == 8912 then - item:transform(8911) - end - - return true -end + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33418, 32849, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32850, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32851, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32852, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32853, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33447, 32832, 11), + to = Position(33473, 32856, 11), + }, + exit = Position(33319, 32318, 13), +} -leverTarbaz:uid(1027) -leverTarbaz:register() +local lever = BossLever(config) +lever:position(Position(33418, 32848, 11)) +lever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua index fc3e34a8219..9c62e19f19c 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua @@ -1,60 +1,33 @@ local config = { - centerRoom = Position(33643, 32756, 11), - BossPosition = Position(33643, 32756, 11), - newPosition = Position(33644, 32760, 11), - zamuloshSummons = { - Position(33642, 32756, 11), - Position(33642, 32756, 11), - Position(33642, 32756, 11), - Position(33644, 32756, 11), - Position(33644, 32756, 11), - Position(33644, 32756, 11), + boss = { + name = "Zamulosh", + position = Position(33643, 32756, 11), }, -} - -local leverZamulosh = Action() -function leverZamulosh.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.itemid == 8911 then - if player:getPosition() ~= Position(33680, 32741, 11) then - item:transform(8912) - return true - end - end - if item.itemid == 8911 then - local playersTable = {} - if player:doCheckBossRoom("Zamulosh", Position(33634, 32749, 11), Position(33654, 32765, 11)) then - local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15) - for i = 1, #specs do - spec = specs[i] - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with Zamulosh.") - return true - end - end - Game.createMonster("Zamulosh", config.BossPosition, true, true) - for d = 1, #config.zamuloshSummons do - Game.createMonster("Zamulosh3", config.zamuloshSummons[d], true, true) - end - for y = 32741, 32745 do - local playerTile = Tile(Position(33680, y, 11)):getTopCreature() - if playerTile and playerTile:isPlayer() then - playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) - playerTile:teleportTo(config.newPosition) - playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTimer, os.time() + 60 * 60 * 2 * 24) - table.insert(playersTable, playerTile:getId()) - end - end - addEvent(kickPlayersAfterTime, 30 * 60 * 1000, playersTable, Position(33634, 32749, 11), Position(33654, 32765, 11), Position(33319, 32318, 13)) - item:transform(8912) - end - elseif item.itemid == 8912 then - item:transform(8911) - end + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33680, 32741, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33680, 32742, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33680, 32743, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33680, 32744, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33680, 32745, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33632, 32747, 11), + to = Position(33654, 32765, 11), + }, + exit = Position(33319, 32318, 13), +} - return true -end +local zamuloshSummons = { + Position(33642, 32756, 11), + Position(33642, 32756, 11), + Position(33642, 32756, 11), + Position(33644, 32756, 11), + Position(33644, 32756, 11), + Position(33644, 32756, 11), +} -leverZamulosh:uid(1026) -leverZamulosh:register() +local lever = BossLever(config) +lever:position(Position(33680, 32740, 11)) +lever:register()