Skip to content

Commit

Permalink
To Outfox a Fox Quest
Browse files Browse the repository at this point in the history
  • Loading branch information
htc16 committed Jul 25, 2024
1 parent b6bc672 commit 0e0f43a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion data-otservbr-global/lib/core/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4649,7 +4649,7 @@ if not Quests then
},
[14] = {
name = "To Outfox a Fox",
storageId = Storage.ToOutfoxAFoxQuest,
storageId = Storage.TibiaTales.ToOutfoxAFoxQuest,
missionId = 10432,
startValue = 1,
endValue = 2,
Expand Down
15 changes: 9 additions & 6 deletions data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ Storage = {
WagonTicket = 30009,
BloodHerbQuest = 30010,
FirstMageWeapon = 30011,
ToOutfoxAFoxQuest = 30012,
KawillBlessing = 30014,
RentedHorseTimer = 30015,
FountainOfLife = 30016,
Expand Down Expand Up @@ -1165,11 +1164,15 @@ Storage = {
Questline = 51532,
},
ToBlindTheEnemy = {
Questline = 41398,
DwarvenShield = 41399,
MorningStar = 41400,
BP1 = 41401,
BP2 = 41402,
Questline = 51533,
DwarvenShield = 51534,
MorningStar = 51535,
BP1 = 51536,
BP2 = 51537,
},
ToOutfoxAFoxQuest = {
Questline = 51538,
MiningHelmet = 51539,
},
},
TheShatteredIsles = {
Expand Down
13 changes: 8 additions & 5 deletions data-otservbr-global/npc/budrik.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ local function creatureSayCallback(npc, creature, type, message)
end

if table.contains({ "mission", "quest" }, message:lower()) then
if player:getStorageValue(Storage.ToOutfoxAFoxQuest) < 1 then
if player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) < 1 then
npcHandler:say({
"Funny that you are asking me for a mission! There is indeed something you can do for me. Ever heard about The Horned Fox? Anyway, yesterday his gang has stolen my mining helmet during a raid. ...",
"It belonged to my father and before that to my grandfather. That helmet is at least 600 years old! I need it back. Are you willing to help me?",
}, npc, creature)
npcHandler:setTopic(playerId, 1)
elseif player:getStorageValue(Storage.ToOutfoxAFoxQuest) == 1 then
elseif player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) == 1 then
if player:removeItem(139, 1) then
player:setStorageValue(Storage.ToOutfoxAFoxQuest, 2)
player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 2)
player:addItem(875, 1)
npcHandler:say("As I was just saying to the others, 'this brave fellow will bring me my mining helmet back' and here you are with it!! Here take my spare helmet, I don't need it anymore!", npc, creature)
else
npcHandler:say("We presume the hideout of The Horned Fox is somewhere in the south-west near the coast, good luck finding my mining helmet!", npc, creature)
end
elseif player:getStorageValue(Storage.ToOutfoxAFoxQuest) == 2 and player:getLevel() <= 40 and player:getStorageValue(Storage.KillingInTheNameOf.BudrikMinos) < 0 then
elseif player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) == 2 and player:getLevel() <= 40 and player:getStorageValue(Storage.KillingInTheNameOf.BudrikMinos) < 0 then
npcHandler:say({
"I am so angry I could spit grit! That damn {Horned Fox} and his attacks! Let's show those bull-heads that they have messed with the wrong people....",
"I want you to kill 5000 minotaurs - no matter where - for me and all the dwarfs of Kazordoon! Are you willing to do that?",
Expand Down Expand Up @@ -100,7 +100,10 @@ local function creatureSayCallback(npc, creature, type, message)
if npcHandler:getTopic(playerId) == 1 then
npcHandler:say("I knew you have the guts for that task! We presume the hideout of The Horned Fox somewhere in the south-west near the coast. Good luck!", npc, creature)
npcHandler:setTopic(playerId, 0)
player:setStorageValue(Storage.ToOutfoxAFoxQuest, 1)
if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then
player:setStorageValue(Storage.TibiaTales.DefaultStart, 1)
end
player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 1)
elseif npcHandler:getTopic(playerId) == 2 then
npcHandler:say("Hussah! Let's bring war to those hoof-legged, dirt-necked, bull-headed minotaurs!! Come back to me when you are done with your {mission}.", npc, creature)
player:setStorageValue(JOIN_STOR, 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ local questTable = {

-- Assassin Outfit quests
{ storage = Storage.KillingInTheNameOf.BudrikMinos, storageValue = 0 },
{ storage = Storage.ToOutfoxAFoxQuest, storageValue = 2 },
{ storage = Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, storageValue = 2 },

-- Hunter Outfit quests
{ storage = Storage.OutfitQuest.HunterMusicSheet01, storageValue = 1 },
Expand Down
8 changes: 8 additions & 0 deletions data-otservbr-global/startup/tables/chest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,14 @@ ChestUnique = {
weight = 18.20,
storage = Storage.TibiaTales.ToBlindTheEnemy.BP2,
},
-- To Outfox a Fox Quest
[6260] = {
itemId = 2469,
itemPos = { x = 32467, y = 31970, z = 5 },
reward = { { 139, 1 } },
weight = 7.00,
storage = Storage.TibiaTales.ToOutfoxAFoxQuest.MiningHelmet,
},
-- Reward of others scrips files (varied rewards)
-- The First dragon Quest
-- Treasure chests (data\scripts\actions\quests\first_dragon\treasure_chests.lua)
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/startup/tables/door_quest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ QuestDoorAction = {
itemPos = { { x = 32455, y = 31967, z = 14 } },
},
-- To Outfox a Fox Quest, mining helmet door
[Storage.ToOutfoxAFoxQuest] = {
[Storage.TibiaTales.ToOutfoxAFoxQuest.Questline] = {
itemId = false,
itemPos = { { x = 32467, y = 31969, z = 5 } },
},
Expand Down

0 comments on commit 0e0f43a

Please sign in to comment.