Skip to content

Commit

Permalink
Merge branch 'main' into spells
Browse files Browse the repository at this point in the history
  • Loading branch information
kaleohanopahala authored Jan 30, 2025
2 parents c9f59d9 + 6e7f1a9 commit f570cc9
Show file tree
Hide file tree
Showing 70 changed files with 443 additions and 1,146 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ monster.outfit = {
lookMount = 0,
}

monster.raceId = 2403
monster.raceId = 2388
monster.Bestiary = {
class = "Lycanthrope",
race = BESTY_RACE_LYCANTHROPE,
Expand Down
23 changes: 0 additions & 23 deletions data-otservbr-global/scripts/actions/bosses_levers/gorzindel.lua

This file was deleted.

28 changes: 0 additions & 28 deletions data-otservbr-global/scripts/actions/bosses_levers/king_zelos.lua

This file was deleted.

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()
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()
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()
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()
Loading

0 comments on commit f570cc9

Please sign in to comment.