Skip to content

Commit

Permalink
fix: quests from version 7.24 revised (opentibiabr#2724)
Browse files Browse the repository at this point in the history
  • Loading branch information
htc16 authored Jul 25, 2024
1 parent 6f678c7 commit e30b0af
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
6 changes: 3 additions & 3 deletions data-otservbr-global/lib/core/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3561,16 +3561,16 @@ 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.",
[3] = "You have received the measurements from 2 of 6 post officers.",
[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] = {
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/npc/kevin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/npc/kroox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 ... <tells you about Lokurs measurements> ", npc, creature)
player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1)
player:setStorageValue(Storage.Postman.MeasurementsKroox, 1)
Expand Down
8 changes: 8 additions & 0 deletions data-otservbr-global/npc/lokur.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/markwin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/talphion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e30b0af

Please sign in to comment.