Skip to content

Commit

Permalink
fix: quests from version 7.26 to 7.92 revised (opentibiabr#2725)
Browse files Browse the repository at this point in the history
  • Loading branch information
htc16 authored Jul 25, 2024
1 parent e30b0af commit af0edb7
Show file tree
Hide file tree
Showing 237 changed files with 5,580 additions and 3,356 deletions.
225 changes: 125 additions & 100 deletions data-otservbr-global/lib/core/quests.lua

Large diffs are not rendered by default.

628 changes: 332 additions & 296 deletions data-otservbr-global/lib/core/storages.lua

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions data-otservbr-global/npc/a_dead_bureaucrat1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ local function creatureSayCallback(npc, creature, type, message)
local vocationBaseId = vocation:getBaseId()

if MsgContains(message, "pumin") then
if npcHandler:getTopic(playerId) == 0 and player:getStorageValue(Storage.PitsOfInferno.ThronePumin) < 1 then
if npcHandler:getTopic(playerId) == 0 and player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) < 1 then
npcHandler:say("Sure, where else. Everyone likes to meet my master, he is a great demon, isn't he? Your name is ...?", npc, creature)
npcHandler:setTopic(playerId, 1)
elseif npcHandler:getTopic(playerId) == 3 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 1)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 1)
npcHandler:say("How very interesting. I need to tell that to my master immediately. Please go to my colleagues and ask for Form 356. You will need it in order to proceed.", npc, creature)
npcHandler:setTopic(playerId, 0)
end
Expand All @@ -97,26 +97,26 @@ local function creatureSayCallback(npc, creature, type, message)
npcHandler:setTopic(playerId, 3)
end
elseif MsgContains(message, "411") then
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 3 then
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 3 then
npcHandler:say("Form 411? You need Form 287 to get that! Do you have it?", npc, creature)
npcHandler:setTopic(playerId, 4)
elseif player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 5 then
elseif player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 5 then
npcHandler:say("Form 411? You need Form 287 to get that! Do you have it?", npc, creature)
npcHandler:setTopic(playerId, 5)
end
elseif MsgContains(message, "no") then
if npcHandler:getTopic(playerId) == 4 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 4)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 4)
npcHandler:say("Oh, what a pity. Go see one of my colleagues. I give you the permission to get Form 287. Bye!", npc, creature)
end
elseif MsgContains(message, "yes") then
if npcHandler:getTopic(playerId) == 5 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 6)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 6)
npcHandler:say("Great. Here you are. Form 411. Come back anytime you want to talk. Bye.", npc, creature)
end
elseif MsgContains(message, "356") then
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 8 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 9)
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 8 then
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 9)
npcHandler:say("INCREDIBLE, you did it!! Have fun at Pumin's Domain!", npc, creature)
end
end
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/npc/a_dead_bureaucrat2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ local function creatureSayCallback(npc, creature, type, message)

if MsgContains(message, "287") then
local player = Player(creature)
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 4 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 5)
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 4 then
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 5)
npcHandler:say("Sure, you can get it from me. Here you are. Bye", npc, creature)
end
end
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/npc/a_dead_bureaucrat3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local function creatureSayCallback(npc, creature, type, message)
local vocation = Vocation(player:getVocation():getBase():getId())

if MsgContains(message, "pumin") then
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 2 then
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 2 then
npcHandler:say("Tell me if you liked it when you come back. What is your name?", npc, creature)
npcHandler:setTopic(playerId, 1)
end
Expand All @@ -85,11 +85,11 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif MsgContains(message, "145") then
if npcHandler:getTopic(playerId) == 3 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 3)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 3)
npcHandler:say("That's right, you can get Form 145 from me. However, I need Form 411 first. Come back when you have it.", npc, creature)
npcHandler:setTopic(playerId, 0)
elseif player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 6 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 7)
elseif player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 6 then
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 7)
npcHandler:say("Well done! You have form 411!! Here is Form 145. Have fun with it.", npc, creature)
end
end
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/npc/a_dead_bureaucrat4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ local function creatureSayCallback(npc, creature, type, message)
local vocationBaseId = vocation:getBaseId()

if MsgContains(message, "pumin") then
if player:getStorageValue(Storage.PitsOfInferno.ThronePumin) < 1 then
if player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 1 then
npcHandler:say("I'm not sure if you know what you are doing but anyway. Your name is?", npc, creature)
npcHandler:setTopic(playerId, 1)
end
Expand All @@ -94,11 +94,11 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif MsgContains(message, "356") then
if npcHandler:getTopic(playerId) == 3 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 2)
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 2)
npcHandler:say("Sorry, you need Form 145 to get Form 356. Come back when you have it", npc, creature)
npcHandler:setTopic(playerId, 0)
elseif player:getStorageValue(Storage.PitsOfInferno.ThronePumin) == 7 then
player:setStorageValue(Storage.PitsOfInferno.ThronePumin, 8)
elseif player:getStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin) == 7 then
player:setStorageValue(Storage.Quest.U7_9.ThePitsOfInferno.ThronePumin, 8)
npcHandler:say("You are better than I thought! Congratulations, here you are: Form 356!", npc, creature)
end
end
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/a_ghostly_sage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ npcType.onCloseChannel = function(npc, creature)
npcHandler:onCloseChannel(npc, creature)
end

local travelNode = keywordHandler:addKeyword({ "teleport" }, StdModule.say, { npcHandler = npcHandler, text = "You will now be travelled out of here. Are you sure that you want to face that teleport?" })
local travelNode = keywordHandler:addKeyword({ "help" }, StdModule.say, { npcHandler = npcHandler, text = "You will now be travelled out of here. Are you sure that you want to face that teleport?" })
travelNode:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, destination = Position(32834, 32275, 9) })
travelNode:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, reset = true, text = "Then stay here in these ghostly halls." })

Expand Down
6 changes: 3 additions & 3 deletions data-otservbr-global/npc/a_majestic_warwolf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ end

local function greetCallback(npc, creature)
local playerId = creature:getId()
if Player(creature):getStorageValue(Storage.OutfitQuest.DruidHatAddon) < 9 then
if Player(creature):getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) < 9 then
npcHandler:say("GRRRRRRRRRRRRR", npc, creature)
return false
end
Expand All @@ -63,12 +63,12 @@ local function creatureSayCallback(npc, creature, type, message)
end

if table.contains({ "addon", "outfit" }, message) then
if player:getStorageValue(Storage.OutfitQuest.DruidHatAddon) == 9 then
if player:getStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon) == 9 then
npcHandler:say("I can see in your eyes that you are a honest and friendly person, |PLAYERNAME|. You were patient enough to learn our language and I will grant you a special gift. Will you accept it?", npc, creature)
npcHandler:setTopic(playerId, 1)
end
elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then
player:setStorageValue(Storage.OutfitQuest.DruidHatAddon, 10)
player:setStorageValue(Storage.Quest.U7_8.DruidOutfits.DruidHatAddon, 10)
player:addOutfitAddon(148, 2)
player:addOutfitAddon(144, 2)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
Expand Down
Loading

0 comments on commit af0edb7

Please sign in to comment.