From 82400e59fe1f56e92981ec4e7f060861be2d2504 Mon Sep 17 00:00:00 2001 From: HT Cesta <58153179+htc16@users.noreply.github.com> Date: Fri, 5 Jul 2024 17:47:52 -0300 Subject: [PATCH] Beggar Outfits Quest --- data-otservbr-global/lib/core/quests.lua | 6 +- data-otservbr-global/lib/core/storages.lua | 16 +- data-otservbr-global/npc/hugo.lua | 22 +- data-otservbr-global/npc/simon_the_beggar.lua | 309 +++++++++--------- data-otservbr-global/startup/tables/chest.lua | 8 + .../startup/tables/door_quest.lua | 2 +- 6 files changed, 179 insertions(+), 184 deletions(-) diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index e48a9fe7e64..3bff42135a8 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -2193,10 +2193,10 @@ if not Quests then }, [5] = { name = "Beggar Outfit: The Newest Fashion", - storageId = Storage.OutfitQuest.BeggarOutfit, + storageId = Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, missionId = 10172, startValue = 1, - endValue = 6, + endValue = 8, states = { [1] = "Your current task is to bring Hugo 20 pieces of brown cloth, like the worn and ragged ghoul clothing.", [2] = "Your current task is to bring 50 pieces of minotaur leather to Hugo. \z @@ -2206,6 +2206,8 @@ if not Quests then [5] = "You brought all items required for the "poor man's look" to Hugo. \z He told you to come back to him after a whole day has passed, then the outfit should be finished.", [6] = "You got the outfit!", + [7] = "Now you need to go after the items to get the first addon.", + [8] = "Congratulations, you delivered the items for the first addon.", }, }, [6] = { diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 3479fda59da..dffd2ac3be0 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -755,9 +755,7 @@ Storage = { AddonBackpack = 50969, AddonBackpackTimer = 50970, }, - -- Begger Outfit Quest - BeggarFirstAddonDoor = 50975, -- Staff quest - BeggarSecondAddon = 50976, + -- Druid-outfit Quest DruidHatAddon = 50977, DruidBodyAddon = 50978, @@ -765,9 +763,6 @@ Storage = { -- Barbarian-outfit Quest BarbarianAddon = 50980, BarbarianAddonWaitTimer = 50981, - -- Beggar - BeggarOutfit = 50982, - BeggarOutfitTimer = 50983, -- Hunter-outfit Quest HunterMusicSheet01 = 50984, HunterMusicSheet02 = 50985, @@ -1324,6 +1319,7 @@ Storage = { DragahsSpellbook = 51768, StealFromThieves = 51769, WitchHouseQuest = 51770, + SimonTheBeggarsFavoriteStaff = 51771, }, PitsOfInferno = { -- Reserved storage from 52000 - 52019 @@ -2017,8 +2013,14 @@ Storage = { AssassinFirstAddon = 40762, AssassinSecondAddon = 40763, }, + BeggarOutfits = { + BeggarOutfit = 40764, + BeggarOutfitTimer = 40765, + BeggarFirstAddonDoor = 40766, + BeggarSecondAddon = 40767, + BeggarOutfitTimerAddon = 40768, + }, BarbarianOutfits = {}, - BeggarOutfits = {}, CitizenOutfits = {}, CitizenOutfitsRook = {}, DruidOutfits = {}, diff --git a/data-otservbr-global/npc/hugo.lua b/data-otservbr-global/npc/hugo.lua index ee7f81337bd..16f5f468897 100644 --- a/data-otservbr-global/npc/hugo.lua +++ b/data-otservbr-global/npc/hugo.lua @@ -134,28 +134,28 @@ local function creatureSayCallback(npc, creature, type, message) return true end - if player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) < 1 then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) < 1 then npcHandler:say({ "I think I'm having an innovative vision! I feel that people are getting tired of attempting to look wealthy and of displaying their treasures. ...", "A really new and innovative look would be - the 'poor man's look'! I can already see it in front of me... yes... a little ragged... but not too shabby! ...", "I need material right now! Argh - the vision starts to fade... please hurry, can you bring me some stuff?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) > 0 and player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) < 5 then + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) > 0 and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) < 5 then npcHandler:say("I am so excited! This poor man's look will be an outfit like the world has never seen before.", npc, creature) - elseif player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) == 5 then - if player:getStorageValue(Storage.OutfitQuest.BeggarOutfitTimer) > os.time() then + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 5 then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimer) > os.time() then npcHandler:say("Sorry, but I am not done with the outfit yet. Venore wasn't built in a day.", npc, creature) - elseif player:getStorageValue(Storage.OutfitQuest.BeggarOutfitTimer) > 0 and player:getStorageValue(Storage.OutfitQuest.BeggarOutfitTimer) < os.time() then + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimer) > 0 and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimer) < os.time() then npcHandler:say("Eureka! Alas, the poor man's outfit is finished, but... to be honest... it turned out much less appealing than I expected. However, you can have it if you want, okay?", npc, creature) npcHandler:setTopic(playerId, 5) end - elseif player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) == 6 then + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 6 then npcHandler:say("I guess my vision wasn't that grand after all. I hope there are still people who enjoy it.", npc, creature) end elseif config[message:lower()] then local targetMessage = config[message:lower()] - if player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) ~= targetMessage.value then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) ~= targetMessage.value then npcHandler:say(targetMessage.messages.done, npc, creature) return true end @@ -175,7 +175,7 @@ local function creatureSayCallback(npc, creature, type, message) if player:getStorageValue(Storage.OutfitQuest.DefaultStart) ~= 1 then player:setStorageValue(Storage.OutfitQuest.DefaultStart, 1) end - player:setStorageValue(Storage.OutfitQuest.BeggarOutfit, 1) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 1) npcHandler:say("Terrific! What are you waiting for?! Start right away gathering 20 pieces of brown cloth and come back once you have them!", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 4 then @@ -185,16 +185,16 @@ local function creatureSayCallback(npc, creature, type, message) return true end - player:setStorageValue(Storage.OutfitQuest.BeggarOutfit, player:getStorageValue(Storage.OutfitQuest.BeggarOutfit) + 1) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) + 1) if targetMessage.lastItem then - player:setStorageValue(Storage.OutfitQuest.BeggarOutfitTimer, os.time() + 86400) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimer, os.time() + 86400) end npcHandler:say(targetMessage.messages.success, npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 5 then player:addOutfit(153) player:addOutfit(157) - player:setStorageValue(Storage.OutfitQuest.BeggarOutfit, 6) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 6) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) npcHandler:say("Here you go. Maybe you enjoy if after all.", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/simon_the_beggar.lua b/data-otservbr-global/npc/simon_the_beggar.lua index 84cf524075b..acd305e07a0 100644 --- a/data-otservbr-global/npc/simon_the_beggar.lua +++ b/data-otservbr-global/npc/simon_the_beggar.lua @@ -72,202 +72,185 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end --- First beggar addon -local function BeggarFirst(npc, creature, message, keywords, parameters, node) +local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - if player:isPremium() then - if player:getStorageValue(Storage.OutfitQuest.BeggarFirstAddonDoor) == -1 then - if player:getItemCount(5883) >= 100 and player:getMoney() + player:getBankBalance() >= 20000 then - if player:removeItem(5883, 100) and player:removeMoneyBank(20000) then - npcHandler:say("Ah, right! The beggar beard or beggar dress! Here you go.", npc, creature) + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + -- Outfits and Addons logic + if MsgContains(message, "outfit") then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 6 then + if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 157 or 153) then + npcHandler:say("Haha, that beard is - well, not fake, but there's a trick behind it. I noticed people tend to be more generous towards a poor gramps. Want to know my trick?", npc, creature) + npcHandler:setTopic(playerId, 1) + end + end + elseif MsgContains(message, "100 ape fur") then + npcHandler:say("Have you brought me the 100 pieces of ape fur and 20000 gold pieces?", npc, creature) + npcHandler:setTopic(playerId, 3) + elseif MsgContains(message, "beard") then + if player:getSex() == PLAYERSEX_MALE then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 8 then + npcHandler:say("Hmm, I'm not done yet with your potion. But here, let me sprinkle a few drops of my own potion on your face... there you go. Now you just have to wait.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 9) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimerAddon, os.time()) + elseif player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 9 then + local beggarOutfitTimer = player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimerAddon) + if os.time() - beggarOutfitTimer >= 432000 then -- 5 dias em segundos + npcHandler:say("Aha! I can see it! Now that you've waited patiently without shaving, your beard is perfect! All thanks to my, err, potion. Yes. Goodbye!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 10) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.BeggarFirstAddonDoor, 1) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor, 1) player:addOutfitAddon(153, 1) - player:addOutfitAddon(157, 1) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Hmm, it seems you need to wait a bit longer for the potion to take full effect. Please be patient.", npc, creature) end - else - npcHandler:say("You do not have all the required items.", npc, creature) end - else - npcHandler:say("It seems you already have this addon, don't you try to mock me son!", npc, creature) end - end -end - --- Second beggar addon -local function BeggarSecond(npc, creature, message, keywords, parameters, node) - local player = Player(creature) - local playerId = player:getId() - - if player:isPremium() then - if player:getStorageValue(Storage.OutfitQuest.BeggarSecondAddon) == -1 then - if player:getItemCount(6107) >= 1 then - if player:removeItem(6107, 1) then - npcHandler:say("Ah, right! The beggar staff! Here you go.", npc, creature) - player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.OutfitQuest.BeggarSecondAddon, 1) - player:addOutfitAddon(153, 2) - player:addOutfitAddon(157, 2) - end + elseif MsgContains(message, "addon") then + if player:getSex() == PLAYERSEX_MALE and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 9 then + local beggarOutfitTimer = player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimerAddon) + if os.time() - beggarOutfitTimer >= 432000 then + npcHandler:say("Aha! I can see it! Now that you've waited patiently without shaving, your beard is perfect! All thanks to my, err, potion. Yes. Goodbye!", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 10) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor, 1) + player:addOutfitAddon(153, 1) + npcHandler:setTopic(playerId, 0) else - npcHandler:say("You do not have all the required items.", npc, creature) + npcHandler:say("Hmm, it seems you need to wait a bit longer for the potion to take full effect. Please be patient.", npc, creature) end - else - npcHandler:say("It seems you already have this addon, don't you try to mock me son!", npc, creature) end - end -end - -local function creatureSayCallback(npc, creature, type, message) - local player = Player(creature) - local playerId = player:getId() - - if not npcHandler:checkInteraction(npc, creature) then - return false - end - - if MsgContains(message, "cookie") then - if player:getStorageValue(Storage.WhatAFoolish.Questline) == 31 and player:getStorageValue(Storage.WhatAFoolish.CookieDelivery.SimonTheBeggar) ~= 1 then - npcHandler:say("Have you brought a cookie for the poor?", npc, creature) - npcHandler:setTopic(playerId, 1) + elseif MsgContains(message, "gypsy dress") then + if player:getSex() == PLAYERSEX_FEMALE then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 8 then + npcHandler:say("Oh, I'm sorry... I almost forgot! Okay, okay... here is your promised dress. I'm sure it will look so much better on you than on me- I mean, my, err, sister.", npc, creature) + player:addOutfitAddon(157, 1) + end end - elseif MsgContains(message, "help") then - npcHandler:say("I need gold. Can you spare 100 gold pieces for me?", npc, creature) - npcHandler:setTopic(playerId, 2) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - if not player:removeItem(130, 1) then - npcHandler:say("You have no cookie that I'd like.", npc, creature) - npcHandler:setTopic(playerId, 0) - return true - end - - player:setStorageValue(Storage.WhatAFoolish.CookieDelivery.SimonTheBeggar, 1) - if player:getCookiesDelivered() == 10 then - player:addAchievement("Allow Cookies?") + if player:getSex() == PLAYERSEX_MALE then + npcHandler:say({ + "I can mix a secret potion which will increase your facial hair growth enormously. I call it 'Instabeard'. However, it requires certain ingredients. ...", + "For the small fee of 20000 gold pieces I will help you mix this potion. Just bring me 100 pieces of ape fur, which are necessary to create this potion. ...", + "Do we have a deal?", + }, npc, creature) + npcHandler:setTopic(playerId, 2) + else + npcHandler:say({ + "I can mix a secret potion which increases facial hair growth enormously. I call it 'Instabeard'. However, I fear it works only for men. ...", + "Even if it worked on girls, I'd rather not be responsible for you ruining your pretty face. I have an idea though. If you help me brew one of these potions, I will sell something nice to you. ...", + "I still have a pretty gypsy dress and a pearl necklace somewhere, which you could wear instead of this ragged skirt. For the small fee of 20000 gold pieces, it'd be yours. ...", + "You only have to bring me 100 pieces of ape fur, so I can brew the potion. Do we have a deal?", + }, npc, creature) + npcHandler:setTopic(playerId, 2) end - - npc:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS) - npcHandler:say( - "Well, it's the least you can do for those who live in dire poverty. \z - A single cookie is a bit less than I'd expected, but better than ... WHA ... WHAT?? \z - MY BEARD! MY PRECIOUS BEARD! IT WILL TAKE AGES TO CLEAR IT OF THIS CONFETTI!", - npc, - creature - ) - npcHandler:removeInteraction(npc, creature) - npcHandler:resetNpc(creature) elseif npcHandler:getTopic(playerId) == 2 then - if not player:removeMoneyBank(100) then - npcHandler:say("You haven't got enough money for me.", npc, creature) - npcHandler:setTopic(playerId, 0) - return true - end - - npcHandler:say("Thank you very much. Can you spare 500 more gold pieces for me? I will give you a nice hint.", npc, creature) - npcHandler:setTopic(playerId, 3) + npcHandler:say("Great! Come back to me once you have the 100 pieces of ape fur and I'll do my part of the deal.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 7) + npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then - if not player:removeMoneyBank(500) then - npcHandler:say("Sorry, that's not enough.", npc, creature) - npcHandler:setTopic(playerId, 0) - return true + if player:isPremium() then + if player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor) == -1 then + if player:getItemCount(5883) >= 100 and player:getMoney() + player:getBankBalance() >= 20000 then + if player:removeItem(5883, 100) and player:removeMoneyBank(20000) then + npcHandler:say("Ahh! Very good. I will start mixing the potion immediately. Come back later. Bye bye.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 8) + if player:getSex() == PLAYERSEX_MALE then + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfitTimerAddon, os.time()) + end + else + npcHandler:say("You do not have all the required items.", npc, creature) + end + else + npcHandler:say("You do not have all the required items.", npc, creature) + end + else + npcHandler:say("It seems you already have this addon, don't you try to mock me son!", npc, creature) + end end + npcHandler:setTopic(playerId, 0) + end + end - npcHandler:say( - "That's great! I have stolen something from Dermot. \z - You can buy it for 200 gold. Do you want to buy it?", - npc, - creature - ) - npcHandler:setTopic(playerId, 4) - elseif npcHandler:getTopic(playerId) == 4 then - if not player:removeMoneyBank(200) then - npcHandler:say("Pah! I said 200 gold. You don't have that much.", npc, creature) - npcHandler:setTopic(playerId, 0) - return true - end + -- Second addon logic + if MsgContains(message, "addon") and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 10 then + npcHandler:say("No, no. Our deal is finished, no complaining now, I don't have time all day. And no, you can't have my staff.", npc, creature) + npcHandler:setTopic(playerId, 4) + elseif MsgContains(message, "staff") then + if npcHandler:getTopic(playerId) == 4 then + npcHandler:say("I said, no! Or well - I have a suggestion to make. Will you listen?", npc, creature) + npcHandler:setTopic(playerId, 5) + end + elseif MsgContains(message, "yes") then + if npcHandler:getTopic(playerId) == 5 then + npcHandler:say({ + "When I was wandering around in Tibia, I lost my favourite staff somewhere in the northern ruins in Edron. ...", + "Uh, don't ask me what I was doing there... sort of a pilgrimage. Well anyway, if you could bring that staff back to me, I promise I'll give you my current one. ...", + "What do you say?", + }, npc, creature) + npcHandler:setTopic(playerId, 6) + elseif npcHandler:getTopic(playerId) == 6 then + npcHandler:say("Good! Come back to me once you have retrieved my staff. Good luck.", npc, creature) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit, 11) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor, 1) + npcHandler:setTopic(playerId, 0) + end + end - local key = player:addItem(2968, 1) - if key then - key:setActionId(3940) + if MsgContains(message, "staff") and player:getStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarOutfit) == 11 then + npcHandler:say("Did you bring my favourite staff??", npc, creature) + npcHandler:setTopic(playerId, 7) + elseif MsgContains(message, "yes") then + if npcHandler:getTopic(playerId) == 7 then + if player:isPremium() then + if player:getItemCount(6107) >= 1 then + if player:removeItem(6107, 1) then + npcHandler:say("Yes!! That's it! I'm so glad! Here, you can have my other one. Thanks!", npc, creature) + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + player:setStorageValue(Storage.Quest.U7_8.BeggarOutfits.BeggarSecondAddon, 2) + player:addOutfitAddon(153, 2) + player:addOutfitAddon(157, 2) + else + npcHandler:say("You do not have the staff.", npc, creature) + end + else + npcHandler:say("You do not have the staff.", npc, creature) + end + else + npcHandler:say("Sorry, but you need to have a premium account!", npc, creature) end - npcHandler:say("Now you own the hot key.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) ~= 0 then - if npcHandler:getTopic(playerId) == 1 then - npcHandler:say("I see.", npc, creature) - elseif npcHandler:getTopic(playerId) == 2 then - npcHandler:say("Hmm, maybe next time.", npc, creature) - elseif npcHandler:getTopic(playerId) == 3 then - npcHandler:say("It was your decision.", npc, creature) - elseif npcHandler:getTopic(playerId) == 4 then - npcHandler:say("Ok. No problem. I'll find another buyer.", npc, creature) - end + end + + if MsgContains(message, "no") and npcHandler:getTopic(playerId) ~= 0 then + local noResponse = { + [1] = "I see.", + [2] = "Hmm, maybe next time.", + [3] = "It was your decision.", + [4] = "I see.", + [5] = "Hmm, maybe next time.", + [6] = "It was your decision.", + [7] = "Ok. No problem", + } + npcHandler:say(noResponse[npcHandler:getTopic(playerId)], npc, creature) npcHandler:setTopic(playerId, 0) end + return true end --- Node 1 -local node1 = keywordHandler:addKeyword({ "addon" }, StdModule.say, { - npcHandler = npcHandler, - text = "For the small fee of 20000 gold pieces I will help you mix this potion. \z - Just bring me 100 pieces of ape fur, which are necessary to create this potion. ... Do we have a deal?", -}) -node1:addChildKeyword({ "yes" }, BeggarSecond, {}) -node1:addChildKeyword({ "no" }, StdModule.say, { - npcHandler = npcHandler, - text = "Alright then. Come back when you got all neccessary items.", - reset = true, -}) - --- Node 2 -local node2 = keywordHandler:addKeyword({ "dress" }, StdModule.say, { - npcHandler = npcHandler, - text = "For the small fee of 20000 gold pieces I will help you mix this potion. \z - Just bring me 100 pieces of ape fur, which are necessary to create this potion. ...Do we have a deal?", -}) -node2:addChildKeyword({ "yes" }, BeggarFirst, {}) -node2:addChildKeyword({ "no" }, StdModule.say, { - npcHandler = npcHandler, - text = "Alright then. Come back when you got all neccessary items.", - reset = true, -}) - --- Node 3 -local node3 = keywordHandler:addKeyword({ "staff" }, StdModule.say, { - npcHandler = npcHandler, - text = "To get beggar staff you need to give me simon the beggar's staff. Do you have it with you?", -}) -node3:addChildKeyword({ "yes" }, BeggarSecond, {}) -node3:addChildKeyword({ "no" }, StdModule.say, { - npcHandler = npcHandler, - text = "Alright then. Come back when you got all neccessary items.", - reset = true, -}) - --- Node 4 -local node4 = keywordHandler:addKeyword({ "outfit" }, StdModule.say, { - npcHandler = npcHandler, - text = "For the small fee of 20000 gold pieces I will help you mix this potion. \z - Just bring me 100 pieces of ape fur, which are necessary to create this potion. ...Do we have a deal?", -}) -node4:addChildKeyword({ "yes" }, BeggarFirst, {}) -node4:addChildKeyword({ "no" }, StdModule.say, { - npcHandler = npcHandler, - text = "Alright then. Come back when you got all neccessary items.", - reset = true, -}) - npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|. I am a poor man. Please help me.") npcHandler:setMessage(MESSAGE_FAREWELL, "Have a nice day.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Have a nice day.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) - npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/startup/tables/chest.lua b/data-otservbr-global/startup/tables/chest.lua index a49999d0d8c..d488e953bca 100644 --- a/data-otservbr-global/startup/tables/chest.lua +++ b/data-otservbr-global/startup/tables/chest.lua @@ -1047,6 +1047,14 @@ ChestUnique = { reward = { { 3027, 2 }, { 3008, 1 }, { 3031, 100 } }, storage = Storage.QuestChests.WitchHouseQuest, }, + -- Simon The Beggar's Favorite Staff + [6117] = { + itemId = 2482, + itemPos = { x = 33167, y = 31600, z = 15 }, + weight = 38.00, + reward = { { 6107, 1 } }, + storage = Storage.QuestChests.SimonTheBeggarsFavoriteStaff, + }, -- Reward of others scrips files (varied rewards) -- The First dragon Quest -- Treasure chests (data\scripts\actions\quests\first_dragon\treasure_chests.lua) diff --git a/data-otservbr-global/startup/tables/door_quest.lua b/data-otservbr-global/startup/tables/door_quest.lua index e80ae387aad..2296688074d 100644 --- a/data-otservbr-global/startup/tables/door_quest.lua +++ b/data-otservbr-global/startup/tables/door_quest.lua @@ -96,7 +96,7 @@ QuestDoorAction = { itemPos = { { x = 33269, y = 32446, z = 12 } }, }, -- Beggar outfit quest door - [Storage.OutfitQuest.BeggarFirstAddonDoor] = { + [Storage.Quest.U7_8.BeggarOutfits.BeggarFirstAddonDoor] = { itemId = false, itemPos = { { x = 33165, y = 31600, z = 15 } }, },