tutorial_forging_ahead.lua 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. --[[
  2. Script Name : Quests/FrostfangSea/tutorial_forging_ahead.lua
  3. Script Purpose : Tutorial: Forging Ahead
  4. Script Author : theFoof
  5. Script Date : 2013.10.6
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Glin Hammerhelm
  9. Preceded by : Tutorial: Learning to Harvest
  10. Followed by : Tutorial: Countering Problems
  11. --]]
  12. function Init(Quest)
  13. SetQuestFeatherColor(Quest, 2)
  14. AddQuestStepCraft(Quest, 1, "I need to create a simple candelabra using the recipe the tutor gave me.", 1, 100, "I must follow the tutor's instructions to create a simple candelabra.", 189, 64876)
  15. AddQuestStepCompleteAction(Quest, 1, "CraftedCandelabra")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. SummonItem(Player, 31371, 1)
  19. SummonItem(Player, 4142, 1)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. AddConversationOption(conversation, "Thanks. Here I go.")
  23. StartConversation(conversation, QuestGiver, Player, "Of course, it'll be easier to understand once you can see it in action. Here's a recipe book, and some fuel. Scribe the recipe book by finding it in your inventory and right-clicking it. Check that you have some elm, tin, and roots in your bags, and head over to the forge. Click on the forge to bring up your recipe list, and select the recipe for the simple candelabra.")
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. end
  29. function CraftedCandelabra(Quest, QuestGiver, Player)
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I have reviewed the process of crafting an item.")
  31. AddQuestStepChat(Quest, 2, "I should return to the tutor with my candelabra.", 1, "I should return to the tutor with the candelabra.", 0, 4700220)
  32. AddQuestStepCompleteAction(Quest, 2, "CompleteQuest")
  33. SetCompleteFlag(Quest)
  34. end
  35. function CompleteQuest(Quest, QuestGiver, Player)
  36. UpdateQuestDescription(Quest,"I created the candelabra as instructed by the tutor.")
  37. GiveQuestReward(Quest, Player)
  38. end
  39. function Reload(Quest, QuestGiver, Player, Step)
  40. if Step == 1 then
  41. CraftedCandelabra(Quest, QuestGiver, Player)
  42. end
  43. if Step == 2 then
  44. CompleteQuest(Quest, QuestGiver, Player)
  45. end
  46. end