diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index 433803b9b21..8623ba7072a 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -262,12 +262,12 @@ if not Quests then }, [5] = { name = "Bigfoot's Burden", - startStorageId = Storage.BigfootBurden.QuestLine, + startStorageId = Storage.Quest.U9_60.BigfootsBurden.QuestLine, startStorageValue = 1, missions = { [1] = { name = "Looking for Gnomerik", - storageId = Storage.BigfootBurden.QuestLine, + storageId = Storage.Quest.U9_60.BigfootsBurden.QuestLine, missionId = 1033, startValue = 1, endValue = 2, @@ -277,7 +277,7 @@ if not Quests then }, [2] = { name = "A New Recruit", - storageId = Storage.BigfootBurden.QuestLine, + storageId = Storage.Quest.U9_60.BigfootsBurden.QuestLine, missionId = 1034, startValue = 3, endValue = 4, @@ -285,7 +285,7 @@ if not Quests then }, [3] = { name = "Recruitment: A Test in Gnomology", - storageId = Storage.BigfootBurden.QuestLine, + storageId = Storage.Quest.U9_60.BigfootsBurden.QuestLine, missionId = 1035, startValue = 5, endValue = 7, @@ -298,7 +298,7 @@ if not Quests then }, [4] = { name = "Recruitment: Medical Examination", - storageId = Storage.BigfootBurden.QuestLine, + storageId = Storage.Quest.U9_60.BigfootsBurden.QuestLine, missionId = 1036, startValue = 8, endValue = 9, @@ -306,7 +306,7 @@ if not Quests then }, [5] = { name = "Recruitment: Ear Examination", - storageId = Storage.BigfootBurden.QuestLine, + storageId = Storage.Quest.U9_60.BigfootsBurden.QuestLine, missionId = 1037, startValue = 10, endValue = 12, @@ -319,7 +319,7 @@ if not Quests then }, [6] = { name = "Recruitment: Gnomish Warfare", - storageId = Storage.BigfootBurden.Shooting, + storageId = Storage.Quest.U9_60.BigfootsBurden.Shooting, missionId = 1038, startValue = 0, endValue = 5, @@ -327,13 +327,13 @@ if not Quests then return string.format( "Hit five targets in a row. \z Don't hit an innocent target as it will reset your hit counter. %d / 5", - (math.max(player:getStorageValue(Storage.BigfootBurden.Shooting), 0)) + (math.max(player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Shooting), 0)) ) end, }, [7] = { name = "Recruitment: Gnomish Warfare", - storageId = Storage.BigfootBurden.QuestLine, + storageId = Storage.Quest.U9_60.BigfootsBurden.QuestLine, missionId = 1039, startValue = 15, endValue = 16, @@ -341,7 +341,7 @@ if not Quests then }, [8] = { name = "Recruitment: Endurance Test", - storageId = Storage.BigfootBurden.QuestLine, + storageId = Storage.Quest.U9_60.BigfootsBurden.QuestLine, missionId = 1040, startValue = 17, endValue = 20, @@ -353,7 +353,7 @@ if not Quests then }, [9] = { name = "Recruitment: Soul Melody", - storageId = Storage.BigfootBurden.QuestLine, + storageId = Storage.Quest.U9_60.BigfootsBurden.QuestLine, missionId = 1041, startValue = 21, endValue = 23, @@ -365,7 +365,7 @@ if not Quests then }, [10] = { name = "Recruitment", - storageId = Storage.BigfootBurden.QuestLineComplete, + storageId = Storage.Quest.U9_60.BigfootsBurden.QuestLineComplete, missionId = 1042, startValue = 1, endValue = 2, @@ -373,7 +373,7 @@ if not Quests then }, [11] = { name = "Gnome Reputation", - storageId = Storage.BigfootBurden.Rank, + storageId = Storage.Quest.U9_60.BigfootsBurden.Rank, missionId = 1043, startValue = 0, endValue = 999999, @@ -381,13 +381,13 @@ if not Quests then return string.format( "Your reputation in the eyes of gnomekind is %d.\nYour standing rises at: \z \nReputation 30 - I \nReputation 120 - II \nReputation 480 - III \nReputation 1440 - IV \n", - (math.max(player:getStorageValue(Storage.BigfootBurden.Rank), 0)) + (math.max(player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank), 0)) ) end, }, [12] = { name = "Daily Minor: Crystal Keeper", - storageId = Storage.BigfootBurden.RepairedCrystalCount, + storageId = Storage.Quest.U9_60.BigfootsBurden.RepairedCrystalCount, missionId = 1044, startValue = 0, endValue = 5, @@ -395,13 +395,13 @@ if not Quests then return string.format( "Use the repair crystal to repair five damaged blue crystals in the crystal caves. \z Damaged crystals will not glow.\n%d / 5", - (math.max(player:getStorageValue(Storage.BigfootBurden.RepairedCrystalCount), 0)) + (math.max(player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.RepairedCrystalCount), 0)) ) end, }, [13] = { name = "Daily Minor: Raiders of the Lost Spark", - storageId = Storage.BigfootBurden.ExtractedCount, + storageId = Storage.Quest.U9_60.BigfootsBurden.ExtractedCount, missionId = 1045, startValue = 0, endValue = 7, @@ -409,23 +409,23 @@ if not Quests then return string.format( "Kill crystal crushers and use the discharger item on the corpse to collect their charges. \z Gather 7 charges and report back. %d / 7", - (math.max(player:getStorageValue(Storage.BigfootBurden.ExtractedCount), 0)) + (math.max(player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExtractedCount), 0)) ) end, }, [14] = { name = "Daily Minor Plus: Exterminators", - storageId = Storage.BigfootBurden.ExterminatedCount, + storageId = Storage.Quest.U9_60.BigfootsBurden.ExterminatedCount, missionId = 1046, startValue = 0, endValue = 10, description = function(player) - return string.format("Kill 10 of the wigglers for the gnomes. Then report back. %d / 10", (math.max(player:getStorageValue(Storage.BigfootBurden.ExterminatedCount), 0))) + return string.format("Kill 10 of the wigglers for the gnomes. Then report back. %d / 10", (math.max(player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExterminatedCount), 0))) end, }, [15] = { name = "Daily Minor Plus: Mushroom Digger", - storageId = Storage.BigfootBurden.MushroomCount, + storageId = Storage.Quest.U9_60.BigfootsBurden.MushroomCount, missionId = 1047, startValue = 0, endValue = 3, @@ -434,13 +434,13 @@ if not Quests then "Find a truffle sniffing pig and lure it around. \z Occasionally it will unearth some truffles. Use the baby pig on the truffles to feed it 3 times. \z Then report back to the gnomes. %d / 3", - (math.max(player:getStorageValue(Storage.BigfootBurden.MushroomCount), 0)) + (math.max(player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MushroomCount), 0)) ) end, }, [16] = { name = "Daily Major: Matchmaker", - storageId = Storage.BigfootBurden.MatchmakerStatus, + storageId = Storage.Quest.U9_60.BigfootsBurden.MatchmakerStatus, missionId = 1048, startValue = 0, endValue = 1, @@ -452,7 +452,7 @@ if not Quests then }, [17] = { name = "Daily Major: The Tinker's Bell", - storageId = Storage.BigfootBurden.GolemCount, + storageId = Storage.Quest.U9_60.BigfootsBurden.GolemCount, missionId = 1049, startValue = 0, endValue = 4, @@ -460,13 +460,13 @@ if not Quests then return string.format( "Use the harmonic bell on the mad golems in the golem workshop so that they will \z automatically be teleported to the gnomish workshops. Then report back to the gnomes. %d / 4", - (math.max(player:getStorageValue(Storage.BigfootBurden.GolemCount), 0)) + (math.max(player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GolemCount), 0)) ) end, }, [18] = { name = "Daily Major Advanced: Spores", - storageId = Storage.BigfootBurden.SporeCount, + storageId = Storage.Quest.U9_60.BigfootsBurden.SporeCount, missionId = 1050, startValue = 0, endValue = 4, @@ -475,7 +475,7 @@ if not Quests then }, [19] = { name = "Daily Major Advanced: Yet Another Grinding", - storageId = Storage.BigfootBurden.GrindstoneStatus, + storageId = Storage.Quest.U9_60.BigfootsBurden.GrindstoneStatus, missionId = 1051, startValue = 0, endValue = 2, @@ -483,7 +483,7 @@ if not Quests then }, [20] = { name = "Gnomish War Hero (Warzone 1)", - storageId = Storage.BigfootBurden.Warzone1Access, + storageId = Storage.Quest.U9_60.BigfootsBurden.Warzone1Access, missionId = 1052, startValue = 1, endValue = 2, @@ -494,7 +494,7 @@ if not Quests then }, [21] = { name = "Gnomish War Hero (Warzone 2)", - storageId = Storage.BigfootBurden.Warzone2Access, + storageId = Storage.Quest.U9_60.BigfootsBurden.Warzone2Access, missionId = 1053, startValue = 1, endValue = 2, @@ -505,7 +505,7 @@ if not Quests then }, [22] = { name = "Gnomish War Hero (Warzone 3)", - storageId = Storage.BigfootBurden.Warzone3Access, + storageId = Storage.Quest.U9_60.BigfootsBurden.Warzone3Access, missionId = 1054, startValue = 1, endValue = 2, @@ -5742,12 +5742,12 @@ if not Quests then }, [43] = { name = "The Rookie Guard", - startStorageId = Storage.TheRookieGuard.Questline, + startStorageId = Storage.Quest.U9_1.TheRookieGuard.Questline, startStorageValue = 1, missions = { [1] = { name = "Mission 01: A Taste of Things to Come", - storageId = Storage.TheRookieGuard.Mission01, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission01, missionId = 10397, startValue = 1, endValue = 1, @@ -5757,7 +5757,7 @@ if not Quests then }, [2] = { name = "Mission 02: Defence!", - storageId = Storage.TheRookieGuard.Mission02, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission02, missionId = 10398, startValue = 1, endValue = 5, @@ -5771,7 +5771,7 @@ if not Quests then }, [3] = { name = "Mission 03: A Rational Request", - storageId = Storage.TheRookieGuard.RatKills, + storageId = Storage.Quest.U9_1.TheRookieGuard.RatKills, missionId = 10399, startValue = 0, endValue = 5, @@ -5779,13 +5779,13 @@ if not Quests then return string.format( "Vascalir sent you to the Rookgaard sewers to kill 5 rats. You have already killed %d/5. \z Return to Vascalir once you're done.", - (math.max(player:getStorageValue(Storage.TheRookieGuard.RatKills), 0)) + (math.max(player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.RatKills), 0)) ) end, }, [4] = { name = "Mission 04: Home-Brewed", - storageId = Storage.TheRookieGuard.Mission04, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission04, missionId = 10400, startValue = 1, endValue = 6, @@ -5800,7 +5800,7 @@ if not Quests then }, [5] = { name = "Mission 05: Web of Terror", - storageId = Storage.TheRookieGuard.Mission05, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission05, missionId = 10401, startValue = 1, endValue = 6, @@ -5815,7 +5815,7 @@ if not Quests then }, [6] = { name = "Mission 06: Run Like a Wolf", - storageId = Storage.TheRookieGuard.Mission06, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission06, missionId = 10402, startValue = 1, endValue = 7, @@ -5831,7 +5831,7 @@ if not Quests then }, [7] = { name = "Mission 07: Attack!", - storageId = Storage.TheRookieGuard.Mission07, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission07, missionId = 10403, startValue = 1, endValue = 2, @@ -5842,7 +5842,7 @@ if not Quests then }, [8] = { name = "Mission 08: Less Risk - More Fun", - storageId = Storage.TheRookieGuard.Mission08, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission08, missionId = 10404, startValue = 1, endValue = 2, @@ -5853,7 +5853,7 @@ if not Quests then }, [9] = { name = "Mission 09: Rock 'n Troll", - storageId = Storage.TheRookieGuard.Mission09, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission09, missionId = 10405, startValue = 1, endValue = 10, @@ -5872,7 +5872,7 @@ if not Quests then }, [10] = { name = "Mission 10: Tomb Raiding", - storageId = Storage.TheRookieGuard.Mission10, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission10, missionId = 10406, startValue = 1, endValue = 3, @@ -5884,7 +5884,7 @@ if not Quests then }, [11] = { name = "Mission 11: Sweet Poison", - storageId = Storage.TheRookieGuard.Mission11, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission11, missionId = 10407, startValue = 1, endValue = 5, @@ -5898,7 +5898,7 @@ if not Quests then }, [12] = { name = "Mission 12: Into The Fortress", - storageId = Storage.TheRookieGuard.Mission12, + storageId = Storage.Quest.U9_1.TheRookieGuard.Mission12, missionId = 10408, startValue = 1, endValue = 15, diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 72a532ef3da..cfbda04a03b 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -86,7 +86,6 @@ Storage = { WagonTicket = 30009, FirstMageWeapon = 30011, KawillBlessing = 30014, - RentedHorseTimer = 30015, FountainOfLife = 30016, -- Promotion Storage cannot be changed, it is set in source code Promotion = 30018, @@ -100,10 +99,6 @@ Storage = { ChayenneReward = 30033, SwampDiggingTimeout = 30034, Atrad = 30036, - ElementalistQuest1 = 30037, - ElementalistQuest2 = 30038, - ElementalistQuest3 = 30039, - ElementalistOutfitStart = 30040, WayfarerOutfit = 30041, DreamOutfit = 30042, Percht1 = 30043, @@ -132,11 +127,6 @@ Storage = { ThirdStage = 50003, Crystal = 50004, }, - LiquidBlackQuest = { - -- Reserved storage from 50010 - 50014 - Questline = 50010, - Visitor = 50011, - }, Kilmaresh = { -- Reserved storage from 50015 - 50049 Questline = 50015, @@ -515,62 +505,6 @@ Storage = { AmuletTimer = 50520, AmuletStatus = 50521, }, - BigfootBurden = { - -- Reserved storage from 50660 - 50719 - QuestLine = 50660, - Test = 50661, - Shooting = 50662, - QuestLineComplete = 50663, - MelodyTone1 = 50664, - MelodyTone2 = 50665, - MelodyTone3 = 50666, - MelodyTone4 = 50667, - MelodyTone5 = 50668, - MelodyTone6 = 50669, - MelodyTone7 = 50670, - MelodyStatus = 50671, - Rank = 50672, - MissionCrystalKeeper = 50673, - CrystalKeeperTimout = 50674, - RepairedCrystalCount = 50675, - MissionRaidersOfTheLostSpark = 50676, - ExtractedCount = 50677, - RaidersOfTheLostSparkTimeout = 50678, - MissionExterminators = 50679, - ExterminatedCount = 50680, - ExterminatorsTimeout = 50681, - MissionMushroomDigger = 50682, - MushroomCount = 50683, - MushroomDiggerTimeout = 50684, - MissionMatchmaker = 50685, - MatchmakerStatus = 50686, - MatchmakerIdNeeded = 50687, - MatchmakerTimeout = 50688, - MissionTinkersBell = 50689, - GolemCount = 50690, - TinkerBellTimeout = 50691, - MissionSporeGathering = 50692, - SporeCount = 50693, - SporeGatheringTimeout = 50694, - MissionGrindstoneHunt = 50695, - GrindstoneStatus = 50696, - GrindstoneTimeout = 50697, - WarzoneStatus = 50698, - Warzone1Access = 50699, - Warzone2Access = 50700, - Warzone3Access = 50701, - Warzone1Reward = 50702, - Warzone2Reward = 50703, - Warzone3Reward = 50704, - BossKills = 50705, - DoorGoldenFruits = 50706, - GnomedixMsg = 50710, - }, - TheirMastersVoice = { - -- Reserved storage from 50720 - 50739 - SlimeGobblerTimeout = 50720, - SlimeGobblerReceived = 50721, - }, GravediggerOfDrefia = { -- Reserved storage from 50760 - 50849 QuestStart = 50760, @@ -815,41 +749,6 @@ Storage = { }, -- TowerDefenceQuest: when there is space, bring this quest that is in update 8.1 to Tibia Tales }, - TheRookieGuard = { - --Reserved storage 52360 - 52395 - Questline = 52360, - Mission01 = 52361, - Mission02 = 52362, - Mission03 = 52363, - Mission04 = 52364, - Mission05 = 52365, - Mission06 = 52366, - Mission07 = 52367, - Mission08 = 52368, - Mission09 = 52369, - Mission10 = 52370, - Mission11 = 52371, - Mission12 = 52372, - StonePileTimer = 52373, - Catapults = 52374, - RatKills = 52375, - PoacherCorpse = 52376, - LibraryChest = 52377, - TrollChests = 52378, - TunnelPillars = 52379, - Sarcophagus = 52380, - AcademyChest = 52381, - KraknaknorkChests = 52382, - TutorialDelay = 52383, - LibraryDoor = 52384, - UnholyCryptDoor = 52385, - AcademyDoor = 52386, - AcademyChestTimer = 52387, - WarWolfDenChest = 52388, - UnholyCryptChests = 52389, - OrcFortressChests = 52390, - Level8Warning = 52391, - }, BanutaSecretTunnel = { -- Reserved storage from 51680 - 51689 DeeperBanutaShortcut = 51680, @@ -2338,17 +2237,61 @@ Storage = { U9_1 = { --update 9.1 - Reserved Storages 43351 - 43550 AwashWorldChange = {}, DemonWarsWorldChange = {}, - ElementalistOutfits = {}, - HorseStationWorldChange = {}, - InsectoidInvasionWorldChange = {}, + ElementalistOutfits = { + Questline = 43351, + Outfit = 43352, + Addon1 = 43353, + Addon2 = 43354, + }, + HorseStationWorldChange = { + Timer = 43355, + }, LooseEnds = {}, OverhuntingWorldChange = {}, SteamshipWorldChange = {}, SwampFeverWorldChange = {}, TheMagesTowerWorldChange = {}, TheMummysCurseWorldChange = {}, - TheRookieGuard = {}, - TheirMastersVoiceWorldChange = {}, + TheRookieGuard = { + Questline = 43356, + Mission01 = 43357, + Mission02 = 43358, + Mission03 = 43359, + Mission04 = 43360, + Mission05 = 43361, + Mission06 = 43362, + Mission07 = 43363, + Mission08 = 43364, + Mission09 = 43365, + Mission10 = 43366, + Mission11 = 43367, + Mission12 = 43368, + StonePileTimer = 43369, + Catapults = 43370, + RatKills = 43371, + PoacherCorpse = 43372, + LibraryChest = 43373, + TrollChests = 43374, + TunnelPillars = 43375, + Sarcophagus = 43376, + AcademyChest = 43377, + KraknaknorkChests = 43378, + TutorialDelay = 43379, + LibraryDoor = 43380, + UnholyCryptDoor = 43381, + AcademyDoor = 43382, + AcademyChestTimer = 43383, + WarWolfDenChest = 43384, + UnholyCryptChests = 43385, + OrcFortressChests = 43386, + Level8Warning = 43387, + }, + TheirMastersVoiceWorldChange = { + CurrentServantWave = 43388, + ServantsKilled = 43389, + SlimeGobblerTimeout = 43390, + SlimeGobblerReceived = 43391, + }, ThornfireWorldChange = {}, TwistedWatersWorldChange = {}, }, @@ -2361,7 +2304,10 @@ Storage = { HiveBornWorldChange = {}, InsectoidOutfits = {}, KingsdayMiniWorldChange = {}, - LiquidBlack = {}, + LiquidBlackQuest = { + Questline = 50010, + Visitor = 50011, + }, LumberjackMiniWorldChange = {}, NomadsMiniWorldChange = {}, NoodlesIsGoneMiniWorldChange = {}, @@ -2375,16 +2321,69 @@ Storage = { SpringIntoLife = {}, }, U9_60 = { -- update 9.60 - Reserved Storages 43851 - 44000 - BigfootsBurden = {}, - CrystalWarlordOutfits = {}, + BigfootsBurden = { + QuestLine = 43851, + Test = 43852, + Shooting = 43853, + QuestLineComplete = 43854, + MelodyTone1 = 43855, + MelodyTone2 = 43856, + MelodyTone3 = 43857, + MelodyTone4 = 43858, + MelodyTone5 = 43859, + MelodyTone6 = 43860, + MelodyTone7 = 43861, + MelodyStatus = 43862, + Rank = 43863, + MissionCrystalKeeper = 43864, + CrystalKeeperTimout = 43865, + RepairedCrystalCount = 43866, + MissionRaidersOfTheLostSpark = 43867, + ExtractedCount = 43868, + RaidersOfTheLostSparkTimeout = 43869, + MissionExterminators = 43870, + ExterminatedCount = 43871, + ExterminatorsTimeout = 43872, + MissionMushroomDigger = 43873, + MushroomCount = 43874, + MushroomDiggerTimeout = 43875, + MissionMatchmaker = 43876, + MatchmakerStatus = 43877, + MatchmakerIdNeeded = 43878, + MatchmakerTimeout = 43879, + MissionTinkersBell = 43880, + GolemCount = 43881, + TinkerBellTimeout = 43882, + MissionSporeGathering = 43883, + SporeCount = 43884, + SporeGatheringTimeout = 43885, + MissionGrindstoneHunt = 43886, + GrindstoneStatus = 43887, + GrindstoneTimeout = 43888, + WarzoneStatus = 43889, + Warzone1Access = 43890, + Warzone2Access = 43891, + Warzone3Access = 43892, + Warzone1Reward = 43893, + Warzone2Reward = 43894, + Warzone3Reward = 43895, + BossKills = 43896, + DoorGoldenFruits = 43897, + GnomedixMsg = 43898, + Warzones = 43899, + Weeper = 43900, + Versperoth = { + Battle = 43901, + Health = 43902, + }, + Mouthpiece = 43903, + }, DevovorgasEssenceMiniWorldChange = {}, - SoilGuardianOutfits = {}, SpiderNestMiniWorldChange = {}, WarpathMiniWorldChange = {}, }, U9_80 = { -- update 9.80 - Reserved Storages 44001 - 44100 ChildOfDestiny = {}, - DemonOutfits = {}, GoblinMerchant = {}, VenoreDailyTasks = {}, }, @@ -2765,11 +2764,6 @@ GlobalStorage = { WarzoneIV = 60003, }, }, - TheirMastersVoice = { - -- Reserved storage from 60010 - 60019 - CurrentServantWave = 60010, - ServantsKilled = 60011, - }, Feroxa = { -- Reserved storage from 60020 - 60029 Chance = 60020, @@ -2839,16 +2833,6 @@ GlobalStorage = { AstralPowerCounter = 60095, AstralGlyph = 60096, }, - BigfootBurden = { - -- Reserved storage from 60110 - 60119 - Warzones = 60110, - Weeper = 60111, - Versperoth = { - Battle = 60112, - Health = 60113, - }, - Mouthpiece = 60114, - }, TheOrderOfTheLion = { -- Reserved storage from 60170 - 60171 Drume = { diff --git a/data-otservbr-global/npc/appaloosa.lua b/data-otservbr-global/npc/appaloosa.lua index 7031d711207..6d48969d8c4 100644 --- a/data-otservbr-global/npc/appaloosa.lua +++ b/data-otservbr-global/npc/appaloosa.lua @@ -82,7 +82,7 @@ local function creatureSayCallback(npc, creature, type, message) destination:sendMagicEffect(CONST_ME_TELEPORT) npcHandler:say("Have a nice trip!", npc, creature) elseif npcHandler:getTopic(playerId) == 2 then - if player:getStorageValue(Storage.RentedHorseTimer) >= os.time() then + if player:getStorageValue(Storage.Quest.U9_1.HorseStationWorldChange.Timer) >= os.time() then npcHandler:say("You already have a horse.", npc, creature) return true end @@ -94,7 +94,7 @@ local function creatureSayCallback(npc, creature, type, message) local mountId = { 22, 25, 26 } player:addMount(mountId[math.random(#mountId)]) - player:setStorageValue(Storage.RentedHorseTimer, os.time() + 86400) + player:setStorageValue(Storage.Quest.U9_1.HorseStationWorldChange.Timer, os.time() + 86400) player:addAchievement("Natural Born Cowboy") npcHandler:say("I'll give you one of our experienced ones. Take care! Look out for low hanging branches.", npc, creature) end diff --git a/data-otservbr-global/npc/broken_servant_sentry.lua b/data-otservbr-global/npc/broken_servant_sentry.lua index d0d426d951e..317d423e32a 100644 --- a/data-otservbr-global/npc/broken_servant_sentry.lua +++ b/data-otservbr-global/npc/broken_servant_sentry.lua @@ -55,35 +55,40 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "slime") or MsgContains(message, "mould") or MsgContains(message, "fungus") or MsgContains(message, "sample") then - if getPlayerStorageValue(creature, Storage.ElementalistQuest1) < 1 then + if getPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Outfit) < 1 then npcHandler:say("If. You. Bring. Slime. Fungus. Samples. Fro-Fro-Fro-Frrrr*chhhhchrk*From. Other. Tower. You. Must. Be. The. Master. Are. You. There. Master?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif getPlayerStorageValue(creature, Storage.ElementalistQuest1) == 1 then + elseif getPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Outfit) == 1 then npcHandler:say("If. You. Bring. Slime. Fungus. Samples. Fro-Fro-Fro-Frrrr*chhhhchrk*From. Other. Tower. You. Must. Be. The. Master. Are. You. There. Master?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "cap") or MsgContains(message, "mage") then - if (getPlayerItemCount(creature, 12599) >= 1 and getPlayerStorageValue(creature, Storage.ElementalistQuest1) == 2) and getPlayerStorageValue(creature, Storage.ElementalistQuest2) < 1 then - npcHandler:say("Yo-Yo-Your*chhhrk*. Cap. Is. Slimed. I. Can. Clean. It. *chhhhrrrkchrk* ...", npc, creature) - npcHandler:say("Here. You. Are. *chhhrrrrkchrk*", npc, creature) + if (getPlayerItemCount(creature, 12599) >= 1 and getPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Outfit) == 2) and getPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Addon1) < 1 then + npcHandler:say({ + "Yo-Yo-Your*chhhrk*. Cap. Is. Slimed. I. Can. Clean. It. *chhhhrrrkchrk* ...", + "Here. You. Are. chhhrrrrkchrk", + }, npc, creature) doPlayerRemoveItem(creature, 12599, 1) - setPlayerStorageValue(creature, Storage.ElementalistQuest2, 1) + setPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Addon1, 1) doPlayerAddOutfit(creature, 432, 1) doPlayerAddOutfit(creature, 433, 1) npcHandler:setTopic(playerId, 0) - elseif getPlayerStorageValue(creature, Storage.ElementalistQuest2) == 1 then + elseif getPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Addon1) == 1 then npcHandler:say("You already have this outfit!", npc, creature) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "staff") or MsgContains(message, "spike") then - if (getPlayerItemCount(creature, 12803) >= 1 and getPlayerStorageValue(creature, Storage.ElementalistQuest1) == 2) and getPlayerStorageValue(creature, Storage.ElementalistQuest3) < 1 then - npcHandler:say({ "Yo-Yo-Your*chhhrk*. Cap. Is. Slimed. I. Can. Clean. It. *chhhhrrrkchrk* ...", "Here. You. Are. *chhhrrrrkchrk*" }, npc, creature, 4000) + if (getPlayerItemCount(creature, 12803) >= 1 and getPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Outfit) == 2) and getPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Addon2) < 1 then + npcHandler:say({ + "Yo-Yo-Your*chhhrk*. Cap. Is. Slimed. I. Can. Clean. It. *chhhhrrrkchrk* ...", + "Here. You. Are. *chhhrrrrkchrk*", + }, npc, creature) doPlayerRemoveItem(creature, 12803, 1) - setPlayerStorageValue(creature, Storage.ElementalistQuest3, 1) + setPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Addon2, 1) doPlayerAddOutfit(creature, 432, 2) doPlayerAddOutfit(creature, 433, 2) npcHandler:setTopic(playerId, 0) - elseif getPlayerStorageValue(creature, Storage.ElementalistQuest3) == 1 then + elseif getPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Addon2) == 1 then npcHandler:say("You already have this outfit!", npc, creature) npcHandler:setTopic(playerId, 0) end @@ -93,16 +98,19 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Thank. I. Will. Start. Analysing. No-No-No-No*chhrrrk*Now.", npc, creature) - setPlayerStorageValue(creature, Storage.ElementalistQuest1, 1) - setPlayerStorageValue(creature, Storage.ElementalistOutfitStart, 1) --this for default start of Outfit and Addon Quests + setPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Outfit, 1) + setPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Questline, 1) --this for default start of Outfit and Addon Quests npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("I. Greet. You. Ma-Ma-Ma-ster! Did. You. Bring. Mo-Mo-Mo-M*chhhhrrrk*ore. Samples. For. Me. To-To-To. Analyse-lyse-lyse?", npc, creature) npcHandler:setTopic(playerId, 4) elseif (npcHandler:getTopic(playerId) == 4) and getPlayerItemCount(creature, 12601) >= 20 then - npcHandler:say({ "Please. Wait. I. Can. Not. Han-Han-Han*chhhhhrrrchrk*Handle. *chhhhrchrk* This. Is. Enough. Material. *chrrrchhrk* ...", "I. Have-ve-ve-veee*chrrrck*. Also. Cleaned. Your. Clothes. Master. It. Is. No-No-No*chhrrrrk*Now. Free. Of. Sample. Stains." }, npc, creature, 4000) + npcHandler:say({ + "Please. Wait. I. Can. Not. Han-Han-Han*chhhhhrrrchrk*Handle. *chhhhrchrk* This. Is. Enough. Material. *chrrrchhrk* ...", + "I. Have-ve-ve-veee*chrrrck*. Also. Cleaned. Your. Clothes. Master. It. Is. No-No-No*chhrrrrk*Now. Free. Of. Sample. Stains.", + }, npc, creature) doPlayerRemoveItem(creature, 12601, 20) - setPlayerStorageValue(creature, Storage.ElementalistQuest1, 2) + setPlayerStorageValue(creature, Storage.Quest.U9_1.ElementalistOutfits.Outfit, 2) doPlayerAddOutfit(creature, 432, 0) doPlayerAddOutfit(creature, 433, 0) npcHandler:setTopic(playerId, 0) @@ -114,6 +122,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "The Master is-is-is-is de-ad. Plea*chrrrrchk*se. Be. In. Mourning.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/commander_stone.lua b/data-otservbr-global/npc/commander_stone.lua index 07240ff0fab..f4f03336b8f 100644 --- a/data-otservbr-global/npc/commander_stone.lua +++ b/data-otservbr-global/npc/commander_stone.lua @@ -58,34 +58,34 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "mission") and player:getStorageValue(Storage.BigfootBurden.QuestLineComplete) >= 2 then - if player:getStorageValue(Storage.BigfootBurden.Rank) < 30 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLineComplete) >= 2 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 30 then npcHandler:say({ "Two missions are available for your {rank}: crystal {keeper} and {spark} hunting. You can undertake each mission but you can turn in a specific mission only once each 20 hours. ...", "If you lose a mission item you can probably buy it from Gnomally." }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.BigfootBurden.Rank) >= 30 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 30 then npcHandler:say({ "For your {rank} there are four missions avaliable: crystal {keeper}, {spark} hunting, monster {extermination} and mushroom {digging}. By the way, you {rank} now allows you to take aditional missions from {Gnomeral} in {Gnomebase Alpha}. ... ", "If you lose a mission item you can probably buy it from Gnomally." }, npc, creature) npcHandler:setTopic(playerId, 0) end -- Crystal Kepper elseif MsgContains(message, "keeper") then - if player:getStorageValue(Storage.BigfootBurden.Rank) < 30 then - if player:getStorageValue(Storage.BigfootBurden.MissionCrystalKeeper) < 1 and player:getStorageValue(Storage.BigfootBurden.CrystalKeeperTimout) < os.time() then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 30 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionCrystalKeeper) < 1 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.CrystalKeeperTimout) < os.time() then npcHandler:say("You will have to repair some damaged crystals. Go into the Crystal grounds and repair them, using this harmonic crystal. Repair five of them and return to me. ", npc, creature) - player:setStorageValue(Storage.BigfootBurden.MissionCrystalKeeper, 1) - player:setStorageValue(Storage.BigfootBurden.RepairedCrystalCount, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionCrystalKeeper, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.RepairedCrystalCount, 0) player:addItem(15703, 1) --- taking missions - elseif player:getStorageValue(Storage.BigfootBurden.CrystalKeeperTimout) > os.time() then -- trying to take mission while in cooldown + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.CrystalKeeperTimout) > os.time() then -- trying to take mission while in cooldown npcHandler:say("Sorry, you will have to wait before you can undertake this mission again.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.MissionCrystalKeeper) > 0 then -- reporting mission - if player:getStorageValue(Storage.BigfootBurden.RepairedCrystalCount) >= 5 then -- can report missions + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionCrystalKeeper) > 0 then -- reporting mission + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.RepairedCrystalCount) >= 5 then -- can report missions player:removeItem(15703, 1) - player:setStorageValue(Storage.BigfootBurden.Rank, player:getStorageValue(Storage.BigfootBurden.Rank) + 5) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) + 5) player:addItem(16128, 1) player:addItem(15698, 1) - player:setStorageValue(Storage.BigfootBurden.MissionCrystalKeeper, 0) - player:setStorageValue(Storage.BigfootBurden.CrystalKeeperTimout, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) - player:setStorageValue(Storage.BigfootBurden.RepairedCrystalCount, -1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionCrystalKeeper, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.CrystalKeeperTimout, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.RepairedCrystalCount, -1) player:addAchievement("Crystal Keeper") player:checkGnomeRank() npcHandler:say("You did well. That will help us a lot. Take your {token} and this gnomish supply package as a reward. ", npc, creature) @@ -106,23 +106,23 @@ local function creatureSayCallback(npc, creature, type, message) -- Raiders of the Lost Spark elseif MsgContains(message, "spark") then - if player:getStorageValue(Storage.BigfootBurden.Rank) < 30 then - if player:getStorageValue(Storage.BigfootBurden.MissionRaidersOfTheLostSpark) < 1 and player:getStorageValue(Storage.BigfootBurden.RaidersOfTheLostSparkTimeout) < os.time() then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 30 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionRaidersOfTheLostSpark) < 1 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.RaidersOfTheLostSparkTimeout) < os.time() then npcHandler:say({ "Take this extractor and drive it into a body of a slain crystal crusher. This will charge your own body with energy sparks. Charge it with seven sparks and return to me. ...", "Don't worry. The gnomes assured me you'd be save. That is if nothing strange or unusual occurs! " }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.MissionRaidersOfTheLostSpark, 1) - player:setStorageValue(Storage.BigfootBurden.ExtractedCount, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionRaidersOfTheLostSpark, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExtractedCount, 0) player:addItem(15696, 1) --- taking missions - elseif player:getStorageValue(Storage.BigfootBurden.RaidersOfTheLostSparkTimeout) > os.time() then -- trying to take mission while in cooldown + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.RaidersOfTheLostSparkTimeout) > os.time() then -- trying to take mission while in cooldown npcHandler:say("Sorry, you will have to wait before you can undertake this mission again.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.MissionRaidersOfTheLostSpark) > 0 then -- reporting mission - if player:getStorageValue(Storage.BigfootBurden.ExtractedCount) >= 7 then -- can report missions - player:setStorageValue(Storage.BigfootBurden.Rank, player:getStorageValue(Storage.BigfootBurden.Rank) + 5) + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionRaidersOfTheLostSpark) > 0 then -- reporting mission + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExtractedCount) >= 7 then -- can report missions + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) + 5) player:removeItem(15696, 1) player:addItem(16128, 1) player:addItem(15698, 1) - player:setStorageValue(Storage.BigfootBurden.MissionRaidersOfTheLostSpark, 0) - player:setStorageValue(Storage.BigfootBurden.ExtractedCount, -1) - player:setStorageValue(Storage.BigfootBurden.RaidersOfTheLostSparkTimeout, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionRaidersOfTheLostSpark, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExtractedCount, -1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.RaidersOfTheLostSparkTimeout, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) player:addAchievement("Call Me Sparky") player:checkGnomeRank() npcHandler:say("You did well. That will help us a lot. Take your {token} and this gnomish supply package as a reward. ", npc, creature) @@ -143,21 +143,21 @@ local function creatureSayCallback(npc, creature, type, message) -- Exterminators elseif MsgContains(message, "extermination") then - if player:getStorageValue(Storage.BigfootBurden.Rank) >= 30 then - if player:getStorageValue(Storage.BigfootBurden.MissionExterminators) < 1 and player:getStorageValue(Storage.BigfootBurden.ExterminatorsTimeout) < os.time() then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 30 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionExterminators) < 1 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExterminatorsTimeout) < os.time() then npcHandler:say("The wigglers have become a pest that threaten our resources and supplies. Kill 10 wigglers in the caves like the mushroon gardens or the truffles ground. {Report} back to me when you are done. ", npc, creature) - player:setStorageValue(Storage.BigfootBurden.MissionExterminators, 1) - player:setStorageValue(Storage.BigfootBurden.ExterminatedCount, 0) --- taking missions - elseif player:getStorageValue(Storage.BigfootBurden.ExterminatorsTimeout) > os.time() then -- trying to take mission while in cooldown + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionExterminators, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExterminatedCount, 0) --- taking missions + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExterminatorsTimeout) > os.time() then -- trying to take mission while in cooldown npcHandler:say("Sorry, you will have to wait before you can undertake this mission again.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.MissionExterminators) > 0 then -- reporting mission - if player:getStorageValue(Storage.BigfootBurden.ExterminatedCount) >= 10 then -- can report missions - player:setStorageValue(Storage.BigfootBurden.Rank, player:getStorageValue(Storage.BigfootBurden.Rank) + 5) + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionExterminators) > 0 then -- reporting mission + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExterminatedCount) >= 10 then -- can report missions + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) + 5) player:addItem(16128, 1) player:addItem(15698, 1) - player:setStorageValue(Storage.BigfootBurden.MissionExterminators, 0) - player:setStorageValue(Storage.BigfootBurden.ExterminatedCount, -1) - player:setStorageValue(Storage.BigfootBurden.ExterminatorsTimeout, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionExterminators, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExterminatedCount, -1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExterminatorsTimeout, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) player:addAchievement("One Foot Vs. Many") player:checkGnomeRank() npcHandler:say("You did well. That will help us a lot. Take your {token} and this gnomish supply package as a reward. ", npc, creature) @@ -178,28 +178,28 @@ local function creatureSayCallback(npc, creature, type, message) -- Mushroom Digger elseif MsgContains(message, "digging") then - if player:getStorageValue(Storage.BigfootBurden.Rank) >= 30 then - if player:getStorageValue(Storage.BigfootBurden.MissionMushroomDigger) < 1 and player:getStorageValue(Storage.BigfootBurden.MushroomDiggerTimeout) < os.time() then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 30 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMushroomDigger) < 1 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MushroomDiggerTimeout) < os.time() then npcHandler:say({ "Take this little piggy here. It will one day become a great mushroom hunter for sure. For now it is depended on you and other pigs. ...", "Well, other pigs like it is one, I mean. I was of course not comparing you with a pig! Go to the truffles area and follow the truffle pigs there. If they dig up some truffles, let the little pig eat the mushrooms. ...", "You'll have to feed it three times. Then return it to me. ...", "Keep in mind that the pig has to be returned to his mother after a while. If you don't do this, the gnomes will call it back via teleport crystals.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.MissionMushroomDigger, 1) - player:setStorageValue(Storage.BigfootBurden.MushroomCount, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMushroomDigger, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MushroomCount, 0) player:addItem(15828, 1) --- taking missions - elseif player:getStorageValue(Storage.BigfootBurden.MushroomDiggerTimeout) > os.time() then -- trying to take mission while in cooldown + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MushroomDiggerTimeout) > os.time() then -- trying to take mission while in cooldown npcHandler:say("Sorry, you will have to wait before you can undertake this mission again.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.MissionMushroomDigger) > 0 then -- reporting mission - if player:getStorageValue(Storage.BigfootBurden.MushroomCount) >= 3 then -- can report missions + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMushroomDigger) > 0 then -- reporting mission + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MushroomCount) >= 3 then -- can report missions player:removeItem(15828, 1) - player:setStorageValue(Storage.BigfootBurden.Rank, player:getStorageValue(Storage.BigfootBurden.Rank) + 5) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) + 5) player:addItem(16128, 1) player:addItem(15698, 1) - player:setStorageValue(Storage.BigfootBurden.MissionMushroomDigger, 0) - player:setStorageValue(Storage.BigfootBurden.MushroomCount, -1) - player:setStorageValue(Storage.BigfootBurden.MushroomDiggerTimeout, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMushroomDigger, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MushroomCount, -1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MushroomDiggerTimeout, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) player:addAchievement("The Picky Pig") player:checkGnomeRank() npcHandler:say("You did well. That will help us a lot. Take your {token} and this gnomish supply package as a reward. ", npc, creature) @@ -218,10 +218,10 @@ local function creatureSayCallback(npc, creature, type, message) end -- Mushroom Digger elseif MsgContains(message, "report") then - if player:getStorageValue(Storage.BigfootBurden.Rank) < 30 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 30 then npcHandler:say("Which mission do you want to report: crystal {keeper}, {spark} hunting?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.BigfootBurden.Rank) >= 30 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 30 then npcHandler:say("Which mission do you want to report: crystal {keeper}, {spark} hunting, monster {extermination} or mushroom {digging}?", npc, creature) npcHandler:setTopic(playerId, 2) end diff --git a/data-otservbr-global/npc/doctor_gnomedix.lua b/data-otservbr-global/npc/doctor_gnomedix.lua index aaef536ddcd..aafe3d8b5d1 100644 --- a/data-otservbr-global/npc/doctor_gnomedix.lua +++ b/data-otservbr-global/npc/doctor_gnomedix.lua @@ -38,9 +38,9 @@ npcType.onSay = function(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 5 then npcHandler:setMessage(MESSAGE_GREET, "Stand still on the examination platform |PLAYERNAME|.") - player:setStorageValue(Storage.BigfootBurden.QuestLine, 6) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 6) end npcHandler:onSay(npc, creature, type, message) end diff --git a/data-otservbr-global/npc/gnomally.lua b/data-otservbr-global/npc/gnomally.lua index 47b965fe0b0..6fca7dc4ff4 100644 --- a/data-otservbr-global/npc/gnomally.lua +++ b/data-otservbr-global/npc/gnomally.lua @@ -125,9 +125,9 @@ local function creatureSayCallback(npc, creature, type, message) topic[playerId] = message elseif MsgContains(message, "relations") then local player = Player(creature) - if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 25 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) >= 25 then npcHandler:say("Our relations improve with every mission you undertake on our behalf. Another way to improve your relations with us gnomes is to trade in minor crystal tokens. ...", npc, creature) - npcHandler:say("Your renown amongst us gnomes is currently {" .. math.max(0, player:getStorageValue(Storage.BigfootBurden.Rank)) .. "}. Do you want to improve your standing by sacrificing tokens? One token will raise your renown by 5 points. ", npc, creature) + npcHandler:say("Your renown amongst us gnomes is currently {" .. math.max(0, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank)) .. "}. Do you want to improve your standing by sacrificing tokens? One token will raise your renown by 5 points. ", npc, creature) npcHandler:setTopic(playerId, 2) else npcHandler:say("You are not even a recruit of the Bigfoots. Sorry I can't help you.", npc, creature) @@ -174,9 +174,9 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 4 then local player = Player(creature) if player:removeItem(16128, renown[playerId]) then - player:setStorageValue(Storage.BigfootBurden.Rank, math.max(0, player:getStorageValue(Storage.BigfootBurden.Rank)) + renown[playerId] * 5) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank, math.max(0, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank)) + renown[playerId] * 5) player:checkGnomeRank() - npcHandler:say("As you wish! Your new renown is {" .. player:getStorageValue(Storage.BigfootBurden.Rank) .. "}.", npc, creature) + npcHandler:say("As you wish! Your new renown is {" .. player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) .. "}.", npc, creature) else npcHandler:say("You don't have these many tokens.", npc, creature) end diff --git a/data-otservbr-global/npc/gnomaticus.lua b/data-otservbr-global/npc/gnomaticus.lua index 501dc49e5a2..cc360074b0d 100644 --- a/data-otservbr-global/npc/gnomaticus.lua +++ b/data-otservbr-global/npc/gnomaticus.lua @@ -59,24 +59,24 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "shooting") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 11 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 11 then npcHandler:say({ "To the left you see our shooting range. Grab a cannon and shoot at the targets. You need five hits to succeed. ...", "Shoot at the villain targets that will pop up. DON'T shoot innocent civilians since this will reset your score and you have to start all over. Report to me afterwards.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 13) - player:setStorageValue(Storage.BigfootBurden.Shooting, 0) - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 13 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 13) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Shooting, 0) + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 13 then npcHandler:say("Shoot at the villain targets that will pop up. DON'T shoot innocent civilians since this will reset your score and you have to start all over. {Report} to me afterwards.", npc, creature) end elseif MsgContains(message, "report") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 14 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 14 then npcHandler:say("You are showing some promise! Now continue with the recruitment and talk to Gnomewart to the south for your endurance test!", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Shooting, player:getStorageValue(Storage.BigfootBurden.Shooting) + 1) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 15) - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 13 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Shooting, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Shooting) + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 15) + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 13 then npcHandler:say("Sorry you are not done yet.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) <= 12 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) <= 12 then npcHandler:say("You have nothing to report at all.", npc, creature) end end diff --git a/data-otservbr-global/npc/gnomelvis.lua b/data-otservbr-global/npc/gnomelvis.lua index 7385fdb5a1b..6b8525dddfe 100644 --- a/data-otservbr-global/npc/gnomelvis.lua +++ b/data-otservbr-global/npc/gnomelvis.lua @@ -59,36 +59,36 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "looking") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 19 or player:getStorageValue(Storage.BigfootBurden.QuestLine) <= 22 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) >= 19 or player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) <= 22 then npcHandler:say("I'm the gnomish {musical} supervisor!", npc, creature) end elseif MsgContains(message, "musical") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 19 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 19 then npcHandler:say({ "Ah well. Everyone has a very personal melody in his soul. Only if you know your soul melody then you know yourself. And only if you know yourself will you be admitted to the Bigfoot company. ...", "So what you have to do is to find your soul melody. Do you see the huge crystals in this room? Those are harmonic crystals. Use them to deduce your soul melody. Simply use them to create a sound sequence. ...", "Every soul melody consists of seven sound sequences. You will have to figure out your correct soul melody by trial and error. If you hit a wrong note, you will have to start over.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 21) - player:setStorageValue(Storage.BigfootBurden.MelodyStatus, 1) - if player:getStorageValue(Storage.BigfootBurden.MelodyTone1) < 1 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 21) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MelodyStatus, 1) + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MelodyTone1) < 1 then for i = 0, 6 do - player:setStorageValue(Storage.BigfootBurden.MelodyTone1 + i, math.random(1, 4)) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MelodyTone1 + i, math.random(1, 4)) end end - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 21 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 21 then npcHandler:say("What you have to do is to find your soul melody. Use the harmonic crystals to deduce your soul melody. Every soul melody consists of seven sound sequences. ...", npc, creature) npcHandler:say("You will have to figure out your correct soul melody by trial and error.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 22 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 22 then npcHandler:say({ "Congratulations on finding your soul melody. And a pretty one as far as I can tell. Now you are a true recruit of the Bigfoot company! Commander Stone might have some tasks for you to do! ...", "Look for him in the central chamber. I marked your map where you will find him.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 25) - player:setStorageValue(Storage.BigfootBurden.QuestLineComplete, 2) - player:setStorageValue(Storage.BigfootBurden.Rank) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 25) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLineComplete, 2) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) player:addAchievement("Becoming a Bigfoot") - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 25 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 25 then npcHandler:say("Congratulations on finding your soul melody.", npc, creature) end end diff --git a/data-otservbr-global/npc/gnomeral.lua b/data-otservbr-global/npc/gnomeral.lua index 250681ffa97..c36d1d51cdf 100644 --- a/data-otservbr-global/npc/gnomeral.lua +++ b/data-otservbr-global/npc/gnomeral.lua @@ -62,39 +62,39 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "mission") and player:getStorageValue(Storage.BigfootBurden.QuestLineComplete) >= 2 then - if player:getStorageValue(Storage.BigfootBurden.Rank) >= 120 and player:getStorageValue(Storage.BigfootBurden.Rank) < 480 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLineComplete) >= 2 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 120 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 480 then npcHandler:say("For your rank there are two missions available: {matchmaker} and golem {repair}. You can undertake each mission, but you can turn in a specific mission only once every 20 hours. ", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.BigfootBurden.Rank) >= 480 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 480 then npcHandler:say("For your rank there are four missions available: {matchmaker}, golem {repair}, {spore} gathering and {grindstone} hunt. You can undertake each mission, but you can turn in a specific mission only once every 20 hours.", npc, creature) npcHandler:setTopic(playerId, 0) end -- Matchmaker elseif MsgContains(message, "matchmaker") then - if player:getStorageValue(Storage.BigfootBurden.Rank) >= 120 then - if player:getStorageValue(Storage.BigfootBurden.MissionMatchmaker) < 1 and player:getStorageValue(Storage.BigfootBurden.MatchmakerTimeout) < os.time() then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 120 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMatchmaker) < 1 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerTimeout) < os.time() then npcHandler:say({ "You will have to find a lonely crystal a perfect match. I don't understand the specifics but the gnomes told me that even crystals need a mate to produce offspring. ...", "Be that as it may, in this package you'll find a crystal. Take it out of the package and go to the crystal caves to find it a mate. Just look out for huge red crystals and try your luck. ...", "They should look like one of those seen in your soul melody test. You will find them in the crystal grounds. {Report} back to me when you are done.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.MissionMatchmaker, 1) - player:setStorageValue(Storage.BigfootBurden.MatchmakerStatus, 0) - player:setStorageValue(Storage.BigfootBurden.MatchmakerIdNeeded, math.random(15809, 15815)) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMatchmaker, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerStatus, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerIdNeeded, math.random(15809, 15815)) player:addItem(15802, 1) --- taking missions - elseif player:getStorageValue(Storage.BigfootBurden.MatchmakerTimeout) > os.time() then -- trying to take mission while in cooldown + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerTimeout) > os.time() then -- trying to take mission while in cooldown npcHandler:say("Sorry, you will have to wait before you can undertake this mission again.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.MissionMatchmaker) > 0 then -- reporting mission - if player:getStorageValue(Storage.BigfootBurden.MatchmakerStatus) == 1 then -- can report missions - player:setStorageValue(Storage.BigfootBurden.Rank, player:getStorageValue(Storage.BigfootBurden.Rank) + 10) + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMatchmaker) > 0 then -- reporting mission + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerStatus) == 1 then -- can report missions + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) + 10) player:addItem(16128, 2) player:addItem(15698, 1) - player:setStorageValue(Storage.BigfootBurden.MissionMatchmaker, 0) - player:setStorageValue(Storage.BigfootBurden.MatchmakerStatus, -1) - player:setStorageValue(Storage.BigfootBurden.MatchmakerIdNeeded, -1) - player:setStorageValue(Storage.BigfootBurden.MatchmakerTimeout, os.time() + 72000) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMatchmaker, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerStatus, -1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerIdNeeded, -1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerTimeout, os.time() + 72000) player:addAchievement("Crystals in Love") player:checkGnomeRank() npcHandler:say("Gnomo arigato |PLAYERNAME|! You did well. That will help us a lot. Take your tokens and this gnomish supply package as a reward. ", npc, creature) @@ -115,28 +115,28 @@ local function creatureSayCallback(npc, creature, type, message) -- Golem Repair elseif MsgContains(message, "repair") then - if player:getStorageValue(Storage.BigfootBurden.Rank) >= 120 then - if player:getStorageValue(Storage.BigfootBurden.MissionTinkersBell) < 1 and player:getStorageValue(Storage.BigfootBurden.TinkerBellTimeout) < os.time() then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 120 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionTinkersBell) < 1 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.TinkerBellTimeout) < os.time() then npcHandler:say("Our gnomish crystal golems sometimes go nuts. A recent earthquake has disrupted the entire production of a golem factory. ... ", npc, creature) npcHandler:say({ "I'm no expert on how those golems work, but it seems that when the crystals of the golems get out of harmony, they do as they please and even sometimes become violent. The violent ones are lost. ...", "Don't bother with them, though you may decide to kill some to get rid of them. The others can be repaired, but to recall them to the workshops, the golems have to be put into a specific resonance. ...", "Use the bell I gave you on the golems, so the gnomes can recall them to their workshops. Getting four of them should be enough for now. Report back when you are ready.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.MissionTinkersBell, 1) - player:setStorageValue(Storage.BigfootBurden.GolemCount, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionTinkersBell, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.GolemCount, 0) player:addItem(15832, 1) --- taking missions - elseif player:getStorageValue(Storage.BigfootBurden.TinkerBellTimeout) > os.time() then -- trying to take mission while in cooldown + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.TinkerBellTimeout) > os.time() then -- trying to take mission while in cooldown npcHandler:say("Sorry, you will have to wait before you can undertake this mission again.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.MissionTinkersBell) > 0 then -- reporting mission - if player:getStorageValue(Storage.BigfootBurden.GolemCount) >= 4 then -- can report missions + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionTinkersBell) > 0 then -- reporting mission + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GolemCount) >= 4 then -- can report missions player:removeItem(15832, 1) - player:setStorageValue(Storage.BigfootBurden.Rank, player:getStorageValue(Storage.BigfootBurden.Rank) + 10) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) + 5) player:addItem(16128, 2) player:addItem(15698, 1) - player:setStorageValue(Storage.BigfootBurden.MissionTinkersBell, 0) - player:setStorageValue(Storage.BigfootBurden.GolemCount, -1) - player:setStorageValue(Storage.BigfootBurden.TinkerBellTimeout, os.time() + 72000) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionTinkersBell, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.GolemCount, -1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.TinkerBellTimeout, os.time() + 72000) player:addAchievement("Substitute Tinker") player:checkGnomeRank() npcHandler:say("Gnomo arigato |PLAYERNAME|! You did well. That will help us a lot. Take your tokens and this gnomish supply package as a reward. ", npc, creature) @@ -157,28 +157,28 @@ local function creatureSayCallback(npc, creature, type, message) -- Spore Gathering elseif MsgContains(message, "spore") then - if player:getStorageValue(Storage.BigfootBurden.Rank) >= 480 then - if player:getStorageValue(Storage.BigfootBurden.MissionSporeGathering) < 1 and player:getStorageValue(Storage.BigfootBurden.SporeGatheringTimeout) < os.time() then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 480 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionSporeGathering) < 1 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.SporeGatheringTimeout) < os.time() then npcHandler:say({ "We gnomes want you to gather a special collection of spores. All you have to do is use a puffball mushroom and use the spore gathering kit I gave you to gather the spores. ...", "There is a catch though. You need to collect different spores in a specific sequence to fill your gathering kit. If you mix the spores in the wrong way, you ruin your collection and have to start over. ...", "You have to gather them in this sequence: red, green, blue and yellow. You can see on your kit what is required next.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.MissionSporeGathering, 1) - player:setStorageValue(Storage.BigfootBurden.SporeCount, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionSporeGathering, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.SporeCount, 0) player:addItem(15817, 1) npcHandler:setTopic(playerId, 0) --- taking missions - elseif player:getStorageValue(Storage.BigfootBurden.SporeGatheringTimeout) > os.time() then -- trying to take mission while in cooldown + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.SporeGatheringTimeout) > os.time() then -- trying to take mission while in cooldown npcHandler:say("Sorry, you will have to wait before you can undertake this mission again.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.MissionSporeGathering) > 0 then -- reporting mission - if player:getStorageValue(Storage.BigfootBurden.SporeCount) == 4 then -- can report missions + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionSporeGathering) > 0 then -- reporting mission + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.SporeCount) == 4 then -- can report missions player:removeItem(15821, 1) - player:setStorageValue(Storage.BigfootBurden.Rank, player:getStorageValue(Storage.BigfootBurden.Rank) + 10) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) + 10) player:addItem(16128, 2) player:addItem(15698, 1) - player:setStorageValue(Storage.BigfootBurden.MissionSporeGathering, 0) - player:setStorageValue(Storage.BigfootBurden.SporeCount, -1) - player:setStorageValue(Storage.BigfootBurden.SporeGatheringTimeout, os.time() + 72000) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionSporeGathering, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.SporeCount, -1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.SporeGatheringTimeout, os.time() + 72000) player:addAchievement("Spore Hunter") player:checkGnomeRank() npcHandler:say("Gnomo arigato |PLAYERNAME|! You did well. That will help us a lot. Take your tokens and this gnomish supply package as a reward. ", npc, creature) @@ -199,26 +199,26 @@ local function creatureSayCallback(npc, creature, type, message) -- Grindstone Hunt elseif MsgContains(message, "grindstone") then - if player:getStorageValue(Storage.BigfootBurden.Rank) >= 480 then - if player:getStorageValue(Storage.BigfootBurden.MissionGrindstoneHunt) < 1 and player:getStorageValue(Storage.BigfootBurden.GrindstoneTimeout) < os.time() then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 480 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionGrindstoneHunt) < 1 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GrindstoneTimeout) < os.time() then npcHandler:say({ "We gnomes need some special grindstones to cut and polish specific crystals. The thing is, they can only be found in a quite dangerous lava cave full of vile monsters. You'll reach it via the hot spot teleporter. ...", "It will be your task to get one such grindstone and bring it back to me.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.MissionGrindstoneHunt, 1) - player:setStorageValue(Storage.BigfootBurden.GrindstoneStatus, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionGrindstoneHunt, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.GrindstoneStatus, 0) npcHandler:setTopic(playerId, 0) --- taking missions - elseif player:getStorageValue(Storage.BigfootBurden.GrindstoneTimeout) > os.time() then -- trying to take mission while in cooldown + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GrindstoneTimeout) > os.time() then -- trying to take mission while in cooldown npcHandler:say("Sorry, you will have to wait before you can undertake this mission again.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.MissionGrindstoneHunt) > 0 then -- reporting mission - if player:getStorageValue(Storage.BigfootBurden.GrindstoneStatus) == 1 then -- can report missions + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionGrindstoneHunt) > 0 then -- reporting mission + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GrindstoneStatus) == 1 then -- can report missions player:removeItem(15826, 1) - player:setStorageValue(Storage.BigfootBurden.Rank, player:getStorageValue(Storage.BigfootBurden.Rank) + 10) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) + 10) player:addItem(16128, 2) player:addItem(15698, 1) - player:setStorageValue(Storage.BigfootBurden.MissionGrindstoneHunt, 0) - player:setStorageValue(Storage.BigfootBurden.GrindstoneStatus, -1) - player:setStorageValue(Storage.BigfootBurden.GrindstoneTimeout, os.time() + 72000) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionGrindstoneHunt, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.GrindstoneStatus, -1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.GrindstoneTimeout, os.time() + 72000) player:addAchievement("Grinding Again") player:checkGnomeRank() npcHandler:say("Gnomo arigato |PLAYERNAME|! You did well. That will help us a lot. Take your tokens and this gnomish supply package as a reward. ", npc, creature) @@ -237,10 +237,10 @@ local function creatureSayCallback(npc, creature, type, message) end -- Grindstone Hunt elseif MsgContains(message, "report") then - if player:getStorageValue(Storage.BigfootBurden.Rank) >= 120 and player:getStorageValue(Storage.BigfootBurden.Rank) < 480 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 120 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 480 then npcHandler:say("Which mission do you want to report: {matchmaker}, golem {repair}?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.BigfootBurden.Rank) >= 480 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 480 then npcHandler:say("Which mission do you want to report: {matchmaker}, golem {repair}, {spore} gathering or {grindstone} hunt?", npc, creature) npcHandler:setTopic(playerId, 2) end diff --git a/data-otservbr-global/npc/gnomerik.lua b/data-otservbr-global/npc/gnomerik.lua index f4994d2e585..25a83175c15 100644 --- a/data-otservbr-global/npc/gnomerik.lua +++ b/data-otservbr-global/npc/gnomerik.lua @@ -51,8 +51,8 @@ npcType.onCloseChannel = function(npc, creature) end keywordHandler:addGreetKeyword({ "hi" }, { npcHandler = npcHandler, text = "Hello and welcome in the gnomish {recruitment} office." }, function(player) - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 1 then - player:setStorageValue(Storage.BigfootBurden.QuestLine, 3) + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 1 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 3) end end) keywordHandler:addAliasKeyword({ "hello" }) @@ -65,7 +65,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if player:getStorageValue(Storage.BigfootBurden.NeedsBeer) == 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.NeedsBeer) == 1 then if MsgContains(message, "recruit") or MsgContains(message, "test") or MsgContains(message, "result") then npcHandler:say({ "I suggest you relax a bit with a fresh mushroom beer and we can talk after that. ...", "Gnominus... He is the one you need right now, find him." }, npc, creature) end @@ -73,18 +73,18 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "recruit") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 5 then npcHandler:say("Yes... Yes... . We already talked about that. I can't remember if you have already tried the {test}, so lets get going.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 3 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 3 then npcHandler:say("We are hiring people to fight in our so called Bigfoot company against the foes of gnomekind. Are you interested in joining?", npc, creature) npcHandler:setTopic(playerId, 1) end -- TEST elseif MsgContains(message, "test") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 5 then if npcHandler:getTopic(playerId) < 1 then - player:setStorageValue(Storage.BigfootBurden.Test, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, 0) npcHandler:say({ "Imagine, during your travels you come upon a rare and unknown mushroom. Would you {A}) note down its specifics and location and look for a gnome to take care of it. ...", "Or would you {B}) smash it to an unrecognisable pulp. Or would you {C}) pluck it to take it with you for further examination. Or would you {D}) try to become friends with the mushroom by singing questionable bar-room songs?", @@ -163,27 +163,27 @@ local function creatureSayCallback(npc, creature, type, message) end -- ANSWERS elseif message:lower() == "a" then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 5 then if (npcHandler:getTopic(playerId) % 2) == 0 then if npcHandler:getTopic(playerId) == 2 then npcHandler:say("Indeed an excellent and smart decision for an ungnomish lifeform. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 18 then npcHandler:say("A well thought out answer I have to admit. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 20 then npcHandler:say("Ah, we have a true warrior here I guess. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 28 then npcHandler:say("Fear not. We don't expect too much of you anyway. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 30 then npcHandler:say("Ha! A Krazzelzak would for sure fit someone like you! But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) else if npcHandler:getTopic(playerId) < 33 then @@ -197,15 +197,15 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif message:lower() == "b" then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 5 then if (npcHandler:getTopic(playerId) % 2) == 0 then if npcHandler:getTopic(playerId) == 6 then npcHandler:say("Although chances are the gnome will end up rescuing you instead, it is the attempt that counts. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 14 then npcHandler:say("I knew this question was too easy. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) else if npcHandler:getTopic(playerId) < 33 then @@ -219,19 +219,19 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif message:lower() == "c" then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 5 then if (npcHandler:getTopic(playerId) % 2) == 0 then if npcHandler:getTopic(playerId) == 4 then npcHandler:say("That's the spirit! Initiative is always a good thing. Well most of the time. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 22 then npcHandler:say("You have no idea how many answer this question wrong. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 24 then npcHandler:say("That's the spirit! But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) else if npcHandler:getTopic(playerId) < 33 then @@ -245,31 +245,31 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif message:lower() == "d" then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 5 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 5 then if (npcHandler:getTopic(playerId) % 2) == 0 then if npcHandler:getTopic(playerId) == 8 then npcHandler:say("Of COURSE you wouldn't! NO ONE would! But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say("I can only hope that is your honest opinion. But let us continue with the test.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 12 then npcHandler:say("Oh, you silver tongued devil almost made me blush. But of course you're right. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 16 then npcHandler:say("How true. How true. *sigh* But fear not! We gnomes are here to help! But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 26 then npcHandler:say("That's just what I'd do - if I weren't a gnome already, that is. But let us continue with the {test}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) elseif npcHandler:getTopic(playerId) == 32 then npcHandler:say("Excellent! Well this concludes the test. Now let us see your {results}.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.Test, player:getStorageValue(Storage.BigfootBurden.Test) + 7) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) + 7) npcHandler:setTopic(playerId, npcHandler:getTopic(playerId) + 1) else if npcHandler:getTopic(playerId) < 33 then @@ -285,21 +285,21 @@ local function creatureSayCallback(npc, creature, type, message) -- TEST elseif MsgContains(message, "result") then if npcHandler:getTopic(playerId) == 33 then - if player:getStorageValue(Storage.BigfootBurden.Test) < 100 then - player:setStorageValue(Storage.BigfootBurden.NeedsBeer, 1) + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) < 100 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.NeedsBeer, 1) npcHandler:say({ - "You have failed the test with " .. player:getStorageValue(Storage.BigfootBurden.Test) .. " of 112 possible points. You probably were just too nervous. ...", + "You have failed the test with " .. player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) .. " of 112 possible points. You probably were just too nervous. ...", "I suggest you relax a bit with a fresh mushroom beer and we'll start over after that. Gnominus sells some beer. You should find him somewhere in the central chamber.", }, npc, creature) else - npcHandler:say("You have passed the test with " .. player:getStorageValue(Storage.BigfootBurden.Test) .. " of 112 possible points. Congratulations. You are ready to proceed with the more physical parts of your examination! Go and talk to Gnomespector about it.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 6) + npcHandler:say("You have passed the test with " .. player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Test) .. " of 112 possible points. Congratulations. You are ready to proceed with the more physical parts of your examination! Go and talk to Gnomespector about it.", npc, creature) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 6) end end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Excellent! Now let us begin with the gnomish aptitude test. Just tell me when you feel ready for the {test}!", npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 5) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 5) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/gnomespector.lua b/data-otservbr-global/npc/gnomespector.lua index 7d5fb54cea9..475552e76cf 100644 --- a/data-otservbr-global/npc/gnomespector.lua +++ b/data-otservbr-global/npc/gnomespector.lua @@ -63,12 +63,12 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "recruit") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 6 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 6 then npcHandler:say({ "Your examination is quite easy. Just step through the green crystal {apparatus} in the south! We will examine you with what we call g-rays. Where g stands for gnome of course ...", "Afterwards walk up to Gnomedix for your ear examination.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 8) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 8) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "apparatus") and npcHandler:getTopic(playerId) == 1 then diff --git a/data-otservbr-global/npc/gnomewart.lua b/data-otservbr-global/npc/gnomewart.lua index 1e50d429fcf..c9b7acdadb1 100644 --- a/data-otservbr-global/npc/gnomewart.lua +++ b/data-otservbr-global/npc/gnomewart.lua @@ -59,21 +59,21 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "endurance") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 15 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 15 then npcHandler:say({ "Ah, the test is a piece of mushroomcake! Just take the teleporter over there in the south and follow the hallway. ...", "You'll need to run quite a bit. It is important that you don't give up! Just keep running and running and running and ... I guess you got the idea. ...", "At the end of the hallway you'll find a teleporter. Step on it and you are done! I'm sure you'll do a true gnomerun! Afterwards talk to me.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 17) - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 17 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 17) + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 17 then npcHandler:say("Just take the teleporter over there to the south and follow the hallway. At the end of the hallway you'll find a teleporter. Step on it and you are done!", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 18 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 18 then npcHandler:say("You have passed the test and are ready to create your soul melody. Talk to Gnomelvis in the east about it.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 19) - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) < 15 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 19) + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) < 15 then npcHandler:say("Your endurance will be tested here when the time comes. For the moment please continue with the other phases of your recruitment.", npc, creature) - elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 19 then + elseif player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) >= 19 then npcHandler:say("You have passed the test. If you consider what huge feet you have to move it's quite impressive.", npc, creature) end end diff --git a/data-otservbr-global/npc/gnominus.lua b/data-otservbr-global/npc/gnominus.lua index 8e69e64fb53..7d03924d554 100644 --- a/data-otservbr-global/npc/gnominus.lua +++ b/data-otservbr-global/npc/gnominus.lua @@ -60,7 +60,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "recruitment") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 3 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 3 then npcHandler:say("Your examination is quite easy. Just step through the green crystal apparatus in the south! We will examine you with what we call g-rays. Where g stands for gnome of course ...", npc, creature) npcHandler:say("Afterwards walk up to Gnomedix for your ear examination.", npc, creature) npcHandler:setTopic(playerId, 1) @@ -73,7 +73,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "apparatus") then npcHandler:say("Don't be afraid. It won't hurt! Just step in!", npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 4) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 4) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/gnomission.lua b/data-otservbr-global/npc/gnomission.lua index 3a35ecc117d..cff1d1b4893 100644 --- a/data-otservbr-global/npc/gnomission.lua +++ b/data-otservbr-global/npc/gnomission.lua @@ -79,12 +79,12 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "snippet") then if npcHandler:getTopic(playerId) == 3 then - if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 1440 then npcHandler:say("It seems you did not even set one big foot into the warzone, I am sorry.") else - if player:getStorageValue(Storage.BigfootBurden.Warzone1Access) < 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Warzone1Access) < 1 then if player:removeItem(16136, 1) then - player:setStorageValue(Storage.BigfootBurden.Warzone1Access, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Warzone1Access, 1) npcHandler:say("As a war hero you are allowed to use the warzone teleporter one for free!", npc, creature) npcHandler:setTopic(playerId, 0) else @@ -97,13 +97,13 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "lash") then if npcHandler:getTopic(playerId) == 3 then - if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 1440 then npcHandler:say("It seems you did not even set one big foot into the warzone, I am sorry.") else - if player:getStorageValue(Storage.BigfootBurden.Warzone3Access) < 1 then - if player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) >= 3 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Warzone3Access) < 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.WarzoneStatus) >= 3 then if player:removeItem(16206, 1) then - player:setStorageValue(Storage.BigfootBurden.Warzone3Access, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Warzone3Access, 1) npcHandler:say("As a war hero you are allowed to use the warzone teleporter three for free!", npc, creature) npcHandler:setTopic(playerId, 0) else @@ -119,13 +119,13 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "hat") then if npcHandler:getTopic(playerId) == 3 then - if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 1440 then npcHandler:say("It seems you did not even set one big foot into the warzone, I am sorry.") else - if player:getStorageValue(Storage.BigfootBurden.Warzone2Access) < 1 then - if player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) >= 2 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Warzone2Access) < 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.WarzoneStatus) >= 2 then if player:removeItem(16205, 1) then - player:setStorageValue(Storage.BigfootBurden.Warzone2Access, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Warzone2Access, 1) npcHandler:say("As a war hero you are allowed to use the warzone teleporter second for free!", npc, creature) npcHandler:setTopic(playerId, 0) else @@ -141,10 +141,10 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "mission") then if npcHandler:getTopic(playerId) == 1 then - if player:getStorageValue(Storage.BigfootBurden.Rank) >= 1440 then - if player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) < 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) >= 1440 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.WarzoneStatus) < 1 then npcHandler:say("Fine, I grant you the permission to enter the warzones. Be warned though, this will be not a picnic. Better bring some friends with you. Bringing a lot of them sounds like a good idea.", npc, creature) - player:setStorageValue(Storage.BigfootBurden.WarzoneStatus, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.WarzoneStatus, 1) else npcHandler:say("You have already accepted this mission.", npc, creature) end @@ -161,7 +161,7 @@ end npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|. You are probably eager to enter the {warzones}.") local function onTradeRequest(npc, creature) - if Player(creature):getStorageValue(Storage.BigfootBurden.BossKills) < 20 then + if Player(creature):getStorageValue(Storage.Quest.U9_60.BigfootsBurden.BossKills) < 20 then npcHandler:say("Only if you have killed 20 of our major enemies in the warzones I am allowed to trade with you.", npc, creature) return false end diff --git a/data-otservbr-global/npc/hyacinth.lua b/data-otservbr-global/npc/hyacinth.lua index cbf37f8e9c6..542865e809e 100644 --- a/data-otservbr-global/npc/hyacinth.lua +++ b/data-otservbr-global/npc/hyacinth.lua @@ -54,9 +54,9 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.TheRookieGuard.Mission04) == 2 then + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 2 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, traveller |PLAYERNAME|. You must be the one sent by Lily. Do you have a sack of {herbs} for me?") - elseif player:getStorageValue(Storage.TheRookieGuard.Mission04) == 3 or player:getStorageValue(Storage.TheRookieGuard.Mission04) == 4 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 3 or player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 4 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, traveller |PLAYERNAME|. I still have a present for you! Would you like to have it now?") else npcHandler:setMessage(MESSAGE_GREET, "Greetings, traveller |PLAYERNAME|. As you have found the way to my hut, how can I {help} you?") @@ -71,9 +71,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Thank you so much! I'm just too old to walk into the village each day, and the herbs must be fresh. Say, would you like to have a sample of my potions as reward?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 2 and player:getItemCount(12671) >= 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 2 and player:getItemCount(12671) >= 1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission04, 3) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04, 3) player:removeItem(12671, 1) end) keywordHandler:addAliasKeyword({ "herbs" }) @@ -83,7 +83,7 @@ local mission4LostHerbs = keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Well, then I must have mistaken you with someone else. Or did you lose it on the way?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 2 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 2 end) -- Mission 4: Confirm (Lost herbs) @@ -110,9 +110,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Oh, and I also have another present for you! Do you still have some space in your inventory?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 3 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 3 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission04, 4) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04, 4) player:addItemEx(Game.createItem(7876, 2), true, CONST_SLOT_BACKPACK) end) @@ -127,9 +127,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Anyway, this old man has taken enough of your time. Why don't you go back to the village and talk to Vascalir? If you stay on the path, you should be safe. Don't forget your potions!", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 4 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 4 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission04, 5) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04, 5) player:addItemEx(Game.createItem(12669, 1), true, CONST_SLOT_BACKPACK) end) @@ -138,7 +138,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Oh, but I insist! After all you made the long way. Please, take my reward!", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 3 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 3 end) -- Mission 4: Decline (Second reward) @@ -146,7 +146,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Well, make some space and then talk to me again. I give you something really useful.", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 4 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 4 end) -- Basic Keywords diff --git a/data-otservbr-global/npc/lily.lua b/data-otservbr-global/npc/lily.lua index fad82e1db11..a22ae6b53d9 100644 --- a/data-otservbr-global/npc/lily.lua +++ b/data-otservbr-global/npc/lily.lua @@ -65,10 +65,10 @@ local function greetCallback(npc, creature) local playerId = creature:getId() local player = Player(creature) -- Continue mission 4 - if player:getStorageValue(Storage.TheRookieGuard.Mission04) == 1 then + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Oh hey, |PLAYERNAME|! Vascalir must have sent you to help me with a little {mission}, right?") -- Not finished mission 4 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission04) == 2 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 2 then npcHandler:setMessage(MESSAGE_GREET, "Hello, |PLAYERNAME|! Back so soon? Have you delivered the herbs to Hyacinth?") else npcHandler:setMessage(MESSAGE_GREET, "Welcome, |PLAYERNAME|! You look a little stressed today. If you like to view my offers of potions, just ask me for a {trade}. In case you're looking for the marketplace and dungeons, just follow the path to the east!") @@ -86,7 +86,7 @@ local mission4 = keywordHandler:addKeyword({ "yes" }, StdModule.say, { "He's old and can't make his way into the village anymore, but needs some of the herbs that grow only around here. Could you please deliver a bag of herbs to Hyacinth?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 1 end) keywordHandler:addAliasKeyword({ "mission" }) @@ -96,7 +96,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Oh. In that case, maybe you're interested in a {trade} - I sell potions and buy a few other things.", reset = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 1 end) -- Mission 4: Accept @@ -112,7 +112,7 @@ mission4:addChildKeyword( }, nil, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission04, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04, 2) player:addItemEx(Game.createItem(12671, 1), true, CONST_SLOT_WHEREEVER) player:addMapMark({ x = 32091, y = 32178, z = 7 }, MAPMARK_GREENNORTH, "North Exit") player:addMapMark({ x = 32139, y = 32176, z = 7 }, MAPMARK_GREENNORTH, "To Hyacinth") @@ -131,7 +131,7 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "No, you haven't. If you're looking for the way to Hyacinth, just leave the village to the north and then go east. I've marked it on your map!", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 2 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 2 end) -- Mission 4: Confirm Not Delivered (Without) @@ -139,7 +139,7 @@ local mission4LostHerbs = keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Is something... wrong? You didn't lose the herbs, did you?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 2 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 2 end) -- Mission 4: Confirm Lost Herbs diff --git a/data-otservbr-global/npc/palomino.lua b/data-otservbr-global/npc/palomino.lua index 6be58366c8b..66ab3857716 100644 --- a/data-otservbr-global/npc/palomino.lua +++ b/data-otservbr-global/npc/palomino.lua @@ -83,7 +83,7 @@ local function creatureSayCallback(npc, creature, type, message) destination:sendMagicEffect(CONST_ME_TELEPORT) npcHandler:say("Have a nice trip!", npc, creature) elseif npcHandler:getTopic(playerId) == 2 then - if player:getStorageValue(Storage.RentedHorseTimer) >= os.time() then + if player:getStorageValue(Storage.Quest.U9_1.HorseStationWorldChange.Timer) >= os.time() then npcHandler:say("You already have a horse.", npc, creature) return true end @@ -95,7 +95,7 @@ local function creatureSayCallback(npc, creature, type, message) local mountId = { 22, 25, 26 } player:addMount(mountId[math.random(#mountId)]) - player:setStorageValue(Storage.RentedHorseTimer, os.time() + 86400) + player:setStorageValue(Storage.Quest.U9_1.HorseStationWorldChange.Timer, os.time() + 86400) player:addAchievement("Natural Born Cowboy") npcHandler:say("I'll give you one of our experienced ones. Take care! Look out for low hanging branches.", npc, creature) end diff --git a/data-otservbr-global/npc/paulie.lua b/data-otservbr-global/npc/paulie.lua index 3b099caaa88..7884b91affc 100644 --- a/data-otservbr-global/npc/paulie.lua +++ b/data-otservbr-global/npc/paulie.lua @@ -62,7 +62,7 @@ local function greetCallback(npc, creature) local playerId = creature:getId() local player = Player(creature) -- Mission 8: The Rookie Guard Quest - if player:getStorageValue(Storage.TheRookieGuard.Mission08) == 1 then + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Welcome |PLAYERNAME|! Special newcomer offer, today only! Deposit some money - or {deposit ALL} of your money! - and get 50 gold for free!") else npcHandler:setMessage(MESSAGE_GREET, "Yes? What may I do for you, |PLAYERNAME|? Bank business, perhaps?") @@ -158,12 +158,12 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 2 then if MsgContains(message, "yes") then - if player:getStorageValue(Storage.TheRookieGuard.Mission08) == 1 then + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08) == 1 then player:depositMoney(count[playerId]) Bank.credit(player, 50) npcHandler:say("Alright, we have added the amount of " .. count[playerId] .. " +50 gold to your {balance} - that is the money you deposited plus a bonus of 50 gold. \z Thank you! You can withdraw your money anytime.", npc, creature) - player:setStorageValue(Storage.TheRookieGuard.Mission08, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08, 2) npcHandler:setTopic(playerId, 0) return false end diff --git a/data-otservbr-global/npc/scrutinon.lua b/data-otservbr-global/npc/scrutinon.lua index 86639f88bf9..b163f8ed624 100644 --- a/data-otservbr-global/npc/scrutinon.lua +++ b/data-otservbr-global/npc/scrutinon.lua @@ -44,6 +44,38 @@ end npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end + +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + if MsgContains(message, "quirefang") then + npcHandler:say({ + "This island is cleft. Go there only prepared or you will meet your end. The surface of this forgotten rock is a barren wasteland full of hostile creatures. ...", + "Its visage is covered with holes and tunnels in which its leggy inhabitants are hiding. Its bowels filled with the strangest creatures, waiting to feast on whatever dares to disturb their hive. ...", + "And you will find no shelter in Quirefang's black depths, where the creatures of the deep are fulfilling a dark prophecy. ...", + "It is impossible to reach it by ship or boat. However, there was one before you. A {visitor} who found a way to enter the island.", + }, npc, creature) + npcHandler:setTopic(playerId, 1) + elseif npcHandler:getTopic(playerId) == 1 and MsgContains(message, "visitor") then + npcHandler:say({ + "He travelled on the very ground to reach the hostile shores of Quirefang. He used something that turned the soil and carved a way to the island. ...", + "You will need to follow his trail if you want to reach it.", + }, npc, creature) + if player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Questline) < 1 then + player:setStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Questline, 1) + player:setStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor, 1) + end + npcHandler:setTopic(playerId, 0) + end + + return true +end + -- Travel local function addTravelKeyword(keyword, destination) local travelKeyword = keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = "Do you want to sail " .. keyword:titleCase() .. "?" }) @@ -65,15 +97,10 @@ keywordHandler:addKeyword({ "name" }, StdModule.say, { "There are drifts and storms surrounding that place that are far too dangerous to navigate through even for the most versed captains. They often sail not closer than to this island here and drop off whoever dares to explore near this dreaded coast.", }, }) -keywordHandler:addKeyword({ "quirefang" }, StdModule.say, { - npcHandler = npcHandler, - text = { - "This island is cleft. Go there only prepared or you will meet your end. The surface of this forgotten rock is a barren wasteland full of hostile creatures. ...", - "Its visage is covered with holes and tunnels in which its leggy inhabitants are hiding. Its bowels filled with the strangest creatures, waiting to feast on whatever dares to disturb their hive. ...", - "And you will find no shelter in Quirefang's black depths, where the creatures of the deep are fulfilling a dark prophecy. ...", - "It is impossible to reach it by ship or boat. However, there was one before you. A {visitor} who found a way to enter the island.", - }, -}) + +npcHandler:setMessage(MESSAGE_GREET, "|PLAYERNAME|. I have been watching your fate for quite some time. It's about time you came here. Do you seek to enter the riven island of Quirefang or travel back from where you came?") + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/servant_sentry.lua b/data-otservbr-global/npc/servant_sentry.lua index d1ff8453170..6d9805e24a7 100644 --- a/data-otservbr-global/npc/servant_sentry.lua +++ b/data-otservbr-global/npc/servant_sentry.lua @@ -56,14 +56,14 @@ end keywordHandler:addKeyword({ "master" }, StdModule.say, { npcHandler = npcHandler, text = "Our. Master. Is. Gone. You. Can. Not. Visit. Him! We. Stand. {Sentry}!" }) keywordHandler:addKeyword({ "sentry" }, StdModule.say, { npcHandler = npcHandler, text = "{Master}. Conducted. Experiments. Great. Problems. You. Must. Go!" }) keywordHandler:addKeyword({ "slime" }, StdModule.say, { npcHandler = npcHandler, text = "{Slime}. Dangerous. We. Have. It. Under. Control. ... We. Will. Stand. {Sentry}." }, function(player) - return player:getStorageValue(Storage.TheirMastersVoice.SlimeGobblerReceived) == 1 + return player:getStorageValue(Storage.Quest.U9_1.TheirMastersVoiceWorldChange.SlimeGobblerReceived) == 1 end) local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.TheirMastersVoice.SlimeGobblerReceived) < 1 then + if player:getStorageValue(Storage.Quest.U9_1.TheirMastersVoiceWorldChange.SlimeGobblerReceived) < 1 then npcHandler:say("The. {Slime}. Has. Entered. Our. {Master}. Has. Left! We. Must. {Help}.", npc, creature) end return true @@ -77,12 +77,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "help") then + if MsgContains(message, "slime") then npcHandler:say("Defeat. {Slime}. We. Will. Why. Did. You. Kill. Us? Do. You. Want. To. Rectify. And. Help?", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.TheirMastersVoice.SlimeGobblerReceived, 1) + player:setStorageValue(Storage.Quest.U9_1.TheirMastersVoiceWorldChange.SlimeGobblerReceived, 1) player:addItem(12077, 1) npcHandler:say("Then. Take. This. Gobbler. Always. Hungry. Eats. Slime. Fungus. Go.", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/spectulus.lua b/data-otservbr-global/npc/spectulus.lua index 442b03498cb..20257671367 100644 --- a/data-otservbr-global/npc/spectulus.lua +++ b/data-otservbr-global/npc/spectulus.lua @@ -376,7 +376,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end - if MsgContains(message, "machine") and player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then + if MsgContains(message, "machine") and player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) == 3 then npcHandler:say({ "Ah, the machine you found at that island. Well, I built this thing to venture far beneath the very soil we walk on. I suspected something there. Something deep down below. Something evil. Even more so than the dreaded bugs which are crawling my study. ...", "Drilling hole after hole only to get stuck in another hard, unbreakable sediment again and again, I was about to quit this pointless enterprise. ...", @@ -384,8 +384,8 @@ local function creatureSayCallback(npc, creature, type, message) "I am well aware that this may sound laughable now - at this part all of my colleagues burst into laughter anyway - but suddenly there were stairs. Incredibly large stairs that led to the underworld. A world deep under the sea - can you believe this?", }, npc, creature) npcHandler:setTopic(playerId, 21) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 21 and player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then - if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 21 and player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) == 3 then + if player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) == 3 then npcHandler:say({ "You do? Well, the end of this story was that I had to leave the place. ...", "I couldnt explore what lies below the stairs as there was an unpredictable stream. Diving into these waters would have been an uncontrollable risk, even with the means to survive without any air. ...", @@ -396,8 +396,8 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 22) end - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 22 and player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then - if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 22 and player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) == 3 then + if player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) == 3 then npcHandler:say({ "Well, if you really want to delve into this - I could use some help. So you have found my {machine} on that island? And you found the notes with the coordinates? Then you can find the entrance! ...", "Just look for a large staircase with sprawling steps. There is an unpassable stream there that will prevent you from venturing further on. But fear not, you can indeed travel down there - with these small {enhancements} I created. ...", @@ -406,10 +406,10 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) npcHandler:setTopic(playerId, 23) end - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 23 and player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then - if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 3 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 23 and player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) == 3 then + if player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) == 3 then npcHandler:say("Then off you go! Im sorry that I cannot offer you any further help but Im sure you will find support along your way. And - be careful. The sea can appear pitch black down there.", npc, creature) - player:setStorageValue(Storage.LiquidBlackQuest.Visitor, 4) + player:setStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor, 4) npcHandler:setTopic(playerId, 24) end elseif MsgContains(message, "task") then diff --git a/data-otservbr-global/npc/tom.lua b/data-otservbr-global/npc/tom.lua index c66ade91e30..74f441adb29 100644 --- a/data-otservbr-global/npc/tom.lua +++ b/data-otservbr-global/npc/tom.lua @@ -62,13 +62,13 @@ local function greetCallback(npc, creature) local playerId = creature:getId() local player = Player(creature) -- Starting mission 6 - if player:getStorageValue(Storage.TheRookieGuard.Mission06) == 1 then + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Hey there, |PLAYERNAME|. Did Vascalir send you to me for a {mission}?") -- Not finished mission 6 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission06) > 1 and player:getStorageValue(Storage.TheRookieGuard.Mission06) < 6 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) > 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) < 6 then npcHandler:setMessage(MESSAGE_GREET, "Now, now - we can't work with that. Go back to that wolf den and fulfil your mission! Unless there is anything else I can help you with.") -- Finishing mission 6 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission06) == 6 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) == 6 then npcHandler:setMessage(MESSAGE_GREET, "Hey there, |PLAYERNAME|. You look... exhausted. Did you run a lot? And more importantly, were you able to find some war wolf leather?") else npcHandler:setMessage(MESSAGE_GREET, "Hey there, |PLAYERNAME|. I'm Tom the tanner. If you have fresh {corpses}, leather, paws or other animal body parts, {trade} with me.") @@ -101,7 +101,7 @@ local mission6 = keywordHandler:addKeyword({ "yes" }, StdModule.say, { "That's why I wouldn't call it 'stealing', what an ugly word... anyway, if you bring the skin back to me, I'll make some great war wolf boots from them. What do you say?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission06) == 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) == 1 end) keywordHandler:addAliasKeyword({ "mission" }) @@ -110,7 +110,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Alright. Can I help you with something else then?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission06) == 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) == 1 end) -- Mission 6: Accept @@ -124,7 +124,7 @@ mission6:addChildKeyword( }, nil, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission06, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06, 2) player:addMapMark({ x = 32138, y = 32132, z = 7 }, MAPMARK_GREENSOUTH, "War Wolf Den") end ) @@ -147,9 +147,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "You can also tame creatures to ride on that will also increase your speed. So don't worry if you're out of breath now - you won't always be that slow. Now off with you and back to Vascalir, I have work to do.", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission06) == 6 and player:getItemCount(12740) >= 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) == 6 and player:getItemCount(12740) >= 1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission06, 7) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06, 7) player:removeItem(12740, 1) player:addItemEx(Game.createItem(3552, 1), true, CONST_SLOT_WHEREEVER) end) @@ -159,7 +159,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Are you sure? I think I see some war wolf leather on you. You should reply with {yes}.", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission06) == 6 and player:getItemCount(12740) >= 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) == 6 and player:getItemCount(12740) >= 1 end) -- Basic keywords diff --git a/data-otservbr-global/npc/vascalir.lua b/data-otservbr-global/npc/vascalir.lua index ef799e65709..0edd2e00c3f 100644 --- a/data-otservbr-global/npc/vascalir.lua +++ b/data-otservbr-global/npc/vascalir.lua @@ -61,11 +61,11 @@ local function greetCallback(npc, creature) local playerId = creature:getId() local player = Player(creature) -- Reject to start missions - if player:getStorageValue(Storage.TheRookieGuard.Questline) == -1 and player:getLevel() > 5 then + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Questline) == -1 and player:getLevel() > 5 then npcHandler:say("Welcome, adventurer |PLAYERNAME|. Thank you for offering your help - but you are already too experienced to start this quest. Just go on hunting monsters, you'll be better off that way.", npc, creature) return false -- Warn if started missions and reached level 8 - elseif player:getStorageValue(Storage.TheRookieGuard.Questline) == 1 and player:getLevel() == 8 and player:getStorageValue(Storage.TheRookieGuard.Level8Warning) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Questline) == 1 and player:getLevel() == 8 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Level8Warning) == -1 then npcHandler:setMessage(MESSAGE_GREET, { "|PLAYERNAME| - a small word of advice before we continue this mission. You are level 8 now, while it is possible to reach higher levels while still on Rookgaard, you should consider leaving Rookgaard at about level 9. ...", "You can still go on with this mission, but you won't be able to finish the quest once you've reached level 9. So only kill the monsters you absolutely have to kill - if you want to finish this quest! ...", @@ -73,114 +73,114 @@ local function greetCallback(npc, creature) "What would you like to do? {Continue} the mission or {delete} the unfinished questline from your questlog?", }) -- Completed all missions - elseif player:getStorageValue(Storage.TheRookieGuard.Questline) == 2 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Questline) == 2 then npcHandler:say("|PLAYERNAME|, the only thing left for you to do here is to talk to the oracle above the academy and leave for the Isle of Destiny. Thanks again for your great work and good luck on your journeys!", npc, creature) return false -- Not started mission 2 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission02) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) == -1 then npcHandler:setMessage(MESSAGE_GREET, "Welcome, adventurer |PLAYERNAME|. These are dire times for Rookgaard... have you come to help in our {mission}?") -- Not finished mission 2 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission02) >= 1 and player:getStorageValue(Storage.TheRookieGuard.Mission02) <= 3 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) >= 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) <= 3 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|. Your task is still not done - do you remember everything you need to do?") -- Finishing mission 2 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission02) == 4 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) == 4 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|. I've heard a loud rumbling from the roof - I hope the stones didn't fall on your toes. Have you loaded at least two catapults?") -- Finished mission 2 but not started mission 3 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission02) == 5 and player:getStorageValue(Storage.TheRookieGuard.Mission03) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) == 5 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03) == -1 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|. Actually I have some more equipment I could give to you, but first I want to see how you fight. You have fought before, haven't you?") -- Not finished or finishing mission 3 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission03) == 1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|. Are you done with the 5 rats I asked you to kill?") -- Started but not finished mission 4 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission04) >= 1 and player:getStorageValue(Storage.TheRookieGuard.Mission04) <= 4 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) >= 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) <= 4 then npcHandler:say("Greetings, |PLAYERNAME|. Right now I don't need your help. I heard that Lily south-west of here requires assistance though.", npc, creature) return false -- Finishing mission 4 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission04) == 5 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 5 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|. Glad to see you made it back in one piece. I hope you're not too exhausted, because I could use your {help} again.") -- Finished mission 4 but not started mission 5 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission04) == 6 and player:getStorageValue(Storage.TheRookieGuard.Mission05) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 6 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) == -1 then npcHandler:setMessage(MESSAGE_GREET, "Oh, hello |PLAYERNAME|! Have you made up your mind about sneaking into the tarantula's lair and retrieving a sample of her web? Are you up for it?") -- Started but not finished mission 5 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission05) >= 1 and player:getStorageValue(Storage.TheRookieGuard.Mission05) <= 2 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) >= 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) <= 2 then npcHandler:setMessage(MESSAGE_GREET, "Do you need the instruction for the tarantula's lair again?") -- Finishing mission 5 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission05) == 3 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) == 3 then npcHandler:setMessage(MESSAGE_GREET, "Oh, well done! Let me take that spider web sample from you - careful, careful... it's sturdy, yet fragile. Thank you! I should be able to make a great paralyse trap with this one. Here, I have something sturdy for you as well - want it?") - player:setStorageValue(Storage.TheRookieGuard.Mission05, 5) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05, 5) player:addExperience(50, true) -- Finishing mission 5 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission05) == 5 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) == 5 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|! How about that studded armor - would you like to have it now?") -- Started but not finished mission 6 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission06) >= 1 and player:getStorageValue(Storage.TheRookieGuard.Mission06) <= 6 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) >= 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) <= 6 then npcHandler:say("Greetings, |PLAYERNAME|. Right now I don't need your help. You should pay a visit to Tom the Tanner. His hut is south-west of the academy!", npc, creature) return false -- Finished mission 6 but not started mission 7 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission06) == 7 and player:getStorageValue(Storage.TheRookieGuard.Mission07) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) == 7 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == -1 then npcHandler:setMessage(MESSAGE_GREET, "|PLAYERNAME|! Thank the gods you are back! While you were gone, something horrible happened. Do you smell the fire?") -- Started but not finished mission 7 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.TheRookieGuard.LibraryChest) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryChest) == -1 then npcHandler:say("You can find the vault if you go down the stairs in the northern part of the academy. The book should be in a large blue chest somewhere down there - I hope it's not burnt yet.", npc, creature) return false -- Finishing mission 7 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.TheRookieGuard.LibraryChest) == 1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryChest) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Oh my, what happened to your hair? Your face is all black, too - it must have been a hell of flames down there. That's so brave of you. Did you get the book?") -- Finished mission 7 but not started mission 8 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission07) == 2 and player:getStorageValue(Storage.TheRookieGuard.Mission08) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == 2 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08) == -1 then npcHandler:setMessage(MESSAGE_GREET, "Are you prepared for your next mission, |PLAYERNAME|?") -- Started but not finished mission 8 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission08) == 1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08) == 1 then npcHandler:say("I think it's a good idea to go see Paulie before you leave the village again. Just go downstairs and to the right to find the bank.", npc, creature) return false -- Finished mission 8 but not started mission 9 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission08) == 2 and player:getStorageValue(Storage.TheRookieGuard.Mission09) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08) == 2 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == -1 then npcHandler:setMessage(MESSAGE_GREET, "Now that you know how to store your money, it's time to go after the trolls. I'm even going to give you some more equipment as reward. Do you feel ready for that mission?") -- Started but not finished mission 9 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission09) >= 1 and player:getStorageValue(Storage.TheRookieGuard.Mission09) <= 7 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) >= 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) <= 7 then npcHandler:say("|PLAYERNAME|, you need to discover the troll tunnel and find a way to make it collapse. Maybe you're able to use some of the trolls' tools. Make sure they can't enter the village via that tunnel anymore!", npc, creature) return false -- Finishing mission 9 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission09) == 8 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == 8 then npcHandler:setMessage(MESSAGE_GREET, "|PLAYERNAME|, welcome back! That was great work you did there. Let me give you something for your efforts - you deserve it. Here, want a helmet?") - player:setStorageValue(Storage.TheRookieGuard.Mission09, 9) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09, 9) player:addExperience(50, true) -- Finish mission 9 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission09) == 9 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == 9 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|. Do you have enough space for the brass helmet now?") -- Finished mission 9 but not started mission 10 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission09) == 10 and player:getStorageValue(Storage.TheRookieGuard.Mission10) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == 10 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == -1 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|. Are you ready for your next mission?") -- Started but not finished mission 10 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.TheRookieGuard.Sarcophagus) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Sarcophagus) == -1 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|. I see you haven't explored the whole crypt yet - do you need explanations again?") -- Finishing mission 10 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.TheRookieGuard.Sarcophagus) == 1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Sarcophagus) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|! Did you find a nice, fleshy bone in the crypt?") -- Finish mission 10 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission10) == 2 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 2 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|! Do you have enough space for that sword now?") -- Finished mission 10 but not started mission 11 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission10) == 3 and player:getStorageValue(Storage.TheRookieGuard.Mission11) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 3 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == -1 then npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|! I'm in a really good mood, I must say. We're almost able to infiltrate Kraknaknork's hideout. I have one last little favour to ask and then my plan is complete. Are you ready?") -- Started but not finished mission 11 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission11) == 1 or player:getStorageValue(Storage.TheRookieGuard.Mission11) == 2 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 1 or player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 2 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|! But - back so soon? Please find the wasps' lair in the north-western region of Rookgaard and use the flask I gave you on its dead body. Or did you lose the flask?") -- Finishing mission 11 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission11) == 3 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 3 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|! Were you able to bring back some wasp poison?") -- Finish mission 11 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission11) == 4 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 4 then npcHandler:setMessage(MESSAGE_GREET, "Welcome back, |PLAYERNAME|! Do you have enough space for that brass shield now?") -- Finished mission 11 but not started mission 12 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission11) == 5 and player:getStorageValue(Storage.TheRookieGuard.Mission12) == -1 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 5 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) == -1 then npcHandler:setMessage(MESSAGE_GREET, "|PLAYERNAME|, the time of our triumph has come. Are you ready to vanquish Kraknaknork once and for all?") -- Started but not finished mission 12 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission12) >= 1 and player:getStorageValue(Storage.TheRookieGuard.Mission12) <= 13 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) >= 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) <= 13 then npcHandler:say("|PLAYERNAME|, the air smells like victory. Head into the orc fortress and vanquish Kraknaknork once and for all. Don't forget to take the items from below the academy!", npc, creature) return false -- Finish mission 12 - elseif player:getStorageValue(Storage.TheRookieGuard.Mission12) == 14 then + elseif player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) == 14 then npcHandler:setMessage(MESSAGE_GREET, "|PLAYERNAME|! You're back! And you're covered in orc blood... that can only mean... were you able to kill Kraknaknork?") end return true @@ -194,7 +194,7 @@ local mission2 = keywordHandler:addKeyword({ "yes" }, StdModule.say, { "What would you say about you defeat Kraknaknork, save Rookgaard and earn some experience and better equipment on the way? Sounds good?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission02) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) == -1 end) keywordHandler:addAliasKeyword({ "mission" }) @@ -204,7 +204,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Well, if you change your mind you know where to find me. Remember that if you help Rookgaard, Rookgaard might be able to help you.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission02) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) == -1 end) local mission02Reject = KeywordNode:new({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "OK, dude!" }) @@ -225,9 +225,9 @@ local mission2Accept = mission2:addChildKeyword( }, nil, function(player) - player:setStorageValue(Storage.TheRookieGuard.Questline, 1) - player:setStorageValue(Storage.TheRookieGuard.Mission02, 1) - player:setStorageValue(Storage.TheRookieGuard.Catapults, 0) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Questline, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Catapults, 0) player:addMapMark({ x = 32082, y = 32182, z = 7 }, MAPMARK_FLAG, "Barn") player:addMapMark({ x = 32097, y = 32181, z = 7 }, MAPMARK_BAG, "Norma's Bar") player:addMapMark({ x = 32105, y = 32203, z = 7 }, MAPMARK_BAG, "Obi's Shop") @@ -260,9 +260,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Actually I have some more equipment I could give to you, but first I want to see how you fight. You have fought before, haven't you?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission02) == 4 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) == 4 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission02, 5) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02, 5) player:addItemEx(Game.createItem(3426, 1), true, CONST_SLOT_WHEREEVER) end) @@ -271,7 +271,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Oh, but you have... you should say {yes}!", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission02) == 4 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) == 4 end) -- Mission 3: Start @@ -285,7 +285,7 @@ local mission3 = keywordHandler:addKeyword({ "yes" }, StdModule.say, { "If you run low on health, go on full defence - click the little shield icon - and leave the dungeon. Nothing corwardish about running, because dying hurts. Are you ready to go?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission02) == 5 and player:getStorageValue(Storage.TheRookieGuard.Mission03) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) == 5 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03) == -1 end) -- Mission 3: Decline @@ -293,7 +293,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "No worries, let's refresh your memory. To fight a monster, click on it in the battle list and you'll automatically attack it. It's as easy as that! If you want to practice, just hunt a few harmless rabbits south of here. Remember it now?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission02) == 5 and player:getStorageValue(Storage.TheRookieGuard.Mission03) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) == 5 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03) == -1 end) -- Mission 3: Accept @@ -311,8 +311,8 @@ mission3:addChildKeyword( }, nil, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission03, 1) - player:setStorageValue(Storage.TheRookieGuard.RatKills, 0) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.RatKills, 0) player:addMapMark({ x = 32097, y = 32205, z = 7 }, MAPMARK_GREENSOUTH, "Rat Dungeon") player:addMapMark({ x = 32041, y = 32228, z = 7 }, MAPMARK_GREENSOUTH, "Rat Dungeon") end @@ -332,9 +332,9 @@ mission3:addChildKeyword({ "no" }, StdModule.say, { -- Mission 3: Complain not finished keywordHandler:addKeyword({ "yes" }, nil, {}, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission03) == 1 and player:getStorageValue(Storage.TheRookieGuard.RatKills) < 5 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.RatKills) < 5 end, function(player) - local ratKills = player:getStorageValue(Storage.TheRookieGuard.RatKills) + local ratKills = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.RatKills) npcHandler:say("You still need to kill " .. (5 - ratKills) .. " more rats. Come back once you've killed enough for some experience and equipment!", player.uid) end) keywordHandler:addAliasKeyword({ "no" }) @@ -350,10 +350,10 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Anyway, I think you're well enough equipped now to leave the village of Rookgaard for another small task. Find Lily south-west of here, she will tell you what she needs done.", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission03) == 1 and player:getStorageValue(Storage.TheRookieGuard.RatKills) >= 5 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.RatKills) >= 5 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission03, 2) - player:setStorageValue(Storage.TheRookieGuard.Mission04, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04, 1) player:addExperience(30, true) player:addItemEx(Game.createItem(3273, 1), true, CONST_SLOT_WHEREEVER) end) @@ -363,7 +363,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Actually I think you have killed enough. You should reply with {yes}!", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission03) == 1 and player:getStorageValue(Storage.TheRookieGuard.RatKills) == 5 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.RatKills) == 5 end) -- Mission 4: Finish - Confirm @@ -377,9 +377,9 @@ keywordHandler:addKeyword({ "help" }, StdModule.say, { "Do you dare sneak into the tarantula's lair and retrieve a sample of her web?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 5 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 5 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission04, 6) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04, 6) end) -- Mission 4: Finish - Wrong Confirm @@ -387,7 +387,7 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "What do you mean? If you're ready to {help} me again, just say so.", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 5 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 5 end) keywordHandler:addAliasKeyword({ "no" }) @@ -402,9 +402,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "If you run into her lair, you should have enough time to retrieve a sample of her web before she catches you. Just USE one of her intact cobwebs in her lair. Good luck!", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 6 and player:getStorageValue(Storage.TheRookieGuard.Mission05) == -1 or (player:getStorageValue(Storage.TheRookieGuard.Mission05) >= 1 and player:getStorageValue(Storage.TheRookieGuard.Mission05) <= 2) + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 6 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) == -1 or (player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) >= 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) <= 2) end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission05, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05, 1) player:addMapMark({ x = 32051, y = 32110, z = 7 }, MAPMARK_GREENSOUTH, "Spider Lair") end) @@ -414,7 +414,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Well, if you change your mind, let me know.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission04) == 6 and player:getStorageValue(Storage.TheRookieGuard.Mission05) == -1 or (player:getStorageValue(Storage.TheRookieGuard.Mission05) >= 1 and player:getStorageValue(Storage.TheRookieGuard.Mission05) <= 2) + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) == 6 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) == -1 or (player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) >= 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) <= 2) end) -- Mission 5: Finish - Accept Reward (Studded armor) @@ -423,10 +423,10 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { text = "Here, this studded armor will protect you much better. Fits you perfectly! Now - let's work on your footwear. Tom the Tanner can create great boots out of quality leather. You should pay him a visit!", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission05) == 5 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) == 5 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission05, 6) - player:setStorageValue(Storage.TheRookieGuard.Mission06, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05, 6) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06, 1) player:addItemEx(Game.createItem(3378, 1), true, CONST_SLOT_WHEREEVER) end) @@ -435,7 +435,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Seriously, don't reject that offer. I'm going to give you a studded armor. No one refuses free stuff! If you don't like it, you can sell it - I don't need it anymore. I promise it's not too used or smelly. Want it?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission05) == 5 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) == 5 end) -- Mission 7: Start @@ -450,7 +450,7 @@ local mission7 = keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Are you ready to go?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission06) == 7 and player:getStorageValue(Storage.TheRookieGuard.Mission07) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) == 7 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == -1 end) --keywordHandler:addAliasKeyword({"no"}) @@ -467,8 +467,8 @@ mission7:addChildKeyword( }, nil, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission07, 1) - player:setStorageValue(Storage.TheRookieGuard.LibraryDoor, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryDoor, 1) end ) @@ -488,10 +488,10 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "We do have to stop the trolls though before taking care of the orcs. I found their tunnel in the northern ruins. Are you prepared for your next mission?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.TheRookieGuard.LibraryChest) == 1 and player:getItemCount(12675) <= 0 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryChest) == 1 and player:getItemCount(12675) <= 0 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission07, 2) - player:setStorageValue(Storage.TheRookieGuard.LibraryDoor, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryDoor, -1) player:addExperience(100, true) end) keywordHandler:addAliasKeyword({ "no" }) @@ -505,10 +505,10 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "We do have to stop the trolls though before taking care of the orcs. I found their tunnel in the northern ruins. Are you prepared for your next mission?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.TheRookieGuard.LibraryChest) == 1 and player:getItemCount(12675) >= 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryChest) == 1 and player:getItemCount(12675) >= 1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission07, 2) - player:setStorageValue(Storage.TheRookieGuard.LibraryDoor, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryDoor, -1) player:removeItem(12675, 1) player:addExperience(100, true) player:addItemEx(Game.createItem(3035, 1), true, CONST_SLOT_WHEREEVER) @@ -523,10 +523,10 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { "We do have to stop the trolls though before taking care of the orcs. I found their tunnel in the northern ruins. Are you prepared for your next mission?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.TheRookieGuard.LibraryChest) == 1 and player:getItemCount(12675) >= 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryChest) == 1 and player:getItemCount(12675) >= 1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission07, 2) - player:setStorageValue(Storage.TheRookieGuard.LibraryDoor, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryDoor, -1) player:removeItem(12675, 1) player:addExperience(100, true) player:addItemEx(Game.createItem(3035, 1), true, CONST_SLOT_WHEREEVER) @@ -543,9 +543,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Go downstairs and talk to Paulie. I'm sure he can explain to you everything you need to know, and he might also give you a small bonus for your account.", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission07) == 2 and player:getStorageValue(Storage.TheRookieGuard.Mission08) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == 2 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08) == -1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission08, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08, 1) end) -- Mission 8: Decline @@ -554,7 +554,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Take a small break then and return to me when you have recovered... and cleaned your face.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission07) == 2 and player:getStorageValue(Storage.TheRookieGuard.Mission08) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) == 2 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08) == -1 end) -- Mission 9: Accept @@ -566,11 +566,11 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "And please don't hurt yourself in the process. You'll probably have to fight them, so bring food and maybe a potion. If you need to buy something, don't forget that you can withdraw money from your bank account. Good luck!", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission08) == 2 and player:getStorageValue(Storage.TheRookieGuard.Mission09) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08) == 2 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == -1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission09, 1) - player:setStorageValue(Storage.TheRookieGuard.TrollChests, 0) - player:setStorageValue(Storage.TheRookieGuard.TunnelPillars, 0) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.TrollChests, 0) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.TunnelPillars, 0) player:addMapMark({ x = 32094, y = 32137, z = 7 }, MAPMARK_GREENSOUTH, "Troll Caves") end) @@ -580,7 +580,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Alright, then just let me know when you're ready. Don't take too much time though.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission08) == 2 and player:getStorageValue(Storage.TheRookieGuard.Mission09) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08) == 2 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == -1 end) -- Mission 9: Finish - Accept Reward (Brass helmet) @@ -589,9 +589,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { text = "This brass helmet will make sure you don't hurt your head. I probably should have given that to you BEFORE you made a rocky tunnel collapse! Take your well-deserved break. Once you're ready for the next mission, talk to me again.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission09) == 9 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == 9 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission09, 10) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09, 10) player:addItemEx(Game.createItem(3354, 1), true, CONST_SLOT_WHEREEVER) end) @@ -600,7 +600,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Seriously, don't reject that offer. I'm going to give you a brass helmet. No one refuses free stuff! If you don't like it, you can sell it - I don't need it anymore. I promise there are no fleas in it. Want it?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission09) == 9 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == 9 end) -- Mission 10: Accept @@ -614,11 +614,11 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Undead monsters tend to drain your life - because their own life force is gone. If you wear it, you'll be protected from it. Search around in the coffins in the crypt, one of them should hold a nice fleshy bone. See you soon!", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission09) == 10 and player:getStorageValue(Storage.TheRookieGuard.Mission10) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == 10 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == -1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission10, 1) - player:setStorageValue(Storage.TheRookieGuard.UnholyCryptDoor, 1) - player:setStorageValue(Storage.TheRookieGuard.UnholyCryptChests, 0) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.UnholyCryptDoor, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.UnholyCryptChests, 0) player:addItemEx(Game.createItem(3083, 1), true, CONST_SLOT_WHEREEVER) player:addMapMark({ x = 32131, y = 32201, z = 7 }, MAPMARK_GREENSOUTH, "Unholy Crypt") end) @@ -629,7 +629,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Let me know when you're ready. This should be fun.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission09) == 10 and player:getStorageValue(Storage.TheRookieGuard.Mission10) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) == 10 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == -1 end) -- Mission 10: Confirm (Explain again) @@ -641,7 +641,7 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Undead monsters tend to drain your life - because their own life force is gone. If you wear the garlic necklace I gave you, you'll be protected from it. Search around in the coffins in the crypt, one of them should hold a nice fleshy bone. See you soon!", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.TheRookieGuard.Sarcophagus) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Sarcophagus) == -1 end) -- Mission 10: Decline (Explain again) @@ -650,7 +650,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Okay, then good hunting.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.TheRookieGuard.Sarcophagus) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Sarcophagus) == -1 end) -- Mission 10: Finish - Confirm/Decline (Having the fleshy bone) @@ -658,9 +658,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Well done, this bone is exactly what I needed! Great. I have to do some preparations, but as reward for your great work, I have a shiny new weapon for you. Here, would you like to have this sword?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.TheRookieGuard.Sarcophagus) == 1 and player:getItemCount(12674) >= 1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Sarcophagus) == 1 and player:getItemCount(12674) >= 1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission10, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10, 2) player:addExperience(150, true) player:removeItem(12674, 1) end) @@ -671,9 +671,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Ah... well, if you lost that bone on the way, that's too bad. I just hope you didn't get hungry and nibbled on it. I wouldn't eat cursed flesh if I were you. Anyway, you can still have this old sword as reward, do you want it?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.TheRookieGuard.Sarcophagus) == 1 and player:getItemCount(12674) == 0 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 1 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Sarcophagus) == 1 and player:getItemCount(12674) == 0 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission10, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10, 2) player:addExperience(80, true) end) keywordHandler:addAliasKeyword({ "no" }) @@ -684,9 +684,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { text = "This sword has helped me in many fierce battles. I hope you can put it to good use. Once you're ready for the next mission, talk to me again.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission10) == 2 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 2 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission10, 3) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10, 3) player:addItemEx(Game.createItem(3264, 1), true, CONST_SLOT_WHEREEVER) end) @@ -695,7 +695,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Seriously, don't reject that offer. Just take that sword, it's free. If you don't like it, you can sell it - I don't need it anymore. I promise there are no blood stains on it. Want it?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission10) == 2 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 2 end) -- Mission 11: Start @@ -708,7 +708,7 @@ local mission11 = keywordHandler:addKeyword({ "yes" }, StdModule.say, { "However, I can give you something for protection - a silver amulet. As long as you wear it, poison can't harm you as much as it usually would do. I'll also give you the flask which you have to use on a fresh, dead wasp. Are you prepared for that mission?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission10) == 3 and player:getStorageValue(Storage.TheRookieGuard.Mission11) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 3 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == -1 end) -- Mission 11: Decline Start @@ -717,7 +717,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Well, then just let me know when you're ready.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission10) == 3 and player:getStorageValue(Storage.TheRookieGuard.Mission11) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) == 3 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == -1 end) -- Mission 11: Accept @@ -731,7 +731,7 @@ mission11:addChildKeyword( }, nil, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission11, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11, 1) player:addItemEx(Game.createItem(3054, 1), true, CONST_SLOT_WHEREEVER) player:addItemEx(Game.createItem(12785, 1), true, CONST_SLOT_WHEREEVER) player:addMapMark({ x = 32000, y = 32139, z = 7 }, MAPMARK_GREENSOUTH, "Wasps' Nest") @@ -751,7 +751,7 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { text = "Oh, but there you have it in your inventory! Yeah, your backpack is a bit of a mess. I understand you overlooked it. Dig deeper!", ungreet = true, }, function(player) - return (player:getStorageValue(Storage.TheRookieGuard.Mission11) == 1 or player:getStorageValue(Storage.TheRookieGuard.Mission11) == 2) and player:getItemCount(12785) > 0 + return (player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 1 or player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 2) and player:getItemCount(12785) > 0 end) -- Mission 11: Confirm - Lost Flask (Without having it) @@ -760,7 +760,7 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { text = "No problem. Here's a new one. I can only give you one per hour though, so try not to lose it again this time.", ungreet = true, }, function(player) - return (player:getStorageValue(Storage.TheRookieGuard.Mission11) == 1 or player:getStorageValue(Storage.TheRookieGuard.Mission11) == 2) and player:getItemCount(12785) == 0 + return (player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 1 or player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 2) and player:getItemCount(12785) == 0 end, function(player) player:addItemEx(Game.createItem(12785, 1), true, CONST_SLOT_WHEREEVER) end) @@ -771,7 +771,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Great, then please find the wasps' nest, kill one and use the empty flask on its dead body.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission11) == 1 or player:getStorageValue(Storage.TheRookieGuard.Mission11) == 2 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 1 or player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 2 end) -- Mission 11: Finish - Confirm Give (Wasp poison flask, having it) @@ -784,9 +784,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "And I have a good shield for you, too. Here, can you carry it?", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission11) == 3 and player:getItemCount(12784) > 0 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 3 and player:getItemCount(12784) > 0 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission11, 4) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11, 4) player:removeItem(12784, 1) player:addItemEx(Game.createItem(7644, 1), true, CONST_SLOT_WHEREEVER) player:addExperience(150, true) @@ -798,7 +798,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Well, please come back with the poison soon. We won't have much time until Kraknaknork's next attack.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission11) == 3 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 3 end) -- Mission 11: Finish - Confirm Give (Wasp poison flask, without having it) @@ -806,7 +806,7 @@ local mission11Reset = keywordHandler:addKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Oh, but you don't carry any - did you lose the flask? I can give you a new empty one, but that will also reset your mission, meaning you have to extract new poison. Would you like that?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission11) == 3 and player:getItemCount(12784) == 0 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 3 and player:getItemCount(12784) == 0 end) -- Mission 11: Confirm - Reset Mission @@ -820,7 +820,7 @@ mission11Reset:addChildKeyword( }, nil, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission11, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11, 1) player:addItemEx(Game.createItem(12785, 1), true, CONST_SLOT_WHEREEVER) end ) @@ -838,9 +838,9 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { text = "This brass shield is actually brand-new. It's never been used! I hope it will serve you well. Take a small break, regenerate your health, and then talk to me again for your final mission!", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission11) == 4 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 4 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission11, 5) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11, 5) player:addItemEx(Game.createItem(3411, 1), true, CONST_SLOT_WHEREEVER) end) @@ -849,7 +849,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Seriously, don't reject that offer. Just take that shield, it's free. If you don't like it, you can sell it - I don't need it anymore. I promise it's really brand-new. Want it?", }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission11) == 4 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 4 end) -- Mission 12: Accept @@ -864,12 +864,12 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "|PLAYERNAME|, take the items and go claim your victory. I know you will do us proud. Good luck!", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission11) == 5 and player:getStorageValue(Storage.TheRookieGuard.Mission12) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 5 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) == -1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission12, 1) - player:setStorageValue(Storage.TheRookieGuard.AcademyDoor, 1) - player:setStorageValue(Storage.TheRookieGuard.OrcFortressChests, 0) - player:setStorageValue(Storage.TheRookieGuard.KraknaknorkChests, 0) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.AcademyDoor, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.OrcFortressChests, 0) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.KraknaknorkChests, 0) player:addMapMark({ x = 31976, y = 32156, z = 7 }, MAPMARK_SKULL, "Orc Fortress") end) @@ -879,7 +879,7 @@ keywordHandler:addKeyword({ "no" }, StdModule.say, { text = "Rest for a bit, but don't take too much time to come back.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission11) == 5 and player:getStorageValue(Storage.TheRookieGuard.Mission12) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) == 5 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) == -1 end) -- Mission 12: Finish - Confirm/Decline @@ -892,11 +892,11 @@ keywordHandler:addKeyword({ "yes" }, StdModule.say, { "Rookgaard will miss you, but the whole world of Tibia is open to you now. Take care, |PLAYERNAME|. It's good to know you.", }, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Mission12) == 14 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) == 14 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Mission12, 15) - player:setStorageValue(Storage.TheRookieGuard.Questline, 2) - player:setStorageValue(Storage.TheRookieGuard.AcademyDoor, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 15) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Questline, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.AcademyDoor, -1) end) keywordHandler:addAliasKeyword({ "no" }) @@ -906,9 +906,9 @@ keywordHandler:addKeyword({ "continue" }, StdModule.say, { text = "Alright. Talk to me again to continue with your mission, but heed my words!", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Questline) == 1 and player:getLevel() == 8 and player:getStorageValue(Storage.TheRookieGuard.Level8Warning) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Questline) == 1 and player:getLevel() == 8 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Level8Warning) == -1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Level8Warning, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Level8Warning, 1) end) -- Missions: Confirm - Delete (Level 8) @@ -917,21 +917,21 @@ keywordHandler:addKeyword({ "delete" }, StdModule.say, { text = "Alright.", ungreet = true, }, function(player) - return player:getStorageValue(Storage.TheRookieGuard.Questline) == 1 and player:getLevel() == 8 and player:getStorageValue(Storage.TheRookieGuard.Level8Warning) == -1 + return player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Questline) == 1 and player:getLevel() == 8 and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Level8Warning) == -1 end, function(player) - player:setStorageValue(Storage.TheRookieGuard.Questline, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission01, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission02, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission03, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission04, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission05, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission06, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission07, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission08, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission09, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission10, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission11, -1) - player:setStorageValue(Storage.TheRookieGuard.Mission12, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Questline, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission01, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission08, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11, -1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, -1) end) npcHandler:setCallback(CALLBACK_GREET, greetCallback) diff --git a/data-otservbr-global/npc/xelvar.lua b/data-otservbr-global/npc/xelvar.lua index 9180dee6f3b..c8b8be4492b 100644 --- a/data-otservbr-global/npc/xelvar.lua +++ b/data-otservbr-global/npc/xelvar.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "adventures") or MsgContains(message, "join") then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) < 1 then npcHandler:say({ "I am glad to hear that. In the spirit of our own foreign legion we suggested the gnomes might hire heroes like you to build some kind of troop. They gave me that strange crystal to allow people passage to their realm. ...", "I hereby grant you permission to use the basic gnomish teleporters. I also give you four gnomish teleport crystals. One will be used up each time you use the teleporter. ...", @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) "Good luck to you and don't embarrass your race down there! Keep in mind that you are a representative of the big people.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 1) player:addItem(16167, 4) --npcHandler:say("Right now I am sort of {recruiting} people.", npc, creature) @@ -113,7 +113,7 @@ local function creatureSayCallback(npc, creature, type, message) "Good luck to you and don't embarrass your race down there! Keep in mind that you are a representative of the big people.", }, npc, creature) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 1) player:addItem(16167, 4) npcHandler:setTopic(playerId, 0) end @@ -121,6 +121,8 @@ local function creatureSayCallback(npc, creature, type, message) return true end +npcHandler:setMessage(MESSAGE_GREET, "Greetings. Are you interested in adventures?") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index d3d8fb36bc4..8b87cb8a336 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -1,20 +1,20 @@ local stage = configManager.getNumber(configKeys.FREE_QUEST_STAGE) local questTable = { - { storage = Storage.BigfootBurden.QuestLine, storageValue = 2 }, - { storage = Storage.BigfootBurden.QuestLine, storageValue = 4 }, - { storage = Storage.BigfootBurden.QuestLine, storageValue = 7 }, - { storage = Storage.BigfootBurden.QuestLine, storageValue = 9 }, - { storage = Storage.BigfootBurden.QuestLine, storageValue = 12 }, - { storage = Storage.BigfootBurden.Shooting, storageValue = 5 }, - { storage = Storage.BigfootBurden.QuestLine, storageValue = 16 }, - { storage = Storage.BigfootBurden.QuestLine, storageValue = 20 }, - { storage = Storage.BigfootBurden.QuestLine, storageValue = 23 }, - { storage = Storage.BigfootBurden.QuestLineComplete, storageValue = 2 }, - { storage = Storage.BigfootBurden.Rank, storageValue = 1440 }, - { storage = Storage.BigfootBurden.Warzone1Access, storageValue = 2 }, - { storage = Storage.BigfootBurden.Warzone2Access, storageValue = 2 }, - { storage = Storage.BigfootBurden.Warzone3Access, storageValue = 2 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 2 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 4 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 7 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 9 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 12 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.Shooting, storageValue = 5 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 16 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 20 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLine, storageValue = 23 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.QuestLineComplete, storageValue = 2 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.Rank, storageValue = 1440 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.Warzone1Access, storageValue = 2 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.Warzone2Access, storageValue = 2 }, + { storage = Storage.Quest.U9_60.BigfootsBurden.Warzone3Access, storageValue = 2 }, { storage = Storage.DangerousDepths.Questline, storageValue = 10 }, { storage = Storage.DangerousDepths.Access.LavaPumpWarzoneVI, storageValue = 10 }, { storage = Storage.DangerousDepths.Access.LavaPumpWarzoneV, storageValue = 10 }, @@ -356,7 +356,7 @@ local questTable = { { storage = Storage.Quest.U13_10.CradleOfMonsters.Access.Monster, storageValue = 1 }, { storage = Storage.Quest.U13_10.CradleOfMonsters.Access.MutatedAbomination, storageValue = 1 }, { storage = Storage.Quest.U8_54.TheNewFrontier.SnakeHeadTeleport, storageValue = 1 }, - { storage = Storage.LiquidBlackQuest.Visitor, storageValue = 5 }, + { storage = Storage.Quest.U9_4.LiquidBlackQuest.Visitor, storageValue = 5 }, { storage = Storage.Quest.U8_4.BloodBrothers.VengothAccess, storageValue = 1 }, -- Assassin Outfit quests diff --git a/data-otservbr-global/scripts/globalevents/others/check_mount.lua b/data-otservbr-global/scripts/globalevents/others/check_mount.lua index 85c4ece1c82..497ec1a0415 100644 --- a/data-otservbr-global/scripts/globalevents/others/check_mount.lua +++ b/data-otservbr-global/scripts/globalevents/others/check_mount.lua @@ -10,7 +10,7 @@ function rentedMounts.onThink(interval) local player, outfit for i = 1, #players do player = players[i] - if player:getStorageValue(Storage.RentedHorseTimer) < 1 or player:getStorageValue(Storage.RentedHorseTimer) >= os.time() then + if player:getStorageValue(Storage.Quest.U9_1.HorseStationWorldChange.Timer) < 1 or player:getStorageValue(Storage.Quest.U9_1.HorseStationWorldChange.Timer) >= os.time() then break end @@ -24,7 +24,7 @@ function rentedMounts.onThink(interval) player:removeMount(mountIds[m]) end - player:setStorageValue(Storage.RentedHorseTimer, -1) + player:setStorageValue(Storage.Quest.U9_1.HorseStationWorldChange.Timer, -1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your contract with your horse expired and it returned back to the horse station.") end return true diff --git a/data-otservbr-global/scripts/lib/register_actions.lua b/data-otservbr-global/scripts/lib/register_actions.lua index 6d5a05a4c98..6df6b96473a 100644 --- a/data-otservbr-global/scripts/lib/register_actions.lua +++ b/data-otservbr-global/scripts/lib/register_actions.lua @@ -594,7 +594,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) -- The Rookie Guard Quest - Mission 09: Rock 'n Troll -- Path: data\scripts\actions\quests\the_rookie_guard\mission09_rock_troll.lua -- Damage tunnel pillars - if player:getStorageValue(Storage.TheRookieGuard.Mission09) ~= -1 and target.itemid == 1600 then + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) ~= -1 and target.itemid == 1600 then return onUsePickAtTunnelPillar(player, item, fromPosition, target, toPosition) end diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_beer.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_beer.lua index 92f3f8245fb..48d013f5b26 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_beer.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_beer.lua @@ -1,7 +1,7 @@ local bigfootBeer = Action() function bigfootBeer.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.BigfootBurden.NeedsBeer) == 1 then - player:setStorageValue(Storage.BigfootBurden.NeedsBeer, 0) + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.NeedsBeer) == 1 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.NeedsBeer, 0) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your mind feels refreshed!") end diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_crystal.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_crystal.lua index dec5e560790..6fdab825d00 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_crystal.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_crystal.lua @@ -11,13 +11,13 @@ function bigfootCrystal.onUse(player, item, fromPosition, target, toPosition, is return false end - local repairedCount = player:getStorageValue(Storage.BigfootBurden.RepairedCrystalCount) - if repairedCount == 5 or player:getStorageValue(Storage.BigfootBurden.MissionCrystalKeeper) ~= 1 then + local repairedCount = player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.RepairedCrystalCount) + if repairedCount == 5 or player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionCrystalKeeper) ~= 1 then return false end if target.itemid == 15796 or target.itemid == 15712 then - player:setStorageValue(Storage.BigfootBurden.RepairedCrystalCount, repairedCount + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.RepairedCrystalCount, repairedCount + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have repaired a damaged crystal!") addEvent(returnCrystal, math.random(50, 140) * 1000, toPosition, target.itemid) target:transform(15800) diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_extractor.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_extractor.lua index 2112f77694d..48b1d81e3e6 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_extractor.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_extractor.lua @@ -1,7 +1,7 @@ local bigfootExtractor = Action() function bigfootExtractor.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local extractedCount = player:getStorageValue(Storage.BigfootBurden.ExtractedCount) - if extractedCount == 7 or player:getStorageValue(Storage.BigfootBurden.MissionRaidersOfTheLostSpark) ~= 1 then + local extractedCount = player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExtractedCount) + if extractedCount == 7 or player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionRaidersOfTheLostSpark) ~= 1 then return false end @@ -14,7 +14,7 @@ function bigfootExtractor.onUse(player, item, fromPosition, target, toPosition, return false end - player:setStorageValue(Storage.BigfootBurden.ExtractedCount, math.max(0, extractedCount) + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExtractedCount, math.max(0, extractedCount) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You gathered a spark.") target:transform(16195) toPosition:sendMagicEffect(CONST_ME_ENERGYHIT) diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_matchmaker.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_matchmaker.lua index 02ddeea3343..4c185a2c709 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_matchmaker.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_matchmaker.lua @@ -4,16 +4,16 @@ function bigfootMatch.onUse(player, item, fromPosition, target, toPosition, isHo return false end - if player:getStorageValue(Storage.BigfootBurden.MatchmakerStatus) == 1 or player:getStorageValue(Storage.BigfootBurden.MissionMatchmaker) ~= 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerStatus) == 1 or player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMatchmaker) ~= 1 then return false end - if player:getStorageValue(Storage.BigfootBurden.MatchmakerIdNeeded) ~= target.itemid then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerIdNeeded) ~= target.itemid then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This is not the crystal you're looking for!") return true end - player:setStorageValue(Storage.BigfootBurden.MatchmakerStatus, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MatchmakerStatus, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Congratulations! The crystals seem to have fallen in love and your mission is done!") toPosition:sendMagicEffect(CONST_ME_HEARTS) item:remove() diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_mouthpiece.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_mouthpiece.lua index ce0038b7355..030de7833e9 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_mouthpiece.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_mouthpiece.lua @@ -1,8 +1,8 @@ local bigfootPiece = Action() function bigfootPiece.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.BigfootBurden.Mouthpiece) ~= os.time() then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Mouthpiece) ~= os.time() then player:addItem(20057, 1) - player:setStorageValue(Storage.BigfootBurden.Mouthpiece, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Mouthpiece, os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is empty.") end diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_music.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_music.lua index e972b1986df..a850cb34215 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_music.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_music.lua @@ -1,11 +1,11 @@ local cToneStorages = { - Storage.BigfootBurden.MelodyTone1, - Storage.BigfootBurden.MelodyTone2, - Storage.BigfootBurden.MelodyTone3, - Storage.BigfootBurden.MelodyTone4, - Storage.BigfootBurden.MelodyTone5, - Storage.BigfootBurden.MelodyTone6, - Storage.BigfootBurden.MelodyTone7, + Storage.Quest.U9_60.BigfootsBurden.MelodyTone1, + Storage.Quest.U9_60.BigfootsBurden.MelodyTone2, + Storage.Quest.U9_60.BigfootsBurden.MelodyTone3, + Storage.Quest.U9_60.BigfootsBurden.MelodyTone4, + Storage.Quest.U9_60.BigfootsBurden.MelodyTone5, + Storage.Quest.U9_60.BigfootsBurden.MelodyTone6, + Storage.Quest.U9_60.BigfootsBurden.MelodyTone7, } local Crystals = { @@ -17,20 +17,20 @@ local Crystals = { local bigfootMusic = Action() function bigfootMusic.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 21 then - local value = player:getStorageValue(Storage.BigfootBurden.MelodyStatus) + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 21 then + local value = player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MelodyStatus) if Position(Crystals[player:getStorageValue(cToneStorages[value])]) == item:getPosition() then - player:setStorageValue(Storage.BigfootBurden.MelodyStatus, value + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MelodyStatus, value + 1) if value + 1 == 8 then toPosition:sendMagicEffect(CONST_ME_HEARTS) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "That was the correct note! Now you know your soul melody!") - player:setStorageValue(Storage.BigfootBurden.QuestLine, 22) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 22) else toPosition:sendMagicEffect(CONST_ME_SOUND_GREEN) player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW) end else - player:setStorageValue(Storage.BigfootBurden.MelodyStatus, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MelodyStatus, 1) toPosition:sendMagicEffect(CONST_ME_SOUND_RED) end end diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_pig.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_pig.lua index 7d1a8dc9333..2133cdb1903 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_pig.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_pig.lua @@ -4,8 +4,8 @@ function bigfootPig.onUse(player, item, fromPosition, target, toPosition, isHotk return false end - local mushroomCount = player:getStorageValue(Storage.BigfootBurden.MushroomCount) - if player:getStorageValue(Storage.BigfootBurden.MissionMushroomDigger) ~= 1 then + local mushroomCount = player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MushroomCount) + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionMushroomDigger) ~= 1 then return false end @@ -14,7 +14,7 @@ function bigfootPig.onUse(player, item, fromPosition, target, toPosition, isHotk return true end - player:setStorageValue(Storage.BigfootBurden.MushroomCount, mushroomCount + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.MushroomCount, mushroomCount + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The little pig happily eats the truffles.") target:transform(15701) toPosition:sendMagicEffect(CONST_ME_GROUNDSHAKER) diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_repair.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_repair.lua index 07ae2242d84..348e08e9f22 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_repair.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_repair.lua @@ -8,16 +8,16 @@ function bigfootRepair.onUse(player, item, fromPosition, target, toPosition, isH return false end - if player:getStorageValue(Storage.BigfootBurden.MissionTinkersBell) ~= 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionTinkersBell) ~= 1 then return false end - if player:getStorageValue(Storage.BigfootBurden.GolemCount) >= 4 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GolemCount) >= 4 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have returned enough golems for now. Give the gnomes some time for their repairs. Report back now.") return true end - player:setStorageValue(Storage.BigfootBurden.GolemCount, player:getStorageValue(Storage.BigfootBurden.GolemCount) + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.GolemCount, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GolemCount) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The golem has been returned to the gnomish workshop.") target:remove() player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_rewards.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_rewards.lua index 0a9f9997789..54c53b65ee9 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_rewards.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_rewards.lua @@ -1,6 +1,6 @@ local rewards = { [3148] = { - storage = Storage.BigfootBurden.Warzone1Reward, + storage = Storage.Quest.U9_60.BigfootsBurden.Warzone1Reward, bossName = "Deathstrike", items = { { rand = true, itemId = { 16102, 16233, 16234, 16235 } }, @@ -13,7 +13,7 @@ local rewards = { achievement = { "Final Strike", "Death on Strike" }, }, [3149] = { - storage = Storage.BigfootBurden.Warzone2Reward, + storage = Storage.Quest.U9_60.BigfootsBurden.Warzone2Reward, bossName = "Gnomevil", items = { { rand = true, itemId = { 16237, 16238, 16239 } }, @@ -27,7 +27,7 @@ local rewards = { achievement = { "Gnomebane's Bane", "Fall of the Fallen" }, }, [3150] = { - storage = Storage.BigfootBurden.Warzone3Reward, + storage = Storage.Quest.U9_60.BigfootsBurden.Warzone3Reward, bossName = "Abyssador", items = { { rand = true, itemId = { 16229, 16230, 16231 } }, @@ -44,8 +44,8 @@ local rewards = { local bigfootRewards = Action() function bigfootRewards.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.uid == 3147 then - if player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) == 4 then - player:setStorageValue(Storage.BigfootBurden.WarzoneStatus, 5) + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.WarzoneStatus) == 4 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.WarzoneStatus, 5) player:addItem(3020, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found some golden fruits.") else diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_shooting.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_shooting.lua index f8c5cb50ab1..26b33e85dad 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_shooting.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_shooting.lua @@ -1,22 +1,22 @@ local bigfootShooting = Action() function bigfootShooting.onUse(player, item, fromPosition, target, toPosition, isHotkey) local playerPos = player:getPosition() - if player:getStorageValue(Storage.BigfootBurden.Shooting) < 5 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Shooting) < 5 then local pos = Position(playerPos.x, playerPos.y - 5, 10) local tile = Tile(pos) if tile:getItemById(15710) then - player:setStorageValue(Storage.BigfootBurden.Shooting, player:getStorageValue(Storage.BigfootBurden.Shooting) + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Shooting, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Shooting) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Hit!") tile:getItemById(15710):remove() pos:sendMagicEffect(CONST_ME_FIREATTACK) for i = 2, 4 do Position(playerPos.x, playerPos.y - i, 10):sendMagicEffect(CONST_ME_TELEPORT) end - if player:getStorageValue(Storage.BigfootBurden.Shooting) >= 5 then - player:setStorageValue(Storage.BigfootBurden.QuestLine, 14) + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Shooting) >= 5 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 14) end elseif tile:getItemById(15711) then - player:setStorageValue(Storage.BigfootBurden.Shooting, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Shooting, 0) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You've hit the wrong target and have to start all over!") tile:getItemById(15711):remove() pos:sendMagicEffect(CONST_ME_FIREATTACK) diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_spores.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_spores.lua index 6f7eded510f..786afd2d3d6 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_spores.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_spores.lua @@ -12,20 +12,20 @@ function bigfootSpores.onUse(player, item, fromPosition, target, toPosition, isH return false end - local sporeCount = player:getStorageValue(Storage.BigfootBurden.SporeCount) - if sporeCount == 4 or player:getStorageValue(Storage.BigfootBurden.MissionSporeGathering) ~= 1 then + local sporeCount = player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.SporeCount) + if sporeCount == 4 or player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionSporeGathering) ~= 1 then return false end if target.itemid ~= spores then - player:setStorageValue(Storage.BigfootBurden.SporeCount, 0) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.SporeCount, 0) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have gathered the wrong spores. You ruined your collection.") item:transform(15817) toPosition:sendMagicEffect(CONST_ME_POFF) return true end - player:setStorageValue(Storage.BigfootBurden.SporeCount, sporeCount + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.SporeCount, sporeCount + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have gathered the correct spores.") item:transform(item.itemid + 1) toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_stone.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_stone.lua index 2c564a938bb..739aa9ffd89 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/actions_stone.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/actions_stone.lua @@ -1,6 +1,6 @@ local bigfootStone = Action() function bigfootStone.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.BigfootBurden.GrindstoneStatus) == 1 or player:getStorageValue(Storage.BigfootBurden.MissionGrindstoneHunt) ~= 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GrindstoneStatus) == 1 or player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionGrindstoneHunt) ~= 1 then return false end @@ -12,7 +12,7 @@ function bigfootStone.onUse(player, item, fromPosition, target, toPosition, isHo return true end - player:setStorageValue(Storage.BigfootBurden.GrindstoneStatus, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.GrindstoneStatus, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your skill allowed you to grab a whetstone before the stone sinks into lava.") player:addItem(15826, 1) return true diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_bosses_warzone.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_bosses_warzone.lua index 0f95bf236f2..2f4663714fa 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_bosses_warzone.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_bosses_warzone.lua @@ -1,7 +1,7 @@ local bosses = { - ["deathstrike"] = { status = 2, storage = Storage.BigfootBurden.Warzone1Reward }, - ["gnomevil"] = { status = 3, storage = Storage.BigfootBurden.Warzone2Reward }, - ["abyssador"] = { status = 4, storage = Storage.BigfootBurden.Warzone3Reward }, + ["deathstrike"] = { status = 2, storage = Storage.Quest.U9_60.BigfootsBurden.Warzone1Reward }, + ["gnomevil"] = { status = 3, storage = Storage.Quest.U9_60.BigfootsBurden.Warzone2Reward }, + ["abyssador"] = { status = 4, storage = Storage.Quest.U9_60.BigfootsBurden.Warzone3Reward }, } -- This will set the status of warzone (killing 1, 2 and 3 wz bosses in order you can open the chest and get "some golden fruits") and the reward chest storages @@ -13,14 +13,14 @@ function bossesWarzone.onDeath(creature) end onDeathForDamagingPlayers(creature, function(creature, player) - if (player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) + 1) == bossConfig.status then - player:setStorageValue(Storage.BigfootBurden.WarzoneStatus, bossConfig.status) + if (player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.WarzoneStatus) + 1) == bossConfig.status then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.WarzoneStatus, bossConfig.status) if bossConfig.status == 4 then - player:setStorageValue(Storage.BigfootBurden.DoorGoldenFruits, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.DoorGoldenFruits, 1) end end player:setStorageValue(bossConfig.storage, 1) - player:setStorageValue(Storage.BigfootBurden.BossKills, player:getStorageValue(Storage.BigfootBurden.BossKills) + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.BossKills, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.BossKills) + 1) end) return true end diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_versperoth_kill.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_versperoth_kill.lua index c736981bd4d..89e72454269 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_versperoth_kill.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_versperoth_kill.lua @@ -18,8 +18,8 @@ end local versperothKill = CreatureEvent("VersperothDeath") function versperothKill.onDeath(creature) local config = warzoneConfig.findByName("Abyssador") - Game.setStorageValue(GlobalStorage.BigfootBurden.Versperoth.Battle, 2) - addEvent(Game.setStorageValue, 30 * 60 * 1000, GlobalStorage.BigfootBurden.Versperoth.Battle, 0) + Game.setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Versperoth.Battle, 2) + addEvent(Game.setStorageValue, 30 * 60 * 1000, Storage.Quest.U9_60.BigfootsBurden.Versperoth.Battle, 0) blood = Tile(teleportPosition):getItemById(2886) if blood then diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_wiggler_kill.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_wiggler_kill.lua index 41e41ca1e66..e875ca955f4 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_wiggler_kill.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/creaturescripts_wiggler_kill.lua @@ -1,9 +1,9 @@ local wigglerKill = CreatureEvent("WigglerDeath") function wigglerKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) onDeathForParty(creature, mostDamageKiller, function(creature, player) - local value = player:getStorageValue(Storage.BigfootBurden.ExterminatedCount) - if value < 10 and player:getStorageValue(Storage.BigfootBurden.MissionExterminators) == 1 then - player:setStorageValue(Storage.BigfootBurden.ExterminatedCount, value + 1) + local value = player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExterminatedCount) + if value < 10 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.MissionExterminators) == 1 then + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.ExterminatedCount, value + 1) end end) return true diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_gnomebase_teleport.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_gnomebase_teleport.lua index 5878882c7ec..7ee7b664377 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_gnomebase_teleport.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_gnomebase_teleport.lua @@ -43,21 +43,21 @@ function gnomebaseTeleport.onStepIn(creature, item, position, fromPosition) if teleports[c].teleportsPosition then for d = 1, #teleports[c].teleportsPosition do if player:getPosition() == Position(teleports[c].teleportsPosition[d]) then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) < 1 then fromPosition:sendMagicEffect(CONST_ME_POFF) player:teleportTo(fromPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have no idea on how to use this device. Xelvar in Kazordoon might tell you more about it.") return false end - if player:getPosition() ~= Position(32988, 31862, 9) and player:getStorageValue(Storage.BigfootBurden.QuestLine) < teleports[c].storageValue then + if player:getPosition() ~= Position(32988, 31862, 9) and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) < teleports[c].storageValue then position:sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(fromPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.") return false end - if player:getPosition() == Position(32988, 31862, 9) and player:getStorageValue(Storage.BigfootBurden.Rank) < teleports[c].storageValue then + if player:getPosition() == Position(32988, 31862, 9) and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < teleports[c].storageValue then position:sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(fromPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.") @@ -76,21 +76,21 @@ function gnomebaseTeleport.onStepIn(creature, item, position, fromPosition) end end elseif player:getPosition() == Position(teleports[c].teleportPosition) then - if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) < 1 then fromPosition:sendMagicEffect(CONST_ME_POFF) player:teleportTo(fromPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have no idea on how to use this device. Xelvar in Kazordoon might tell you more about it.") return false end - if teleports[c].storageValue < 100 and player:getStorageValue(Storage.BigfootBurden.QuestLine) < teleports[c].storageValue then + if teleports[c].storageValue < 100 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) < teleports[c].storageValue then position:sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(fromPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.") return false end - if teleports[c].storageValue >= 100 and player:getStorageValue(Storage.BigfootBurden.Rank) < teleports[c].storageValue then + if teleports[c].storageValue >= 100 and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < teleports[c].storageValue then position:sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(fromPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.") diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_ear.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_ear.lua index 41770076e5b..eb83a8e3a6d 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_ear.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_ear.lua @@ -15,7 +15,7 @@ local function sendTextMessages(cid, index) return true end - if index ~= player:getStorageValue(Storage.BigfootBurden.GnomedixMsg) then + if index ~= player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GnomedixMsg) then return false end @@ -27,10 +27,10 @@ local function sendTextMessages(cid, index) if messages[index][2] then player:getPosition():sendMagicEffect(messages[index][2]) end - player:setStorageValue(Storage.BigfootBurden.GnomedixMsg, player:getStorageValue(Storage.BigfootBurden.GnomedixMsg) + 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.GnomedixMsg, player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GnomedixMsg) + 1) if index == 8 then Game.createMonster("Strange Slime", Position(32767, 31772, 10)) - player:setStorageValue(Storage.BigfootBurden.QuestLine, 11) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 11) end end @@ -41,13 +41,13 @@ function taskEar.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.BigfootBurden.QuestLine) ~= 10 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) ~= 10 then return true end - player:setStorageValue(Storage.BigfootBurden.GnomedixMsg, 1) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.GnomedixMsg, 1) position:sendMagicEffect(CONST_ME_LOSEENERGY) - for i = player:getStorageValue(Storage.BigfootBurden.GnomedixMsg), #messages do + for i = player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.GnomedixMsg), #messages do addEvent(sendTextMessages, (i - 1) * 4000, player.uid, i) end return true diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_endurance.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_endurance.lua index 5f06e2f6b32..2c1dc7383bc 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_endurance.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_endurance.lua @@ -26,11 +26,11 @@ function taskEndurance.onStepIn(creature, item, position, fromPosition) player:teleportTo(fromPosition) end elseif item.actionid == 7817 then --finish of the test - player:setStorageValue(Storage.BigfootBurden.QuestLine, 18) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 18) player:teleportTo(Position(32760, 31811, 10)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) elseif item.actionid == 7818 then -- entrance to the test - if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 17 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 17 then player:teleportTo(Position(32759, 31812, 11)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_shooting.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_shooting.lua index f8f65c6df79..d685813fcb6 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_shooting.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_shooting.lua @@ -34,7 +34,7 @@ function taskShooting.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.BigfootBurden.QuestLine) ~= 13 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) ~= 13 then player:teleportTo(fromPosition) return true end diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_x_ray.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_x_ray.lua index c16d3e81df9..407b8fd827e 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_x_ray.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_task_x_ray.lua @@ -33,11 +33,11 @@ function taskXRay.onStepIn(creature, item, position, fromPosition) end for a = 1, #xRay do - if player:getPosition() == Position(xRay[a]) and player:getStorageValue(Storage.BigfootBurden.QuestLine) == 8 then + if player:getPosition() == Position(xRay[a]) and player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) == 8 then player:addCondition(condition) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) if a >= 16 then - player:setStorageValue(Storage.BigfootBurden.QuestLine, 10) + player:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 10) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been succesfully g-rayed. Now let Doctor Gnomedix inspect your ears!") end end diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_versperoth_spawn.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_versperoth_spawn.lua index 78a9a5d9da9..c86aea3b4c1 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_versperoth_spawn.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_versperoth_spawn.lua @@ -9,7 +9,7 @@ local function removeMinion(mid) end local function executeVersperothBattle(mid) - if Game.getStorageValue(GlobalStorage.BigfootBurden.Versperoth.Battle) ~= 1 then + if Game.getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Versperoth.Battle) ~= 1 then return false end @@ -20,7 +20,7 @@ local function executeVersperothBattle(mid) else end - Game.setStorageValue(GlobalStorage.BigfootBurden.Versperoth.Health, monster:getHealth()) + Game.setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Versperoth.Health, monster:getHealth()) monster:remove() local blood = Tile(versperothPosition):getItemById(2889) if blood then @@ -53,7 +53,7 @@ local function executeVersperothBattle(mid) holee:remove() end versperothPosition:sendMagicEffect(CONST_ME_GROUNDSHAKER) - monster:setHealth(Game.getStorageValue(GlobalStorage.BigfootBurden.Versperoth.Health)) + monster:setHealth(Game.getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Versperoth.Health)) addEvent(executeVersperothBattle, 20 * 1000, monster:getId()) end end @@ -66,13 +66,13 @@ function versperothSpawn.onStepIn(creature, item, position, fromPosition) return true end - if Game.getStorageValue(GlobalStorage.BigfootBurden.Versperoth.Battle) >= 1 then + if Game.getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Versperoth.Battle) >= 1 then player:say("Versperoth has already been defeated in the last 30 minutes.", TALKTYPE_MONSTER_SAY) return true end player:teleportTo(Position(33072, 31877, 12)) - Game.setStorageValue(GlobalStorage.BigfootBurden.Versperoth.Battle, 1) - Game.setStorageValue(GlobalStorage.BigfootBurden.Versperoth.Health, 100000) + Game.setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Versperoth.Battle, 1) + Game.setStorageValue(Storage.Quest.U9_60.BigfootsBurden.Versperoth.Health, 100000) executeVersperothBattle() item:remove() return true diff --git a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_warzone_teleport.lua b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_warzone_teleport.lua index f42f00a8a15..3573a520c7f 100644 --- a/data-otservbr-global/scripts/quests/bigfoot_burden/movements_warzone_teleport.lua +++ b/data-otservbr-global/scripts/quests/bigfoot_burden/movements_warzone_teleport.lua @@ -1,7 +1,7 @@ local teleports = { - { teleportPosition = { x = 33013, y = 31880, z = 9 }, teleportDestination = Position(32996, 31922, 10), storage = Storage.BigfootBurden.Warzone1Access, value = 1 }, - { teleportPosition = { x = 33019, y = 31886, z = 9 }, teleportDestination = Position(33011, 31943, 11), storage = Storage.BigfootBurden.Warzone2Access, value = 2 }, - { teleportPosition = { x = 33022, y = 31902, z = 9 }, teleportDestination = Position(32989, 31909, 12), storage = Storage.BigfootBurden.Warzone3Access, value = 3 }, + { teleportPosition = { x = 33013, y = 31880, z = 9 }, teleportDestination = Position(32996, 31922, 10), storage = Storage.Quest.U9_60.BigfootsBurden.Warzone1Access, value = 1 }, + { teleportPosition = { x = 33019, y = 31886, z = 9 }, teleportDestination = Position(33011, 31943, 11), storage = Storage.Quest.U9_60.BigfootsBurden.Warzone2Access, value = 2 }, + { teleportPosition = { x = 33022, y = 31902, z = 9 }, teleportDestination = Position(32989, 31909, 12), storage = Storage.Quest.U9_60.BigfootsBurden.Warzone3Access, value = 3 }, } local warzoneTeleport = MoveEvent() @@ -13,14 +13,14 @@ function warzoneTeleport.onStepIn(creature, item, position, fromPosition) for a = 1, #teleports do if player:getPosition() == Position(teleports[a].teleportPosition) then - if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) < 1440 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are not permitted to enter.") player:teleportTo(fromPosition) position:sendMagicEffect(CONST_ME_TELEPORT) return true end - if player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) < 1 then + if player:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.WarzoneStatus) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You finally have enough renown among the gnomes, ask Gnomission for a mission to fight on the warzones.") player:teleportTo(fromPosition) position:sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/quests/liquid_black/actions_chairteleport.lua b/data-otservbr-global/scripts/quests/liquid_black/actions_chairteleport.lua index 428af0c9f0a..d1e4fdc54b5 100644 --- a/data-otservbr-global/scripts/quests/liquid_black/actions_chairteleport.lua +++ b/data-otservbr-global/scripts/quests/liquid_black/actions_chairteleport.lua @@ -3,10 +3,10 @@ local teleportplayer = { x = 33269, y = 31832, z = 1 } local chairteleport = Action() function chairteleport.onUse(player, item, frompos, item2, topos) - if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == 2 then + if player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) == 2 then player:teleportTo(teleportplayer) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Teleport.") - player:setStorageValue(Storage.LiquidBlackQuest.Visitor, 3) + player:setStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor, 3) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Empty.") end diff --git a/data-otservbr-global/scripts/quests/liquid_black/actions_notescoordinates.lua b/data-otservbr-global/scripts/quests/liquid_black/actions_notescoordinates.lua index c9690fa153f..4dedcdcda5f 100644 --- a/data-otservbr-global/scripts/quests/liquid_black/actions_notescoordinates.lua +++ b/data-otservbr-global/scripts/quests/liquid_black/actions_notescoordinates.lua @@ -1,10 +1,10 @@ local notescoordinates = Action() function notescoordinates.onUse(player, item, frompos, item2, topos) - if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) == -1 then + if player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found notes and coordinates.") player:addItem(14176, 1) - player:setStorageValue(Storage.LiquidBlackQuest.Visitor, 2) + player:setStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor, 2) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Empty.") end diff --git a/data-otservbr-global/scripts/quests/liquid_black/movements_ladder.lua b/data-otservbr-global/scripts/quests/liquid_black/movements_ladder.lua index 9e61a4e0468..7c54eab501d 100644 --- a/data-otservbr-global/scripts/quests/liquid_black/movements_ladder.lua +++ b/data-otservbr-global/scripts/quests/liquid_black/movements_ladder.lua @@ -6,7 +6,7 @@ function ladder.onStepIn(creature, item, toPosition, fromPosition) return true end - if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) >= 4 then + if player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) >= 4 then player:getPosition():sendMagicEffect(CONST_ME_WATERSPLASH) else player:teleportTo(fromPosition, true) diff --git a/data-otservbr-global/scripts/quests/liquid_black/movements_quick_access.lua b/data-otservbr-global/scripts/quests/liquid_black/movements_quick_access.lua index 1fc0ba94cf2..7dd0b509b0e 100644 --- a/data-otservbr-global/scripts/quests/liquid_black/movements_quick_access.lua +++ b/data-otservbr-global/scripts/quests/liquid_black/movements_quick_access.lua @@ -8,7 +8,7 @@ function quickAccess.onStepIn(creature, item, toPosition, fromPosition) return true end - if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) >= 5 then + if player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) >= 4 then player:teleportTo(enterPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else diff --git a/data-otservbr-global/scripts/quests/liquid_black/movements_shortcut.lua b/data-otservbr-global/scripts/quests/liquid_black/movements_shortcut.lua index 68f23aa5c89..6b1a2314810 100644 --- a/data-otservbr-global/scripts/quests/liquid_black/movements_shortcut.lua +++ b/data-otservbr-global/scripts/quests/liquid_black/movements_shortcut.lua @@ -8,8 +8,8 @@ function shortcut.onStepIn(creature, item, toPosition, fromPosition) return true end - if player:getStorageValue(Storage.LiquidBlackQuest.Visitor) >= 4 then - player:setStorageValue(Storage.LiquidBlackQuest.Visitor, 5) + if player:getStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor) >= 4 then + player:setStorageValue(Storage.Quest.U9_4.LiquidBlackQuest.Visitor, 5) player:teleportTo(enterPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission02_defence.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission02_defence.lua index 3e26e05e295..733121e1a83 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission02_defence.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission02_defence.lua @@ -42,7 +42,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission02) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) -- Skip if not was started or finished if missionState == -1 or missionState >= 4 then return true @@ -51,7 +51,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) -- Check if the tile has bound a catapult(s) local hasUsedCatapult = missionTile.catapults ~= nil or false if hasUsedCatapult then - local catapultsState = player:getStorageValue(Storage.TheRookieGuard.Catapults) + local catapultsState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Catapults) for i = 1, #missionTile.catapults do -- Check if the catapult was used hasUsedCatapult = testFlag(catapultsState, missionTile.catapults[i]) @@ -83,18 +83,18 @@ missionGuide:register() local stonePile = Action() function stonePile.onUse(player, item, frompos, item2, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission02) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) -- Skip if not was started if missionState == -1 then return true end if missionState <= 3 then if missionState == 1 then - player:setStorageValue(Storage.TheRookieGuard.Mission02, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02, 2) end -- Gather delay - if player:getStorageValue(Storage.TheRookieGuard.StonePileTimer) - os.time() <= 0 then - player:setStorageValue(Storage.TheRookieGuard.StonePileTimer, os.time() + 2 * 60) + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.StonePileTimer) - os.time() <= 0 then + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.StonePileTimer, os.time() + 2 * 60) player:addItemEx(Game.createItem(12724, 1), true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have to wait a few minutes before you can pick up a new stone.") @@ -120,9 +120,9 @@ local catapults = { local heavyStone = Action() function heavyStone.onUse(player, item, frompos, item2, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission02) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02) if missionState >= 2 and missionState <= 3 and catapults[item2.actionid] then - local catapultsState = player:getStorageValue(Storage.TheRookieGuard.Catapults) + local catapultsState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Catapults) local hasUsedCatapult = testFlag(catapultsState, catapults[item2.actionid]) if not hasUsedCatapult then if missionState == 2 then @@ -130,8 +130,8 @@ function heavyStone.onUse(player, item, frompos, item2, topos) elseif missionState == 3 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You loaded the last stone on the catapults. Time to return to Vascalir.") end - player:setStorageValue(Storage.TheRookieGuard.Mission02, missionState + 1) - player:setStorageValue(Storage.TheRookieGuard.Catapults, catapultsState + catapults[item2.actionid]) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission02, missionState + 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Catapults, catapultsState + catapults[item2.actionid]) player:addExperience(5, true) player:removeItem(12724, 1) else diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission03_rational_request.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission03_rational_request.lua index ee2e814656e..a43ee721dfa 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission03_rational_request.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission03_rational_request.lua @@ -6,10 +6,10 @@ local ratKill = CreatureEvent("RationalRequestRatDeath") function ratKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) onDeathForParty(creature, mostDamageKiller, function(creature, player) - if player:getStorageValue(Storage.TheRookieGuard.Mission03) == 1 then - local counter = player:getStorageValue(Storage.TheRookieGuard.RatKills) + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission03) == 1 then + local counter = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.RatKills) if counter < 5 then - player:setStorageValue(Storage.TheRookieGuard.RatKills, counter + 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.RatKills, counter + 1) end end end) diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission04_home_brewed.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission04_home_brewed.lua index 62646d27d03..6e230883656 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission04_home_brewed.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission04_home_brewed.lua @@ -31,7 +31,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission04) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission04) -- Skip if not was started or finished if missionState == -1 or missionState > 2 then return true diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission05_web_terror.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission05_web_terror.lua index 94ebd98f9e5..06fcf61aafd 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission05_web_terror.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission05_web_terror.lua @@ -33,7 +33,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) if not player then return true end - local state = player:getStorageValue(Storage.TheRookieGuard.Mission05) + local state = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) -- Skip if not was started or finished if state == -1 or state == 3 then return true @@ -70,7 +70,7 @@ function spiderLairHole.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission05) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) if missionState == -1 or missionState >= 3 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have no business down there.") player:teleportTo(fromPosition, true) @@ -86,7 +86,7 @@ spiderLairHole:register() local greasyStone = Action() function greasyStone.onUse(player, item, frompos, item2, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission05) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) -- Skip if not was started if missionState == -1 then return true @@ -100,7 +100,7 @@ function greasyStone.onUse(player, item, frompos, item2, topos) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You rub the strange grease on your body. The spider queen will not be able to smell you for about 2 minutes. Hurry!") Position({ x = 32018, y = 32098, z = 11 }):sendMagicEffect(CONST_ME_TUTORIALARROW) end - player:setStorageValue(Storage.TheRookieGuard.Mission05, 2) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05, 2) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already retrieved some of the spider queen's web. No need to go back down there.") end @@ -119,7 +119,7 @@ function spiderQueenChamberHole.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission05) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) if missionState == 1 then -- Check delayed notifications (message/arrow) if not isTutorialNotificationDelayed(player) then @@ -145,14 +145,14 @@ spiderQueenChamberHole:register() local spiderWeb = Action() function spiderWeb.onUse(player, item, frompos, item2, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission05) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05) -- Skip if not was started if missionState == -1 then return true end if missionState == 2 or missionState == 4 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You retrieved some of the spider queen's web. Hurry back before she can smell you again!") - player:setStorageValue(Storage.TheRookieGuard.Mission05, 3) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05, 3) end return true end diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission06_run_like_wolf.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission06_run_like_wolf.lua index 16fc3171ce2..533ea7801a1 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission06_run_like_wolf.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission06_run_like_wolf.lua @@ -34,7 +34,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission06) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) -- Skip if not was started or finished if missionState == -1 or missionState >= 4 then return true @@ -67,7 +67,7 @@ function warWolfDenHole.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission06) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) if missionState == -1 or missionState >= 4 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have no business down there.") player:teleportTo(fromPosition, true) @@ -106,7 +106,7 @@ function warWolfDenTiles.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission06) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) if missionState == -1 then return true end @@ -121,7 +121,7 @@ function warWolfDenTiles.onStepIn(creature, item, position, fromPosition) end end if missionTile.newState then - player:setStorageValue(Storage.TheRookieGuard.Mission06, missionTile.newState) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06, missionTile.newState) end end return true @@ -136,9 +136,9 @@ warWolfDenTiles:register() local function teleportBack(uid) local player = Player(uid) - if player and player:getStorageValue(Storage.TheRookieGuard.Mission06) == 5 then + if player and player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) == 5 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Oh no... you were too slow and the wolves caught up with you. You may try again.") - player:setStorageValue(Storage.TheRookieGuard.Mission06, 4) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06, 4) player:teleportTo({ x = 32109, y = 32131, z = 11 }) end end @@ -150,10 +150,10 @@ function warWolfDenBoostTiles.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission06) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) if missionState == 4 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "RUUUUUUUUUUUUUUUUUN!") - player:setStorageValue(Storage.TheRookieGuard.Mission06, 5) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06, 5) player:getPosition():sendMagicEffect(CONST_ME_POFF) local conditionHaste = Condition(CONDITION_HASTE) conditionHaste:setParameter(CONDITION_PARAM_TICKS, 25000) @@ -172,17 +172,18 @@ warWolfDenBoostTiles:register() local poacherCorpse = Action() function poacherCorpse.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission06) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) -- Skip if not was started if missionState == -1 then return true end - if missionState == 3 then - local corpseState = player:getStorageValue(Storage.TheRookieGuard.PoacherCorpse) + if missionState == 2 then + local corpseState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.PoacherCorpse) if corpseState == -1 then local reward = Game.createItem(12672, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. reward:getArticle() .. " " .. reward:getName() .. ".") - player:setStorageValue(Storage.TheRookieGuard.PoacherCorpse, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.PoacherCorpse, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06, 3) player:addItemEx(reward, true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. item:getName() .. " is empty.") @@ -199,10 +200,10 @@ poacherCorpse:register() local skinningKnife = Action() function skinningKnife.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission06) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) if missionState == 3 and itemEx.uid == 40045 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You got the war wolf leather - but you hear a scary howl behind you. Time to get out of here - FAST!") - player:setStorageValue(Storage.TheRookieGuard.Mission06, 4) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06, 4) player:addExperience(50, true) player:removeItem(12672, 1) player:addItemEx(Game.createItem(12740, 1), true, CONST_SLOT_WHEREEVER) @@ -218,16 +219,16 @@ skinningKnife:register() local warWolfDenChest = Action() function warWolfDenChest.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission06) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission06) -- Skip if not was started if missionState == -1 then return true end - local chestState = player:getStorageValue(Storage.TheRookieGuard.WarWolfDenChest) + local chestState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.WarWolfDenChest) if chestState == -1 then local reward = Game.createItem(7876, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. reward:getArticle() .. " " .. reward:getName() .. ".") - player:setStorageValue(Storage.TheRookieGuard.WarWolfDenChest, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.WarWolfDenChest, 1) player:addItemEx(reward, true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. item:getName() .. " is empty.") diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission07_attack.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission07_attack.lua index 893691e7392..9116f2b4444 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission07_attack.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission07_attack.lua @@ -27,13 +27,13 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission07) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) -- Skip if not was started or finished if missionState == -1 or missionState == 2 then return true end local missionTile = missionTiles[item.actionid] - local libraryChestState = player:getStorageValue(Storage.TheRookieGuard.LibraryChest) + local libraryChestState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryChest) -- Check if the tile is active if missionState == 1 and libraryChestState == -1 then -- Check delayed notifications (message/arrow) @@ -61,7 +61,7 @@ function libraryVaultSteps.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission07) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) -- Skip if not was started or finished if missionState == -1 or missionState == 2 then return true @@ -118,7 +118,7 @@ end local destroyFieldRune = Action() function destroyFieldRune.onUse(player, item, frompos, item2, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission07) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) if missionState == 1 and item2.itemid == 12743 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Fire in this stadium can be crossed without taking damage. Open the chest and get out of here!") item2:getPosition():sendMagicEffect(CONST_ME_POFF) @@ -136,17 +136,17 @@ destroyFieldRune:register() local treasureChest = Action() function treasureChest.onUse(player, item, frompos, item2, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission07) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission07) -- Skip if not was started if missionState == -1 then return true end if missionState == 1 then - local libraryChestState = player:getStorageValue(Storage.TheRookieGuard.LibraryChest) + local libraryChestState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryChest) if libraryChestState == -1 then local reward = Game.createItem(12675, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. reward:getArticle() .. " " .. reward:getName() .. ".") - player:setStorageValue(Storage.TheRookieGuard.LibraryChest, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.LibraryChest, 1) player:addItemEx(reward, true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. item:getName() .. " is empty.") diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission09_rock_troll.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission09_rock_troll.lua index 7431dab83d7..2c117c9c4ac 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission09_rock_troll.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission09_rock_troll.lua @@ -33,7 +33,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission09) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) -- Skip if not was started or finished if missionState == -1 or missionState > 7 then return true @@ -49,7 +49,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) end end if missionTile.newState then - player:setStorageValue(Storage.TheRookieGuard.Mission09, missionTile.newState) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09, missionTile.newState) end end return true @@ -69,7 +69,7 @@ function tunnelHole.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission09) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) if missionState == -1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have no business down there.") player:teleportTo(fromPosition, true) @@ -104,19 +104,19 @@ local chests = { local trunkChest = Action() function trunkChest.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission09) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) -- Skip if not was started if missionState == -1 then return true end if missionState >= 2 then local chest = chests[item.uid] - local chestsState = player:getStorageValue(Storage.TheRookieGuard.TrollChests) + local chestsState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.TrollChests) local hasOpenedChest = testFlag(chestsState, chest.id) if not hasOpenedChest then local reward = Game.createItem(chest.itemId, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. reward:getArticle() .. " " .. reward:getName() .. ".") - player:setStorageValue(Storage.TheRookieGuard.TrollChests, chestsState + chest.id) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.TrollChests, chestsState + chest.id) player:addItemEx(reward, true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. item:getName() .. " is empty.") @@ -148,10 +148,10 @@ local tunnelPillars = { -- /data/scripts/lib/register_actions.lua (onUsePick) function onUsePickAtTunnelPillar(player, item, fromPosition, itemEx, toPosition) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission09) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09) local pillarId = tunnelPillars[itemEx.uid] if missionState >= 2 and missionState <= 7 and pillarId then - local pillarsState = player:getStorageValue(Storage.TheRookieGuard.TunnelPillars) + local pillarsState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.TunnelPillars) local hasDamagedPillar = testFlag(pillarsState, pillarId) if not hasDamagedPillar then local newMissionState = missionState + 1 @@ -163,8 +163,8 @@ function onUsePickAtTunnelPillar(player, item, fromPosition, itemEx, toPosition) end player:say("", TALKTYPE_MONSTER_SAY, false, player, toPosition) toPosition:sendMagicEffect(CONST_ME_HITAREA) - player:setStorageValue(Storage.TheRookieGuard.Mission09, newMissionState) - player:setStorageValue(Storage.TheRookieGuard.TunnelPillars, pillarsState + pillarId) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission09, newMissionState) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.TunnelPillars, pillarsState + pillarId) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You've already weakened this beam. Better leave it alone now so it won't collapse before you are out of here.") end diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission10_tomb_raiding.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission10_tomb_raiding.lua index a9f54ec1ec0..168adf09f2b 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission10_tomb_raiding.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission10_tomb_raiding.lua @@ -45,13 +45,13 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission10) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) -- Skip if not was started or finished if missionState == -1 or missionState > 1 then return true end local missionTile = missionTiles[item.actionid] - local sarcophagusState = player:getStorageValue(Storage.TheRookieGuard.Sarcophagus) + local sarcophagusState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Sarcophagus) -- Check mission state cases for the tile for i = 1, #missionTile do -- Check if the tile is active @@ -79,17 +79,17 @@ missionGuide:register() local sarcophagus = Action() function sarcophagus.onUse(player, item, frompos, item2, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission10) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) -- Skip if not was started if missionState == -1 then return true end if missionState >= 1 then - local sarcophagusState = player:getStorageValue(Storage.TheRookieGuard.Sarcophagus) + local sarcophagusState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Sarcophagus) if sarcophagusState == -1 then local reward = Game.createItem(12674, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. reward:getArticle() .. " " .. reward:getName() .. ".") - player:setStorageValue(Storage.TheRookieGuard.Sarcophagus, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Sarcophagus, 1) player:addItemEx(reward, true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. item:getName() .. " is empty.") @@ -128,13 +128,13 @@ local chests = { local unholyCryptChests = Action() function unholyCryptChests.onUse(player, item, frompos, item2, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission10) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) -- Skip if not was started if missionState == -1 then return true end local chest = chests[item.uid] - local chestsState = player:getStorageValue(Storage.TheRookieGuard.UnholyCryptChests) + local chestsState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.UnholyCryptChests) local hasOpenedChest = testFlag(chestsState, chest.id) if not hasOpenedChest then local reward = Game.createItem(chest.item.id, chest.item.amount) @@ -143,7 +143,7 @@ function unholyCryptChests.onUse(player, item, frompos, item2, topos) elseif reward:getCount() > 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. reward:getCount() .. " " .. reward:getPluralName() .. ".") end - player:setStorageValue(Storage.TheRookieGuard.UnholyCryptChests, chestsState + chest.id) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.UnholyCryptChests, chestsState + chest.id) player:addItemEx(reward, true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. item:getName() .. " is empty.") diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission11_sweet_poison.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission11_sweet_poison.lua index a51d600bcb2..c91c78274cf 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission11_sweet_poison.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission11_sweet_poison.lua @@ -22,7 +22,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission11) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) -- Skip if not was started or finished if missionState == -1 or missionState > 1 then return true @@ -38,7 +38,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) end end if missionTile.newState then - player:setStorageValue(Storage.TheRookieGuard.Mission11, missionTile.newState) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11, missionTile.newState) end end return true @@ -54,10 +54,10 @@ missionGuide:register() local specialFlask = Action() function specialFlask.onUse(player, item, frompos, item2, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission11) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11) if missionState == 2 and item2.itemid == 5989 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You carefully gather some of the wasp poison. Bring it back to Vascalir.") - player:setStorageValue(Storage.TheRookieGuard.Mission11, 3) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission11, 3) player:removeItem(12785, 1) player:addItemEx(Game.createItem(12784, 1), true, CONST_SLOT_WHEREEVER) end diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/mission12_into_fortress.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/mission12_into_fortress.lua index 9c4a8f55a27..4aede9c97a1 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/mission12_into_fortress.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/mission12_into_fortress.lua @@ -5,7 +5,7 @@ local missionTiles = { { states = { 1 }, extra = { - storage = Storage.TheRookieGuard.AcademyChest, + storage = Storage.Quest.U9_1.TheRookieGuard.AcademyChest, state = -1, }, message = "This chest should contain everything you need to infiltrate the fortress.", @@ -14,7 +14,7 @@ local missionTiles = { { states = { 1 }, extra = { - storage = Storage.TheRookieGuard.AcademyChest, + storage = Storage.Quest.U9_1.TheRookieGuard.AcademyChest, state = 1, }, message = "Those items should be what you need to infiltrate the fortress. Go back near the wasps' nest and walk south from there.", @@ -105,7 +105,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) -- Skip if not was started or finished if missionState == -1 then return true @@ -125,7 +125,7 @@ function missionGuide.onStepIn(creature, item, position, fromPosition) end -- Update state if tile[i].newState then - player:setStorageValue(Storage.TheRookieGuard.Mission12, tile[i].newState) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, tile[i].newState) end -- Walk to relative position if tile[i].walkTo then @@ -162,22 +162,22 @@ local reward = { local treasureChest = Action() function treasureChest.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) -- Skip if not was started if missionState == -1 then return true end if missionState >= 1 and missionState <= 13 then - local chestState = player:getStorageValue(Storage.TheRookieGuard.AcademyChest) - local chestTimer = player:getStorageValue(Storage.TheRookieGuard.AcademyChestTimer) + local chestState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.AcademyChest) + local chestTimer = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.AcademyChestTimer) if chestState == -1 or chestTimer - os.time() <= 0 then local container = Game.createItem(reward.containerId) for i = #reward.itemIds, 1, -1 do container:addItem(reward.itemIds[i], 1) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. container:getArticle() .. " " .. container:getName() .. ".") - player:setStorageValue(Storage.TheRookieGuard.AcademyChest, 1) - player:setStorageValue(Storage.TheRookieGuard.AcademyChestTimer, os.time() + 24 * 60 * 60) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.AcademyChest, 1) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.AcademyChestTimer, os.time() + 24 * 60 * 60) player:addItemEx(container, true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. item:getName() .. " is empty.") @@ -204,11 +204,11 @@ end local rollingPin = Action() function rollingPin.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) if missionState >= 2 and missionState <= 13 and itemEx.itemid == 12790 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You knock the unsuspicious orc unconscious. Use him to disguise yourself as orc!") if missionState == 2 then - player:setStorageValue(Storage.TheRookieGuard.Mission12, 3) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 3) player:addExperience(50, true) end itemEx:transform(12791, 1) @@ -227,11 +227,11 @@ rollingPin:register() local unconsciousOrc = Action() function unconsciousOrc.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) if missionState >= 3 and missionState <= 13 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You look almost like an orc. It won't fool all orcs, but the stupid guardsman in front of the fortress should fall for it.") if missionState == 3 then - player:setStorageValue(Storage.TheRookieGuard.Mission12, 4) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 4) end local conditionOutfit = Condition(CONDITION_OUTFIT) conditionOutfit:setTicks(300000) @@ -272,11 +272,11 @@ end local fleshyBone = Action() function fleshyBone.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) if missionState >= 5 and itemEx.itemid == 12792 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This should be enough distraction for you to sneak into the fortress! Hurry up!") if missionState == 5 then - player:setStorageValue(Storage.TheRookieGuard.Mission12, 6) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 6) player:addExperience(50, true) end local position = itemEx:getPosition() @@ -305,10 +305,10 @@ fleshyBone:register() local poisonFlask = Action() function poisonFlask.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) if missionState == 7 and itemEx.actionid == 40012 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You poisoned Kraknaknork's soup. This should weaken him immensely. Time to find his room.") - player:setStorageValue(Storage.TheRookieGuard.Mission12, 8) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 8) player:removeItem(12784, 1) player:addExperience(50, true) end @@ -323,12 +323,12 @@ poisonFlask:register() local taranturaTrap = Action() function taranturaTrap.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) target = Tile(topos):getTopCreature() if missionState >= 8 and target:getName() == "Furious Orc Berserker" then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The berserker can't catch you anymore - but only for 20 seconds. You need to lure him away from the teleporter!") if missionState == 8 then - player:setStorageValue(Storage.TheRookieGuard.Mission12, 9) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 9) end local conditionSlow = Condition(CONDITION_PARALYZE) conditionSlow:setParameter(CONDITION_PARAM_TICKS, 20000) @@ -350,12 +350,12 @@ function bossLairTeleport.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) -- Skip if not was started or finished if missionState == -1 then return true end - if missionState >= 8 then + if missionState >= 9 then local spectators = Game.getSpectators(position, false, false, 2, 2, 2, 2) for i = 1, #spectators do if not spectators[i]:isPlayer() and spectators[i]:getName() == "Furious Orc Berserker" then @@ -368,7 +368,7 @@ function bossLairTeleport.onStepIn(creature, item, position, fromPosition) end if missionState == 9 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You're entering Kraknaknork's lair.") - player:setStorageValue(Storage.TheRookieGuard.Mission12, 10) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 10) end local toPosition = Position(31980, 32173, 10) player:teleportTo(toPosition, false) @@ -470,7 +470,7 @@ end local missionLevers = Action() function missionLevers.onUse(player, item, position, itemEx, toPosition) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) if missionState >= 10 then local lever = levers[item.uid] local energyBarrier = Tile(energyBarriers[lever.barrier].position):getItemById(12796) @@ -483,7 +483,7 @@ function missionLevers.onUse(player, item, position, itemEx, toPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "An energy barrier somewhere temporarily disappeared.") end if missionState == 10 and lever.newState then - player:setStorageValue(Storage.TheRookieGuard.Mission12, lever.newState) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, lever.newState) end addEvent(energyBarrierRestore, 60000, lever.barrier) else @@ -537,7 +537,7 @@ function enterBossRoomTeleport.onStepIn(creature, item, position, fromPosition) if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) -- Skip if not was started or finished if missionState == -1 then return true @@ -562,7 +562,7 @@ function enterBossRoomTeleport.onStepIn(creature, item, position, fromPosition) boss.uid = bossCreature.uid -- Teleport the player to the room player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You're entering Kraknaknork's throne room. You have 5 minutes to kill him!") - player:setStorageValue(Storage.TheRookieGuard.Mission12, 12) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 12) local roomPosition = Position(31944, 32174, 10) player:teleportTo(roomPosition, false) position:sendMagicEffect(CONST_ME_TELEPORT) @@ -614,7 +614,7 @@ function enterTreasureRoomTeleport.onStepIn(creature, item, position, fromPositi if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) if missionState == 12 then local spectators = Game.getSpectators(Position(boss.roomCenter), false, false, 8, 8, 5, 5) -- Check the boss do not exist @@ -630,7 +630,7 @@ function enterTreasureRoomTeleport.onStepIn(creature, item, position, fromPositi end end -- Teleport the player to the treasure room - player:setStorageValue(Storage.TheRookieGuard.Mission12, 13) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 13) local treasureRoomPosition = Position(31932, 32171, 11) player:teleportTo(treasureRoomPosition, false) position:sendMagicEffect(CONST_ME_TELEPORT) @@ -669,14 +669,14 @@ local chests = { local bossChests = Action() function bossChests.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) -- Skip if not was started if missionState == -1 then return true end if missionState == 13 then local chest = chests[item.uid] - local chestsState = player:getStorageValue(Storage.TheRookieGuard.KraknaknorkChests) + local chestsState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.KraknaknorkChests) local hasUsedChest = testFlag(chestsState, chest.id) if not hasUsedChest then local reward = Game.createItem(chest.item.id, chest.item.amount) @@ -685,7 +685,7 @@ function bossChests.onUse(player, item, frompos, itemEx, topos) elseif reward:getCount() > 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. reward:getCount() .. " " .. reward:getPluralName() .. ".") end - player:setStorageValue(Storage.TheRookieGuard.KraknaknorkChests, chestsState + chest.id) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.KraknaknorkChests, chestsState + chest.id) player:addItemEx(reward, true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. item:getName() .. " is empty.") @@ -706,7 +706,7 @@ function exitTreasureRoomTeleport.onStepIn(creature, item, position, fromPositio if not player then return true end - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission12) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12) if missionState == 13 then local health, maxHealth = player:getHealth(), player:getBaseMaxHealth() -- Heal the player if needed @@ -715,7 +715,7 @@ function exitTreasureRoomTeleport.onStepIn(creature, item, position, fromPositio end -- Teleport the player to the orcland exit player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "With Kraknaknork's final source of energy, you escape the fortress. Time to return to Vascalir.") - player:setStorageValue(Storage.TheRookieGuard.Mission12, 14) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission12, 14) local exitPosition = Position(32016, 32150, 7) player:teleportTo(exitPosition, false) position:sendMagicEffect(CONST_ME_TELEPORT) @@ -762,13 +762,13 @@ local chests = { local orcFortressChests = Action() function orcFortressChests.onUse(player, item, frompos, itemEx, topos) - local missionState = player:getStorageValue(Storage.TheRookieGuard.Mission10) + local missionState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission10) -- Skip if not was started if missionState == -1 then return true end local chest = chests[item.uid] - local chestsState = player:getStorageValue(Storage.TheRookieGuard.OrcFortressChests) + local chestsState = player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.OrcFortressChests) local hasOpenedChest = testFlag(chestsState, chest.id) if not hasOpenedChest then local reward = Game.createItem(chest.item.id, chest.item.amount) @@ -777,7 +777,7 @@ function orcFortressChests.onUse(player, item, frompos, itemEx, topos) elseif reward:getCount() > 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found " .. reward:getCount() .. " " .. reward:getPluralName() .. ".") end - player:setStorageValue(Storage.TheRookieGuard.OrcFortressChests, chestsState + chest.id) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.OrcFortressChests, chestsState + chest.id) player:addItemEx(reward, true, CONST_SLOT_WHEREEVER) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. item:getName() .. " is empty.") diff --git a/data-otservbr-global/scripts/quests/the_rookie_guard/missions.lua b/data-otservbr-global/scripts/quests/the_rookie_guard/missions.lua index 0899d99529d..6568db09c9f 100644 --- a/data-otservbr-global/scripts/quests/the_rookie_guard/missions.lua +++ b/data-otservbr-global/scripts/quests/the_rookie_guard/missions.lua @@ -3,9 +3,9 @@ -- Handle avoid spam (message and arrow) in mission tiles function isTutorialNotificationDelayed(player) -- Check delay - if player:getStorageValue(Storage.TheRookieGuard.TutorialDelay) - os.time() <= 0 then + if player:getStorageValue(Storage.Quest.U9_1.TheRookieGuard.TutorialDelay) - os.time() <= 0 then -- Reset delay - player:setStorageValue(Storage.TheRookieGuard.TutorialDelay, os.time() + 4) + player:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.TutorialDelay, os.time() + 4) return false end return true @@ -17,12 +17,12 @@ local missionTiles = { -- North exit [50312] = { { - mission = Storage.TheRookieGuard.Mission02, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission02, states = { 1, 2, 3, 4 }, message = "This road is the main access of the village. You might want to finish your business here first.", }, { - mission = Storage.TheRookieGuard.Mission03, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission03, states = { 1 }, message = "This road is the main access of the village. You might want to finish your business here first.", }, @@ -30,44 +30,44 @@ local missionTiles = { -- North bridge exit [50319] = { { - mission = Storage.TheRookieGuard.Mission04, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission04, states = { 2 }, message = "Follow the path to the east to find Hyacinth's little house.", arrowPosition = { x = 32096, y = 32169, z = 7 }, }, { - mission = Storage.TheRookieGuard.Mission06, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission06, states = { 2 }, message = "Follow the path east, and when it splits, head north-east to find the wolf forest.", arrowPosition = { x = 32094, y = 32169, z = 7 }, }, { - mission = Storage.TheRookieGuard.Mission09, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission09, states = { 1 }, message = "Follow the path to the north past the hill to reach the troll caves.", arrowPosition = { x = 32091, y = 32166, z = 7 }, }, { - mission = Storage.TheRookieGuard.Mission10, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission10, states = { 1 }, extra = { - storage = Storage.TheRookieGuard.Sarcophagus, + storage = Storage.Quest.U9_1.TheRookieGuard.Sarcophagus, state = -1, }, message = "Follow the way to the east and go south to reach the graveyard.", arrowPosition = { x = 32095, y = 32169, z = 7 }, }, { - mission = Storage.TheRookieGuard.Mission11, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission11, states = { 1 }, message = "To reach the wasps' nests follow the path to the north and cross the bridge to the west as if you wanted to reach the spiders.", arrowPosition = { x = 32090, y = 32165, z = 7 }, }, { - mission = Storage.TheRookieGuard.Mission12, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission12, states = { 2 }, extra = { - storage = Storage.TheRookieGuard.AcademyChest, + storage = Storage.Quest.U9_1.TheRookieGuard.AcademyChest, state = 1, }, message = "Follow the path to the north, cross the bridge to the south and walk west to reach the orc fortress.", @@ -76,15 +76,15 @@ local missionTiles = { }, [50321] = { { - mission = Storage.TheRookieGuard.Mission04, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission04, states = { 2 }, message = "This is not the way to Hyacinth. Stay on the path a little more to the south to find Hyacinth's little house.", }, { - mission = Storage.TheRookieGuard.Mission10, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission10, states = { 1 }, extra = { - storage = Storage.TheRookieGuard.Sarcophagus, + storage = Storage.Quest.U9_1.TheRookieGuard.Sarcophagus, state = -1, }, message = "This is not the way to the crypt. Go south to reach the graveyard.", @@ -93,12 +93,12 @@ local missionTiles = { -- Outer east [50323] = { { - mission = Storage.TheRookieGuard.Mission05, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission05, states = { 1 }, message = "This is not the way to the tarantula's lair. Head northwest and go up the little ramp.", }, { - mission = Storage.TheRookieGuard.Mission09, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission09, states = { 1 }, message = "This is not the way to the troll caves. Follow the path to the north past the hill to reach them.", arrowPosition = { x = 32091, y = 32166, z = 7 }, @@ -107,13 +107,13 @@ local missionTiles = { -- North-west drawbridge [50325] = { { - mission = Storage.TheRookieGuard.Mission05, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission05, states = { 1 }, message = "Walk to the north and down the stairs to reach the tarantula's lair.", arrowPosition = { x = 32069, y = 32145, z = 6 }, }, { - mission = Storage.TheRookieGuard.Mission11, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission11, states = { 1 }, message = "Take the southern stairs down the bridge to go to the wasps' lair.", arrowPosition = { x = 32068, y = 32149, z = 6 }, @@ -122,26 +122,26 @@ local missionTiles = { -- Academy entrance [50335] = { { - mission = Storage.TheRookieGuard.Mission07, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission07, states = { 1 }, extra = { - storage = Storage.TheRookieGuard.LibraryChest, + storage = Storage.Quest.U9_1.TheRookieGuard.LibraryChest, state = -1, }, message = "The library vault is below the academy. Go north and head down several stairs until you find a quest door.", arrowPosition = { x = 32097, y = 32197, z = 7 }, }, { - mission = Storage.TheRookieGuard.Mission08, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission08, states = { 1 }, message = "The bank is below the academy. Go north and head down the stairs and to the right.", arrowPosition = { x = 32097, y = 32197, z = 7 }, }, { - mission = Storage.TheRookieGuard.Mission12, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission12, states = { 1 }, extra = { - storage = Storage.TheRookieGuard.AcademyChest, + storage = Storage.Quest.U9_1.TheRookieGuard.AcademyChest, state = -1, }, message = "You don't have the bag with the items yet. Open the door in the basement of the academy to the left of Paulie to get them!", @@ -151,17 +151,17 @@ local missionTiles = { -- Academy downstairs [50336] = { { - mission = Storage.TheRookieGuard.Mission07, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission07, states = { 1 }, extra = { - storage = Storage.TheRookieGuard.LibraryChest, + storage = Storage.Quest.U9_1.TheRookieGuard.LibraryChest, state = -1, }, message = "Head through the northern door and follow the hallways to find the library vault.", arrowPosition = { x = 32095, y = 32188, z = 8 }, }, { - mission = Storage.TheRookieGuard.Mission08, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission08, states = { 1 }, message = "Go to the right to find the bank and talk to Paulie.", arrowPosition = { x = 32100, y = 32191, z = 8 }, @@ -170,16 +170,16 @@ local missionTiles = { -- North-west drawbridge south downstairs [50351] = { { - mission = Storage.TheRookieGuard.Mission11, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission11, states = { 1 }, message = "Follow the path to the west to find the wasps' lair.", arrowPosition = { x = 32063, y = 32159, z = 7 }, }, { - mission = Storage.TheRookieGuard.Mission12, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission12, states = { 2 }, extra = { - storage = Storage.TheRookieGuard.AcademyChest, + storage = Storage.Quest.U9_1.TheRookieGuard.AcademyChest, state = 1, }, message = "Follow the path to the west to reach the orc fortress.", @@ -189,16 +189,16 @@ local missionTiles = { -- Orc land entrance [50352] = { { - mission = Storage.TheRookieGuard.Mission11, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission11, states = { 1 }, message = "This is not the way to the wasps' lair. Choose the northern path to reach it.", arrowPosition = { x = 32003, y = 32148, z = 7 }, }, { - mission = Storage.TheRookieGuard.Mission12, + mission = Storage.Quest.U9_1.TheRookieGuard.Mission12, states = { 2 }, extra = { - storage = Storage.TheRookieGuard.AcademyChest, + storage = Storage.Quest.U9_1.TheRookieGuard.AcademyChest, state = 1, }, message = "You're entering orcland.", diff --git a/data-otservbr-global/scripts/spells/monster/spider_queen_wrap.lua b/data-otservbr-global/scripts/spells/monster/spider_queen_wrap.lua index 475758fcd27..b0621abdcc3 100644 --- a/data-otservbr-global/scripts/spells/monster/spider_queen_wrap.lua +++ b/data-otservbr-global/scripts/spells/monster/spider_queen_wrap.lua @@ -26,7 +26,7 @@ function spell.onCastSpell(creature, var) if combat:execute(creature, var) then target:addCondition(conditionOutfit) target:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The spider queen caught you in her net and paralysed you!") - target:setStorageValue(Storage.TheRookieGuard.Mission05, 4) + target:setStorageValue(Storage.Quest.U9_1.TheRookieGuard.Mission05, 4) addEvent(moveToSpiderNest, 4500, target:getId()) return true end diff --git a/data-otservbr-global/startup/tables/chest.lua b/data-otservbr-global/startup/tables/chest.lua index 6c2033edb64..d4b91c57c93 100644 --- a/data-otservbr-global/startup/tables/chest.lua +++ b/data-otservbr-global/startup/tables/chest.lua @@ -2555,6 +2555,15 @@ ChestUnique = { weight = 43.00, storage = Storage.Quest.U8_6.WrathOfTheEmperor.ChestItems, }, + -- Rookguard + -- 05 Brown Mushrooms + [6301] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32138, y = 32171, z = 3 }, + reward = { { 3725, 5 } }, + questName = "Rookguard05BrownMushrooms", + }, -- Reward of others scrips files (varied rewards) -- The First dragon Quest -- Treasure chests (data\scripts\actions\quests\first_dragon\treasure_chests.lua) diff --git a/data-otservbr-global/startup/tables/door_quest.lua b/data-otservbr-global/startup/tables/door_quest.lua index de2e9854342..cf47a12bfe5 100644 --- a/data-otservbr-global/startup/tables/door_quest.lua +++ b/data-otservbr-global/startup/tables/door_quest.lua @@ -193,7 +193,7 @@ QuestDoorAction = { }, }, -- Bigfoot burden quest - [Storage.BigfootBurden.DoorGoldenFruits] = { + [Storage.Quest.U9_60.BigfootsBurden.DoorGoldenFruits] = { itemId = false, itemPos = { { x = 32822, y = 31745, z = 10 } }, }, @@ -702,19 +702,19 @@ QuestDoorAction = { -- }, -- The Rookie Guard Quest - Mission 07: Attack! -- The library vault door - [Storage.TheRookieGuard.LibraryDoor] = { + [Storage.Quest.U9_1.TheRookieGuard.LibraryDoor] = { itemId = false, itemPos = { { x = 32090, y = 32156, z = 9 } }, }, -- The Rookie Guard Quest - Mission 10: Tomb Raiding -- The unholy crypt door - [Storage.TheRookieGuard.UnholyCryptDoor] = { + [Storage.Quest.U9_1.TheRookieGuard.UnholyCryptDoor] = { itemId = false, itemPos = { { x = 32147, y = 32186, z = 9 } }, }, -- The Rookie Guard Quest - Mission 12: Into The Fortress -- Lower academy floor door - [Storage.TheRookieGuard.AcademyDoor] = { + [Storage.Quest.U9_1.TheRookieGuard.AcademyDoor] = { itemId = false, itemPos = { { x = 32109, y = 32189, z = 8 } }, }, diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index 258708419e1..a2fb8bc0de6 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -121,24 +121,24 @@ function Player.checkGnomeRank(self) return true end - local points = self:getStorageValue(Storage.BigfootBurden.Rank) - local questProgress = self:getStorageValue(Storage.BigfootBurden.QuestLine) + local points = self:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.Rank) + local questProgress = self:getStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine) if points >= 30 and points < 120 then if questProgress <= 25 then - self:setStorageValue(Storage.BigfootBurden.QuestLine, 26) + self:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 26) self:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) self:addAchievement("Gnome Little Helper") end elseif points >= 120 and points < 480 then if questProgress <= 26 then - self:setStorageValue(Storage.BigfootBurden.QuestLine, 27) + self:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 27) self:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) self:addAchievement("Gnome Little Helper") self:addAchievement("Gnome Friend") end elseif points >= 480 and points < 1440 then if questProgress <= 27 then - self:setStorageValue(Storage.BigfootBurden.QuestLine, 28) + self:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 28) self:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) self:addAchievement("Gnome Little Helper") self:addAchievement("Gnome Friend") @@ -146,7 +146,7 @@ function Player.checkGnomeRank(self) end elseif points >= 1440 then if questProgress <= 29 then - self:setStorageValue(Storage.BigfootBurden.QuestLine, 30) + self:setStorageValue(Storage.Quest.U9_60.BigfootsBurden.QuestLine, 30) self:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) self:addAchievement("Gnome Little Helper") self:addAchievement("Gnome Friend")