tutorial_the_art_of_weapons.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : Quests/FrostfangSea/tutorial_the_art_of_weapons.lua
  3. Script Purpose : Tutorial: The Art of Weapons
  4. Script Author : theFoof
  5. Script Date : 2013.10.19
  6. Script Notes :Edited 8/19/17 correct quest number in progress check and reload,
  7. Zone : Frostfang Sea
  8. Quest Giver : Glin Hammerhelm
  9. Preceded by : Tutorial: Learning to Cook
  10. Followed by : Tutorial: Scribing Scrolls
  11. --]]
  12. function Init(Quest)
  13. SetQuestFeatherColor(Quest, 2)
  14. AddQuestStepCraft(Quest, 1, "I need to create an elm greatstaff using the woodworking table.", 1, 100, "I must follow the tutor's instructions to review the crafting process.", 622, 76153)
  15. AddQuestStepCraft(Quest, 2, "I must create a tin hand axe using the forge.", 1, 100, "I must follow the tutor's instructions to review the crafting process.", 2154, 89113)
  16. AddQuestStepCompleteAction(Quest, 1, "MadeStaff")
  17. AddQuestStepCompleteAction(Quest, 2, "MadeAxe")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. end
  21. function Deleted(Quest, QuestGiver, Player)
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function MadeStaff(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I have created an elm greatstaff.")
  27. ProgressCheck(Quest, QuestGiver, Player)
  28. end
  29. function MadeAxe(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "I created a tin hand axe.")
  31. ProgressCheck(Quest, QuestGiver, Player)
  32. end
  33. function ProgressCheck(Quest, QuestGiver, Player)
  34. if QuestStepIsComplete(Player, 94, 1) and QuestStepIsComplete(Player, 94, 2) then
  35. UpdateQuestTaskGroupDescription(Quest, 1, "I have reviewed the process of crafting an item.")
  36. AddStep3(Quest, QuestGiver, Player)
  37. end
  38. end
  39. function AddStep3(Quest, QuestGiver, Player)
  40. SetCompleteFlag(Quest)
  41. AddQuestStepChat(Quest, 3, "I should return to the tutor with the weapons.", 1, "I should return to the tutor with my work.", 0, GetSpawnID(QuestGiver))
  42. AddQuestStepCompleteAction(Quest, 3, "CompleteQuest")
  43. end
  44. function CompleteQuest(Quest, QuestGiver, Player)
  45. GiveQuestReward(Quest, Player)
  46. end
  47. function Reload(Quest, QuestGiver, Player)
  48. if QuestStepIsComplete(Player, 94, 1) then
  49. MadeStaff(Quest, QuestGiver, Player)
  50. end
  51. if QuestStepIsComplete(Player, 94, 2) then
  52. MadeAxe(Quest, QuestGiver, Player)
  53. end
  54. end