if_i_had_a_hammer.lua 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. SendPopUpMessage(Player, "This quest cannot be fully completed yet. Do not report as bug.", 255, 0, 0)
  42. FaceTarget(QuestGiver, Player)
  43. conversation = CreateConversation()
  44. PlayFlavor(QuestGiver, "", "", "", 0, 0, Player)
  45. AddConversationOption(conversation, "I'll get those items now.")
  46. 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.")
  47. AddSpawnAccess(GetSpawn(Player, 4701805), Player)
  48. AddSpawnAccess(GetSpawn(Player, 4701804), Player)
  49. end
  50. function Declined(Quest, QuestGiver, Player)
  51. end
  52. function Deleted(Quest, QuestGiver, Player)
  53. end
  54. function Reload(Quest, QuestGiver, Player, Step)
  55. if Step == 1 then
  56. GotRecipe(Quest, QuestGiver, Player)
  57. elseif Step == 2 then
  58. GotCoal(Quest, QuestGiver, Player)
  59. elseif Step == 3 then
  60. CraftedPaw(Quest, QuestGiver, Player)
  61. elseif Step == 4 then
  62. TalkedBull(Quest, QuestGiver, Player)
  63. elseif Step == 5 then
  64. CompleteQuest(Quest, QuestGiver, Player)
  65. end
  66. end