From a6027f48e02d1c48cbcfc595102898439f7f6e18 Mon Sep 17 00:00:00 2001 From: HT Cesta <58153179+htc16@users.noreply.github.com> Date: Sat, 14 Sep 2024 08:50:31 -0300 Subject: [PATCH] Storage organization --- data-otservbr-global/lib/core/quests.lua | 76 +-- data-otservbr-global/lib/core/storages.lua | 474 +++++++++--------- data-otservbr-global/npc/a_behemoth.lua | 4 +- data-otservbr-global/npc/a_dragon_lord.lua | 4 +- data-otservbr-global/npc/a_drillworm.lua | 4 +- data-otservbr-global/npc/a_lost_basher.lua | 4 +- data-otservbr-global/npc/a_lost_husher.lua | 4 +- data-otservbr-global/npc/a_lost_thrower.lua | 4 +- .../npc/a_nightmare_scion.lua | 4 +- data-otservbr-global/npc/a_strange_fellow.lua | 4 +- data-otservbr-global/npc/a_vulcongra.lua | 4 +- data-otservbr-global/npc/a_wyrm.lua | 4 +- data-otservbr-global/npc/amanda.lua | 8 +- data-otservbr-global/npc/arito.lua | 12 +- data-otservbr-global/npc/benjamin.lua | 6 +- data-otservbr-global/npc/bertram.lua | 2 +- data-otservbr-global/npc/boozer.lua | 10 +- data-otservbr-global/npc/brodrosch.lua | 4 +- data-otservbr-global/npc/budrik.lua | 14 +- data-otservbr-global/npc/captain_bluebear.lua | 4 +- data-otservbr-global/npc/captain_haba.lua | 2 +- data-otservbr-global/npc/captain_seahorse.lua | 4 +- data-otservbr-global/npc/chantalle.lua | 2 +- data-otservbr-global/npc/chrystal.lua | 6 +- data-otservbr-global/npc/corym_ratter.lua | 2 +- data-otservbr-global/npc/costello.lua | 14 +- data-otservbr-global/npc/dalbrect.lua | 8 +- data-otservbr-global/npc/daniel_steelsoul.lua | 10 +- data-otservbr-global/npc/dermot.lua | 4 +- data-otservbr-global/npc/dove.lua | 6 +- data-otservbr-global/npc/eroth.lua | 8 +- data-otservbr-global/npc/gnomargery.lua | 64 +-- data-otservbr-global/npc/gnombold.lua | 64 +-- data-otservbr-global/npc/gnome_trooper.lua | 8 +- data-otservbr-global/npc/gnomilly.lua | 64 +-- data-otservbr-global/npc/hugo.lua | 8 +- data-otservbr-global/npc/jack.lua | 38 +- data-otservbr-global/npc/kazzan.lua | 12 +- data-otservbr-global/npc/kevin.lua | 130 ++--- data-otservbr-global/npc/kroox.lua | 6 +- data-otservbr-global/npc/liane.lua | 6 +- data-otservbr-global/npc/lokur.lua | 4 +- data-otservbr-global/npc/markwin.lua | 4 +- data-otservbr-global/npc/mother_of_jack.lua | 6 +- data-otservbr-global/npc/muhad.lua | 6 +- data-otservbr-global/npc/muriel.lua | 10 +- data-otservbr-global/npc/ninos.lua | 6 +- data-otservbr-global/npc/noodles.lua | 12 +- data-otservbr-global/npc/olrik.lua | 6 +- data-otservbr-global/npc/one_eyed_joe.lua | 2 +- data-otservbr-global/npc/padreia.lua | 10 +- data-otservbr-global/npc/queen_eloise.lua | 4 +- data-otservbr-global/npc/rabaz.lua | 12 +- data-otservbr-global/npc/sandomo.lua | 32 +- data-otservbr-global/npc/sister_of_jack.lua | 8 +- data-otservbr-global/npc/spectulus.lua | 28 +- data-otservbr-global/npc/talphion.lua | 4 +- .../npc/tereban_functions.lua | 48 +- data-otservbr-global/npc/ubaid.lua | 4 +- data-otservbr-global/npc/umar.lua | 4 +- data-otservbr-global/npc/uzon.lua | 4 +- .../actions/other/construction_kits.lua | 12 +- .../scripts/actions/other/destroy.lua | 2 +- .../actions/other/others/quest_system2.lua | 6 +- .../scripts/actions/tools/skinning.lua | 8 +- .../creaturescripts/customs/freequests.lua | 14 +- .../scripts/lib/register_actions.lua | 18 +- .../quests/fathers_burden/actions_corpse.lua | 4 +- .../quests/lions_rock/actions_lions_rock.lua | 4 +- .../others/actions_ectoplasm_container.lua | 4 +- .../others/actions_exterminator_flask.lua | 4 +- .../quests/others/actions_holy_water.lua | 42 +- .../quests/roshamuul_quest/actions_trough.lua | 2 +- .../quests/spike_tasks/actions_fertilizer.lua | 6 +- .../spike_tasks/actions_ghost_detector.lua | 4 +- .../quests/spike_tasks/actions_lode_stone.lua | 10 +- .../quests/spike_tasks/actions_nests.lua | 6 +- .../spike_tasks/actions_spirit_shovel.lua | 6 +- .../spike_tasks/actions_thermometer.lua | 4 +- .../spike_tasks/actions_tuning_fork.lua | 6 +- .../creaturescripts_lower_spike_kill.lua | 6 +- .../creaturescripts_middle_spike_kill.lua | 6 +- .../creaturescripts_upper_spike_kill.lua | 6 +- .../actions_package.lua | 4 +- .../actions_waldos_posthorn.lua | 4 +- .../movements_geomantic_charges.lua | 6 +- .../actions_ultimate_booze_beer_bottle.lua | 4 +- .../to_blind_the_enemy_quest/mirror.lua | 4 +- data-otservbr-global/startup/tables/chest.lua | 12 +- .../startup/tables/door_quest.lua | 18 +- 90 files changed, 775 insertions(+), 787 deletions(-) diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index 5c2f1baff0f..666559af885 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -152,12 +152,12 @@ if not Quests then }, [4] = { name = "A Father's Burden", - startStorageId = Storage.FathersBurden.QuestLog, + startStorageId = Storage.Quest.U8_6.AFathersBurden.QuestLog, startStorageValue = 1, missions = { [1] = { name = "The Birthday Presents", - storageId = Storage.FathersBurden.Status, + storageId = Storage.Quest.U8_6.AFathersBurden.Status, missionId = 1024, startValue = 1, endValue = 2, @@ -169,7 +169,7 @@ if not Quests then }, [2] = { name = "The Magic Bow - Sinew", - storageId = Storage.FathersBurden.Sinew, + storageId = Storage.Quest.U8_6.AFathersBurden.Sinew, missionId = 1025, startValue = 1, endValue = 2, @@ -180,7 +180,7 @@ if not Quests then }, [3] = { name = "The Magic Bow - Wood", - storageId = Storage.FathersBurden.Wood, + storageId = Storage.Quest.U8_6.AFathersBurden.Wood, missionId = 1026, startValue = 1, endValue = 2, @@ -192,7 +192,7 @@ if not Quests then }, [4] = { name = "The Magic Robe - Cloth", - storageId = Storage.FathersBurden.Cloth, + storageId = Storage.Quest.U8_6.AFathersBurden.Cloth, missionId = 1027, startValue = 1, endValue = 2, @@ -204,7 +204,7 @@ if not Quests then }, [5] = { name = "The Magic Robe - Silk", - storageId = Storage.FathersBurden.Silk, + storageId = Storage.Quest.U8_6.AFathersBurden.Silk, missionId = 1028, startValue = 1, endValue = 2, @@ -215,7 +215,7 @@ if not Quests then }, [6] = { name = "The Magic Rod - Crystal", - storageId = Storage.FathersBurden.Crystal, + storageId = Storage.Quest.U8_6.AFathersBurden.Crystal, missionId = 1029, startValue = 1, endValue = 2, @@ -226,7 +226,7 @@ if not Quests then }, [7] = { name = "The Magic Rod - Root", - storageId = Storage.FathersBurden.Root, + storageId = Storage.Quest.U8_6.AFathersBurden.Root, missionId = 1030, startValue = 1, endValue = 2, @@ -237,7 +237,7 @@ if not Quests then }, [8] = { name = "The Magic Shield - Iron", - storageId = Storage.FathersBurden.Iron, + storageId = Storage.Quest.U8_6.AFathersBurden.Iron, missionId = 1031, startValue = 1, endValue = 2, @@ -249,7 +249,7 @@ if not Quests then }, [9] = { name = "The Magic Shield - Scale", - storageId = Storage.FathersBurden.Scale, + storageId = Storage.Quest.U8_6.AFathersBurden.Scale, missionId = 1032, startValue = 1, endValue = 2, @@ -3488,12 +3488,12 @@ if not Quests then }, [24] = { name = "The Postman Missions", - startStorageId = Storage.Postman.Mission01, + startStorageId = Storage.Quest.U7_24.ThePostmanMissions.Mission01, startStorageValue = 1, missions = { [1] = { name = "Mission 01 - Check Postal Routes", - storageId = Storage.Postman.Mission01, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission01, missionId = 10252, startValue = 1, endValue = 6, @@ -3508,7 +3508,7 @@ if not Quests then }, [2] = { name = "Mission 02 - Fix Mailbox", - storageId = Storage.Postman.Mission02, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission02, missionId = 10253, startValue = 1, endValue = 3, @@ -3520,7 +3520,7 @@ if not Quests then }, [3] = { name = "Mission 03 - Bill Delivery", - storageId = Storage.Postman.Mission03, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission03, missionId = 10254, startValue = 1, endValue = 3, @@ -3533,7 +3533,7 @@ if not Quests then }, [4] = { name = "Mission 04 - Aggressive Dogs", - storageId = Storage.Postman.Mission04, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission04, missionId = 10255, startValue = 1, endValue = 2, @@ -3544,7 +3544,7 @@ if not Quests then }, [5] = { name = "Mission 05 - Present Delivery", - storageId = Storage.Postman.Mission05, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission05, missionId = 10256, startValue = 1, endValue = 4, @@ -3558,7 +3558,7 @@ if not Quests then }, [6] = { name = "Mission 06 - New Uniforms", - storageId = Storage.Postman.Mission06, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission06, missionId = 10257, startValue = 1, endValue = 13, @@ -3582,7 +3582,7 @@ if not Quests then }, [7] = { name = "Mission 07 - Measurements", - storageId = Storage.Postman.Mission07, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission07, missionId = 10258, startValue = 1, endValue = 9, @@ -3599,7 +3599,7 @@ if not Quests then }, [8] = { name = "Mission 08 - Missing Courier", - storageId = Storage.Postman.Mission08, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission08, missionId = 10259, startValue = 1, endValue = 3, @@ -3611,7 +3611,7 @@ if not Quests then }, [9] = { name = "Mission 09 - Dear Santa", - storageId = Storage.Postman.Mission09, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission09, missionId = 10260, startValue = 1, endValue = 4, @@ -3624,7 +3624,7 @@ if not Quests then }, [10] = { name = "Mission 10 - Mintwallin", - storageId = Storage.Postman.Mission10, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission10, missionId = 10261, startValue = 1, endValue = 3, @@ -3636,7 +3636,7 @@ if not Quests then }, [11] = { name = "Postman Rank", - storageId = Storage.Postman.Rank, + storageId = Storage.Quest.U7_24.ThePostmanMissions.Rank, missionId = 10262, startValue = 1, endValue = 5, @@ -4382,12 +4382,12 @@ if not Quests then }, [30] = { name = "The White Raven Monastery", - startStorageId = Storage.WhiteRavenMonastery.QuestLog, + startStorageId = Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, startStorageValue = 1, missions = { [1] = { name = "Access to the Isle of Kings", - storageId = Storage.WhiteRavenMonastery.Passage, + storageId = Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, missionId = 10315, startValue = 1, endValue = 2, @@ -4398,7 +4398,7 @@ if not Quests then }, [2] = { name = "The Investigation", - storageId = Storage.WhiteRavenMonastery.Diary, + storageId = Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, missionId = 10316, startValue = 1, endValue = 2, @@ -4412,12 +4412,12 @@ if not Quests then }, [31] = { name = "Tibia Tales", - startStorageId = Storage.TibiaTales.DefaultStart, + startStorageId = Storage.Quest.U8_1.TibiaTales.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "To Appease the Mighty", - storageId = Storage.TibiaTales.ToAppeaseTheMightyQuest, + storageId = Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, missionId = 10317, startValue = 0, endValue = 4, @@ -4431,7 +4431,7 @@ if not Quests then }, [2] = { name = "Arito's Task", - storageId = Storage.TibiaTales.AritosTask, + storageId = Storage.Quest.U8_1.TibiaTales.AritosTask, missionId = 10318, startValue = 1, endValue = 3, @@ -4507,7 +4507,7 @@ if not Quests then }, [4] = { name = "Against the Spider Cult", - storageId = Storage.TibiaTales.AgainstTheSpiderCult, + storageId = Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, missionId = 10320, startValue = 1, endValue = 6, @@ -4522,7 +4522,7 @@ if not Quests then }, [5] = { name = "An Interest In Botany", - storageId = Storage.TibiaTales.AnInterestInBotany.Questline, + storageId = Storage.Quest.U8_6.AnInterestInBotany.Questline, missionId = 10321, startValue = 1, endValue = 4, @@ -4538,17 +4538,17 @@ if not Quests then }, [6] = { name = "Graves Sanctified - In Progress", - storageId = Storage.TibiaTales.RestInHallowedGround.HolyWater, + storageId = Storage.Quest.U8_1.RestInHallowedGround.HolyWater, missionId = 10322, startValue = 1, endValue = 15, description = function(player) - return string.format("You sanctified %d of 15 graves.", (math.max(player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater), 0))) + return string.format("You sanctified %d of 15 graves.", (math.max(player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater), 0))) end, }, [7] = { name = "Into the Bone Pit", - storageId = Storage.TibiaTales.IntoTheBonePit, + storageId = Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, missionId = 10323, startValue = 1, endValue = 3, @@ -4561,7 +4561,7 @@ if not Quests then }, [8] = { name = "Rest in Hallowed Ground", - storageId = Storage.TibiaTales.RestInHallowedGround.Questline, + storageId = Storage.Quest.U8_1.RestInHallowedGround.Questline, missionId = 10324, startValue = 1, endValue = 5, @@ -4576,7 +4576,7 @@ if not Quests then }, [9] = { name = "The Exterminator", - storageId = Storage.TibiaTales.TheExterminator, + storageId = Storage.Quest.U8_1.TibiaTales.TheExterminator, missionId = 10325, startValue = 1, endValue = 3, @@ -4590,7 +4590,7 @@ if not Quests then }, [10] = { name = "The Ultimate Booze", - storageId = Storage.TibiaTales.UltimateBoozeQuest, + storageId = Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, missionId = 10326, startValue = 1, endValue = 3, @@ -4603,7 +4603,7 @@ if not Quests then }, [11] = { name = "Jack to the Future", - storageId = Storage.TibiaTales.JackFutureQuest.QuestLine, + storageId = Storage.Quest.U8_7.JackFutureQuest.QuestLine, missionId = 10327, startValue = 1, endValue = 11, @@ -4675,7 +4675,7 @@ if not Quests then }, [14] = { name = "To Outfox a Fox", - storageId = Storage.TibiaTales.ToOutfoxAFoxQuest, + storageId = Storage.Quest.U8_1.ToOutfoxAFoxQuest, missionId = 10432, startValue = 1, endValue = 2, diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 954a9760587..7c47a33b1fb 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -515,102 +515,15 @@ Storage = { DeeplingAnchor = 51023, RoyalCostumeOutfit = 51026, }, - Postman = { - -- Reserved storage from 51360 - 51389 - Mission01 = 51360, - Mission02 = 51361, - Mission03 = 51362, - Mission04 = 51363, - Mission05 = 51364, - Mission06 = 51365, - Mission07 = 51366, - Mission08 = 51367, - Mission09 = 51368, - Mission10 = 51369, - Rank = 51370, - Door = 51371, - TravelCarlin = 51372, - TravelEdron = 51373, - TravelVenore = 51374, - TravelCormaya = 51375, - MeasurementsBenjamin = 51376, - MeasurementsKroox = 51377, - MeasurementsDove = 51378, - MeasurementsLiane = 51379, - MeasurementsChrystal = 51380, - MeasurementsOlrik = 51381, - }, TheHuntForTheSeaSerpent = { -- Reserved storage from 51410 - 51419 }, - TibiaTales = { - -- Reserved storage from 51480 - 51539 - DefaultStart = 51480, - UltimateBoozeQuest = 51481, - AgainstTheSpiderCult = 51482, - AnInterestInBotany = { - Questline = 51483, - ChestDoor = 51484, - BotanyAlmanach = 51485, - }, - AritosTask = 51486, - ToAppeaseTheMightyQuest = 51487, - IntoTheBonePit = 51488, - TheExterminator = 51489, - AritosTaskDoor = 51490, - RestInHallowedGround = { - Questline = 51491, - HolyWater = 51492, - Graves = { - Grave1 = 51493, - Grave2 = 51494, - Grave3 = 51495, - Grave4 = 51496, - Grave5 = 51497, - Grave6 = 51498, - Grave7 = 51499, - Grave8 = 51500, - Grave9 = 51501, - Grave10 = 51502, - Grave11 = 51503, - Grave12 = 51504, - Grave13 = 51505, - Grave14 = 51506, - Grave15 = 51507, - Grave16 = 51508, - }, - }, - JackFutureQuest = { - QuestLine = 51509, - Furniture01 = 51510, - Furniture02 = 51511, - Furniture03 = 51512, - Furniture04 = 51513, - Furniture05 = 51514, - Mother = 51515, - Sister = 51516, - Statue = 51517, - LastMissionState = 51518, - }, - ToBlindTheEnemy = { - Questline = 51533, - DwarvenShield = 51534, - MorningStar = 51535, - BP1 = 51536, - BP2 = 51537, - }, - ToOutfoxAFoxQuest = { - Questline = 51538, - MiningHelmet = 51539, - }, - }, BanutaSecretTunnel = { -- Reserved storage from 51680 - 51689 DeeperBanutaShortcut = 51680, }, QuestChests = { -- Reserved storage from 51730 - 51999 - TutorialShovel = 51732, TutorialRope = 51733, FormorgarMinesHoistSkeleton = 51737, @@ -650,31 +563,6 @@ Storage = { JarFloor4 = 52023, JarFloor5 = 52024, }, - WhiteRavenMonastery = { - -- Reserved storage from 52030 - 52039 - QuestLog = 52030, - Passage = 52031, - Diary = 52032, - Door = 52033, - }, - FathersBurden = { - -- Reserved storage from 52040 - 52059 - QuestLog = 52040, - Progress = 52041, - Status = 52042, - Sinew = 52043, - Wood = 52044, - Cloth = 52045, - Silk = 52046, - Crystal = 52047, - Root = 52048, - Iron = 52049, - Scale = 52050, - Corpse = { - Scale = 52051, - Sinew = 52052, - }, - }, Diapason = { -- Reserved storage from 52120 - 52129 Lyre = 52120, @@ -958,8 +846,36 @@ Storage = { Wand = 10111, }, }, - ThePostmanMissions = {}, - TheWhiteRavenMonastery = {}, + ThePostmanMissions = { + Mission01 = 10112, + Mission02 = 10113, + Mission03 = 10114, + Mission04 = 10115, + Mission05 = 10116, + Mission06 = 10117, + Mission07 = 10118, + Mission08 = 10119, + Mission09 = 10120, + Mission10 = 10121, + Rank = 10122, + Door = 10123, + TravelCarlin = 10124, + TravelEdron = 10125, + TravelVenore = 10126, + TravelCormaya = 10127, + MeasurementsBenjamin = 10128, + MeasurementsKroox = 10129, + MeasurementsDove = 10130, + MeasurementsLiane = 10131, + MeasurementsChrystal = 10132, + MeasurementsOlrik = 10133, + }, + TheWhiteRavenMonastery = { + QuestLog = 10134, + Passage = 10135, + Diary = 10136, + Door = 10137, + }, VoodooDoll = {}, }, U7_3 = { -- update 7.3 - Reserved Storages 40351 - 40400 @@ -1370,99 +1286,142 @@ Storage = { KosheiAmuletPart3 = 41357, KosheiAmuletPart4 = 41358, }, + RestInHallowedGround = { + Questline = 41400, + HolyWater = 41401, + Graves = { + Grave1 = 41402, + Grave2 = 41403, + Grave3 = 41404, + Grave4 = 41405, + Grave5 = 41406, + Grave6 = 41407, + Grave7 = 41408, + Grave8 = 41409, + Grave9 = 41410, + Grave10 = 41411, + Grave11 = 41412, + Grave12 = 41413, + Grave13 = 41414, + Grave14 = 41415, + Grave15 = 41416, + Grave16 = 41417, + }, + }, SecretService = { - Quest = 41359, - TBIMission01 = 41360, - AVINMission01 = 41361, - CGBMission01 = 41362, - TBIMission02 = 41363, - AVINMission02 = 41364, - CGBMission02 = 41365, - TBIMission03 = 41366, - AVINMission03 = 41367, - CGBMission03 = 41368, - TBIMission04 = 41369, - AVINMission04 = 41370, - CGBMission04 = 41371, - TBIMission05 = 41372, - AVINMission05 = 41373, - CGBMission05 = 41374, - TBIMission06 = 41375, - AVINMission06 = 41376, - CGBMission06 = 41377, - Mission07 = 41378, - RottenTree = 41379, - AHX17L89 = 41380, - FamilySignetRing = 41381, - MagicSpellbook = 41382, - BuildingPlans = 41383, - SuspiciousDocuments = 41384, - Book = 41385, - RottenHeartOfTree = 41386, - LotteryTicket = 41387, - PoemScroll = 41388, - IntelligenceReports = 41389, + Quest = 41440, + TBIMission01 = 41441, + AVINMission01 = 41442, + CGBMission01 = 41443, + TBIMission02 = 41444, + AVINMission02 = 41445, + CGBMission02 = 41446, + TBIMission03 = 41447, + AVINMission03 = 41448, + CGBMission03 = 41449, + TBIMission04 = 41450, + AVINMission04 = 41451, + CGBMission04 = 41452, + TBIMission05 = 41453, + AVINMission05 = 41454, + CGBMission05 = 41455, + TBIMission06 = 41456, + AVINMission06 = 41457, + CGBMission06 = 41458, + Mission07 = 41459, + RottenTree = 41460, + AHX17L89 = 41461, + FamilySignetRing = 41462, + MagicSpellbook = 41463, + BuildingPlans = 41464, + SuspiciousDocuments = 41465, + Book = 41466, + RottenHeartOfTree = 41467, + LotteryTicket = 41468, + PoemScroll = 41469, + IntelligenceReports = 41470, }, StrongPotions = { - Reward = 41390, + Reward = 41471, + }, + TibiaTales = { + DefaultStart = 41472, + UltimateBoozeQuest = 41473, + AgainstTheSpiderCult = 41474, + AritosTask = 41475, + ToAppeaseTheMightyQuest = 41476, + IntoTheBonePit = 41477, + TheExterminator = 41478, + AritosTaskDoor = 41479, }, TheTravellingTrader = { - Mission01 = 41391, - Mission02 = 41392, - Mission03 = 41393, - Mission04 = 41394, - Mission05 = 41395, - Mission06 = 41396, - Mission07 = 41397, + Mission01 = 41480, + Mission02 = 41481, + Mission03 = 41482, + Mission04 = 41483, + Mission05 = 41484, + Mission06 = 41485, + Mission07 = 41486, + }, + ToBlindTheEnemy = { + Questline = 41487, + DwarvenShield = 41488, + MorningStar = 41489, + BP1 = 41490, + BP2 = 41491, + }, + ToOutfoxAFoxQuest = { + Questline = 41492, + MiningHelmet = 41493, }, TowerDefenceQuest = { - Questline = 41398, - Door = 41399, + Questline = 41494, + Door = 41495, }, - WaterfallQuest = 41400, + WaterfallQuest = 41496, WhatAFoolishQuest = { - Questline = 41401, - Mission1 = 41402, - Mission2 = 41403, - Mission3 = 41404, - Mission4 = 41405, - Mission5 = 41406, - Mission6 = 41407, - Mission7 = 41408, - Mission8 = 41409, - Mission9 = 41410, - Mission10 = 41411, - Mission11 = 41412, - PieBuying = 41413, - PieBoxTimer = 41414, - TriangleTowerDoor = 41415, - EmperorBeardShave = 41416, - JesterOutfit = 41417, - WhoopeeCushion = 41418, - QueenEloiseCatDoor = 41419, - CatBasket = 41420, - ScaredCarina = 41421, - InflammableSulphur = 41422, - SpecialLeaves = 41423, - Cigar = 41424, - Contract = 41425, + Questline = 41500, + Mission1 = 41501, + Mission2 = 41502, + Mission3 = 41503, + Mission4 = 41504, + Mission5 = 41505, + Mission6 = 41506, + Mission7 = 41507, + Mission8 = 41508, + Mission9 = 41509, + Mission10 = 41510, + Mission11 = 41511, + PieBuying = 41512, + PieBoxTimer = 41513, + TriangleTowerDoor = 41514, + EmperorBeardShave = 41515, + JesterOutfit = 41516, + WhoopeeCushion = 41517, + QueenEloiseCatDoor = 41518, + CatBasket = 41519, + ScaredCarina = 41520, + InflammableSulphur = 41521, + SpecialLeaves = 41522, + Cigar = 41523, + Contract = 41524, CookieDelivery = { - SimonTheBeggar = 41426, - Markwin = 41427, - Ariella = 41428, - Hairycles = 41429, - Djinn = 41430, - AvarTar = 41431, - OrcKing = 41432, - Lorbas = 41433, - Wyda = 41434, - Hjaern = 41435, + SimonTheBeggar = 41525, + Markwin = 41526, + Ariella = 41527, + Hairycles = 41528, + Djinn = 41529, + AvarTar = 41530, + OrcKing = 41531, + Lorbas = 41532, + Wyda = 41533, + Hjaern = 41534, }, - OldWornCloth = 41436, - LostDisguise = 41437, - ScaredKazzan = 41438, - MagicalWatch = 41439, - BagBookKnife = 41440, + OldWornCloth = 41535, + LostDisguise = 41536, + ScaredKazzan = 41537, + MagicalWatch = 41538, + BagBookKnife = 41539, }, }, U8_2 = { -- update 8.2 - Reserved Storages 41651 - 41900 @@ -1987,7 +1946,28 @@ Storage = { }, -- 42781 - 42830 }, U8_6 = { -- update 8.6 - Reserved Storages 42951 - 43200 - AFathersBurden = {}, + AFathersBurden = { + QuestLog = 42951, + Progress = 42952, + Status = 42953, + Sinew = 42954, + Wood = 42955, + Cloth = 42956, + Silk = 42957, + Crystal = 42958, + Root = 42959, + Iron = 42960, + Scale = 42961, + Corpse = { + Scale = 42962, + Sinew = 42963, + }, + }, + AnInterestInBotany = { + Questline = 42964, + ChestDoor = 42965, + BotanyAlmanach = 42966, + }, TheSpiritWillGetYou = {}, WayfarerOutfits = {}, WrathOfTheEmperor = { @@ -2050,24 +2030,36 @@ Storage = { AnnualAutumnVintage = {}, Bewitched = {}, DemonsLullaby = {}, + JackFutureQuest = { + QuestLine = 43300, + Furniture01 = 43301, + Furniture02 = 43302, + Furniture03 = 43303, + Furniture04 = 43304, + Furniture05 = 43305, + Mother = 43306, + Sister = 43307, + Statue = 43308, + LastMissionState = 43309, + }, LastCreepStanding = {}, ResearchAndDevelopment = {}, RottinWoodAndTheMarriedMen = { - Questline = 43231, - RottinStart = 43232, - Trap = 43233, - Corpse = 43234, - Time = 43235, - Mission03 = 43236, - FirstTime = 43237, + Questline = 43310, + RottinStart = 43311, + Trap = 43312, + Corpse = 43313, + Time = 43314, + Mission03 = 43315, + FirstTime = 43316, }, SpiritHunters = { - Mission01 = 43238, - TombUse = 43239, - CharmUse = 43240, - NightstalkerUse = 43241, - SouleaterUse = 43242, - GhostUse = 43243, + Mission01 = 43317, + TombUse = 43318, + CharmUse = 43319, + NightstalkerUse = 43320, + SouleaterUse = 43321, + GhostUse = 43322, }, TheColoursOfMagic = {}, }, @@ -2338,45 +2330,41 @@ Storage = { Temperature = 44311, Kill = 44312, }, - Constants = { - Spike_Fame_Points = 44313, - Spike_Upper_Pacifier_Main = 44314, - Spike_Upper_Pacifier_Daily = 44315, - Spike_Upper_Mound_Main = 44316, - Spike_Upper_Mound_Daily = 44317, - Spike_Upper_Track_Main = 44318, - Spike_Upper_Track_Daily = 44319, - Spike_Upper_Kill_Main = 44320, - Spike_Upper_Kill_Daily = 44321, - Spike_Middle_Charge_Main = 44322, - Spike_Middle_Charge_Daily = 44323, - Spike_Middle_Mushroom_Main = 44324, - Spike_Middle_Mushroom_Daily = 44325, - Spike_Middle_Nest_Main = 44326, - Spike_Middle_Nest_Daily = 44327, - Spike_Middle_Kill_Main = 44328, - Spike_Middle_Kill_Daily = 44329, - Spike_Lower_Parcel_Main = 44330, - Spike_Lower_Parcel_Daily = 44331, - Spike_Lower_Undercover_Main = 44332, - Spike_Lower_Undercover_Daily = 44333, - Spike_Lower_Lava_Main = 44334, - Spike_Lower_Lava_Daily = 44335, - Spike_Lower_Kill_Main = 44336, - Spike_Lower_Kill_Daily = 44337, - }, + Spike_Fame_Points = 44313, + Spike_Upper_Pacifier_Main = 44314, + Spike_Upper_Pacifier_Daily = 44315, + Spike_Upper_Mound_Main = 44316, + Spike_Upper_Mound_Daily = 44317, + Spike_Upper_Track_Main = 44318, + Spike_Upper_Track_Daily = 44319, + Spike_Upper_Kill_Main = 44320, + Spike_Upper_Kill_Daily = 44321, + Spike_Middle_Charge_Main = 44322, + Spike_Middle_Charge_Daily = 44323, + Spike_Middle_Mushroom_Main = 44324, + Spike_Middle_Mushroom_Daily = 44325, + Spike_Middle_Nest_Main = 44326, + Spike_Middle_Nest_Daily = 44327, + Spike_Middle_Kill_Main = 44328, + Spike_Middle_Kill_Daily = 44329, + Spike_Lower_Parcel_Main = 44330, + Spike_Lower_Parcel_Daily = 44331, + Spike_Lower_Undercover_Main = 44332, + Spike_Lower_Undercover_Daily = 44333, + Spike_Lower_Lava_Main = 44334, + Spike_Lower_Lava_Daily = 44335, + Spike_Lower_Kill_Main = 44336, + Spike_Lower_Kill_Daily = 44337, }, SpiritGroundsMiniWorldChange = {}, }, U10_30 = { -- update 10.30 - Reserved Storages 44401 - 44500 DreamWardenOutfits = {}, RoshamuulQuest = { - Constants = { - Roshamuul_Mortar_Thrown = 44401, - Roshamuul_Killed_Frazzlemaws = 44402, - Roshamuul_Killed_Silencers = 44403, - Roshamuul_Gold_Record = 44404, - }, + Roshamuul_Mortar_Thrown = 44401, + Roshamuul_Killed_Frazzlemaws = 44402, + Roshamuul_Killed_Silencers = 44403, + Roshamuul_Gold_Record = 44404, }, }, U10_37 = { -- update 10.37 - Reserved Storages 44501 - 44550 diff --git a/data-otservbr-global/npc/a_behemoth.lua b/data-otservbr-global/npc/a_behemoth.lua index 88bcb550f5b..fe06f68c87e 100644 --- a/data-otservbr-global/npc/a_behemoth.lua +++ b/data-otservbr-global/npc/a_behemoth.lua @@ -51,7 +51,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -67,7 +67,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_dragon_lord.lua b/data-otservbr-global/npc/a_dragon_lord.lua index 72e48c263c9..d9f8ec599b4 100644 --- a/data-otservbr-global/npc/a_dragon_lord.lua +++ b/data-otservbr-global/npc/a_dragon_lord.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_drillworm.lua b/data-otservbr-global/npc/a_drillworm.lua index e7fcca83d58..b5ca4e30b73 100644 --- a/data-otservbr-global/npc/a_drillworm.lua +++ b/data-otservbr-global/npc/a_drillworm.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_lost_basher.lua b/data-otservbr-global/npc/a_lost_basher.lua index da31f02a2d6..7f590caa367 100644 --- a/data-otservbr-global/npc/a_lost_basher.lua +++ b/data-otservbr-global/npc/a_lost_basher.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_lost_husher.lua b/data-otservbr-global/npc/a_lost_husher.lua index 3e91193313e..fb12261e2f2 100644 --- a/data-otservbr-global/npc/a_lost_husher.lua +++ b/data-otservbr-global/npc/a_lost_husher.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_lost_thrower.lua b/data-otservbr-global/npc/a_lost_thrower.lua index 0a1ef11e1d5..2b3a419cfef 100644 --- a/data-otservbr-global/npc/a_lost_thrower.lua +++ b/data-otservbr-global/npc/a_lost_thrower.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_nightmare_scion.lua b/data-otservbr-global/npc/a_nightmare_scion.lua index 3039d07c7b7..f6727500fd5 100644 --- a/data-otservbr-global/npc/a_nightmare_scion.lua +++ b/data-otservbr-global/npc/a_nightmare_scion.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_strange_fellow.lua b/data-otservbr-global/npc/a_strange_fellow.lua index 24b2f8a96cc..63213c31e96 100644 --- a/data-otservbr-global/npc/a_strange_fellow.lua +++ b/data-otservbr-global/npc/a_strange_fellow.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if player:getStorageValue(Storage.Postman.Mission03) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) ~= 1 then return true end if MsgContains(message, "bill") then @@ -69,7 +69,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if player:removeItem(3216, 1) and npcHandler:getTopic(playerId) == 7 then npcHandler:say("Ok, ok, I'll take it. I guess I have no other choice anyways. And now leave me alone in my misery please.", npc, creature) - player:setStorageValue(Storage.Postman.Mission03, 2) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03, 2) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "hat") then diff --git a/data-otservbr-global/npc/a_vulcongra.lua b/data-otservbr-global/npc/a_vulcongra.lua index a8a047c2678..ff8fc5e1563 100644 --- a/data-otservbr-global/npc/a_vulcongra.lua +++ b/data-otservbr-global/npc/a_vulcongra.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_wyrm.lua b/data-otservbr-global/npc/a_wyrm.lua index 33bbf48e084..c2a6d10adb6 100644 --- a/data-otservbr-global/npc/a_wyrm.lua +++ b/data-otservbr-global/npc/a_wyrm.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/amanda.lua b/data-otservbr-global/npc/amanda.lua index 1b4630cfcee..19307272dc3 100644 --- a/data-otservbr-global/npc/amanda.lua +++ b/data-otservbr-global/npc/amanda.lua @@ -52,19 +52,19 @@ end -- Mission (Tibia Tales: Rest In Hallowed Ground) local startMissionKeyword = keywordHandler:addKeyword({ "mission" }, StdModule.say, { npcHandler = npcHandler, text = "Well, I would do it myself but I can't leave town for a longer time. Would you be so kind to bring me a vial of holy water from the White Raven Monastery?" }, function(player) - return player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) == -1 + return player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) == -1 end) startMissionKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "I thank you a lot in advance. The power of the holy water from the White Raven Monastery is legendary. For my task it is indispensable. We talk about that when you get back.", reset = true }, nil, function(player) - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, 1) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, 1) end) startMissionKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "It's your decision. I will ask the next believing mind that visits the temple of Banor's blood.", reset = true }) local function addMissionKeyword(text, value, newValue, addItem) keywordHandler:addKeyword({ "mission" }, StdModule.say, { npcHandler = npcHandler, text = text }, function(player) - return player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) == value + return player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) == value end, function(player) if newValue then - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, newValue) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, newValue) end if addItem then diff --git a/data-otservbr-global/npc/arito.lua b/data-otservbr-global/npc/arito.lua index 1eab9a186c3..a4a907c87e4 100644 --- a/data-otservbr-global/npc/arito.lua +++ b/data-otservbr-global/npc/arito.lua @@ -51,7 +51,7 @@ npcType.onCloseChannel = function(npc, creature) end local function greetCallback(npc, player) - if player:getStorageValue(Storage.TibiaTales.AritosTask) == 2 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) == 2 then npcHandler:setMessage(MESSAGE_GREET, "Thank god you are back!! Did you find....err...what we were talking about??") else npcHandler:setMessage(MESSAGE_GREET, "Be mourned, pilgrim in flesh. Be mourned in my tavern.") @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local AritosTask = player:getStorageValue(Storage.TibiaTales.AritosTask) + local AritosTask = player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) -- Check if the message contains "nomads" if MsgContains(message, "nomads") then @@ -90,10 +90,10 @@ local function creatureSayCallback(npc, creature, type, message) "The entrance to their hideout will be revealed in front of you. I don't know who is in charge there right now but please tell him that I won't spoil their secret...", "... well, I just told you but anyway .... I won't tell it to anybody else. Now hurry up before they get here!!", }, npc, creature) - if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) end - player:setStorageValue(Storage.TibiaTales.AritosTask, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask, 1) elseif AritosTask == 2 then npcHandler:say("And what did they say?? Do I have to give up everything here? Come on tell me!!", npc, creature) npcHandler:setTopic(playerId, 2) @@ -101,7 +101,7 @@ local function creatureSayCallback(npc, creature, type, message) -- Check if the message contains "Acquitted" and topic is 2 elseif MsgContains(message, "Acquitted") and npcHandler:getTopic(playerId) == 2 then npcHandler:say("These are great news!! Thank you for your help! I don't have much, but without you I wouldn't have anything so please take this as a reward.", npc, creature) - player:setStorageValue(Storage.TibiaTales.AritosTask, 3) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask, 3) player:addItem(3035, 100) end diff --git a/data-otservbr-global/npc/benjamin.lua b/data-otservbr-global/npc/benjamin.lua index ce3858886dc..4e4d908dcbe 100644 --- a/data-otservbr-global/npc/benjamin.lua +++ b/data-otservbr-global/npc/benjamin.lua @@ -68,10 +68,10 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "measurements") then local player = Player(creature) - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsBenjamin) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin) ~= 1 then npcHandler:say("Oh they don't change that much since in the old days as... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsBenjamin, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("...", npc, creature) diff --git a/data-otservbr-global/npc/bertram.lua b/data-otservbr-global/npc/bertram.lua index 876c8ddf79d..4f908a68758 100644 --- a/data-otservbr-global/npc/bertram.lua +++ b/data-otservbr-global/npc/bertram.lua @@ -61,7 +61,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "key") then if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 1 and player:getSex() == PLAYERSEX_FEMALE then local headItem = player:getSlotItem(CONST_SLOT_HEAD) - if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Postman.Rank) == 5 then + if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 5 then player:addItem(7934, 1) player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 2) npcHandler:say( diff --git a/data-otservbr-global/npc/boozer.lua b/data-otservbr-global/npc/boozer.lua index b63fa7620fb..40601c0b5ec 100644 --- a/data-otservbr-global/npc/boozer.lua +++ b/data-otservbr-global/npc/boozer.lua @@ -59,21 +59,21 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TibiaTales.UltimateBoozeQuest) == 2 and player:removeItem(136, 1) then - player:setStorageValue(Storage.TibiaTales.UltimateBoozeQuest, 3) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest) == 2 and player:removeItem(136, 1) then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, 3) npcHandler:setTopic(playerId, 0) player:addItem(5710, 1) player:addItem(3035, 10) player:addExperience(100, true) npcHandler:say("Yessss! Now I only need to build my own small brewery, figure out the secret recipe, duplicate the dwarvish brew and BANG I'll be back in business! Here take this as a reward.", npc, creature) - elseif player:getStorageValue(Storage.TibiaTales.UltimateBoozeQuest) < 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest) < 1 then npcHandler:setTopic(playerId, 1) npcHandler:say("Shush!! I don't want everybody to know what I am up to. Listen, things are not going too well, I need a new attraction. Do you want to help me?", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.TibiaTales.UltimateBoozeQuest, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, 1) player:addItem(138, 1) npcHandler:say("Good! Listen closely. Take this bottle and go to Kazordoon. I need a sample of their very special brown ale. You may find a cask in their brewery. Come back as soon as you got it.", npc, creature) end diff --git a/data-otservbr-global/npc/brodrosch.lua b/data-otservbr-global/npc/brodrosch.lua index 518d90efa52..96c0f43bad5 100644 --- a/data-otservbr-global/npc/brodrosch.lua +++ b/data-otservbr-global/npc/brodrosch.lua @@ -123,8 +123,8 @@ end, function(player) end) addTravelKeyword("cormaya", { "Do you seek a ride to Cormaya for |TRAVELCOST|?", "Full steam ahead!", "We would like to serve you some time." }, 160, { "postman" }, Position(33311, 31989, 15), function(player) - if player:getStorageValue(Storage.Postman.Mission01) == 4 then - player:setStorageValue(Storage.Postman.Mission01, 5) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 4 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 5) end end) diff --git a/data-otservbr-global/npc/budrik.lua b/data-otservbr-global/npc/budrik.lua index e874f8b91f5..316d86ed05c 100644 --- a/data-otservbr-global/npc/budrik.lua +++ b/data-otservbr-global/npc/budrik.lua @@ -58,21 +58,21 @@ local function creatureSayCallback(npc, creature, type, message) end if table.contains({ "mission", "quest" }, message:lower()) then - if player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline) < 1 then npcHandler:say({ "Funny that you are asking me for a mission! There is indeed something you can do for me. Ever heard about The Horned Fox? Anyway, yesterday his gang has stolen my mining helmet during a raid. ...", "It belonged to my father and before that to my grandfather. That helmet is at least 600 years old! I need it back. Are you willing to help me?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline) == 1 then if player:removeItem(139, 1) then - player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 2) + player:setStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline, 2) player:addItem(875, 1) npcHandler:say("As I was just saying to the others, 'this brave fellow will bring me my mining helmet back' and here you are with it!! Here take my spare helmet, I don't need it anymore!", npc, creature) else npcHandler:say("We presume the hideout of The Horned Fox is somewhere in the south-west near the coast, good luck finding my mining helmet!", npc, creature) end - elseif player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) == 2 and player:getLevel() <= 40 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos) < 0 then + elseif player:getStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline) == 2 and player:getLevel() <= 40 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos) < 0 then npcHandler:say({ "I am so angry I could spit grit! That damn {Horned Fox} and his attacks! Let's show those bull-heads that they have messed with the wrong people....", "I want you to kill 5000 minotaurs - no matter where - for me and all the dwarfs of Kazordoon! Are you willing to do that?", @@ -100,10 +100,10 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then npcHandler:say("I knew you have the guts for that task! We presume the hideout of The Horned Fox somewhere in the south-west near the coast. Good luck!", npc, creature) npcHandler:setTopic(playerId, 0) - if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) end - player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 1) + player:setStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline, 1) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Hussah! Let's bring war to those hoof-legged, dirt-necked, bull-headed minotaurs!! Come back to me when you are done with your {mission}.", npc, creature) player:setStorageValue(JOIN_STOR, 1) diff --git a/data-otservbr-global/npc/captain_bluebear.lua b/data-otservbr-global/npc/captain_bluebear.lua index 8c0100583d4..fd2bcd2369a 100644 --- a/data-otservbr-global/npc/captain_bluebear.lua +++ b/data-otservbr-global/npc/captain_bluebear.lua @@ -68,8 +68,8 @@ local function addTravelKeyword(keyword, cost, destination, action, condition) end addTravelKeyword("carlin", 110, Position(32387, 31820, 6), function(player) - if player:getStorageValue(Storage.Postman.Mission01) == 1 then - player:setStorageValue(Storage.Postman.Mission01, 2) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 1 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 2) end end) diff --git a/data-otservbr-global/npc/captain_haba.lua b/data-otservbr-global/npc/captain_haba.lua index 2d5bdef598a..fd284e4309b 100644 --- a/data-otservbr-global/npc/captain_haba.lua +++ b/data-otservbr-global/npc/captain_haba.lua @@ -99,7 +99,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("A'right, we are here to resupply our stock of baits to catch the sea serpent. Your first task is to bring me 5 fish they are easy to catch. When you got them ask me for the {bait} again.", npc, creature) - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/captain_seahorse.lua b/data-otservbr-global/npc/captain_seahorse.lua index 05fc5c856e0..1f2ca7a0b98 100644 --- a/data-otservbr-global/npc/captain_seahorse.lua +++ b/data-otservbr-global/npc/captain_seahorse.lua @@ -58,8 +58,8 @@ local function addTravelKeyword(keyword, cost, destination, action) end addTravelKeyword("venore", 40, Position(32954, 32022, 6), function(player) - if player:getStorageValue(Storage.Postman.Mission01) == 3 then - player:setStorageValue(Storage.Postman.Mission01, 4) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 3 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 4) end end) addTravelKeyword("thais", 160, Position(32310, 32210, 6)) diff --git a/data-otservbr-global/npc/chantalle.lua b/data-otservbr-global/npc/chantalle.lua index 7986419417a..7164455312e 100644 --- a/data-otservbr-global/npc/chantalle.lua +++ b/data-otservbr-global/npc/chantalle.lua @@ -61,7 +61,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "key") then if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 1 then local headItem = player:getSlotItem(CONST_SLOT_HEAD) - if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Postman.Rank) == 5 and player:getSex() ~= PLAYERSEX_FEMALE then + if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 5 and player:getSex() ~= PLAYERSEX_FEMALE then player:addItem(7934) player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 2) npcHandler:say("Oh my! You look so great in your uniform! You archpostmen are not only daring but also handsome. Here take it, that's the key you wanted. Just promise to visit me now and then!", npc, creature) diff --git a/data-otservbr-global/npc/chrystal.lua b/data-otservbr-global/npc/chrystal.lua index 54c70da0e81..60713967280 100644 --- a/data-otservbr-global/npc/chrystal.lua +++ b/data-otservbr-global/npc/chrystal.lua @@ -59,10 +59,10 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsChrystal) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsChrystal) ~= 1 then npcHandler:say("If its necessary ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsChrystal, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsChrystal, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("...", npc, creature) diff --git a/data-otservbr-global/npc/corym_ratter.lua b/data-otservbr-global/npc/corym_ratter.lua index 91cc127471b..3615692dce4 100644 --- a/data-otservbr-global/npc/corym_ratter.lua +++ b/data-otservbr-global/npc/corym_ratter.lua @@ -78,7 +78,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) player:setStorageValue(HiddenThreats.QuestLine, 1) player:setStorageValue(HiddenThreats.RatterDoor, 1) npcHandler:say("Nice! I have opened the mine for you. But take care of you! The monsters of depth won't spare you.", npc, creature) diff --git a/data-otservbr-global/npc/costello.lua b/data-otservbr-global/npc/costello.lua index d338eb95f13..bfd95edc9d4 100644 --- a/data-otservbr-global/npc/costello.lua +++ b/data-otservbr-global/npc/costello.lua @@ -61,12 +61,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "diary") then - if player:getStorageValue(Storage.WhiteRavenMonastery.Diary) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary) == 1 then npcHandler:say("Do you want me to inspect a diary?", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "holy water") then - local cStorage = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) + local cStorage = player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) if cStorage == 1 then npcHandler:say("Who are you to demand holy water from the White Raven Monastery? Who sent you??", npc, creature) npcHandler:setTopic(playerId, 3) @@ -74,14 +74,14 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("I already filled your vial with holy water.", npc, creature) end elseif MsgContains(message, "amanda") and npcHandler:getTopic(playerId) == 0 then - if player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) == 1 then npcHandler:say("Ahh, Amanda from Edron sent you! I hope she's doing well. So why did she send you here?", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Thank you very much! From now on you may open the warded doors to the catacombs.", npc, creature) - player:setStorageValue(Storage.WhiteRavenMonastery.Diary, 1) - player:setStorageValue(Storage.WhiteRavenMonastery.Door, 1) + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, 1) + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Door, 1) elseif npcHandler:getTopic(playerId) == 2 then if not player:removeItem(3212, 1) then npcHandler:say("Uhm, as you wish.", npc, creature) @@ -90,7 +90,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("By the gods! This is brother Fugio's handwriting and what I read is horrible indeed! You have done our order a great favour by giving this diary to me! Take this blessed Ankh. May it protect you in even your darkest hours.", npc, creature) player:addItem(3214, 1) - player:setStorageValue(Storage.WhiteRavenMonastery.Diary, 2) + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, 2) end elseif npcHandler:getTopic(playerId) == 3 then if not MsgContains(message, "amanda") then @@ -100,7 +100,7 @@ local function creatureSayCallback(npc, creature, type, message) end player:addItem(133, 1) - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, 2) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, 2) npcHandler:say("Ohh, why didn't you tell me before? Sure you get some holy water if it's for Amanda! Here you are.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "no") and table.contains({ 1, 2 }, npcHandler:getTopic(playerId)) then diff --git a/data-otservbr-global/npc/dalbrect.lua b/data-otservbr-global/npc/dalbrect.lua index 9fc3053b60c..87a23c48f32 100644 --- a/data-otservbr-global/npc/dalbrect.lua +++ b/data-otservbr-global/npc/dalbrect.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "brooch") then - if player:getStorageValue(Storage.WhiteRavenMonastery.Passage) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage) == 1 then npcHandler:say("You have recovered my brooch! I shall forever be in your debt, my friend!", npc, creature) return true end @@ -94,8 +94,8 @@ local function creatureSayCallback(npc, creature, type, message) npc, creature ) - player:setStorageValue(Storage.WhiteRavenMonastery.QuestLog, 1) -- Quest log - player:setStorageValue(Storage.WhiteRavenMonastery.Passage, 1) + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, 1) -- Quest log + player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, 1) end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 1 then @@ -113,7 +113,7 @@ keywordHandler:addKeyword({ "passage" }, StdModule.say, { text = "I have only sailed to the isle of the kings once or twice. \z I dare not anger the monks by bringing travelers there without their permission.", }, function(player) - return player:getStorageValue(Storage.WhiteRavenMonastery.Passage) ~= 1 + return player:getStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage) ~= 1 end) local travelNode = keywordHandler:addKeyword({ "passage" }, StdModule.say, { diff --git a/data-otservbr-global/npc/daniel_steelsoul.lua b/data-otservbr-global/npc/daniel_steelsoul.lua index 9f3427a9b1e..1beb347c2d8 100644 --- a/data-otservbr-global/npc/daniel_steelsoul.lua +++ b/data-otservbr-global/npc/daniel_steelsoul.lua @@ -64,11 +64,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult) < 1 then npcHandler:setTopic(playerId, 1) npcHandler:say("Very good, we need heroes like you to go on a suici.....er....to earn respect of the authorities here AND in addition get a great reward for it. Are you interested in the job?", npc, creature) - elseif player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) == 5 then - player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, 6) + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult) == 5 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, 6) npcHandler:setTopic(playerId, 0) player:addItem(814, 1) npcHandler:say("What? YOU DID IT?!?! That's...that's...er.... like I expected!! Here is your reward.", npc, creature) @@ -173,8 +173,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, 1) npcHandler:say({ "Very well, maybe you know that the orcs here in Edron learnt to raise giant spiders. It is going to become a serious threat. ...", "The mission is simple: go to the orcs and destroy all spider eggs that are hatched by the giant spider they have managed to catch. The orcs are located in the south of the western part of the island.", diff --git a/data-otservbr-global/npc/dermot.lua b/data-otservbr-global/npc/dermot.lua index 3f66f7f89ec..ddaeda5cc86 100644 --- a/data-otservbr-global/npc/dermot.lua +++ b/data-otservbr-global/npc/dermot.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "present") then - if player:getStorageValue(Storage.Postman.Mission05) == 2 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05) == 2 then npcHandler:say("You have a present for me?? Realy?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -70,7 +70,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeItem(3218, 1) then npcHandler:say("Thank you very much!", npc, creature) - player:setStorageValue(Storage.Postman.Mission05, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/dove.lua b/data-otservbr-global/npc/dove.lua index 2dadf044189..33ead9cf013 100644 --- a/data-otservbr-global/npc/dove.lua +++ b/data-otservbr-global/npc/dove.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsDove) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsDove) ~= 1 then npcHandler:say("Oh no! I knew that day would come! I am slightly above the allowed weight and if you can't supply me with some grapes to slim down I will get fired. Do you happen to have some grapes with you? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -70,8 +70,8 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeItem(3592, 1) then npcHandler:say("Oh thank you! Thank you so much! So listen ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsDove, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsDove, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("Oh, you don't have it.", npc, creature) diff --git a/data-otservbr-global/npc/eroth.lua b/data-otservbr-global/npc/eroth.lua index e8b59fa681f..c53f22d7b49 100644 --- a/data-otservbr-global/npc/eroth.lua +++ b/data-otservbr-global/npc/eroth.lua @@ -57,15 +57,15 @@ local function creatureSayCallback(npc, creature, type, message) -- Check if the message contains "mission" if MsgContains(message, "mission") then -- Check if player is starting the quest - if player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) < 1 then + if player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) < 1 then npcHandler:say("Have you ever heard of Elvenbane? It is the castle west of Ab'Dendriel which is inhabited by villains from all over the continent. Any support in this war is welcome. Are you willing to help?", npc, creature) npcHandler:setTopic(playerId, 1) -- Check if player has completed certain objectives - elseif player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) == 2 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.DwarvenShield) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.MorningStar) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.BP1) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.BP2) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) == 2 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.DwarvenShield) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.MorningStar) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.BP1) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.BP2) == 1 then npcHandler:say("I heard the blow! The reflection must have caused a overcharge of magical energy leading to the contraction and the implosion. Just like I hoped! Please take this as a reward. Thank you very much.", npc, creature) player:addItem(3082, 1) player:addItem(3035, 10) - player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 3) + player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 3) npcHandler:setTopic(playerId, 0) end -- Check if the player has accepted the mission @@ -76,7 +76,7 @@ local function creatureSayCallback(npc, creature, type, message) "We don't really know how to destroy it but we suppose it may work if you reflect the invisible power of the ball. The beam should be adjusted to Ab'Dendriel. Take this mirror and give it a try. Good luck.", }, npc, creature) player:addItem(3463, 1) - player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 1) + player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 1) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/gnomargery.lua b/data-otservbr-global/npc/gnomargery.lua index 3e84ebd495d..b8c94ab9ba7 100644 --- a/data-otservbr-global/npc/gnomargery.lua +++ b/data-otservbr-global/npc/gnomargery.lua @@ -90,50 +90,50 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "report" then if MsgContains(message, "delivery") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Main) == 4 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) == 4 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(3500, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Deliver the four parcels to some of our far away outposts in the caverns.", npc, creature) end elseif MsgContains(message, "undercover") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) == 3 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) == 3 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(3500, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Get three reports from our undercover agents posing as monsters in the caves around us.", npc, creature) end elseif MsgContains(message, "temperature") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Main) == 1 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) == 1 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(3500, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Use the gnomish temperature measurement device to locate the hottest spot at the lava pools in the cave.", npc, creature) end elseif MsgContains(message, "kill") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Main) == 7 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(3500, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Just go out to the caves and kill at least seven drillworms.", npc, creature) end @@ -148,15 +148,15 @@ local function creatureSayCallback(npc, creature, type, message) ////PARCEL DELIVERY//// /////////////////////]] if MsgContains(message, "deliver") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) == -1 then npcHandler:say("We need someone to bring four parcels to some of our far away outposts in the caverns. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "delivery" else @@ -167,7 +167,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "delivery" then if MsgContains(message, "yes") then player:addItem(19219, 4) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main, 0) npcHandler:say({ "Gnometastic! Here are the parcels. Regrettably, the labels got lost during transport; but I guess those lonely gnomes won't mind as long as they get ANY parcel at all.", "If you lose the parcels, you'll have to get new ones. Gnomux sells all the equipment that is required for our missions." }, npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -180,15 +180,15 @@ local function creatureSayCallback(npc, creature, type, message) ////UNDERCOVER//// ////////////////]] if MsgContains(message, "undercover") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) == -1 then npcHandler:say("Someone is needed to get three reports from our undercover agents posing as monsters in the caves around us. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "undercover" else @@ -198,7 +198,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "undercover" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Undercover_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, 0) npcHandler:say("Gnometastic! Get three reports from our agents. You can find them anywhere in the caves around us. Just keep looking for monsters that behave strangely and give you a wink.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -211,15 +211,15 @@ local function creatureSayCallback(npc, creature, type, message) ////TEMPERATURE///// //////////////////]] if MsgContains(message, "temperature") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) == -1 then npcHandler:say("Your task would be to use a gnomish temperature measurement device - short GTMD - to locate the hottest spot at the lava pools in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "temperature" else @@ -230,7 +230,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "temperature" then if MsgContains(message, "yes") then player:addItem(19206, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main, 0) npcHandler:say("Gnometastic! Find the hottest spot of the lava pools in the caves. If you lose the GTMD before you find the hot spot, you'll have to get yourself a new one. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -243,15 +243,15 @@ local function creatureSayCallback(npc, creature, type, message) ////KILL///// ///////////]] if MsgContains(message, "kill") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) == -1 then npcHandler:say("This mission will require you to kill some drillworms for us. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "kill" else @@ -261,7 +261,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "kill" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main, 0) npcHandler:say("Gnometastic! You should have no trouble finding enough drillworms.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/npc/gnombold.lua b/data-otservbr-global/npc/gnombold.lua index 22bbaf7c939..c4d0b7b83bb 100644 --- a/data-otservbr-global/npc/gnombold.lua +++ b/data-otservbr-global/npc/gnombold.lua @@ -88,50 +88,50 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "report" then if MsgContains(message, "charges") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main) == 3 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == 3 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Charge this magnet at three monoliths in the cave system. With three charges, the magnet will disintegrate and charge you with its gathered energies. Step on the magnetic extractor here to deliver the charge to us, then report to me.", npc, creature) end elseif MsgContains(message, "fertilisation") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Main) == 4 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) == 4 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Use the fertiliser on four gardener mushroom in the caves.", npc, creature) end elseif MsgContains(message, "nests") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Main) == 5 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) == 5 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Step into the transformer and destroy eight monster nests.", npc, creature) end elseif MsgContains(message, "killing") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Main) == 7 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Just go out to the caves and kill at least seven crystalcrushers.", npc, creature) end @@ -146,15 +146,15 @@ local function creatureSayCallback(npc, creature, type, message) ////GEOMANTIC CHARGES//// ///////////////////////]] if MsgContains(message, "charges") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == -1 then npcHandler:say({ "Our mission for you is to use a magnet on three different monoliths in the cave system here. After the magnet evaporates on the last charge, enter the magnetic extractor here to deliver your charge.", "If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?" }, npc, creature) talkState[playerId] = "charges" else @@ -165,7 +165,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "charges" then if MsgContains(message, "yes") then player:addItem(19207, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 0) npcHandler:say( { "Gnometastic! Charge this magnet at three monoliths in the cave system. With three charges, the magnet will disintegrate and charge you with its gathered energies. Step on the magnetic extractor here to deliver the charge to us, then report to me.", "If you lose the magnet you'll have to bring your own. Gnomux sells all the equipment that is required for our missions." }, npc, @@ -182,15 +182,15 @@ local function creatureSayCallback(npc, creature, type, message) ////FERTILISE//// ///////////////]] if MsgContains(message, "fertilise") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) == -1 then npcHandler:say("Your mission would be to seek out gardener mushrooms in the caves and use some fertiliser on them. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "fertilise" else @@ -201,7 +201,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "fertilise" then if MsgContains(message, "yes") then player:addItem(19214) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main, 0) npcHandler:say("Gnometastic! And here is your fertiliser - use it on four gardener mushroom in the caves. If you lose the fertiliser you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -214,15 +214,15 @@ local function creatureSayCallback(npc, creature, type, message) ////DESTROY NESTS///// ////////////////////]] if MsgContains(message, "nests") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) == -1 then npcHandler:say("Our mission for you is to step into the gnomish transformer and then destroy eight monster nests in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "nests" else @@ -232,7 +232,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "nests" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main, 0) npcHandler:say("Gnometastic! Don't forget to step into the transformer before you go out and destroy five monster nests. If your transformation runs out, return to the transformer to get another illusion.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -245,15 +245,15 @@ local function creatureSayCallback(npc, creature, type, message) ////KILL///// ///////////]] if MsgContains(message, "kill") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) == -1 then npcHandler:say("This mission will require you to kill some crystal crushers for us. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "kill" else @@ -263,7 +263,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "kill" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main, 0) npcHandler:say("Gnometastic! You should have no trouble to find enough crystal crushers. Killing seven of them should be enough.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/npc/gnome_trooper.lua b/data-otservbr-global/npc/gnome_trooper.lua index cc6ae23a616..359aa90552b 100644 --- a/data-otservbr-global/npc/gnome_trooper.lua +++ b/data-otservbr-global/npc/gnome_trooper.lua @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) DELIVERED_PARCELS[player:getGuid()] = {} end - if table.contains({ -1, 4 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Main)) then + if table.contains({ -1, 4 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main)) then return false end if table.contains(DELIVERED_PARCELS[player:getGuid()], npc:getId()) then @@ -80,7 +80,7 @@ end local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) - local status = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Main) + local status = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) -- Inicializa a tabela se ela for nil if not DELIVERED_PARCELS[player:getGuid()] then @@ -97,8 +97,8 @@ local function creatureSayCallback(npc, creature, type, message) return npcHandler:removeInteraction(npc, creature) end - npcHandler:say(response[player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Main)], npc, creature) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Parcel_Main, status + 1) + npcHandler:say(response[player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main)], npc, creature) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main, status + 1) table.insert(DELIVERED_PARCELS[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) end diff --git a/data-otservbr-global/npc/gnomilly.lua b/data-otservbr-global/npc/gnomilly.lua index dd22ae36e39..5c0d217b0fb 100644 --- a/data-otservbr-global/npc/gnomilly.lua +++ b/data-otservbr-global/npc/gnomilly.lua @@ -87,50 +87,50 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "report" then if MsgContains(message, "pacifiers") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Main) == 7 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Take the resonance charger and use it on seven of the pacifiers in the cave.", npc, creature) end elseif MsgContains(message, "release") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Main) == 1 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) == 1 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Take the spirit shovel use it on four graves in the cave system.", npc, creature) end elseif MsgContains(message, "tracking") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Main) == 3 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) == 3 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Take the tracking device in the caves and locate the residual spirit energy.", npc, creature) end elseif MsgContains(message, "killing") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Main) == 7 then + elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Daily, os.time() + 72000) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main, -1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Daily, os.time() + 72000) else npcHandler:say("Gnowful! Just go out to the caves and kill at least seven demon skeletons.", npc, creature) end @@ -145,15 +145,15 @@ local function creatureSayCallback(npc, creature, type, message) ////GHOST PACIFIERS//// /////////////////////]] if MsgContains(message, "pacifiers") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) == -1 then npcHandler:say({ "We need you to recharge our ghost pacifiers. They are placed at several strategic points in the caves around us and should be easy to find. Your mission would be to charge seven of them.", "If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?" }, npc, creature) talkState[playerId] = "pacifiers" else @@ -164,7 +164,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "pacifiers" then if MsgContains(message, "yes") then player:addItem(19204, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main, 0) npcHandler:say("Gnometastic! Take this resonance charger and use it on seven of the pacifiers in the cave. If you lose the charger, you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -177,15 +177,15 @@ local function creatureSayCallback(npc, creature, type, message) ////SPIRIT RELEASE///// /////////////////////]] if MsgContains(message, "release") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) == -1 then npcHandler:say("Your task would be to use a spirit shovel to release some spirit's anger from graves that can be found all around here. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "release" else @@ -196,7 +196,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "release" then if MsgContains(message, "yes") then player:addItem(19203, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main, 0) npcHandler:say("Gnometastic! Take this spirit shovel and use it on four graves in the cave system. If you lose the shovel you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -209,15 +209,15 @@ local function creatureSayCallback(npc, creature, type, message) ////TRACK GHOSTS///// ///////////////////]] if MsgContains(message, "track") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) == -1 then npcHandler:say( { "You'd be given the highly important task to track down an enormously malevolent spiritual presence in the cave system. Use your tracking device to find out how close you are to the presence.", "Use that information to find the residual energy and use the tracker there. If you are interested, I can give you some more information about it. Are you willing to accept this mission?" }, npc, @@ -233,7 +233,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "yes") then GHOST_DETECTOR_MAP[player:getGuid()] = Position.getFreeSand() player:addItem(19205, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main, 0) npcHandler:say("Gnometastic! Use this tracking device in the caves and locate the residual spirit energy. If you lose the tracking device, you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -246,15 +246,15 @@ local function creatureSayCallback(npc, creature, type, message) ////KILL///// ///////////]] if MsgContains(message, "kill") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Daily) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Main) == -1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) == -1 then npcHandler:say("We need someone to reduce the steadily growing number of demon skeletons in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "kill" else @@ -264,7 +264,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "kill" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Main, 0) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main, 0) npcHandler:say("Gnometastic! Just go out and kill them. You should find more of them than you like.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/npc/hugo.lua b/data-otservbr-global/npc/hugo.lua index 16f5f468897..ba7b657f92b 100644 --- a/data-otservbr-global/npc/hugo.lua +++ b/data-otservbr-global/npc/hugo.lua @@ -115,17 +115,17 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "uniforms") then - if player:getStorageValue(Storage.Postman.Mission06) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 1 then npcHandler:say("A new uniform for the post officers? I am sorry but my dog ate the last dress pattern we used. You need to supply us with a new dress pattern.", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "dress pattern") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("It was ... wonderous beyond wildest imaginations! I have no clue where Kevin Postner got it from. Better ask him.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 2) - elseif player:getStorageValue(Storage.Postman.Mission06) == 11 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 2) + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 11 then npcHandler:say("By the gods of fashion! Didn't it do that I fed the last dress pattern to my poor dog? Will this mocking of all which is taste and fashion never stop?? Ok, ok, you will get those ugly, stinking uniforms and now get lost, fashion terrorist.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 12) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 12) end npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "outfit") then diff --git a/data-otservbr-global/npc/jack.lua b/data-otservbr-global/npc/jack.lua index c92bdf9491c..2dbc1833d5f 100644 --- a/data-otservbr-global/npc/jack.lua +++ b/data-otservbr-global/npc/jack.lua @@ -63,15 +63,15 @@ local function greetCallback(npc, creature, message) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 7 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 7 then npcHandler:setMessage(MESSAGE_GREET, "You!! What have you told my family? They are mad at me and I don't even know why! They think I lied to them about working in Edron in secrecy! Why should I even do that!") - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 8 then npcHandler:setMessage(MESSAGE_GREET, { "What did you do to my SCULPTURE? You simply DESTROYED it? Why? You... you ruined everything... my house, my hobby, my life. My family even refuses to talk to me anymore. ...", "Alright, alright you win. I am done for. You... you must be right, yes. Yes, I was working as an intern... in the academy in Edron... yes... Just... tell this Spectulus guy I want to see him. I have nothing left. I am ready.", }) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 9) - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 9) + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then npcHandler:setMessage(MESSAGE_GREET, "So, you've returned to Spectulus? What did he say, is anything wrong? You have this strange expression on your face - is there anything wrong? You DID tell me the truth here, didn't you?") else npcHandler:setMessage(MESSAGE_GREET, "Yes? What can I do for you? I hope this won't take long, though.") @@ -89,25 +89,25 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "spectulus") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 1 then npcHandler:say("Gesundheit! Are you alright? Did you... want to tell me something by that?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 3 then if npcHandler:getTopic(playerId) == 3 then npcHandler:say({ "So it's that name again. You are really determined, aren't you. ...", "So if he thinks I'm someone he knew who is now 'lost' and needs to come back or whatever - tell him he is WRONG. I always lived here with my mother and sister, I'm happy here and I certainly don't want to go to that academy of yours.", }, npc, creature, 1000) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 4) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 4) end end elseif MsgContains(message, "furniture") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 3 then npcHandler:say("What have you done? What are all these pieces of furniture doing here? Those are ugly at best and - hey! Stop! Leave the wallpaper alone! Alright, alright! Just tell me, why are you doing this? Who's behind all this?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "no") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then if npcHandler:getTopic(playerId) == 0 then npcHandler:say("WHAT?? No way, I ask you again - you DID tell me the TRUTH here... right?", npc, creature) npcHandler:setTopic(playerId, 5) @@ -117,8 +117,8 @@ local function creatureSayCallback(npc, creature, type, message) "I... I... Well, at least you told me the truth. I don't know if I can accept this as an excuse but it's a start. Now let me return to my work, I need to fix this statue and then the rest of this... mess.", }, npc, creature) player:addAchievement("Truth Be Told") - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 11) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.LastMissionState, 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 11) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.LastMissionState, 1) npcHandler:setTopic(playerId, 0) end end @@ -135,33 +135,33 @@ local function creatureSayCallback(npc, creature, type, message) "What? 'Dimensional fold?' Well, thanks for the information and please close the door behind you when you leave my house. Now.", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 2) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 2) end - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then if npcHandler:getTopic(playerId) == 0 then npcHandler:say("So that's it? Really?", npc, creature) npcHandler:setTopic(playerId, 6) elseif npcHandler:getTopic(playerId) == 6 then npcHandler:say("Yeah, yeah... so what are you still doing here? I guess I... will have to seek out this Spectulus now, see what he has to say. There is nothing left for me in this place.", npc, creature) player:addAchievement("You Don't Know Jack") - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 11) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.LastMissionState, 2) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 11) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.LastMissionState, 2) npcHandler:setTopic(playerId, 0) end end elseif MsgContains(message, "hobbies") or MsgContains(message, "hobby") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 7 then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) < 0 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 7 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue) < 0 then npcHandler:say({ "Ah, also a keen lover of arts I assume? You might have already caught a glimpse of that humble masterpiece over there in the corner - I sculpt sulky sculptures! ...", "Sculpting sculptures was my passion since childhood... ...and it was there at my first sandcastle when... ...and it formed... ...and it developed into... ...years of enduring sculpting... ...carved of something like... ...sulky... ...", "And that's what I like to do to this very day - hey, hey will you wake up? Were you even listening to me?", }, npc, creature) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Statue, 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue, 1) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 8 then npcHandler:say("I... was... sculpting sulky sculptures. For all my life. Until you came in here and DESTROYED MY MASTERPIECE. Go away. I don't like you.", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/kazzan.lua b/data-otservbr-global/npc/kazzan.lua index 797bf28fe67..78a93d4f979 100644 --- a/data-otservbr-global/npc/kazzan.lua +++ b/data-otservbr-global/npc/kazzan.lua @@ -81,7 +81,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) < 1 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) < 1 then if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor) < 1 and player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor) < 1 then npcHandler:say("Do you know the location of the djinn fortresses in the mountains south of here?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -97,14 +97,14 @@ local function creatureSayCallback(npc, creature, type, message) "Very good. I hope you are able to convince one of the fractions to stand on our side. If you haven't done yet, you should first go and look for old Melchior in Ankrahmun. ...", "He knows many things about the djinn race and he may have some hints for you.", }, npc, creature) - if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) end - player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, 1) -- Entregando - elseif player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) == 3 then npcHandler:say("Well, I don't blame you for that. I am sure you did your best. Now we can just hope that peace remains. Here, take this small gratification for your effort to help and Daraman may bless you!", npc, creature) - player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) + 1) player:addItem(3035, 20) end diff --git a/data-otservbr-global/npc/kevin.lua b/data-otservbr-global/npc/kevin.lua index 41686524673..aadf4e8f56f 100644 --- a/data-otservbr-global/npc/kevin.lua +++ b/data-otservbr-global/npc/kevin.lua @@ -69,114 +69,114 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Postman.Mission01) < 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) < 1 then npcHandler:say("You are not a member of our guild yet! We have high standards for our members. To rise in our guild is a difficult but rewarding task. Are you interested in joining?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.Postman.Mission01) == 5 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 5 then npcHandler:say("So you have finally made it! I did not think that you would have it in you ... However: are you ready for another assignment?", npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.Postman.Mission02) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02) == 2 then npcHandler:say("Excellent, you got it fixed! This will teach this mailbox a lesson indeed! Are you interested in another assignment?", npc, creature) - player:setStorageValue(Storage.Postman.Mission02, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02, 3) npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(Storage.Postman.Mission03) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) == 2 then npcHandler:say("You truly got him? Quite impressive. You are a very promising candidate! I think I have another mission for you. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Postman.Mission04) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 1 then npcHandler:say("Do you bring all bones for our officers' safety fund at once?", npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.Postman.Mission05) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05) == 3 then npcHandler:say("Splendid, I knew we could trust you. I would like to ask for your help in another matter. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.Postman.Mission07) == 8 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) == 8 then npcHandler:say("Once more you have impressed me! Are you willing to do another job?", npc, creature) npcHandler:setTopic(playerId, 21) - elseif player:getStorageValue(Storage.Postman.Mission06) >= 1 and player:getStorageValue(Storage.Postman.Mission06) < 10 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) < 10 then npcHandler:say("First you need to complete your current mission.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission06) == 12 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 12 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 13) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 13) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Postman.Mission06) == 10 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 10 then npcHandler:say("Fine, fine. I think that should do it. Tell Hugo that we order those uniforms. The completed dress pattern will soon arrive in Venore. Report to me when you have talked to him.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 11) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 11) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission08) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 2 then npcHandler:say("So Waldo is dead? This is grave news indeed. Did you recover his posthorn?", npc, creature) npcHandler:setTopic(playerId, 23) - elseif player:getStorageValue(Storage.Postman.Mission09) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09) == 3 then npcHandler:say("You did it? I hope you did not catch a flu in the cold! Anyway, there's another mission for you. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 26) - elseif player:getStorageValue(Storage.Postman.Mission10) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 2 then npcHandler:say("You have delivered that letter? You are a true postofficer. All over the land bards shallpraise your name. There are no missions for you left right now.", npc, creature) - player:setStorageValue(Storage.Postman.Mission10, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10, 3) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission10) == 3 and player:getStorageValue(Storage.Postman.Rank) == 5 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 5 then npcHandler:say("There are no missions for you left right now. You already have the title of Archpostman.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission10) == 3 and player:getStorageValue(Storage.Postman.Rank) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 then npcHandler:say("There are no missions for you left right now. But you are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 27) - elseif player:getStorageValue(Storage.Postman.Mission08) == 3 and player:getStorageValue(Storage.Postman.Rank) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Postman.Mission08) == 3 and player:getStorageValue(Storage.Postman.Rank) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.Postman.Rank) == 4 or player:getStorageValue(Storage.Postman.Rank) == 3 and player:getStorageValue(Storage.Postman.Mission09) == 0 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 or player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09) == 0 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.Postman.Mission07) < 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) < 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 13 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 19) - elseif player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 13 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 2 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 2 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 2 then npcHandler:say("You have made it! We have enough bones for the fund! You remind me of myself when I was young! Interested in another mission?", npc, creature) npcHandler:setTopic(playerId, 15) - elseif player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 2 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 then npcHandler:say("You have made it! We have enough bones for the fund! You remind me of myself when I was young! Interested in another mission?", npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Postman.Mission03) == 3 and player:getStorageValue(Storage.Postman.Mission04) == 0 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 0 then npcHandler:say("You truly got him? Quite impressive. You are a very promising candidate! I think I have another mission for you. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Postman.Rank) == 1 and player:getStorageValue(Storage.Postman.Mission03) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) == 3 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Postman.Mission02) == 3 and player:getStorageValue(Storage.Postman.Rank) == 1 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 10) end elseif MsgContains(message, "dress pattern") then - if player:getStorageValue(Storage.Postman.Mission06) == 2 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 2 then npcHandler:say("Oh yes, where did we get that from ...? Let's see, first ask the great technomancer in Kazordoon for the technical details. Return here afterwards.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 3) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission06) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 4 then npcHandler:say("The mail with Talphion's instructions just arived. I remember we asked Queen Eloise of Carlin for the perfect colours. Go there, ask her about the UNIFORMS and report back here.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 5) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 5) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Postman.Mission06) == 6 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 6 then npcHandler:say("The queen has sent me the samples we needed. The next part is tricky. We need theuniforms to emanate some odor that dogs hate.The dog with the best 'taste' in that field is Noodles,the dog of King Tibianus. Do you understand so far?", npc, creature) npcHandler:setTopic(playerId, 18) - elseif player:getStorageValue(Storage.Postman.Mission06) == 10 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 10 then npcHandler:say("Fine, fine. I think that should do it. Tell Hugo that we order those uniforms. The completed dress pattern will soon arrive in Venore. Report to me when you have talked to him.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 11) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 11) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "advancement") then - if player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 2 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 14) - elseif player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 13 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 2 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 20) - elseif player:getStorageValue(Storage.Postman.Mission08) == 3 and player:getStorageValue(Storage.Postman.Rank) == 3 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 24) - elseif player:getStorageValue(Storage.Postman.Mission10) == 3 and player:getStorageValue(Storage.Postman.Rank) == 4 then + elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 27) end @@ -201,32 +201,32 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 7) elseif npcHandler:getTopic(playerId) == 7 then npcHandler:say("Ok, remember: the Tibian mail service puts trust in you! Don't fail and report back soon. Just tell me about your {mission}.", npc, creature) - player:setStorageValue(Storage.Postman.Mission01, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 8 then npcHandler:say("I am glad to hear that. One of our mailboxes was reported to be jammed. It is located on the so called 'mountain' on theisle Folda. Get a crowbar and fix the mailbox. Report about your mission when you have done so.", npc, creature) - player:setStorageValue(Storage.Postman.Mission01, 6) - player:setStorageValue(Storage.Postman.Mission02, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 6) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 9 then npcHandler:say("For your noble deeds I grant you the title Assistant Postofficer. All Postofficers will charge you less money from now on. After every second mission ask me for an ADVANCEMENT. Your next task will be a bit more challenging. Do you feel ready for it?", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 1) npcHandler:setTopic(playerId, 10) elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say("I need you to deliver a bill to the stage magician David Brassacres. He's hiding from his creditors somewhere in Venore. It's likely you will have to trick him somehow to reveal his identity. Report back when you delivered this bill.", npc, creature) - player:setStorageValue(Storage.Postman.Mission03, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03, 1) player:addItem(3216, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 11 then npcHandler:say("Ok, listen: we have some serious trouble with agressive dogs lately. We have accumulated some bones as a sort of pacifier but we need more. Collect 20 bones like the one in my room to the left and report here.", npc, creature) - player:setStorageValue(Storage.Postman.Mission03, 3) - player:setStorageValue(Storage.Postman.Mission04, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 13 then if getPlayerBones(creature) >= 20 then doPlayerRemoveBones(creature) npcHandler:say("You have collected all the 20 bones needed. Excellent! Now let's talk about further missions if you are interested.", npc, creature) - player:setStorageValue(Storage.Postman.Mission04, 2) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04, 2) npcHandler:setTopic(playerId, 0) else npcHandler:setTopic(playerId, 0) @@ -234,64 +234,64 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 14 then npcHandler:say("I grant you the title of postman. You are now a full member of our guild. Here have your own officers hat and wear it with pride.", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 2) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 2) player:addItem(3576, 1) npcHandler:setTopic(playerId, 15) elseif npcHandler:getTopic(playerId) == 15 then npcHandler:say("Since I am convinced I can trust you, this time you must deliver a valuable present to Dermot on Fibula. Do NOT open it!!! You will find the present behind the door here on the lower right side of this room.", npc, creature) - player:setStorageValue(Storage.Postman.Mission05, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 16 then npcHandler:say("Ok. We need a new set of uniforms, and only the best will do for us. Please travel to Venore and negotiate with Hugo Chief acontract for new uniforms.", npc, creature) - player:setStorageValue(Storage.Postman.Mission05, 4) - player:setStorageValue(Storage.Postman.Mission06, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05, 4) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 18 then npcHandler:say("Good. Go there and find out what taste he dislikes most: mouldy cheese, a piece of fur or abananaskin. Tell him to SNIFF, then the object. Show him the object and ask 'Do you like that?'.DONT let the guards know what you are doing.", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 7) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 7) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 19 then npcHandler:say("Good, so listen. Hugo Chief informed me that he needs the measurements of our postofficers. Go and bring me the measurements of Ben, Lokur, Dove, Liane, Chrystal and Olrik.", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 20 then npcHandler:say("From now on it shall be known that you are a grand postman. You are now a privilegedmember until the end of days. Most captains around the world have an agreement with our guild to transport our privileged members, like you, for less gold.", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 3) npcHandler:setTopic(playerId, 19) elseif npcHandler:getTopic(playerId) == 21 then npcHandler:say("Ok but your next assignment might be dangerous. Our Courier Waldo has been missing for a while. I must assume he is dead. Can you follow me so far?", npc, creature) npcHandler:setTopic(playerId, 22) elseif npcHandler:getTopic(playerId) == 22 then npcHandler:say("Find out about his whereabouts and retrieve him or at least his posthorn. He was looking for a new underground passage that is rumoured to be found underneath the troll-infested Mountain east of Thais.", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, 9) - player:setStorageValue(Storage.Postman.Mission08, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, 9) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 23 then if player:removeItem(3219, 1) then npcHandler:say("Thank you. We will honour this. Your next mission will be a very special one. Good thing you are a special person as well. Are you ready?", npc, creature) - player:setStorageValue(Storage.Postman.Mission08, 3) - player:setStorageValue(Storage.Postman.Mission09, 0) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08, 3) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 0) npcHandler:setTopic(playerId, 28) end elseif npcHandler:getTopic(playerId) == 24 then npcHandler:say("From now on you are a grand postman for special operations. You are an honoured member of our guild and earned the privilege of your own post horn. Here, take it.", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 4) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 4) player:addItem(3252, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 25 then npcHandler:say("So listen well. Behind the lower left door you will find a bag. The letters in the bag are for none other than Santa Claus! Deliver them to his house on the isle of Vega, {use} thebag on his mailbox and report back here.", npc, creature) - player:setStorageValue(Storage.Postman.Mission09, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 26 then npcHandler:say("Excellent. Here is a letter for you to deliver. Well, to be honest, no one else volunteered. It's a letter from the mother of Markwin, the king of Mintwallin. Deliver that letter to him, but note that you will not be welcome there.", npc, creature) - player:setStorageValue(Storage.Postman.Mission09, 4) - player:setStorageValue(Storage.Postman.Mission10, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 4) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10, 1) player:addItem(3220, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 27 then npcHandler:say("I grant you the title of Archpostman. You are a legend in our guild. As privilege of your newly aquired status you are allowed to make use of certain mailboxes in dangerous areas. Just look out for them and you'll see.", npc, creature) - player:setStorageValue(Storage.Postman.Rank, 5) - player:setStorageValue(Storage.Postman.Door, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 5) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Door, 1) player:addAchievement("Archpostman") npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 28 then diff --git a/data-otservbr-global/npc/kroox.lua b/data-otservbr-global/npc/kroox.lua index c8adea58c72..ac0acc773de 100644 --- a/data-otservbr-global/npc/kroox.lua +++ b/data-otservbr-global/npc/kroox.lua @@ -67,10 +67,10 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackDoor, 1) end elseif message == "lokurs measurements" then - if player:getStorageValue(Storage.Postman.Mission07) >= 7 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 7 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsKroox) ~= 1 then npcHandler:say("Hm, well I guess its ok to tell you ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsKroox, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsKroox, 1) else npcHandler:say("...", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/liane.lua b/data-otservbr-global/npc/liane.lua index b483de917ae..330b9a8615d 100644 --- a/data-otservbr-global/npc/liane.lua +++ b/data-otservbr-global/npc/liane.lua @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsLiane) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsLiane) ~= 1 then npcHandler:say("I have more urgent problem to attend then that. Those hawks are hunting my carrier pigeons. Bring me 12 arrows and I'll see if I have the time for this nonsense. Do you have 12 arrows with you? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -79,8 +79,8 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeItem(3447, 12) then npcHandler:say("Great! Now I'll teach them a lesson ... For those measurements ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsLiane, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsLiane, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("Oh, you don't have it.", npc, creature) diff --git a/data-otservbr-global/npc/lokur.lua b/data-otservbr-global/npc/lokur.lua index 59fc7ed0f7c..88e710aa066 100644 --- a/data-otservbr-global/npc/lokur.lua +++ b/data-otservbr-global/npc/lokur.lua @@ -95,9 +95,9 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("No then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 6 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 6 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsKroox) ~= 1 then npcHandler:say("Come on, I have no clue what they are. Better ask my armorer Kroox for such nonsense.Go and ask him for good ol' Lokurs measurements, he'll know.", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) else npcHandler:say("...", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/markwin.lua b/data-otservbr-global/npc/markwin.lua index c30dd0242f3..0a27b3ac6bc 100644 --- a/data-otservbr-global/npc/markwin.lua +++ b/data-otservbr-global/npc/markwin.lua @@ -86,7 +86,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "letter") then - if player:getStorageValue(Storage.Postman.Mission10) == 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 1 then if player:getItemCount(3220) > 0 then npcHandler:say("A letter from my Moohmy?? Do you have a letter from my Moohmy to me?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -100,7 +100,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Uhm, well thank you, hornless being.", npc, creature) - player:setStorageValue(Storage.Postman.Mission10, 2) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10, 2) player:removeItem(3220, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/mother_of_jack.lua b/data-otservbr-global/npc/mother_of_jack.lua index 3f7d693cb56..cc428dee566 100644 --- a/data-otservbr-global/npc/mother_of_jack.lua +++ b/data-otservbr-global/npc/mother_of_jack.lua @@ -68,8 +68,8 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "jack") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 5 then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Mother) < 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Mother) < 1 then npcHandler:say("What about him? He's downstairs as he always has been. He never went away from home any further than into the forest nearby. He rarely ever took a walk to Edron, did he?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -90,7 +90,7 @@ local function creatureSayCallback(npc, creature, type, message) "JAAAAACK!", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Mother, 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Mother, 1) end end return true diff --git a/data-otservbr-global/npc/muhad.lua b/data-otservbr-global/npc/muhad.lua index f55754cbc94..c4ec365f14a 100644 --- a/data-otservbr-global/npc/muhad.lua +++ b/data-otservbr-global/npc/muhad.lua @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local AritosTask = player:getStorageValue(Storage.TibiaTales.AritosTask) + local AritosTask = player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) -- Check if the message contains "arito" if MsgContains(message, "arito") then @@ -96,8 +96,8 @@ local function creatureSayCallback(npc, creature, type, message) "Try to sneak in undetectedly and bring back our treasure as soon as you obtain it. May Daraman hold his protective hand over you on your mission. I wish you good luck. ...", "One last thing before you leave. Take the path behind me and you will get out of our hideout unharmed.", }, npc, creature) - player:setStorageValue(Storage.TibiaTales.AritosTask, 2) - player:setStorageValue(Storage.TibiaTales.AritosTaskDoor, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask, 2) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTaskDoor, 1) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/muriel.lua b/data-otservbr-global/npc/muriel.lua index df5d4770ebb..8017528a681 100644 --- a/data-otservbr-global/npc/muriel.lua +++ b/data-otservbr-global/npc/muriel.lua @@ -64,20 +64,20 @@ local function creatureSayCallback(npc, creature, type, message) return true end - if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == -1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) == -1 then npcHandler:say({ "Indeed, there is something you can do for me. You must know I am researching for a new spell against the undead. ...", "To achieve that I need a desecrated bone. There is a cursed bone pit somewhere in the dungeons north of Thais where the dead never rest. ...", "Find that pit, dig for a well-preserved human skeleton and conserve a sample in a special container which you receive from me. Are you going to help me?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) == 1 then npcHandler:say({ "The rotworms dug deep into the soil north of Thais. Rumours say that you can access a place of endless moaning from there. ...", "No one knows how old that common grave is but the people who died there are cursed and never come to rest. A bone from that pit would be perfect for my studies.", }, npc, creature) - elseif player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == 2 then - player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 3) + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) == 2 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, 3) if player:removeItem(131, 1) then player:addItem(6299, 1) npcHandler:say("Excellent! Now I can try to put my theoretical thoughts into practice and find a cure for the symptoms of undead. Here, take this for your efforts.", npc, creature) @@ -97,7 +97,7 @@ local function creatureSayCallback(npc, creature, type, message) "If you lose it, you can buy a new one from the explorer's society in North Port or Port Hope. Ask me about the mission when you come back.", }, npc, creature) player:addItem(4852, 1) - player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, 1) end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 1 then diff --git a/data-otservbr-global/npc/ninos.lua b/data-otservbr-global/npc/ninos.lua index d55c55939d8..f659681e466 100644 --- a/data-otservbr-global/npc/ninos.lua +++ b/data-otservbr-global/npc/ninos.lua @@ -68,10 +68,10 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "measurements") then local player = Player(creature) - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsBenjamin) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin) ~= 1 then npcHandler:say("Oh they don't change that much since in the old days as... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsBenjamin, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("...", npc, creature) diff --git a/data-otservbr-global/npc/noodles.lua b/data-otservbr-global/npc/noodles.lua index 64c8ab591b7..56fc3c545a0 100644 --- a/data-otservbr-global/npc/noodles.lua +++ b/data-otservbr-global/npc/noodles.lua @@ -64,21 +64,21 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "banana skin") then - if player:getStorageValue(Storage.Postman.Mission06) == 7 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 7 then if player:getItemCount(3104) > 0 then npcHandler:say("", npc, creature) npcHandler:setTopic(playerId, 1) end end elseif MsgContains(message, "dirty fur") then - if player:getStorageValue(Storage.Postman.Mission06) == 8 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 8 then if player:getItemCount(3105) > 0 then npcHandler:say("", npc, creature) npcHandler:setTopic(playerId, 2) end end elseif MsgContains(message, "mouldy cheese") then - if player:getStorageValue(Storage.Postman.Mission06) == 9 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 9 then if player:getItemCount(3120) > 0 then npcHandler:say("", npc, creature) npcHandler:setTopic(playerId, 3) @@ -87,15 +87,15 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "like") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Woof!", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 8) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 8) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Woof!", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 9) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 9) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Meeep! Grrrrr! ", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 10) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 10) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/olrik.lua b/data-otservbr-global/npc/olrik.lua index 42886e71318..d900e7841f2 100644 --- a/data-otservbr-global/npc/olrik.lua +++ b/data-otservbr-global/npc/olrik.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsOlrik) ~= 1 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsOlrik) ~= 1 then npcHandler:say("My measurements? Listen, lets make that a bit more exciting ... No, no, not what you think! I mean let's gamble. I will roll a dice. If I roll a 6 you win and I'll tell you what you need to know, else I win and get 5 gold. Deal? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -74,8 +74,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok, here we go ... " .. number .. "! You lose! Try again.", npc, creature) else npcHandler:say("Ok, here we go ... " .. number .. "! You have won! How lucky you are! So listen ... ", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) - player:setStorageValue(Storage.Postman.MeasurementsOlrik, 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsOlrik, 1) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/one_eyed_joe.lua b/data-otservbr-global/npc/one_eyed_joe.lua index 188ebb674d1..9f6784413ec 100644 --- a/data-otservbr-global/npc/one_eyed_joe.lua +++ b/data-otservbr-global/npc/one_eyed_joe.lua @@ -128,7 +128,7 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 2) elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) < 0 then player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 0) end diff --git a/data-otservbr-global/npc/padreia.lua b/data-otservbr-global/npc/padreia.lua index f6bd6803ccb..0b9d961248a 100644 --- a/data-otservbr-global/npc/padreia.lua +++ b/data-otservbr-global/npc/padreia.lua @@ -63,20 +63,20 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Do you want to buy a bottle of cough syrup for 50 gold?", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.TibiaTales.TheExterminator) == -1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) == -1 then npcHandler:say({ "Oh " .. player:getName() .. ", thank god you came to me. Last night, I had a vision about an upcoming plague here in Carlin. ...", "It will originate from slimes that will swarm out of the sewers and infect every citizen with a deadly disease. Are you willing to help me save Carlin?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.TibiaTales.TheExterminator) == 1 then + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) == 1 then npcHandler:say("You MUST find that slime pool immediately or life here in Carlin will not be the same anymore.", npc, creature) - elseif player:getStorageValue(Storage.TibiaTales.TheExterminator) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) == 2 then local itemId = { 3033, 3032, 3030, 3029 } for i = 1, #itemId do player:addItem(itemId[i], 1) end - player:setStorageValue(Storage.TibiaTales.TheExterminator, 3) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator, 3) npcHandler:say("You did it! Even if only few of the Carliners will ever know about that, you saved all of their lives. Here, take this as a reward. Farewell!", npc, creature) else npcHandler:say("Maybe the guards have something to do for you or know someone who could need some help.", npc, creature) @@ -92,7 +92,7 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(4828, 1) elseif npcHandler:getTopic(playerId) == 2 then player:addItem(135, 1) - player:setStorageValue(Storage.TibiaTales.TheExterminator, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator, 1) npcHandler:say({ "I knew I could count on you. Take this highly intensified vermin poison. In my vision, I saw some kind of 'pool' where these slimes came from. ...", "Pour the poison in the water to stop the demise of Carlin. Tell me about your mission after you fulfilled your task.", diff --git a/data-otservbr-global/npc/queen_eloise.lua b/data-otservbr-global/npc/queen_eloise.lua index 0467bb6e74a..e4fd566e422 100644 --- a/data-otservbr-global/npc/queen_eloise.lua +++ b/data-otservbr-global/npc/queen_eloise.lua @@ -173,9 +173,9 @@ node1:addChildKeyword({ "yes" }, StdModule.promotePlayer, { npcHandler = npcHand node1:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, onlyFocus = true, text = "Alright then, come back when you are ready.", reset = true }) -- Postman keywordHandler:addKeyword({ "uniforms" }, StdModule.say, { npcHandler = npcHandler, text = "I remember about those uniforms, they had a camouflage inlay so they could be worn the inside out too. I will send some color samples via mail to Mr. Postner." }, function(player) - return player:getStorageValue(Storage.Postman.Mission06) == 5 + return player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 5 end, function(player) - player:setStorageValue(Storage.Postman.Mission06, 6) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 6) end) -- Greeting diff --git a/data-otservbr-global/npc/rabaz.lua b/data-otservbr-global/npc/rabaz.lua index 79786f59cc4..df9e8ca2ca5 100644 --- a/data-otservbr-global/npc/rabaz.lua +++ b/data-otservbr-global/npc/rabaz.lua @@ -147,7 +147,7 @@ local function creatureSayCallback(npc, creature, type, message) local categoryTable = itemsTable[message:lower()] if MsgContains(message, "mission") then - if player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) < 1 then + if player:getStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline) < 1 then npcHandler:setTopic(playerId, 1) npcHandler:say({ "Why yes, there is indeed some minor issue I could need your help with. I was always a friend of nature and it was not recently I discovered the joys of plants, growths, of all the flora around us. ...", @@ -160,15 +160,15 @@ local function creatureSayCallback(npc, creature, type, message) "Once you find what I need, best use a knife to carefully cut and gather a leaf or a scrap of their integument and press it directly under their appropriate entry into my botanical almanach. ...", "Simply return to me after you have done that and we will discuss your reward. What do you say, are you in?", }, npc, creature) - elseif player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 3 then + elseif player:getStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline) == 3 then npcHandler:setTopic(playerId, 2) npcHandler:say("Well fantastic work, you gathered both samples! Now I can continue my work on the almanach, thank you very much for your help indeed. Can I take a look at my book please?", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 1) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.ChestDoor, 0) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 1) + player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.ChestDoor, 0) npcHandler:say("Yes? Yes! That's the enthusiasm I need! Remember to bring a sharp knife to gather the samples, plants - even mutated deformed plants - are very sensitive you know. Off you go and be careful out there, Zao is no place for the feint hearted mind you.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then @@ -176,7 +176,7 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(11700, 1) player:addItem(3035, 10) player:addExperience(3000, true) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 4) + player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 4) npcHandler:say({ "Ah, thank you. Now look at that texture and fine colour, simply marvellous. ...", "I hope the sun in the steppe did not exhaust you too much? Shellshock. A dangerous foe in the world of field science and exploration. ...", diff --git a/data-otservbr-global/npc/sandomo.lua b/data-otservbr-global/npc/sandomo.lua index 0fa8876c5da..5086a6750df 100644 --- a/data-otservbr-global/npc/sandomo.lua +++ b/data-otservbr-global/npc/sandomo.lua @@ -52,9 +52,9 @@ end function Player.getInquisitionGold(self) local v = { - math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Mortar_Thrown)) * 100, - math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Killed_Frazzlemaws)), - math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Killed_Silencers)), + math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown)) * 100, + math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Frazzlemaws)), + math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Silencers)), } return v[1] + v[2] + v[3] end @@ -102,9 +102,9 @@ local function creatureSayCallback(npc, creature, type, message) if player:getInquisitionGold() > 0 then npcHandler:setTopic(playerId, 4) npcHandler:say({ - "Alright, so you mixed and delivered " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Mortar_Thrown)) .. " mortar and ...", - "You killed " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Killed_Frazzlemaws)) .. " frazzlemaws and ...", - "You also hunted " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Killed_Silencers)) .. " silencers. That would equal " .. player:getInquisitionGold() .. " of inquisition gold - BUT we are currently short of this valuable metal so... do you want me to add this amount to my {books} for now or {trade} it for something else.", + "Alright, so you mixed and delivered " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown)) .. " mortar and ...", + "You killed " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Frazzlemaws)) .. " frazzlemaws and ...", + "You also hunted " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Silencers)) .. " silencers. That would equal " .. player:getInquisitionGold() .. " of inquisition gold - BUT we are currently short of this valuable metal so... do you want me to add this amount to my {books} for now or {trade} it for something else.", }, npc, creature) else npcHandler:setTopic(playerId, nil) @@ -112,7 +112,7 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif npcHandler:getTopic(playerId) == 4 then - local v = math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Gold_Record)) + local v = math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record)) if MsgContains(message, "book") or MsgContains(message, "books") then npcHandler:setTopic(playerId, 5) npcHandler:say({ @@ -126,21 +126,21 @@ local function creatureSayCallback(npc, creature, type, message) "Good. Registered as... " .. player:getName() .. "... with... about " .. player:getInquisitionGold() .. " of righteously earned inquisition gold added. There. Thanks for your help! ..", "Good. Ask me any time in case you want to know your current {record}. If you have time, Remember you can also {trade} your earnings into some of these... probably far more valuable, ahem... cluster... things, yes.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Gold_Record, player:getInquisitionGold()) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Mortar_Thrown, 0) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Killed_Frazzlemaws, 0) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Killed_Silencers, 0) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record, player:getInquisitionGold()) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown, 0) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Frazzlemaws, 0) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Silencers, 0) npcHandler:setTopic(playerId, nil) end elseif MsgContains(message, "record") then - local v = player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Gold_Record) + local v = player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) if v > 0 then npcHandler:say("You have " .. v .. " inquisition gold registered in my book.", npc, creature) else npcHandler:say("I do not see inquisition gold registered in my book from you.", npc, creature) end elseif MsgContains(message, "trade") then - local v = player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Gold_Record) + local v = player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) if v >= 100 then npcHandler:setTopic(playerId, 6) npcHandler:say("Ah yes, you currently have " .. v .. " of righteously earned inquisition gold in my book. 100 inquisition gold equals one cluster. How many clusters do you want in exchange?", npc, creature) @@ -154,15 +154,15 @@ local function creatureSayCallback(npc, creature, type, message) return npcHandler:say("You should tell me a real number.", npc, creature) end - local max = math.floor(player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Gold_Record) / 100) + local max = math.floor(player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) / 100) if v > max then return npcHandler:say("You do not have enough inquisition gold for that, so far you can ask for up to " .. max .. " clusters.", npc, creature) end player:addItem(20062, v) npcHandler:setTopic(playerId, nil) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Gold_Record, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Gold_Record) - (v * 100)) - npcHandler:say("There you are. Now I register " .. player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Gold_Record) .. " inquisition gold of yours in my book.", npc, creature) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) - (v * 100)) + npcHandler:say("There you are. Now I register " .. player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) .. " inquisition gold of yours in my book.", npc, creature) end if MsgContains(message, "bucket") or MsgContains(message, "supplies") then diff --git a/data-otservbr-global/npc/sister_of_jack.lua b/data-otservbr-global/npc/sister_of_jack.lua index a93950dcf28..e73b91f0b67 100644 --- a/data-otservbr-global/npc/sister_of_jack.lua +++ b/data-otservbr-global/npc/sister_of_jack.lua @@ -68,8 +68,8 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "jack") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 5 then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Mother == 1) and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Sister)) < 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Mother == 1) and (player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Sister)) < 1 then npcHandler:say("Why are you asking, he didn't get himself into something again did he?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -95,8 +95,8 @@ local function creatureSayCallback(npc, creature, type, message) "Wait till mother hears that! Oh he will be in for a surprise, I can tell you that. Ma!! Maaaaa!!", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Sister, 1) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 6) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Sister, 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 6) end end return true diff --git a/data-otservbr-global/npc/spectulus.lua b/data-otservbr-global/npc/spectulus.lua index 20257671367..9856bce82c0 100644 --- a/data-otservbr-global/npc/spectulus.lua +++ b/data-otservbr-global/npc/spectulus.lua @@ -81,7 +81,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "research") and player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 11 then + if MsgContains(message, "research") and player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 11 then local qStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01) local tombsStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.TombUse) if qStorage == -1 then @@ -164,22 +164,22 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:say("Do you have the mirror crystal? Unbelievable! Alright I will extract the crystal from the device myself, would you please give me the device with the crystal and step back?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif (player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 10) and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) < 1) then + elseif (player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 10) and (player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) < 1) then npcHandler:say("After the debacle with the crystal, I started focussing on other things. There are also some {tasks} that still need to be done. If you can spare the time to continue helping me, it shall not be to your disadvantage. So are you in for another mission?", npc, creature) npcHandler:setTopic(playerId, 27) - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 2 then npcHandler:say("So you found him? Have you talked to {Jack} yet?", npc, creature) npcHandler:setTopic(playerId, 30) - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 4 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 4 then npcHandler:say("You're back from {Jack}! Mh, by the looks of your face I doubt our little redecoration project yielded any success. But I had an even better idea while you were gone - ready to give it another try?", npc, creature) npcHandler:setTopic(playerId, 32) - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 6 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 6 then npcHandler:say("So, did you talk to his family? Were you able to convince them?", npc, creature) npcHandler:setTopic(playerId, 33) - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 8 then npcHandler:say("Did you find out what hobby {Jack} has? Did you separate him from this activity? Only if he has a free mind, he can truly get back to his former self! Now all you need to do is talk to him again!", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 9 then + elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 9 then npcHandler:say({ "Oh you are back already. Hm... I doubt it worked, did it? It DID? Oh well... good job. Really! Now... the thing is - the actual {Jack} wrote. No, no wait. Calm down first. ...", "You remember me explaining the fold in time, causing a tiny disturbance in infinity? Well, as I already told you, {Jack} was indeed not transported to the future... but to the past. ...", @@ -191,7 +191,7 @@ local function creatureSayCallback(npc, creature, type, message) "Anyway you did a great job and I thank you for... putting your hands into my fire Player... once again.", }, npc, creature) player:addExperience(6000, true) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 10) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 10) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "yes") then @@ -308,8 +308,8 @@ local function creatureSayCallback(npc, creature, type, message) "I will mark his current location on your map, just ask him about me and see what happens - good luck.", }, npc, creature) player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 11) - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 30 then npcHandler:say("Yes? And he didn't remember anything? Not even me? That's not good. Then we will have to do everything ourselves. Are you ready to continue?", npc, creature) @@ -320,7 +320,7 @@ local function creatureSayCallback(npc, creature, type, message) "I know that he used to have a very comfy red cushioned chair and an old globe which sat near the middle of the room. He also used a smaller telescope and he had that extremely large amphora in a corner. And... there was one other thing. ...", "A rocking horse. He just loved it! Find these items, buy them if you need to and place them where {Jack} lives. Ask him about the furniture and don't forget to tell me about his reaction!", }, npc, creature) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 3) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 3) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 32 then npcHandler:say({ @@ -329,7 +329,7 @@ local function creatureSayCallback(npc, creature, type, message) "Hm... that's strange, I don't even recall his family. Never knew he had a mother and a sister. Tell them the truth about him - maybe they will understand and even help him getting this over with. ...", "But be careful, the {dimensional} shift could mean that they will not even know what you're talking about since they are more closely linked to him than anyone else.", }, npc, creature) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 5) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 5) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 33 then npcHandler:say({ @@ -337,11 +337,11 @@ local function creatureSayCallback(npc, creature, type, message) "A hobby or something! Yes, ask him about his hobbies! Convince him somehow that anything he is doing there does not match his true self - he didn't have any hobbies except a healthy interest in science - you MUST convince him, no matter what! ...", "Or everything we achieved would be in vain. We can still save Jack! Now go and do what you must do.", }, npc, creature) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 7) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 7) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "jack") then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then npcHandler:say({ "Well you know Jack - after all you talked to him in person. He will get over it. As for the real Jack, my former intern... I am glad that nothing serious happened to him. ...", "According to his letter, he did just fine so many years ago. He somehow managed to make a name of himself when he cast some magic we enhanced through our research - of course no one back then had ever seen such spells. ...", diff --git a/data-otservbr-global/npc/talphion.lua b/data-otservbr-global/npc/talphion.lua index 362dea22509..e48a26129b9 100644 --- a/data-otservbr-global/npc/talphion.lua +++ b/data-otservbr-global/npc/talphion.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "dress pattern") then - if player:getStorageValue(Storage.Postman.Mission06) == 3 then + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 3 then if npcHandler:getTopic(playerId) < 1 then npcHandler:say("DRESS FLATTEN? WHO WANTS ME TO FLATTEN A DRESS?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -73,7 +73,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("AH YES! I WORKED ON THE DRESS PATTERN FOR THOSE UNIFORMS. STAINLESS TROUSERES, STEAM DRIVEN BOOTS! ANOTHERMARVEL TO BEHOLD! I'LL SENT A COPY TO KEVIN IMEDIATELY!", npc, creature) - player:setStorageValue(Storage.Postman.Mission06, 4) + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 4) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/tereban_functions.lua b/data-otservbr-global/npc/tereban_functions.lua index 40ba653228d..9ffb25713bc 100644 --- a/data-otservbr-global/npc/tereban_functions.lua +++ b/data-otservbr-global/npc/tereban_functions.lua @@ -1,19 +1,19 @@ local topic = {} local storages = { - Storage.FathersBurden.Sinew, - Storage.FathersBurden.Wood, - Storage.FathersBurden.Cloth, - Storage.FathersBurden.Silk, - Storage.FathersBurden.Crystal, - Storage.FathersBurden.Root, - Storage.FathersBurden.Iron, - Storage.FathersBurden.Scale, + Storage.Quest.U8_6.AFathersBurden.Sinew, + Storage.Quest.U8_6.AFathersBurden.Wood, + Storage.Quest.U8_6.AFathersBurden.Cloth, + Storage.Quest.U8_6.AFathersBurden.Silk, + Storage.Quest.U8_6.AFathersBurden.Crystal, + Storage.Quest.U8_6.AFathersBurden.Root, + Storage.Quest.U8_6.AFathersBurden.Iron, + Storage.Quest.U8_6.AFathersBurden.Scale, } TerebanConfig = { ["strong sinew"] = { - storage = Storage.FathersBurden.Sinew, + storage = Storage.Quest.U8_6.AFathersBurden.Sinew, messages = { deliever = "Do you have the required sinew?", success = "Ah, not only did you bring some sinew to me, you also made the world a safer place by killing Heoni.", @@ -24,7 +24,7 @@ TerebanConfig = { itemId = 10592, -- Strong sinew }, ["exquisite wood"] = { - storage = Storage.FathersBurden.Wood, + storage = Storage.Quest.U8_6.AFathersBurden.Wood, messages = { deliever = "Could you find the wood we were talking about?", success = "Thank you. I feel somewhat embarrassed to put you into such a danger for some birthday present but I am sure you can handle it.", @@ -35,7 +35,7 @@ TerebanConfig = { itemId = 10591, -- Exquisite wood }, ["spectral cloth"] = { - storage = Storage.FathersBurden.Cloth, + storage = Storage.Quest.U8_6.AFathersBurden.Cloth, messages = { deliever = "Could you find the cloth I am looking for?", success = "It looks a bit scary but I guess sorcerers might even find that appealing. Thank you very much.", @@ -46,7 +46,7 @@ TerebanConfig = { itemId = 10590, -- Spectral cloth }, ["exquisite silk"] = { - storage = Storage.FathersBurden.Silk, + storage = Storage.Quest.U8_6.AFathersBurden.Silk, messages = { deliever = "So you've found the silk that I need?", success = "Great. I better don't think about how big a spider has to be to produce such strands of silk.", @@ -57,7 +57,7 @@ TerebanConfig = { itemId = 10589, -- Exquisite silk }, ["magic crystal"] = { - storage = Storage.FathersBurden.Crystal, + storage = Storage.Quest.U8_6.AFathersBurden.Crystal, messages = { deliever = "Did you find the required crystal?", success = "Oh look at the colours and sparkles. This crystal is truly remarkable, thank you.", @@ -68,7 +68,7 @@ TerebanConfig = { itemId = 10596, -- Magical crystal }, ["mystic root"] = { - storage = Storage.FathersBurden.Root, + storage = Storage.Quest.U8_6.AFathersBurden.Root, messages = { deliever = "Could you find the root which we are looking for?", success = "You are admirably determined in fulfilling your task. I will make sure that my sons appreciate what you did for their presents.", @@ -79,7 +79,7 @@ TerebanConfig = { itemId = 10595, -- Mystic root }, ["old iron"] = { - storage = Storage.FathersBurden.Iron, + storage = Storage.Quest.U8_6.AFathersBurden.Iron, messages = { deliever = "Have you found the iron that we need for the present?", success = "I wish there'd an easier way to get that iron but those dwarfs are so stubborn. However, now we got what we need.", @@ -90,7 +90,7 @@ TerebanConfig = { itemId = 10593, -- Old iron }, ["flexible dragon scale"] = { - storage = Storage.FathersBurden.Scale, + storage = Storage.Quest.U8_6.AFathersBurden.Scale, messages = { deliever = "Could you get Glitterscale's scales yet?", success = "These scales must have belonged to a fearsome beast. I envy you for your bravery.", @@ -131,20 +131,20 @@ function ParseTerebanSay(npc, creature, message, npcHandler) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.FathersBurden.Status) == 1 then - if player:getStorageValue(Storage.FathersBurden.Progress) ~= 8 then + if player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Status) == 1 then + if player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress) ~= 8 then npcHandler:say("Well, I need the parts of a sorcerer's robe, a paladin's bow, a knight's shield, and a druid's rod. If you cannot find one of them, ask me about it and I might provide you with some minor hints.", npc, creature) return true end - player:setStorageValue(Storage.FathersBurden.Status, 2) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Status, 2) player:addItem(oldCape, 1) player:addExperience(8000, true) npcHandler:say({ "I'm so glad I finally have all the parts for the presents. Your reward is my eternal gratitude. Well, that and some gold of course. ...", "Take this sachet over there, I wrapped the coins into this old cape I had still lying around here from a barter with a stranger, it is of no use for me anyway. Farewell and thank you once again.", }, npc, creature) - elseif player:getStorageValue(Storage.FathersBurden.Status) == 2 then + elseif player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Status) == 2 then npcHandler:say("Thank you for your help!", npc, creature) return true else @@ -173,9 +173,9 @@ function ParseTerebanSay(npc, creature, message, npcHandler) elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then npcHandler:say("I am relieved someone as capable as you will handle the task. Well, I need the parts of a sorcerer's robe, a paladin's bow, a knight's shield, and a druid's wand.", npc, creature) - player:setStorageValue(Storage.FathersBurden.QuestLog, 1) - player:setStorageValue(Storage.FathersBurden.Progress, 0) - player:setStorageValue(Storage.FathersBurden.Status, 1) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.QuestLog, 1) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress, 0) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Status, 1) for i = 1, #storages do player:setStorageValue(storages[i], 1) end @@ -192,7 +192,7 @@ function ParseTerebanSay(npc, creature, message, npcHandler) end player:setStorageValue(targetMessage.storage, 2) - player:setStorageValue(Storage.FathersBurden.Progress, player:getStorageValue(Storage.FathersBurden.Progress) + 1) + player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress, player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress) + 1) player:addExperience(2500, true) npcHandler:say(targetMessage.messages.success, npc, creature) elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/npc/ubaid.lua b/data-otservbr-global/npc/ubaid.lua index 6d46bb32d9c..32f36a35be7 100644 --- a/data-otservbr-global/npc/ubaid.lua +++ b/data-otservbr-global/npc/ubaid.lua @@ -99,7 +99,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- To Appease the Mighty Quest - if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 2 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) == 2 then npcHandler:say({ "You have the smell of the Marid on you. Tell me who sent you?", }, npc, creature) @@ -109,7 +109,7 @@ local function creatureSayCallback(npc, creature, type, message) "And he is sending a worm like you to us!?! The mighty Efreet!! Tell him that we won't be part in his 'great' plans and now LEAVE!! ...", "...or do you want to join us and fight those stinking Marid who claim themselves to be noble and righteous?!? Just let me know.", }, npc, creature) - player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) + 1) end if MsgContains(message, "passage") then diff --git a/data-otservbr-global/npc/umar.lua b/data-otservbr-global/npc/umar.lua index 4836c568958..b6a72878425 100644 --- a/data-otservbr-global/npc/umar.lua +++ b/data-otservbr-global/npc/umar.lua @@ -103,7 +103,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- To Appease the Mighty Quest - if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 1 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) == 1 then npcHandler:say({ "I should go and tell Fa'hradin. ...", "I am impressed you know our address of welcome! I honour that. So tell me who sent you on a mission to our fortress?", @@ -114,7 +114,7 @@ local function creatureSayCallback(npc, creature, type, message) "How dare you lie to me?!? The caliph should choose his envoys more carefully. We will not accept his peace-offering ...", "...but we are always looking for support in our fight against the evil Efreets. Tell me if you would like to join our fight.", }, npc, creature) - player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) + 1) end if MsgContains(message, "passage") then diff --git a/data-otservbr-global/npc/uzon.lua b/data-otservbr-global/npc/uzon.lua index 112dee20086..b54b5d4d5d3 100644 --- a/data-otservbr-global/npc/uzon.lua +++ b/data-otservbr-global/npc/uzon.lua @@ -78,8 +78,8 @@ addTravelKeyword("zao", "Do you seek a ride to Farmine for |TRAVELCOST|?", 60, P return player:getStorageValue(TheNewFrontier.Mission10[1]) ~= 2 end) addTravelKeyword("edron", "Do you seek a ride to Edron for |TRAVELCOST|?", 60, Position(33193, 31783, 3), nil, function(player) - if player:getStorageValue(Storage.Postman.Mission01) == 2 then - player:setStorageValue(Storage.Postman.Mission01, 3) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 2 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 3) end end) addTravelKeyword("darashia", "Do you seek a ride to Darashia on Darama for |TRAVELCOST|?", 60, Position(33270, 32441, 6)) diff --git a/data-otservbr-global/scripts/actions/other/construction_kits.lua b/data-otservbr-global/scripts/actions/other/construction_kits.lua index 1af8967cf27..20571165f92 100644 --- a/data-otservbr-global/scripts/actions/other/construction_kits.lua +++ b/data-otservbr-global/scripts/actions/other/construction_kits.lua @@ -62,31 +62,31 @@ local jackToTheFuture_Kits = { itemId = 2374, kitMessage = "The red cushioned chair looks quite comfy in that corner.", jackSay = "Jack: Yeah uhm... impressive chair. Now would you please remove it? Thanks.", - storage = Storage.TibiaTales.JackFutureQuest.Furniture01, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture01, }, [2797] = { itemId = 2979, kitMessage = "A globe like this should be in every household.", jackSay = "Jack: What the... what do I need a 'globe' for? Take this away.", - storage = Storage.TibiaTales.JackFutureQuest.Furniture02, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture02, }, [2799] = { itemId = 3485, kitMessage = "The telescope just looks like it was the one thing missing from this room.", jackSay = "Jack: Nice, a... what is this actually?", - storage = Storage.TibiaTales.JackFutureQuest.Furniture03, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture03, }, [2800] = { itemId = 2998, kitMessage = "What a cute horse - and just the right thing to place into this cute room.", jackSay = "Jack: A rocking horse? What's wrong with you.", - storage = Storage.TibiaTales.JackFutureQuest.Furniture04, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture04, }, [2805] = { itemId = 2904, kitMessage = "There seems to be no better place for this amphora than right here.", jackSay = "Jack: Trying to get rid of your junk in my house? Do I look like I need such a... 'vase'?", - storage = Storage.TibiaTales.JackFutureQuest.Furniture05, + storage = Storage.Quest.U8_7.JackFutureQuest.Furniture05, }, } @@ -99,7 +99,7 @@ local constructionKit = Action() function constructionKit.onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getPosition():isInRange(jackToTheFuture_House.beginPos, jackToTheFuture_House.finalPos) then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 3 then local setting = jackToTheFuture_Kits[item.itemid] if setting then if player:getStorageValue(setting.storage) < 1 then diff --git a/data-otservbr-global/scripts/actions/other/destroy.lua b/data-otservbr-global/scripts/actions/other/destroy.lua index 2898b400e0d..2767044644e 100644 --- a/data-otservbr-global/scripts/actions/other/destroy.lua +++ b/data-otservbr-global/scripts/actions/other/destroy.lua @@ -25,7 +25,7 @@ function destroy.onUse(player, item, fromPosition, target, toPosition, isHotkey) if toPosition == Position(scimitarPos.x, scimitarPos.y, scimitarPos.z) then local scimitarPlaced = Tile(scimitarPos):getItemById(placedSimitarItemId) if not scimitarPlaced then - if player:getStorageValue(Storage.TibiaTales.AritosTask) >= 0 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) >= 0 then item:remove() Game.createItem(placedSimitarItemId, 1, scimitarPos) addEvent(removeEntrance, 1 * 60 * 1000) diff --git a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua index f4106d15b82..52f2a4faea8 100644 --- a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua +++ b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua @@ -19,7 +19,7 @@ local config = { items = { { itemId = 3219 }, }, - storage = Storage.Postman.Mission08, + storage = Storage.Quest.U7_24.ThePostmanMissions.Mission08, formerValue = 1, newValue = 2, }, @@ -66,7 +66,7 @@ local config = { items = { { itemId = 3217 }, }, - storage = Storage.Postman.Mission09, + storage = Storage.Quest.U7_24.ThePostmanMissions.Mission09, formerValue = 1, newValue = 2, }, @@ -74,7 +74,7 @@ local config = { items = { { itemId = 3218 }, }, - storage = Storage.Postman.Mission05, + storage = Storage.Quest.U7_24.ThePostmanMissions.Mission05, formerValue = 1, newValue = 2, }, diff --git a/data-otservbr-global/scripts/actions/tools/skinning.lua b/data-otservbr-global/scripts/actions/tools/skinning.lua index 2461dfb7e80..a35929db054 100644 --- a/data-otservbr-global/scripts/actions/tools/skinning.lua +++ b/data-otservbr-global/scripts/actions/tools/skinning.lua @@ -150,13 +150,13 @@ function skinning.onUse(player, item, fromPosition, target, toPosition, isHotkey player:say("You carve a solid bowl of the chunk of wood.", TALKTYPE_MONSTER_SAY) return true -- An Interest In Botany Quest - elseif target.itemid == 10735 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 1 then + elseif target.itemid == 10735 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline) == 1 then player:say("The plant feels cold but dry and very soft. You streak the plant gently with your knife and put a fragment in the almanach.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 2) + player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 2) return true - elseif target.itemid == 10697 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 2 then + elseif target.itemid == 10697 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline) == 2 then player:say("You cut a leaf from a branch and put it in the almanach. It smells strangely sweet and awfully bitter at the same time.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 3) + player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 3) return true elseif target.itemid == 8181 and player:getStorageValue(789100) <= 1 then player:say("You got Neutral matter.", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index d0135de3c60..ce90d14d61f 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -238,8 +238,8 @@ local questTable = { { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission06, storageValue = 2 }, { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission07, storageValue = 1 }, { storage = Storage.Quest.U8_0.BarbarianArena.QuestLogGreenhorn, storageValue = 1 }, - { storage = Storage.TibiaTales.DefaultStart, storageValue = 1 }, - { storage = Storage.TibiaTales.ToAppeaseTheMightyQuest, storageValue = 1 }, + { storage = Storage.Quest.U8_1.TibiaTales.DefaultStart, storageValue = 1 }, + { storage = Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, storageValue = 1 }, { storage = 12450, storageValue = 6 }, { storage = 12330, storageValue = 1 }, { storage = 12332, storageValue = 13 }, @@ -361,7 +361,7 @@ local questTable = { -- Assassin Outfit quests { storage = Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, storageValue = 0 }, - { storage = Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, storageValue = 2 }, + { storage = Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline, storageValue = 2 }, -- Hunter Outfit quests { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet01, storageValue = 1 }, @@ -383,10 +383,10 @@ local questTable = { { storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine, storageValue = 2 }, --The White Raven Monastery - { storage = Storage.WhiteRavenMonastery.QuestLog, storageValue = 1 }, - { storage = Storage.WhiteRavenMonastery.Passage, storageValue = 1 }, - { storage = Storage.WhiteRavenMonastery.Diary, storageValue = 2 }, - { storage = Storage.WhiteRavenMonastery.Door, storageValue = 1 }, + { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, storageValue = 1 }, + { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, storageValue = 1 }, + { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, storageValue = 2 }, + { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Door, storageValue = 1 }, } -- from Position: (33201, 31762, 1) diff --git a/data-otservbr-global/scripts/lib/register_actions.lua b/data-otservbr-global/scripts/lib/register_actions.lua index a908823f55e..677c5bfbe46 100644 --- a/data-otservbr-global/scripts/lib/register_actions.lua +++ b/data-otservbr-global/scripts/lib/register_actions.lua @@ -264,9 +264,9 @@ function onDestroyItem(player, item, fromPosition, target, toPosition, isHotkey) if math.random(1, 80) <= (watt and watt > 10 and watt or 10) then -- Against The Spider Cult (Spider Eggs) if target.itemid == 233 then - local eggStorage = player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) + local eggStorage = player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult) if eggStorage >= 1 and eggStorage < 5 then - player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, math.max(1, eggStorage) + 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, math.max(1, eggStorage) + 1) end Game.createMonster("Giant Spider", Position(33181, 31869, 12)) @@ -479,7 +479,7 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) end end elseif target.itemid == 103 and target.actionid == 4205 then - if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) ~= 1 then return false end @@ -759,17 +759,17 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) target:decay() elseif target.itemid == 2071 then -- Jack to the Future Quest - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue) ~= 1 then return false end if toPosition == Position(33277, 31754, 7) then - if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) == 1 then + if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue) == 1 then target:transform(2066) toPosition:sendMagicEffect(CONST_ME_POFF) player:addItem(10426, 1) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Statue, 2) - player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) + 1) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue, 2) + player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) + 1) addEvent(revertItem, 2 * 60 * 1000, { x = 33277, y = 31754, z = 7 }, 2066, 2071) end end @@ -866,8 +866,8 @@ function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) elseif target.actionid == 100 then if target.itemid == 3501 then -- Postman quest - if player:getStorageValue(Storage.Postman.Mission02) == 1 then - player:setStorageValue(Storage.Postman.Mission02, 2) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02) == 1 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02, 2) toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) end elseif target:getActionId() == 40041 and target.itemid == 4848 then diff --git a/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua b/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua index 9178cc1e376..7ba64c68470 100644 --- a/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua +++ b/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua @@ -1,6 +1,6 @@ local config = { - [11589] = { itemId = 11550, storage = Storage.FathersBurden.Corpse.Scale, text = "Glitterscale's scale." }, - [11590] = { itemId = 11548, storage = Storage.FathersBurden.Corpse.Sinew, text = "Heoni's sinew" }, + [11589] = { itemId = 11550, storage = Storage.Quest.U8_6.AFathersBurden.Corpse.Scale, text = "Glitterscale's scale." }, + [11590] = { itemId = 11548, storage = Storage.Quest.U8_6.AFathersBurden.Corpse.Sinew, text = "Heoni's sinew" }, } local fatherCorpse = Action() diff --git a/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua b/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua index 31d144fc8ad..fcadada9939 100644 --- a/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua +++ b/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua @@ -84,7 +84,7 @@ function lionsGetLionsMane.onUse(player, item, fromPosition, target, toPosition, player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You picked a beautiful lion's mane flower.") player:addItem(21389, 1) player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline), 1)) - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) item:transform(21935) addEvent(function() item:transform(21388) @@ -102,7 +102,7 @@ function lionsGetHolyWater.onUse(player, item, fromPosition, target, toPosition, player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took some holy water from the sacred well.") player:addItem(21466, 1) player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline), 1)) - player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) return true end diff --git a/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua b/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua index 80e45219e2a..46c65505a37 100644 --- a/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua +++ b/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua @@ -2,11 +2,11 @@ local othersEctoplasm = Action() function othersEctoplasm.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 4206 then - if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) ~= 1 then return false end - player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 2) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, 2) item:transform(131) target:remove() toPosition:sendMagicEffect(CONST_ME_POFF) diff --git a/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua b/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua index c02731008ef..8f2eca8dcc6 100644 --- a/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua +++ b/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua @@ -11,10 +11,10 @@ local exterminatorFlask = Action() function exterminatorFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 4207 then - if player:getStorageValue(Storage.TibiaTales.TheExterminator) ~= 1 then + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) ~= 1 then return false end - player:setStorageValue(Storage.TibiaTales.TheExterminator, 2) + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator, 2) item:transform(2874, 0) toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) return true diff --git a/data-otservbr-global/scripts/quests/others/actions_holy_water.lua b/data-otservbr-global/scripts/quests/others/actions_holy_water.lua index 37dce9a342c..64e5609b54f 100644 --- a/data-otservbr-global/scripts/quests/others/actions_holy_water.lua +++ b/data-otservbr-global/scripts/quests/others/actions_holy_water.lua @@ -20,22 +20,22 @@ local function nexusMessage(player, message) end local storages = { - [4208] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave1, - [4209] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave2, - [4210] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave3, - [4211] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave4, - [4212] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave5, - [4213] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave6, - [4214] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave7, - [4215] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave8, - [4216] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave9, - [4217] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave10, - [4218] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave11, - [4219] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave12, - [4220] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave13, - [4221] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave14, - [4222] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave15, - [4223] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave16, + [4208] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave1, + [4209] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave2, + [4210] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave3, + [4211] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave4, + [4212] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave5, + [4213] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave6, + [4214] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave7, + [4215] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave8, + [4216] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave9, + [4217] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave10, + [4218] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave11, + [4219] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave12, + [4220] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave13, + [4221] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave14, + [4222] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave15, + [4223] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave16, } local config = { @@ -84,19 +84,19 @@ function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, i -- Rest in Hallowed Ground Quest elseif target.actionid >= 4208 and target.actionid <= 4223 then local graveStorage = storages[target.actionid] - local questline = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) + local questline = player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) if player:getStorageValue(graveStorage) == 1 or questline ~= 3 then return false end player:setStorageValue(graveStorage, 1) - local cStorage = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater) + local cStorage = player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater) if cStorage < 14 then - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater, math.max(0, cStorage) + 1) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater, math.max(0, cStorage) + 1) elseif cStorage == 14 then - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater, -1) - player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, 4) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater, -1) + player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, 4) item:transform(2874, 0) end diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua index ae8ab9228e0..c511ae3d921 100644 --- a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua +++ b/data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua @@ -8,7 +8,7 @@ function lowerRoshamuulTrough.onUse(player, item, fromPosition, target, toPositi if target:getId() == 20216 then item:transform(2873, 0) toPosition:sendMagicEffect(10) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Mortar_Thrown, math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Constants.Roshamuul_Mortar_Thrown)) + 1) + player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown, math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown)) + 1) end return true end diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua index 8a5ae15d2b7..c97e06e98a4 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua @@ -4,7 +4,7 @@ end local spikeTasksFertilizer = Action() function spikeTasksFertilizer.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 4 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Main)) then + if table.contains({ -1, 4 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main)) then return false end @@ -22,8 +22,8 @@ function spikeTasksFertilizer.onUse(player, item, fromPosition, target, toPositi end table.insert(FERTILIZED_MUSHROOMS[player:getGuid()], mushPos) - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Mushroom_Main, sum) + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main, sum) if sum == 4 then item:remove() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua index 16229f6048c..8daead707f6 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua @@ -65,7 +65,7 @@ end local spikeTasksGhost = Action() function spikeTasksGhost.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local stat = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Main) + local stat = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) if table.contains({ -1, 3 }, stat) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) @@ -96,7 +96,7 @@ function spikeTasksGhost.onUse(player, item, fromPosition, target, toPosition, i GHOST_DETECTOR_MAP[player:getGuid()] = random player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a malignant presence, the glowing detector signals another presence nearby.") end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Track_Main, stat + 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main, stat + 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The detector points " .. getSearchString(player:getPosition(), current) .. ".") end diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua index f97b76e53ab..7a3060a1fc9 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua @@ -6,7 +6,7 @@ local area = { local spikeTasksStone = Action() function spikeTasksStone.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local currentProgress = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main) + local currentProgress = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) if currentProgress == 3 then return false end @@ -24,19 +24,19 @@ function spikeTasksStone.onUse(player, item, fromPosition, target, toPosition, i if itemId == 19207 then item:transform(19216) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main, 1) -- Define o progresso inicial + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 1) -- Define o progresso inicial elseif itemId == 19216 then - local useCount = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main) + local useCount = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) if useCount == -1 then useCount = 0 end useCount = useCount + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main, useCount) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, useCount) if useCount == 3 then -- Corrigido para checar se o uso é 3 item:transform(19218) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main, 3) -- Finaliza a missão + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 3) -- Finaliza a missão return true end end diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua index 0204e780729..2e1b2a66e6d 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua @@ -2,7 +2,7 @@ local summon = { "Spider", "Larva", "Scarab", "Tarantula" } local spikeTasksNests = Action() function spikeTasksNests.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 5 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Main)) then + if table.contains({ -1, 5 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main)) then return false end @@ -10,8 +10,8 @@ function spikeTasksNests.onUse(player, item, fromPosition, target, toPosition, i return false end - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Main, sum) + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have destroyed a monster nest.") if sum == 5 then diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua index 3516b19c385..51979b622ca 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua @@ -8,7 +8,7 @@ local chance = { local spikeTasksShovel = Action() function spikeTasksShovel.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 1 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Main)) then + if table.contains({ -1, 1 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main)) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) end @@ -26,8 +26,8 @@ function spikeTasksShovel.onUse(player, item, fromPosition, target, toPosition, Game.createMonster(result[3], toPosition) end if i == 1 then - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Mound_Main, sum) + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main, sum) if sum == 1 then item:remove() player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomilly.") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua index 19751bf83dd..9b95cc083d3 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua @@ -16,7 +16,7 @@ end local spikeTasksThermometer = Action() function spikeTasksThermometer.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local status = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Main) + local status = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) if table.contains({ -1, 1 }, status) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) @@ -25,7 +25,7 @@ function spikeTasksThermometer.onUse(player, item, fromPosition, target, toPosit if player:getPosition():isInRange(hot_lava_pools[SPIKE_LOWER_HOTTEST_POOL][1], hot_lava_pools[SPIKE_LOWER_HOTTEST_POOL][2]) then item:remove() player:getPosition():sendMagicEffect(16) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Lava_Main, 1) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Whew! That was that hot, it melted the thermometer! At least you've found the hot spot!") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This is not the hot spot!") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua index c4ed7dfb2d9..2ae79bd368c 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua @@ -1,6 +1,6 @@ local spikeTasksFork = Action() function spikeTasksFork.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Main)) then + if table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main)) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) end @@ -8,8 +8,8 @@ function spikeTasksFork.onUse(player, item, fromPosition, target, toPosition, is return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) end - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Pacifier_Main, sum) + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main, sum) if sum == 7 then item:remove() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua index 3429316ee63..2d4d300fc8c 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua @@ -11,9 +11,9 @@ function lowerSpikeKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKil end onDeathForParty(creature, mostDamageKiller, function(creature, player) - if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Main)) then - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Lower_Kill_Main, sum) + if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main)) then + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have slayed " .. sum .. " out of 7 Drillworms.") if sum == 7 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomargery.") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua index 963545f845e..b047e9d985b 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua @@ -10,9 +10,9 @@ function middleSpikeKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKi return true end onDeathForParty(creature, mostDamageKiller, function(creature, player) - if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Main)) then - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Kill_Main, sum) + if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main)) then + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have slayed " .. sum .. " out of 7 Crystalcrushers.") if sum == 7 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnombold.") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua index 5022926ee58..860b5f6b183 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua @@ -11,9 +11,9 @@ function upperSpikeKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKil end onDeathForParty(creature, mostDamageKiller, function(creature, player) - if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Main)) then - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Upper_Kill_Main, sum) + if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main)) then + local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) + 1 + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have slayed " .. sum .. " out of 7 Demon Skeletons.") if sum == 7 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomilly.") diff --git a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua index 95f32bfe748..0f7475d10de 100644 --- a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua +++ b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua @@ -1,8 +1,8 @@ local postmanPackage = Action() function postmanPackage.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 101 and target.itemid == 3221 then - if player:getStorageValue(Storage.Postman.Mission09) == 2 then - player:setStorageValue(Storage.Postman.Mission09, 3) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09) == 2 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 3) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) item:transform(2859) end diff --git a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua index 17b032dadf8..a4330a815d6 100644 --- a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua +++ b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua @@ -1,7 +1,7 @@ local postmanWaldos = Action() function postmanWaldos.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Postman.Mission08) == 1 then - player:setStorageValue(Storage.Postman.Mission08, 2) + if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 1 then + player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08, 2) player:addItem(3219, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found Waldo's posthorn.") else diff --git a/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua b/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua index 252c4433c10..a2c9edbb27a 100644 --- a/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua +++ b/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua @@ -11,10 +11,10 @@ function geomanticCharges.onStepIn(creature, item, position, fromPosition) end local tasksLoaded = {} - if not table.contains({ -1, 8 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Nest_Main)) then + if not table.contains({ -1, 8 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main)) then tasksLoaded["NEST"] = true end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main) == 1 then + if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == 1 then tasksLoaded["CHARGE"] = true end @@ -34,7 +34,7 @@ function geomanticCharges.onStepIn(creature, item, position, fromPosition) if tasksLoaded["CHARGE"] then player:getPosition():sendMagicEffect(12) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Middle_Charge_Main, 2) + player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have charged your body with geomantic energy and can report about it.") end return true diff --git a/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua b/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua index 1e63ccc7b1a..3bdfa5410d1 100644 --- a/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua +++ b/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua @@ -4,8 +4,8 @@ function ultimateBoozer.onUse(player, item, fromPosition, target, toPosition, is return false end - if player:getStorageValue(Storage.TibiaTales.UltimateBoozeQuest) == 1 then - player:setStorageValue(Storage.TibiaTales.UltimateBoozeQuest, 2) + if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest) == 1 then + player:setStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, 2) end player:removeItem(138, 1) player:addItem(136, 1) diff --git a/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua b/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua index 95da06446a5..454d1692742 100644 --- a/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua +++ b/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua @@ -8,13 +8,13 @@ local function revertItem(position, itemId) end function mirror.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) == 1 then + if player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) == 1 then if target:getActionId() == 4001 and target.itemid == 132 then local itemToRemove = Tile(toPosition):getItemById(132) if itemToRemove then itemToRemove:remove() toPosition:sendMagicEffect(CONST_ME_MAGIC_POWDER) - player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 2) + player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 2) player:say("KABOOM !!", TALKTYPE_MONSTER_SAY, false, player, toPosition) addEvent(revertItem, 60 * 1000, toPosition, 132) item:remove(1) diff --git a/data-otservbr-global/startup/tables/chest.lua b/data-otservbr-global/startup/tables/chest.lua index 45989ea3ada..0645d4c9380 100644 --- a/data-otservbr-global/startup/tables/chest.lua +++ b/data-otservbr-global/startup/tables/chest.lua @@ -2267,14 +2267,14 @@ ChestUnique = { itemPos = { x = 32591, y = 31647, z = 3 }, reward = { { 3425, 1 } }, weight = 55.00, - storage = Storage.TibiaTales.ToBlindTheEnemy.DwarvenShield, + storage = Storage.Quest.U8_1.ToBlindTheEnemy.DwarvenShield, }, [6254] = { itemId = 2472, itemPos = { x = 32590, y = 31647, z = 3 }, reward = { { 3282, 1 } }, weight = 54.00, - storage = Storage.TibiaTales.ToBlindTheEnemy.MorningStar, + storage = Storage.Quest.U8_1.ToBlindTheEnemy.MorningStar, }, [6255] = { itemId = 2434, @@ -2282,7 +2282,7 @@ ChestUnique = { container = 2853, reward = { { 237, 1 }, { 3147, 1 }, { 3059, 1 } }, weight = 31.00, - storage = Storage.TibiaTales.ToBlindTheEnemy.BP1, + storage = Storage.Quest.U8_1.ToBlindTheEnemy.BP1, }, [6256] = { itemId = 2434, @@ -2290,7 +2290,7 @@ ChestUnique = { container = 2853, reward = { { 3028, 2 }, { 3031, 100 } }, weight = 18.20, - storage = Storage.TibiaTales.ToBlindTheEnemy.BP2, + storage = Storage.Quest.U8_1.ToBlindTheEnemy.BP2, }, -- To Outfox a Fox Quest [6257] = { @@ -2298,7 +2298,7 @@ ChestUnique = { itemPos = { x = 32467, y = 31970, z = 5 }, reward = { { 139, 1 } }, weight = 7.00, - storage = Storage.TibiaTales.ToOutfoxAFoxQuest.MiningHelmet, + storage = Storage.Quest.U8_1.ToOutfoxAFoxQuest.MiningHelmet, }, -- Waterfall Quest [6258] = { @@ -2523,7 +2523,7 @@ ChestUnique = { itemPos = { x = 33004, y = 31530, z = 10 }, reward = { { 11699, 1 } }, weight = 15.00, - storage = Storage.TibiaTales.AnInterestInBotany.BotanyAlmanach, + storage = Storage.Quest.U8_6.AnInterestInBotany.BotanyAlmanach, }, -- Wrath of the Emperor Quest [6297] = { diff --git a/data-otservbr-global/startup/tables/door_quest.lua b/data-otservbr-global/startup/tables/door_quest.lua index 08adc42e0d7..25ce66b5125 100644 --- a/data-otservbr-global/startup/tables/door_quest.lua +++ b/data-otservbr-global/startup/tables/door_quest.lua @@ -46,7 +46,7 @@ QuestDoorAction = { itemPos = { { x = 32455, y = 31967, z = 14 } }, }, -- To Outfox a Fox Quest, mining helmet door - [Storage.TibiaTales.ToOutfoxAFoxQuest.Questline] = { + [Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline] = { itemId = false, itemPos = { { x = 32467, y = 31969, z = 5 } }, }, @@ -481,19 +481,19 @@ QuestDoorAction = { itemPos = { { x = 32982, y = 31439, z = 3 } }, }, -- Postman door - [Storage.Postman.Mission05] = { + [Storage.Quest.U7_24.ThePostmanMissions.Mission05] = { itemId = false, itemPos = { { x = 32567, y = 32023, z = 6 } }, }, - [Storage.Postman.Mission08] = { + [Storage.Quest.U7_24.ThePostmanMissions.Mission08] = { itemId = false, itemPos = { { x = 32515, y = 32248, z = 8 } }, }, - [Storage.Postman.Mission09] = { + [Storage.Quest.U7_24.ThePostmanMissions.Mission09] = { itemId = false, itemPos = { { x = 32569, y = 32023, z = 6 } }, }, - [Storage.Postman.Door] = { + [Storage.Quest.U7_24.ThePostmanMissions.Door] = { itemId = false, itemPos = { { x = 31921, y = 32652, z = 8 }, @@ -592,11 +592,11 @@ QuestDoorAction = { itemId = false, itemPos = { { x = 32608, y = 31516, z = 14 } }, }, - [Storage.TibiaTales.AnInterestInBotany.ChestDoor] = { + [Storage.Quest.U8_6.AnInterestInBotany.ChestDoor] = { itemId = false, itemPos = { { x = 33007, y = 31536, z = 10 } }, }, - [Storage.TibiaTales.AritosTaskDoor] = { + [Storage.Quest.U8_1.TibiaTales.AritosTaskDoor] = { itemId = false, itemPos = { { x = 33247, y = 32534, z = 8 } }, }, @@ -656,7 +656,7 @@ QuestDoorAction = { }, }, -- Fathers burden door - [Storage.FathersBurden.QuestLog] = { + [Storage.Quest.U8_6.AFathersBurden.QuestLog] = { itemId = false, itemPos = { { x = 31989, y = 31225, z = 7 }, @@ -678,7 +678,7 @@ QuestDoorAction = { itemPos = { { x = 32316, y = 31757, z = 9 } }, }, -- White raven monastery door - [Storage.WhiteRavenMonastery.Door] = { + [Storage.Quest.U7_24.TheWhiteRavenMonastery.Door] = { itemId = false, itemPos = { { x = 32171, y = 31936, z = 7 },