Skip to content

Commit

Permalink
fix: nightmare isle and fury gates world changes (#2193)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Elson Costa <[email protected]>
  • Loading branch information
3 people authored Feb 15, 2024
1 parent 8db3964 commit bf2424a
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 336 deletions.
8 changes: 7 additions & 1 deletion data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3077,6 +3077,13 @@ GlobalStorage = {
OutburstHealth = 60181,
OutburstChargingKilled = 60182,
},
WorldBoard = {
NightmareIsle = {
AnkrahmunNorth = 60191,
DarashiaNorth = 60192,
DarashiaWest = 60193,
},
},
FuryGates = 65000,
Yakchal = 65001,
PitsOfInfernoLevers = 65002,
Expand All @@ -3091,7 +3098,6 @@ GlobalStorage = {
CobraBastionFlask = 65012,
Inquisition = 65013,
Yasir = 65014,
NightmareIsle = 65015,
IceCrack = 65016,
UglyMonster = 65017,
KeysUpdate = 40000, -- Reserved storage from 40000 - 40000
Expand Down
19 changes: 6 additions & 13 deletions data-otservbr-global/npc/towncryer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,15 @@ npcConfig.voices = {
}

local worldChanges = {
{
storage = GlobalStorage.FuryGates,
text = "Hear ye! Hear ye! A fiery gate has opened, threatening a city! Guard the people frightened, their death would be a pity!",
},
{
storage = GlobalStorage.Yasir,
text = "Hear ye! Hear ye! What a lucky and beautiful day! Visit Carlin, Ankrahmun, or Liberty Bay. Yasir, the oriental trader might be there. Gather your creature products, for this chance is rare.",
},
{
storage = GlobalStorage.NightmareIsle,
text = "Hear me! Hear me! A river is flooding, south of the outlaw base. Explore a new isle, an unknown place. Don't be afraid, but ready your blade.",
},
{ text = "In Ankrahmun's desert, a storm has revealed the entry to a nightmare that can't be sealed. Horrible creatures there spell instant death to all young adventurers who dare take a breath!", storage = GlobalStorage.WorldBoard.NightmareIsle.AnkrahmunNorth },
{ text = "Near Darashia's coast, a storm has revealed the entry to a nightmare that can't be sealed. Horrible creatures there spell instant death to all young adventurers who dare take a breath!", storage = GlobalStorage.WorldBoard.NightmareIsle.DarashiaNorth },
{ text = "Near Drefia's mountains, a storm has revealed the entry to a nightmare that can't be sealed. Horrible creatures there spell instant death to all young adventurers who dare take a breath!", storage = GlobalStorage.WorldBoard.NightmareIsle.DarashiaWest },
{ text = "Hear ye! Hear ye! What a lucky and beautiful day! Visit Carlin, Ankrahmun, or Liberty Bay. Yasir, the oriental trader might be there. Gather your creature products, for this chance is rare.", storage = GlobalStorage.Yasir },
{ text = "Hear ye! Hear ye! A fiery gate has opened, threatening a city! Guard the people frightened, their death would be a pity!", storage = GlobalStorage.FuryGates },
}

for i = 1, #worldChanges do
if getGlobalStorageValue(worldChanges[i].storage) > 0 then
if Game.getStorageValue(worldChanges[i].storage) > 0 then
table.insert(npcConfig.voices, { text = worldChanges[i].text })
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
local worldBoard = Action()

local communicates = {
-- Fury Gates
[1] = {
globalStorage = 65000,
storageValue = GlobalStorage.FuryGates,
communicate = "A fiery fury gate has opened near one of the major cities somewhere in Tibia.",
},
-- Yasir

[2] = {
globalStorage = 65014,
storageValue = GlobalStorage.Yasir,
communicate = "Oriental ships sighted! A trader for exotic creature products may currently be visiting Carlin, Ankrahmun or Liberty Bay.",
},
-- Nightmare Isle

[3] = {
globalStorage = 65015,
communicate = "A sandstorm travels through Darama, leading to isles full of deadly creatures inside a nightmare. Avoid the river near Drefia/northernmost coast/Ankhramun tar pits!",
storageValue = GlobalStorage.WorldBoard.NightmareIsle.AnkrahmunNorth,
communicate = "A sandstorm travels through Darama, leading to isles full of deadly creatures inside a nightmare. Avoid the Ankhramun tar pits!.",
},

[4] = {
storageValue = GlobalStorage.WorldBoard.NightmareIsle.DarashiaNorth,
communicate = "A sandstorm travels through Darama, leading to isles full of deadly creatures inside a nightmare. Avoid the northernmost coast!",
},

[5] = {
storageValue = GlobalStorage.WorldBoard.NightmareIsle.DarashiaWest,
communicate = "A sandstorm travels through Darama, leading to isles full of deadly creatures inside a nightmare. Avoid the river near Drefia!",
},
}

function worldBoard.onUse(player, item, fromPosition, target, toPosition, isHotkey)
for index, value in pairs(communicates) do
if getGlobalStorageValue(value.globalStorage) > 0 then
if Game.getStorageValue(value.storageValue) > 0 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, value.communicate)
end
end
Expand Down
183 changes: 0 additions & 183 deletions data-otservbr-global/scripts/globalevents/worldchanges/fury_gates.lua

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit bf2424a

Please sign in to comment.