From e4d9f7973e2ae6749e15bc4374e34afe72637a64 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sun, 19 Nov 2023 16:19:51 -0800 Subject: [PATCH] fix: the primal menace hazard issues and primal pack monsters --- data-otservbr-global/lib/core/storages.lua | 4 - data-otservbr-global/lib/quests/quest.lua | 1 + .../lib/quests/the_primal_ordeal.lua | 14 +++ .../monster/birds/headpecker.lua | 2 + .../monster/giants/hulking_prehemoth.lua | 2 + .../monster/mammals/beast_gore_horn.lua | 94 ------------------ .../monster/mammals/beast_gorerilla.lua | 95 ------------------- .../monster/mammals/beast_sabretooth.lua | 94 ------------------ .../monster/mammals/gore_horn.lua | 2 + .../monster/mammals/gorerilla.lua | 2 + .../monster/mammals/nighthunter.lua | 2 + .../monster/mammals/sabretooth.lua | 2 + .../monster/plants/stalking_stalk.lua | 2 + .../primal_ordeal_quest/the_primal_menace.lua | 32 +++---- .../monster/reptiles/emerald_tortoise.lua | 2 + .../monster/reptiles/mantosaurus.lua | 2 + .../monster/reptiles/noxious_ripptor.lua | 2 + .../monster/vermins/sulphider.lua | 2 + .../quests/dangerous_depth/using_crystals.lua | 2 +- .../ferumbras_ascendant/mazoran_lever.lua | 1 - .../ferumbras_ascendant/plagirath_lever.lua | 1 - .../ferumbras_ascendant/ragiaz_lever.lua | 1 - .../ferumbras_ascendant/razzagorn_lever.lua | 1 - .../ferumbras_ascendant/shulgrax_lever.lua | 1 - .../ferumbras_ascendant/tarbaz_lever.lua | 1 - .../ferumbras_ascendant/zamulosh_lever.lua | 1 - .../quests/secret_library/ghulosh_lever.lua | 1 - .../quests/secret_library/gorzindel_lever.lua | 1 - .../quests/secret_library/lokathmor_lever.lua | 1 - .../quests/secret_library/mazzinor_lever.lua | 1 - .../scourge_of_oblivion_lever.lua | 1 - .../nightmare_beast_lever.lua | 1 - .../scripts/hazard/primal.lua | 2 - .../scripts/movements/teleport/gnomprona.lua | 4 +- .../the_primal_manace_lever.lua | 1 - data/libs/hazard_lib.lua | 4 +- 36 files changed, 59 insertions(+), 323 deletions(-) create mode 100644 data-otservbr-global/lib/quests/the_primal_ordeal.lua delete mode 100644 data-otservbr-global/monster/mammals/beast_gore_horn.lua delete mode 100644 data-otservbr-global/monster/mammals/beast_gorerilla.lua delete mode 100644 data-otservbr-global/monster/mammals/beast_sabretooth.lua diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 78ff883881a..bd0a1c135f5 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -2791,10 +2791,6 @@ Storage = { U12_90 = { -- update 12.90 - Reserved Storages 47851 - 47900 PrimalOrdeal = { QuestLine = 47851, - Hazard = { - Current = 47856, - Max = 47857, - }, Bosses = { MagmaBubbleKilled = 47853, ThePrimalMenaceKilled = 47855, diff --git a/data-otservbr-global/lib/quests/quest.lua b/data-otservbr-global/lib/quests/quest.lua index 3919c962ffd..21b1744fec6 100644 --- a/data-otservbr-global/lib/quests/quest.lua +++ b/data-otservbr-global/lib/quests/quest.lua @@ -6,3 +6,4 @@ dofile(DATA_DIRECTORY .. "/lib/quests/svargrond_arena.lua") dofile(DATA_DIRECTORY .. "/lib/quests/the_cursed_crystal.lua") dofile(DATA_DIRECTORY .. "/lib/quests/the_queen_of_the_banshees.lua") dofile(DATA_DIRECTORY .. "/lib/quests/their_masters_voice.lua") +dofile(DATA_DIRECTORY .. "/lib/quests/the_primal_ordeal.lua") diff --git a/data-otservbr-global/lib/quests/the_primal_ordeal.lua b/data-otservbr-global/lib/quests/the_primal_ordeal.lua new file mode 100644 index 00000000000..4b1dfdae2e3 --- /dev/null +++ b/data-otservbr-global/lib/quests/the_primal_ordeal.lua @@ -0,0 +1,14 @@ +function RegisterPrimalPackBeast(template) + local name = template.name or template.description:gsub("an ", ""):gsub("a ", ""):titleCase() + local primal = Game.createMonsterType(name .. " (Primal)") + local primalMonster = table.copy(template) + primalMonster.experience = 0 + primalMonster.loot = {} + primalMonster.name = "Primal Pack Beast" + primalMonster.description = "a primal pack beast" + + primalMonster.raceId = nil + primalMonster.Bestiary = nil + + primal:register(primalMonster) +end diff --git a/data-otservbr-global/monster/birds/headpecker.lua b/data-otservbr-global/monster/birds/headpecker.lua index 2694021b76b..c5a686633be 100644 --- a/data-otservbr-global/monster/birds/headpecker.lua +++ b/data-otservbr-global/monster/birds/headpecker.lua @@ -121,3 +121,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/giants/hulking_prehemoth.lua b/data-otservbr-global/monster/giants/hulking_prehemoth.lua index 24adf51b948..aa9ed9b1774 100644 --- a/data-otservbr-global/monster/giants/hulking_prehemoth.lua +++ b/data-otservbr-global/monster/giants/hulking_prehemoth.lua @@ -119,3 +119,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/mammals/beast_gore_horn.lua b/data-otservbr-global/monster/mammals/beast_gore_horn.lua deleted file mode 100644 index c77c16564fb..00000000000 --- a/data-otservbr-global/monster/mammals/beast_gore_horn.lua +++ /dev/null @@ -1,94 +0,0 @@ -local mType = Game.createMonsterType("Beast Gore Horn") -local monster = {} - -monster.description = "a beast gore horn" -monster.experience = 0 -monster.outfit = { - lookType = 1548, - lookHead = 85, - lookBody = 1, - lookLegs = 85, - lookFeet = 105, - lookAddons = 3, - lookMount = 0, -} - -monster.health = 20620 -monster.maxHealth = 20620 -monster.race = "blood" -monster.corpse = 0 -monster.speed = 192 -monster.manaCost = 0 -monster.maxSummons = 0 - -monster.changeTarget = { - interval = 4000, - chance = 10, -} - -monster.strategiesTarget = { - nearest = 100, -} - -monster.flags = { - summonable = false, - attackable = true, - hostile = true, - convinceable = false, - pushable = false, - rewardBoss = false, - illusionable = false, - canPushItems = true, - canPushCreatures = true, - staticAttackChance = 90, - targetDistance = 1, - runHealth = 0, - healthHidden = false, - isBlockable = false, - canWalkOnEnergy = true, - canWalkOnFire = true, - canWalkOnPoison = true, -} - -monster.light = { - level = 0, - color = 0, -} - -monster.voices = { - interval = 5000, - chance = 10, - { text = "Rraaaaa!", yell = false }, -} - -monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = 300, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -400, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, target = true }, -} - -monster.defenses = { - defense = 78, - armor = 78, -} - -monster.elements = { - { type = COMBAT_PHYSICALDAMAGE, percent = 20 }, - { type = COMBAT_ENERGYDAMAGE, percent = -5 }, - { type = COMBAT_EARTHDAMAGE, percent = -5 }, - { type = COMBAT_FIREDAMAGE, percent = 10 }, - { type = COMBAT_LIFEDRAIN, percent = 0 }, - { type = COMBAT_MANADRAIN, percent = 0 }, - { type = COMBAT_DROWNDAMAGE, percent = 0 }, - { type = COMBAT_ICEDAMAGE, percent = 10 }, - { type = COMBAT_HOLYDAMAGE, percent = -20 }, - { type = COMBAT_DEATHDAMAGE, percent = 10 }, -} - -monster.immunities = { - { type = "paralyze", condition = false }, - { type = "outfit", condition = false }, - { type = "invisible", condition = true }, - { type = "bleed", condition = false }, -} - -mType:register(monster) diff --git a/data-otservbr-global/monster/mammals/beast_gorerilla.lua b/data-otservbr-global/monster/mammals/beast_gorerilla.lua deleted file mode 100644 index 31fbaf99814..00000000000 --- a/data-otservbr-global/monster/mammals/beast_gorerilla.lua +++ /dev/null @@ -1,95 +0,0 @@ -local mType = Game.createMonsterType("Beast Gorerilla") -local monster = {} - -monster.description = "a beast gorerilla" -monster.experience = 0 -monster.outfit = { - lookType = 1559, - lookHead = 85, - lookBody = 1, - lookLegs = 85, - lookFeet = 105, - lookAddons = 3, - lookMount = 0, -} - -monster.health = 16850 -monster.maxHealth = 16850 -monster.race = "blood" -monster.corpse = 0 -monster.speed = 215 -monster.manaCost = 0 -monster.maxSummons = 0 - -monster.changeTarget = { - interval = 4000, - chance = 10, -} - -monster.strategiesTarget = { - nearest = 100, -} - -monster.flags = { - summonable = false, - attackable = true, - hostile = true, - convinceable = false, - pushable = false, - rewardBoss = false, - illusionable = false, - canPushItems = true, - canPushCreatures = true, - staticAttackChance = 90, - targetDistance = 1, - runHealth = 0, - healthHidden = false, - isBlockable = false, - canWalkOnEnergy = true, - canWalkOnFire = true, - canWalkOnPoison = true, -} - -monster.light = { - level = 0, - color = 0, -} - -monster.voices = { - interval = 5000, - chance = 10, - { text = "The Moon Goddess is ashamed of you!", yell = false }, -} - -monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = 300, maxDamage = -801 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 250, maxDamage = -360, range = 7, shootEffect = CONST_ANI_LARGEROCK, target = true }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_FIREDAMAGE, minDamage = -1, maxDamage = -1, range = 5, radius = 3, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREATTACK, target = true }, -} - -monster.defenses = { - defense = 76, - armor = 76, -} - -monster.elements = { - { type = COMBAT_PHYSICALDAMAGE, percent = 20 }, - { type = COMBAT_ENERGYDAMAGE, percent = -5 }, - { type = COMBAT_EARTHDAMAGE, percent = -5 }, - { type = COMBAT_FIREDAMAGE, percent = 10 }, - { type = COMBAT_LIFEDRAIN, percent = 0 }, - { type = COMBAT_MANADRAIN, percent = 0 }, - { type = COMBAT_DROWNDAMAGE, percent = 0 }, - { type = COMBAT_ICEDAMAGE, percent = 10 }, - { type = COMBAT_HOLYDAMAGE, percent = -20 }, - { type = COMBAT_DEATHDAMAGE, percent = 10 }, -} - -monster.immunities = { - { type = "paralyze", condition = false }, - { type = "outfit", condition = false }, - { type = "invisible", condition = true }, - { type = "bleed", condition = false }, -} - -mType:register(monster) diff --git a/data-otservbr-global/monster/mammals/beast_sabretooth.lua b/data-otservbr-global/monster/mammals/beast_sabretooth.lua deleted file mode 100644 index 19602511bf8..00000000000 --- a/data-otservbr-global/monster/mammals/beast_sabretooth.lua +++ /dev/null @@ -1,94 +0,0 @@ -local mType = Game.createMonsterType("Beast Sabretooth") -local monster = {} - -monster.description = "a beast sabretooth" -monster.experience = 0 -monster.outfit = { - lookType = 1549, - lookHead = 85, - lookBody = 1, - lookLegs = 85, - lookFeet = 105, - lookAddons = 3, - lookMount = 0, -} - -monster.health = 17300 -monster.maxHealth = 17300 -monster.race = "blood" -monster.corpse = 0 -monster.speed = 182 -monster.manaCost = 0 -monster.maxSummons = 0 - -monster.changeTarget = { - interval = 4000, - chance = 10, -} - -monster.strategiesTarget = { - nearest = 100, -} - -monster.flags = { - summonable = false, - attackable = true, - hostile = true, - convinceable = false, - pushable = false, - rewardBoss = false, - illusionable = false, - canPushItems = true, - canPushCreatures = true, - staticAttackChance = 90, - targetDistance = 1, - runHealth = 0, - healthHidden = false, - isBlockable = false, - canWalkOnEnergy = true, - canWalkOnFire = true, - canWalkOnPoison = true, -} - -monster.light = { - level = 0, - color = 0, -} - -monster.voices = { - interval = 5000, - chance = 10, - { text = "The Moon Goddess is ashamed of you!", yell = false }, -} - -monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = 300, maxDamage = -450, effect = CONST_ME_ORANGE_ENERGY_SPARK }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -260, maxDamage = -300, length = 4, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, -} - -monster.defenses = { - defense = 110, - armor = 120, -} - -monster.elements = { - { type = COMBAT_PHYSICALDAMAGE, percent = 20 }, - { type = COMBAT_ENERGYDAMAGE, percent = -5 }, - { type = COMBAT_EARTHDAMAGE, percent = -5 }, - { type = COMBAT_FIREDAMAGE, percent = 10 }, - { type = COMBAT_LIFEDRAIN, percent = 0 }, - { type = COMBAT_MANADRAIN, percent = 0 }, - { type = COMBAT_DROWNDAMAGE, percent = 0 }, - { type = COMBAT_ICEDAMAGE, percent = 10 }, - { type = COMBAT_HOLYDAMAGE, percent = -20 }, - { type = COMBAT_DEATHDAMAGE, percent = 10 }, -} - -monster.immunities = { - { type = "paralyze", condition = false }, - { type = "outfit", condition = false }, - { type = "invisible", condition = true }, - { type = "bleed", condition = false }, -} - -mType:register(monster) diff --git a/data-otservbr-global/monster/mammals/gore_horn.lua b/data-otservbr-global/monster/mammals/gore_horn.lua index bfe77ca9ecf..37ca6c70b2b 100644 --- a/data-otservbr-global/monster/mammals/gore_horn.lua +++ b/data-otservbr-global/monster/mammals/gore_horn.lua @@ -120,3 +120,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/mammals/gorerilla.lua b/data-otservbr-global/monster/mammals/gorerilla.lua index b3ce0f064c1..58b8758208f 100644 --- a/data-otservbr-global/monster/mammals/gorerilla.lua +++ b/data-otservbr-global/monster/mammals/gorerilla.lua @@ -121,3 +121,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/mammals/nighthunter.lua b/data-otservbr-global/monster/mammals/nighthunter.lua index 434efa99993..c83d387c30a 100644 --- a/data-otservbr-global/monster/mammals/nighthunter.lua +++ b/data-otservbr-global/monster/mammals/nighthunter.lua @@ -120,3 +120,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/mammals/sabretooth.lua b/data-otservbr-global/monster/mammals/sabretooth.lua index a1398dc2d74..91fe1151653 100644 --- a/data-otservbr-global/monster/mammals/sabretooth.lua +++ b/data-otservbr-global/monster/mammals/sabretooth.lua @@ -119,3 +119,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/plants/stalking_stalk.lua b/data-otservbr-global/monster/plants/stalking_stalk.lua index 3565dcc26d1..2415168d0a6 100644 --- a/data-otservbr-global/monster/plants/stalking_stalk.lua +++ b/data-otservbr-global/monster/plants/stalking_stalk.lua @@ -120,3 +120,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua index b81e83f7af7..f233c41680b 100644 --- a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua +++ b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_primal_menace.lua @@ -26,17 +26,17 @@ local thePrimalMenaceConfig = { HpRateOnSpawn = 0.7, MonsterPool = { - "Emerald Tortoise", - "Beast Gore Horn", - "Beast Gorerilla", - "Headpecker", - "Beast Hulking Prehemoth", - "Mantosaurus", - "Nighthunter", - "Noxious Ripptor", - "Beast Sabretooth", - "Stalking Stalk", - "Sulphider", + "Emerald Tortoise (Primal)", + "Gore Horn (Primal)", + "Gorerilla (Primal)", + "Headpecker (Primal)", + "Hulking Prehemoth (Primal)", + "Mantosaurus (Primal)", + "Nighthunter (Primal)", + "Noxious Ripptor (Primal)", + "Sabretooth (Primal)", + "Stalking Stalk (Primal)", + "Sulphider (Primal)", }, }, @@ -117,11 +117,11 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 85, minDamage = -0, maxDamage = -763 }, - { name = "combat", interval = 4000, chance = 35, type = COMBAT_EARTHDAMAGE, minDamage = -1500, maxDamage = -2200, length = 10, spread = 3, effect = CONST_ME_CARNIPHILA, target = false }, - { name = "combat", interval = 2500, chance = 45, type = COMBAT_FIREDAMAGE, minDamage = -700, maxDamage = -1000, length = 10, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "big death wave", interval = 3500, chance = 35, minDamage = -250, maxDamage = -300, target = false }, - { name = "combat", interval = 5000, chance = 40, type = COMBAT_ENERGYDAMAGE, effect = CONST_ME_ENERGYHIT, minDamage = -1200, maxDamage = -1300, range = 4, target = false }, - { name = "combat", interval = 2700, chance = 45, type = COMBAT_EARTHDAMAGE, shootEffect = CONST_ANI_POISON, effect = CONST_ANI_EARTH, minDamage = -600, maxDamage = -1800, range = 4, target = false }, + { name = "combat", interval = 4000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -1500, maxDamage = -2200, length = 10, spread = 3, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2500, chance = 25, type = COMBAT_FIREDAMAGE, minDamage = -700, maxDamage = -1000, length = 10, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "big death wave", interval = 3500, chance = 20, minDamage = -250, maxDamage = -300, target = false }, + { name = "combat", interval = 5000, chance = 15, type = COMBAT_ENERGYDAMAGE, effect = CONST_ME_ENERGYHIT, minDamage = -1200, maxDamage = -1300, range = 4, target = false }, + { name = "combat", interval = 2700, chance = 30, type = COMBAT_EARTHDAMAGE, shootEffect = CONST_ANI_POISON, effect = CONST_ANI_EARTH, minDamage = -600, maxDamage = -1800, range = 4, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/reptiles/emerald_tortoise.lua b/data-otservbr-global/monster/reptiles/emerald_tortoise.lua index e2375af210e..d2b1a88246d 100644 --- a/data-otservbr-global/monster/reptiles/emerald_tortoise.lua +++ b/data-otservbr-global/monster/reptiles/emerald_tortoise.lua @@ -128,3 +128,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/reptiles/mantosaurus.lua b/data-otservbr-global/monster/reptiles/mantosaurus.lua index f0484558c77..96a24cbaf06 100644 --- a/data-otservbr-global/monster/reptiles/mantosaurus.lua +++ b/data-otservbr-global/monster/reptiles/mantosaurus.lua @@ -121,3 +121,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/reptiles/noxious_ripptor.lua b/data-otservbr-global/monster/reptiles/noxious_ripptor.lua index 13740d55851..2a7031598b5 100644 --- a/data-otservbr-global/monster/reptiles/noxious_ripptor.lua +++ b/data-otservbr-global/monster/reptiles/noxious_ripptor.lua @@ -118,3 +118,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/monster/vermins/sulphider.lua b/data-otservbr-global/monster/vermins/sulphider.lua index 7346eb4c687..ad42af1cda7 100644 --- a/data-otservbr-global/monster/vermins/sulphider.lua +++ b/data-otservbr-global/monster/vermins/sulphider.lua @@ -119,3 +119,5 @@ monster.immunities = { } mType:register(monster) + +RegisterPrimalPackBeast(monster) diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/using_crystals.lua b/data-otservbr-global/scripts/actions/quests/dangerous_depth/using_crystals.lua index 68a348fc08f..74a3db1ae17 100644 --- a/data-otservbr-global/scripts/actions/quests/dangerous_depth/using_crystals.lua +++ b/data-otservbr-global/scripts/actions/quests/dangerous_depth/using_crystals.lua @@ -405,7 +405,7 @@ function dangerousDepthCrystals.onUse(player, item, fromPosition, target, toPosi return true end - if not target or not target:isItem() then + if not target or not target.isItem or not target:isItem() then return false end diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/mazoran_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/mazoran_lever.lua index cc973b7ee4c..b43f674af30 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/mazoran_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/mazoran_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33597, 32700, 14), }, exit = Position(33319, 32318, 13), - storage = Storage.FerumbrasAscension.MazoranTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/plagirath_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/plagirath_lever.lua index d288c964a02..65207dae0b4 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/plagirath_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/plagirath_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33190, 31515, 13), }, exit = Position(33319, 32318, 13), - storage = Storage.FerumbrasAscension.PlagirathTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ragiaz_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ragiaz_lever.lua index 95461abb6a0..bf24a598d81 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ragiaz_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ragiaz_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33495, 32347, 13), }, exit = Position(33319, 32318, 13), - storage = Storage.FerumbrasAscension.RagiazTimer, } local deathDragons = { diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/razzagorn_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/razzagorn_lever.lua index 11586fcc350..6e6f9348b87 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/razzagorn_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/razzagorn_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33439, 32481, 14), }, exit = Position(33319, 32318, 13), - storage = Storage.FerumbrasAscension.RazzagornTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/shulgrax_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/shulgrax_lever.lua index 83e8b16663f..2a2305bfd52 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/shulgrax_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/shulgrax_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33496, 32798, 13), }, exit = Position(33319, 32318, 13), - storage = Storage.FerumbrasAscension.ShulgraxTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/tarbaz_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/tarbaz_lever.lua index 0ceb1fc87b9..13cdb5766f8 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/tarbaz_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/tarbaz_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33473, 32856, 11), }, exit = Position(33319, 32318, 13), - storage = Storage.FerumbrasAscension.TarbazTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/zamulosh_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/zamulosh_lever.lua index 545edd1f35a..f59534879e3 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/zamulosh_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/zamulosh_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(33654, 32765, 11), }, exit = Position(33319, 32318, 13), - storage = Storage.FerumbrasAscension.ZamuloshTimer, } local zamuloshSummons = { diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/ghulosh_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/ghulosh_lever.lua index 7e7e3d57c3c..aaa1e1cd9da 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/ghulosh_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/ghulosh_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(32763, 32729, 10), }, exit = Position(32660, 32713, 13), - storage = Storage.Quest.U11_80.TheSecretLibrary.GhuloshTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/gorzindel_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/gorzindel_lever.lua index fe2fcd74cda..ad191a2287c 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/gorzindel_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/gorzindel_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(32695, 32726, 10), }, exit = Position(32660, 32734, 12), - storage = Storage.Quest.U11_80.TheSecretLibrary.GorzindelTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/lokathmor_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/lokathmor_lever.lua index d63560f6fca..d70154ca142 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/lokathmor_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/lokathmor_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(32758, 32696, 10), }, exit = Position(32466, 32654, 12), - storage = Storage.Quest.U11_80.TheSecretLibrary.LokathmorTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/mazzinor_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/mazzinor_lever.lua index eb7afac5509..266a2917f6c 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/mazzinor_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/mazzinor_lever.lua @@ -17,7 +17,6 @@ local config = { to = Position(32732, 32728, 10), }, exit = Position(32616, 32531, 13), - storage = Storage.Quest.U11_80.TheSecretLibrary.MazzinorTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/scourge_of_oblivion_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/scourge_of_oblivion_lever.lua index 0739407172d..11265f1589c 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/scourge_of_oblivion_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/scourge_of_oblivion_lever.lua @@ -22,7 +22,6 @@ local config = { to = Position(32738, 32748, 11), }, exit = Position(32480, 32599, 15), - storage = Storage.Quest.U11_80.TheSecretLibrary.ScourgeOfOblivionTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/actions/quests/the_dream_courts/nightmare_beast_lever.lua b/data-otservbr-global/scripts/actions/quests/the_dream_courts/nightmare_beast_lever.lua index fc47fe72006..2c30247b915 100644 --- a/data-otservbr-global/scripts/actions/quests/the_dream_courts/nightmare_beast_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/the_dream_courts/nightmare_beast_lever.lua @@ -22,7 +22,6 @@ local config = { to = Position(32220, 32055, 15), }, exit = Position(32211, 32084, 15), - storage = Storage.Quest.U12_00.TheDreamCourts.NightmareBeastTimer, } local lever = BossLever(config) diff --git a/data-otservbr-global/scripts/hazard/primal.lua b/data-otservbr-global/scripts/hazard/primal.lua index e4309b78f67..2b8fd67a25d 100644 --- a/data-otservbr-global/scripts/hazard/primal.lua +++ b/data-otservbr-global/scripts/hazard/primal.lua @@ -3,8 +3,6 @@ local hazard = Hazard.new({ from = Position(33502, 32740, 13), to = Position(33796, 32996, 15), maxLevel = 12, - storageMax = Storage.Quest.U12_90.PrimalOrdeal.Hazard.Max, - storageCurrent = Storage.Quest.U12_90.PrimalOrdeal.Hazard.Current, crit = true, dodge = true, diff --git a/data-otservbr-global/scripts/movements/teleport/gnomprona.lua b/data-otservbr-global/scripts/movements/teleport/gnomprona.lua index f4a56cbb4ac..e9b52a5e6c2 100644 --- a/data-otservbr-global/scripts/movements/teleport/gnomprona.lua +++ b/data-otservbr-global/scripts/movements/teleport/gnomprona.lua @@ -2,7 +2,7 @@ local teleports = { { position = Position(33660, 32895, 14), destination = Position(33669, 32933, 15) }, { position = Position(33671, 32933, 15), destination = Position(33660, 32897, 14) }, { position = Position(33658, 32919, 15), destination = Position(33669, 32933, 15) }, - { position = Position(33714, 32797, 14), destination = Position(33555, 32752, 14), access = Storage.Quest.U12_90.PrimalOrdeal.Bosses.MagmaBubbleKilled }, + { position = Position(33714, 32797, 14), destination = Position(33556, 32754, 14), access = Storage.Quest.U12_90.PrimalOrdeal.Bosses.MagmaBubbleKilled }, { position = Position(33558, 32754, 14), destination = Position(33714, 32799, 14) }, { position = Position(33567, 32758, 15), destination = Position(33555, 32752, 14) }, } @@ -23,7 +23,9 @@ function gnomprona.onStepIn(creature, item, position, fromPosition) player:teleportTo(teleports[c].destination) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else + player:getPosition():sendMagicEffect(CONST_ME_POFF) player:teleportTo(fromPosition) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You don't have access to this teleport yet.") end else player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/quests/primal_ordeal_quest/the_primal_manace_lever.lua b/data-otservbr-global/scripts/quests/primal_ordeal_quest/the_primal_manace_lever.lua index 64c6785e364..bb01eb8da7d 100644 --- a/data-otservbr-global/scripts/quests/primal_ordeal_quest/the_primal_manace_lever.lua +++ b/data-otservbr-global/scripts/quests/primal_ordeal_quest/the_primal_manace_lever.lua @@ -16,7 +16,6 @@ local config = { to = Position(33570, 32769, 15), }, exit = Position(33520, 32871, 15), - storage = Storage.Quest.U12_90.PrimalOrdeal.Bosses.ThePrimalMenaceTimer, } lever = BossLever(config) diff --git a/data/libs/hazard_lib.lua b/data/libs/hazard_lib.lua index dc8ec0a0d44..d10650a81b6 100644 --- a/data/libs/hazard_lib.lua +++ b/data/libs/hazard_lib.lua @@ -110,8 +110,8 @@ function Hazard:levelUp(player) end function Hazard:setPlayerMaxLevel(player, level) - if level > self.maxLevel then - level = self.maxLevel + if level > self.maxLevelLevel then + level = self.maxLevelLevel end if self.storageMax then