if_i_had_a_hammer.lua 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. --[[
  2. Script Name : Quests/FrostfangSea/if_i_had_a_hammer.lua
  3. Script Purpose : the quest If I Had A Hammer
  4. Script Author : theFoof
  5. Script Date : 2013.5.16
  6. Zone : Frostfang Sea
  7. Quest Giver : Bull the Craft
  8. Preceded by : Tutorial: Learning to Harvest
  9. Followed by :
  10. --]]
  11. -- reward is "Handbook of the Ravens of the North", 722 tradeskill xp, +250 Ravens of the North faction and 6-8 silver
  12. function Init(Quest)
  13. SetQuestFeatherColor(Quest, 2)
  14. AddQuestStepObtainItem(Quest, 1, "I need to get the recipe from the table.", 1, 100, "Bull the mender has instructed me to get what I'll need for crafting. There is a recipe on the table, sack of coal on the ground, and I'll need some of the tin and lead clusters I harvested earlier.", 0, 32122)
  15. AddQuestStepCompleteAction(Quest, 1, "GotRecipe")
  16. end
  17. function GotRecipe(Quest, QuestGiver, Player)
  18. UpdateQuestStepDescription(Quest, 1, "I picked up the recipe, and should examine it in my inventory to scribe it.")
  19. AddQuestStepObtainItem(Quest, 2, "I need to pick up some coal from the sack.", 1, 100, "Bull the mender has instructed me to get what I'll need for crafting. There is a recipe on the table, sack of coal on the ground, and I'll need some of the tin and lead clusters I harvested earlier.", 0, 5771)
  20. AddQuestStepCompleteAction(Quest, 2, "GotCoal")
  21. end
  22. function GotCoal(Quest, QuestGiver, Player)
  23. UpdateQuestTaskGroupDescription(Quest, 1, "I obtained the supplies I will need.")
  24. AddQuestStepObtainItem(Quest, 3, "I should ensure I have a tin and lead cluster in my bags, then use the mender's anvil to craft.", 1, 100, "I should scribe the recipe book, and ensure I have a lead and tin cluster in my bags. Then click on the anvil in front of the mender to use it. Select the lucky wolf paw recipe and then click 'Create', then 'Begin'.", 0, 163306)
  25. AddQuestStepCompleteAction(Quest, 3, "CraftedPaw")
  26. end
  27. function CraftedPaw(Quest, QuestGiver, Player)
  28. UpdateQuestTaskGroupDescription(Quest, 2, "I created a Lucky Wolf Paw charm.")
  29. AddQuestStepChat(Quest, 4, "I should return to Bull once again.", 1, "Bull the mender is at the wrecked boat on Pilgrims' Landing. I should let him know that I made the lucky wolf paw charm.", 0, 4700009)
  30. AddQuestStepCompleteAction(Quest, 4, "TalkedBull")
  31. end
  32. function TalkedBull(Quest, QuestGiver, Player)
  33. UpdateQuestTaskGroupDescription(Quest, 3, "Bull has suggested that I speak to the tradeskill tutor once I reach Halas to learn more about crafting.")
  34. AddQuestStepChat(Quest, 5, "I should find the tradeskill tutor in the city to learn more about crafting.", 1, "Once I reach Halas, the tradeskill tutor can be found in the crafting area of Ravens' Roost, near the bank and housing.", 0, 4700220)
  35. AddQuestStepCompleteAction(Quest, 5, "CompleteQuest")
  36. end
  37. function CompleteQuest(Quest, QuestGiver, Player)
  38. GiveQuestReward(Quest, Player)
  39. end
  40. function Accepted(Quest, QuestGiver, Player)
  41. FaceTarget(QuestGiver, Player)
  42. conversation = CreateConversation()
  43. PlayFlavor(QuestGiver, "", "", "", 0, 0, Player)
  44. AddConversationOption(conversation, "I'll get those items now.")
  45. StartConversation(conversation, QuestGiver, Player, "Pick up a copy of my lucky charm recipe over there beside me, and scribe it into your recipe book. Then grab some coal from the sack. You'll also need one of the tin clusters and lead clusters that you harvested earlier, and make sure you have them with you in your bags.")
  46. AddSpawnAccess(GetSpawn(Player, 4701805), Player)
  47. AddSpawnAccess(GetSpawn(Player, 4701804), Player)
  48. end
  49. function Declined(Quest, QuestGiver, Player)
  50. end
  51. function Deleted(Quest, QuestGiver, Player)
  52. end
  53. function Reload(Quest, QuestGiver, Player, Step)
  54. if Step == 1 then
  55. GotRecipe(Quest, QuestGiver, Player)
  56. elseif Step == 2 then
  57. GotCoal(Quest, QuestGiver, Player)
  58. elseif Step == 3 then
  59. CraftedPaw(Quest, QuestGiver, Player)
  60. elseif Step == 4 then
  61. TalkedBull(Quest, QuestGiver, Player)
  62. elseif Step == 5 then
  63. CompleteQuest(Quest, QuestGiver, Player)
  64. end
  65. end