tutorial_essential_outfitting.lua 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. --[[
  2. Script Name : Quests/FrostfangSea/tutorial_essential_outfitting.lua
  3. Script Author : theFoof
  4. Script Date : 2013.10.20
  5. Script Notes :
  6. Zone : Frostfang Sea
  7. Quest Giver : Glin Hammerhelm
  8. Preceded by : Tutorial: Alchemical Experiments
  9. Followed by : None
  10. --]]
  11. function Init(Quest)
  12. SetQuestFeatherColor(Quest, 2)
  13. AddQuestStepCraft(Quest, 1, "I need to create a chainmail coat using the forge.", 1, 100, "I must follow the tutor's instructions to review the crafting process.", 2407, 185658)
  14. AddQuestStepCraft(Quest, 2, "I must create a rawhide backpack using the sewing table.", 1, 100, "I must follow the tutor's instructions to review the crafting process.", 402, 20827)
  15. AddQuestStepCompleteAction(Quest, 1, "MadeCoat")
  16. AddQuestStepCompleteAction(Quest, 2, "MadePack")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. end
  20. function Deleted(Quest, QuestGiver, Player)
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. end
  24. function MadeCoat(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have created a chainmail coat.")
  26. ProgressCheck(Quest, QuestGiver, Player)
  27. end
  28. function MadePack(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 2, "I created a rawhide backpack.")
  30. ProgressCheck(Quest, QuestGiver, Player)
  31. end
  32. function ProgressCheck(Quest, QuestGiver, Player)
  33. if QuestStepIsComplete(Player, 97, 1) and QuestStepIsComplete(Player, 97, 2) then
  34. AddStep3(Quest, QuestGiver, Player)
  35. end
  36. end
  37. function AddStep3(Quest, QuestGiver, Player)
  38. SetCompleteFlag(Quest)
  39. UpdateQuestTaskGroupDescription(Quest, 1, "I have reviewed the process of crafting an item.")
  40. AddQuestStepChat(Quest, 3, "I should return to the tutor with the equipment I created.", 1, "I should return to the tutor with my work.", 0, GetSpawnID(QuestGiver))
  41. AddQuestStepCompleteAction(Quest, 3, "CompleteQuest")
  42. end
  43. function CompleteQuest(Quest, QuestGiver, Player)
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if QuestStepIsComplete(Player, 97, 1) then
  48. MadeCoat(Quest, QuestGiver, Player)
  49. end
  50. if QuestStepIsComplete(Player, 97, 2) then
  51. MadePack(Quest, QuestGiver, Player)
  52. end
  53. end