-
-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ferumbras ascension quest bosses (#3297)
- Loading branch information
1 parent
018f3b7
commit ede9b6a
Showing
7 changed files
with
153 additions
and
358 deletions.
There are no files selected for viewing
71 changes: 19 additions & 52 deletions
71
data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
71 changes: 19 additions & 52 deletions
71
data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
81 changes: 26 additions & 55 deletions
81
data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
68 changes: 21 additions & 47 deletions
68
data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
70 changes: 19 additions & 51 deletions
70
data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
Oops, something went wrong.