From 6232e783c36eb11d0e1b6d4de60ceb65b4aa3b83 Mon Sep 17 00:00:00 2001 From: HT Cesta <58153179+htc16@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:56:05 -0300 Subject: [PATCH] Wrath of the Emperor Quest This quest was one of the most complex. --- data-otservbr-global/lib/core/quests.lua | 32 +++---- data-otservbr-global/lib/core/storages.lua | 80 ++++++++-------- .../npc/a_sleeping_dragon.lua | 67 ++++++------- .../npc/awarness_of_the_emperor.lua | 21 ++--- data-otservbr-global/npc/chartan.lua | 22 +++-- data-otservbr-global/npc/gate_guardian.lua | 8 +- .../npc/ghost_of_a_priest.lua | 14 +-- data-otservbr-global/npc/izsh.lua | 5 +- .../npc/lizard_tunnel_guard.lua | 4 +- data-otservbr-global/npc/zalamon.lua | 42 ++++----- data-otservbr-global/npc/zizzle.lua | 30 +++--- data-otservbr-global/npc/zlak.lua | 22 ++--- data-otservbr-global/npc/zumtah.lua | 10 +- .../actions/other/others/quest_system1.lua | 2 +- .../creaturescripts/customs/freequests.lua | 38 ++++---- .../actions_zalamon_door.lua | 2 +- .../actions_mission01_crate.lua} | 2 +- .../actions_mission01_lights.lua} | 0 ...ission02_firstcontact_repair_teleport.lua} | 6 +- .../actions_mission03_the_keeper.lua} | 16 ++-- ...sion04_sacrament_of_the_snake_sceptre.lua} | 6 +- .../actions_mission08_doors.lua} | 0 ...ions_mission08_uninvited_guests_lever.lua} | 0 ...mission09_the_sleeping_dragon_mixture.lua} | 4 +- ...ission10_a_message_of_freedom_sceptre.lua} | 30 +++--- .../actions_mission11_payback_time_lever.lua} | 6 +- .../actions_mission12_just_rewards.lua} | 9 +- .../creaturescripts_bosses_kill.lua} | 2 +- .../creaturescripts_keeper_kill.lua} | 2 +- ...eaturescripts_lizard_magistratus_kill.lua} | 6 +- .../creaturescripts_lizard_noble_kill.lua} | 4 +- .../creaturescripts_zalamon_kill.lua} | 2 +- .../globalevents_crate.lua | 41 ++++++++ .../movements_boss_teleport.lua} | 11 ++- .../wrath_of_the_emperor/movements_crate.lua} | 7 +- .../movements_keeper.lua} | 0 .../movements_prison.lua} | 8 +- .../movements_teleports_access.lua} | 14 +-- data-otservbr-global/startup/tables/chest.lua | 30 ++++++ .../startup/tables/door_quest.lua | 12 +-- data-otservbr-global/startup/tables/item.lua | 93 +++++++++++++++++++ data-otservbr-global/startup/tables/lever.lua | 14 +++ data/scripts/lib/register_actions.lua | 4 +- 43 files changed, 453 insertions(+), 275 deletions(-) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission01_crate.lua => quests/wrath_of_the_emperor/actions_mission01_crate.lua} (87%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission01_lights.lua => quests/wrath_of_the_emperor/actions_mission01_lights.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission02_firstcontact_repair_teleport.lua => quests/wrath_of_the_emperor/actions_mission02_firstcontact_repair_teleport.lua} (87%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission03_the_keeper.lua => quests/wrath_of_the_emperor/actions_mission03_the_keeper.lua} (51%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission04_sacrament_of_the_snake_sceptre.lua => quests/wrath_of_the_emperor/actions_mission04_sacrament_of_the_snake_sceptre.lua} (67%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission08_doors.lua => quests/wrath_of_the_emperor/actions_mission08_doors.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission08_uninvited_guests_lever.lua => quests/wrath_of_the_emperor/actions_mission08_uninvited_guests_lever.lua} (100%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission09_the_sleeping_dragon_mixture.lua => quests/wrath_of_the_emperor/actions_mission09_the_sleeping_dragon_mixture.lua} (63%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission10_a_message_of_freedom_sceptre.lua => quests/wrath_of_the_emperor/actions_mission10_a_message_of_freedom_sceptre.lua} (54%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission11_payback_time_lever.lua => quests/wrath_of_the_emperor/actions_mission11_payback_time_lever.lua} (85%) rename data-otservbr-global/scripts/{actions/quests/wrath_of_the_emperor/mission12_just_rewards.lua => quests/wrath_of_the_emperor/actions_mission12_just_rewards.lua} (62%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/bosses_kill.lua => quests/wrath_of_the_emperor/creaturescripts_bosses_kill.lua} (93%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/keeper_kill.lua => quests/wrath_of_the_emperor/creaturescripts_keeper_kill.lua} (63%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/lizard_magistratus_kill.lua => quests/wrath_of_the_emperor/creaturescripts_lizard_magistratus_kill.lua} (56%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/lizard_noble_kill.lua => quests/wrath_of_the_emperor/creaturescripts_lizard_noble_kill.lua} (62%) rename data-otservbr-global/scripts/{creaturescripts/quests/wrath_of_the_emperor/zalamon_kill.lua => quests/wrath_of_the_emperor/creaturescripts_zalamon_kill.lua} (93%) create mode 100644 data-otservbr-global/scripts/quests/wrath_of_the_emperor/globalevents_crate.lua rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/boss_teleport.lua => quests/wrath_of_the_emperor/movements_boss_teleport.lua} (83%) rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/crate.lua => quests/wrath_of_the_emperor/movements_crate.lua} (97%) rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/keeper.lua => quests/wrath_of_the_emperor/movements_keeper.lua} (100%) rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/prison.lua => quests/wrath_of_the_emperor/movements_prison.lua} (60%) rename data-otservbr-global/scripts/{movements/quests/wrath_of_the_emperor/teleports_access.lua => quests/wrath_of_the_emperor/movements_teleports_access.lua} (68%) diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index 8b2bfd73c4f..d344c123821 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -4988,12 +4988,12 @@ if not Quests then }, [34] = { name = "Wrath of the Emperor", - startStorageId = Storage.WrathoftheEmperor.Questline, + startStorageId = Storage.Quest.U8_6.WrathOfTheEmperor.Questline, startStorageValue = 1, missions = { [1] = { name = "Mission 01: Catering the Lions Den", - storageId = Storage.WrathoftheEmperor.Mission01, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, missionId = 10348, startValue = 1, endValue = 3, @@ -5007,7 +5007,7 @@ if not Quests then }, [2] = { name = "Mission 02: First Contact", - storageId = Storage.WrathoftheEmperor.Mission02, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, missionId = 10349, startValue = 1, endValue = 3, @@ -5022,7 +5022,7 @@ if not Quests then }, [3] = { name = "Mission 03: The Keeper", - storageId = Storage.WrathoftheEmperor.Mission03, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, missionId = 10350, startValue = 1, endValue = 3, @@ -5035,7 +5035,7 @@ if not Quests then }, [4] = { name = "Mission 04: Sacrament of the Snake", - storageId = Storage.WrathoftheEmperor.Mission04, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, missionId = 10351, startValue = 1, endValue = 3, @@ -5051,7 +5051,7 @@ if not Quests then }, [5] = { name = "Mission 05: New in Town", - storageId = Storage.WrathoftheEmperor.Mission05, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, missionId = 10352, startValue = 1, endValue = 3, @@ -5063,27 +5063,27 @@ if not Quests then }, [6] = { name = "Mission 06: The Office Job", - storageId = Storage.WrathoftheEmperor.Mission06, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, missionId = 10353, startValue = 0, - endValue = 4, + endValue = 5, description = function(player) - return string.format("Kill four Magistrati in the office building. Then report back to Zlak. You have killed %d magistrati so far.", (math.max(player:getStorageValue(Storage.WrathoftheEmperor.Mission06), 0))) + return string.format("Kill four Magistrati in the office building. Then report back to Zlak. You have killed %d magistrati so far.", (math.max(player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06), 1))) end, }, [7] = { name = "Mission 07: A Noble Cause", - storageId = Storage.WrathoftheEmperor.Mission07, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, missionId = 10354, startValue = 0, endValue = 6, description = function(player) - return string.format("Kill six nobles in the city and report back to Zlak. You have killed %d nobles so far.", (math.max(player:getStorageValue(Storage.WrathoftheEmperor.Mission07), 0))) + return string.format("Kill six nobles in the city and report back to Zlak. You have killed %d nobles so far.", (math.max(player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07), 0))) end, }, [8] = { name = "Mission 08: Uninvited Guests", - storageId = Storage.WrathoftheEmperor.Mission08, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, missionId = 10355, startValue = 1, endValue = 2, @@ -5094,7 +5094,7 @@ if not Quests then }, [9] = { name = "Mission 09: The Sleeping Dragon", - storageId = Storage.WrathoftheEmperor.Mission09, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, missionId = 10356, startValue = 1, endValue = 2, @@ -5106,7 +5106,7 @@ if not Quests then }, [10] = { name = "Mission 10: A Message of Freedom", - storageId = Storage.WrathoftheEmperor.Mission10, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, missionId = 10357, startValue = 1, endValue = 6, @@ -5128,7 +5128,7 @@ if not Quests then }, [11] = { name = "Mission 11: Payback Time", - storageId = Storage.WrathoftheEmperor.Mission11, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, missionId = 10358, startValue = 1, endValue = 2, @@ -5140,7 +5140,7 @@ if not Quests then }, [12] = { name = "Mission 12: Just Rewards", - storageId = Storage.WrathoftheEmperor.Mission12, + storageId = Storage.Quest.U8_6.WrathOfTheEmperor.Mission12, missionId = 10359, startValue = 0, endValue = 1, diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 01f1801772b..09d0b55a2e0 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -720,44 +720,6 @@ Storage = { DeeplingAnchor = 51023, RoyalCostumeOutfit = 51026, }, - WrathoftheEmperor = { - -- Reserved storage from 51300 - 51339 - Questline = 51300, - Mission01 = 51301, - Mission02 = 51302, - Mission03 = 51303, - Mission04 = 51304, - Mission05 = 51305, - Mission06 = 51306, - Mission07 = 51307, - Mission08 = 51308, - Mission09 = 51309, - Mission10 = 51310, - Mission11 = 51311, - Mission12 = 51312, - Message = 51313, --1068 - GuardcaughtYou = 51314, --1062 - ZumtahStatus = 51315, --1066 - PrisonReleaseStatus = 51316, --1067 - GhostOfAPriest01 = 51317, --1070 - GhostOfAPriest02 = 51318, --1071 - GhostOfAPriest03 = 51319, --1072 - InterdimensionalPotion = 51320, --1084 - BossStatus = 51321, --1090 - -- unused platinumReward = 51322, - -- unused backpackReward = 51323, - MainReward = 51324, - TeleportAccess = { - Rebel = 51325, - Zlak = 51326, - Zizzle = 51327, - SleepingDragon = 51328, - InnerSanctum = 51329, - AwarnessEmperor = 51330, - Wote10 = 51331, - BossRoom = 51332, - }, - }, Postman = { -- Reserved storage from 51360 - 51389 Mission01 = 51360, @@ -2308,10 +2270,48 @@ Storage = { }, U8_6 = { -- update 8.6 - Reserved Storages 42951 - 43200 AFathersBurden = {}, - AnInterestInBotany = {}, TheSpiritWillGetYou = {}, WayfarerOutfits = {}, - WrathOfTheEmperor = {}, + WrathOfTheEmperor = { + Questline = 43000, + Mission01 = 43001, + Mission02 = 43002, + Mission03 = 43003, + Mission04 = 43004, + Mission05 = 43005, + Mission06 = 43006, + Mission07 = 43007, + Mission08 = 43008, + Mission09 = 43009, + Mission10 = 43010, + Mission11 = 43011, + Mission12 = 43012, + Message = 43013, --1068 + GuardcaughtYou = 43014, --1062 + ZumtahStatus = 43015, --1066 + PrisonReleaseStatus = 43017, --1067 + GhostOfAPriest01 = 43018, --1070 + GhostOfAPriest02 = 43019, --1071 + GhostOfAPriest03 = 43020, --1072 + InterdimensionalPotion = 43021, --1084 + BossStatus = 43022, --1090 + -- unused platinumReward = 43023, + -- unused backpackReward = 43024, + MainReward = 43025, + TeleportAccess = { + Rebel = 43026, + Zlak = 43027, + Zizzle = 43028, + SleepingDragon = 43029, + InnerSanctum = 43030, + AwarnessEmperor = 43031, + Wote10 = 43032, + BossRoom = 43033, + }, + Chest100PlatinumCoins = 43034, + ChestBag = 43035, + ChestItems = 43036, + }, }, U8_61 = { -- update 8.61 - Reserved Storages 43201 - 43230 RiseOfDevovorga = {}, diff --git a/data-otservbr-global/npc/a_sleeping_dragon.lua b/data-otservbr-global/npc/a_sleeping_dragon.lua index 698533ebf1a..89f98bf9da8 100644 --- a/data-otservbr-global/npc/a_sleeping_dragon.lua +++ b/data-otservbr-global/npc/a_sleeping_dragon.lua @@ -47,7 +47,7 @@ end local function greetCallback(npc, creature) local playerId = creature:getId() - if Player(creature):getStorageValue(Storage.WrathoftheEmperor.Questline) == 27 then + if Player(creature):getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 27 then npcHandler:setMessage(MESSAGE_GREET, "ZzzzZzzZz...chrrr...") else npcHandler:setMessage(MESSAGE_GREET, "Greetings, {wayfarer}.") @@ -63,8 +63,8 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 27 then - if (message == "SOLOSARASATIQUARIUM") and player:getStorageValue(Storage.WrathoftheEmperor.InterdimensionalPotion) == 1 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 27 then + if (message == "SOLOSARASATIQUARIUM") and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.InterdimensionalPotion) == 1 then npcHandler:say({ "Dragon dreams are golden. ...", "A broad darkness surrounds you as if a heavy curtain is closing before your eyes. After what seems like minutes of floating through emptiness, you get the feeling as if a hole opens in the dark before you. ...", @@ -123,25 +123,21 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You head north passing countless stones in the crimson sea of stones beneath your feet.", npc, creature) npcHandler:setTopic(playerId, 14) elseif message:lower() == "use attachment" and npcHandler:getTopic(playerId) == 14 then + npcHandler:say("Avoiding the bright light, you carefully put the attachment on top of the strange socket. ...", npc, creature) + npcHandler:setTopic(playerId, 15) + elseif message:lower() == "take mirror" and npcHandler:getTopic(playerId) == 15 then npcHandler:say({ - "Avoiding the bright light, you carefully put the attachment on top of the strange socket. ...", "As your eyes adjust to the sudden reduction of brightness, you see the giant wings of the gate before you move to the side. You can also make out something shiny on the ground.", + "You pick the mirror from the ground.", }, npc, creature) - npcHandler:setTopic(playerId, 15) - elseif message:lower() == "take mirror" and npcHandler:getTopic(playerId) == 15 then - npcHandler:say("You pick the mirror from the ground.", npc, creature) npcHandler:setTopic(playerId, 16) elseif message:lower() == "north" and npcHandler:getTopic(playerId) == 16 then - npcHandler:say({ - "Your path to the north is open. You pass the gigantic gate wings to your left and right as you advance. After about an hour of travel you hear a slight rustling in the distance. You head further into that direction. ...", - "The rustling gets louder until you come to a small dune. Behind it you find the source of the noise.", - }, npc, creature) + npcHandler:say("Your path to the north is open. You pass the gigantic gate wings to your left and right as you advance. After about an hour of travel you hear a slight rustling in the distance. You head further into that direction. ...", npc, creature) npcHandler:setTopic(playerId, 17) elseif message:lower() == "use model" and npcHandler:getTopic(playerId) == 17 then npcHandler:say({ "You lunge out and throw the model far into the water. As nothing happens, you turn your back to the ocean. ...", "The very moment you walk down the dune to head back south, rays of light burst over your head in a shock wave that makes you tumble down the rest of the hill. ...", - "You can also hear a deep loud scraping for several minutes somewhere far in the west.", }, npc, creature) npcHandler:setTopic(playerId, 18) elseif message:lower() == "south" and npcHandler:getTopic(playerId) == 18 then @@ -162,34 +158,31 @@ local function creatureSayCallback(npc, creature, type, message) elseif message:lower() == "west" and npcHandler:getTopic(playerId) == 23 then npcHandler:say("You leave the massive open gate behind you and go to the west. ", npc, creature) npcHandler:setTopic(playerId, 24) - elseif message:lower() == "bastesh" and npcHandler:getTopic(playerId) == 24 then - npcHandler:say("This huge statue of Bastesh is made from onyx, and thrones on a large plateau which can be reached by a sprawling stairway. She holds a large {sapphire} in her hands. ", npc, creature) + elseif message:lower() == "take sapphire" and npcHandler:getTopic(playerId) == 24 then + npcHandler:say("You carefully remove the sapphire from Bastesh's grasp.", npc, creature) npcHandler:setTopic(playerId, 25) - elseif message:lower() == "take sapphire" and npcHandler:getTopic(playerId) == 25 then - npcHandler:say("You carefully remove the sapphire from Bastesh's grasp. ", npc, creature) + elseif message:lower() == "east" and npcHandler:getTopic(playerId) == 25 then + npcHandler:say("You head back to the east and to the plateau.", npc, creature) npcHandler:setTopic(playerId, 26) - elseif message:lower() == "east" and npcHandler:getTopic(playerId) == 26 then - npcHandler:say("You head back to the east and to the plateau. ", npc, creature) + elseif message:lower() == "south" and npcHandler:getTopic(playerId) == 26 then + npcHandler:say("You head back south to the site with the onyx lookout.", npc, creature) npcHandler:setTopic(playerId, 27) - elseif message:lower() == "south" and npcHandler:getTopic(playerId) == 27 then - npcHandler:say("You head back south to the site with the onyx lookout. ", npc, creature) + elseif message:lower() == "east" and npcHandler:getTopic(playerId) == 27 then + npcHandler:say("You return to the plateau in the east.", npc, creature) npcHandler:setTopic(playerId, 28) - elseif message:lower() == "east" and npcHandler:getTopic(playerId) == 28 then - npcHandler:say("You return to the plateau in the east. ", npc, creature) + elseif message:lower() == "use stand" and npcHandler:getTopic(playerId) == 28 then + npcHandler:say("You put the stand into a small recess you find near the middle of the plateau.", npc, creature) npcHandler:setTopic(playerId, 29) - elseif message:lower() == "use stand" and npcHandler:getTopic(playerId) == 29 then - npcHandler:say("You put the stand into a small recess you find near the middle of the plateau. ", npc, creature) + elseif message:lower() == "use ruby" and npcHandler:getTopic(playerId) == 29 then + npcHandler:say("As the ruby slips into the notch, the strong red of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision.", npc, creature) npcHandler:setTopic(playerId, 30) - elseif message:lower() == "use ruby" and npcHandler:getTopic(playerId) == 30 then - npcHandler:say("As the ruby slips into the notch, the strong red of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision. ", npc, creature) + elseif message:lower() == "use sapphire" and npcHandler:getTopic(playerId) == 30 then + npcHandler:say("As the sapphire slips into the notch, the deep blue of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision.", npc, creature) npcHandler:setTopic(playerId, 31) - elseif message:lower() == "use sapphire" and npcHandler:getTopic(playerId) == 31 then - npcHandler:say("As the sapphire slips into the notch, the deep blue of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision. ", npc, creature) + elseif message:lower() == "use emerald" and npcHandler:getTopic(playerId) == 31 then + npcHandler:say("As the emerald slips into the notch, the vibrant green of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision.", npc, creature) npcHandler:setTopic(playerId, 32) - elseif message:lower() == "use emerald" and npcHandler:getTopic(playerId) == 32 then - npcHandler:say("As the emerald slips into the notch, the vibrant green of the stone intensifies a thousandfold. You fear to hurt your eyes and turn away immediately. The ray seems to be directed to the centre of the plateau with astounding precision. ", npc, creature) - npcHandler:setTopic(playerId, 33) - elseif message:lower() == "use mirror" and npcHandler:getTopic(playerId) == 33 then + elseif message:lower() == "use mirror" and npcHandler:getTopic(playerId) == 32 then npcHandler:say({ "With your eyes covered and avoiding direct sight of the rays, you put the mirror into the stand. ...", "Instinctively you run to a larger emerald bluff near the raise to find cover. Mere seconds after you claimed the sturdy shelter, a deep dark humming starts to swirl through the air. ...", @@ -200,11 +193,11 @@ local function creatureSayCallback(npc, creature, type, message) "The growl transforms into a scream, everything around you seems to compress. As you press yourself tightly against the bluff, everything falls silent and in a split second, the dark being dissolves into bursts of blackness. You wake.", }, npc, creature) player:addAchievement("Wayfarer") - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 28) - player:setStorageValue(Storage.WrathoftheEmperor.Mission09, 2) --Questlog, Wrath of the Emperor "Mission 09: The Sleeping Dragon" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 28) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, 2) --Questlog, Wrath of the Emperor "Mission 09: The Sleeping Dragon" npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 28 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 28 then if MsgContains(message, "wayfarer") then npcHandler:say("I call you the wayfarer. You travelled through my dreams. You ultimately freed my mind. My mind accepted you and so will I.", npc, creature) elseif MsgContains(message, "mission") then @@ -223,8 +216,8 @@ local function creatureSayCallback(npc, creature, type, message) "The transfer was successful. ...", "You are now prepared to enter the realm of the evildoer. I am grateful for your help, wayfarer. Should you seek my council, use this charm I cede to you. For my spirit will guide you wherever you are. May you enjoy a sheltered future, you shall prevail.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 29) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 1) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 29) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 1) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:addItem(10343, 1) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/awarness_of_the_emperor.lua b/data-otservbr-global/npc/awarness_of_the_emperor.lua index b8dd66675ca..ab8269493d3 100644 --- a/data-otservbr-global/npc/awarness_of_the_emperor.lua +++ b/data-otservbr-global/npc/awarness_of_the_emperor.lua @@ -46,7 +46,7 @@ npcType.onCloseChannel = function(npc, creature) end local function greetCallback(npc, creature) - if Player(creature):getStorageValue(Storage.WrathoftheEmperor.Questline) < 31 then + if Player(creature):getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) < 31 then npcHandler:setMessage(MESSAGE_GREET, "I am not here to fight you, fool. Like it or not, we will have to work together to stop the catastrophe you and that priest have initiated.") else npcHandler:setMessage(MESSAGE_GREET, "Greetings, mortal. Be aware that you are trying my patience while we are talking.") @@ -64,7 +64,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "mission") then local player = Player(creature) - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 30 and player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 5 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 30 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 5 then npcHandler:say({ "The amplified force of the snake god is tearing the land apart. It is using my crystals in a reverse way to drain the vital force from the land and its inhabitants to fuel its power. ...", "I will withstand its influence as good as possible and slow this process. You will have to fight its worldly incarnation though. ...", @@ -74,7 +74,7 @@ local function creatureSayCallback(npc, creature, type, message) "Be prepared for the fight of your life! Are you ready?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 32 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 32 then npcHandler:say({ "So you have mastered the crisis you invoked with your foolishness. I should crush you for your involvement right here and now. ...", "But such an act would bring me down to your own barbaric level and only fuel the corruption that destroys the land that I own. Therefore I will not only spare your miserable life but show your the generosity of the dragon emperor. ...", @@ -82,19 +82,18 @@ local function creatureSayCallback(npc, creature, type, message) "I grant you three chests - filled to the lid with platinum coins, a house in the city in which you may reside, a set of the finest armor Zao has to offer, and a casket of never-ending mana. ...", "Speak with magistrate Izsh in the ministry about your reward. And now leave before I change my mind!", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.SleepingDragon, 2) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 33) - player:setStorageValue(Storage.WrathoftheEmperor.Mission12, 0) --Questlog, Wrath of the Emperor "Mission 12: Just Rewards" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, 2) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 33) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then local player = Player(creature) player:teleportTo(Position(33360, 31397, 9)) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.AwarnessEmperor, 1) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Wote10, 1) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.BossRoom, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 31) - player:setStorageValue(Storage.WrathoftheEmperor.Mission11, 1) --Questlog, Wrath of the Emperor "Mission 11: Payback Time" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.AwarnessEmperor, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Wote10, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.BossRoom, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 31) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, 1) --Questlog, Wrath of the Emperor "Mission 11: Payback Time" npcHandler:say("So be it!", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/chartan.lua b/data-otservbr-global/npc/chartan.lua index 8be69fc06da..41be66800c9 100644 --- a/data-otservbr-global/npc/chartan.lua +++ b/data-otservbr-global/npc/chartan.lua @@ -54,13 +54,13 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 2 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 2 then npcHandler:say("Mhm, what are you doing here. Who zent you? ", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 3 then npcHandler:say("Zo are you ready to get zomezing done?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 5 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 5 then npcHandler:say("Zo? Did you find a way to reztore ze teleporter? ", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -74,8 +74,8 @@ local function creatureSayCallback(npc, creature, type, message) "I zee. Interezting. ... ", "You being here meanz we have eztablished connectionz to ze zouz. Finally. And you are going to help uz. Well, zere iz zertainly a lot for you to do. Zo better get ztarted. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 3) - player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 3) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 3) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, 3) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "yes") then @@ -87,23 +87,25 @@ local function creatureSayCallback(npc, creature, type, message) "Zere were meanz to activate teleporterz zomewhere in ze complex. But zinze you cannot reach all ze roomz, I guezz you will have to improvize. ... ", "Here iz ze key to ze entranze to ze complex. Figure zomezing out, reztore ze teleporter zo we can get back to ze plainz in ze zouz. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 4) - player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 1) --Questlog, Wrath of the Emperor "Mission 02: First Contact" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 4) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, 1) --Questlog, Wrath of the Emperor "Mission 02: First Contact" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say({ "You did it! Zere waz zome kind of zparkle and I zink it iz working again - oh pleaze feel free to try it, I uhm, I will wait here and be ready juzt in caze zomezing uhm happenz to you. ... ", "And if you head to Zalamon, be zure to inform him about our zituation. Food rationz are running low and we are ztill not well equipped. We need to eztablish a working zupply line. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Rebel, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 6) - player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 3) --Questlog, Wrath of the Emperor "Mission 02: First Contact" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Rebel, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 6) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, 3) --Questlog, Wrath of the Emperor "Mission 02: First Contact" npcHandler:setTopic(playerId, 0) end end return true end +npcHandler:setMessage(MESSAGE_GREET, "Great Znake forgive me to converze wiz ziz unworzy blankzkin.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/gate_guardian.lua b/data-otservbr-global/npc/gate_guardian.lua index 026db634934..cef450aedb2 100644 --- a/data-otservbr-global/npc/gate_guardian.lua +++ b/data-otservbr-global/npc/gate_guardian.lua @@ -54,15 +54,15 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") or MsgContains(message, "pass") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 13 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 13 then npcHandler:say("You want entranzzze to zzze zzzity?", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Mh, zzzezzze paperzzz zzzeem legit, I have orderzzz to let you pazzz. Zzzo be it.", npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 22) - player:setStorageValue(Storage.WrathoftheEmperor.Mission05, 2) --Questlog, Wrath of the Emperor "Mission 05: New in Town" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 22) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, 2) --Questlog, Wrath of the Emperor "Mission 05: New in Town" player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(Position(33114, 31197, 7), false) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -72,6 +72,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Chhhhzzz. Ugly humanzzz! You better have a good reazzzon to be here!") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/ghost_of_a_priest.lua b/data-otservbr-global/npc/ghost_of_a_priest.lua index b73a40fbea1..0469ec86d5d 100644 --- a/data-otservbr-global/npc/ghost_of_a_priest.lua +++ b/data-otservbr-global/npc/ghost_of_a_priest.lua @@ -54,8 +54,8 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") or MsgContains(message, "sceptre") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 10 then - if player:getPosition().z == 12 and player:getStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest01) < 1 and npcHandler:getTopic(playerId) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 10 then + if player:getPosition().z == 12 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest01) < 1 and npcHandler:getTopic(playerId) ~= 1 then npcHandler:say({ "Although we are willing to hand this item to you, there is something you have to understand: There is no such thing as 'the' sceptre. ...", "Those sceptres are created for special purposes each time anew. Therefore you will have to create one on your own. It will be your {mission} to find us three keepers and to get the three parts of the holy sceptre. ...", @@ -68,13 +68,13 @@ local function creatureSayCallback(npc, creature, type, message) "The equivalent of 5000 gold will do. Are you willing to make such a donation?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getPosition().z == 13 and player:getStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest02) < 1 then + elseif player:getPosition().z == 13 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest02) < 1 then npcHandler:say({ "Even though we are spirits, we can't create anything out of thin air. You will have to donate some precious metal which we can drain for energy and substance. ...", "The equivalent of 5000 gold will do. Are you willing to make such a donation?", }, npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getPosition().z == 14 and player:getStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest03) < 1 then + elseif player:getPosition().z == 14 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest03) < 1 then npcHandler:say({ "Even though we are spirits, we can't create anything out of thin air. You will have to donate some precious metal which we can drain for energy and substance. ...", "The equivalent of 5000 gold will do. Are you willing to make such a donation?", @@ -85,7 +85,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then if player:getMoney() + player:getBankBalance() >= 5000 then - player:setStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest01, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest01, 1) player:removeMoneyBank(5000) player:addItem(11368, 1) npcHandler:say("So be it! Here is my part of the sceptre. Combine it with the other parts on the altar of the Great Snake in the depths of this temple.", npc, creature) @@ -93,7 +93,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 3 then if player:getMoney() + player:getBankBalance() >= 5000 then - player:setStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest02, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest02, 1) player:removeMoneyBank(5000) player:addItem(11369, 1) npcHandler:say("So be it! Here is my part of the sceptre. Combine it with the other parts on the altar of the Great Snake in the depths of this temple.", npc, creature) @@ -101,7 +101,7 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 4 then if player:getMoney() + player:getBankBalance() >= 5000 then - player:setStorageValue(Storage.WrathoftheEmperor.GhostOfAPriest03, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GhostOfAPriest03, 1) player:removeMoneyBank(5000) player:addItem(11370, 1) npcHandler:say("So be it! Here is my part of the sceptre. Combine it with the other parts on the altar of the Great Snake in the depths of this temple.", npc, creature) diff --git a/data-otservbr-global/npc/izsh.lua b/data-otservbr-global/npc/izsh.lua index 2da27ccc1a5..05573cf44aa 100644 --- a/data-otservbr-global/npc/izsh.lua +++ b/data-otservbr-global/npc/izsh.lua @@ -54,7 +54,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if Player(creature):getStorageValue(Storage.WrathoftheEmperor.Questline) == 33 then + if Player(creature):getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 33 then npcHandler:say("Oh yez, let me zee ze documentz. Here we go: zree cheztz filled wiz platinum, one houze, a zet of elite armor, and an unending mana cazket. Iz ziz correct?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -71,7 +71,8 @@ local function creatureSayCallback(npc, creature, type, message) "You will find your rewardz in one of ze old zupply zellarz. Beware of ze ratz zough. ...", "Ze rednezz of your faze and ze zound you make wiz your teez iz obviouzly a zign of gratitude of your zpeziez! I am flattered, but pleaze leave now az I have to attend to zome important buzinezz.", }, npc, creature) - Player(creature):setStorageValue(Storage.WrathoftheEmperor.Questline, 34) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 34) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission12, 0) --Questlog, Wrath of the Emperor "Mission 12: Just Rewards" npcHandler:setTopic(playerId, 0) end return true diff --git a/data-otservbr-global/npc/lizard_tunnel_guard.lua b/data-otservbr-global/npc/lizard_tunnel_guard.lua index 4fa13285212..dc836ebcebf 100644 --- a/data-otservbr-global/npc/lizard_tunnel_guard.lua +++ b/data-otservbr-global/npc/lizard_tunnel_guard.lua @@ -49,8 +49,8 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) >= 2 then - player:setStorageValue(Storage.WrathoftheEmperor.GuardcaughtYou, 1) + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) >= 2 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GuardcaughtYou, 1) player:removeCondition(CONDITION_OUTFIT) player:removeItem(11328, 1) player:teleportTo(Position(33361, 31206, 8)) diff --git a/data-otservbr-global/npc/zalamon.lua b/data-otservbr-global/npc/zalamon.lua index a2fe866ede3..555f1349471 100644 --- a/data-otservbr-global/npc/zalamon.lua +++ b/data-otservbr-global/npc/zalamon.lua @@ -163,16 +163,16 @@ local function creatureSayCallback(npc, creature, type, message) -- CHILDREN OF REVOLUTION QUEST -- WRATH OF THE EMPEROR QUEST - elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 21 and player:getStorageValue(Storage.WrathoftheEmperor.Questline) < 1 then + elseif player:getStorageValue(Storage.Quest.U8_54.ChildrenOfTheRevolution.Questline) == 21 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) < 1 then npcHandler:say({ "Zze attackzz have weakened our enemy zzignificantly. Yet, your quezzt continuezz. Bezzidezz zzome tazzkzz you could take, zze zzreat of zze emperor izz zztill hanging over our headzz like a rain cloud. ... ", "Zzo, are you indeed willing to continue zze fight for our cauzze? ", }, npc, creature) npcHandler:setTopic(playerId, 14) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 1 then npcHandler:say("Ah you have returned. I azzume you already found zzome itemzz to build a proper dizzguizze? ", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 6 then npcHandler:say({ "You ezztablished zze connection to zze hideout, good. But zzizz izz no time to rezzt. Your new tazzk will be quite different. ... ", "Zze gardenzz are plagued by a creature. Zze former keeper of zzizz garden became an abomination of madnezz zzat needzz to be zztopped. ... ", @@ -181,10 +181,10 @@ local function creatureSayCallback(npc, creature, type, message) "Now go - what are you waiting for, zzoftzzkin? Ready to finish what needzz to be finished? ", }, npc, creature) npcHandler:setTopic(playerId, 19) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 8 then npcHandler:say("Zzo... you finished him. Show me hizz head, will you? ", npc, creature) npcHandler:setTopic(playerId, 20) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 9 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 9 then npcHandler:say({ "At zze dawn of time, zze children of zze Great Zznake were numerouzz. Zzey daringly colonizzed many partzz of zze world. But all bravery did not help againzzt zze sheer number of enemiezz zzey encountered. ... ", "And while zze entitiezz zze unbelieverzz call godzz battled for power out of vanity, zze fazze of zze world changed violently. ... ", @@ -197,13 +197,13 @@ local function creatureSayCallback(npc, creature, type, message) "A shaft, a cuzzp, and an emerald form a zzeptre of zzuch power zzat zze partzz were hidden and are now guarded by vile creaturezz. ... ", "Find it. Retrieve it. And bring it back to me. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 10) - player:setStorageValue(Storage.WrathoftheEmperor.Mission04, 1) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 10) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, 1) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 11 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 11 then npcHandler:say("You - azzembled zze zzeptre? Hand it out, give it to me, will you? ", npc, creature) npcHandler:setTopic(playerId, 21) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 12 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 12 then npcHandler:say({ "Now we need to get clozzer to zze emperor himzzelf. A hive of beezz would defend zzeir queen wizz zzeir lives in cazze an enemy gained entranzze. Zzizz makezz a formidable defenzze line, nearly inviolable. ... ", "But a zztranger directly in zze midzzt of zze hive will be acczzepted - after all it izz not pozzible to overcome zzuch a formidable defenzze which izz nearly inviolable, or izz it? Ha. ... ", @@ -212,8 +212,8 @@ local function creatureSayCallback(npc, creature, type, message) "We have alzzo forged zome paperzz for you and zzent zzem to zze zzity. Your victory in zze arena iz well known in our land. Wizz zze help of zzezze paperzz you will pretend zzat zzome of zze higher officialzz want to talk to you about your battle. ... ", "Zzizz way you will be able to enter zze zzity of zze dragon emperor and meet our contact zzere in zze imperial offizze. He will give you zze next inzztructionzz. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 13) - player:setStorageValue(Storage.WrathoftheEmperor.Mission05, 1) --Questlog, Wrath of the Emperor "Mission 05: New in Town" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 13) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, 1) --Questlog, Wrath of the Emperor "Mission 05: New in Town" npcHandler:setTopic(playerId, 0) -- WRATH OF THE EMPEROR QUEST end @@ -360,8 +360,8 @@ local function creatureSayCallback(npc, creature, type, message) "One of zzem izz uzzed azz a maintenanzze connection by enemy lizardzz. To enter it, you will have to uzze a dizzguizze. Zzomezzing like a crate perhapzz. ... ", "Mh, if you can find zzome nailzz - 3 should be enough - and 1 piezze of wood, I should be able to create an appropriate cazzing. Return to me if you found zze itemzz and we will talk about zze next zztep. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 1) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, 1) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 16 then npcHandler:say({ @@ -373,8 +373,8 @@ local function creatureSayCallback(npc, creature, type, message) if player:getItemCount(953) >= 3 and player:getItemCount(5901) >= 1 then player:removeItem(5901, 1) player:removeItem(953, 3) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 2) - player:setStorageValue(Storage.WrathoftheEmperor.Mission01, 2) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 2) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, 2) --Questlog, Wrath of the Emperor "Mission 01: Catering the Lions Den" player:addItem(11328, 1) npcHandler:say({ "Alright. Let uzz create a crate. Hm. Let me zzee. ... ", @@ -394,21 +394,21 @@ local function creatureSayCallback(npc, creature, type, message) "Fine. I guezz poizzoning zzome of hizz plantzz will be enough to lure him out of hizz conzzealment. Zzizz plant poizzon here should allow you to do zzome zzignificant damage, take it. ... ", "You can find him eazzt of zze corrupted gardenzz. Zzere uzzed to be a zzmall domizzile zzere but it hazz probably been conzzumed by zze corruption zzo beware. And now - go. ", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 7) - player:setStorageValue(Storage.WrathoftheEmperor.Mission03, 1) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 7) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 1) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" player:addItem(11364, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 20 then if player:removeItem(11367, 1) then npcHandler:say("Zzizz izz not hizz head but clearly belonged to zze keeper. I - I am imprezzed. You can go now. Leave me alone for a zzecond. ", npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 9) - player:setStorageValue(Storage.WrathoftheEmperor.Mission03, 3) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 9) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 3) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 21 then if player:removeItem(11371, 1) then - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 12) - player:setStorageValue(Storage.WrathoftheEmperor.Mission04, 3) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 12) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, 3) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" npcHandler:say("Finally. At lazzt. Zze zzeptre izz - ourzz. Ourzz of courzze. A weapon we should uzze wizzely for our cauzze. I need a zzecond or two. Do you leave me already? ", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/zizzle.lua b/data-otservbr-global/npc/zizzle.lua index 4313f142a9b..e0f87074172 100644 --- a/data-otservbr-global/npc/zizzle.lua +++ b/data-otservbr-global/npc/zizzle.lua @@ -54,14 +54,14 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 25 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 25 then npcHandler:say("You made it! Az zoon az you are prepared, I will brief you for your nexzt mizzion. ", npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Mission08, 2) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" - player:setStorageValue(Storage.WrathoftheEmperor.Mission09, 0) --door access - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Zizzle, 3) --teleport access - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 26) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, 2) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, 0) --door access + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zizzle, 3) --teleport access + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 26) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 26 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 26 then npcHandler:say({ "Ze dragon emperor controlz ze whole empire wiz hiz willpower. But even he iz not powerful enough to uze ziz control continuouzly wizout zome form of aid. ... ", "Wiz ze ancient zeptre zat you acquired for uz earlier, I can charge ozer zeptrez wiz azpectz of power of ze Great Znake. If you manage to touch one of ze tranzmitter cryztalz wiz ze zeptre, itz godly power will realign ze cryztal. ...", @@ -72,8 +72,8 @@ local function creatureSayCallback(npc, creature, type, message) "A zignificant part of ze emperor'z power iz uzed to reztrain ze dragon. Ze only way to free him will be to enter hiz dreamz. Are you prepared for ziz?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 29 then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) < 30 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 29 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) < 30 then npcHandler:say({ "You freed ze dragon! And you pozzezz ze key to enter ze inner realmz of ze emperor, well done. ...", "Now you are ready to reach ze inner zanctum of ze emperor. Zalamon'z revelationz showed him zat zere are four cryztalz channelling ze will of ze emperor into ze land. ...", @@ -84,10 +84,10 @@ local function creatureSayCallback(npc, creature, type, message) "I recommend not to go alone becauze it will be very dangerouz - but ALL of you will have to uze zeir zeptre replicaz on ze emperor'z remainz to prozeed! ...", "You will need it. Now go to the north of Sleeping Dragon room, {dont need talk} with he! Good luck.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.InnerSanctum, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 30) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 2) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.InnerSanctum, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 30) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 2) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 1) player:addItem(11362, 1) npcHandler:setTopic(playerId, 0) else @@ -101,9 +101,9 @@ local function creatureSayCallback(npc, creature, type, message) "Drink it and when you are cloze to ze dragon zpeak: Z...z.. well, juzt take ze sheet wiz ze word and read it yourzelf. A lot of rebelz have died to retrieve ziz information, uze it wizely. ...", "Now go and try to find a way to reach ze emperor and to free ze land from it'z opprezzor. Onze you have found a way, return to me and I will explain what to do wiz ze cryztalz. May ze Great Znake guide you!", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.SleepingDragon, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Mission09, 1) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 27) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, 1) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 27) player:addItem(11372, 1) player:addItem(11426, 1) end diff --git a/data-otservbr-global/npc/zlak.lua b/data-otservbr-global/npc/zlak.lua index c1dd6fc5802..3a2030bab96 100644 --- a/data-otservbr-global/npc/zlak.lua +++ b/data-otservbr-global/npc/zlak.lua @@ -54,27 +54,27 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 22 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 22 then npcHandler:say({ "Ze rumour mill iz quite fazt. Ezpecially when zomeone unuzual az you enterz ze zity. Zoon zey will learn zat you have no reazon to be here and our raze will be buzted. ...", "Zo we have to ztrike fazt and quickly. You will have to eliminate zome high ranking key officialz. I zink killing four of zem should be enough. ...", "Ziz will dizrupt ze order in ze zity zignificantly zinze zo much dependz on bureaucracy and ze chain of command. Only chaoz and dizorganization will enable me to help you with ze next ztep in ze plan.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Zlak, 1) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 23) - player:setStorageValue(Storage.WrathoftheEmperor.Mission05, 3) --Questlog, Wrath of the Emperor "Mission 05: New in Town" - player:setStorageValue(Storage.WrathoftheEmperor.Mission06, 0) --Questlog, Wrath of the Emperor "Mission 06: The Office Job" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zlak, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 23) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, 3) --Questlog, Wrath of the Emperor "Mission 05: New in Town" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, 0) --Questlog, Wrath of the Emperor "Mission 06: The Office Job" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 23 and player:getStorageValue(Storage.WrathoftheEmperor.Mission06) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 23 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06) == 5 then npcHandler:say({ "Chaoz and panic are already zpreading. Your barbaric brutality iz frightening effectively. I could acquire a key zat we need to get you into ze palaze itzelf. But zere are ztill too many guardz and elite zquadz even for you to fight. ...", "I need you to enter ze zity and zlay at leazt zix noblez. Ze otherz will feel zreatened and call guardz to zemzelvez, and ze dragon kingz will accuze each ozer to be rezponzible for zlaying zeir pet noblez. ...", "Zat should enable uz to give you at leazt a chanze to attack ze palaze.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 24) - player:setStorageValue(Storage.WrathoftheEmperor.Mission07, 0) --Questlog, Wrath of the Emperor "Mission 07: A Noble Cause" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 24) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, 0) --Questlog, Wrath of the Emperor "Mission 07: A Noble Cause" npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 24 and player:getStorageValue(Storage.WrathoftheEmperor.Mission07) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 24 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07) == 6 then if npcHandler:getTopic(playerId) ~= 1 then npcHandler:say({ "Word of your deedz iz already zpreading like a wildfire. Zalamon'z plan to unleash zome murderouz beaztz in ze zity workz almozt too well. You are already becoming zome kind of legend with which motherz frighten zeir unruly hatchlingz. ...", @@ -88,8 +88,8 @@ local function creatureSayCallback(npc, creature, type, message) "Meanwhile, you will take ze old ezcape tunnel zat leadz from ze abandoned bazement in ze norz of ze miniztry to a lift zat endz zomewhere in ze palaze. ...", "When everyzing workz according to ze plan, you will meet Zalamon zomewhere in the underground part of ze palaze.", }, npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.Mission08, 1) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 25) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, 1) --Questlog, Wrath of the Emperor "Mission 08: Uninvited Guests" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 25) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/zumtah.lua b/data-otservbr-global/npc/zumtah.lua index 97ba7b3c779..b4d1e1d45e1 100644 --- a/data-otservbr-global/npc/zumtah.lua +++ b/data-otservbr-global/npc/zumtah.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "exit") then - if player:getStorageValue(Storage.WrathoftheEmperor.ZumtahStatus) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.ZumtahStatus) ~= 1 then if npcHandler:getTopic(playerId) < 1 then npcHandler:say("You are searching for the way out? Do you want to go home? Are you homesick, nostalgic, allergic? I am sorry. You will stay. Muhahahaha. Haha. Are you giving up then?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -66,7 +66,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("A what? I don't even know what you're talking about, human. If you aren't just giving up - will you kindly change the topic please?", npc, creature) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 6 then - npcHandler:say("I'm not sure, there is an entry, though. Muhahaha. And isn't that enough after all?", npc, creature) + npcHandler:say("Haha, no! No. Why don't you just stop asking me that and start enjoying your stay here?", npc, creature) npcHandler:setTopic(playerId, 7) elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say("Oh, you mean - if I have ever been out of here in those 278 years? Well, I - I can't remember. No, I can't remember. Sorry.", npc, creature) @@ -87,13 +87,13 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 14 then npcHandler:say({ "Alright, as I said you are free now. There will not be an outside for the next three centuries, but you - go. ...", "Oh and I recovered the strange crate you where hiding in, it will wait for you at the exit since you can't carry it as... a beetle, muhaha. Yes, you shall now crawl through the passage as a beetle. There you go." }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.WrathoftheEmperor.ZumtahStatus, 1) - player:setStorageValue(Storage.WrathoftheEmperor.PrisonReleaseStatus, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.ZumtahStatus, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.PrisonReleaseStatus, 1) player:addCondition(condition) end else npcHandler:say("It's you, why did they throw you in here again? Anyway, I will just transform you once more. I also recovered your crate which will wait for you at the exit. There, feel free to go.", npc, creature) - player:setStorageValue(Storage.WrathoftheEmperor.PrisonReleaseStatus, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.PrisonReleaseStatus, 1) player:addCondition(condition) end elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/scripts/actions/other/others/quest_system1.lua b/data-otservbr-global/scripts/actions/other/others/quest_system1.lua index 1c2808523a6..ea7e629a95f 100644 --- a/data-otservbr-global/scripts/actions/other/others/quest_system1.lua +++ b/data-otservbr-global/scripts/actions/other/others/quest_system1.lua @@ -1,7 +1,7 @@ local specialQuests = { -- {x = 32311, y = 32211, z = 8} [51400] = Storage.Quest.U8_2.TheThievesGuildQuest.Reward, - [51324] = Storage.WrathoftheEmperor.MainReward, + [51324] = Storage.Quest.U8_6.WrathOfTheEmperor.MainReward, -- {x = 32232, y = 31066, z = 7} [51715] = Storage.Quest.U8_0.BarbarianArena.RewardGreenhorn, -- {x = 32232, y = 31059, z = 7} diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index 388b73d28f4..d3d8fb36bc4 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -249,17 +249,17 @@ local questTable = { { storage = Storage.Quest.U7_8.FriendsAndTraders.TheMermaidMarina, storageValue = 2 }, { storage = Storage.Quest.U7_8.FriendsAndTraders.TheBlessedStake, storageValue = 12 }, { storage = 100157, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.Questline, storageValue = 29 }, - { storage = Storage.WrathoftheEmperor.Mission01, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission02, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission03, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission04, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission05, storageValue = 3 }, - { storage = Storage.WrathoftheEmperor.Mission06, storageValue = 4 }, - { storage = Storage.WrathoftheEmperor.Mission07, storageValue = 6 }, - { storage = Storage.WrathoftheEmperor.Mission08, storageValue = 2 }, - { storage = Storage.WrathoftheEmperor.Mission09, storageValue = 2 }, - { storage = Storage.WrathoftheEmperor.Mission10, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Questline, storageValue = 29 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission01, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission05, storageValue = 3 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, storageValue = 4 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, storageValue = 6 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission08, storageValue = 2 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission09, storageValue = 2 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, storageValue = 1 }, { storage = Storage.Quest.U7_6.TheApeCity.Started, storageValue = 1 }, { storage = Storage.Quest.U7_6.TheApeCity.Questline, storageValue = 18 }, { storage = Storage.BanutaSecretTunnel.DeeperBanutaShortcut, storageValue = 1 }, @@ -319,14 +319,14 @@ local questTable = { { storage = Storage.Quest.U12_00.TheDreamCourts.AndrewDoor, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.AwarnessEmperor, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.BossRoom, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.InnerSanctum, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.Rebel, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.SleepingDragon, storageValue = 2 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.Wote10, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.Zizzle, storageValue = 1 }, - { storage = Storage.WrathoftheEmperor.TeleportAccess.Zlak, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.AwarnessEmperor, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.BossRoom, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.InnerSanctum, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Rebel, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, storageValue = 2 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Wote10, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zizzle, storageValue = 1 }, + { storage = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zlak, storageValue = 1 }, { storage = Storage.TheSecretLibrary.FalconBastionAccess, storageValue = 1 }, { storage = Storage.TheSecretLibrary.LowerBastionAccess, storageValue = 1 }, diff --git a/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_zalamon_door.lua b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_zalamon_door.lua index 82932833c41..ecb3ecd9843 100644 --- a/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_zalamon_door.lua +++ b/data-otservbr-global/scripts/quests/children_of_the_revolution/actions_zalamon_door.lua @@ -3,7 +3,7 @@ local TheNewFrontier = Storage.Quest.U8_54.TheNewFrontier local childrenZalamon = Action() function childrenZalamon.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(TheNewFrontier.Mission08) >= 2 and player:getStorageValue(Storage.WrathoftheEmperor.Mission11) < 2 then + if player:getStorageValue(TheNewFrontier.Mission08) >= 2 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11) < 2 then if item.itemid == 9874 then player:teleportTo(toPosition, true) item:transform(item.itemid + 1) diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_crate.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_crate.lua similarity index 87% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_crate.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_crate.lua index 1fc09485898..8f4fa8fc4f8 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_crate.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_crate.lua @@ -4,7 +4,7 @@ condition:setTicks(-1) local wrathEmperorMiss1Crate = Action() function wrathEmperorMiss1Crate.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 2 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 2 then player:say("You remove its top and pull the crate over yourself. Inside it is stifling and you can barely see a thing when looking outward.", TALKTYPE_MONSTER_SAY) player:addCondition(condition) player:getPosition():sendMagicEffect(CONST_ME_POFF) diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_lights.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_lights.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission01_lights.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission01_lights.lua diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission02_firstcontact_repair_teleport.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission02_firstcontact_repair_teleport.lua similarity index 87% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission02_firstcontact_repair_teleport.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission02_firstcontact_repair_teleport.lua index 2fd2d315621..ab5b28f8150 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission02_firstcontact_repair_teleport.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission02_firstcontact_repair_teleport.lua @@ -39,9 +39,9 @@ function wrathEmperorMiss2FirstContact.onUse(player, item, fromPosition, target, elseif item.itemid == 11334 and target.actionid == 8025 then player:say("As you give the coal into the pool the corrupted fluid begins to dissolve, leaving purified, refreshing water.", TALKTYPE_MONSTER_SAY) item:remove() - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 4 then - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 5) - player:setStorageValue(Storage.WrathoftheEmperor.Mission02, 2) --Questlog, Wrath of the Emperor "Mission 02: First Contact" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 4 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 5) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission02, 2) --Questlog, Wrath of the Emperor "Mission 02: First Contact" end for i = 1, 4 do waterpos[i]:sendMagicEffect(CONST_ME_GREEN_RINGS) diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission03_the_keeper.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission03_the_keeper.lua similarity index 51% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission03_the_keeper.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission03_the_keeper.lua index ea8d7d09571..8dfb9c82da5 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission03_the_keeper.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission03_the_keeper.lua @@ -1,25 +1,25 @@ local function revertKeeperstorage() - Game.setStorageValue(Storage.WrathoftheEmperor.Mission03, 0) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 0) end local wrathEmperorMiss3Keeper = Action() function wrathEmperorMiss3Keeper.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 11364 and target.actionid == 8026 then - if Game.getStorageValue(Storage.WrathoftheEmperor.Mission03) < 5 then - Game.setStorageValue(Storage.WrathoftheEmperor.Mission03, math.max(0, Game.getStorageValue(Storage.WrathoftheEmperor.Mission03)) + 1) + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03) < 5 then + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, math.max(0, Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03)) + 1) player:say("The plant twines and twiggles even more than before, it almost looks as it would scream great pain.", TALKTYPE_MONSTER_SAY) - elseif Game.getStorageValue(Storage.WrathoftheEmperor.Mission03) == 5 then + elseif Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03) == 5 then player:removeItem(11364, 1) - Game.setStorageValue(Storage.WrathoftheEmperor.Mission03, 6) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 6) toPosition:sendMagicEffect(CONST_ME_YELLOW_RINGS) Game.createMonster("the keeper", { x = 33171, y = 31058, z = 11 }) Position({ x = 33171, y = 31058, z = 11 }):sendMagicEffect(CONST_ME_TELEPORT) addEvent(revertKeeperstorage, 60 * 1000) end elseif item.itemid == 11360 then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 7 then - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 8) - player:setStorageValue(Storage.WrathoftheEmperor.Mission03, 2) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 7 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 8) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 2) --Questlog, Wrath of the Emperor "Mission 03: The Keeper" player:addItem(11367, 1) end end diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission04_sacrament_of_the_snake_sceptre.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission04_sacrament_of_the_snake_sceptre.lua similarity index 67% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission04_sacrament_of_the_snake_sceptre.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission04_sacrament_of_the_snake_sceptre.lua index 8fcecb1769b..84f4d026569 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission04_sacrament_of_the_snake_sceptre.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission04_sacrament_of_the_snake_sceptre.lua @@ -1,13 +1,13 @@ local wrathEmperorMiss4Sacrament = Action() function wrathEmperorMiss4Sacrament.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getItemCount(11368) >= 1 and player:getItemCount(11369) >= 1 and player:getItemCount(11370) >= 1 and player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 10 then + if player:getItemCount(11368) >= 1 and player:getItemCount(11369) >= 1 and player:getItemCount(11370) >= 1 and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 10 then player:removeItem(11368, 1) player:removeItem(11369, 1) player:removeItem(11370, 1) player:addItem(11371, 1) player:getPosition():sendMagicEffect(CONST_ME_HOLYAREA) - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 11) - player:setStorageValue(Storage.WrathoftheEmperor.Mission04, 2) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 11) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission04, 2) --Questlog, Wrath of the Emperor "Mission 04: Sacrament of the Snake" end item:transform(item.itemid == 2772 and 2773 or 2772) return true diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission08_doors.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission08_doors.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission08_doors.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission08_doors.lua diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission08_uninvited_guests_lever.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission08_uninvited_guests_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission08_uninvited_guests_lever.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission08_uninvited_guests_lever.lua diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission09_the_sleeping_dragon_mixture.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission09_the_sleeping_dragon_mixture.lua similarity index 63% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission09_the_sleeping_dragon_mixture.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission09_the_sleeping_dragon_mixture.lua index 2b3d496a277..b1af0fa6c72 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission09_the_sleeping_dragon_mixture.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission09_the_sleeping_dragon_mixture.lua @@ -1,10 +1,10 @@ local wrathEmperorMiss9Sleeping = Action() function wrathEmperorMiss9Sleeping.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.WrathoftheEmperor.InterdimensionalPotion) == 1 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.InterdimensionalPotion) == 1 then return true end - player:setStorageValue(Storage.WrathoftheEmperor.InterdimensionalPotion, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.InterdimensionalPotion, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) item:remove() diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission10_a_message_of_freedom_sceptre.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission10_a_message_of_freedom_sceptre.lua similarity index 54% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission10_a_message_of_freedom_sceptre.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission10_a_message_of_freedom_sceptre.lua index b4bb8b26500..806f7956398 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission10_a_message_of_freedom_sceptre.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission10_a_message_of_freedom_sceptre.lua @@ -13,34 +13,34 @@ function wrathEmperorMiss10Message.onUse(player, item, fromPosition, target, toP Game.setStorageValue(target.uid - 4, 1) elseif target.itemid == 11361 then if toPosition.x > 33034 and toPosition.x < 33071 and toPosition.y > 31079 and toPosition.y < 31102 then - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 1 then - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 2) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 3) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 1 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 2) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 3) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:say("The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_MONSTER_SAY) end elseif toPosition.x > 33080 and toPosition.x < 33111 and toPosition.y > 31079 and toPosition.y < 31100 then - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 2 then - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 3) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 4) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 2 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 3) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 4) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:say("The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_MONSTER_SAY) end elseif toPosition.x > 33078 and toPosition.x < 33112 and toPosition.y > 31106 and toPosition.y < 31127 then - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 3 then - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 4) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 5) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 3 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 4) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 5) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:say("The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_MONSTER_SAY) end elseif toPosition.x > 33035 and toPosition.x < 33069 and toPosition.y > 31107 and toPosition.y < 31127 then - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 4 then - player:setStorageValue(Storage.WrathoftheEmperor.BossStatus, 5) - player:setStorageValue(Storage.WrathoftheEmperor.Mission10, 6) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 4 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus, 5) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission10, 6) --Questlog, Wrath of the Emperor "Mission 10: A Message of Freedom" player:say("The sceptre is almost torn from your hand as you banish the presence of the emperor.", TALKTYPE_MONSTER_SAY) end end elseif target.itemid == 11429 then - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 31 then - player:setStorageValue(Storage.WrathoftheEmperor.Questline, 32) - player:setStorageValue(Storage.WrathoftheEmperor.Mission11, 2) --Questlog, Wrath of the Emperor "Mission 11: Payback Time" + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 31 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline, 32) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, 2) --Questlog, Wrath of the Emperor "Mission 11: Payback Time" end player:say("NOOOoooooooo...!", TALKTYPE_MONSTER_SAY, false, player, toPosition) player:say("This should have dealt the deathblow to the snake things' ambitions.", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission11_payback_time_lever.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission11_payback_time_lever.lua similarity index 85% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission11_payback_time_lever.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission11_payback_time_lever.lua index a32caefdea2..79a216a19aa 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission11_payback_time_lever.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission11_payback_time_lever.lua @@ -15,13 +15,13 @@ local config = { local wrathEmperorMiss11Payback = Action() function wrathEmperorMiss11Payback.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if Game.getStorageValue(Storage.WrathoftheEmperor.Mission11) == 1 then + if Game.getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The arena is already in use.") return true end - Game.setStorageValue(Storage.WrathoftheEmperor.Mission11, 1) - addEvent(Game.setStorageValue, 10 * 60000, Storage.WrathoftheEmperor.Mission11, 0) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, 1) + addEvent(Game.setStorageValue, 10 * 60000, Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, 0) local monsters = Game.getSpectators(config.arenaPosition, false, false, 10, 10, 10, 10) local spectator diff --git a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission12_just_rewards.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission12_just_rewards.lua similarity index 62% rename from data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission12_just_rewards.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission12_just_rewards.lua index b50531b6436..04650628430 100644 --- a/data-otservbr-global/scripts/actions/quests/wrath_of_the_emperor/mission12_just_rewards.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/actions_mission12_just_rewards.lua @@ -1,14 +1,11 @@ local wrathEmperorMiss12Just = Action() + function wrathEmperorMiss12Just.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.WrathoftheEmperor.Mission12) == 0 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission12) == 0 then player:addOutfit(366, 0) player:addOutfit(367, 0) - player:addOutfit(366, 1) - player:addOutfit(367, 1) - player:addOutfit(366, 2) - player:addOutfit(367, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found some clothes in wardrobe") - player:setStorageValue(Storage.WrathoftheEmperor.Mission12, 1) --Questlog, Wrath of the Emperor "Mission 12: Just Rewards" + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission12, 1) --Questlog, Wrath of the Emperor "Mission 12: Just Rewards" player:setStorageValue(1150, 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The wardrobe is empty.") diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/bosses_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_bosses_kill.lua similarity index 93% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/bosses_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_bosses_kill.lua index 37a823a67ac..6fe0de0f933 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/bosses_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_bosses_kill.lua @@ -17,7 +17,7 @@ local bosses = { }, } -local bossesKill = CreatureEvent("WrathOfTheEmperorBossDeat") +local bossesKill = CreatureEvent("WrathOfTheEmperorBossDeath") function bossesKill.onDeath(creature) local bossConfig = bosses[creature:getName():lower()] if not bossConfig then diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/keeper_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_keeper_kill.lua similarity index 63% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/keeper_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_keeper_kill.lua index 5be3f6f6dbe..0cff2eaf502 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/keeper_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_keeper_kill.lua @@ -1,6 +1,6 @@ local keeperKill = CreatureEvent("TheKeeperDeath") function keeperKill.onDeath(creature) - Game.setStorageValue(Storage.WrathoftheEmperor.Mission03, 0) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission03, 0) return true end diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_magistratus_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_magistratus_kill.lua similarity index 56% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_magistratus_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_magistratus_kill.lua index 8be99184fda..894eb1a5c8f 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_magistratus_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_magistratus_kill.lua @@ -1,9 +1,9 @@ local lizardMagistratusKill = CreatureEvent("LizardMagistratusDeath") function lizardMagistratusKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) onDeathForParty(creature, mostDamageKiller, function(creature, player) - local storage = player:getStorageValue(Storage.WrathoftheEmperor.Mission06) - if storage >= 0 and storage < 4 then - player:setStorageValue(Storage.WrathoftheEmperor.Mission06, math.max(1, storage) + 1) + local storage = player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06) + if storage >= 0 and storage < 5 then + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission06, math.max(1, storage) + 1) end end) return true diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_noble_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_noble_kill.lua similarity index 62% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_noble_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_noble_kill.lua index 112feffa73f..5b3483a8137 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/lizard_noble_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_lizard_noble_kill.lua @@ -1,9 +1,9 @@ local lizardNobleKill = CreatureEvent("LizardNobleDeath") function lizardNobleKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) onDeathForParty(creature, mostDamageKiller, function(creature, player) - local storage = player:getStorageValue(Storage.WrathoftheEmperor.Mission07) + local storage = player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07) if storage >= 0 and storage < 6 then - player:setStorageValue(Storage.WrathoftheEmperor.Mission07, math.max(1, storage) + 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission07, math.max(1, storage) + 1) end end) return true diff --git a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/zalamon_kill.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_zalamon_kill.lua similarity index 93% rename from data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/zalamon_kill.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_zalamon_kill.lua index 349c704ca64..db0f3e3e0f3 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/wrath_of_the_emperor/zalamon_kill.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/creaturescripts_zalamon_kill.lua @@ -16,7 +16,7 @@ local bossForms = { local zalamonKill = CreatureEvent("ZalamonDeath") function zalamonKill.onDeath(creature) if creature:getName():lower() == "mutated zalamon" then - Game.setStorageValue(Storage.WrathoftheEmperor.Mission11, -1) + Game.setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Mission11, -1) return true end diff --git a/data-otservbr-global/scripts/quests/wrath_of_the_emperor/globalevents_crate.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/globalevents_crate.lua new file mode 100644 index 00000000000..b8ae49b1ee6 --- /dev/null +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/globalevents_crate.lua @@ -0,0 +1,41 @@ +local trapDoors = { + { Position(33385, 31139, 8) }, + { Position(33385, 31134, 8) }, + { Position(33385, 31126, 8) }, + { Position(33385, 31119, 8) }, + { Position(33385, 31118, 8) }, + { Position(33380, 31093, 8) }, + { Position(33380, 31085, 8) }, +} + +local itemIds = {11257, 11258} + +local toggleTrapDoors = GlobalEvent("toggleTrapDoors") + +function toggleTrapDoors.onThink(interval) + for _, position in ipairs(trapDoors) do + local tile = Tile(position[1]) + if tile then + local currentItem = nil + for _, item in ipairs(tile:getItems()) do + if item:getId() == 11257 or item:getId() == 11258 then + currentItem = item + break + end + end + + local newItemId = 11257 + if currentItem then + newItemId = (currentItem:getId() == 11257) and 11258 or 11257 + currentItem:transform(newItemId) + else + Game.createItem(newItemId, 1, position[1]) + end + end + end + return true +end + +toggleTrapDoors:interval(10000) -- 10 seconds +toggleTrapDoors:register() + diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/boss_teleport.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_boss_teleport.lua similarity index 83% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/boss_teleport.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_boss_teleport.lua index a4056d81e83..11c84501a2d 100644 --- a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/boss_teleport.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_boss_teleport.lua @@ -29,12 +29,14 @@ function bossTeleport.onStepIn(creature, item, position, fromPosition) if not teleport then return true end - if player:getStorageValue(Storage.WrathoftheEmperor.TeleportAccess.Wote10) == 1 then + + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Wote10) == 1 then player:teleportTo(teleport.destination) teleport.destination:sendMagicEffect(CONST_ME_TELEPORT) return true end - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) == 5 then + + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) == 5 then local destination = Position(33072, 31151, 15) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(destination) @@ -42,7 +44,9 @@ function bossTeleport.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.WrathoftheEmperor.BossStatus) ~= item.uid - 3188 then + local expectedStatus = item.uid - 3188 + + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.BossStatus) ~= expectedStatus then player:teleportTo(fromPosition, true) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Go to another Teleport or take mission with Zizzle.") return true @@ -54,6 +58,7 @@ function bossTeleport.onStepIn(creature, item, position, fromPosition) else player:teleportTo(teleport.destination) end + return true end diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/crate.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_crate.lua similarity index 97% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/crate.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_crate.lua index c078b0ccc1d..8052a0fc2bc 100644 --- a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/crate.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_crate.lua @@ -219,7 +219,7 @@ local positions = { function catchPlayer(player) player:removeCondition(CONDITION_OUTFIT) player:removeItem(11328, 1) - player:setStorageValue(Storage.WrathoftheEmperor.GuardcaughtYou, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GuardcaughtYou, 1) player:teleportTo({ x = 33361, y = 31206, z = 8 }, false) player:say("The guards have spotted you. You were forcibly dragged into a small cell. It looks like you need to build another disguise.", TALKTYPE_MONSTER_SAY) return true @@ -257,9 +257,9 @@ function crate.onStepIn(creature, item, position, fromPosition, toPosition) end end elseif j >= 21 and j <= 25 then - if player:getPosition() == Position(positions[j]) and player:getStorageValue(Storage.WrathoftheEmperor.Message) ~= 1 then + if player:getPosition() == Position(positions[j]) and player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Message) ~= 1 then player:say("Guards heavily patrol this area. Try to stay hidden and do not draw any attention to yourself by trying to attack.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.WrathoftheEmperor.Message, 1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Message, 1) end elseif j >= 26 and j <= 175 then if player:getPosition() == Position(positions[j]) then @@ -299,3 +299,4 @@ for index, value in pairs(positions) do crate:position(value) end crate:register() + diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/keeper.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_keeper.lua similarity index 100% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/keeper.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_keeper.lua diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/prison.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_prison.lua similarity index 60% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/prison.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_prison.lua index 3e2b1d53958..9adb8c92079 100644 --- a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/prison.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_prison.lua @@ -2,7 +2,7 @@ local prison = MoveEvent() function prison.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() - if not player or player:getStorageValue(Storage.WrathoftheEmperor.PrisonReleaseStatus) ~= 1 then + if not player or player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.PrisonReleaseStatus) ~= 1 then return true end @@ -10,13 +10,13 @@ function prison.onStepIn(creature, item, position, fromPosition) player:removeCondition(CONDITION_OUTFIT) end - player:setStorageValue(Storage.WrathoftheEmperor.PrisonReleaseStatus, 0) - player:setStorageValue(Storage.WrathoftheEmperor.GuardcaughtYou, -1) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.PrisonReleaseStatus, 0) + player:setStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.GuardcaughtYou, -1) local destination = Position(33359, 31183, 8) player:teleportTo(destination) position:sendMagicEffect(CONST_ME_TELEPORT) destination:sendMagicEffect(CONST_ME_TELEPORT) - if player:getStorageValue(Storage.WrathoftheEmperor.Questline) == 2 then + if player:getStorageValue(Storage.Quest.U8_6.WrathOfTheEmperor.Questline) == 2 then player:addItem(11328) end return true diff --git a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/teleports_access.lua b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_teleports_access.lua similarity index 68% rename from data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/teleports_access.lua rename to data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_teleports_access.lua index 9b39cf1f5fc..069b90389c0 100644 --- a/data-otservbr-global/scripts/movements/quests/wrath_of_the_emperor/teleports_access.lua +++ b/data-otservbr-global/scripts/quests/wrath_of_the_emperor/movements_teleports_access.lua @@ -31,13 +31,13 @@ local positions = { } local config = { - { Access = Storage.WrathoftheEmperor.TeleportAccess.Rebel, teleportPos = Position(33136, 31248, 6), destinationA = Position(33211, 31065, 9), destinationB = Position(33138, 31248, 6) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.Zlak, teleportPos = Position(33216, 31067, 9), destinationA = Position(33078, 31219, 8), destinationB = Position(33216, 31069, 9) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.Zizzle, teleportPos = Position(33084, 31213, 8), destinationA = Position(33094, 31122, 12), destinationB = Position(33083, 31214, 8), itemPos = Position(33086, 31214, 8) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.SleepingDragon, teleportPos = Position(33111, 31123, 12), destinationA = Position(33240, 31247, 10), destinationB = Position(33109, 31122, 12), destinationC = Position(33028, 31086, 13) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.AwarnessEmperor, teleportPos = Position(33072, 31150, 15), destinationA = Position(33361, 31397, 9), destinationB = Position(33071, 31152, 15) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.BossRoom, teleportPos = Position(33136, 31249, 6), destinationA = Position(33360, 31397, 9), destinationB = Position(33138, 31249, 6) }, - { Access = Storage.WrathoftheEmperor.TeleportAccess.InnerSanctum, teleportPos = Position(33028, 31084, 13), destinationA = Position(33109, 31122, 12), destinationB = Position(33028, 31086, 13) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Rebel, teleportPos = Position(33136, 31248, 6), destinationA = Position(33211, 31065, 9), destinationB = Position(33138, 31248, 6) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zlak, teleportPos = Position(33216, 31067, 9), destinationA = Position(33078, 31219, 8), destinationB = Position(33216, 31069, 9) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.Zizzle, teleportPos = Position(33084, 31213, 8), destinationA = Position(33094, 31122, 12), destinationB = Position(33083, 31214, 8), itemPos = Position(33086, 31214, 8) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.SleepingDragon, teleportPos = Position(33111, 31123, 12), destinationA = Position(33240, 31247, 10), destinationB = Position(33109, 31122, 12), destinationC = Position(33028, 31086, 13) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.AwarnessEmperor, teleportPos = Position(33072, 31150, 15), destinationA = Position(33361, 31397, 9), destinationB = Position(33071, 31152, 15) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.BossRoom, teleportPos = Position(33136, 31249, 6), destinationA = Position(33360, 31397, 9), destinationB = Position(33138, 31249, 6) }, + { Access = Storage.Quest.U8_6.WrathOfTheEmperor.TeleportAccess.InnerSanctum, teleportPos = Position(33028, 31084, 13), destinationA = Position(33109, 31122, 12), destinationB = Position(33028, 31086, 13) }, } local function tpX(i, player, position) diff --git a/data-otservbr-global/startup/tables/chest.lua b/data-otservbr-global/startup/tables/chest.lua index 73669a74286..6c2033edb64 100644 --- a/data-otservbr-global/startup/tables/chest.lua +++ b/data-otservbr-global/startup/tables/chest.lua @@ -2525,6 +2525,36 @@ ChestUnique = { weight = 15.00, storage = Storage.TibiaTales.AnInterestInBotany.BotanyAlmanach, }, + -- Wrath of the Emperor Quest + [6297] = { + itemId = 2469, + itemPos = { x = 33073, y = 31169, z = 8 }, + reward = { { 3035, 100 } }, + weight = 10.00, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.Chest100PlatinumCoins, + }, + [6298] = { + itemId = 2472, + itemPos = { x = 33074, y = 31169, z = 8 }, + container = 2853, + reward = { { 11695, 1 }, { 10326, 1 }, { 5801, 1 }, { 3041, 1 }, { 3027, 10 }, { 9058, 5 }, { 5882, 10 }, { 3043, 10 } }, + weight = 151.00, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.ChestBag, + }, + [6299] = { + itemId = 2473, + itemPos = { x = 33078, y = 31170, z = 8 }, + reward = { { 11686, 1 } }, + weight = 130.00, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.ChestItems, + }, + [6300] = { + itemId = 2473, + itemPos = { x = 33080, y = 31170, z = 8 }, + reward = { { 11689, 1 } }, + weight = 43.00, + storage = Storage.Quest.U8_6.WrathOfTheEmperor.ChestItems, + }, -- Reward of others scrips files (varied rewards) -- The First dragon Quest -- Treasure chests (data\scripts\actions\quests\first_dragon\treasure_chests.lua) diff --git a/data-otservbr-global/startup/tables/door_quest.lua b/data-otservbr-global/startup/tables/door_quest.lua index 939b2809df1..de2e9854342 100644 --- a/data-otservbr-global/startup/tables/door_quest.lua +++ b/data-otservbr-global/startup/tables/door_quest.lua @@ -271,15 +271,15 @@ QuestDoorAction = { itemPos = { { x = 33470, y = 32786, z = 11 } }, }, -- Wrath of the emperor door - [Storage.WrathoftheEmperor.Mission02] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission02] = { itemId = false, itemPos = { { x = 33242, y = 31051, z = 10 } }, }, - [Storage.WrathoftheEmperor.Mission08] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission08] = { itemId = false, itemPos = { { x = 33080, y = 31164, z = 8 } }, }, - [Storage.WrathoftheEmperor.Mission12] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission12] = { itemId = false, itemPos = { { x = 33076, y = 31176, z = 8 } }, }, @@ -758,7 +758,7 @@ QuestDoorAction = { itemId = false, itemPos = { { x = 33047, y = 31295, z = 7 } }, }, - [Storage.WrathoftheEmperor.Mission06] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission06] = { itemId = false, itemPos = { { x = 33080, y = 31215, z = 7 }, @@ -766,14 +766,14 @@ QuestDoorAction = { { x = 33090, y = 31190, z = 7 }, }, }, - [Storage.WrathoftheEmperor.Mission07] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission07] = { itemId = false, itemPos = { { x = 33073, y = 31170, z = 7 }, { x = 33074, y = 31170, z = 7 }, }, }, - [Storage.WrathoftheEmperor.Mission09] = { + [Storage.Quest.U8_6.WrathOfTheEmperor.Mission09] = { itemId = false, itemPos = { { x = 33083, y = 31216, z = 8 } }, }, diff --git a/data-otservbr-global/startup/tables/item.lua b/data-otservbr-global/startup/tables/item.lua index e4da2255a87..ba781a5b6fa 100644 --- a/data-otservbr-global/startup/tables/item.lua +++ b/data-otservbr-global/startup/tables/item.lua @@ -261,6 +261,62 @@ ItemAction = { { x = 33293, y = 31122, z = 5 }, }, }, + -- Wrath of the Emperor Quest + [8024] = { + itemId = false, + itemPos = { + {x = 33250, y = 31067, z = 10}, + {x = 33251, y = 31064, z = 10}, + {x = 33251, y = 31066, z = 10}, + {x = 33251, y = 31067, z = 10}, + {x = 33252, y = 31065, z = 10}, + {x = 33250, y = 31068, z = 10}, + {x = 33251, y = 31065, z = 10}, + {x = 33250, y = 31064, z = 10}, + {x = 33250, y = 31065, z = 10}, + {x = 33250, y = 31066, z = 10}, + }, + }, + [8025] = { + itemId = false, + itemPos = { + {x = 33282, y = 31037, z = 10}, + {x = 33282, y = 31036, z = 10}, + {x = 33282, y = 31036, z = 10}, + }, + }, + [8026] = { + itemId = false, + itemPos = { + {x = 33168, y = 31073, z = 11}, + {x = 33179, y = 31072, z = 11}, + {x = 33175, y = 31078, z = 11}, + {x = 33181, y = 31078, z = 11}, + {x = 33183, y = 31076, z = 11}, + {x = 33176, y = 31082, z = 11}, + {x = 33184, y = 31072, z = 11}, + {x = 33161, y = 31061, z = 11}, + {x = 33167, y = 31060, z = 11}, + {x = 33161, y = 31066, z = 11}, + {x = 33164, y = 31064, z = 11}, + {x = 33165, y = 31067, z = 11}, + {x = 33161, y = 31070, z = 11}, + {x = 33182, y = 31059, z = 11}, + {x = 33177, y = 31062, z = 11}, + {x = 33180, y = 31063, z = 11}, + {x = 33178, y = 31067, z = 11}, + {x = 33182, y = 31066, z = 11}, + {x = 33170, y = 31068, z = 11}, + {x = 33176, y = 31070, z = 11}, + {x = 33182, y = 31071, z = 11}, + {x = 33183, y = 31069, z = 11}, + {x = 33161, y = 31074, z = 11}, + {x = 33167, y = 31075, z = 11}, + {x = 33164, y = 31076, z = 11}, + {x = 33166, y = 31081, z = 11}, + {x = 33165, y = 31084, z = 11}, + }, + }, -- The Pits of Inferno Quest [8815] = { itemId = false, @@ -1394,6 +1450,43 @@ ItemUnique = { itemId = 9874, itemPos = { x = 33348, y = 31412, z = 8 }, }, + -- Wrath of the Emperor Quest + [3189] = { + itemId = 1949, + itemPos = { x = 33052, y = 31083, z = 14 }, + }, + [3190] = { + itemId = 1949, + itemPos = { x = 33098, y = 31083, z = 14 }, + }, + [3191] = { + itemId = 1949, + itemPos = { x = 33101, y = 31118, z = 14 }, + }, + [3192] = { + itemId = 1949, + itemPos = { x = 33059, y = 31122, z = 14 }, + }, + [3193] = { + itemId = 11427, + itemPos = { x = 33048, y = 31085, z = 15 }, + }, + [3194] = { + itemId = 11427, + itemPos = { x = 33094, y = 31087, z = 15 }, + }, + [3195] = { + itemId = 11427, + itemPos = { x = 33095, y = 31110, z = 15 }, + }, + [3196] = { + itemId = 11427, + itemPos = { x = 33048, y = 31111, z = 15 }, + }, + [3200] = { + itemId = 11431, + itemPos = { x = 33073, y = 31173, z = 8 }, + }, -- Barbarian Arena Quest [3264] = { itemId = 10145, diff --git a/data-otservbr-global/startup/tables/lever.lua b/data-otservbr-global/startup/tables/lever.lua index 015403c1cc7..3405b60769a 100644 --- a/data-otservbr-global/startup/tables/lever.lua +++ b/data-otservbr-global/startup/tables/lever.lua @@ -209,6 +209,11 @@ LeverUnique = { itemId = 2772, itemPos = { x = 32862, y = 32555, z = 11 }, }, + -- Wrath of the Emperor Quest + [1053] = { + itemId = 2772, + itemPos = { x = 32801, y = 32640, z = 15 }, + }, -- Dreamers Challenge Quest [2004] = { itemId = 2772, @@ -329,6 +334,15 @@ LeverUnique = { itemId = 2772, itemPos = { x = 32833, y = 32224, z = 14 }, }, + -- Wrath of the Emperor Quest + [3184] = { + itemId = 2772, + itemPos = { x = 33078, y = 31079, z = 13 }, + }, + [3185] = { + itemId = 2772, + itemPos = { x = 33082, y = 31109, z = 2 }, + }, -- The Pits of Inferno Quest [3300] = { itemId = 2772, diff --git a/data/scripts/lib/register_actions.lua b/data/scripts/lib/register_actions.lua index ef4540c24b1..6d5a05a4c98 100644 --- a/data/scripts/lib/register_actions.lua +++ b/data/scripts/lib/register_actions.lua @@ -486,8 +486,8 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) Game.createMonster("Scarab", toPosition) end toPosition:sendMagicEffect(CONST_ME_POFF) - -- Rookgaard tutorial island - elseif target.itemid == 351 and target.actionid == 8024 then + -- Wrath of the Emperor Quest + elseif target.actionid == 8024 then player:addItem(11341, 1) player:say("You dig out a handful of earth from this sacred place.", TALKTYPE_MONSTER_SAY) elseif target.itemid == 7749 and player:getStorageValue(Storage.Quest.U8_2.TheBeginningQuest.TutorialHintsStorage) < 20 then