From e30b0af0518fd11abe14afe992dccaa93e8e8c3c Mon Sep 17 00:00:00 2001 From: HT Cesta <58153179+htc16@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:10:20 -0300 Subject: [PATCH] fix: quests from version 7.24 revised (#2724) --- data-otservbr-global/lib/core/quests.lua | 6 +++--- data-otservbr-global/npc/kevin.lua | 8 ++++---- data-otservbr-global/npc/kroox.lua | 4 ++-- data-otservbr-global/npc/lokur.lua | 8 ++++++++ data-otservbr-global/npc/markwin.lua | 1 + data-otservbr-global/npc/talphion.lua | 2 +- 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index 042897f9369..2d60761bf92 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -3561,7 +3561,7 @@ if not Quests then storageId = Storage.Postman.Mission07, missionId = 10258, startValue = 1, - endValue = 8, + endValue = 9, states = { [1] = "Kevin wants you to bring him the measurements of Benjamin, Lokur, Dove, Liane, Chrystal and Olrik.", [2] = "You have received the measurements from 1 of 6 post officers.", @@ -3569,8 +3569,8 @@ if not Quests then [4] = "You have received the measurements from 3 of 6 post officers.", [5] = "You have received the measurements from 4 of 6 post officers.", [6] = "You have received the measurements from 5 of 6 post officers.", - [7] = "You have received all measurements, report back to Kevin!", - [8] = "You have reported back that you have completed the mission.", + [8] = "You have received all measurements, report back to Kevin!", + [9] = "You have reported back that you have completed the mission.", }, }, [8] = { diff --git a/data-otservbr-global/npc/kevin.lua b/data-otservbr-global/npc/kevin.lua index c8108e547aa..41686524673 100644 --- a/data-otservbr-global/npc/kevin.lua +++ b/data-otservbr-global/npc/kevin.lua @@ -88,7 +88,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif player:getStorageValue(Storage.Postman.Mission05) == 3 then npcHandler:say("Splendid, I knew we could trust you. I would like to ask for your help in another matter. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.Postman.Mission07) == 7 then + elseif player:getStorageValue(Storage.Postman.Mission07) == 8 then npcHandler:say("Once more you have impressed me! Are you willing to do another job?", npc, creature) npcHandler:setTopic(playerId, 21) elseif player:getStorageValue(Storage.Postman.Mission06) >= 1 and player:getStorageValue(Storage.Postman.Mission06) < 10 then @@ -127,10 +127,10 @@ local function creatureSayCallback(npc, creature, type, message) elseif player:getStorageValue(Storage.Postman.Rank) == 4 or player:getStorageValue(Storage.Postman.Rank) == 3 and player:getStorageValue(Storage.Postman.Mission09) == 0 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 3 then + elseif player:getStorageValue(Storage.Postman.Mission07) < 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 3 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 19) - elseif player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then + elseif player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 28) elseif player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 2 then @@ -263,7 +263,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 22) elseif npcHandler:getTopic(playerId) == 22 then npcHandler:say("Find out about his whereabouts and retrieve him or at least his posthorn. He was looking for a new underground passage that is rumoured to be found underneath the troll-infested Mountain east of Thais.", npc, creature) - player:setStorageValue(Storage.Postman.Mission07, 8) + player:setStorageValue(Storage.Postman.Mission07, 9) player:setStorageValue(Storage.Postman.Mission08, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 23 then diff --git a/data-otservbr-global/npc/kroox.lua b/data-otservbr-global/npc/kroox.lua index 020153a27bf..6f237ad1d87 100644 --- a/data-otservbr-global/npc/kroox.lua +++ b/data-otservbr-global/npc/kroox.lua @@ -66,8 +66,8 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.SamsOldBackpack, 2) player:setStorageValue(Storage.SamsOldBackpackDoor, 1) end - elseif MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then + elseif message == "lokurs measurements" then + if player:getStorageValue(Storage.Postman.Mission07) >= 7 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then npcHandler:say("Hm, well I guess its ok to tell you ... ", npc, creature) player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) player:setStorageValue(Storage.Postman.MeasurementsKroox, 1) diff --git a/data-otservbr-global/npc/lokur.lua b/data-otservbr-global/npc/lokur.lua index 62fb5a50864..59fc7ed0f7c 100644 --- a/data-otservbr-global/npc/lokur.lua +++ b/data-otservbr-global/npc/lokur.lua @@ -94,6 +94,14 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) > 0 then npcHandler:say("No then.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "measurements") then + if player:getStorageValue(Storage.Postman.Mission07) >= 6 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then + npcHandler:say("Come on, I have no clue what they are. Better ask my armorer Kroox for such nonsense.Go and ask him for good ol' Lokurs measurements, he'll know.", npc, creature) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + else + npcHandler:say("...", npc, creature) + npcHandler:setTopic(playerId, 0) + end end return true diff --git a/data-otservbr-global/npc/markwin.lua b/data-otservbr-global/npc/markwin.lua index b70437dddae..f0b2e055f5f 100644 --- a/data-otservbr-global/npc/markwin.lua +++ b/data-otservbr-global/npc/markwin.lua @@ -66,6 +66,7 @@ local function greetCallback(npc, creature) position:sendMagicEffect(CONST_ME_TELEPORT) end end + npcHandler:say("No! The hornless have reached my city! BODYGUARDS TO ME!", npc, creature) return false elseif player:getStorageValue(Storage.MarkwinGreeting) == 1 then npcHandler:setMessage(MESSAGE_GREET, "Well ... you defeated my guards! Now everything is over! I guess I will have to answer your questions now.") diff --git a/data-otservbr-global/npc/talphion.lua b/data-otservbr-global/npc/talphion.lua index 9a7ec7ae7e6..362dea22509 100644 --- a/data-otservbr-global/npc/talphion.lua +++ b/data-otservbr-global/npc/talphion.lua @@ -69,7 +69,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("CHESS? I DONT PLAY CHESS!", npc, creature) npcHandler:setTopic(playerId, 3) elseif npcHandler:getTopic(playerId) == 3 then - npcHandler:say("A PATTERN IN THIS MESS?? HEY DON'T INSULT MY MACHINEHALL!", npc, creature) + npcHandler:say("A PATTERN IN THIS MESS?? HEY DON'T INSULT MY MACHINE HALL!", npc, creature) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("AH YES! I WORKED ON THE DRESS PATTERN FOR THOSE UNIFORMS. STAINLESS TROUSERES, STEAM DRIVEN BOOTS! ANOTHERMARVEL TO BEHOLD! I'LL SENT A COPY TO KEVIN IMEDIATELY!", npc, creature)