Skip to content

Commit

Permalink
Merge branch 'main' into new-mounts
Browse files Browse the repository at this point in the history
  • Loading branch information
omarcopires authored Feb 15, 2024
2 parents 5f4cd3c + 446a915 commit 4ea133c
Show file tree
Hide file tree
Showing 42 changed files with 640 additions and 798 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,15 @@ config.lua
config_canary.lua
client_assertions.txt
.env
otservbr.otbm
canary.otbm
otservbr-custom.otbm

# Extensions
*.ini
*.otb
*.exe
*.manifest
*.otbm
*.rar
*-house.xml
*-monster.xml
Expand Down
38 changes: 0 additions & 38 deletions data-canary/scripts/actions/other/spellbook.lua

This file was deleted.

10 changes: 7 additions & 3 deletions data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ Storage = {
-- Reserved in Global.Storage.FamiliarSummonEvent60 = 30055
ChayenneKeyTime = 30056,
FreeQuests = 30057,
PremiumAccount = 30058,
BattleAxeQuest = 30059,
ShrineEntrance = 30060,
PlayerWeaponReward = 30061,
Expand Down Expand Up @@ -2921,7 +2920,6 @@ Storage = {
},

VipSystem = {
IsVip = 150001,
OnlineCoinsGain = 150002,
OnlineTokensGain = 150003,
},
Expand Down Expand Up @@ -3079,6 +3077,13 @@ GlobalStorage = {
OutburstHealth = 60181,
OutburstChargingKilled = 60182,
},
WorldBoard = {
NightmareIsle = {
AnkrahmunNorth = 60191,
DarashiaNorth = 60192,
DarashiaWest = 60193,
},
},
FuryGates = 65000,
Yakchal = 65001,
PitsOfInfernoLevers = 65002,
Expand All @@ -3093,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
4 changes: 2 additions & 2 deletions data-otservbr-global/lib/others/vip_system.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Player.onRemoveVip(self)
self:setOutfit(playerOutfit)
end

self:setStorageValue(Storage.VipSystem.IsVip, 0)
self:kv():scoped("account"):remove("vip-system")
end

function Player.onAddVip(self, days, silent)
Expand All @@ -47,7 +47,7 @@ function Player.onAddVip(self, days, silent)
self:addMount(mount)
end

self:setStorageValue(Storage.VipSystem.IsVip, 1)
self:kv():scoped("account"):set("vip-system", true)
end

function CheckPremiumAndPrint(player, msgType)
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
7 changes: 0 additions & 7 deletions data-otservbr-global/raids/darashia/tyrn.xml

This file was deleted.

6 changes: 0 additions & 6 deletions data-otservbr-global/raids/roshamuul/mawhawk.xml

This file was deleted.

16 changes: 0 additions & 16 deletions data-otservbr-global/scripts/actions/other/door_shive1.lua

This file was deleted.

16 changes: 0 additions & 16 deletions data-otservbr-global/scripts/actions/other/door_shive2.lua

This file was deleted.

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
58 changes: 0 additions & 58 deletions data-otservbr-global/scripts/actions/spellbook.lua

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local playerLogin = CreatureEvent("VipLogin")

function playerLogin.onLogin(player)
if configManager.getBoolean(configKeys.VIP_SYSTEM_ENABLED) then
local wasVip = player:getStorageValue(Storage.VipSystem.IsVip) == 1
local wasVip = player:kv():scoped("account"):get("vip-system") or false
if wasVip and not player:isVip() then
player:onRemoveVip()
end
Expand Down
Loading

0 comments on commit 4ea133c

Please sign in to comment.