diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index b1795ce1dde..a2a0131ce30 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -215,11 +215,7 @@ Storage = { Fourteen = { Remains = 50041, }, - UrmahlulluTimer = 50042, AccessDoor = 50043, - NeferiTheSpyTimer = 50044, - SisterHetaiTimer = 55045, - AmenefTimer = 55046, CatacombDoors = 55047, }, TheSecretLibrary = { @@ -433,15 +429,11 @@ Storage = { Questline = 50350, DragonCounter = 50351, ChestCounter = 50352, - TazhadurTimer = 50353, - KalyassaTimer = 50354, SecretsCounter = 50355, GelidrazahAccess = 50356, - GelidrazahTimer = 50357, DesertTile = 50358, StoneSculptureTile = 50359, SuntowerTile = 50360, - ZorvoraxTimer = 50361, Horn = 50362, Scale = 50363, Bones = 50364, @@ -473,14 +465,6 @@ Storage = { RiftRunner = 50420, -- Scroll TheShattererTimer = 50421, TheLordOfTheLiceTimer = 50422, - TarbazTimer = 50423, - RazzagornTimer = 50424, - RagiazTimer = 50425, - ZamuloshTimer = 50426, - ShulgraxTimer = 50427, - MazoranTimer = 50428, - PlagirathTimer = 50429, - FerumbrasTimer = 50430, Tarbaz = 50431, Razzagorn = 50432, Ragiaz = 50433, @@ -531,19 +515,12 @@ Storage = { DiamondServantCounter = 50484, AccessPortals = 50485, AccessMachine = 50486, - LadyTenebrisTimer = 50487, LadyTenebrisKilled = 50488, - LloydTimer = 50489, LloydKilled = 50490, - ThornKnightTimer = 50491, ThornKnightKilled = 50492, - DragonkingTimer = 50493, DragonkingKilled = 50494, - HorrorTimer = 50495, HorrorKilled = 50496, - TimeGuardianTimer = 50497, TimeGuardianKilled = 50498, - LastLoreTimer = 50499, LastLoreKilled = 50501, BirdCage = 50502, AccessLavaTeleport = 50503, @@ -686,9 +663,6 @@ Storage = { Warzone3Reward = 50704, BossKills = 50705, DoorGoldenFruits = 50706, - BossWarzone1 = 50707, - BossWarzone2 = 50708, - BossWarzone3 = 50709, GnomedixMsg = 50710, }, TheirMastersVoice = { @@ -1707,7 +1681,6 @@ Storage = { Questline = 52310, CobraBastion = { Questline = 52311, - ScarlettTimer = 52312, }, }, RottinWoodAndMaried = { @@ -1733,7 +1706,6 @@ Storage = { Commander = 52396, -- Global TotalLionCommanders = 52397, -- Global TotalUsurperCommanders = 52398, -- Global - Timer = 52399, }, }, -- News quest development @@ -2567,17 +2539,8 @@ Storage = { ChakoyaIcebergMiniWorldChange = {}, GrimvaleMineWorldChange = {}, Grimvale = { - BloodbackTimer = 44951, - DarkfangTimer = 44952, - SharpclawTimer = 44953, - ShadowpeltTimer = 44954, - BlackVixenTimer = 44955, AncientFeudDoors = 44956, AncientFeudShortcut = 44957, - YirkasTimer = 44958, - SrezzTimer = 44959, - UtuaTimer = 44960, - KatexTimer = 44961, }, HiveOutpostMiniWorldChange = {}, JungleCampMiniWorldChange = {}, @@ -2723,7 +2686,6 @@ Storage = { BuriedCathedralAccess = 46403, DreamScarAccess = 46404, AndrewDoor = 14900, - FacelessBaneTime = 50283, AccessDoors = 46309, ArenaTimer = 46310, PlaguerootKilled = 46311, @@ -2760,18 +2722,12 @@ Storage = { IceIslands = 46863, }, Bosses = { - BaelocNictrosTimer = 46865, BaelocNictrosKilled = 46866, - CountVlarkorthTimer = 46867, CountVlarkorthKilled = 46868, - DukeKruleTimer = 46869, DukeKruleKilled = 46870, - EarlOsamTimer = 46871, EarlOsamKilled = 46872, - LordAzaramTimer = 46873, LordAzaramKilled = 46874, KingZelosDoor = 46875, - KingZelosTimer = 46876, KingZelosKilled = 46877, InquisitionOutfitReceived = 46878, }, @@ -2783,20 +2739,12 @@ Storage = { U12_30 = { -- update 12.30 - Reserved Storages 47001 - 47200 FalconerOutfits = {}, FeasterOfSouls = { - IrgixTimer = 47005, - IrgixKilled = 47006, - UnazTimer = 47007, UnazKilled = 47008, - VokTimer = 47009, VokKilled = 47010, - FearFeasterTimer = 47011, FearFeasterKilled = 47012, - DreadMaidenTimer = 47013, DreadMaidenKilled = 47014, - UnwelcomeTimer = 47015, UnwelcomeKilled = 47016, PaleWormEntrance = 47017, - PaleWormTimer = 47018, PaleWormKilled = 47019, }, PoltergeistOutfits = { @@ -2811,18 +2759,12 @@ Storage = { AccessSouthernSide = 47403, }, SoulWar = { - GoshnarMaliceTimer = 47210, GoshnarMaliceKilled = 47211, - GoshnarHatredTimer = 47212, GoshnarHatredKilled = 47213, - GoshnarSpiteTimer = 47214, GoshnarSpiteKilled = 47215, - GoshnarCrueltyTimer = 47216, GoshnarCrueltyKilled = 47217, - GoshnarGreedTimer = 47218, GoshnarGreedKilled = 47219, GoshnarMegalomaniaAccess = 47220, - GoshnarMegalomaniaTimer = 47221, GoshnarMegalomaniaKilled = 47222, QuestReward = 47223, }, @@ -2833,21 +2775,15 @@ Storage = { RascacoonShortcut = 47512, TentuglyKilled = 47513, TentuglyDoor = 47514, - TentuglyTimer = 47515, - RatmiralTimer = 47516, }, RascoohanOutfits = {}, }, U12_70 = { -- update 12.70 - Reserved Storages 47601 - 47800 AdventuresOfGalthen = { AccessDoor = 47601, - MegasylvanYseldaTimer = 47602, }, CitizenOfIssaviOutfits = {}, RoyalBounaceanAdvisorOutfits = {}, - TooHotToHandle = { - BrainstealerTimer = 47611, - }, }, U12_80 = { -- update 12.80 - Reserved Storages 47801 - 47850 RoyalCostumeOutfits = {}, @@ -2860,15 +2796,10 @@ Storage = { Max = 47857, }, Bosses = { - MagmaBubbleTimer = 47852, MagmaBubbleKilled = 47853, - ThePrimalMenaceTimer = 47854, ThePrimalMenaceKilled = 47855, }, }, - WithinTheTides = { - TimiraTimer = 47858, - }, }, U13_10 = { -- update 13.10 - Reserved Storages 47901 - 47951 CradleOfMonsters = { diff --git a/data-otservbr-global/lib/quests/bigfoot_burden.lua b/data-otservbr-global/lib/quests/bigfoot_burden.lua index 05c303de1be..c27d0c06134 100644 --- a/data-otservbr-global/lib/quests/bigfoot_burden.lua +++ b/data-otservbr-global/lib/quests/bigfoot_burden.lua @@ -10,7 +10,6 @@ if not warzoneConfig then boss = "Deathstrike", teleportTo = Position(33096, 31955, 10), locked = false, - storage = Storage.BigfootBurden.BossWarzone1, interval = configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN), exit = Position(33001, 31900, 9), }, @@ -24,7 +23,6 @@ if not warzoneConfig then boss = "Gnomevil", teleportTo = Position(33106, 31955, 11), locked = false, - storage = Storage.BigfootBurden.BossWarzone2, interval = configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN), exit = Position(33001, 31900, 9), wall = 16169, --Id of current crystais in warzone 2 (open killing parasite) @@ -39,7 +37,6 @@ if not warzoneConfig then boss = "Abyssador", teleportTo = Position(33083, 31904, 12), --Place where the player will be teleported inside the room locked = false, - storage = Storage.BigfootBurden.BossWarzone3, interval = configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN), exit = Position(33001, 31900, 9), }, diff --git a/data-otservbr-global/monster/bosses/doctor_marrow.lua b/data-otservbr-global/monster/bosses/doctor_marrow.lua index 3de9bc41825..61f19f0b70b 100644 --- a/data-otservbr-global/monster/bosses/doctor_marrow.lua +++ b/data-otservbr-global/monster/bosses/doctor_marrow.lua @@ -13,21 +13,25 @@ monster.outfit = { lookMount = 0, } -monster.health = 1800 -monster.maxHealth = 1800 +monster.health = 120000 +monster.maxHealth = 120000 monster.race = "blood" monster.corpse = 18074 -monster.speed = 125 +monster.speed = 180 monster.manaCost = 0 +monster.events = { + "DoctorMarrowHealth", +} + monster.changeTarget = { interval = 4000, - chance = 10, + chance = 15, } monster.strategiesTarget = { - nearest = 80, - health = 10, + nearest = 60, + health = 30, damage = 10, } diff --git a/data-otservbr-global/monster/bosses/morshabaal.lua b/data-otservbr-global/monster/bosses/morshabaal.lua index f4b55b1dd23..b177e932c65 100644 --- a/data-otservbr-global/monster/bosses/morshabaal.lua +++ b/data-otservbr-global/monster/bosses/morshabaal.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 2118, bossRace = RARITY_NEMESIS, - --storageCooldown = Storage.Quest.U12_70.AdventuresOfGalthen.MegasylvanYseldaTimer } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/bosses/the_brainstealer.lua b/data-otservbr-global/monster/bosses/the_brainstealer.lua index 7c45f8d04ee..57a4beba537 100644 --- a/data-otservbr-global/monster/bosses/the_brainstealer.lua +++ b/data-otservbr-global/monster/bosses/the_brainstealer.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 2055, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_70.TooHotToHandle.BrainstealerTimer, } monster.health = 300000 diff --git a/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua b/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua index 9e856e372a1..a1d2b57ae54 100644 --- a/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua +++ b/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 2006, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_60.APiratesTail.RatmiralTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/a_pirates_tail_quest/tentuglys_head.lua b/data-otservbr-global/monster/quests/a_pirates_tail_quest/tentuglys_head.lua index 72ee264ae71..07fef10a1fd 100644 --- a/data-otservbr-global/monster/quests/a_pirates_tail_quest/tentuglys_head.lua +++ b/data-otservbr-global/monster/quests/a_pirates_tail_quest/tentuglys_head.lua @@ -10,7 +10,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 2238, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_60.APiratesTail.TentuglyTimer, } monster.health = 75000 diff --git a/data-otservbr-global/monster/quests/adventures_of_galthen/megasylvan_yselda.lua b/data-otservbr-global/monster/quests/adventures_of_galthen/megasylvan_yselda.lua index 40afe906a82..606427d8afe 100644 --- a/data-otservbr-global/monster/quests/adventures_of_galthen/megasylvan_yselda.lua +++ b/data-otservbr-global/monster/quests/adventures_of_galthen/megasylvan_yselda.lua @@ -10,7 +10,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 2114, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_70.AdventuresOfGalthen.MegasylvanYseldaTimer, } monster.health = 32000 diff --git a/data-otservbr-global/monster/quests/ancient_feud/katex_blood_tongue.lua b/data-otservbr-global/monster/quests/ancient_feud/katex_blood_tongue.lua index ac8553759b6..b6806adbed6 100644 --- a/data-otservbr-global/monster/quests/ancient_feud/katex_blood_tongue.lua +++ b/data-otservbr-global/monster/quests/ancient_feud/katex_blood_tongue.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1981, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U10_80.Grimvale.KatexTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/ancient_feud/srezz_yellow_eyes.lua b/data-otservbr-global/monster/quests/ancient_feud/srezz_yellow_eyes.lua index 38c3b17c7b9..3c849c72aa3 100644 --- a/data-otservbr-global/monster/quests/ancient_feud/srezz_yellow_eyes.lua +++ b/data-otservbr-global/monster/quests/ancient_feud/srezz_yellow_eyes.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1983, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U10_80.Grimvale.SrezzTimer, } monster.health = 6200 diff --git a/data-otservbr-global/monster/quests/ancient_feud/utua_stone_sting.lua b/data-otservbr-global/monster/quests/ancient_feud/utua_stone_sting.lua index 4305d5b4a0f..511c78787aa 100644 --- a/data-otservbr-global/monster/quests/ancient_feud/utua_stone_sting.lua +++ b/data-otservbr-global/monster/quests/ancient_feud/utua_stone_sting.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1984, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U10_80.Grimvale.UtuaTimer, } monster.health = 6400 diff --git a/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua b/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua index f1f92583456..588610e04c0 100644 --- a/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua +++ b/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1982, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U10_80.Grimvale.YirkasTimer, } monster.health = 6300 diff --git a/data-otservbr-global/monster/quests/bigfoots_burden/bosses/abyssador.lua b/data-otservbr-global/monster/quests/bigfoots_burden/bosses/abyssador.lua index c1609ca23e6..177700eedf9 100644 --- a/data-otservbr-global/monster/quests/bigfoots_burden/bosses/abyssador.lua +++ b/data-otservbr-global/monster/quests/bigfoots_burden/bosses/abyssador.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 887, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.BigfootBurden.BossWarzone3, } monster.health = 340000 diff --git a/data-otservbr-global/monster/quests/bigfoots_burden/bosses/deathstrike.lua b/data-otservbr-global/monster/quests/bigfoots_burden/bosses/deathstrike.lua index 0233fa748a9..9fef07f960d 100644 --- a/data-otservbr-global/monster/quests/bigfoots_burden/bosses/deathstrike.lua +++ b/data-otservbr-global/monster/quests/bigfoots_burden/bosses/deathstrike.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 892, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.BigfootBurden.BossWarzone1, } monster.health = 200000 diff --git a/data-otservbr-global/monster/quests/bigfoots_burden/bosses/gnomevil.lua b/data-otservbr-global/monster/quests/bigfoots_burden/bosses/gnomevil.lua index 35eeaf2a9c2..b0d0a7487a1 100644 --- a/data-otservbr-global/monster/quests/bigfoots_burden/bosses/gnomevil.lua +++ b/data-otservbr-global/monster/quests/bigfoots_burden/bosses/gnomevil.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 893, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.BigfootBurden.BossWarzone2, } monster.health = 250000 diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua index d415abf85bd..e9b7c7d9105 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1487, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.CultsOfTibia.Humans.BossTimer, } monster.health = 250000 diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/ravenous_hunger.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/ravenous_hunger.lua index 3fe9619d79e..cee0dd32fc6 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/ravenous_hunger.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/ravenous_hunger.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1427, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.CultsOfTibia.Barkless.BossTimer, } monster.health = 100000 diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_armored_voidborn.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_armored_voidborn.lua index 738581d2a33..d9996962a2f 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_armored_voidborn.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_armored_voidborn.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1406, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.CultsOfTibia.Orcs.BossTimer, } monster.health = 60000 diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_false_god.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_false_god.lua index edc51c5afbd..888f068159b 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_false_god.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_false_god.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1409, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.CultsOfTibia.Minotaurs.BossTimer, } monster.health = 300000 diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_sandking.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_sandking.lua index 82794035583..89ef694e51a 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_sandking.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_sandking.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1444, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.CultsOfTibia.Life.BossTimer, } monster.health = 50000 diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_source_of_corruption.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_source_of_corruption.lua index c4ba3312b23..ef660075883 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_source_of_corruption.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_source_of_corruption.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1500, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.CultsOfTibia.FinalBoss.BossTimer, } monster.health = 500000 diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua b/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua index 1165392c255..ff5de342507 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1890, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_30.FeasterOfSouls.IrgixTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_dread_maiden.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_dread_maiden.lua index 5867331bda1..9ca5ba11862 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/the_dread_maiden.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_dread_maiden.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1872, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_30.FeasterOfSouls.DreadMaidenTimer, } monster.health = 300000 diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua index d565971b988..058842c7089 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1873, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_30.FeasterOfSouls.FearFeasterTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua index 0f31a81a9fa..8f1258b6e70 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua @@ -32,7 +32,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1881, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_30.FeasterOfSouls.PaleWormTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua index d5562e91e59..383795d8bbe 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1868, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_30.FeasterOfSouls.UnwelcomeTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua b/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua index a624dbf4d49..3788bd28778 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1891, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_30.FeasterOfSouls.UnazTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua b/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua index 09845b6e7d7..b6790c3f47a 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1892, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_30.FeasterOfSouls.VokTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua index 8fb6ed42c03..0d1cb775768 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1204, bossRace = RARITY_NEMESIS, - storageCooldown = Storage.FerumbrasAscension.FerumbrasTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua index 7d521af7396..e412a2af7c3 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1186, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FerumbrasAscension.MazoranTimer, } monster.health = 290000 diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/plagirath.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/plagirath.lua index ae467cefc49..e0cb0b883ff 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/plagirath.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/plagirath.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1199, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FerumbrasAscension.PlagirathTimer, } monster.health = 290000 diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ragiaz.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ragiaz.lua index 640e3873a12..0f196297f4a 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ragiaz.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ragiaz.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1180, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FerumbrasAscension.RagiazTimer, } monster.health = 280000 diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/razzagorn.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/razzagorn.lua index fe8aa7b4f14..480df7868fa 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/razzagorn.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/razzagorn.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1177, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FerumbrasAscension.RazzagornTimer, } monster.health = 290000 diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/shulgrax.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/shulgrax.lua index 45f70607936..2ad81b631c7 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/shulgrax.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/shulgrax.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1191, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FerumbrasAscension.ShulgraxTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/tarbaz.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/tarbaz.lua index 5f9c67cad75..9b6bf3492f0 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/tarbaz.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/tarbaz.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1188, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FerumbrasAscension.TarbazTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh.lua index a3a2338c11a..00d02c7c38d 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1181, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FerumbrasAscension.ZamuloshTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua index 9bee32198a1..40452abcabe 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1315, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.ForgottenKnowledge.LadyTenebrisTimer, } monster.health = 150000 diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua index 1c1337760c6..4cb143dd933 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1329, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.ForgottenKnowledge.LloydTimer, } monster.health = 64000 diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/melting_frozen_horror.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/melting_frozen_horror.lua index 173ec3a2ee9..d856af4495c 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/melting_frozen_horror.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/melting_frozen_horror.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1336, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.ForgottenKnowledge.HorrorTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/soul_of_dragonking_zyrtarch.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/soul_of_dragonking_zyrtarch.lua index 620b62209bb..030838fa5d5 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/soul_of_dragonking_zyrtarch.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/soul_of_dragonking_zyrtarch.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1289, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.ForgottenKnowledge.DragonkingTimer, } monster.health = 150000 diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua index 024272fdd77..6e74ec8281e 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1297, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.ForgottenKnowledge.ThornKnightTimer, } monster.health = 90000 diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua index c000d59ed7f..893cade4723 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1304, bossRace = RARITY_NEMESIS, - storageCooldown = Storage.ForgottenKnowledge.LastLoreTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua index 7b744c6bf48..86d45d2d7ff 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1290, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.ForgottenKnowledge.TimeGuardianTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua index e24de657fd3..929bd2f90b6 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1753, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_20.GraveDanger.Bosses.CountVlarkorthTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua index 7a3feadae95..121f09f2d4b 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1758, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_20.GraveDanger.Bosses.DukeKruleTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua index 4f30a8a3d7c..ccc260d201e 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1757, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_20.GraveDanger.Bosses.EarlOsamTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua index a81b85883b2..7b3adde7c04 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua @@ -26,7 +26,6 @@ monster.speed = 212 monster.bosstiary = { bossRaceId = 1784, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_20.GraveDanger.Bosses.KingZelosTimer, } monster.changeTarget = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua index dad7408925d..8e47689c9e5 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1756, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_20.GraveDanger.Bosses.LordAzaramTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/scarlett_etzel.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/scarlett_etzel.lua index 85f2ae70661..589dced3c53 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/scarlett_etzel.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/scarlett_etzel.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1804, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.GraveDanger.CobraBastion.ScarlettTimer, } monster.health = 30000 diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua index fdafc56a40a..d9a43a7dc01 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1755, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_20.GraveDanger.Bosses.BaelocNictrosTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua index 0301152597b..8637363a949 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1754, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_20.GraveDanger.Bosses.BaelocNictrosTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua b/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua index 79a7f3b9e4a..0eb67d63fe6 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1219, bossRace = RARITY_ARCHFOE, - storageCooldown = 14321, } monster.health = 290000 diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua index c12f68ec282..e6d203eac47 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1226, bossRace = RARITY_ARCHFOE, - storageCooldown = 14329, } monster.health = 290000 diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua b/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua index 1509c1c52fa..936f58ad1c9 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1227, bossRace = RARITY_ARCHFOE, - storageCooldown = 14331, } monster.health = 290000 diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua b/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua index c42bf69f20b..afd0226424d 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua @@ -10,7 +10,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1218, bossRace = RARITY_ARCHFOE, - storageCooldown = 14325, } monster.health = 110000 diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua b/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua index ea0a6d69815..c49d49d5d30 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1225, bossRace = RARITY_ARCHFOE, - storageCooldown = 14323, } monster.health = 290000 diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua b/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua index 4908eab2d47..5718a22de83 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1228, bossRace = RARITY_NEMESIS, - storageCooldown = 14333, } monster.health = 25000 diff --git a/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua b/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua index 5a0e337bb3d..c73dd05ae33 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 2103, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Kilmaresh.AmenefTimer, } monster.health = 26000 diff --git a/data-otservbr-global/monster/quests/kilmaresh/neferi_the_spy.lua b/data-otservbr-global/monster/quests/kilmaresh/neferi_the_spy.lua index a2430394824..ef239381450 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/neferi_the_spy.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/neferi_the_spy.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 2105, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Kilmaresh.NeferiTheSpyTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/kilmaresh/sister_hetai.lua b/data-otservbr-global/monster/quests/kilmaresh/sister_hetai.lua index 2b98e991d08..ad8d02a229a 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/sister_hetai.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/sister_hetai.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 2104, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Kilmaresh.SisterHetaiTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_immaculate.lua b/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_immaculate.lua index 93b74a514b4..8f41b9c404b 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_immaculate.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_immaculate.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1811, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Kilmaresh.UrmahlulluTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_tamed.lua b/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_tamed.lua index d1db7e30d34..7f23a51812e 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_tamed.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_tamed.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1811, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Kilmaresh.UrmahlulluTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_weakened.lua b/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_weakened.lua index ce8d1e67c5d..96a8dd39081 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_weakened.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/urmahlullu_the_weakened.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1811, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Kilmaresh.UrmahlulluTimer, } monster.health = 100000 diff --git a/data-otservbr-global/monster/quests/kilmaresh/wildness_of_urmahlullu.lua b/data-otservbr-global/monster/quests/kilmaresh/wildness_of_urmahlullu.lua index b57a1313c07..2c0a89e07de 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/wildness_of_urmahlullu.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/wildness_of_urmahlullu.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1811, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Kilmaresh.UrmahlulluTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/kilmaresh/wisdom_of_urmahlullu.lua b/data-otservbr-global/monster/quests/kilmaresh/wisdom_of_urmahlullu.lua index 3197d889d34..cfbcb9a0aae 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/wisdom_of_urmahlullu.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/wisdom_of_urmahlullu.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1811, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Kilmaresh.UrmahlulluTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/marapur/timira_the_many-headed.lua b/data-otservbr-global/monster/quests/marapur/timira_the_many-headed.lua index 98d92eb4c00..1351dc4e303 100644 --- a/data-otservbr-global/monster/quests/marapur/timira_the_many-headed.lua +++ b/data-otservbr-global/monster/quests/marapur/timira_the_many-headed.lua @@ -12,7 +12,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 2250, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_90.WithinTheTides.TimiraTimer, } monster.health = 75000 diff --git a/data-otservbr-global/monster/quests/primal_ordeal_quest/magma_bubble.lua b/data-otservbr-global/monster/quests/primal_ordeal_quest/magma_bubble.lua index f5b0d4468d3..eb7d9a7aeff 100644 --- a/data-otservbr-global/monster/quests/primal_ordeal_quest/magma_bubble.lua +++ b/data-otservbr-global/monster/quests/primal_ordeal_quest/magma_bubble.lua @@ -20,7 +20,6 @@ monster.events = { monster.bosstiary = { bossRaceId = 2242, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_90.PrimalOrdeal.Bosses.MagmaBubbleTimer, } monster.health = 450000 diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua index b890e0ecc9a..502c11e7db8 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1902, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_40.SoulWar.GoshnarCrueltyTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua index b7ecd2eb170..834edccf59f 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1905, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_40.SoulWar.GoshnarGreedTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua index 6853c59685b..bd469d14266 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1904, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_40.SoulWar.GoshnarHatredTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua index 9bd8d57973e..ce6699ea39a 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_malice.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1901, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_40.SoulWar.GoshnarMaliceTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua index 2b43bc348d8..7487f4fda9a 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua @@ -27,7 +27,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1969, bossRace = RARITY_NEMESIS, - storageCooldown = Storage.Quest.U12_40.SoulWar.GoshnarMegalomaniaTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua index ba8ef48521a..f6180e7ff6d 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1903, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_40.SoulWar.GoshnarSpiteTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua b/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua index 27d333a29a4..3f676c6e9a5 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1559, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U10_80.Grimvale.BlackVixenTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua b/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua index fc8cede580a..7f8c4a86cf3 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1560, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U10_80.Grimvale.BloodbackTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/darkfang.lua b/data-otservbr-global/monster/quests/the_curse_spreads/darkfang.lua index 9e71fcccdd4..5506350848b 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/darkfang.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/darkfang.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1558, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U10_80.Grimvale.DarkfangTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/shadowpelt.lua b/data-otservbr-global/monster/quests/the_curse_spreads/shadowpelt.lua index 5a118bc6a54..2b195487dfd 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/shadowpelt.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/shadowpelt.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1561, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U10_80.Grimvale.ShadowpeltTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua b/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua index 96dbeaa2923..570f501efd1 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1562, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U10_80.Grimvale.SharpclawTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/faceless_bane.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/faceless_bane.lua index 62166d1c777..e4d8553c46a 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/faceless_bane.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/faceless_bane.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1727, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.Quest.U12_00.TheDreamCourts.FacelessBaneTime, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/the_first_dragon/bosses/gelidrazah_the_frozen.lua b/data-otservbr-global/monster/quests/the_first_dragon/bosses/gelidrazah_the_frozen.lua index 95280170ea2..2e22d6979a6 100644 --- a/data-otservbr-global/monster/quests/the_first_dragon/bosses/gelidrazah_the_frozen.lua +++ b/data-otservbr-global/monster/quests/the_first_dragon/bosses/gelidrazah_the_frozen.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1379, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FirstDragon.GelidrazahTimer, } monster.health = 10000 diff --git a/data-otservbr-global/monster/quests/the_first_dragon/bosses/kalyassa.lua b/data-otservbr-global/monster/quests/the_first_dragon/bosses/kalyassa.lua index 325943d41e7..281bc297478 100644 --- a/data-otservbr-global/monster/quests/the_first_dragon/bosses/kalyassa.lua +++ b/data-otservbr-global/monster/quests/the_first_dragon/bosses/kalyassa.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1389, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FirstDragon.KalyassaTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/the_first_dragon/bosses/tazhadur.lua b/data-otservbr-global/monster/quests/the_first_dragon/bosses/tazhadur.lua index 630e29a8045..9037e10fc64 100644 --- a/data-otservbr-global/monster/quests/the_first_dragon/bosses/tazhadur.lua +++ b/data-otservbr-global/monster/quests/the_first_dragon/bosses/tazhadur.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1390, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FirstDragon.TazhadurTimer, } monster.health = 10000 diff --git a/data-otservbr-global/monster/quests/the_first_dragon/bosses/zorvorax.lua b/data-otservbr-global/monster/quests/the_first_dragon/bosses/zorvorax.lua index 76129854014..14f946308ec 100644 --- a/data-otservbr-global/monster/quests/the_first_dragon/bosses/zorvorax.lua +++ b/data-otservbr-global/monster/quests/the_first_dragon/bosses/zorvorax.lua @@ -28,7 +28,6 @@ monster.changeTarget = { monster.bosstiary = { bossRaceId = 1375, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.FirstDragon.ZorvoraxTimer, } monster.strategiesTarget = { diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua index 9e948327bbb..646a665c4b4 100644 --- a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua +++ b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1957, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.TheOrderOfTheLion.Drume.Timer, } monster.health = 80000 diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_master_oberon.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_master_oberon.lua index aec3143fb58..dc5121d128a 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_master_oberon.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_master_oberon.lua @@ -16,7 +16,6 @@ monster.outfit = { monster.bosstiary = { bossRaceId = 1576, bossRace = RARITY_ARCHFOE, - storageCooldown = Storage.TheSecretLibrary.TheOrderOfTheFalcon.OberonTimer, } monster.health = 60000 diff --git a/data-otservbr-global/scripts/actions/farmine/oberon_lever.lua b/data-otservbr-global/scripts/actions/farmine/oberon_lever.lua index d9c0118307e..c45451965ca 100644 --- a/data-otservbr-global/scripts/actions/farmine/oberon_lever.lua +++ b/data-otservbr-global/scripts/actions/farmine/oberon_lever.lua @@ -22,7 +22,6 @@ local config = { { name = "Oberon's Ire", pos = Position(33367, 31320, 9) }, }, exit = Position(33364, 31341, 9), - storage = Storage.TheSecretLibrary.TheOrderOfTheFalcon.OberonTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/a_pirates_tail/ratmiral_lever.lua b/data-otservbr-global/scripts/actions/quests/a_pirates_tail/ratmiral_lever.lua index f010adb61ed..e7373574969 100644 --- a/data-otservbr-global/scripts/actions/quests/a_pirates_tail/ratmiral_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/a_pirates_tail/ratmiral_lever.lua @@ -16,7 +16,6 @@ local config = { to = Position(33920, 31376, 15), }, exit = Position(33891, 31197, 7), - storage = Storage.Quest.U12_60.APiratesTail.RatmiralTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/a_pirates_tail/tentugly_lever.lua b/data-otservbr-global/scripts/actions/quests/a_pirates_tail/tentugly_lever.lua index 8cc361168fb..25bec5e7462 100644 --- a/data-otservbr-global/scripts/actions/quests/a_pirates_tail/tentugly_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/a_pirates_tail/tentugly_lever.lua @@ -16,7 +16,6 @@ local config = { to = Position(33736, 31190, 7), }, exit = Position(33799, 31356, 7), - storage = Storage.Quest.U12_60.APiratesTail.TentuglyTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/megasylvan_yselda_lever.lua b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/megasylvan_yselda_lever.lua index e82d1d5f362..098630b3965 100644 --- a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/megasylvan_yselda_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/megasylvan_yselda_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(32633, 32509, 12), }, exit = Position(32580, 32480, 12), - storage = Storage.Quest.U12_70.AdventuresOfGalthen.MegasylvanYseldaTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/yselda_shortcut.lua b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/yselda_shortcut.lua index 0fdbcda9b09..55ccce306ad 100644 --- a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/yselda_shortcut.lua +++ b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/yselda_shortcut.lua @@ -9,7 +9,7 @@ function entranceYselda.onUse(creature, item, position, fromPosition) if not player then return false end - if player:getStorageValue(Storage.Quest.U12_70.AdventuresOfGalthen.MegasylvanYseldaTimer) < 0 then + if not player:canFightBoss("Megasylvan Yselda") then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This root seems to thicken and wreathe the moment you try to grab it.") player:teleportTo(fromPosition, true) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/bosses_levers.lua b/data-otservbr-global/scripts/actions/quests/cults_of_tibia/bosses_levers.lua index 529fa68dc26..7c974fb939b 100644 --- a/data-otservbr-global/scripts/actions/quests/cults_of_tibia/bosses_levers.lua +++ b/data-otservbr-global/scripts/actions/quests/cults_of_tibia/bosses_levers.lua @@ -183,7 +183,7 @@ function cultsOfTibiaLevers.onUse(player, item, fromPosition, itemEx, toPosition local newpos = Position(33138, i, 15) local nplayer = Tile(newpos):getTopCreature() if nplayer and nplayer:isPlayer() then - nplayer:setStorageValue(Storage.CultsOfTibia.Barkless.BossTimer, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + nplayer:setBossCooldown("Ravenous Hunger", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) nplayer:teleportTo(Position(33161, 31959, 15), true) nplayer:sendBosstiaryCooldownTimer() convertTable[#convertTable + 1] = nplayer:getId() @@ -230,7 +230,7 @@ function cultsOfTibiaLevers.onUse(player, item, fromPosition, itemEx, toPosition local newpos = Position(33162, i, 15) local nplayer = Tile(newpos):getTopCreature() if nplayer and nplayer:isPlayer() then - nplayer:setStorageValue(Storage.CultsOfTibia.Minotaurs.BossTimer, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + nplayer:setBossCooldown("The False God", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) nplayer:teleportTo(Position(33169, 31915, 15), true) convertTable[#convertTable + 1] = nplayer:getId() player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -279,7 +279,7 @@ function cultsOfTibiaLevers.onUse(player, item, fromPosition, itemEx, toPosition local newpos = Position(33095, i, 15) local nplayer = Tile(newpos):getTopCreature() if nplayer and nplayer:isPlayer() then - nplayer:setStorageValue(Storage.CultsOfTibia.Humans.BossTimer, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + nplayer:setBossCooldown("Essence of Malice", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) nplayer:teleportTo(Position(33098, 31921, 15), true) convertTable[#convertTable + 1] = nplayer:getId() player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -333,7 +333,7 @@ function cultsOfTibiaLevers.onUse(player, item, fromPosition, itemEx, toPosition local newpos = Position(33127, i, 15) local nplayer = Tile(newpos):getTopCreature() if nplayer and nplayer:isPlayer() then - nplayer:setStorageValue(Storage.CultsOfTibia.Misguided.BossTimer, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + nplayer:setBossCooldown("The Sinister Hermit", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) nplayer:teleportTo(Position(33130, 31919, 15), true) convertTable[#convertTable + 1] = nplayer:getId() player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -379,7 +379,7 @@ function cultsOfTibiaLevers.onUse(player, item, fromPosition, itemEx, toPosition local newpos = Position(33164, y, 15) local nplayer = Tile(newpos):getTopCreature() if nplayer and nplayer:isPlayer() then - nplayer:setStorageValue(Storage.CultsOfTibia.Orcs.BossTimer, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + nplayer:setBossCooldown("The Armored Voidborn", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) nplayer:teleportTo(Position(33137, 31867, 15), true) convertTable[#convertTable + 1] = nplayer:getId() player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -476,7 +476,7 @@ function cultsOfTibiaLevers.onUse(player, item, fromPosition, itemEx, toPosition local newpos = Position(33507, _y, 10) local nplayer = Tile(newpos):getTopCreature() if nplayer and nplayer:isPlayer() then - nplayer:setStorageValue(Storage.CultsOfTibia.Life.BossTimer, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + nplayer:setBossCooldown("The Sandking", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) nplayer:teleportTo(Position(33099, 31864, 15), true) convertTable[#convertTable + 1] = nplayer:getId() player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -518,7 +518,7 @@ function cultsOfTibiaLevers.onUse(player, item, fromPosition, itemEx, toPosition for _, pid in pairs(convertTable) do local nplayer = Player(pid) if nplayer then - nplayer:setStorageValue(Storage.CultsOfTibia.FinalBoss.BossTimer, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + nplayer:setBossCooldown("The Source Of Corruption", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) nplayer:teleportTo(Position(33039, 31925, 15), true) nplayer:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/dread_maiden_lever.lua b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/dread_maiden_lever.lua index 92ad5202162..db104351609 100644 --- a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/dread_maiden_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/dread_maiden_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33721, 31512, 14), }, exit = Position(33557, 31524, 10), - storage = Storage.Quest.U12_30.FeasterOfSouls.DreadMaidenTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/fear_feaster_lever.lua b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/fear_feaster_lever.lua index f671cb1e136..2640ad97d95 100644 --- a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/fear_feaster_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/fear_feaster_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33719, 31477, 14), }, exit = Position(33609, 31499, 10), - storage = Storage.Quest.U12_30.FeasterOfSouls.FearFeasterTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/pale_worm_lever.lua b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/pale_worm_lever.lua index 74b49470618..ec64dd43de2 100644 --- a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/pale_worm_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/pale_worm_lever.lua @@ -23,7 +23,6 @@ local config = { to = Position(33816, 31515, 14), }, exit = Position(33572, 31451, 10), - storage = Storage.Quest.U12_30.FeasterOfSouls.PaleWormTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_minis_feaster.lua b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_minis_feaster.lua index 477780a73f7..5e10645ee23 100644 --- a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_minis_feaster.lua +++ b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/portal_minis_feaster.lua @@ -12,7 +12,6 @@ local config = { to = Position(33474, 31408, 8), }, exitPosition = Position(33493, 31400, 8), - storage = Storage.Quest.U12_30.FeasterOfSouls.IrgixTimer, }, [2] = { teleportPosition = { x = 33566, y = 31475, z = 8 }, @@ -27,7 +26,6 @@ local config = { to = Position(33582, 31499, 8), }, exitPosition = Position(33563, 31477, 8), - storage = Storage.Quest.U12_30.FeasterOfSouls.UnazTimer, }, [3] = { teleportPosition = { x = 33509, y = 31450, z = 9 }, @@ -42,7 +40,6 @@ local config = { to = Position(33515, 31496, 9), }, exitPosition = Position(33509, 31451, 9), - storage = Storage.Quest.U12_30.FeasterOfSouls.VokTimer, }, [4] = { teleportPosition = { x = 33467, y = 31396, z = 8 }, @@ -87,7 +84,7 @@ function teleportBoss.onStepIn(creature, item, position, fromPosition) creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "All the players need to be level " .. value.requiredLevel .. " or higher.") return true end - if creature:getStorageValue(value.storage) > os.time() then + if creature:canFightBoss(value.bossName) then creature:teleportTo(fromPosition, true) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have to wait " .. value.timeToFightAgain .. " hours to face " .. value.bossName .. " again!") @@ -100,7 +97,7 @@ function teleportBoss.onStepIn(creature, item, position, fromPosition) end creature:teleportTo(value.destination) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - creature:setStorageValue(value.storage, os.time() + value.timeToFightAgain * 3600) + creature:setBossCooldown(value.bossName, os.time() + value.timeToFightAgain * 3600) creature:sendBosstiaryCooldownTimer() addEvent(function() spec:clearCreaturesCache() diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/unwelcome_lever.lua b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/unwelcome_lever.lua index 93c4e833b9e..dbcec1c9c93 100644 --- a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/unwelcome_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/unwelcome_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33719, 31546, 14), }, exit = Position(33611, 31528, 10), - storage = Storage.Quest.U12_30.FeasterOfSouls.UnwelcomeTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua index d6cf01f3d43..847a22b8440 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua @@ -50,7 +50,7 @@ function ferumbrasAscendantLever.onUse(player, item, fromPosition, target, toPos for y = 31477, 31481 do local playerTile = Tile(Position(x, y, 14)):getTopCreature() if playerTile and playerTile:isPlayer() then - if playerTile:getStorageValue(Storage.FerumbrasAscension.FerumbrasTimer) > os.time() then + if playerTile:canFightBoss("Ferumbras Mortal Shell") then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You or a member in your team have to wait 5 days to face Ferumbras again!") item:transform(8912) return true @@ -83,7 +83,7 @@ function ferumbrasAscendantLever.onUse(player, item, fromPosition, target, toPos playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) playerTile:teleportTo(config.newPos) playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setStorageValue(Storage.FerumbrasAscension.FerumbrasTimer, os.time() + 280 * 60 * 3600) -- 14 days + playerTile:setBossCooldown("Ferumbras Mortal Shell", os.time() + 280 * 60 * 3600) -- 14 days player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have 30 minutes to kill and loot this boss. Otherwise you will lose that chance and will be kicked out.") addEvent(clearFerumbrasRoom, 60 * config.time * 1000, player:getId(), config.centerRoom, config.range, config.range, config.exitPosition) diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/dragonking_lever.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/dragonking_lever.lua index 73c3347f3a2..6a8c4591aa3 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/dragonking_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/dragonking_lever.lua @@ -1,7 +1,7 @@ local config = { boss = { - name = "Dragonking Zyrtarch", - position = Position(33357, 31182, 10), + name = "soul of dragonking zyrtarch", + position = Position(33359, 31182, 12), }, playerPositions = { { pos = Position(33391, 31178, 10), teleport = Position(33359, 31186, 10) }, @@ -15,14 +15,13 @@ local config = { { name = "soulcatcher", pos = Position(33363, 31187, 10) }, { name = "soulcatcher", pos = Position(33353, 31176, 10) }, { name = "soulcatcher", pos = Position(33363, 31176, 10) }, - { name = "soul of dragonking zyrtarch", pos = Position(33359, 31182, 12) }, + { name = "dragonking zyrtarch", pos = Position(33357, 31182, 10) }, }, specPos = { from = Position(33348, 31172, 10), to = Position(33368, 31190, 12), }, exit = Position(33407, 31172, 10), - storage = Storage.ForgottenKnowledge.DragonkingTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/horror_lever.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/horror_lever.lua index 41fb01eec0e..c6803028ca5 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/horror_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/horror_lever.lua @@ -26,7 +26,6 @@ local config = { to = Position(32280, 31102, 14), }, exit = Position(32271, 31097, 14), - storage = Storage.ForgottenKnowledge.HorrorTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/last_lore_lever.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/last_lore_lever.lua index 42b893fb7eb..38116e880d0 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/last_lore_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/last_lore_lever.lua @@ -34,7 +34,6 @@ local config = { to = Position(32004, 32865, 15), }, exit = Position(32035, 32859, 14), - storage = Storage.ForgottenKnowledge.LastLoreTimer, } local forgottenKnowledgeLastLore = Action() @@ -89,7 +88,7 @@ function forgottenKnowledgeLastLore.onUse(player, item, fromPosition, target, to return true end lever:teleportPlayers() - lever:setStorageAllPlayers(config.storage, os.time() + config.timeToFightAgain * 3600) + lever:setCooldownAllPlayers(config.bossName, os.time() + config.timeToFightAgain * 3600) Game.setStorageValue(GlobalStorage.ForgottenKnowledge.AstralPowerCounter, 1) Game.setStorageValue(GlobalStorage.ForgottenKnowledge.AstralGlyph, 0) player:say("The Astral Glyph begins to draw upon bound astral power to expel you from the room!", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/lloyd_lever.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/lloyd_lever.lua index 3e880c37c91..5dda2d8937f 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/lloyd_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/lloyd_lever.lua @@ -21,7 +21,6 @@ local config = { to = Position(32812, 32838, 14), }, exit = Position(32815, 32873, 13), - storage = Storage.ForgottenKnowledge.LloydTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/tenebris_lever.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/tenebris_lever.lua index c30bc510ed5..e5ab381f8a4 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/tenebris_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/tenebris_lever.lua @@ -15,7 +15,6 @@ local config = { to = Position(32830, 32855, 14), }, exit = Position(32902, 31629, 14), - storage = Storage.ForgottenKnowledge.LadyTenebrisTimer, } local forgottenKnowledgeTenebris = Action() @@ -69,7 +68,7 @@ function forgottenKnowledgeTenebris.onUse(player, item, fromPosition, target, to return true end lever:teleportPlayers() - lever:setStorageAllPlayers(config.storage, os.time() + config.timeToFightAgain * 3600) + lever:setCooldownAllPlayers(config.bossName, os.time() + config.timeToFightAgain * 3600) addEvent(function() local old_players = lever:getInfoPositions() spec:clearCreaturesCache() diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/thorn_knight_lever.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/thorn_knight_lever.lua index 94b74225615..2a7811d3423 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/thorn_knight_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/thorn_knight_lever.lua @@ -15,7 +15,6 @@ local config = { to = Position(32636, 32892, 14), }, exit = Position(32678, 32888, 14), - storage = Storage.ForgottenKnowledge.ThornKnightTimer, } local forgottenKnowledgeThorn = Action() @@ -69,7 +68,7 @@ function forgottenKnowledgeThorn.onUse(player, item, fromPosition, target, toPos return true end lever:teleportPlayers() - lever:setStorageAllPlayers(config.storage, os.time() + config.timeToFightAgain * 3600) + lever:setCooldownAllPlayers(config.bossName, os.time() + config.timeToFightAgain * 3600) addEvent(function() local old_players = lever:getInfoPositions() spec:clearCreaturesCache() diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_guardian_lever.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_guardian_lever.lua index aa6871caae4..f4d42e52c45 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_guardian_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_guardian_lever.lua @@ -25,7 +25,6 @@ local config = { to = Position(32989, 31677, 14), }, exit = Position(32870, 32724, 14), - storage = Storage.ForgottenKnowledge.TimeGuardianTimer, } local forgottenKnowledgeGuardianLever = Action() @@ -79,7 +78,7 @@ function forgottenKnowledgeGuardianLever.onUse(player, item, fromPosition, targe end end lever:teleportPlayers() - lever:setStorageAllPlayers(config.storage, os.time() + config.timeToFightAgain * 3600) + lever:setCooldownAllPlayers(config.bossName, os.time() + config.timeToFightAgain * 3600) addEvent(function() local old_players = lever:getInfoPositions() spec:clearCreaturesCache() diff --git a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_machine.lua b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_machine.lua index caa9393f974..b37d681bce9 100644 --- a/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_machine.lua +++ b/data-otservbr-global/scripts/actions/quests/forgotten_knowledge/time_machine.lua @@ -8,7 +8,7 @@ function forgottenKnowledgeMachine.onUse(player, item, fromPosition, target, toP end if player:getPosition() == Position(32870, 32723, 14) then - if player:getStorageValue(Storage.ForgottenKnowledge.TimeGuardianTimer) < os.time() then + if player:canFightBoss("The Time Guardian") then player:teleportTo(Position(32870, 32724, 15)) player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The mechanism takes you back in time.") diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/baeloc_nictros_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/baeloc_nictros_lever.lua index f0fb95a2449..30b5cff1409 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/baeloc_nictros_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/baeloc_nictros_lever.lua @@ -32,7 +32,6 @@ local config = { end, 5 * 1000) end, exit = Position(33290, 32474, 9), - storage = Storage.Quest.U12_20.GraveDanger.Bosses.BaelocNictrosTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/cobra_bastion/scarlett.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/cobra_bastion/scarlett.lua index 48498baa2fc..dea665f82d2 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/cobra_bastion/scarlett.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/cobra_bastion/scarlett.lua @@ -4,7 +4,6 @@ local info = { fromPos = Position(33385, 32638, 6), toPos = Position(33406, 32660, 6), exitPos = Position(33395, 32670, 6), - timer = Storage.GraveDanger.CobraBastion.ScarlettTimer, armorId = 31482, armorPos = Position(33398, 32640, 6), } @@ -40,7 +39,7 @@ function graveScarlettUid.onUse(player, item, fromPosition, target, toPosition, if sqm and sqm:getGround():getId() == 18013 then local player_ = sqm:getTopCreature() if player_ and player_:isPlayer() then - if player_:getStorageValue(info.timer) > os.time() then + if not player_:canFightBoss(info.bossName) then player_:getPosition():sendMagicEffect(CONST_ME_POFF) player_:sendCancelMessage("You are still exhausted from your last battle.") return true @@ -54,8 +53,7 @@ function graveScarlettUid.onUse(player, item, fromPosition, target, toPosition, local nPlayer = Player(p) if nPlayer then nPlayer:teleportTo(Position(33395, 32656, 6)) - nPlayer:setStorageValue(info.timer, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) - nPlayer:sendBosstiaryCooldownTimer() + nPlayer:setBossCooldown(info.bossName, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) end end local scarlett = Game.createMonster("Scarlett Etzel", Position(33396, 32640, 6)) diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/count_vlarkorth_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/count_vlarkorth_lever.lua index abb01c5050f..ea83f2419a7 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/count_vlarkorth_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/count_vlarkorth_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33464, 31446, 13), }, exit = Position(33195, 31690, 8), - storage = Storage.Quest.U12_20.GraveDanger.Bosses.CountVlarkorthTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/duke_krule_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/duke_krule_lever.lua index c6728bbc37b..2ab2dc6d573 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/duke_krule_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/duke_krule_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33464, 31481, 13), }, exit = Position(32347, 32167, 12), - storage = Storage.Quest.U12_20.GraveDanger.Bosses.DukeKruleTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/earl_osam_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/earl_osam_lever.lua index 797ecec26e8..db3da443500 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/earl_osam_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/earl_osam_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33497, 31446, 13), }, exit = Position(33261, 31986, 8), - storage = Storage.Quest.U12_20.GraveDanger.Bosses.EarlOsamTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/king_zelos_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/king_zelos_lever.lua index 437b225fc45..fe58b304f17 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/king_zelos_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/king_zelos_lever.lua @@ -22,7 +22,6 @@ local config = { to = Position(33453, 31555, 13), }, exit = Position(32172, 31918, 8), - storage = Storage.Quest.U12_20.GraveDanger.Bosses.KingZelosTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/lord_azaram_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/lord_azaram_lever.lua index fb9e8af9bb0..8baeee2a471 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/lord_azaram_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/lord_azaram_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33432, 31481, 13), }, exit = Position(32192, 31819, 8), - storage = Storage.Quest.U12_20.GraveDanger.Bosses.LordAzaramTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_ancient_feud.lua b/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_ancient_feud.lua index 928e0eab1fc..b6db96cced6 100644 --- a/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_ancient_feud.lua +++ b/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_ancient_feud.lua @@ -12,7 +12,6 @@ local config = { to = Position(33164, 32260, 12), }, exitPosition = Position(33123, 32240, 12), - storage = Storage.Quest.U10_80.Grimvale.YirkasTimer, }, [2] = { teleportPosition = { x = 33131, y = 32252, z = 12 }, @@ -27,7 +26,6 @@ local config = { to = Position(33127, 32290, 12), }, exitPosition = Position(33130, 32252, 12), - storage = Storage.Quest.U10_80.Grimvale.SrezzTimer, }, [3] = { teleportPosition = { x = 33123, y = 32265, z = 12 }, @@ -42,7 +40,6 @@ local config = { to = Position(33091, 32252, 12), }, exitPosition = Position(33123, 32264, 12), - storage = Storage.Quest.U10_80.Grimvale.UtuaTimer, }, [4] = { teleportPosition = { x = 33114, y = 32252, z = 12 }, @@ -57,7 +54,6 @@ local config = { to = Position(33159, 32293, 12), }, exitPosition = Position(33115, 32252, 12), - storage = Storage.Quest.U10_80.Grimvale.KatexTimer, }, [5] = { teleportPosition = { x = 33154, y = 32245, z = 12 }, @@ -106,7 +102,7 @@ function teleportBoss.onStepIn(creature, item, position, fromPosition) creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "All the players need to be level " .. value.requiredLevel .. " or higher.") return true end - if creature:getStorageValue(value.storage) > os.time() then + if not creature:canFightBoss(value.bossName) then creature:teleportTo(fromPosition, true) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have to wait " .. value.timeToFightAgain .. " hours to face " .. value.bossName .. " again!") @@ -119,7 +115,7 @@ function teleportBoss.onStepIn(creature, item, position, fromPosition) end creature:teleportTo(value.destination) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - creature:setStorageValue(value.storage, os.time() + value.timeToFightAgain * 3600) + creature:setBossCooldown(value.bossName, os.time() + value.timeToFightAgain * 3600) addEvent(function() spec:clearCreaturesCache() spec:setOnlyPlayer(true) diff --git a/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_grimvale.lua b/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_grimvale.lua index 09c464fc7f6..1dc3a60d321 100644 --- a/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_grimvale.lua +++ b/data-otservbr-global/scripts/actions/quests/grimvale/portal_minis_grimvale.lua @@ -11,7 +11,6 @@ local config = { to = Position(33191, 32020, 8), }, exitPosition = Position(33167, 31978, 8), - storage = Storage.Quest.U10_80.Grimvale.BloodbackTimer, }, [2] = { teleportPosition = { x = 33055, y = 31910, z = 9 }, @@ -25,7 +24,6 @@ local config = { to = Position(33066, 31896, 9), }, exitPosition = Position(33055, 31911, 9), - storage = Storage.Quest.U10_80.Grimvale.DarkfangTimer, }, [3] = { teleportPosition = { x = 33128, y = 31971, z = 9 }, @@ -39,7 +37,6 @@ local config = { to = Position(33126, 32007, 9), }, exitPosition = Position(33128, 31972, 9), - storage = Storage.Quest.U10_80.Grimvale.SharpclawTimer, }, [4] = { teleportPosition = { x = 33402, y = 32097, z = 9 }, @@ -53,7 +50,6 @@ local config = { to = Position(33396, 32119, 9), }, exitPosition = Position(33403, 32097, 9), - storage = Storage.Quest.U10_80.Grimvale.ShadowpeltTimer, }, [5] = { teleportPosition = { x = 33442, y = 32051, z = 9 }, @@ -67,7 +63,6 @@ local config = { to = Position(33456, 32041, 9), }, exitPosition = Position(33442, 32052, 9), - storage = Storage.Quest.U10_80.Grimvale.BlackVixenTimer, }, [6] = { teleportPosition = { x = 33180, y = 32011, z = 8 }, @@ -114,7 +109,7 @@ function teleportBoss.onStepIn(creature, item, position, fromPosition) creature:say("There's someone fighting with " .. value.bossName .. ".", TALKTYPE_MONSTER_SAY) return true end - if creature:getStorageValue(value.storage) > os.time() then + if not creature:canFightBoss(value.bossName) then creature:teleportTo(fromPosition, true) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have to wait " .. value.timeToFightAgain .. " hours to face " .. value.bossName .. " again!") @@ -127,7 +122,7 @@ function teleportBoss.onStepIn(creature, item, position, fromPosition) end creature:teleportTo(value.destination) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - creature:setStorageValue(value.storage, os.time() + value.timeToFightAgain * 3600) + creature:setBossCooldown(value.bossName, os.time() + value.timeToFightAgain * 3600) creature:sendBosstiaryCooldownTimer() addEvent(function() spec:clearCreaturesCache() diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/anomaly_lever.lua b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/anomaly_lever.lua index 9303f047e45..e99e126c824 100644 --- a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/anomaly_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/anomaly_lever.lua @@ -94,7 +94,7 @@ function heartDestructionAnomaly.onUse(player, item, fromPosition, itemEx, toPos players = storePlayers[i] config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPos) - players:setStorageValue(14321, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + players:setBossCooldown("Anomaly", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) end Position(config.newPos):sendMagicEffect(11) diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/devourer_access.lua b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/devourer_access.lua index a0236f99371..c88653b0497 100644 --- a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/devourer_access.lua +++ b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/devourer_access.lua @@ -1,7 +1,7 @@ local heartDestructionDevourer = Action() function heartDestructionDevourer.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(14333) > os.time() then - player:setStorageValue(14333, -1) + if not player:canFightBoss("World Devourer") then + player:setBossCooldown("World Devourer", 0) player:sendTextMessage(19, "You access to World Devourer was released!") item:transform(23687) else diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/eradicator_lever.lua b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/eradicator_lever.lua index ad58dd844bc..371aeeab005 100644 --- a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/eradicator_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/eradicator_lever.lua @@ -96,7 +96,7 @@ function heartDestructionEradicator.onUse(player, item, fromPosition, itemEx, to players = storePlayers[i] config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPos) - players:setStorageValue(14329, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + players:setBossCooldown("Eradicator", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) end Position(config.newPos):sendMagicEffect(11) diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/final_lever.lua b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/final_lever.lua index 54db829d311..fe1d83724f1 100644 --- a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/final_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/final_lever.lua @@ -418,7 +418,7 @@ function heartDestructionFinal.onUse(player, item, fromPosition, itemEx, toPosit teamHunger = storeHunger[i] config.hungerPositions[i]:sendMagicEffect(CONST_ME_POFF) teamHunger:teleportTo(config.hungerNewPos) - teamHunger:setStorageValue(14333, os.time() + 7 * 24 * 60 * 60) + teamHunger:setBossCooldown("World Devourer", os.time() + 7 * 24 * 60 * 60) teamHunger:setStorageValue(14334, 1) --storage Hunger teamHunger:registerEvent("DevourerStorage") end @@ -427,7 +427,7 @@ function heartDestructionFinal.onUse(player, item, fromPosition, itemEx, toPosit teamDestruction = storeDestruction[i] config.destructionPositions[i]:sendMagicEffect(CONST_ME_POFF) teamDestruction:teleportTo(config.destructionNewPos) - teamDestruction:setStorageValue(14333, os.time() + 7 * 24 * 60 * 60) + teamDestruction:setBossCooldown("World Devourer", os.time() + 7 * 24 * 60 * 60) teamDestruction:setStorageValue(14335, 1) --storage Destruction teamDestruction:registerEvent("DevourerStorage") end @@ -436,7 +436,7 @@ function heartDestructionFinal.onUse(player, item, fromPosition, itemEx, toPosit teamRage = storeRage[i] config.ragePositions[i]:sendMagicEffect(CONST_ME_POFF) teamRage:teleportTo(config.rageNewPos) - teamRage:setStorageValue(14333, os.time() + 7 * 24 * 60 * 60) + teamRage:setBossCooldown("World Devourer", os.time() + 7 * 24 * 60 * 60) teamRage:setStorageValue(14336, 1) --storage Rage teamRage:registerEvent("DevourerStorage") end diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/outburst_lever.lua b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/outburst_lever.lua index 83825a9250f..c1838f42fc4 100644 --- a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/outburst_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/outburst_lever.lua @@ -93,12 +93,12 @@ function heartDestructionOutburst.onUse(player, item, fromPosition, itemEx, toPo for i = 1, #storePlayers do players = storePlayers[i] - if players:getStorageValue(14331) >= os.time() then + if not player:canFightBoss("Outburst") then return players:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need wait to fight again") end config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPos) - players:setStorageValue(14331, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + players:setBossCooldown("Outburst", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) end Position(config.newPos):sendMagicEffect(11) diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/quake_lever.lua b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/quake_lever.lua index 12e5d1260fc..2bce5d64ebb 100644 --- a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/quake_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/quake_lever.lua @@ -95,7 +95,7 @@ function heartDestructionQuake.onUse(player, item, fromPosition, itemEx, toPosit players = storePlayers[i] config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPos) - players:setStorageValue(14325, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + players:setBossCooldown("Realityquake", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) end Position(config.newPos):sendMagicEffect(11) diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/rupture_lever.lua b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/rupture_lever.lua index ea6a6052d66..3c335c70716 100644 --- a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/rupture_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/rupture_lever.lua @@ -94,7 +94,7 @@ function heartDestructionRupture.onUse(player, item, fromPosition, itemEx, toPos players = storePlayers[i] config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPos) - players:setStorageValue(14323, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + players:setBossCooldown("Rupture", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) end Position(config.newPos):sendMagicEffect(11) diff --git a/data-otservbr-global/scripts/actions/quests/kilmaresh/portal_minis_kilmaresh.lua b/data-otservbr-global/scripts/actions/quests/kilmaresh/portal_minis_kilmaresh.lua index 3caf3a55080..bb334e678d1 100644 --- a/data-otservbr-global/scripts/actions/quests/kilmaresh/portal_minis_kilmaresh.lua +++ b/data-otservbr-global/scripts/actions/quests/kilmaresh/portal_minis_kilmaresh.lua @@ -12,7 +12,6 @@ local config = { to = Position(33876, 31555, 8), }, exitPosition = Position(33886, 31478, 6), - storage = Storage.Kilmaresh.NeferiTheSpyTimer, }, [2] = { teleportPosition = { x = 33883, y = 31467, z = 9 }, @@ -27,7 +26,6 @@ local config = { to = Position(33837, 31501, 9), }, exitPosition = Position(33883, 31468, 9), - storage = Storage.Kilmaresh.SisterHetaiTimer, }, [3] = { teleportPosition = { x = 33819, y = 31773, z = 10 }, @@ -42,7 +40,6 @@ local config = { to = Position(33855, 31791, 10), }, exitPosition = Position(33819, 31774, 10), - storage = Storage.Kilmaresh.AmenefTimer, }, [4] = { teleportPosition = { x = 33871, y = 31546, z = 8 }, @@ -87,7 +84,7 @@ function teleportBoss.onStepIn(creature, item, position, fromPosition) creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "All the players need to be level " .. value.requiredLevel .. " or higher.") return true end - if creature:getStorageValue(value.storage) > os.time() then + if creature:canFightBoss(value.bossName) then creature:teleportTo(fromPosition, true) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have to wait " .. value.timeToFightAgain .. " hours to face " .. value.bossName .. " again!") @@ -100,7 +97,7 @@ function teleportBoss.onStepIn(creature, item, position, fromPosition) end creature:teleportTo(value.destination) creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - creature:setStorageValue(value.storage, os.time() + value.timeToFightAgain * 3600) + creature:setBossCooldown(value.bossName, os.time() + value.timeToFightAgain * 3600) addEvent(function() spec:clearCreaturesCache() spec:setOnlyPlayer(true) diff --git a/data-otservbr-global/scripts/actions/quests/marapur/boss_lever_timira.lua b/data-otservbr-global/scripts/actions/quests/marapur/boss_lever_timira.lua index 7b146fcf444..3f9bf934ebf 100644 --- a/data-otservbr-global/scripts/actions/quests/marapur/boss_lever_timira.lua +++ b/data-otservbr-global/scripts/actions/quests/marapur/boss_lever_timira.lua @@ -16,7 +16,6 @@ local config = { to = Position(33828, 32715, 9), }, exit = Position(33810, 32699, 8), - storage = Storage.Quest.U12_90.WithinTheTides.TimiraTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_cruelty_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_cruelty_lever.lua index fd7785337bb..ff8ebbadec6 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_cruelty_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_cruelty_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33864, 31874, 7), }, exit = Position(33621, 31427, 10), - storage = Storage.Quest.U12_40.SoulWar.GoshnarCrueltyTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_greed_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_greed_lever.lua index 2339d26164d..9283f09c06a 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_greed_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_greed_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33755, 31673, 14), }, exit = Position(33621, 31427, 10), - storage = Storage.Quest.U12_40.SoulWar.GoshnarGreedTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_hatred_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_hatred_lever.lua index b563222ed99..6364779657f 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_hatred_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_hatred_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33751, 31606, 14), }, exit = Position(33621, 31427, 10), - storage = Storage.Quest.U12_40.SoulWar.GoshnarHatredTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_malice_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_malice_lever.lua index b2506093328..5b0644bd35a 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_malice_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_malice_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33718, 31607, 14), }, exit = Position(33621, 31427, 10), - storage = Storage.Quest.U12_40.SoulWar.GoshnarMaliceTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_megalomania_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_megalomania_lever.lua index 9010dc88f27..c45d2bfdc33 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_megalomania_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_megalomania_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33719, 31642, 14), }, exit = Position(33621, 31427, 10), - storage = Storage.Quest.U12_40.SoulWar.GoshnarMegalomaniaTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_spite_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_spite_lever.lua index 271e132e30f..d7687077daf 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_spite_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_spite_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33751, 31640, 14), }, exit = Position(33621, 31427, 10), - storage = Storage.Quest.U12_40.SoulWar.GoshnarSpiteTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/the_dream_courts/dream_courts_lever.lua b/data-otservbr-global/scripts/actions/quests/the_dream_courts/dream_courts_lever.lua index 4386e18b3e3..b336b0a380c 100644 --- a/data-otservbr-global/scripts/actions/quests/the_dream_courts/dream_courts_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/the_dream_courts/dream_courts_lever.lua @@ -24,7 +24,6 @@ local config = { to = Position(32229, 32055, 14), }, exit = Position(32210, 32035, 13), - storage = Storage.Quest.U12_00.TheDreamCourts.ArenaTimer, } local dreamCourtsLever = Action() @@ -74,7 +73,7 @@ function dreamCourtsLever.onUse(player, item, fromPosition, target, toPosition, return true end lever:teleportPlayers() - lever:setStorageAllPlayers(config.storage, os.time() + config.timeToFightAgain * 3600) + lever:setCooldownAllPlayers(config.bossName, os.time() + config.timeToFightAgain * 3600) addEvent(function() local old_players = lever:getInfoPositions() spec:clearCreaturesCache() diff --git a/data-otservbr-global/scripts/actions/quests/the_dream_courts/lever.lua b/data-otservbr-global/scripts/actions/quests/the_dream_courts/lever.lua index 7a05976ffee..606b2b30b04 100644 --- a/data-otservbr-global/scripts/actions/quests/the_dream_courts/lever.lua +++ b/data-otservbr-global/scripts/actions/quests/the_dream_courts/lever.lua @@ -18,7 +18,6 @@ local config = { to = Position(33627, 32570, 13), }, exit = Position(33618, 32523, 15), - storage = Storage.Quest.U12_00.TheDreamCourts.FacelessBaneTime, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/too_hot_to_handle/the_brainstealer_lever.lua b/data-otservbr-global/scripts/actions/quests/too_hot_to_handle/the_brainstealer_lever.lua index 09410fa6341..7b14d2a14fb 100644 --- a/data-otservbr-global/scripts/actions/quests/too_hot_to_handle/the_brainstealer_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/too_hot_to_handle/the_brainstealer_lever.lua @@ -16,7 +16,6 @@ local config = { to = Position(32506, 31132, 15), }, exit = Position(32536, 31122, 15), - storage = Storage.Quest.U12_70.TooHotToHandle.BrainstealerTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index e1f28ed9b42..ec9d9ab4800 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -75,7 +75,6 @@ local questTable = { { storage = Storage.CultsOfTibia.Barkless.Ice, storageValue = 3 }, { storage = Storage.CultsOfTibia.Barkless.Objects, storageValue = 1 }, { storage = Storage.CultsOfTibia.Barkless.Temp, storageValue = 1 }, - { storage = Storage.CultsOfTibia.Barkless.BossTimer, storageValue = 1 }, { storage = Storage.CultsOfTibia.Orcs.Mission, storageValue = 1 }, { storage = Storage.CultsOfTibia.Orcs.lookType, storageValue = 1 }, { storage = Storage.CultsOfTibia.Orcs.bossTimer, storageValue = 1 }, @@ -275,6 +274,7 @@ local questTable = { { storage = Storage.DangerousDepths.Scouts.Diremaw, storageValue = 2 }, { storage = Storage.Quest.U11_40.ThreatenedDreams.QuestLine, storageValue = 1 }, { storage = Storage.Quest.U11_40.ThreatenedDreams.Mission01[1], storageValue = 16 }, + { storage = Storage.Quest.U11_40.ThreatenedDreams.Mission02.KroazurAccess, storageValue = 1 }, { storage = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, storageValue = 1 }, { storage = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, storageValue = 2 }, { storage = Storage.Quest.U10_55.Dawnport.Questline, storageValue = 1 }, diff --git a/data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/boss_room_kick.lua b/data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/boss_room_kick.lua index 411b4d9edfc..28bc3916e30 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/boss_room_kick.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/bigfoot_burden/boss_room_kick.lua @@ -8,7 +8,7 @@ function bossWarzoneDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekil local spectators = Game.getSpectators(info.center, false, true, info.minRangeX, info.maxRangeX, info.minRangeY, info.maxRangeY) for i = 1, #spectators do - spectators[i]:setStorageValue(info.storage, os.time() + info.interval) + spectators[i]:setBossCooldown(info.boss, os.time() + info.interval) spectators[i]:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have one minute to loot the boss and leave the room.") end addEvent(warzoneConfig.resetRoom, 60 * 1000, info, "You were teleported out by the gnomish emergency device.", false) diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua index 4d1960f55b9..b0a2f27aba5 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua @@ -1,13 +1,13 @@ local bosses = { ["the lord of the lice"] = { teleportPos = Position(33226, 31478, 12), godbreakerPos = Position(33237, 31477, 13) }, - ["tarbaz"] = { teleportPos = Position(33460, 32853, 11), godbreakerPos = Position(33427, 32852, 13), timer = Storage.FerumbrasAscension.TarbazTimer }, - ["ragiaz"] = { teleportPos = Position(33482, 32345, 13), godbreakerPos = Position(33466, 32392, 13), timer = Storage.FerumbrasAscension.RagiazTimer }, - ["plagirath"] = { teleportPos = Position(33174, 31511, 13), godbreakerPos = Position(33204, 31510, 13), timer = Storage.FerumbrasAscension.PlagirathTimer }, - ["razzagorn"] = { teleportPos = Position(33413, 32467, 14), godbreakerPos = Position(33357, 32440, 13), timer = Storage.FerumbrasAscension.RazzagornTimer }, - ["zamulosh"] = { teleportPos = Position(33644, 32764, 11), godbreakerPos = Position(33678, 32758, 13), timer = Storage.FerumbrasAscension.ZamuloshTimer }, - ["mazoran"] = { teleportPos = Position(33585, 32699, 14), godbreakerPos = Position(33614, 32679, 15), timer = Storage.FerumbrasAscension.MazoranTimer }, - ["shulgrax"] = { teleportPos = Position(33486, 32796, 13), godbreakerPos = Position(33459, 32820, 14), timer = Storage.FerumbrasAscension.ShulgraxTimer }, - ["ferumbras mortal shell"] = { teleportPos = Position(33392, 31485, 14), godbreakerPos = Position(33388, 31414, 14), timer = Storage.FerumbrasAscension.FerumbrasTimer }, + ["tarbaz"] = { teleportPos = Position(33460, 32853, 11), godbreakerPos = Position(33427, 32852, 13) }, + ["ragiaz"] = { teleportPos = Position(33482, 32345, 13), godbreakerPos = Position(33466, 32392, 13) }, + ["plagirath"] = { teleportPos = Position(33174, 31511, 13), godbreakerPos = Position(33204, 31510, 13) }, + ["razzagorn"] = { teleportPos = Position(33413, 32467, 14), godbreakerPos = Position(33357, 32440, 13) }, + ["zamulosh"] = { teleportPos = Position(33644, 32764, 11), godbreakerPos = Position(33678, 32758, 13) }, + ["mazoran"] = { teleportPos = Position(33585, 32699, 14), godbreakerPos = Position(33614, 32679, 15) }, + ["shulgrax"] = { teleportPos = Position(33486, 32796, 13), godbreakerPos = Position(33459, 32820, 14) }, + ["ferumbras mortal shell"] = { teleportPos = Position(33392, 31485, 14), godbreakerPos = Position(33388, 31414, 14) }, } local crystals = { @@ -56,9 +56,7 @@ function ascendantBossesKill.onKill(creature, target) local attackerPlayer = Player(player) if attackerPlayer then if targetMonster:getName():lower() == "ferumbras mortal shell" then - if bossConfig.timer then - attackerPlayer:setStorageValue(bossConfig.timer, os.time() + 60 * 60 * 14 * 24) - end + attackerPlayer:setBossCooldown(targetMonster:getName(), os.time() + 60 * 60 * 14 * 24) elseif targetMonster:getName():lower() == "the lord of the lice" then attackerPlayer:setStorageValue(Storage.FerumbrasAscension.TheLordOfTheLiceAccess, 1) end diff --git a/data-otservbr-global/scripts/lib/register_monster_type.lua b/data-otservbr-global/scripts/lib/register_monster_type.lua index 609a4079e59..6fbf56f8269 100644 --- a/data-otservbr-global/scripts/lib/register_monster_type.lua +++ b/data-otservbr-global/scripts/lib/register_monster_type.lua @@ -92,12 +92,6 @@ registerMonsterType.bosstiary = function(mtype, mask) Spdlog.error(string.format("Attempting to register a bosstiary boss without a raceId. Boss name: %s", mtype:name())) end mtype:bossRace(mask.bosstiary.bossRace, bossClass) - local storage = mask.bosstiary.storageCooldown - if storage == nil then - logger.debug("[registerMonsterType.bosstiary] - Monster: {} has no cooldown defined.", mtype:name()) - elseif storage ~= false then - mtype:bossStorageCooldown(storage) - end end end registerMonsterType.skull = function(mtype, mask) diff --git a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/warzone_boss.lua b/data-otservbr-global/scripts/movements/quests/bigfoot_burden/warzone_boss.lua index 06ef06a5630..2245baa8724 100644 --- a/data-otservbr-global/scripts/movements/quests/bigfoot_burden/warzone_boss.lua +++ b/data-otservbr-global/scripts/movements/quests/bigfoot_burden/warzone_boss.lua @@ -28,7 +28,7 @@ function warzoneBoss.onStepIn(creature, item, pos, fromPosition) return false end - if creature:getStorageValue(warzone.storage) > os.time() then + if not creature:canFightBoss(warzone.boss) then creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have already cleared this warzone in the last 20 hours.") creature:teleportTo(fromPosition) return false diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/boss_timer.lua b/data-otservbr-global/scripts/movements/quests/cults_of_tibia/boss_timer.lua index 2a1b7be1453..9b03b83d74e 100644 --- a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/boss_timer.lua +++ b/data-otservbr-global/scripts/movements/quests/cults_of_tibia/boss_timer.lua @@ -2,32 +2,32 @@ local setting = { { tpPos = { x = 33176, y = 31894, z = 15 }, tpDestination = { x = 33166, y = 31894, z = 15 }, - storage = Storage.CultsOfTibia.Minotaurs.BossTimer, + boss = "The False God", }, { tpPos = { x = 33125, y = 31950, z = 15 }, tpDestination = { x = 33136, y = 31948, z = 15 }, - storage = Storage.CultsOfTibia.Barkless.BossTimer, + boss = "Ravenous Hunger", }, { tpPos = { x = 33096, y = 31963, z = 15 }, tpDestination = { x = 33095, y = 31953, z = 15 }, - storage = Storage.CultsOfTibia.Humans.BossTimer, + boss = "Essence of Malice", }, { tpPos = { x = 33114, y = 31887, z = 15 }, tpDestination = { x = 33131, y = 31899, z = 15 }, - storage = Storage.CultsOfTibia.Misguided.BossTimer, + boss = "The Sinister Hermit", }, { tpPos = { x = 33072, y = 31871, z = 15 }, tpDestination = { x = 33078, y = 31889, z = 15 }, - storage = Storage.CultsOfTibia.FinalBoss.BossTimer, + boss = "The Source Of Corruption", }, { tpPos = { x = 33178, y = 31845, z = 15 }, tpDestination = { x = 33164, y = 31866, z = 15 }, - storage = Storage.CultsOfTibia.Orcs.BossTimer, + boss = "The Armored Voidborn", }, } @@ -40,7 +40,7 @@ function bossTimer.onStepIn(creature, item, position, fromPosition) end for b = 1, #setting do if player:getPosition() == Position(setting[b].tpPos) then - if player:getStorageValue(setting[b].storage) > os.time() then + if not player:canFightBoss(setting[b].storage) > os.time() then player:sendCancelMessage("You need to wait for 20 hours to face this boss again.") player:teleportTo(fromPosition) return false diff --git a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/river_teleport.lua b/data-otservbr-global/scripts/movements/quests/cults_of_tibia/river_teleport.lua index a1f3a99c700..a6a7c3f92b8 100644 --- a/data-otservbr-global/scripts/movements/quests/cults_of_tibia/river_teleport.lua +++ b/data-otservbr-global/scripts/movements/quests/cults_of_tibia/river_teleport.lua @@ -6,8 +6,8 @@ function riverTeleport.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(player:getStorageValue(Storage.CultsOfTibia.Life.BossTimer)) > os.time() then - player:sendCancelMessage("You need to wait for 20 hours to face this boss again.") + if not player:canFightBoss("The Sandking") then + player:sendCancelMessage("You need to wait for 10 hours to face this boss again.") player:teleportTo(fromPosition) return false end diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua b/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua index 2b1322d8815..1d7d88a9d0c 100644 --- a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua +++ b/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua @@ -2,42 +2,42 @@ local config = { [24839] = { toPosition = Position(33419, 32841, 11), backPosition = Position(33484, 32775, 12), - timer = Storage.FerumbrasAscension.TarbazTimer, + boss = "Tarbaz", }, [24840] = { toPosition = Position(33452, 32356, 13), backPosition = Position(33432, 32330, 14), - timer = Storage.FerumbrasAscension.RagiazTimer, + boss = "Ragiaz", }, [24841] = { toPosition = Position(33230, 31493, 13), backPosition = Position(33197, 31438, 13), - timer = Storage.FerumbrasAscension.PlagirathTimer, + boss = "Plagirath", }, [24842] = { toPosition = Position(33380, 32454, 14), backPosition = Position(33399, 32402, 15), - timer = Storage.FerumbrasAscension.RazzagornTimer, + boss = "Razzagorn", }, [24843] = { toPosition = Position(33680, 32736, 11), backPosition = Position(33664, 32682, 10), - timer = Storage.FerumbrasAscension.ZamuloshTimer, + boss = "Zamulosh", }, [24844] = { toPosition = Position(33593, 32658, 14), backPosition = Position(33675, 32690, 13), - timer = Storage.FerumbrasAscension.MazoranTimer, + boss = "Mazoran", }, [24845] = { toPosition = Position(33436, 32800, 13), backPosition = Position(33477, 32701, 14), - timer = Storage.FerumbrasAscension.ShulgraxTimer, + boss = "Shulgrax", }, [24846] = { toPosition = Position(33270, 31474, 14), backPosition = Position(33324, 31374, 14), - timer = Storage.FerumbrasAscension.FerumbrasTimer, + boss = "Ferumbras Mortal Shell", }, } @@ -56,7 +56,7 @@ function seal.onStepIn(creature, item, position, fromPosition) if item.actionid == 24844 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 4 then - if player:getStorageValue(setting.timer) < os.time() then + if player:canFightBoss(setting.boss) then player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else @@ -76,7 +76,7 @@ function seal.onStepIn(creature, item, position, fromPosition) end if item.actionid == 24845 then if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer) >= 1 then - if player:getStorageValue(setting.timer) < os.time() then + if player:canFightBoss(setting.boss) then player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else @@ -94,15 +94,15 @@ function seal.onStepIn(creature, item, position, fromPosition) return true end end - if player:getStorageValue(setting.timer) < os.time() then + if player:canFightBoss(setting.boss) then player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - elseif player:getStorageValue(setting.timer) >= os.time() then + elseif item.actionid == 24846 then + player:say("You cannot enter, you must wait fourteen days after preventing the ascension of Ferumbras.", TALKTYPE_MONSTER_SAY) + else player:teleportTo(setting.backPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:say("You have to wait to challenge this enemy again!", TALKTYPE_MONSTER_SAY) - elseif item.actionid == 24846 and player:getStorageValue(setting.timer) >= os.time() then - player:say("You cannot enter, you must wait fourteen days after preventing the ascension of Ferumbras.", TALKTYPE_MONSTER_SAY) end return true end diff --git a/data-otservbr-global/scripts/movements/quests/first_dragon/entrance_teleport.lua b/data-otservbr-global/scripts/movements/quests/first_dragon/entrance_teleport.lua index 9e597e4401e..642c02f57e4 100644 --- a/data-otservbr-global/scripts/movements/quests/first_dragon/entrance_teleport.lua +++ b/data-otservbr-global/scripts/movements/quests/first_dragon/entrance_teleport.lua @@ -4,7 +4,6 @@ local UniqueTable = { storage = Storage.FirstDragon.DragonCounter, value = 200, range = 10, - timer = Storage.FirstDragon.TazhadurTimer, newPos = { x = 32015, y = 32466, z = 8 }, bossName = "Tazhadur", bossPos = { x = 32018, y = 32465, z = 8 }, @@ -14,7 +13,6 @@ local UniqueTable = { storage = Storage.FirstDragon.ChestCounter, value = 5, range = 10, - timer = Storage.FirstDragon.KalyassaTimer, newPos = { x = 32078, y = 32456, z = 8 }, bossName = "Kalyassa", bossPos = { x = 32079, y = 32459, z = 8 }, @@ -24,7 +22,6 @@ local UniqueTable = { storage = Storage.FirstDragon.SecretsCounter, value = 3, range = 10, - timer = Storage.FirstDragon.ZorvoraxTimer, newPos = { x = 32008, y = 32396, z = 8 }, bossName = "Zorvorax", bossPos = { x = 32015, y = 32396, z = 8 }, @@ -34,7 +31,6 @@ local UniqueTable = { storage = Storage.FirstDragon.GelidrazahAccess, value = 1, range = 10, - timer = Storage.FirstDragon.GelidrazahTimer, newPos = { x = 32076, y = 32402, z = 8 }, bossName = "Gelidrazah The Frozen", bossPos = { x = 32078, y = 32400, z = 8 }, @@ -61,7 +57,7 @@ function entranceTeleport.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(setting.timer) >= os.time() then + if player:canFightBoss(setting.bossName) >= os.time() then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(fromPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -87,7 +83,7 @@ function entranceTeleport.onStepIn(creature, item, position, fromPosition) player:teleportTo(setting.newPos) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:say("You have ten minutes to kill and loot this boss. Otherwise you will lose that chance and will be kicked out.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(setting.timer, os.time() + 2 * 3600) + player:setBossCooldown(setting.bossName, os.time() + 2 * 3600) addEvent(clearBossRoom, 60 * 30 * 1000, player.uid, monster.uid, setting.bossPos, setting.range, fromPosition) return true end diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/challenger.lua b/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/challenger.lua index 928396b8f57..d204cd119a9 100644 --- a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/challenger.lua +++ b/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/challenger.lua @@ -2,32 +2,32 @@ local destination = { [1067] = { newPos = Position(32903, 31630, 14), backPos = Position(32915, 31639, 14), - storage = Storage.ForgottenKnowledge.LadyTenebrisTimer, + boss = "Lady Tenebris", }, [1068] = { newPos = Position(32658, 32885, 14), backPos = Position(32678, 32888, 14), - storage = Storage.ForgottenKnowledge.ThornKnightTimer, + boss = "The Enraged Thorn Knight", }, [1069] = { newPos = Position(33391, 31184, 10), backPos = Position(33407, 31172, 10), - storage = Storage.ForgottenKnowledge.DragonkingTimer, + boss = "Soul of Dragonking Zyrtarch", }, [1070] = { newPos = Position(32302, 31095, 14), backPos = Position(32318, 31091, 14), - storage = Storage.ForgottenKnowledge.HorrorTimer, + boss = "Melting Frozen Horror", }, [1071] = { newPos = Position(33026, 31663, 14), backPos = Position(32849, 32691, 15), - storage = Storage.ForgottenKnowledge.TimeGuardianTimer, + boss = "The Time Guardian", }, [1072] = { newPos = Position(32019, 32851, 14), backPos = Position(32035, 32859, 14), - storage = Storage.ForgottenKnowledge.LastLoreTimer, + boss = "The Last Lore Keeper", }, } @@ -43,7 +43,7 @@ function challenger.onStepIn(creature, item, position, fromPosition) if not teleport then return end - if player:getStorageValue(teleport.storage) <= os.time() then + if player:canFightBoss(teleport.boss) then if item.uid == 24882 then if player:getStorageValue(Storage.ForgottenKnowledge.BabyDragon) < 1 then player:teleportTo(teleport.backPos) diff --git a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/servant_teleport.lua b/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/servant_teleport.lua index d6511270619..534373c47fd 100644 --- a/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/servant_teleport.lua +++ b/data-otservbr-global/scripts/movements/quests/forgotten_knowledge/servant_teleport.lua @@ -6,7 +6,7 @@ function servantTeleport.onStepIn(creature, item, position, fromPosition) return end - if player:getStorageValue(Storage.ForgottenKnowledge.LloydTimer) >= os.time() then + if player:canFightBoss("LLoyd") then player:teleportTo(Position(32815, 32872, 13)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) position:sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/teleport_heart.lua b/data-otservbr-global/scripts/movements/quests/heart_of_destruction/teleport_heart.lua index d204bf97049..a7423fe662a 100644 --- a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/teleport_heart.lua +++ b/data-otservbr-global/scripts/movements/quests/heart_of_destruction/teleport_heart.lua @@ -19,19 +19,19 @@ local accessVortex = { [14323] = { position = Position(32246, 31252, 14), storage = 14320, - storageTime = 14321, + boss = "Anomaly", }, -- Rupture enter [14342] = { position = Position(32305, 31249, 14), storage = 14322, - storageTime = 14323, + boss = "Rupture", }, -- Realityquake enter [14344] = { position = Position(32181, 31240, 14), storage = 14324, - storageTime = 14325, + boss = "Realityquake", }, } @@ -42,7 +42,7 @@ local finalBosses = { storage1 = 14326, storage2 = 14327, storage3 = 14328, - storageTime = 14329, + boss = "Eradicator", }, -- Outburst enter [14349] = { @@ -50,7 +50,7 @@ local finalBosses = { storage1 = 14326, storage2 = 14327, storage3 = 14328, - storageTime = 14331, + boss = "Outburst", }, } @@ -69,7 +69,7 @@ function teleportHeart.onStepIn(creature, item, position, fromPosition) player:teleportTo(normalVortex) elseif bossVortex then if player:getStorageValue(bossVortex.storage) >= 1 then - if player:getStorageValue(bossVortex.storageTime) < os.time() then + if player:canFightBoss(bossVortex.boss) then player:teleportTo(bossVortex.position) else player:teleportTo(fromPosition) @@ -81,7 +81,7 @@ function teleportHeart.onStepIn(creature, item, position, fromPosition) end elseif uBosses then if player:getStorageValue(uBosses.storage1) >= 1 and player:getStorageValue(uBosses.storage2) >= 1 and player:getStorageValue(uBosses.storage3) >= 1 then - if player:getStorageValue(uBosses.storageTime) < os.time() then + if player:canFightBoss(uBosses.boss) then player:teleportTo(uBosses.position) else player:teleportTo(fromPosition) @@ -93,7 +93,7 @@ function teleportHeart.onStepIn(creature, item, position, fromPosition) end elseif item.actionid == 14351 then if player:getStorageValue(14330) >= 1 and player:getStorageValue(14332) >= 1 then - if player:getStorageValue(14333) < os.time() then + if player:canFightBoss("World Devourer") then player:teleportTo(Position(32272, 31384, 14)) else player:teleportTo(fromPosition) diff --git a/data-otservbr-global/scripts/quests/kilmaresh/1-fafnars-wrath/3-urmahlullu-the-immaculate.lua b/data-otservbr-global/scripts/quests/kilmaresh/1-fafnars-wrath/3-urmahlullu-the-immaculate.lua index f4606e0211a..8c87d35deff 100644 --- a/data-otservbr-global/scripts/quests/kilmaresh/1-fafnars-wrath/3-urmahlullu-the-immaculate.lua +++ b/data-otservbr-global/scripts/quests/kilmaresh/1-fafnars-wrath/3-urmahlullu-the-immaculate.lua @@ -13,6 +13,7 @@ local config = { }, teleportPosition = Position(33918, 31657, 8), bossPosition = Position(33918, 31641, 8), + bossName = "Urmahlullu the Immaculate", } local leverboss = Action() @@ -39,7 +40,7 @@ function leverboss.onUse(player, item, fromPosition, target, toPosition, isHotke end -- Check participant boss timer - if config.daily and participant:getStorageValue(Storage.Kilmaresh.UrmahlulluTimer) > os.time() then + if config.daily and not participant:canFightBoss(config.bossName) then player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendCancelMessage("Not all players are ready yet from last battle.") return true @@ -69,7 +70,7 @@ function leverboss.onUse(player, item, fromPosition, target, toPosition, isHotke team[i]:getPosition():sendMagicEffect(CONST_ME_POFF) team[i]:teleportTo(config.teleportPosition) -- Assign boss timer - team[i]:setStorageValue(Storage.Kilmaresh.UrmahlulluTimer, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) -- 20 hours + team[i]:setBossCooldown(config.bossName, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) -- 20 hours end config.teleportPosition:sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/primal_ordeal_quest/magma_bubble_lever.lua b/data-otservbr-global/scripts/quests/primal_ordeal_quest/magma_bubble_lever.lua index 361ff9e03e6..68d2cbd6f56 100644 --- a/data-otservbr-global/scripts/quests/primal_ordeal_quest/magma_bubble_lever.lua +++ b/data-otservbr-global/scripts/quests/primal_ordeal_quest/magma_bubble_lever.lua @@ -12,10 +12,9 @@ local config = { }, specPos = { from = Position(33630, 32887, 15), - to = Position(Position(33672, 32921, 15)), + to = Position(33672, 32921, 15), }, exit = Position(33659, 32897, 14), - storage = Storage.Quest.U12_90.PrimalOrdeal.Bosses.MagmaBubbleTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/quests/the_order_of_lion/action-drume.lua b/data-otservbr-global/scripts/quests/the_order_of_lion/action-drume.lua index 26c3da84263..b6fe30e0882 100644 --- a/data-otservbr-global/scripts/quests/the_order_of_lion/action-drume.lua +++ b/data-otservbr-global/scripts/quests/the_order_of_lion/action-drume.lua @@ -73,8 +73,8 @@ function drumeAction.onUse(player, item, fromPosition, target, toPosition, isHot return false end for _, pi in pairs(players) do - if pi:getStorageValue(Storage.TheOrderOfTheLion.Drume.Timer) > os.time() then - player:sendCancelMessage("Someone of your team has already fought in the skirmish in the last 20h.") + if not pi:canFightBoss("Drume") then + player:sendCancelMessage("Someone of your team has already fought in the skirmish in the last 10h.") player:getPosition():sendMagicEffect(CONST_ME_POFF) return true end @@ -107,7 +107,7 @@ function drumeAction.onUse(player, item, fromPosition, target, toPosition, isHot totalUsurper = totalUsurper + 1 end for _, pi in pairs(players) do - pi:setStorageValue(Storage.TheOrderOfTheLion.Drume.Timer, os.time() + (configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN))) + pi:setBossCooldown("Drume", os.time() + (configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN))) pi:teleportTo(config.newPosition) pi:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have " .. config.timeToKill .. " minutes to defeat Drume.") end diff --git a/data-otservbr-global/scripts/quests/the_order_of_lion/moveevent-drume_entrance.lua b/data-otservbr-global/scripts/quests/the_order_of_lion/moveevent-drume_entrance.lua index 1b394dbd6a7..7300c40ebb0 100644 --- a/data-otservbr-global/scripts/quests/the_order_of_lion/moveevent-drume_entrance.lua +++ b/data-otservbr-global/scripts/quests/the_order_of_lion/moveevent-drume_entrance.lua @@ -1,8 +1,8 @@ local drumeEntrance = MoveEvent() function drumeEntrance.onStepIn(creature, item, position, fromPosition) - if creature:isPlayer() and creature:getStorageValue(Storage.TheOrderOfTheLion.Drume.Timer) > os.time() then + if creature:isPlayer() and not creature:canFightBoss("Drume") then creature:teleportTo(fromPosition, true) - creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You've been into the skirmish in the last 20 hours.") + creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You've been into the skirmish in the last 10 hours.") end return true end diff --git a/data-otservbr-global/scripts/quests/threatened_dreams/movement-kroazur_room.lua b/data-otservbr-global/scripts/quests/threatened_dreams/movement-kroazur_room.lua index 3d7253fbffd..8af4f8df79b 100644 --- a/data-otservbr-global/scripts/quests/threatened_dreams/movement-kroazur_room.lua +++ b/data-otservbr-global/scripts/quests/threatened_dreams/movement-kroazur_room.lua @@ -9,7 +9,6 @@ local config = { rangeX = 20, -- Range in X rangeY = 20, -- Range in Y time = 10, -- time in minutes to remove the player - timer = ThreatenedDreams.Mission02.KroazurTimer, -- Timer to allow joing the room next time access = ThreatenedDreams.Mission02.KroazurAccess, -- Quest level to access the room }, } @@ -42,7 +41,7 @@ function kroazurRoom.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(room.timer) > os.time() then + if not player:canFightBoss(room.bossName) then position:sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(fromPosition, true) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -69,7 +68,7 @@ function kroazurRoom.onStepIn(creature, item, position, fromPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:say("You have ten minutes to kill and loot this boss, else you will lose that chance and will be kicked out.", TALKTYPE_MONSTER_SAY) addEvent(clearBossRoom, 60 * room.time * 1000, player.uid, room.centerPos, room.rangeX, room.rangeY, room.exitPos) - player:setStorageValue(room.timer, os.time() + 2 * 3600) + player:setBossCooldown(room.bossName, os.time() + 2 * 3600) return true end diff --git a/data/libs/functions/bosslever.lua b/data/libs/functions/bosslever.lua index 0cb84ec18ae..a1441d6cb86 100644 --- a/data/libs/functions/bosslever.lua +++ b/data/libs/functions/bosslever.lua @@ -6,7 +6,6 @@ ---@field private timeToDefeat number ---@field private timeAfterKill number ---@field private requiredLevel number ----@field private storage number ---@field private disabled boolean ---@field private onUseExtra function ---@field private _position Position @@ -44,7 +43,6 @@ local config = { player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end, exit = Position(33618, 32523, 15), - storage = Storage.Quest.U12_00.TheDreamCourts.FacelessBaneTime } ]] setmetatable(BossLever, { @@ -64,7 +62,6 @@ setmetatable(BossLever, { timeAfterKill = config.timeAfterKill or 0, requiredLevel = config.requiredLevel or 0, createBoss = boss.createFunction, - storage = config.storage, disabled = config.disabled, playerPositions = config.playerPositions, onUseExtra = config.onUseExtra or function() end, @@ -102,6 +99,44 @@ function BossLever:aid(aid) return self end +function BossLever:kvScope() + local mType = MonsterType(self.name) + if not mType then + error("BossLever: boss name is invalid") + end + return "boss.cooldown." .. toKey(tostring(mType:raceId())) +end + +---@param self BossLever +---@param player Player +---@return number +function BossLever:lastEncounterTime(player) + if not player then + return 0 + end + return player:getBossCooldown(self.name) +end + +---@param self BossLever +---@param time number +---@return boolean +function BossLever:setLastEncounterTime(time) + local info = self.lever:getInfoPositions() + if not info then + logger.error("BossLever:setLastEncounterTime - lever:getInfoPositions() returned nil") + return false + end + for _, v in pairs(info) do + if v.creature then + local player = v.creature:getPlayer() + if player then + player:setBossCooldown(self.name, time) + end + end + end + return true +end + ---@param player Player ---@return boolean function BossLever:onUse(player) @@ -126,7 +161,8 @@ function BossLever:onUse(player) return true end - local lever = Lever() + self.lever = Lever() + local lever = self.lever lever:setPositions(self.playerPositions) lever:setCondition(function(creature) if not creature or not creature:isPlayer() then @@ -138,13 +174,13 @@ function BossLever:onUse(player) return false end - if creature:getStorageValue(self.storage) > os.time() then + if self:lastEncounterTime(creature) > os.time() then local info = lever:getInfoPositions() for _, v in pairs(info) do local newPlayer = v.creature if newPlayer then newPlayer:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You or a member in your team have to wait " .. self.timeToFightAgain / 60 / 60 .. " hours to face " .. self.name .. " again!") - if newPlayer:getStorageValue(self.storage) > os.time() then + if self:lastEncounterTime(newPlayer) > os.time() then newPlayer:getPosition():sendMagicEffect(CONST_ME_POFF) end end @@ -178,7 +214,7 @@ function BossLever:onUse(player) local encounter = Encounter(self.encounter) encounter:start() end - lever:setStorageAllPlayers(self.storage, os.time() + self.timeToFightAgain) + self:setLastEncounterTime(os.time() + self.timeToFightAgain) if self.timeoutEvent then stopEvent(self.timeoutEvent) self.timeoutEvent = nil @@ -203,9 +239,6 @@ function BossLever:register() if not self.name then table.insert(missingParams, "boss.name") end - if not self.storage then - table.insert(missingParams, "storage") - end if not self.playerPositions then table.insert(missingParams, "playerPositions") end diff --git a/data/libs/functions/functions.lua b/data/libs/functions/functions.lua index 42163bc88a3..5c3a256f8ca 100644 --- a/data/libs/functions/functions.lua +++ b/data/libs/functions/functions.lua @@ -2,6 +2,9 @@ function PrettyString(tbl, indent) if not indent then indent = 0 end + if type(tbl) ~= "table" then + return tostring(tbl) + end local toprint = string.rep(" ", indent) .. "{\n" indent = indent + 2 for k, v in pairs(tbl) do diff --git a/data/libs/functions/lever.lua b/data/libs/functions/lever.lua index 56cf9d41a49..08c9f8e1d21 100644 --- a/data/libs/functions/lever.lua +++ b/data/libs/functions/lever.lua @@ -157,21 +157,10 @@ function Lever.teleportPlayers(self) -- It will teleport all players to the posi end end ---[[ - lever:setPositions(key, value) - - | Method | Type | Usage | Default | - |--------|------|---------|---------| - | key | int | Storage | nil | - | value | int | Value | nil | - - lever:setStorageAllPlayers(10000, 1) -]] ----@generic Storage ----@param key Storage +---@param bossName string ---@param value number ---@return nil -function Lever.setStorageAllPlayers(self, key, value) -- Will set storage on all players +function Lever.setCooldownAllPlayers(self, bossName, value) local info = self:getInfoPositions() if not info then error("Necessary information from players") @@ -182,8 +171,7 @@ function Lever.setStorageAllPlayers(self, key, value) -- Will set storage on all if v.creature then local player = v.creature:getPlayer() if player then - player:setStorageValue(key, value) - player:sendBosstiaryCooldownTimer() + player:setBossCooldown(bossName, value) end end end diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index 18737d66f3e..e81ccf8c5d7 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -655,3 +655,38 @@ function Player:setFiendish() end return false end + +local function bossKVScope(bossNameOrId) + local mType = MonsterType(bossNameOrId) + if not mType then + logger.error("bossKVScope - Invalid boss name or id: " .. bossNameOrId) + return false + end + return "boss.cooldown." .. toKey(tostring(mType:raceId())) +end + +function Player:getBossCooldown(bossNameOrId) + local scope = bossKVScope(bossNameOrId) + if not scope then + return false + end + return self:kv():get(scope) or 0 +end + +function Player:setBossCooldown(bossNameOrId, time) + local scope = bossKVScope(bossNameOrId) + if not scope then + return false + end + local result = self:kv():set(scope, time) + self:sendBosstiaryCooldownTimer() + return result +end + +function Player:canFightBoss(bossNameOrId) + local cooldown = self:getBossCooldown(bossNameOrId) + if cooldown > os.time() then + return false + end + return true +end diff --git a/data/libs/functions/teleport.lua b/data/libs/functions/teleport.lua index 89302688eea..de150cdcfdc 100644 --- a/data/libs/functions/teleport.lua +++ b/data/libs/functions/teleport.lua @@ -1,3 +1,26 @@ function Teleport.isTeleport(self) return true end + +function SimpleTeleport(from, destination, condition) + local teleport = MoveEvent() + + function teleport.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return false + end + + if condition and not condition(player, item, position, fromPosition) then + return false + end + + player:teleportTo(destination) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return true + end + + teleport:position(from) + teleport:register() + return teleport +end diff --git a/src/creatures/monsters/monsters.hpp b/src/creatures/monsters/monsters.hpp index 9f8a123e0e1..fd911c661f9 100644 --- a/src/creatures/monsters/monsters.hpp +++ b/src/creatures/monsters/monsters.hpp @@ -105,7 +105,6 @@ class MonsterType { BestiaryType_t bestiaryRace = BESTY_RACE_NONE; // Number (addByte) // Bosstiary - uint32_t bossStorageCooldown = 0; BosstiaryRarity_t bosstiaryRace = BosstiaryRarity_t::BOSS_INVALID; std::string bosstiaryClass; diff --git a/src/io/io_bosstiary.cpp b/src/io/io_bosstiary.cpp index 5be052725d9..e4aecee5fc8 100644 --- a/src/io/io_bosstiary.cpp +++ b/src/io/io_bosstiary.cpp @@ -303,34 +303,6 @@ uint32_t IOBosstiary::calculteRemoveBoss(uint8_t removeTimes) const { return 300000 * removeTimes - 500000; } -std::vector IOBosstiary::getBosstiaryCooldownRaceId(std::shared_ptr player) const { - std::vector bossesCooldownRaceId; - if (!player) { - return bossesCooldownRaceId; - } - - for (std::map bossesMap = getBosstiaryMap(); - const auto &[bossId, bossName] : bossesMap) { - uint32_t bossKills = player->getBestiaryKillCount(bossId); - - const auto mType = g_monsters().getMonsterType(bossName); - if (!mType) { - continue; - } - - auto bossStorage = mType->info.bossStorageCooldown; - if (bossStorage == 0) { - continue; - } - - if (bossKills >= 1 || player->getStorageValue(bossStorage) > 0) { - bossesCooldownRaceId.push_back(bossId); - } - } - - return bossesCooldownRaceId; -} - const std::vector &IOBosstiary::getBossRaceKillStages(BosstiaryRarity_t race) const { auto it = levelInfos.find(race); if (it != levelInfos.end()) { diff --git a/src/io/io_bosstiary.hpp b/src/io/io_bosstiary.hpp index bbb1367e8b8..a253be3b467 100644 --- a/src/io/io_bosstiary.hpp +++ b/src/io/io_bosstiary.hpp @@ -66,7 +66,6 @@ class IOBosstiary { phmap::parallel_flat_hash_set getBosstiaryFinished(std::shared_ptr player, uint8_t level = 1) const; uint8_t getBossCurrentLevel(std::shared_ptr player, uint16_t bossId) const; uint32_t calculteRemoveBoss(uint8_t removeTimes) const; - std::vector getBosstiaryCooldownRaceId(std::shared_ptr player) const; const std::vector &getBossRaceKillStages(BosstiaryRarity_t race) const; private: diff --git a/src/kv/value_wrapper.hpp b/src/kv/value_wrapper.hpp index a4e899adcb0..3ff804402e0 100644 --- a/src/kv/value_wrapper.hpp +++ b/src/kv/value_wrapper.hpp @@ -49,7 +49,19 @@ class ValueWrapper { template T get() const { - return std::get(data_); + if (std::holds_alternative(data_)) { + return std::get(data_); + } + return T {}; + } + + double getNumber() const { + if (std::holds_alternative(data_)) { + return static_cast(std::get(data_)); + } else if (std::holds_alternative(data_)) { + return std::get(data_); + } + return 0.0; } const ValueVariant &getVariant() const { diff --git a/src/lua/functions/core/game/game_functions.cpp b/src/lua/functions/core/game/game_functions.cpp index ea01813c66b..99a277490ab 100644 --- a/src/lua/functions/core/game/game_functions.cpp +++ b/src/lua/functions/core/game/game_functions.cpp @@ -438,12 +438,6 @@ int GameFunctions::luaGameCreateMonster(lua_State* L) { if (mtype && mtype->info.raceid > 0 && mtype->info.bosstiaryRace == BosstiaryRarity_t::RARITY_ARCHFOE) { for (const auto &spectator : Spectators().find(monster->getPosition(), true)) { if (const auto &tmpPlayer = spectator->getPlayer()) { - const auto &bossesOnTracker = g_ioBosstiary().getBosstiaryCooldownRaceId(tmpPlayer); - // If not have boss to update, then kill loop for economize resources - if (bossesOnTracker.size() == 0) { - break; - } - tmpPlayer->sendBosstiaryCooldownTimer(); } } diff --git a/src/lua/functions/creatures/monster/monster_type_functions.cpp b/src/lua/functions/creatures/monster/monster_type_functions.cpp index d481b874c30..e08d322189c 100644 --- a/src/lua/functions/creatures/monster/monster_type_functions.cpp +++ b/src/lua/functions/creatures/monster/monster_type_functions.cpp @@ -1570,27 +1570,6 @@ int MonsterTypeFunctions::luaMonsterTypeBossRaceId(lua_State* L) { return 1; } -int MonsterTypeFunctions::luaMonsterTypeBossStorageCooldown(lua_State* L) { - // set: monsterType:bossStorageCooldown(storage) - // get: monsterType:bossStorageCooldown() - const auto monsterType = getUserdataShared(L, 1); - if (!monsterType) { - pushBoolean(L, false); - reportErrorFunc(getErrorDesc(LUA_ERROR_MONSTER_TYPE_NOT_FOUND)); - return 0; - } - - auto bossStorageCooldown = getNumber(L, 2, 0); - if (lua_gettop(L) == 1) { - lua_pushnumber(L, static_cast(monsterType->info.bossStorageCooldown)); - } else { - monsterType->info.bossStorageCooldown = bossStorageCooldown; - pushBoolean(L, true); - } - - return 1; -} - int MonsterTypeFunctions::luaMonsterTypeSoundChance(lua_State* L) { // get: monsterType:soundChance() set: monsterType:soundChance(chance) const auto monsterType = getUserdataShared(L, 1); diff --git a/src/lua/functions/creatures/monster/monster_type_functions.hpp b/src/lua/functions/creatures/monster/monster_type_functions.hpp index 199b109daa5..f1b2a98bf50 100644 --- a/src/lua/functions/creatures/monster/monster_type_functions.hpp +++ b/src/lua/functions/creatures/monster/monster_type_functions.hpp @@ -133,7 +133,6 @@ class MonsterTypeFunctions final : LuaScriptInterface { registerMethod(L, "MonsterType", "bossRace", MonsterTypeFunctions::luaMonsterTypeBossRace); registerMethod(L, "MonsterType", "bossRaceId", MonsterTypeFunctions::luaMonsterTypeBossRaceId); - registerMethod(L, "MonsterType", "bossStorageCooldown", MonsterTypeFunctions::luaMonsterTypeBossStorageCooldown); registerMethod(L, "MonsterType", "soundChance", MonsterTypeFunctions::luaMonsterTypeSoundChance); registerMethod(L, "MonsterType", "soundSpeedTicks", MonsterTypeFunctions::luaMonsterTypeSoundSpeedTicks); @@ -257,7 +256,6 @@ class MonsterTypeFunctions final : LuaScriptInterface { static int luaMonsterTypeBossRace(lua_State* L); static int luaMonsterTypeBossRaceId(lua_State* L); - static int luaMonsterTypeBossStorageCooldown(lua_State* L); static int luaMonsterTypeSoundChance(lua_State* L); static int luaMonsterTypeSoundSpeedTicks(lua_State* L); diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 1f5bb3ba1c5..53aedeb1c88 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -8431,20 +8431,30 @@ void ProtocolGame::sendBosstiaryCooldownTimer() { NetworkMessage msg; msg.addByte(0xBD); - auto bossesOnTracker = g_ioBosstiary().getBosstiaryCooldownRaceId(player); - auto bossesOnTrackerSize = static_cast(bossesOnTracker.size()); - msg.add(bossesOnTrackerSize); // Number of bosses on timer - for (const auto &bossRaceId : bossesOnTracker) { + auto startBosses = msg.getBufferPosition(); + msg.skipBytes(2); // Boss count + uint16_t bossesCount = 0; + for (std::map bossesMap = g_ioBosstiary().getBosstiaryMap(); + const auto &[bossRaceId, _] : bossesMap) { const auto mType = g_ioBosstiary().getMonsterTypeByBossRaceId(bossRaceId); if (!mType) { continue; } - int32_t timer = player->getStorageValue(mType->info.bossStorageCooldown); + auto timerValue = player->kv()->scoped("boss.cooldown")->get(toKey(std::to_string(bossRaceId))); + if (!timerValue || !timerValue.has_value()) { + continue; + } + auto timer = timerValue->getNumber(); uint64_t sendTimer = timer > 0 ? static_cast(timer) : 0; msg.add(bossRaceId); // bossRaceId msg.add(sendTimer); // Boss cooldown in seconds + bossesCount++; } + auto endBosses = msg.getBufferPosition(); + msg.setBufferPosition(startBosses); + msg.add(bossesCount); + msg.setBufferPosition(endBosses); writeToOutputBuffer(msg); } diff --git a/src/utils/tools.cpp b/src/utils/tools.cpp index bf681a34012..f5a8597eb9c 100644 --- a/src/utils/tools.cpp +++ b/src/utils/tools.cpp @@ -1798,3 +1798,15 @@ std::string formatNumber(uint64_t number) { void sleep_for(uint64_t ms) { std::this_thread::sleep_for(std::chrono::milliseconds(ms)); } + +/** + * @brief Formats a string to be used as KV key (lowercase, spaces replaced with -, no whitespace) + * @param str The string to format + * @return The formatted string + */ +std::string toKey(const std::string &str) { + std::string key = asLowerCaseString(str); + std::replace(key.begin(), key.end(), ' ', '-'); + key.erase(std::remove_if(key.begin(), key.end(), [](char c) { return std::isspace(c); }), key.end()); + return key; +} diff --git a/src/utils/tools.hpp b/src/utils/tools.hpp index 9f8190419d1..fd6b41d1f3c 100644 --- a/src/utils/tools.hpp +++ b/src/utils/tools.hpp @@ -187,3 +187,5 @@ std::string getPlayerObjectPronoun(PlayerPronoun_t pronoun, PlayerSex_t sex, con std::string getPlayerPossessivePronoun(PlayerPronoun_t pronoun, PlayerSex_t sex, const std::string &name); std::string getPlayerReflexivePronoun(PlayerPronoun_t pronoun, PlayerSex_t sex, const std::string &name); std::string getVerbForPronoun(PlayerPronoun_t pronoun, bool pastTense = false); + +std::string toKey(const std::string &str);