From c61b1b4b7a805dac60ac19037c0d785dec0cede4 Mon Sep 17 00:00:00 2001 From: Filipe Arruda <66535966+arrudaqs@users.noreply.github.com> Date: Tue, 31 Dec 2024 13:35:35 -0300 Subject: [PATCH] fix: add missing storage breaking the ice quest (#3201) --- data-otservbr-global/lib/core/storages.lua | 1 + .../scripts/creaturescripts/customs/freequests.lua | 1 + data-otservbr-global/scripts/lib/register_actions.lua | 1 + 3 files changed, 3 insertions(+) diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 4529c64f583..da86c8b9bb9 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -923,6 +923,7 @@ Storage = { NoblemanSecondAddon = 41308, FormorgarMinesHoistSkeleton = 41309, FormorgarMinesHoistChest = 41310, + PickAmount = 41311, }, }, U8_1 = { -- update 8.1 - Reserved Storages 41351 - 41650 diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index bfeac7acad0..9c318264b11 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -173,6 +173,7 @@ local questTable = { { storageName = "TheIceIslands.Mission10", storage = Storage.Quest.U8_0.TheIceIslands.Mission10, storageValue = 2 }, { storageName = "TheIceIslands.Mission11", storage = Storage.Quest.U8_0.TheIceIslands.Mission11, storageValue = 2 }, { storageName = "TheIceIslands.Mission12", storage = Storage.Quest.U8_0.TheIceIslands.Mission12, storageValue = 6 }, + { storageName = "TheIceIslands.PickAmount", storage = Storage.Quest.U8_0.TheIceIslands.PickAmount, storageValue = 3 }, { storageName = "TheIceIslands.yakchalDoor", storage = Storage.Quest.U8_0.TheIceIslands.yakchalDoor, storageValue = 1 }, { storageName = "TheInquisitionQuest.Questline", storage = Storage.Quest.U8_2.TheInquisitionQuest.Questline, storageValue = 25 }, { storageName = "TheInquisitionQuest.Mission01", storage = Storage.Quest.U8_2.TheInquisitionQuest.Mission01, storageValue = 7 }, diff --git a/data-otservbr-global/scripts/lib/register_actions.lua b/data-otservbr-global/scripts/lib/register_actions.lua index ec68c90e27c..d89772f7ce9 100644 --- a/data-otservbr-global/scripts/lib/register_actions.lua +++ b/data-otservbr-global/scripts/lib/register_actions.lua @@ -651,6 +651,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) --The Ice Islands Quest, Nibelor 1: Breaking the Ice local missionProgress = player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Mission02) local pickAmount = player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.PickAmount) + if missionProgress < 1 or pickAmount >= 3 or player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.Questline) ~= 3 then return false end