Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
This reverts commit 3cc2fcc.
  • Loading branch information
htc16 committed Nov 3, 2024
1 parent 2b5c358 commit 55e173f
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ monster.manaCost = 0

monster.events = {
"dreamCourtsDeath",
"facelessHealth",
}

monster.changeTarget = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ monster.manaCost = 0

monster.events = {
"dreamCourtsDeath",
"facelessHealth",
}

monster.changeTarget = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ monster.manaCost = 0

monster.events = {
"dreamCourtsDeath",
"facelessHealth",
}

monster.changeTarget = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local transform = {
[8911] = 8912,
[8912] = 8911,
[9110] = 9111,
[9111] = 9110,
}

local bossNames = {
Expand Down Expand Up @@ -247,7 +247,7 @@ function actions_dreamscarLevers.onUse(player, item, fromPosition, target, toPos
local pPos = player:getPosition()
local nightmareLever = Position(32212, 32069, 15)

if item.itemid == 8911 then
if item.itemid == 9110 then
if iPos == nightmareLever then
if player:doCheckBossRoom(lastBoss.bossName, lastBoss.roomFromPosition, lastBoss.roomToPosition) then
if pPos:isInRange(lastBoss.fromPositionPush, lastBoss.toPositionPush) then
Expand Down Expand Up @@ -332,11 +332,14 @@ function actions_dreamscarLevers.onUse(player, item, fromPosition, target, toPos
monster:registerEvent("facelessHealth")
elseif leverTable.bossName:lower() == "izcandar the banished" then
monster:registerEvent("izcandarThink")

spawnSummons(1, "the heat of summer", false, 15, heatOfSummer, leverTable.bossPosition)
spawnSummons(1, "the cold of winter", false, 15, coldOfWinter, leverTable.bossPosition)

Game.setStorageValue(Storage.Quest.U12_00.TheDreamCourts.DreamScarGlobal.IzcandarOutfit, 0)
elseif leverTable.bossName:lower() == "plagueroot" then
spawnSummons(1, "plant attendant", false, 15, plantAttendants, leverTable.bossPosition)

monster:registerEvent("facelessHealth")
elseif leverTable.bossName:lower() == "malofur mangrinder" then
for i = 1, #whirlingBlades do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ local questlog = {
[7] = {
bossName = "Plagueroot",
storageQuestline = Storage.Quest.U12_00.TheDreamCourts.DreamScar.BossCount,
storageTimer = Storage.Quest.U12_00.TheDreamCourts.DreamScarGlobal.PlagueRootTimer,
storageTimer = Storage.Quest.U12_00.TheDreamCourts.DreamScarGlobal.PlaguerootTimer,
middlePosition = Position(32208, 32048, 14),
maxValue = 5,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
local config = {
["Monday"] = "Alptramun",
["Tuesday"] = "Izcandar_the_Banished",
["Friday"] = "Malofur_Mangrinder",
["Thursday"] = "Maxxenius",
["Wednesday"] = "Malofur_Mangrinder",
["Saturday"] = "Plagueroot",
["Sunday"] = "Maxxenius",
}

local spawnByDay = true

local globalevents_dream_courts_worldchange = GlobalEvent("startupCourts")

function globalevents_dream_courts_worldchange.onStartup(interval)
if spawnByDay then
logger.info("[The Dream Courts Quest] loaded: " .. config[os.date("%A")])
Game.loadMap("data/world/worldchanges/dream_courts_bosses/" .. config[os.date("%A")] .. ".otbm")
else
logger.warn("[The Dream Courts Quest] bosses: not boss today")
end
return true
end

globalevents_dream_courts_worldchange:register()

local globalevents_dream_courts_worldchange = GlobalEvent("fixCourts")

function globalevents_dream_courts_worldchange.onTime(interval)
if spawnByDay then
logger.info("[The Dream Courts Quest] loaded: " .. config[os.date("%A")])
Game.loadMap("data/world/worldchanges/dream_courts_bosses/" .. config[os.date("%A")] .. ".otbm")
else
logger.warn("[The Dream Courts Quest] bosses: not boss today")
end

return true
end

globalevents_dream_courts_worldchange:time("00:00")
globalevents_dream_courts_worldchange:register()
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
local dreamCourtsConfig = {
["Monday"] = { map = "alptramun", bossName = "Alptramun" },
["Tuesday"] = { map = "izcandar_the_banished", bossName = "Izcandar the Banished" },
["Wednesday"] = { map = "malofur_mangrinder", bossName = "Malofur Mangrinder" },
["Thursday"] = { map = "maxxenius", bossName = "Maxxenius" },
["Monday"] = { map = "plagueroot", bossName = "Plagueroot" },
["Tuesday"] = { map = "malofur_mangrinder", bossName = "Malofur Mangrinder" },
["Wednesday"] = { map = "maxxenius", bossName = "Maxxenius" },
["Thursday"] = { map = "alptramun", bossName = "Alptramun" },
["Friday"] = { map = "izcandar_the_banished", bossName = "Izcandar the Banished" },
["Saturday"] = { map = "plagueroot", bossName = "Plagueroot" },
["Sunday"] = { map = "maxxenius", bossName = "Maxxenius" },
["Saturday"] = { map = "maxxenius", bossName = "Maxxenius" },
["Sunday"] = { map = "alptramun", bossName = "Alptramun" },
}

local dreamCourtsEvent = GlobalEvent("DreamCourts")
Expand All @@ -20,7 +20,6 @@ function dreamCourtsEvent.onStartup()

Game.loadMap(DATA_DIRECTORY .. "/world/quest/the_dream_courts/" .. dayConfig.map .. ".otbm")
logger.info("[World Change] The Dream Courts today's boss is: {}!", dayConfig.bossName)

return true
end

Expand Down
1 change: 0 additions & 1 deletion data-otservbr-global/startup/tables/item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,6 @@ ItemAction = {
{ x = 32211, y = 32081, z = 15 },
{ x = 32720, y = 32270, z = 8 },
{ x = 33618, y = 32546, z = 13 },
{ x = 32208, y = 32033, z = 13 },
},
},
[23104] = {
Expand Down

0 comments on commit 55e173f

Please sign in to comment.