diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index a35dcb15dea..042897f9369 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -2157,6 +2157,7 @@ if not Quests then states = { [1] = "Collect a legion helmet, 100 chicken feathers and 50 honeycombs and bring them to either \z Hanna or Norma to have them make a feather hat addon for you.", + [2] = "You got the Citizen Hat Addon!", }, }, [4] = { @@ -5641,9 +5642,9 @@ if not Quests then startValue = 1, endValue = 3, states = { - [1] = "Mr Morris tasked you to find an ancient amulet that was lost somewhare on Dawnport - probably next to a corpse somewhare.", - [2] = "Come back to Mr Morris", - [3] = "Mr Morris thanks for the help", + [1] = "Mr Morris tasked you to find an ancient amulet that was lost somewhere on Dawnport - probably next to a corpse somewhere.", + [2] = "Come back to Mr Morris.", + [3] = "Mr Morris thanks for you the help.", }, }, [3] = { @@ -5653,8 +5654,8 @@ if not Quests then startValue = 1, endValue = 2, states = { - [1] = "Mr Morris urged you fo find a log book that was stolen by trolls.", - [2] = "Mr Morris thanks for the help", + [1] = "Mr Morris urged you to find a log book that was stolen by trolls.", + [2] = "Mr Morris thanks you for the help.", }, }, [4] = { @@ -5664,9 +5665,9 @@ if not Quests then startValue = 1, endValue = 3, states = { - [1] = "Mr Morris needs the rae Dawnfire herb harvested and brought to hin. It grows on grey sand only, he said.", - [2] = "Come back to Mr Morris", - [3] = "Mr Morris thanks for the help", + [1] = "Mr Morris needs the rare Dawnfire herb harvested and brought to him. It grows on gray sand only, he said.", + [2] = "Come back to Mr Morris.", + [3] = "Mr Morris thanks you for the help.", }, }, [5] = { @@ -5677,40 +5678,40 @@ if not Quests then endValue = 5, states = { [1] = "The key to the adventurer's dormitory has disappeared. Maybe you can find it. Ask around to find out who was the last to have seen it.", - [2] = "use the fishing rod in the nearby lake to fish old nasty", + [2] = "Use the fishing rod in the nearby lake to fish Old Nasty.", [3] = "Come back to Woblin with Old Nasty", - [4] = "Come back to Mr Morris with key 0010", + [4] = "Come back to Mr Morris with Key 0010", [5] = "Mr Morris thanks for the help", }, }, [6] = { - name = "Task: Mountain Trolls", - storageId = 65062, + name = "Task: A Toll on Trolls", + storageId = Storage.Quest.U10_55.Dawnport.MorrisTrollCount, missionId = 10394, startValue = 0, endValue = 20, description = function(player) - return string.format("You already hunted %d/20 Mountain Trolls.", (math.max(player:getStorageValue(65062), 0))) + return string.format("You already hunted %d/20 Mountain Trolls.", (math.max(player:getStorageValue(Storage.Quest.U10_55.Dawnport.MorrisTrollCount), 0))) end, }, [7] = { - name = "Task: Muglex Clan Footman", - storageId = 65061, + name = "Task: The Goblin Slayer", + storageId = Storage.Quest.U10_55.Dawnport.MorrisGoblinCount, missionId = 10395, startValue = 0, endValue = 20, description = function(player) - return string.format("You already hunted %d/20 Muglex Clan Footman.", (math.max(player:getStorageValue(65061), 0))) + return string.format("You already hunted %d/20 Muglex Clan Footman.", (math.max(player:getStorageValue(Storage.Quest.U10_55.Dawnport.MorrisGoblinCount), 0))) end, }, [8] = { - name = "Task: Minotaur Bruisers", - storageId = 65060, + name = "Task: Plus Minos a Few", + storageId = Storage.Quest.U10_55.Dawnport.MorrisMinosCount, missionId = 10396, startValue = 0, endValue = 20, description = function(player) - return string.format("You already hunted %d/20 Minotaurs Bruisers.", (math.max(player:getStorageValue(65060), 0))) + return string.format("You already hunted %d/20 Minotaurs Bruisers.", (math.max(player:getStorageValue(Storage.Quest.U10_55.Dawnport.MorrisMinosCount), 0))) end, }, }, @@ -5746,16 +5747,17 @@ if not Quests then }, [3] = { name = "Mission 03: A Rational Request", - storageId = Storage.TheRookieGuard.Mission03, + storageId = Storage.TheRookieGuard.RatKills, missionId = 10399, - startValue = 1, - endValue = 2, - states = { - [1] = function(player) - return string.format("Vascalir sent you to the Rookgaard sewers to kill 5 rats. You have already killed %d/5. Return to Vascalir once you're done.", player:getStorageValue(Storage.TheRookieGuard.RatKills)) - end, - [2] = "Vascalir was pleased with your hunting efforts. You've proven that you are a skilled hunter, ready for the task at hand.", - }, + startValue = 0, + endValue = 5, + description = function(player) + 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)) + ) + end, }, [4] = { name = "Mission 04: Home-Brewed", @@ -6510,5 +6512,20 @@ if not Quests then }, }, }, + [49] = { + name = "The Outlaw Camp", + startStorageId = Storage.QuestChests.OutlawCamp, + startStorageValue = 1, + missions = { + [1] = { + name = "Outlaw Treasure", + storageId = Storage.QuestChests.OutlawCamp, + missionId = 10451, + startValue = 1, + endValue = 1, + description = "You made your way through the Outlaw Camp and found the hidden treasure of the bandits.", + }, + }, + }, } end diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 2b8d9a7783d..98aa057f9ca 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -66,8 +66,6 @@ Reserved player action storage key ranges (const.h) [4502] = key 4502 [4503] = key 4503 [4600] = key 4600 - [4601] = key 4601 - [4603] = key 4603 [5000] = key 5000 [5002] = key 5002 [5010] = key 5010 @@ -81,13 +79,11 @@ Storage = { -- General storages Dragonfetish = 30003, EdronRopeQuest = 30004, - GhostShipQuest = 30005, OrcKingGreeting = 30006, MarkwinGreeting = 30007, -- EmoteSpells Storage cannot be changed, it is set in source code EmoteSpells = 30008, WagonTicket = 30009, - BloodHerbQuest = 30010, FirstMageWeapon = 30011, ToOutfoxAFoxQuest = 30012, KawillBlessing = 30014, @@ -128,7 +124,6 @@ Storage = { -- Reserved in Global.Storage.FamiliarSummonEvent60 = 30055 ChayenneKeyTime = 30056, FreeQuests = 30057, - BattleAxeQuest = 30059, ShrineEntrance = 30060, PlayerWeaponReward = 30061, --[[ @@ -1399,17 +1394,12 @@ Storage = { FormorgarMinesHoistSkeleton = 51737, FormorgarMinesHoistChest = 51738, -- Custom Quests, currently not using system.lua (aid 2000) - BlackKnightTreeCrownShield = 51739, - BlackKnightTreeCrownArmor = 51740, - BlackKnightTreeKey = 51741, KosheiAmulet1 = 51742, KosheiAmulet2 = 51743, - SilverBrooch = 51744, FamilyBrooch = 51745, DCQGhoul = 51746, FirewalkerBoots = 51747, DeeperFibulaKey = 51748, - SixRubiesQuest = 51749, ParchmentRoomQuest = 51750, WarzoneReward1 = 51751, WarzoneReward2 = 51752, @@ -1420,16 +1410,11 @@ Storage = { FathersBurdenCrystal = 51757, FathersBurdenSilk = 51758, FathersBurdenCloth = 51759, - OutlawCampKey1 = 51760, - OutlawCampKey2 = 51761, - OutlawCampKey3 = 51762, - DoubletQuest = 51763, - HoneyFlower = 51764, - BananaPalm = 51765, WhisperMoss = 51766, OldParchment = 51767, DragahsSpellbook = 51768, StealFromThieves = 51769, + OutlawCamp = 51770, -- quest log to The Outlaw Camp }, PitsOfInferno = { -- Reserved storage from 52000 - 52019 @@ -1711,9 +1696,17 @@ Storage = { ID3007 = 3007, ID3008 = 3008, ID3012 = 3012, + ID3142 = 3142, + ID3301 = 3301, + ID3302 = 3302, + ID3303 = 3303, + ID3304 = 3304, + ID3520 = 3520, ID3600 = 3600, + ID3610 = 3610, ID3620 = 3620, ID3666 = 3666, + ID3667 = 3667, ID3702 = 3702, ID3800 = 3800, ID3801 = 3801, @@ -1723,6 +1716,8 @@ Storage = { ID3980 = 3980, ID4055 = 4055, ID4502 = 4502, + ID4601 = 4601, + ID4603 = 4603, ID5010 = 5010, ID6010 = 6010, }, @@ -1730,38 +1725,9 @@ Storage = { -- Use the reserved storage keys accordingly KeysUpdate = 40000, PreU6_0 = { -- update pre-6.0 - Reserved Storages 40001 - 40020 - DeeperFibula = { - Rewards = { - TowerShield = 40001, - WarriorHelmet = 40002, - DwarvenRing = 40003, - ElvenAmulet = 40004, - KnightAxe = 40005, - }, - }, OrnamentedShield = { Rewards = { OrnamentedShield = 40006, - TimeRing = 40007, - }, - }, - ShortSword = { - Rewards = { - Book = 40008, - }, - }, - ThaisLighthouse = { - Rewards = { - BattleHammer = 40009, - DarkShield = 40010, - }, - }, - }, - U6_0 = { -- update 6.0 - Reserved Storages 40021 - 40030 - StuddedShield = { - Rewards = { - BananaFree = 40021, - BananaPremium = 40022, }, }, }, @@ -1771,52 +1737,13 @@ Storage = { Cookies = 40031, }, }, - ExplorerBrooch = { - Brooch = 40032, - }, - OrcFortress = { - Rewards = { - KnightAxe = 40033, - KnightArmor = 40034, - FireSword = 40035, - }, - }, - Panpipe = { - Rewards = { - Panpipe = 40036, - }, - }, - }, - U6_2 = { -- update 6.2 - Reserved Storages 40051 - 40070 - Draconia = { - Rewards = { - BagWithWeapons = 40051, - BagWithAmulets = 40052, - }, - }, }, U6_4 = { -- update 6.4 - Reserved Storages 40071 - 40110 - AdornedUHRune = { - Rewards = { - SilverRuneEmblem = 40071, - }, - }, - BarbarianAxe = { - Rewards = { - BarbarianAxe = 40072, - Scimitar = 40073, - }, - }, BerserkerTreasure = { Rewards = { WhitePearls = 40074, }, }, - DarkArmor = { - Rewards = { - Armor = 40075, - }, - }, DemonHelmet = { Rewards = { SteelBoots = 40076, @@ -1824,88 +1751,14 @@ Storage = { DemonShield = 40078, }, }, - DoubleHero = { - Rewards = { - RedGem = 40079, - ClubRing = 40080, - }, - }, - EdronGoblin = { - Rewards = { - SilverAmulet = 40081, - SteelShield = 40082, - }, - }, - FireAxe = { - Rewards = { - Bag = 40083, - FireAxe = 40084, - }, - }, - PoisonDaggers = { - Rewards = { - BackpackReward = 40085, - }, - }, - ShamanTreasure = { - Rewards = { - BlankRunes = 40086, - }, - }, - TrollCave = { - Rewards = { - GarlicNecklace = 40087, - BrassLegs = 40088, - }, - }, - VampireShield = { - Rewards = { - StrangeSymbol = 40089, - DragonLance = 40090, - VampireShield = 40091, - }, - }, - WeddingRing = { - Rewards = { - DragonNecklace = 40092, - WeedingRing = 40093, - }, - }, - }, - U6_5 = { -- update 6.5 - Reserved Storages 40111 - 40120 - AlawarsVault = { - Rewards = { - WhitePearl = 40111, - Broadsword = 40112, - }, - }, }, U7_1 = { -- update 7.1 - Reserved Storages 40121 - 40140 - BlackKnight = { - Rewards = { - CrownArmor = 40121, - CrownShield = 40122, - }, - }, DragonTower = { Rewards = { Backpack1 = 40123, Backpack2 = 40124, }, }, - Ring = { - Rewards = { - TimeRing = 40125, - SwordRing = 40126, - }, - }, - TimeRing = { - Rewards = { - CrystallBall = 40127, - TimeRing = 40128, - ElvenAmulet = 40129, - }, - }, }, U7_2 = { -- update 7.2 - Reserved Storages 40141 - 40200 Behemoth = { @@ -1960,9 +1813,6 @@ Storage = { MadMageRoom = { QuestLine = 10095, APrisoner = 10096, - StarAmulet = 10097, - Hat = 10098, - StoneSkinAmulet = 10099, }, SkullOfRatha = { Bag1 = 10100, @@ -2509,10 +2359,6 @@ Storage = { MorrisMinos = 20014, MorrisMinosCount = 20015, }, - SanctuaryOfTheLizardGod = { - LizardGodTeleport = 20020, - LegionHelmet = 20021, - }, }, U10_70 = { -- update 10.70 - Reserved Storages 44801 - 44950 HeroOfRathleton = {}, diff --git a/data-otservbr-global/lib/quests/killing_in_the_name_of.lua b/data-otservbr-global/lib/quests/killing_in_the_name_of.lua index 154bf6d428d..1e051f20668 100644 --- a/data-otservbr-global/lib/quests/killing_in_the_name_of.lua +++ b/data-otservbr-global/lib/quests/killing_in_the_name_of.lua @@ -28,13 +28,13 @@ tasks = { Extra = { [1] = { killsRequired = 20, - raceName = "Mountain Trolls", + raceName = "Mountain Troll", level = { 1, 9999 }, storage = { 12701, 1 }, norepeatable = true, premium = false, creatures = { - "mountain trolls", + "mountain troll", }, rewards = { { type = "storage", value = { 17524, 1 } }, diff --git a/data-otservbr-global/npc/hanna.lua b/data-otservbr-global/npc/hanna.lua index dfea1547135..025ac04c22c 100644 --- a/data-otservbr-global/npc/hanna.lua +++ b/data-otservbr-global/npc/hanna.lua @@ -65,7 +65,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "addon") or MsgContains(message, "outfit") or MsgContains(message, "hat") then - local addonProgress = player:getStorageValue(Storage.OutfitQuest.Citizen.AddonHat) + local addonProgress = player:getStorageValue(Storage.OutfitQuest.Citizen.MissionHat) if addonProgress < 1 then npcHandler:say("Pretty, isn't it? My friend Amber taught me how to make it, but I could help you with one if you like. What do you say?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -80,8 +80,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then - player:setStorageValue(Storage.OutfitQuest.Ref, math.max(0, player:getStorageValue(Storage.OutfitQuest.Ref)) + 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonHat, 1) + player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 1) npcHandler:say("Okay, here we go, listen closely! I need a few things... a basic hat of course, maybe a legion helmet would do. Then about 100 chicken feathers... and 50 honeycombs as glue. That's it, come back to me once you gathered it!", npc, creature) else @@ -107,9 +106,7 @@ local function creatureSayCallback(npc, creature, type, message) player:addOutfitAddon(136, 2) player:addOutfitAddon(128, 2) - player:setStorageValue(Storage.OutfitQuest.Ref, math.min(0, player:getStorageValue(Storage.OutfitQuest.Ref) - 1)) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 0) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonHat, 2) + player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 2) end else npcHandler:say("Maybe another time.", npc, creature) diff --git a/data-otservbr-global/npc/mr_morris.lua b/data-otservbr-global/npc/mr_morris.lua index 5cb155a88c9..dfcbadd400b 100644 --- a/data-otservbr-global/npc/mr_morris.lua +++ b/data-otservbr-global/npc/mr_morris.lua @@ -118,9 +118,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "herbs") then if player:getStorageValue(Storage.Quest.U10_55.Dawnport.TheRareHerb) < 1 then npcHandler:say( - "One of our ...less fortunate members lost an ancient amulet somewhere on the island, \z - along with his life. If you could retrieve the amulet at least, there's a little reward. \z - Would you go on that errand?", + "Some of those salamanders have crawled into Oressa's herb garden and munched all her Dawnfire herbs. \z + Would you get some fresh herbs?", npc, creature ) @@ -139,7 +138,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "key") then if player:getStorageValue(Storage.Quest.U10_55.Dawnport.TheDormKey) < 1 then npcHandler:say( - "his is an undercover thing - the key to the dormitory has disappeared. \z + "This is an undercover thing - the key to the dormitory has disappeared. \z No one wants to own up who has lost it, at least not to me. Maybe they'll talk to you. \z I'll reward you if you find it. You in?", npc, @@ -147,7 +146,7 @@ local function creatureSayCallback(npc, creature, type, message) ) npcHandler:setTopic(playerId, 4) elseif player:getStorageValue(Storage.Quest.U10_55.Dawnport.TheDormKey) == 4 then - npcHandler:say("Ah, you're here to report about the key - any progress?", npc, creature) + npcHandler:say("Ah, you're here to report about the {key} - any progress?", npc, creature) npcHandler:setTopic(playerId, 5) end elseif MsgContains(message, "yes") then diff --git a/data-otservbr-global/npc/norma.lua b/data-otservbr-global/npc/norma.lua index 9842a07ebee..dc6b1178281 100644 --- a/data-otservbr-global/npc/norma.lua +++ b/data-otservbr-global/npc/norma.lua @@ -78,7 +78,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "addon") or MsgContains(message, "outfit") or MsgContains(message, "hat") then - local addonProgress = player:getStorageValue(Storage.OutfitQuest.Citizen.AddonHat) + local addonProgress = player:getStorageValue(Storage.OutfitQuest.Citizen.MissionHat) if addonProgress < 1 then npcHandler:say("Pretty, isn't it? My friend Amber taught me how to make it, but I could help you with one if you like. What do you say?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -93,8 +93,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then - player:setStorageValue(Storage.OutfitQuest.Ref, math.max(0, player:getStorageValue(Storage.OutfitQuest.Ref)) + 1) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonHat, 1) + player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 1) npcHandler:say("Okay, here we go, listen closely! I need a few things... a basic hat of course, maybe a legion helmet would do. Then about 100 chicken feathers... and 50 honeycombs as glue. That's it, come back to me once you gathered it!", npc, creature) else @@ -120,9 +119,7 @@ local function creatureSayCallback(npc, creature, type, message) player:addOutfitAddon(136, 2) player:addOutfitAddon(128, 2) - player:setStorageValue(Storage.OutfitQuest.Ref, math.min(0, player:getStorageValue(Storage.OutfitQuest.Ref) - 1)) - player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 0) - player:setStorageValue(Storage.OutfitQuest.Citizen.AddonHat, 2) + player:setStorageValue(Storage.OutfitQuest.Citizen.MissionHat, 2) end else npcHandler:say("Maybe another time.", npc, creature) diff --git a/data-otservbr-global/npc/paulie.lua b/data-otservbr-global/npc/paulie.lua index 38c91e2b902..3b099caaa88 100644 --- a/data-otservbr-global/npc/paulie.lua +++ b/data-otservbr-global/npc/paulie.lua @@ -56,6 +56,20 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local count = {} + +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 + 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?") + end + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -64,19 +78,272 @@ local function creatureSayCallback(npc, creature, type, message) return false end - -- Parse bank - npc:parseBank(message, npc, creature, npcHandler) - -- Parse guild bank - npc:parseGuildBank(message, npc, creature, playerId, npcHandler) - -- Normal messages - npc:parseBankMessages(message, npc, creature, npcHandler) + --Help + if MsgContains(message, "bank account") then + npcHandler:say({ + "Every Adventurer has one. \z + The big advantage is that you can access your money in every branch of the World Bank! ...", + "Would you like to know more about the {basic} functions of your bank account, the {advanced} functions, \z + or are you already bored, perhaps?", + }, npc, creature, 10) + npcHandler:setTopic(playerId, 0) + return true + --Balance + elseif MsgContains(message, "balance") then + npcHandler:setTopic(playerId, 0) + if player:getBankBalance() >= 100000000 then + npcHandler:say("I think you must be one of the richest inhabitants in the world! \z + Your account balance is " .. player:getBankBalance() .. " gold.", npc, creature) + return true + elseif player:getBankBalance() >= 10000000 then + npcHandler:say("You have made ten millions and it still grows! Your account balance is \z + " .. player:getBankBalance() .. " gold.", npc, creature) + return true + elseif player:getBankBalance() >= 1000000 then + npcHandler:say("Wow, you have reached the magic number of a million gp!!! \z + Your account balance is " .. player:getBankBalance() .. " gold!", npc, creature) + return true + elseif player:getBankBalance() >= 100000 then + npcHandler:say("You certainly have made a pretty penny. Your account balance is \z + " .. player:getBankBalance() .. " gold.", npc, creature) + return true + else + npcHandler:say("Your account balance is " .. player:getBankBalance() .. " gold.", npc, creature) + return true + end + --Deposit + elseif MsgContains(message, "deposit") then + count[playerId] = player:getMoney() + if count[playerId] < 1 then + npcHandler:say("You do not have enough gold.", npc, creature) + npcHandler:setTopic(playerId, 0) + return false + elseif not isValidMoney(count[playerId]) then + npcHandler:say("Sorry, but you can't deposit that much.", npc, creature) + npcHandler:setTopic(playerId, 0) + return false + end + if MsgContains(message, "all") then + count[playerId] = player:getMoney() + npcHandler:say("Would you really like to deposit " .. count[playerId] .. " gold?", npc, creature) + npcHandler:setTopic(playerId, 2) + return true + else + if string.match(message, "%d+") then + count[playerId] = getMoneyCount(message) + if count[playerId] < 1 then + npcHandler:say("You do not have enough gold.", npc, creature) + npcHandler:setTopic(playerId, 0) + return false + end + npcHandler:say("Would you really like to deposit " .. count[playerId] .. " gold?", npc, creature) + npcHandler:setTopic(playerId, 2) + return true + else + npcHandler:say("Please tell me how much gold it is you would like to deposit.", npc, creature) + npcHandler:setTopic(playerId, 1) + return true + end + end + elseif npcHandler:getTopic(playerId) == 1 then + count[playerId] = getMoneyCount(message) + if isValidMoney(count[playerId]) then + npcHandler:say("Would you really like to deposit " .. count[playerId] .. " gold?", npc, creature) + npcHandler:setTopic(playerId, 2) + return true + else + npcHandler:say("You do not have enough gold.", npc, creature) + npcHandler:setTopic(playerId, 0) + return true + end + elseif npcHandler:getTopic(playerId) == 2 then + if MsgContains(message, "yes") then + if player:getStorageValue(Storage.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) + npcHandler:setTopic(playerId, 0) + return false + end + if player:depositMoney(count[playerId]) then + npcHandler:say("Alright, we have added the amount of " .. count[playerId] .. " gold to your {balance}. \z + You can {withdraw} your money anytime you want to.", npc, creature) + else + npcHandler:say("You do not have enough gold.", npc, creature) + end + elseif MsgContains(message, "no") then + npcHandler:say("As you wish. Is there something else I can do for you?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + return true + --Withdraw + elseif MsgContains(message, "withdraw") then + if string.match(message, "%d+") then + count[playerId] = getMoneyCount(message) + if isValidMoney(count[playerId]) then + npcHandler:say("Are you sure you wish to withdraw " .. count[playerId] .. " gold from your bank account?", npc, creature) + npcHandler:setTopic(playerId, 7) + else + npcHandler:say("There is not enough gold on your account.", npc, creature) + npcHandler:setTopic(playerId, 0) + end + return true + else + npcHandler:say("Please tell me how much gold you would like to withdraw.", npc, creature) + npcHandler:setTopic(playerId, 6) + return true + end + elseif npcHandler:getTopic(playerId) == 6 then + count[playerId] = getMoneyCount(message) + if isValidMoney(count[playerId]) then + npcHandler:say("Are you sure you wish to withdraw " .. count[playerId] .. " gold from your bank account?", npc, creature) + npcHandler:setTopic(playerId, 7) + else + npcHandler:say("There is not enough gold on your account.", npc, creature) + npcHandler:setTopic(playerId, 0) + end + return true + elseif npcHandler:getTopic(playerId) == 7 then + if MsgContains(message, "yes") then + if player:getFreeCapacity() >= getMoneyWeight(count[playerId]) then + if not player:withdrawMoney(count[playerId]) then + npcHandler:say("There is not enough gold on your account.", npc, creature) + else + npcHandler:say("Here you are, " .. count[playerId] .. " gold. \z + Please let me know if there is something else I can do for you.", npc, creature) + end + else + npcHandler:say( + "Whoah, hold on, you have no room in your inventory to carry all those coins. \z + I don't want you to drop it on the floor, maybe come back with a cart!", + npc, + creature + ) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "no") then + npcHandler:say("The customer is king! Come back anytime you want to if you wish to {withdraw} your money.", npc, creature) + npcHandler:setTopic(playerId, 0) + end + return true + --Money exchange + elseif MsgContains(message, "change gold") then + npcHandler:say("How many platinum coins would you like to get?", npc, creature) + npcHandler:setTopic(playerId, 14) + elseif npcHandler:getTopic(playerId) == 14 then + if getMoneyCount(message) < 1 then + npcHandler:say("Sorry, you do not have enough gold coins.", npc, creature) + npcHandler:setTopic(playerId, 0) + else + count[playerId] = getMoneyCount(message) + npcHandler:say("So you would like me to change " .. count[playerId] * 100 .. " of your gold \z + coins into " .. count[playerId] .. " platinum coins?", npc, creature) + npcHandler:setTopic(playerId, 15) + end + elseif npcHandler:getTopic(playerId) == 15 then + if MsgContains(message, "yes") then + if player:removeItem(3031, count[playerId] * 100) then + player:addItem(3035, count[playerId]) + npcHandler:say("Here you are.", npc, creature) + else + npcHandler:say("Sorry, you do not have enough gold coins.", npc, creature) + end + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "change platinum") then + npcHandler:say("Would you like to change your platinum coins into gold or crystal?", npc, creature) + npcHandler:setTopic(playerId, 16) + elseif npcHandler:getTopic(playerId) == 16 then + if MsgContains(message, "gold") then + npcHandler:say("How many platinum coins would you like to change into gold?", npc, creature) + npcHandler:setTopic(playerId, 17) + elseif MsgContains(message, "crystal") then + npcHandler:say("How many crystal coins would you like to get?", npc, creature) + npcHandler:setTopic(playerId, 19) + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + npcHandler:setTopic(playerId, 0) + end + elseif npcHandler:getTopic(playerId) == 17 then + if getMoneyCount(message) < 1 then + npcHandler:say("Sorry, you do not have enough platinum coins.", npc, creature) + npcHandler:setTopic(playerId, 0) + else + count[playerId] = getMoneyCount(message) + npcHandler:say("So you would like me to change " .. count[playerId] .. " of your platinum \z + coins into " .. count[playerId] * 100 .. " gold coins for you?", npc, creature) + npcHandler:setTopic(playerId, 18) + end + elseif npcHandler:getTopic(playerId) == 18 then + if MsgContains(message, "yes") then + if player:removeItem(3035, count[playerId]) then + player:addItem(3031, count[playerId] * 100) + npcHandler:say("Here you are.", npc, creature) + else + npcHandler:say("Sorry, you do not have enough platinum coins.", npc, creature) + end + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + elseif npcHandler:getTopic(playerId) == 19 then + if getMoneyCount(message) < 1 then + npcHandler:say("Sorry, you do not have enough platinum coins.", npc, creature) + npcHandler:setTopic(playerId, 0) + else + count[playerId] = getMoneyCount(message) + npcHandler:say("So you would like me to change " .. count[playerId] * 100 .. " of your platinum coins \z + into " .. count[playerId] .. " crystal coins for you?", npc, creature) + npcHandler:setTopic(playerId, 20) + end + elseif npcHandler:getTopic(playerId) == 20 then + if MsgContains(message, "yes") then + if player:removeItem(3035, count[playerId] * 100) then + player:addItem(3043, count[playerId]) + npcHandler:say("Here you are.", npc, creature) + else + npcHandler:say("Sorry, you do not have enough platinum coins.", npc, creature) + end + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "change crystal") then + npcHandler:say("How many crystal coins would you like to change into platinum?", npc, creature) + npcHandler:setTopic(playerId, 21) + elseif npcHandler:getTopic(playerId) == 21 then + if getMoneyCount(message) < 1 then + npcHandler:say("Sorry, you do not have enough crystal coins.", npc, creature) + npcHandler:setTopic(playerId, 0) + else + count[playerId] = getMoneyCount(message) + npcHandler:say("So you would like me to change " .. count[playerId] .. " of your crystal coins \z + into " .. count[playerId] * 100 .. " platinum coins for you?", npc, creature) + npcHandler:setTopic(playerId, 22) + end + elseif npcHandler:getTopic(playerId) == 22 then + if MsgContains(message, "yes") then + if player:removeItem(3043, count[playerId]) then + player:addItem(3035, count[playerId] * 100) + npcHandler:say("Here you are.", npc, creature) + else + npcHandler:say("Sorry, you do not have enough crystal coins.", npc, creature) + end + else + npcHandler:say("Well, can I help you with something else?", npc, creature) + end + npcHandler:setTopic(playerId, 0) + end return true end -npcHandler:setMessage(MESSAGE_GREET, "Yes? What may I do for you, |PLAYERNAME|? Bank business, perhaps?") +npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setMessage(MESSAGE_FAREWELL, "Have a nice day.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Have a nice day.") -npcHandler:setCallback(CALLBACK_GREET, NpcBankGreetCallback) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/vascalir.lua b/data-otservbr-global/npc/vascalir.lua index 0f07ecaf73d..ef799e65709 100644 --- a/data-otservbr-global/npc/vascalir.lua +++ b/data-otservbr-global/npc/vascalir.lua @@ -218,6 +218,7 @@ local mission2Accept = mission2:addChildKeyword( text = { "Great. We best start by reinforcing our defences. There are four large catapults positioned on roofs high over the village. If you want to fight, you have to build up some muscles. ...", "Go into the barn just a few steps to the north-west of here and down the ladder into the cellar. You'll find a huge stone pile down there. Use it to pick up one of the big stones. ...", + "They are really heavy, so make sure you have lots of space in your inventory. ...", "Carry one stone to at least two of the four catapults located on Norma's roof to the north, this academy and Obi's roof to the south. ...", "Use the stone on the catapult to load it. You can load each catapult only once, so try spotting two different catapults. Have you understood all of that?", }, @@ -279,6 +280,7 @@ local mission3 = keywordHandler:addKeyword({ "yes" }, StdModule.say, { text = { "Ah, that came with confidence. Suited monsters to do some basic fighting would be rats - they actually fight back, but they don't hit that hard. Just make sure you wear your new studded shield and a sword. ...", "You can find rats in the sewers. In case you might think so, this task is not a lame excuse to help us with some rat infestation, we got the rat population quite under control. ...", + "Also please don't come carrying their dead bodies - what adventurers somehow tend to do for some reason. Maybe they think they're cats? I'm going to believe you, promise. ...", "So, back to the topic - please kill 5 rats and then come back to me. Shouldn't be too hard, should it? Just pay attention they don't trap you in a narrow passage and take on one at a time. ...", "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?", }, @@ -301,9 +303,9 @@ mission3:addChildKeyword( { npcHandler = npcHandler, text = { - "Nice. I've marked two rat dungeons on your map. Kill 5 rats and return to me. Smart adventurers try to face one creature at a time - use the environment to your advantage. ...", - "If you should happen to forget how many you have killed in the meantime, simply check your questlog. ...", - "Once you reach level 8, you should leave this island. While it is possible to reach higher levels, this quest is meant to be played up to level 8. ...", + "Nice. I've marked two rat dungeons on your map. Kill 5 rats and return to me. If you should happen to forget how many you have killed in the meantime, simply check your questlog. ...", + "I should also give you a small word of warning - once you reach level 8, you should leave this island. Thus you won't be able to continue this quest once you've reached level 9. ...", + "It's not good to reach level 9 without having chosen a vocation - you'll be weaker than normal. ...", "No need to be scared, just saying you don't need to plan large hunting sessions while helping me with this mission or kill more rats than I've asked you to. So, good hunting!", }, }, @@ -348,7 +350,7 @@ 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.TheRookieGuard.Mission03) == 1 and player:getStorageValue(Storage.TheRookieGuard.RatKills) >= 5 end, function(player) player:setStorageValue(Storage.TheRookieGuard.Mission03, 2) player:setStorageValue(Storage.TheRookieGuard.Mission04, 1) @@ -884,7 +886,7 @@ end) keywordHandler:addKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = { - "You DID kill him indeed! Incredible! This little village can finally live in peace again - and you've grown so strong, too. I'm proud of you, Synanceia Horrida. My work here is done, and yours too. Thank you for all you've done for us. ...", + "You DID kill him indeed! Incredible! This little village can finally live in peace again - and you've grown so strong, too. I'm proud of you, |PLAYERNAME|. My work here is done, and yours too. Thank you for all you've done for us. ...", "Now all that is left for you to do here is to talk to the oracle above the academy and travel to the Isle of Destiny. There, you will determine your future - which I'm sure is a bright one. ...", "What will become of you? A mighty sorcerer? A fierce knight? A skilled paladin? Or a powerful druid? Only you can decide. ...", "Rookgaard will miss you, but the whole world of Tibia is open to you now. Take care, |PLAYERNAME|. It's good to know you.", diff --git a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua index 42fc5bb8ab8..a7e7c41b8e8 100644 --- a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua +++ b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua @@ -15,12 +15,6 @@ local config = { }, storage = Storage.QuestChests.FamilyBrooch, }, - [3002] = { - items = { - { itemId = 3030, count = 6 }, - }, - storage = Storage.QuestChests.SixRubiesQuest, - }, [3018] = { items = { { itemId = 3219 }, @@ -106,50 +100,18 @@ local config = { say = "A batch of documents has been stashed in the shelf. These might be of interest to Zalamon.", effect = CONST_ME_POFF, }, - [3311] = { - items = { - { itemId = 2970, actionId = 3301 }, - }, - storage = Storage.QuestChests.OutlawCampKey1, - }, - [3312] = { - items = { - { itemId = 2969, actionId = 3302 }, - }, - storage = Storage.QuestChests.OutlawCampKey2, - }, - [3313] = { - items = { - { itemId = 2970, actionId = 3303 }, - }, - storage = Storage.QuestChests.OutlawCampKey3, - }, [4010] = { items = { { itemId = 4832 }, }, storage = Storage.TheApeCity.HolyApeHair, }, - [5556] = { - items = { - { itemId = 3357 }, - }, - storage = Storage.GhostShipQuest, - }, [9136] = { items = { { itemId = 2972, actionId = 3980 }, }, storage = Storage.QuestChests.DeeperFibulaKey, }, - [9185] = { - items = { - { itemId = 3017 }, - { itemId = 3030, count = 2 }, - { itemId = 3028, count = 3 }, - }, - storage = Storage.QuestChests.SilverBrooch, - }, [9226] = { items = { { itemId = 3397 }, @@ -195,12 +157,6 @@ local config = { }, storage = Storage.SecretService.RottenTree, }, - [50032] = { - items = { - { itemId = 3734 }, - }, - storage = Storage.BloodHerbQuest, - }, [50112] = { items = { { itemId = 3725, count = 10 }, @@ -221,30 +177,6 @@ local config = { }, storage = 857440, }, - [65202] = { - items = { - { itemId = 2969, actionId = 3610 }, - }, - storage = 857441, - }, - [65204] = { - items = { - { itemId = 3269, count = 1 }, - }, - storage = 857442, - }, - [65205] = { - items = { - { itemId = 3356, count = 1 }, - }, - storage = 857443, - }, - [65206] = { - items = { - { itemId = 3029, count = 4 }, - }, - storage = 857444, - }, [65207] = { items = { { itemId = 3551, count = 1 }, @@ -257,30 +189,12 @@ local config = { }, storage = 857446, }, - [65209] = { - items = { - { itemId = 3054, count = 1 }, - }, - storage = 857447, - }, [65210] = { items = { { itemId = 3147, count = 3 }, }, storage = 857448, }, - [65211] = { - items = { - { itemId = 3028, count = 1 }, - }, - storage = 857449, - }, - [65212] = { - items = { - { itemId = 2969, actionId = 3667 }, - }, - storage = 857450, - }, [14037] = { items = { { @@ -397,12 +311,6 @@ The map shows the original floor plan of this mine. You recognise your position }, storage = Storage.QuestChests.FormorgarMinesHoistSkeleton, }, - [20004] = { - items = { - { itemId = 3266 }, - }, - storage = Storage.BattleAxeQuest, - }, [14041] = { items = { { diff --git a/data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua b/data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua index a692ed8618c..a867a2b1578 100644 --- a/data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua +++ b/data-otservbr-global/scripts/actions/quests/dawnport/legion_helmet.lua @@ -15,9 +15,9 @@ function sacredSnake.onUse(player, item, fromPosition, target, toPosition, isHot for i = 1, #sacrificialPosition do local tile = Tile(sacrificialPosition[i]) if toPosition == sacrificialPosition[i] then - if player:getStorageValue(Storage.Quest.U10_55.SanctuaryOfTheLizardGod.LizardGodTeleport) < 1 then + if not player:kv():scoped("lizard-god-teleport"):get("discovered") then player:removeItem(21469, 1) - player:setStorageValue(Storage.Quest.U10_55.SanctuaryOfTheLizardGod.LizardGodTeleport, 1) + player:kv():scoped("lizard-god-teleport"):set("discovered", true) player:say("The lizard god accepts your offer! You may enter the santuary!", TALKTYPE_MONSTER_SAY, false, player, toPosition) toPosition:sendMagicEffect(CONST_ME_MORTAREA) item:remove(1) diff --git a/data-otservbr-global/scripts/actions/quests/others/desert_dungeon_lever_quest.lua b/data-otservbr-global/scripts/actions/quests/desert_dungeon_quest/desert_dungeon_lever.lua similarity index 99% rename from data-otservbr-global/scripts/actions/quests/others/desert_dungeon_lever_quest.lua rename to data-otservbr-global/scripts/actions/quests/desert_dungeon_quest/desert_dungeon_lever.lua index 1361a521185..a026ed96cd1 100644 --- a/data-otservbr-global/scripts/actions/quests/others/desert_dungeon_lever_quest.lua +++ b/data-otservbr-global/scripts/actions/quests/desert_dungeon_quest/desert_dungeon_lever.lua @@ -78,5 +78,5 @@ function othersDesert.onUse(player, item, fromPosition, target, toPosition, isHo return true end -othersDesert:uid(1912) +othersDesert:uid(30030) othersDesert:register() diff --git a/data-otservbr-global/scripts/actions/quests/devil_helmet/lever.lua b/data-otservbr-global/scripts/actions/quests/mintwallin_quest/devil_helmet_lever.lua similarity index 94% rename from data-otservbr-global/scripts/actions/quests/devil_helmet/lever.lua rename to data-otservbr-global/scripts/actions/quests/mintwallin_quest/devil_helmet_lever.lua index e5e968d5afc..01d3ffeaac7 100644 --- a/data-otservbr-global/scripts/actions/quests/devil_helmet/lever.lua +++ b/data-otservbr-global/scripts/actions/quests/mintwallin_quest/devil_helmet_lever.lua @@ -15,5 +15,5 @@ function devilHelmetLever.onUse(player, item, fromPosition, target, toPosition, return true end -devilHelmetLever:aid(20594) +devilHelmetLever:aid(30008) devilHelmetLever:register() diff --git a/data-otservbr-global/scripts/actions/quests/others/black_knight_quest.lua b/data-otservbr-global/scripts/actions/quests/others/black_knight_quest.lua deleted file mode 100644 index b4f763c8672..00000000000 --- a/data-otservbr-global/scripts/actions/quests/others/black_knight_quest.lua +++ /dev/null @@ -1,15 +0,0 @@ -local othersBlackKnight = Action() -function othersBlackKnight.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.QuestChests.BlackKnightTreeKey) ~= 1 then - local newItem = Game.createItem(2969, 1) - newItem:setActionId(5010) - player:addItemEx(newItem) - player:setStorageValue(Storage.QuestChests.BlackKnightTreeKey, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a silver key.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. ItemType(item.itemid):getName() .. " is empty.") - end -end - -othersBlackKnight:aid(5558) -othersBlackKnight:register() diff --git a/data-otservbr-global/scripts/actions/quests/others/plate_armor_quest.lua b/data-otservbr-global/scripts/actions/quests/others/plate_armor_quest.lua deleted file mode 100644 index 79bc0232397..00000000000 --- a/data-otservbr-global/scripts/actions/quests/others/plate_armor_quest.lua +++ /dev/null @@ -1,13 +0,0 @@ -local othersPlateArmor = Action() -function othersPlateArmor.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.GhostShipQuest) == 1 then - return false - end - - player:setStorageValue(Storage.GhostShipQuest, 1) - player:addItem(3357, 1) - return true -end - -othersPlateArmor:aid(5556) -othersPlateArmor:register() diff --git a/data-otservbr-global/scripts/actions/quests/others/life_ring_lever.lua b/data-otservbr-global/scripts/actions/quests/thais_quest/life_ring_lever.lua similarity index 97% rename from data-otservbr-global/scripts/actions/quests/others/life_ring_lever.lua rename to data-otservbr-global/scripts/actions/quests/thais_quest/life_ring_lever.lua index 60c490b8ddd..61786e84ec3 100644 --- a/data-otservbr-global/scripts/actions/quests/others/life_ring_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/thais_quest/life_ring_lever.lua @@ -33,5 +33,5 @@ function othersLifeRing.onUse(player, item, fromPosition, target, toPosition, is return true end -othersLifeRing:aid(50129) +othersLifeRing:aid(30007) othersLifeRing:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua index b7f7499336b..45527f07f10 100644 --- a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua +++ b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua @@ -19,5 +19,5 @@ function theOutlawOven.onUse(player, item, fromPosition, target, toPosition, isH return true end -theOutlawOven:uid(3400) +theOutlawOven:uid(30031) theOutlawOven:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua index b05c5882e76..43c9918be0b 100644 --- a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua +++ b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua @@ -16,5 +16,5 @@ function theOutlawPower.onUse(player, item, fromPosition, target, toPosition, is return true end -theOutlawPower:uid(3402) +theOutlawPower:uid(30033) theOutlawPower:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua index 3cdd3e766ee..01ab8b3f969 100644 --- a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua +++ b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua @@ -14,5 +14,5 @@ function theOutlawPowerSwitch.onUse(player, item, fromPosition, target, toPositi return true end -theOutlawPowerSwitch:uid(3401) +theOutlawPowerSwitch:uid(30032) theOutlawPowerSwitch:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/the_outlaw_camp_quest.lua b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/the_outlaw_camp_quest.lua new file mode 100644 index 00000000000..bdecd57c01f --- /dev/null +++ b/data-otservbr-global/scripts/actions/quests/the_outlaw_camp/the_outlaw_camp_quest.lua @@ -0,0 +1,33 @@ +-- Bag -> bright sword and red gem +local outlawQuest = Action() + +function outlawQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local bagId = 2853 + local rewardIds = { + { 3295, 1 }, -- bright sword + { 3039, 1 }, -- red gem + } + + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + if not player:canGetReward(rewardId, "outlaw") then + return true + end + end + + local bag = player:addItem(bagId, 1) + if bag then + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + bag:addItem(rewardId, rewardCount) + end + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bag.") + player:questKV("outlaw"):set("completed", true) + player:setStorageValue(Storage.QuestChests.OutlawCamp, 1) + end + + return true +end + +outlawQuest:uid(14091) +outlawQuest:register() diff --git a/data-otservbr-global/scripts/actions/quests/others/triangle_tower_lever.lua b/data-otservbr-global/scripts/actions/quests/triangle_tower_quest/triangle_tower_lever.lua similarity index 95% rename from data-otservbr-global/scripts/actions/quests/others/triangle_tower_lever.lua rename to data-otservbr-global/scripts/actions/quests/triangle_tower_quest/triangle_tower_lever.lua index ec0884d9e0a..2edd6c4626c 100644 --- a/data-otservbr-global/scripts/actions/quests/others/triangle_tower_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/triangle_tower_quest/triangle_tower_lever.lua @@ -15,5 +15,5 @@ function othersTriangle.onUse(player, item, fromPosition, target, toPosition, is return true end -othersTriangle:uid(50023) +othersTriangle:uid(30034) othersTriangle:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/banana_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/banana_quest.lua deleted file mode 100644 index 05e89ebae69..00000000000 --- a/data-otservbr-global/scripts/actions/rookgaard/banana_quest.lua +++ /dev/null @@ -1,15 +0,0 @@ -local bananaQuest = Action() - -function bananaQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.QuestChests.BananaPalm) == 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The banana palm is empty.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a banana.") - player:addItem(3587, 1) - player:setStorageValue(Storage.QuestChests.BananaPalm, 1) - end - return true -end - -bananaQuest:aid(5641) -bananaQuest:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/bearroom_quest_lever.lua b/data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_lever.lua similarity index 100% rename from data-otservbr-global/scripts/actions/rookgaard/bearroom_quest_lever.lua rename to data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_lever.lua diff --git a/data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_stone.lua b/data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_stone.lua new file mode 100644 index 00000000000..ec8457748a8 --- /dev/null +++ b/data-otservbr-global/scripts/actions/rookgaard/bear_room_quest/bear_room_quest_stone.lua @@ -0,0 +1,17 @@ +local bearStone = Action() +function bearStone.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local stonePosition = { x = 32145, y = 32101, z = 11 } + + if item.itemid == 2772 then + Tile(stonePosition):getItemById(1791):remove() + item:transform(2773) + elseif item.itemid == 2773 then + Position(stonePosition):hasCreature({ x = 32145, y = 32102, z = 11 }) + Game.createItem(1791, 1, stonePosition) + item:transform(2772) + end + return true +end + +bearStone:aid(30006) +bearStone:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/doublet_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/doublet_quest.lua deleted file mode 100644 index cb74877614e..00000000000 --- a/data-otservbr-global/scripts/actions/rookgaard/doublet_quest.lua +++ /dev/null @@ -1,15 +0,0 @@ -local doubletQuest = Action() - -function doubletQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.QuestChests.DoubletQuest) == 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The loose board is empty.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a doublet.") - player:addItem(3379, 1) - player:setStorageValue(Storage.QuestChests.DoubletQuest, 1) - end - return true -end - -doubletQuest:aid(5639) -doubletQuest:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/goblin_temple_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/goblin_temple_quest.lua new file mode 100644 index 00000000000..8244cdf3a54 --- /dev/null +++ b/data-otservbr-global/scripts/actions/rookgaard/goblin_temple_quest.lua @@ -0,0 +1,67 @@ +-- Reward = bag -> sandals, 5 small stones, 50 gold coins +local goblintemple1Quest = Action() + +function goblintemple1Quest.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local bagId = 2853 + local rewardIds = { + { 3551, 1 }, + { 1781, 5 }, + { 3031, 50 }, + } + + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + if not player:canGetReward(rewardId, "goblintemple") then + return true + end + end + + local bag = player:addItem(bagId, 1) + if bag then + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + bag:addItem(rewardId, rewardCount) + end + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bag.") + player:questKV("goblintemple"):set("completed", true) + end + + return true +end + +goblintemple1Quest:uid(14049) +goblintemple1Quest:register() + +-- Reward = bag -> pan, 4 snowballs, vial of milk +local goblintemple2Quest = Action() + +function goblintemple2Quest.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local bagId = 2853 + local rewardIds = { + { 3466, 1 }, + { 2992, 4 }, + { 2874, 1 }, + } + + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + if not player:canGetReward(rewardId, "goblintemple2") then + return true + end + end + + local bag = player:addItem(bagId, 1) + if bag then + for _, reward in ipairs(rewardIds) do + local rewardId, rewardCount = reward[1], reward[2] + bag:addItem(rewardId, rewardCount) + end + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bag.") + player:questKV("goblintemple2"):set("completed", true) + end + + return true +end + +goblintemple2Quest:uid(14050) +goblintemple2Quest:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/honey_flower_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/honey_flower_quest.lua deleted file mode 100644 index 8f5b7e08857..00000000000 --- a/data-otservbr-global/scripts/actions/rookgaard/honey_flower_quest.lua +++ /dev/null @@ -1,15 +0,0 @@ -local honeyFlowerQuest = Action() - -function honeyFlowerQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.QuestChests.HoneyFlower) == 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The honeyflower patch is empty.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a honey flower.") - player:addItem(2984, 1) - player:setStorageValue(Storage.QuestChests.HoneyFlower, 1) - end - return true -end - -honeyFlowerQuest:aid(5640) -honeyFlowerQuest:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_door.lua b/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_door.lua new file mode 100644 index 00000000000..1d53962b0c5 --- /dev/null +++ b/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_door.lua @@ -0,0 +1,20 @@ +local doorPosition = Position(32177, 32148, 11) +local leverPosition = Position(32182, 32145, 11) + +local katanaQuestDoor = Action() + +function katanaQuestDoor.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local doorItem = Tile(doorPosition):getItemById(5108) + if doorItem then + doorItem:transform(5107) + doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 22006) + end + local leverItem = Tile(leverPosition):getItemById(2773) + if leverItem then + leverItem:transform(2772) + end + return false +end + +katanaQuestDoor:uid(22006) +katanaQuestDoor:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/katana_quest_lever.lua b/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_lever.lua similarity index 81% rename from data-otservbr-global/scripts/actions/rookgaard/katana_quest_lever.lua rename to data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_lever.lua index 98d0a155417..c628b8e4959 100644 --- a/data-otservbr-global/scripts/actions/rookgaard/katana_quest_lever.lua +++ b/data-otservbr-global/scripts/actions/rookgaard/katana_quest/katana_quest_lever.lua @@ -8,7 +8,7 @@ function katanaQuestLever.onUse(player, item, fromPosition, target, toPosition, local doorItem = Tile(doorPosition):getItemById(5107) if doorItem then doorItem:transform(5108) - doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 1055) + doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 22006) item:transform(2773) end else @@ -17,12 +17,12 @@ function katanaQuestLever.onUse(player, item, fromPosition, target, toPosition, if doorItem then tile:relocateTo(relocatePosition, true) doorItem:transform(5107) - doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 1055) + doorItem:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, 22006) item:transform(2772) end end return true end -katanaQuestLever:uid(1054) +katanaQuestLever:uid(30029) katanaQuestLever:register() diff --git a/data-otservbr-global/scripts/actions/rookgaard/katana_quest_door.lua b/data-otservbr-global/scripts/actions/rookgaard/katana_quest_door.lua deleted file mode 100644 index f620a1733e8..00000000000 --- a/data-otservbr-global/scripts/actions/rookgaard/katana_quest_door.lua +++ /dev/null @@ -1,8 +0,0 @@ -local katanaQuestDoor = Action() - -function katanaQuestDoor.onUse(player, item, fromPosition, target, toPosition, isHotkey) - return false -end - -katanaQuestDoor:uid(1055) -katanaQuestDoor:register() diff --git a/data-otservbr-global/scripts/actions/system/quest_reward_common.lua b/data-otservbr-global/scripts/actions/system/quest_reward_common.lua index 7c79df383e7..a991cdbbcf1 100644 --- a/data-otservbr-global/scripts/actions/system/quest_reward_common.lua +++ b/data-otservbr-global/scripts/actions/system/quest_reward_common.lua @@ -18,6 +18,33 @@ Ferumbras * Frodo ** Noodles ****]], }, + [6112] = { + text = [[ +... the dream master retreated to the world behind the curtains of awareness, I can't reach him, now that the last hall of dreams is lost to the forces of evil. +I sealed Goshnar's grave so no one can enter the pits without knowing our secret. +I will try to retreat to Knightwatch Tower and wait for a dreamer in possession of the key. +So we can travel on one of the dream paths to a saver place to regroup and to plan a counter-attack. +I fear we have to recruit new members and we have only little time left to train them. +I hope Taciror will not waste our last forces in a futile attack on the Ruthless Seven. +Our order has never truly recovered from the losses in our war against Goshnar and his undead hordes. +Now that our leaders and best warriors have died in the attack on the demonic forces, we don't stand a chance against our enemies. +Our only hope is to gather new forces and to recapture the chamber of dreams. +Of course I know the right method to distract Hugo long enough to get past him. +The dream master is important to teach our recruits in the old ways and in the art of dreamwalking. +We need a leader for our cause and we need him badly. Headless we will fail and fall. +It is already uncertain who took the Nightmare Chronicles out of the pits and I have no idea where they are hidden. +They are fighting about power and influence but unity is the key to success. Our whole order is centred about unity. +All our rituals and procedures rooted on unity and sharing, they can't neglect that. +]], + }, + [6183] = { + text = [[ +Looks like the fox is out! +More luck next time! +Signed: +the horned fox +]], + }, } local achievementTable = { @@ -41,7 +68,7 @@ local function playerAddItem(params, item) -- Needs independent verification because it cannot be set as "key" in items.xml -- Because it generate bug in the item description if itemType:isKey() or itemType:getId(21392) then - -- If is key not in container, uses the "isKey = true" variable + -- If is key not in container, uses the "isKey = true" variab keyItem = player:addItem(params.itemid, params.count) keyItem:setActionId(params.storage) end @@ -59,10 +86,16 @@ local function playerAddItem(params, item) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, params.message .. ".") - if params.timer then - player:setStorageValue(params.timer, os.time() + params.time * 3600) + if params.useKV then + player:questKV(params.questName):set("completed", true) + if params.timer then + player:questKV(params.questName):set("params.questName", os.time() + params.time * 3600) -- multiplicação por hora + end else player:setStorageValue(params.storage, 1) + if params.timer then + player:setStorageValue(params.timer, os.time() + params.time * 3600) -- multiplicação por hora + end end return true end @@ -73,7 +106,6 @@ local function playerAddContainerItem(params, item) local reward = params.containerReward local itemType = ItemType(params.itemid) if itemType:isKey() then - -- If is key inside container, uses the "keyAction" variable keyItem = reward:addItem(params.itemid, params.count) if params.storage then keyItem:setActionId(params.action) @@ -92,7 +124,17 @@ local function playerAddContainerItem(params, item) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a " .. getItemName(params.itemBagName) .. ".") - player:setStorageValue(params.storage, 1) + if params.useKV then + player:questKV(params.questName):set("completed", true) + if params.timer then + player:questKV(params.questName):set("params.questName", os.time() + params.time * 3600) -- multiplicação por hora + end + else + player:setStorageValue(params.storage, 1) + if params.timer then + player:setStorageValue(params.timer, os.time() + params.time * 3600) -- multiplicação por hora + end + end return true end @@ -118,20 +160,32 @@ function questReward.onUse(player, item, fromPosition, itemEx, toPosition) end end - if setting.timerStorage then - if player:getStorageValue(setting.timerStorage) > os.time() then + if setting.useKV then + if player:questKV(setting.questName):get("completed") then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") + return true + end + if setting.timerStorage and player:questKV(setting.questName):get("timer") and player:questKV(setting.questName):get("timer") > os.time() then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") + return true + end + else + if player:getStorageValue(setting.storage) >= 1 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") + return true + end + if setting.timerStorage and player:getStorageValue(setting.timerStorage) > os.time() then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") return true end - elseif player:getStorageValue(setting.storage) >= 0 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The " .. getItemName(setting.itemId) .. " is empty.") - return true end + if setting.randomReward then local randomReward = math.random(#setting.randomReward) setting.reward[1][1] = setting.randomReward[randomReward][1] setting.reward[1][2] = setting.randomReward[randomReward][2] end + local container = player:addItem(setting.container) for i = 1, #setting.reward do local itemid = setting.reward[i][1] @@ -152,6 +206,8 @@ function questReward.onUse(player, item, fromPosition, itemEx, toPosition) key = setting.isKey, timer = setting.timerStorage, time = setting.time, + questName = setting.questName, + useKV = setting.useKV, } if count > 1 and ItemType(itemid):isStackable() then @@ -182,6 +238,8 @@ function questReward.onUse(player, item, fromPosition, itemEx, toPosition) action = setting.keyAction, itemBagName = itemBagName, containerReward = itemBag, + questName = setting.questName, + useKV = setting.useKV, } if not playerAddContainerItem(addContainerItemParams, item) then @@ -189,6 +247,7 @@ function questReward.onUse(player, item, fromPosition, itemEx, toPosition) end end end + return true end diff --git a/data-otservbr-global/scripts/game_migrations/20241715984294_quests_storages_to_kv.lua b/data-otservbr-global/scripts/game_migrations/20241715984294_quests_storages_to_kv.lua new file mode 100644 index 00000000000..a6c4dae0547 --- /dev/null +++ b/data-otservbr-global/scripts/game_migrations/20241715984294_quests_storages_to_kv.lua @@ -0,0 +1,81 @@ +local migrationStoragetokv = { + { storageOld = 10061, questName = "behemothquest1" }, -- Storage.Quest.U7_2.Behemoth.Bag + { storageOld = 10062, questName = "behemothquest2" }, -- Storage.Quest.U7_2.Behemoth.GuardianHalberd + { storageOld = 10063, questName = "behemothquest3" }, -- Storage.Quest.U7_2.Behemoth.DemonShield + { storageOld = 10064, questName = "behemothquest4" }, -- Storage.Quest.U7_2.Behemoth.GoldenArmor + { storageOld = 51763, questName = "doublet" }, -- Storage.QuestChests.DoubletQuest + { storageOld = 51764, questName = "honeyflower" }, -- Storage.QuestChests.HoneyFlower + { storageOld = 40125, questName = "ringquest1" }, -- Storage.Quest.U7_1.Ring.Rewards.TimeRing + { storageOld = 40126, questName = "ringquest2" }, -- Storage.Quest.U7_1.Ring.Rewards.SwordRing + { storageOld = 40111, questName = "AlawarsVault1" }, -- Storage.Quest.U6_5.AlawarsVault.Rewards.WhitePearl + { storageOld = 40112, questName = "AlawarsVault2" }, -- Storage.Quest.U6_5.AlawarsVault.Rewards.Broadsword + { storageOld = 40121, questName = "Blackknight1" }, -- Storage.Quest.U7_1.BlackKnight.Rewards.CrownArmor + { storageOld = 40122, questName = "Blackknight2" }, -- Storage.Quest.U7_1.BlackKnight.Rewards.CrownShield + { storageOld = 40127, questName = "timering1" }, -- Storage.Quest.U7_1.TimeRing.Rewards.CrystallBall + { storageOld = 40128, questName = "timering2" }, -- Storage.Quest.U7_1.TimeRing.Rewards.TimeRing + { storageOld = 40129, questName = "timering3" }, -- Storage.Quest.U7_1.TimeRing.Rewards.ElvenAmulet + { storageOld = 30005, questName = "platearmor" }, -- Storage.GhostShipQuest + { storageOld = 51744, questName = "silverbrooch" }, -- Storage.QuestChests.SilverBrooch + { storageOld = 51749, questName = "sixrubies" }, -- Storage.QuestChests.SixRubiesQuest + { storageOld = 20021, questName = "legiondawnport" }, -- Storage.Quest.U10_55.SanctuaryOfTheLizardGod.LegionHelmet + { storageOld = 30059, questName = "battleaxe" }, -- Storage.BattleAxeQuest + { storageOld = 30010, questName = "deeperfibula1" }, -- Storage.BloodHerbQuest + { storageOld = 40001, questName = "deeperfibula2" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.TowerShield + { storageOld = 40002, questName = "deeperfibula3" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.WarriorHelmet + { storageOld = 40003, questName = "deeperfibula4" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.DwarvenRing + { storageOld = 40004, questName = "deeperfibula5" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.ElvenAmulet + { storageOld = 40005, questName = "deeperfibula6" }, -- Storage.Quest.PreU6_0.DeeperFibula.Rewards.KnightAxe + { storageOld = 40008, questName = "shortswordbook" }, -- Storage.Quest.PreU6_0.ShortSword.Rewards.Book + { storageOld = 40009, questName = "lighthouse1" }, -- Storage.Quest.PreU6_0.ThaisLighthouse.Rewards.BattleHammer + { storageOld = 40010, questName = "lighthouse2" }, -- Storage.Quest.PreU6_0.ThaisLighthouse.Rewards.DarkShield + { storageOld = 40021, questName = "bananafree" }, -- Storage.Quest.U6_0.StuddedShield.Rewards.BananaFre + { storageOld = 40022, questName = "bananapremium" }, -- Storage.Quest.U6_0.StuddedShield.Rewards.BananaPremium + { storageOld = 40032, questName = "explorerbrooch" }, -- Storage.Quest.U6_1.ExplorerBrooch.Brooch + { storageOld = 40033, questName = "orcfortress1" }, -- Storage.Quest.U6_1.OrcFortress.Rewards.KnightAxe + { storageOld = 40034, questName = "orcfortress2" }, -- Storage.Quest.U6_1.ExplorerBrooch.KnightArmor + { storageOld = 40035, questName = "orcfortress3" }, -- Storage.Quest.U6_1.ExplorerBrooch.FireSword + { storageOld = 40051, questName = "draconia1" }, -- Storage.Quest.U6_2.Draconia.Rewards.BagWithWeapons + { storageOld = 40052, questName = "draconia2" }, -- Storage.Quest.U6_2.Draconia.Rewards.BagWithAmulets + { storageOld = 40071, questName = "adoreduh" }, -- Storage.Quest.U6_4.AdornedUHRune.Rewards.SilverRuneEmblem + { storageOld = 40072, questName = "barbarianaxe1" }, -- Storage.Quest.U6_4.BarbarianAxe.Rewards.BarbarianAxe + { storageOld = 40073, questName = "barbarianaxe2" }, -- Storage.Quest.U6_4.BarbarianAxe.Rewards.Scimitar + { storageOld = 40075, questName = "darkarmor" }, -- Storage.Quest.U6_4.DarkArmor.Rewards.Armor + { storageOld = 40079, questName = "doublehero1" }, -- Storage.Quest.U6_4.DoubleHero.Rewards.RedGem + { storageOld = 40080, questName = "doublehero2" }, -- Storage.Quest.U6_4.DoubleHero.Rewards.ClubRing + { storageOld = 40081, questName = "edrongoblin1" }, -- Storage.Quest.U6_4.EdronGoblin.Rewards.SilverAmulet + { storageOld = 40082, questName = "edrongoblin2" }, -- Storage.Quest.U6_4.EdronGoblin.Rewards.SteelShield + { storageOld = 40083, questName = "fireaxe1" }, -- Storage.Quest.U6_4.FireAxe.Rewards.Bag + { storageOld = 40084, questName = "fireaxe2" }, -- Storage.Quest.U6_4.FireAxe.Rewards.FireAxe + { storageOld = 40085, questName = "poisondaggers" }, -- Storage.Quest.U6_4.PoisonDaggers.Rewards.BackpackReward + { storageOld = 40086, questName = "shamantreasure" }, -- Storage.Quest.U6_4.ShamanTreasure.Rewards.BlankRunes + { storageOld = 40089, questName = "vampireshield1" }, -- Storage.Quest.U6_4.VampireShield.Rewards.StrangeSymbol + { storageOld = 40090, questName = "vampireshield2" }, -- Storage.Quest.U6_4.VampireShield.Rewards.DragonLance + { storageOld = 40091, questName = "vampireshield3" }, -- Storage.Quest.U6_4.VampireShield.Rewards.VampireShield + { storageOld = 40087, questName = "trollcave1" }, -- Storage.Quest.U6_4.TrollCave.Rewards.GarlicNecklace + { storageOld = 40088, questName = "trollcave2" }, -- Storage.Quest.U6_4.TrollCave.Rewards.BrassLegs + { storageOld = 40092, questName = "weddingring1" }, -- Storage.Quest.U6_4.WeddingRing.Rewards.DragonNecklace + { storageOld = 40093, questName = "weddingring2" }, -- Storage.Quest.U6_4.WeddingRing.Rewards.WeedingRing + { storageOld = 10097, questName = "madmageroom1" }, -- Storage.Quest.U7_24.MadMageRoom.StarAmulet + { storageOld = 10098, questName = "madmageroom2" }, -- Storage.Quest.U7_24.MadMageRoom.Hat + { storageOld = 10099, questName = "madmageroom3" }, -- Storage.Quest.U7_24.MadMageRoom.StoneSkinAmulet + { storageOld = 40007, questName = "ornamentedshield" }, -- Storage.Quest.PreU6_0.OrnamentedShield.Rewards.TimeRing + { storageOld = 40036, questName = "panpipe" }, -- Storage.Quest.U6_1.Panpipe.Rewards.Panpipe +} + +local function migrate(player) + for _, scrollTable in ipairs(migrationStoragetokv) do + local oldStorage = player:getStorageValue(scrollTable.storageOld) + if oldStorage > 0 then + player:questKV(scrollTable.questName):set("completed", true) + player:setStorageValue(scrollTable.storageOld, -1) + end + end +end + +local migration = Migration("20241715984294_quests_storages_to_kv") + +function migration:onExecute() + self:forEachPlayer(migrate) +end + +migration:register() diff --git a/data-otservbr-global/scripts/movements/quests/bright_sword/entrance.lua b/data-otservbr-global/scripts/movements/quests/bright_sword/entrance.lua deleted file mode 100644 index 85447176db6..00000000000 --- a/data-otservbr-global/scripts/movements/quests/bright_sword/entrance.lua +++ /dev/null @@ -1,15 +0,0 @@ -local brightSword = MoveEvent() - -function brightSword.onStepIn(creature, item, position, fromPosition) - local player = creature:getPlayer() - if not player then - return true - end - - player:teleportTo(Position(32619, 32249, 8)) - return true -end - -brightSword:type("stepin") -brightSword:aid(5634) -brightSword:register() diff --git a/data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua b/data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua index 269edf74fd2..6226a5f27ae 100644 --- a/data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua +++ b/data-otservbr-global/scripts/movements/quests/devil_helmet/sewer.lua @@ -19,7 +19,7 @@ function sewer.onStepIn(creature, item, position, fromPosition) end sewer:type("stepin") -sewer:uid(65203) +sewer:uid(25030) sewer:register() sewer = MoveEvent() @@ -41,5 +41,5 @@ function sewer.onStepOut(creature, item, position, fromPosition) end sewer:type("stepout") -sewer:uid(65203) +sewer:uid(25030) sewer:register() diff --git a/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua b/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua index 73b28dc0c57..0ddcff88508 100644 --- a/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua +++ b/data-otservbr-global/scripts/movements/quests/inquisition/entrance.lua @@ -17,8 +17,11 @@ local function hasTouchedOneThrone(player) return false end -local entrance = MoveEvent() +local config = { + { position = { x = 33192, y = 31691, z = 14 }, destination = { x = 33168, y = 31683, z = 15 } }, +} +local entrance = MoveEvent() function entrance.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then @@ -26,11 +29,16 @@ function entrance.onStepIn(creature, item, position, fromPosition) end if hasTouchedOneThrone(player) and player:getLevel() >= 100 and player:getStorageValue(Storage.TheInquisition.Questline) >= 20 then - local destination = Position(33168, 31683, 15) - player:teleportTo(destination) - position:sendMagicEffect(CONST_ME_TELEPORT) - destination:sendMagicEffect(CONST_ME_TELEPORT) - return true + for i = 1, #config do + local cfg = config[i] + if Position(cfg.position.x, cfg.position.y, cfg.position.z) == player:getPosition() then + local destination = Position(cfg.destination.x, cfg.destination.y, cfg.destination.z) + player:teleportTo(destination) + position:sendMagicEffect(CONST_ME_TELEPORT) + destination:sendMagicEffect(CONST_ME_TELEPORT) + return true + end + end end player:teleportTo(fromPosition, true) @@ -40,5 +48,8 @@ function entrance.onStepIn(creature, item, position, fromPosition) end entrance:type("stepin") -entrance:uid(9014) +for i = 1, #config do + entrance:position(Position(config[i].position.x, config[i].position.y, config[i].position.z)) +end + entrance:register() diff --git a/data-otservbr-global/scripts/movements/quests/the_outlaw_camp/entrance.lua b/data-otservbr-global/scripts/movements/quests/the_outlaw_camp/entrance.lua new file mode 100644 index 00000000000..4930ab8cd77 --- /dev/null +++ b/data-otservbr-global/scripts/movements/quests/the_outlaw_camp/entrance.lua @@ -0,0 +1,25 @@ +--outlaw camp quest (bright sword quest) +local config = { + { position = { x = 32619, y = 32248, z = 6 }, destination = { x = 32619, y = 32249, z = 8 } }, +} + +local brightSword = MoveEvent() +function brightSword.onStepIn(creature, item, position, fromPosition) + local player = creature:getPlayer() + if not player then + return false + end + for value in pairs(config) do + if Position(config[value].position) == player:getPosition() then + player:teleportTo(Position(config[value].destination)) + return true + end + end +end + +brightSword:type("stepin") +for value in pairs(config) do + brightSword:position(config[value].position) +end + +brightSword:register() diff --git a/data-otservbr-global/scripts/quests/draconia/action-lever.lua b/data-otservbr-global/scripts/quests/draconia/action-lever.lua index 449eb683461..9165d071dbf 100644 --- a/data-otservbr-global/scripts/quests/draconia/action-lever.lua +++ b/data-otservbr-global/scripts/quests/draconia/action-lever.lua @@ -1,6 +1,23 @@ -local lever = Action() +local lever1 = Action() -function lever.onUse(player, item, fromPosition, target, toPosition, isHotkey) +function lever1.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local position = { x = 32792, y = 31581, z = 7 } + if item.itemid == 2772 then + Tile(position):getItemById(1282):remove() + item:transform(2773) + elseif item.itemid == 2773 then + Game.createItem(1282, 1, position) + item:transform(2772) + end + return true +end + +lever1:uid(30006) +lever1:register() + +local lever2 = Action() + +function lever2.onUse(player, item, fromPosition, target, toPosition, isHotkey) local position = { x = 32790, y = 31594, z = 7 } if item.itemid == 2772 then Tile(position):getItemById(1772):remove() @@ -12,5 +29,5 @@ function lever.onUse(player, item, fromPosition, target, toPosition, isHotkey) return true end -lever:uid(30006) -lever:register() +lever2:uid(30035) +lever2:register() diff --git a/data-otservbr-global/startup/tables/chest.lua b/data-otservbr-global/startup/tables/chest.lua index 228e9ba2976..47151e2befb 100644 --- a/data-otservbr-global/startup/tables/chest.lua +++ b/data-otservbr-global/startup/tables/chest.lua @@ -21,6 +21,16 @@ storage = xxxxx }, + Example using KV: + [xxxx] = { + useKV = true, + itemId = xxxx, + itemPos = {x = xxxxx, y = xxxxx, z = x}, + container = xxxx, (it's for use reward in a container, only put the id of the container here) + reward = {{xxxx, x}}, + questName = "testkv", + } + Note: The "for use of the map" variables are only used to create the action or unique on the map during startup If the reward is an key, do not need to use "keyAction", only set the storage as same action id @@ -58,6 +68,17 @@ ChestAction = { { x = 33053, y = 31020, z = 7 }, }, }, + -- Key 5010 (dead tree black knight quest) + [5002] = { + isKey = true, + itemId = 3634, + itemPos = { + { x = 32813, y = 31964, z = 7 }, + { x = 32800, y = 31959, z = 7 }, + }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID5010, + }, } ChestUnique = { @@ -169,6 +190,94 @@ ChestUnique = { timerStorage = Storage.TheSecretLibrary.FalconBastionChestsTimer.Key0909, time = 24, -- hour }, + -- Bear Room Quest (rookgaard) key 4601 + [5013] = { + isKey = true, + itemId = 2472, + itemPos = { x = 32150, y = 32112, z = 12 }, + reward = { { 2970, 1 } }, + storage = Storage.Quest.Key.ID4601, + }, + -- Katana Quest (rookgaard) key 4603 + [5014] = { + isKey = true, + itemId = 4240, + itemPos = { x = 32176, y = 32132, z = 9 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID4603, + }, + -- Key 3600 + [5015] = { + isKey = true, + itemId = 4285, + itemPos = { x = 32509, y = 32181, z = 13 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3600, + }, + -- Key 3667 + [5016] = { + isKey = true, + itemId = 3204, + itemPos = { x = 32576, y = 32216, z = 15 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3667, + }, + -- Key 3610 + [5017] = { + isKey = true, + itemId = 387, + itemPos = { x = 32589, y = 32100, z = 14 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3610, + }, + -- Key 3520 + [5018] = { + isKey = true, + itemId = 2473, + itemPos = { x = 32376, y = 31802, z = 7 }, + reward = { { 2973, 1 } }, + storage = Storage.Quest.Key.ID3520, + }, + -- Key 3301 (outlaw camp key 1) + [5019] = { + isKey = true, + itemId = 3634, + itemPos = { x = 32617, y = 32250, z = 7 }, + reward = { { 2970, 1 } }, + storage = Storage.Quest.Key.ID3301, + }, + -- Key 3302 (outlaw camp key 2) + [5020] = { + isKey = true, + itemId = 3634, + itemPos = { x = 32609, y = 32244, z = 7 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3302, + }, + -- Key 3303 (outlaw camp key 3) + [5021] = { + isKey = true, + itemId = 3634, + itemPos = { x = 32651, y = 32244, z = 7 }, + reward = { { 2970, 1 } }, + storage = Storage.Quest.Key.ID3303, + }, + -- Key 3304 (outlaw camp key 4) + [5022] = { + isKey = true, + itemId = 2472, + itemPos = { x = 32623, y = 32187, z = 9 }, + reward = { { 2972, 1 } }, + storage = Storage.Quest.Key.ID3304, + }, + -- Key 3008 (Draconia Quest) + [5023] = { + isKey = true, + itemId = 2435, + itemPos = { x = 32800, y = 31582, z = 2 }, + reward = { { 2969, 1 } }, + storage = Storage.Quest.Key.ID3008, + }, -- To add a reward inside a bag, you need to add the variable "container = bagId" before "reward" -- Just duplicate the table and configure correctly, the scripts already register the entire table automatically -- Path: data\scripts\actions\system\quest_reward_common.lua @@ -206,10 +315,11 @@ ChestUnique = { -- Dawnport -- Legion helmet quest (dawnport) [6006] = { + useKV = true, itemId = 4240, itemPos = { x = 32143, y = 31910, z = 8 }, reward = { { 3374, 1 } }, - storage = Storage.Quest.U10_55.SanctuaryOfTheLizardGod.LegionHelmet, + questName = "legiondawnport", }, -- Dawnport quest -- Torn log book @@ -220,153 +330,163 @@ ChestUnique = { storage = Storage.Quest.U10_55.Dawnport.TornLogBook, }, -- Deeper fibula quest - -- Tower shield [6008] = { + useKV = true, itemId = 4024, itemPos = { x = 32239, y = 32471, z = 10 }, - reward = { { 3428, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.TowerShield, + reward = { { 3428, 1 } }, -- Tower shield + questName = "deeperfibula1", }, - -- Warrior helmet [6009] = { + useKV = true, itemId = 4024, itemPos = { x = 32239, y = 32478, z = 10 }, - reward = { { 3369, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.WarriorHelmet, + reward = { { 3369, 1 } }, -- Warrior helmet + questName = "deeperfibula2", }, - -- Dwarven ring [6010] = { + useKV = true, itemId = 4240, itemPos = { x = 32233, y = 32491, z = 10 }, - reward = { { 3097, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.DwarvenRing, + reward = { { 3097, 1 } }, -- Dwarven ring + questName = "deeperfibula3", }, - -- Elven aulet [6011] = { + useKV = true, itemId = 4025, itemPos = { x = 32245, y = 32492, z = 10 }, - reward = { { 3082, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.ElvenAmulet, + reward = { { 3082, 1 } }, -- Elven aulet + questName = "deeperfibula4", }, - -- Knight axe [6012] = { + useKV = true, itemId = 4240, itemPos = { x = 32256, y = 32500, z = 10 }, - reward = { { 3318, 1 } }, - storage = Storage.Quest.PreU6_0.DeeperFibula.Rewards.KnightAxe, + reward = { { 3318, 1 } }, -- Knight axe + questName = "deeperfibula5", }, -- Short sword quest -- Book [6013] = { + useKV = true, itemId = 2472, itemPos = { x = 32171, y = 32197, z = 7 }, reward = { { 2821, 1 } }, - storage = Storage.Quest.PreU6_0.ShortSword.Rewards.Book, + questName = "shortswordbook", }, -- Thais lighthouse quest -- Battle hammer [6014] = { + useKV = true, itemId = 2472, itemPos = { x = 32225, y = 32265, z = 10 }, reward = { { 3305, 1 } }, - storage = Storage.Quest.PreU6_0.ThaisLighthouse.Rewards.BattleHammer, + questName = "lighthouse1", }, -- Dark shield [6015] = { + useKV = true, itemId = 2472, itemPos = { x = 32226, y = 32265, z = 10 }, reward = { { 3421, 1 } }, - storage = Storage.Quest.PreU6_0.ThaisLighthouse.DarkShield, + questName = "lighthouse2", }, -- Studded shield quest (rookgaard) -- Banana free account area [6016] = { + useKV = true, itemId = 3639, itemPos = { x = 32172, y = 32169, z = 7 }, reward = { { 3587, 1 } }, - storage = Storage.Quest.U6_0.StuddedShield.Rewards.BananaFree, + questName = "bananafree", }, -- Banana premium account area [6017] = { + useKV = true, itemId = 3639, itemPos = { x = 31983, y = 32193, z = 5 }, reward = { { 3587, 1 } }, - storage = Storage.Quest.U6_0.StuddedShield.Rewards.BananaPremium, + questName = "bananapremium", }, -- Explorer brooch quest (kazordoon) [6019] = { + useKV = true, itemId = 4240, itemPos = { x = 32636, y = 31873, z = 10 }, reward = { { 4871, 1 } }, - storage = Storage.Quest.U6_1.ExplorerBrooch.Brooch, + questName = "explorerbrooch", }, -- Orc fortress quest - -- Knight axe [6020] = { + useKV = true, itemId = 2469, itemPos = { x = 32980, y = 31727, z = 9 }, - reward = { { 3318, 1 } }, - storage = Storage.Quest.U6_1.OrcFortress.Rewards.KnightAxe, + reward = { { 3318, 1 } }, -- Knight axe + questName = "orcfortress1", }, - -- Knight armor [6021] = { + useKV = true, itemId = 2469, itemPos = { x = 32981, y = 31727, z = 9 }, - reward = { { 3370, 1 } }, - storage = Storage.Quest.U6_1.OrcFortress.Rewards.KnightArmor, + reward = { { 3370, 1 } }, -- Knight armor + questName = "orcfortress2", }, - -- Fire sword [6022] = { + useKV = true, itemId = 2469, itemPos = { x = 32985, y = 31727, z = 9 }, - reward = { { 3280, 1 } }, - storage = Storage.Quest.U6_1.OrcFortress.Rewards.FireSword, + reward = { { 3280, 1 } }, -- Fire sword + questName = "orcfortress3", }, -- Draconia quest [6023] = { + useKV = true, itemId = 2472, itemPos = { x = 32803, y = 31582, z = 2 }, container = 2853, - reward = { { 3284, 1 }, { 3297, 1 } }, + reward = { { 3284, 1 }, { 3297, 1 } }, -- bag with weapons weight = 64, - storage = Storage.Quest.U6_2.Draconia.Rewards.BagWithWeapons, + questName = "draconia1", }, [6024] = { + useKV = true, itemId = 2472, itemPos = { x = 32804, y = 31582, z = 2 }, container = 2853, - reward = { { 3081, 5 }, { 3051, 1 } }, + reward = { { 3081, 5 }, { 3051, 1 } }, -- bag with amulets weight = 15.80, - storage = Storage.Quest.U6_2.Draconia.Rewards.BagWithAmulets, + questName = "draconia2", }, -- Adorned UH rune quest [6025] = { + useKV = true, itemId = 2469, itemPos = { x = 33136, y = 31601, z = 15 }, reward = { { 11603, 1 } }, - storage = Storage.Quest.U6_4.AdornedUHRune.Rewards.SilverRuneEmblem, + questName = "adoreduh", }, -- Barbarian axe quest - -- Barbarian axe [6026] = { + useKV = true, itemId = 2469, itemPos = { x = 33184, y = 31945, z = 11 }, - reward = { { 3317, 1 } }, - storage = Storage.Quest.U6_4.BarbarianAxe.Rewards.BarbarianAxe, + reward = { { 3317, 1 } }, -- Barbarian axe + questName = "barbarianaxe1", }, - -- Scimitar [6027] = { + useKV = true, itemId = 2469, itemPos = { x = 33185, y = 31945, z = 11 }, - reward = { { 3307, 1 } }, - storage = Storage.Quest.U6_4.BarbarianAxe.Rewards.Scimitar, + reward = { { 3307, 1 } }, -- Scimitar + questName = "barbarianaxe1", }, -- Dark armor quest [6028] = { + useKV = true, itemId = 4311, itemPos = { x = 33178, y = 31870, z = 12 }, reward = { { 3383, 1 } }, - storage = Storage.Quest.U6_4.DarkArmor.Rewards.Armor, + questName = "darkarmor", }, -- Demon helmet quest -- Steel boots @@ -391,176 +511,176 @@ ChestUnique = { storage = Storage.Quest.U6_4.DemonHelmet.Rewards.DemonShield, }, -- Double hero quest - -- Red gem [6032] = { + useKV = true, itemId = 2469, itemPos = { x = 33109, y = 31679, z = 13 }, - reward = { { 3039, 1 } }, - storage = Storage.Quest.U6_4.DoubleHero.Rewards.RedGem, + reward = { { 3039, 1 } }, -- Red gem + questName = "doublehero1", }, - -- Club ring [6033] = { + useKV = true, itemId = 2469, itemPos = { x = 33110, y = 31679, z = 13 }, - reward = { { 3093, 1 } }, - storage = Storage.Quest.U6_4.DoubleHero.Rewards.ClubRing, + reward = { { 3093, 1 } }, -- Club ring + questName = "doublehero2", }, -- Edron goblin quest - -- Silver amulet [6034] = { + useKV = true, itemId = 2469, itemPos = { x = 33095, y = 31800, z = 10 }, - reward = { { 3054, 200 } }, - storage = Storage.Quest.U6_4.EdronGoblin.Rewards.SilverAmulet, + reward = { { 3054, 200 } }, -- Silver amulet + questName = "edrongoblin1", }, - -- Steel shield [6035] = { + useKV = true, itemId = 2469, itemPos = { x = 33095, y = 31801, z = 10 }, - reward = { { 3409, 1 } }, - storage = Storage.Quest.U6_4.EdronGoblin.Rewards.SteelShield, + reward = { { 3409, 1 } }, -- Steel shield + questName = "edrongoblin2", }, -- Fire axe quest - -- Fire axe [6036] = { + useKV = true, itemId = 4024, itemPos = { x = 33084, y = 31650, z = 12 }, - reward = { { 3320, 1 } }, - storage = Storage.Quest.U6_4.FireAxe.Rewards.FireAxe, + reward = { { 3320, 1 } }, -- Fire axe + questName = "fireaxe2", }, - -- Ring quest - -- Time ring + -- Ring Quest [6037] = { + useKV = true, itemId = 2469, itemPos = { x = 33131, y = 31624, z = 15 }, - reward = { { 3053, 1 } }, - storage = Storage.Quest.U7_1.Ring.Rewards.TimeRing, + reward = { { 3053, 1 } }, -- Time ring + questName = "ringquest1", }, - -- Sword ring [6038] = { + useKV = true, itemId = 2469, itemPos = { x = 33134, y = 31624, z = 15 }, - reward = { { 3091, 1 } }, - storage = Storage.Quest.U7_1.Ring.Rewards.SwordRing, + reward = { { 3091, 1 } }, -- Sword ring + questName = "ringquest2", }, -- Troll cave quest - -- Garlic necklace [6039] = { + useKV = true, itemId = 2473, itemPos = { x = 33143, y = 31719, z = 10 }, - reward = { { 3083, 150 } }, - storage = Storage.Quest.U6_4.TrollCave.Rewards.GarlicNecklace, + reward = { { 3083, 150 } }, -- Garlic necklace + questName = "trollcave1", }, - -- Brass legs [6040] = { + useKV = true, itemId = 2473, itemPos = { x = 33143, y = 31721, z = 10 }, - reward = { { 3372, 1 } }, - storage = Storage.Quest.U6_4.TrollCave.Rewards.BrassLegs, + reward = { { 3372, 1 } }, -- Brass legs + questName = "trollcave1", }, -- Vampire shield quest - -- Dragon lance [6041] = { + useKV = true, itemId = 2469, itemPos = { x = 33189, y = 31688, z = 14 }, - reward = { { 3302, 1 } }, - storage = Storage.Quest.U6_4.VampireShield.Rewards.DragonLance, + reward = { { 3302, 1 } }, -- Dragon lance + questName = "vampireshield2", }, - -- Vampire shield [6042] = { + useKV = true, itemId = 2469, itemPos = { x = 33195, y = 31688, z = 14 }, - reward = { { 3434, 1 } }, - storage = Storage.Quest.U6_4.VampireShield.Rewards.VampireShield, + reward = { { 3434, 1 } }, -- Vampire shield + questName = "vampireshield3", }, - -- Weeding ring quest - -- Dragon necklace + -- Wedding Ring Quest [6043] = { + useKV = true, itemId = 2469, itemPos = { x = 33158, y = 31621, z = 15 }, - reward = { { 3085, 200 } }, - storage = Storage.Quest.U6_4.WeddingRing.Rewards.DragonNecklace, + reward = { { 3085, 200 } }, -- Dragon necklace + questName = "weddingring1", }, - -- Weeding ring [6044] = { + useKV = true, itemId = 2469, itemPos = { x = 33158, y = 31622, z = 15 }, - reward = { { 3004, 1 } }, - storage = Storage.Quest.U6_4.WeddingRing.Rewards.WeedingRing, + reward = { { 3004, 1 } }, -- Weeding ring + questName = "weddingring2", }, -- Alawars vault quest - -- White pearl [6045] = { + useKV = true, itemId = 2472, itemPos = { x = 32105, y = 31567, z = 9 }, - reward = { { 3026, 3 } }, - storage = Storage.Quest.U6_5.AlawarsVault.Rewards.WhitePearl, + reward = { { 3026, 3 } }, -- White pearl + questName = "AlawarsVault1", }, - -- Broadsword [6046] = { + useKV = true, itemId = 2472, itemPos = { x = 32109, y = 31567, z = 9 }, - reward = { { 3301, 1 } }, - storage = Storage.Quest.U6_5.AlawarsVault.Rewards.Broadsword, + reward = { { 3301, 1 } }, -- Broadsword + questName = "AlawarsVault2", }, -- Black knight quest - -- Crown armor [6047] = { + useKV = true, itemId = 3634, itemPos = { x = 32868, y = 31955, z = 11 }, - reward = { { 3381, 1 } }, - storage = Storage.Quest.U7_1.BlackKnight.Rewards.CrownArmor, + reward = { { 3381, 1 } }, -- Crown armor + questName = "Blackknight1", }, - -- Crown shield [6048] = { + useKV = true, itemId = 3634, itemPos = { x = 32880, y = 31955, z = 11 }, - reward = { { 3419, 1 } }, - storage = Storage.Quest.U7_1.BlackKnight.Rewards.CrownShield, + reward = { { 3419, 1 } }, -- Crown shield + questName = "Blackknight2", }, - -- TIme ring quest - -- Crystal ball + -- Time Ring Quest [6049] = { + useKV = true, itemId = 2472, itemPos = { x = 33038, y = 32171, z = 9 }, - reward = { { 3076, 1 } }, - storage = Storage.Quest.U7_1.TimeRing.Rewards.CrystallBall, + reward = { { 3076, 1 } }, -- Crystal ball + questName = "timering1", }, - -- Time ring [6050] = { + useKV = true, itemId = 2472, itemPos = { x = 33039, y = 32171, z = 9 }, - reward = { { 3053, 1 } }, - storage = Storage.Quest.U7_1.TimeRing.Rewards.TimeRing, + reward = { { 3053, 1 } }, -- Time ring + questName = "timering2", }, - -- Elven amulet [6051] = { + useKV = true, itemId = 2472, itemPos = { x = 33040, y = 32171, z = 9 }, - reward = { { 3082, 1 } }, - storage = Storage.Quest.U7_1.TimeRing.Rewards.ElvenAmulet, + reward = { { 3082, 50 } }, -- Elven amulet + questName = "timering3", }, -- Behemoth quest - -- Guardian halberd [6052] = { + useKV = true, itemId = 2472, itemPos = { x = 33295, y = 31658, z = 13 }, - reward = { { 3315, 1 } }, - storage = Storage.Quest.U7_2.Behemoth.GuardianHalberd, + reward = { { 3315, 1 } }, -- Guardian halberd + questName = "behemothquest2", }, - -- Demon shield [6053] = { + useKV = true, itemId = 2472, itemPos = { x = 33297, y = 31658, z = 13 }, - reward = { { 3420, 1 } }, - storage = Storage.Quest.U7_2.Behemoth.DemonShield, + reward = { { 3420, 1 } }, -- Demon shield + questName = "behemothquest3", }, - -- Golden armor [6054] = { + useKV = true, itemId = 2472, itemPos = { x = 33298, y = 31658, z = 13 }, - reward = { { 3360, 1 } }, - storage = Storage.Quest.U7_2.Behemoth.GoldenArmor, + reward = { { 3360, 1 } }, -- Golden armor + questName = "behemothquest4", }, -- Family brooch quest [6055] = { @@ -623,21 +743,23 @@ ChestUnique = { storage = Storage.Quest.PreU6_0.OrnamentedShield.Rewards.OrnamentedShield, }, [6063] = { + useKV = true, itemId = 2480, itemPos = { x = 32769, y = 32302, z = 10 }, container = 2859, reward = { { 2949, 1 }, { 3059, 1 }, { 3083, 1 }, { 3035, 5 }, { 3053, 1 } }, weight = 44, - storage = Storage.Quest.PreU6_0.OrnamentedShield.Rewards.TimeRing, + questName = "ornamentedshield", }, --[6064] EMPTY [6065] = { + useKV = true, itemId = 2472, itemPos = { x = 32644, y = 32131, z = 8 }, container = 2853, reward = { { 3033, 2 }, { 3050, 1 }, { 2953, 1 } }, weight = 44, - storage = Storage.Quest.U6_1.Panpipe.Rewards.Panpipe, + questName = "panpipe", }, [6066] = { itemId = 2469, @@ -648,34 +770,34 @@ ChestUnique = { storage = Storage.Quest.U6_4.BerserkerTreasure.Rewards.WhitePearls, }, -- Fire axe quest - -- Bag [6067] = { + useKV = true, itemId = 2472, itemPos = { x = 33078, y = 31656, z = 11 }, container = 2853, - reward = { { 3098, 1 }, { 3085, 200 }, { 3028, 7 }, { 3320, 1 } }, + reward = { { 3098, 1 }, { 3085, 200 }, { 3028, 7 }, { 3320, 1 } }, -- Bag (Ring of Healing, Dragon Necklace, 7 Small Diamonds) weight = 27, - storage = Storage.Quest.U6_4.FireAxe.Rewards.Bag, + questName = "fireaxe1", }, -- Poison daggers quest - -- Backpack reward [6068] = { + useKV = true, itemId = 2473, itemPos = { x = 33155, y = 31880, z = 11 }, container = 2854, - reward = { { 3448, 30 }, { 3299, 1 }, { 3299, 1 } }, + reward = { { 3448, 30 }, { 3299, 1 }, { 3299, 1 } }, -- Backpack (2 Poison Daggers, 30 Poison Arrows) weight = 60, - storage = Storage.Quest.U6_4.PoisonDaggers.Rewards.BackpackReward, + questName = "poisondaggers", }, -- Shaman treasure quest - -- Bag with 3 blank runes [6069] = { + useKV = true, itemId = 4024, itemPos = { x = 33127, y = 31885, z = 9 }, container = 2853, - reward = { { 3147, 3 } }, + reward = { { 3147, 3 } }, -- Bag with 3 blank runes weight = 15, - storage = Storage.Quest.U6_4.ShamanTreasure.Rewards.BlankRunes, + questName = "shamantreasure", }, -- Strong potions quest -- Green bag with 5 strong mana potions @@ -688,17 +810,16 @@ ChestUnique = { storage = Storage.Quest.U8_1.StrongPotions.Reward, }, -- Vampire shield quest - -- Bag [6071] = { + useKV = true, itemId = 2469, itemPos = { x = 33188, y = 31682, z = 14 }, container = 2853, - reward = { { 3058, 1 }, { 3027, 1 }, { 3078, 1 } }, + reward = { { 3058, 1 }, { 3027, 1 }, { 3078, 1 } }, -- Bag (Strange Symbol, Black Pearl and Mysterious Fetish) weight = 16, - storage = Storage.Quest.U6_4.VampireShield.Rewards.StrangeSymbol, + questName = "vampireshield1", }, -- [6072] empty - -- Dragon tower quest -- Backpack 1 [6073] = { @@ -721,12 +842,13 @@ ChestUnique = { -- Behemoth quest -- Bag [6075] = { + useKV = true, itemId = 2472, itemPos = { x = 33294, y = 31658, z = 13 }, container = 2853, reward = { { 3028, 3 }, { 3029, 4 }, { 3007, 1 }, { 3052, 1 }, { 3055, 1 } }, weight = 50, - storage = Storage.Quest.U7_2.Behemoth.Bag, + questName = "behemothquest1", }, -- Parchment room quest -- Bag @@ -762,26 +884,26 @@ ChestUnique = { storage = Storage.Quest.U7_24.GiantSmithhammer.GoldCoin, }, -- Mad Mage room quest - -- Star amulet [6080] = { + useKV = true, itemId = 2472, itemPos = { x = 32578, y = 32195, z = 14 }, - reward = { { 3014, 1 } }, - storage = Storage.Quest.U7_24.MadMageRoom.StarAmulet, + reward = { { 3014, 1 } }, -- Star amulet + questName = "madmageroom1", }, - -- Hat of the mad [6081] = { + useKV = true, itemId = 2472, itemPos = { x = 32575, y = 32195, z = 14 }, - reward = { { 3210, 1 } }, - storage = Storage.Quest.U7_24.MadMageRoom.Hat, + reward = { { 3210, 1 } }, -- Hat of the mad + questName = "madmageroom2", }, - -- Stone skin amulet [6082] = { + useKV = true, itemId = 2472, itemPos = { x = 32572, y = 32195, z = 14 }, - reward = { { 3081, 5 } }, - storage = Storage.Quest.U7_24.MadMageRoom.StoneSkinAmulet, + reward = { { 3081, 5 } }, -- Stone skin amulet + questName = "madmageroom3", }, -- Skull of ratha quest -- Bag (white pearl, skull) @@ -998,6 +1120,620 @@ ChestUnique = { timerStorage = Storage.Quest.U11_80.TheSecretLibrary.FalconBastionChestsTimer.UndergroundBastion, time = 24, -- hour }, + -- Blood Herb Quest + [6111] = { + useKV = true, + itemId = 3634, + itemPos = { x = 32769, y = 31968, z = 7 }, + reward = { { 3734, 1 } }, + questName = "bloodherb", + }, + -- Power Bolts Quest (book) + [6112] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32814, y = 32281, z = 8 }, + reward = { { 2821, 1 } }, + questName = "powerbolt2", + }, + -- Present Quest (rookgaard) + [6113] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32149, y = 32105, z = 11 }, + container = 2854, -- backpack + reward = { { 2882, 1 }, { 2856, 1 }, { 2881, 1 }, { 2905, 1 } }, -- Jug, Present Box, Cup and Plate + questName = "presentBox", + }, + -- Bear Room quest + [6114] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32146, y = 32097, z = 11 }, + container = 2853, -- bag + reward = { { 3447, 12 }, { 3031, 40 } }, -- bag: 12 arrows, 40 gold coin + questName = "bearChest1", + }, + [6115] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32144, y = 32096, z = 11 }, + reward = { { 3354, 1 } }, -- Brass Helmet + questName = "bearChest2", + }, + [6116] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32141, y = 32097, z = 11 }, + reward = { { 3358, 1 } }, -- Chain Armor + questName = "bearChest3", + }, + -- Captain Iglues Treasure Quest + [6117] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32039, y = 32121, z = 13 }, + reward = { { 3579, 1 } }, -- 2x Salmon + questName = "captainIglues", + }, + -- Combat Knife Quest + [6117] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32102, y = 32235, z = 8 }, + reward = { { 3292, 1 } }, -- Combat Knife + questName = "combatknife", + }, + -- Goblin Temple Quest + [6118] = { + useKV = true, + itemId = 2472, + itemPos = { x = 31973, y = 32209, z = 12 }, + container = 2853, -- bag + reward = { { 3551, 1 }, { 1781, 5 }, { 3031, 50 } }, -- sandals, 5 small stones, 50 gold coins + questName = "goblintemple", + }, + [6119] = { + useKV = true, + itemId = 2472, + itemPos = { x = 31977, y = 32209, z = 12 }, + container = 2853, -- bag + reward = { { 3466, 1 }, { 2992, 4 }, { 2874, 1 } }, -- pan, 4 snowballs, vial of milk + questName = "goblintemple2", + }, + -- Minotaur Hell Quest + [6120] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32130, y = 32066, z = 12 }, + reward = { { 3483, 1 } }, -- fishing rod + questName = "minohell1", + }, + [6121] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32127, y = 32065, z = 12 }, + container = 2853, -- bag + reward = { { 3447, 10 }, { 3448, 4 } }, -- 10 arrows, 4 poison arrow + questName = "minohell2", + }, + [6121] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32124, y = 32064, z = 12 }, + reward = { { 3283, 1 } }, -- carlin sword + questName = "minohell3", + }, + -- Circle Room Quest + [6122] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32495, y = 31992, z = 14 }, + reward = { { 3279, 1 } }, -- war hammer + questName = "circleroom1", + }, + [6123] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32497, y = 31992, z = 14 }, + reward = { { 3323, 1 } }, -- dwarven axe + questName = "circleroom2", + }, + -- Crystal Wand Quest + [6124] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32479, y = 31611, z = 15 }, + reward = { { 3068, 1 } }, -- crystal wand + questName = "crystalwand1", + }, + [6125] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32481, y = 31611, z = 15 }, + reward = { { 11609, 1 } }, -- crystal wand + questName = "crystalwand2", + }, + -- Demona Ring Quest + [6126] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32504, y = 31596, z = 14 }, + reward = { { 3049, 1 } }, -- steath ring + questName = "demonaring1", + }, + [6127] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32515, y = 31596, z = 14 }, + reward = { { 3051, 1 } }, -- energy ring + questName = "demonaring2", + }, + -- Purple Tome Quest + [6128] = { + useKV = true, + itemId = 2436, + itemPos = { x = 32424, y = 31591, z = 15 }, + reward = { { 2822, 1 } }, -- map + questName = "purpletome1", + }, + [6129] = { + useKV = true, + itemId = 2436, + itemPos = { x = 32427, y = 31591, z = 15 }, + reward = { { 2823, 1 } }, -- map + questName = "purpletome2", + }, + [6130] = { + useKV = true, + itemId = 2438, + itemPos = { x = 32421, y = 31594, z = 15 }, + reward = { { 2848, 1 } }, -- purple tome + questName = "purpletome3", + }, + -- Life Ring Quest + [6131] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32443, y = 32238, z = 11 }, + container = 2853, -- bag + reward = { { 3052, 1 }, { 3085, 200 } }, -- life ring , dragon necklace + questName = "lifering", + }, + -- Noble Armor Quest + [6132] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32451, y = 32048, z = 8 }, + reward = { { 3380, 1 } }, -- noble armor + questName = "noblearmor1", + }, + [6133] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32455, y = 32048, z = 8 }, + reward = { { 3385, 1 } }, -- crown helmet + questName = "noblearmor2", + }, + -- Geomancer Quest + [6134] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32456, y = 32008, z = 13 }, + container = 2853, -- bag + reward = { { 3029, 1 }, { 3028, 1 }, { 3097, 1 } }, -- small sapphire, small diamond, dwarven ring + questName = "geomancer", + }, + -- Naginata Quest + [6135] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32346, y = 32063, z = 12 }, + reward = { { 3314, 1 } }, -- naginata + questName = "naginata", + }, + -- Ghoul Room Quest + [6136] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32500, y = 32175, z = 14 }, + reward = { { 3083, 150 } }, -- garlic necklac + questName = "ghoulroom1", + }, + -- Mintwallin Cyclops Quest + [6137] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32500, y = 32177, z = 14 }, + reward = { { 3093, 1 } }, -- club ring + questName = "ghoulroom2", + }, + [6138] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32591, y = 32097, z = 14 }, + reward = { { 3028, 1 } }, -- small diamond + questName = "mintwallincyclops", + }, + -- Devil helmet Quest + [6139] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32459, y = 32144, z = 15 }, + reward = { { 3029, 4 } }, -- small sapphire + questName = "devilhemet1", + }, + [6140] = { + useKV = true, + itemId = 2480, + itemPos = { x = 32465, y = 32148, z = 15 }, + reward = { { 3356, 1 } }, -- devil helmet + questName = "devilhemet2", + }, + [6141] = { + useKV = true, + itemId = 2480, + itemPos = { x = 32466, y = 32148, z = 15 }, + reward = { { 3269, 1 } }, -- halberd + questName = "devilhemet3", + }, + -- Fanfare Quest + [6142] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32390, y = 31769, z = 9 }, + reward = { { 2955, 1 } }, -- fanfare + questName = "fanfare", + }, + -- Heaven Blossom Quest + [6143] = { + useKV = true, + itemId = 2523, + itemPos = { x = 33104, y = 32154, z = 8 }, + reward = { { 5921, 1 } }, -- heaven blossom + questName = "heavenblossom", + }, + -- Iron Ore Quest + [6144] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32532, y = 31873, z = 8 }, + reward = { { 5880, 1 } }, -- iron ore + questName = "ironore", + }, + -- Isle of the Mists Quest + [6145] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32852, y = 32332, z = 7 }, + reward = { { 3032, 1 } }, -- small emerald + questName = "isleofthemists", + }, + -- Longsword Quest + [6146] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32649, y = 31969, z = 9 }, + reward = { { 3285, 1 } }, -- longsword + questName = "longsword1", + }, + [6147] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32650, y = 31969, z = 9 }, + reward = { { 3004, 1 } }, -- weeding ring + questName = "longsword2", + }, + [6148] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32651, y = 31969, z = 9 }, + container = 2853, -- bag + reward = { { 3147, 3 }, { 2989, 1 }, { 3031, 76 }, { 3463, 1 } }, -- 3 blank rune, wooden doll, 76 gold coin, mirror + questName = "longsword3", + }, + -- Minotaur Leather Quest + [6149] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32302, y = 32415, z = 7 }, + reward = { { 5878, 1 } }, -- minotaur leather + questName = "minotaurleatherquest", + }, + -- Orc Shaman Quest + [6150] = { + useKV = true, + itemId = 2469, + itemPos = { x = 33089, y = 32030, z = 9 }, + container = 2853, -- bag + reward = { { 3046, 1 }, { 3092, 1 }, { 3147, 1 } }, -- magic light wand, axe ring, blank rune + questName = "orcshaman", + }, + -- Power Ring Quest + [6151] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32599, y = 31776, z = 9 }, + reward = { { 3031, 1 } }, -- power ring + questName = "powerring1", + }, + [6152] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32601, y = 31776, z = 9 }, + reward = { { 3056, 200 } }, -- bronze amulet + questName = "powerring2", + }, + -- Scale Armor Quest + [6153] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32357, y = 32130, z = 9 }, + container = 2853, -- bag + reward = { { 3377, 1 } }, -- scale armor + questName = "scalearmor", + }, + -- Silver Amulet Quest + [6154] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32506, y = 32269, z = 9 }, + reward = { { 3054, 200 } }, -- silver amulet + questName = "silveramulet", + }, + -- Silver Brooch Quest + [6155] = { + useKV = true, + itemId = 2476, + itemPos = { x = 32775, y = 32006, z = 11 }, + container = 2853, -- bag + reward = { { 3017, 1 }, { 3030, 2 }, { 3028, 3 } }, -- Silver Brooch, 2 Small Rubies, 3 Small Diamonds + questName = "silverbrooch", + }, + -- Six Rubies Quest + [6156] = { + useKV = true, + itemId = 387, + itemPos = { x = 32371, y = 32262, z = 12 }, + reward = { { 3030, 6 } }, -- 6 small rubies + questName = "sixrubies", + }, + -- Desert Quest + [6157] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32668, y = 32069, z = 8 }, + reward = { { 3035, 100 } }, -- 100 platinum coins + questName = "desert1", + }, + [6158] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32675, y = 32069, z = 8 }, + container = 2857, -- green bag + reward = { { 3084, 250 }, { 3098, 1 }, { 3046, 1 }, { 3077, 1 } }, -- protection amulet, ring of healing, magic light wand and anhk + questName = "desert2", + }, + -- Throwing Star Quest + [6159] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32522, y = 32111, z = 15 }, + reward = { { 3287, 10 } }, -- throwing star + questName = "throwingstar", + }, + -- Triangle Tower Quest + [6160] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32565, y = 32119, z = 3 }, + container = 2853, -- bag + reward = { { 3083, 150 }, { 3029, 2 }, { 3097, 1 } }, -- garlick necklace, small sapphire, dwarven ring + questName = "triangletower", + }, + -- Dragon Corpse Quest + [6161] = { + useKV = true, + itemId = 4025, + itemPos = { x = 32179, y = 32224, z = 9 }, + container = 2853, -- bag + reward = { { 3374, 1 }, { 3430, 1 } }, -- Copper Shield and Legion Helmet + questName = "dragoncorpse", + }, + -- Katana Quest (rookgaard) + [6162] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32175, y = 32145, z = 11 }, + reward = { { 3367, 1 } }, -- katana + questName = "katanacorpse1", + }, + [6163] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32174, y = 32149, z = 11 }, + reward = { { 3300, 1 } }, -- katana + questName = "katanacorpse2", + }, + -- Crusader Helmet Quest + [6164] = { + useKV = true, + itemId = 3990, + itemPos = { x = 32427, y = 31943, z = 14 }, + reward = { { 3391, 1 } }, -- crusader helmet + questName = "crusaderhelmet", + }, + [6165] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32498, y = 31721, z = 15 }, + reward = { { 3433, 1 } }, -- griffing shield (Griffin Shield Quest) + questName = "griffinshield1", + }, + [6166] = { + useKV = true, + itemId = 4024, + itemPos = { x = 32500, y = 31721, z = 15 }, + reward = { { 3313, 1 } }, -- obsidian lance (Griffin Shield Quest) + questName = "griffinshield2", + }, + [6167] = { + useKV = true, + itemId = 4024, + itemPos = { x = 32503, y = 31724, z = 15 }, + reward = { { 3323, 1 } }, -- dwarven axe (Griffin Shield Quest) + questName = "griffinshield3", + }, + -- Iron Helmet Quest + [6168] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32769, y = 32225, z = 7 }, + container = 2854, + reward = { { 3123, 1 }, { 3155, 3 }, { 3361, 1 }, { 3353, 1 }, { 3285, 1 }, { 3506, 1 } }, -- worn leather boots, sudden death rune, leather armor, iron helmet, longsword, stamped letter + questName = "ironhelmet", + }, + -- Dead Archer Quest + [6169] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32514, y = 32303, z = 10 }, + container = 2853, + reward = { { 3350, 1 }, { 3448, 5 }, { 268, 1 }, { 266, 1 } }, -- bow, 5 poison arrows, mana potion, health potion + questName = "deadarcher", + }, + -- Power Bolt Quest + [6170] = { + useKV = true, + itemId = 4240, + itemPos = { x = 32816, y = 32279, z = 8 }, + container = 2853, + reward = { { 3450, 5 }, { 3449, 12 } }, -- 5 power bolt, 12 burst arrow + questName = "powerbolt1", + }, + -- Spike Sword Quest + [6171] = { + useKV = true, + itemId = 3990, + itemPos = { x = 32568, y = 32085, z = 12 }, + reward = { { 3271, 1 } }, -- 5 power bolt, 12 burst arrow + questName = "spikesword", + }, + -- Elvenbane Quest + [6172] = { + useKV = true, + itemId = 2434, + itemPos = { x = 32588, y = 31644, z = 3 }, + container = 2853, + reward = { { 3031, 100 }, { 3028, 2 } }, -- 100 gold coin, 2 small diamond + questName = "elvebanequest1", + }, + [6173] = { + useKV = true, + itemId = 2434, + itemPos = { x = 32588, y = 31645, z = 3 }, + container = 2853, + reward = { { 3059, 1 }, { 3147, 1 }, { 237, 1 } }, -- spellbook, blank rune, strong mana potion + questName = "elvebanequest2", + }, + [6174] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32590, y = 31647, z = 3 }, + reward = { { 3282, 1 } }, -- + questName = "elvebanequest3", + }, + [6175] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32591, y = 31647, z = 3 }, + reward = { { 3425, 1 } }, -- + questName = "elvebanequest4", + }, + -- Iron Hammer Quest + [6176] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32434, y = 31938, z = 8 }, + reward = { { 3310, 1 } }, -- iron hammer + questName = "ironhamer", + }, + -- Plate Armor quest + [6177] = { + useKV = true, + itemId = 2474, + itemPos = { x = 33327, y = 32182, z = 7 }, + reward = { { 3357, 1 } }, -- plate armor + questName = "platearmor", + }, + -- Stealth Ring Quest + [6178] = { + useKV = true, + itemId = 1983, + itemPos = { x = 33315, y = 32277, z = 11 }, + reward = { { 3084, 250 } }, -- protection amulet + questName = "stealhring1", + }, + [6179] = { + useKV = true, + itemId = 1983, + itemPos = { x = 33315, y = 32282, z = 11 }, + reward = { { 3049, 1 } }, -- stealth ring + questName = "stealhring2", + }, + -- Steel Helmet Quest + [6180] = { + useKV = true, + itemId = 2434, + itemPos = { x = 32460, y = 31951, z = 5 }, + reward = { { 3031, 56 } }, -- 56 gold coin + questName = "steelhelmet1", + }, + [6181] = { + useKV = true, + itemId = 2469, + itemPos = { x = 32464, y = 31957, z = 5 }, + reward = { { 3031, 47 } }, -- 47 gold coin + questName = "steelhelmet2", + }, + [6182] = { + useKV = true, + itemId = 2473, + itemPos = { x = 32462, y = 31947, z = 4 }, + reward = { { 3351, 1 } }, -- steel helmet + questName = "steelhelmet3", + }, + [6183] = { + useKV = true, + itemId = 2472, + itemPos = { x = 32467, y = 31962, z = 4 }, + reward = { { 2815, 1 } }, -- scroll + questName = "steelhelmet4", + }, + -- Battle Axe Quest + [6184] = { + useKV = true, + itemId = 4285, + itemPos = { x = 32305, y = 32254, z = 9 }, + reward = { { 3266, 1 } }, -- battle axe + questName = "battleaxe", + }, + -- Doublet Quest + [6185] = { + useKV = true, + itemId = 408, + itemPos = { x = 32084, y = 32181, z = 8 }, + reward = { { 3379, 1 } }, -- doublet + questName = "doublet", + }, + -- Honey Flower Quest + [6186] = { + useKV = true, + itemId = 9226, + itemPos = { x = 32005, y = 32139, z = 3 }, + reward = { { 2984, 1 } }, -- honey + questName = "honeyflower", + }, -- Reward of others scrips files (varied rewards) -- The First dragon Quest -- Treasure chests (data\scripts\actions\quests\first_dragon\treasure_chests.lua) @@ -1190,4 +1926,9 @@ ChestUnique = { itemId = 2473, itemPos = { x = 32099, y = 32198, z = 9 }, }, + -- The Outlaw Camp Quest (Bright Sword Quest) + [14091] = { + itemId = 2472, + itemPos = { x = 32620, y = 32198, z = 10 }, + }, } diff --git a/data-otservbr-global/startup/tables/corpse.lua b/data-otservbr-global/startup/tables/corpse.lua index 70594adcaa4..a6ca06f7375 100644 --- a/data-otservbr-global/startup/tables/corpse.lua +++ b/data-otservbr-global/startup/tables/corpse.lua @@ -34,8 +34,4 @@ CorpseUnique = { itemId = 4285, itemPos = { x = 32211, y = 31273, z = 10 }, }, - [20004] = { - itemId = 4285, - itemPos = { x = 32305, y = 32254, z = 9 }, - }, } diff --git a/data-otservbr-global/startup/tables/door_key.lua b/data-otservbr-global/startup/tables/door_key.lua index f8c38941e42..63a52a6a6ad 100644 --- a/data-otservbr-global/startup/tables/door_key.lua +++ b/data-otservbr-global/startup/tables/door_key.lua @@ -53,6 +53,14 @@ KeyDoorAction = { { x = 32676, y = 31671, z = 10 }, }, }, + -- Door of the key 3610 (devil helmet quest) + [Storage.Quest.Key.ID3610] = { + itemId = false, + itemPos = { + { x = 32462, y = 32153, z = 14 }, + { x = 32462, y = 32151, z = 15 }, + }, + }, -- Door of the key 1864 (mad mage room quest) [Storage.Quest.Key.ID3620] = { itemId = false, @@ -68,6 +76,20 @@ KeyDoorAction = { itemId = 1631, itemPos = { { x = 32578, y = 32197, z = 15 } }, }, + -- Door of the key 3667 (mintwallin cyclops quest) + [Storage.Quest.Key.ID3667] = { + itemId = 5106, + itemPos = { { x = 32592, y = 32102, z = 14 } }, + }, + -- Door of the key 3520 (carlin cemetery) + [Storage.Quest.Key.ID3520] = { + itemId = false, + itemPos = { + { x = 32400, y = 31788, z = 8 }, + { x = 32400, y = 31789, z = 8 }, + { x = 32398, y = 31804, z = 8 }, + }, + }, -- Door of the key 2297 (emperor's cookies quest) [Storage.Quest.Key.ID3800] = { itemId = false, @@ -101,7 +123,7 @@ KeyDoorAction = { itemId = false, itemPos = { { x = 32190, y = 32432, z = 8 } }, }, - -- Door of the key 3496 + -- Door of the key 3980 [Storage.Quest.Key.ID3980] = { itemId = false, itemPos = { { x = 32277, y = 32420, z = 10 } }, @@ -130,6 +152,16 @@ KeyDoorAction = { itemId = false, itemPos = { { x = 33363, y = 31360, z = 3 } }, }, + -- Door of the key 4601 (bear room quest) + [Storage.Quest.Key.ID4601] = { + itemId = false, + itemPos = { { x = 32145, y = 32100, z = 11 } }, + }, + -- Door of the key 4693 (kata quest) + [Storage.Quest.Key.ID4603] = { + itemId = false, + itemPos = { { x = 32179, y = 32149, z = 10 } }, + }, [Storage.Quest.Key.ID0909] = { itemId = false, itemPos = { @@ -141,4 +173,24 @@ KeyDoorAction = { itemId = false, itemPos = { { x = 32506, y = 32175, z = 14 } }, }, + [Storage.Quest.Key.ID3142] = { -- noble armor (thais quest) + itemId = false, + itemPos = { { x = 32450, y = 32044, z = 8 } }, + }, + [Storage.Quest.Key.ID3301] = { + itemId = false, + itemPos = { { x = 32619, y = 32241, z = 8 } }, + }, + [Storage.Quest.Key.ID3302] = { + itemId = false, + itemPos = { { x = 32619, y = 32240, z = 8 } }, + }, + [Storage.Quest.Key.ID3303] = { + itemId = false, + itemPos = { { x = 32614, y = 32175, z = 9 } }, + }, + [Storage.Quest.Key.ID3304] = { + itemId = false, + itemPos = { { x = 32620, y = 32199, z = 10 } }, + }, } diff --git a/data-otservbr-global/startup/tables/door_level.lua b/data-otservbr-global/startup/tables/door_level.lua index e9253809f40..d4c549a0f6b 100644 --- a/data-otservbr-global/startup/tables/door_level.lua +++ b/data-otservbr-global/startup/tables/door_level.lua @@ -6,6 +6,13 @@ Just add new positions and it go work in the game ]] LevelDoorAction = { + -- Doors for level 20 + [1020] = { + itemId = false, + itemPos = { + { x = 32673, y = 32100, z = 8 }, + }, + }, -- Doors for level 25 [1025] = { itemId = false, @@ -20,6 +27,14 @@ LevelDoorAction = { { x = 33302, y = 31691, z = 11 }, { x = 33302, y = 31692, z = 11 }, { x = 32567, y = 31969, z = 3 }, + { x = 32479, y = 32174, z = 15 }, + }, + }, + -- Doors for level 35 + [1035] = { + itemId = false, + itemPos = { + { x = 32448, y = 32042, z = 8 }, }, }, -- Doors for level 40 @@ -27,6 +42,16 @@ LevelDoorAction = { itemId = false, itemPos = { { x = 32981, y = 31760, z = 9 }, + { x = 32353, y = 32073, z = 11 }, + { x = 32544, y = 32179, z = 14 }, + }, + }, + -- Doors for level 45 + [1045] = { + itemId = false, + itemPos = { + { x = 32612, y = 32253, z = 7 }, + { x = 32602, y = 32207, z = 10 }, }, }, -- Doors for level 50 @@ -44,6 +69,7 @@ LevelDoorAction = { itemPos = { { x = 33085, y = 31650, z = 10 }, { x = 32223, y = 31869, z = 14 }, + { x = 32483, y = 31722, z = 15 }, }, }, -- Doors for level 70 diff --git a/data-otservbr-global/startup/tables/door_quest.lua b/data-otservbr-global/startup/tables/door_quest.lua index 366a6d052bb..927eb5219f7 100644 --- a/data-otservbr-global/startup/tables/door_quest.lua +++ b/data-otservbr-global/startup/tables/door_quest.lua @@ -944,4 +944,9 @@ QuestDoorUnique = { itemId = 17709, itemPos = { x = 32908, y = 32112, z = 7 }, }, + -- Katana Quest + [22006] = { + itemId = 5107, + itemPos = { x = 32177, y = 32148, z = 11 }, + }, } diff --git a/data-otservbr-global/startup/tables/item.lua b/data-otservbr-global/startup/tables/item.lua index 6aaa5f7235d..c53a445cf9c 100644 --- a/data-otservbr-global/startup/tables/item.lua +++ b/data-otservbr-global/startup/tables/item.lua @@ -3,6 +3,17 @@ ItemAction = { --Parchment room quest -- data\scripts\quests\parchment_room\movement-parchment.lua + [102] = { -- downFloor + itemId = false, + itemPos = { + { x = 32171, y = 32439, z = 7 }, -- fibula acess + { x = 32172, y = 32439, z = 7 }, -- fibula acess + { x = 32507, y = 32176, z = 13 }, + { x = 32508, y = 32176, z = 13 }, + { x = 32353, y = 32131, z = 8 }, -- scale armor quest + { x = 32354, y = 32131, z = 8 }, -- scale armor quest + }, + }, [104] = { itemId = 2819, itemPos = { { x = 33063, y = 31624, z = 15 } }, @@ -273,6 +284,13 @@ ItemAction = { { x = 33155, y = 31297, z = 3 }, }, }, + -- naginata quest + [40031] = { -- stone + itemId = 1791, + itemPos = { + { x = 32356, y = 32074, z = 10 }, + }, + }, } ItemUnique = { diff --git a/data-otservbr-global/startup/tables/lever.lua b/data-otservbr-global/startup/tables/lever.lua index ad4a6edc940..ded194b341b 100644 --- a/data-otservbr-global/startup/tables/lever.lua +++ b/data-otservbr-global/startup/tables/lever.lua @@ -51,6 +51,25 @@ LeverAction = { { x = 32601, y = 31421, z = 9 }, }, }, + [30006] = { -- bear room quest stone + itemId = false, + itemPos = { + { x = 32148, y = 32105, z = 11 }, + }, + }, + [30007] = { -- life ring bridge lever + itemId = false, + itemPos = { + { x = 32414, y = 32252, z = 10 }, + { x = 32413, y = 32230, z = 10 }, + }, + }, + [30008] = { -- devil helmet lever + itemId = false, + itemPos = { + { x = 32600, y = 32105, z = 14 }, + }, + }, } LeverUnique = { @@ -298,4 +317,39 @@ LeverUnique = { itemId = 2772, itemPos = { x = 32440, y = 32191, z = 10 }, }, + -- Path: data\scripts\rookgaard\katana_quest\katana_quest_lever.lua + [30029] = { + itemId = 2772, + itemPos = { x = 32182, y = 32145, z = 11 }, + }, + -- Path: data-otservbr-global\scripts\actions\quests\desert_dungeon_quest\desert_dungeon_lever.lua + [30030] = { + itemId = 2772, + itemPos = { x = 32673, y = 32086, z = 8 }, + }, + -- Path: data-otservbr-global/scripts/actions/quests/the_outlaw_camp/oven.lua + [30031] = { + itemId = 2772, + itemPos = { x = 32614, y = 32173, z = 9 }, + }, + -- Path: data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_switch.lua + [30032] = { + itemId = 2772, + itemPos = { x = 32594, y = 32212, z = 9 }, + }, + -- Path: data-otservbr-global/scripts/actions/quests/the_outlaw_camp/power_burn.lua + [30033] = { + itemId = 2772, + itemPos = { x = 32616, y = 32222, z = 10 }, + }, + -- Path: data-otservbr-global/scripts/actions/quests/others/triangle_tower_lever.lua + [30034] = { + itemId = 2772, + itemPos = { x = 32573, y = 32121, z = 7 }, + }, + -- Path: data\scripts\quests\draconia\action-lever.lua + [30035] = { + itemId = 2772, + itemPos = { x = 32792, y = 31579, z = 7 }, + }, } diff --git a/data-otservbr-global/startup/tables/teleport.lua b/data-otservbr-global/startup/tables/teleport.lua index b82d39b585e..51a6bf3a85e 100644 --- a/data-otservbr-global/startup/tables/teleport.lua +++ b/data-otservbr-global/startup/tables/teleport.lua @@ -157,10 +157,10 @@ TeleportUnique = { -- Quests teleports -- Deeper fibula quest teleport -- Entrance - [38001] = { + [38001] = { -- "left portal" to go back itemId = 1949, itemPos = { x = 32208, y = 32433, z = 10 }, - destination = { x = 32281, y = 32389, z = 10 }, + destination = { x = 32167, y = 32438, z = 9 }, effect = CONST_ME_TELEPORT, }, -- Exit diff --git a/data-otservbr-global/startup/tables/tile.lua b/data-otservbr-global/startup/tables/tile.lua index 6e5cb605c24..ccb8a6f8d2f 100644 --- a/data-otservbr-global/startup/tables/tile.lua +++ b/data-otservbr-global/startup/tables/tile.lua @@ -1154,19 +1154,19 @@ TileUnique = { -- Path: data\scripts\actions\quests\the_rookie_guard\mission05_web_terror.lua -- Spider lair entrance hole [25022] = { - itemId = 12728, + itemId = 385, itemPos = { x = 32051, y = 32110, z = 7 }, }, -- Spider queen chamber hole [25023] = { - itemId = 12728, + itemId = 385, itemPos = { x = 32018, y = 32098, z = 11 }, }, -- The Rookie Guard Quest - Mission 06: Run Like a Wolf -- Path: data\scripts\actions\quests\the_rookie_guard\mission06_run_like_wolf.lua -- War wolf den entrance hole [25024] = { - itemId = 12728, + itemId = 385, itemPos = { x = 32138, y = 32132, z = 7 }, }, -- War wolf den fall tile @@ -1188,9 +1188,14 @@ TileUnique = { -- Path: data\scripts\actions\quests\the_rookie_guard\mission09_rock_troll.lua -- Troll caves dug tunnel hole [25028] = { - itemId = 12728, + itemId = 385, itemPos = { x = 32059, y = 32135, z = 9 }, }, + -- Mintwallin Quest (Devil Helmet Quest) + [25030] = { + itemId = 431, + itemPos = { x = 32468, y = 32119, z = 14 }, + }, -- Remove/create item on stepIn -- Reserved uniques range from 29001/30000 diff --git a/data-otservbr-global/startup/tables/tile_pick.lua b/data-otservbr-global/startup/tables/tile_pick.lua index f5eceea7e9a..c4d9f89ea9f 100644 --- a/data-otservbr-global/startup/tables/tile_pick.lua +++ b/data-otservbr-global/startup/tables/tile_pick.lua @@ -14,6 +14,13 @@ TilePickAction = { { x = 32204, y = 31887, z = 14 }, { x = 32165, y = 31890, z = 14 }, { x = 32162, y = 31921, z = 13 }, + { x = 32149, y = 32110, z = 11 }, + { x = 32302, y = 32257, z = 8 }, -- Battle Axe Quest + { x = 32437, y = 32239, z = 10 }, -- Life Ring Quest + { x = 32775, y = 32012, z = 10 }, + { x = 32595, y = 32068, z = 9 }, + { x = 32580, y = 32103, z = 11 }, + { x = 32517, y = 32107, z = 14 }, }, }, } diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index 03e88d7ccca..b0c74afeaa6 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -973,7 +973,7 @@ end function Player:canGetReward(rewardId, questName) if self:questKV(questName):get("completed") then - self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The box is empty.") + self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is empty.") return false end diff --git a/data/scripts/lib/register_actions.lua b/data/scripts/lib/register_actions.lua index 25d23f1926d..e5d6688b167 100644 --- a/data/scripts/lib/register_actions.lua +++ b/data/scripts/lib/register_actions.lua @@ -451,7 +451,7 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) player:addItem(21395, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You dig up sand and sea shells.") elseif rand > 95 then - player:addItem(3976, math.random(1, 10)) + player:addItem(3492, math.random(1, 10)) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You dig up some worms. But you are confident that you'll find the amulet here, somewhere.") end toPosition:sendMagicEffect(CONST_ME_POFF) @@ -762,7 +762,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) end target:transform(3141) toPosition:sendMagicEffect(CONST_ME_SMOKE) - elseif target.actionid == 50058 then + elseif target.actionid == 40031 then -- naginata quest local stoneStorage = Game.getStorageValue(GlobalStorage.NaginataStone) if stoneStorage ~= 5 then