tutorial_countering_problems.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --[[
  2. Script Name : Quests/FrostfangSea/tutorial_countering_problems.lua
  3. Script Purpose : Tutorial: Countering Problems
  4. Script Author : theFoof
  5. Script Date : 2013.10.9
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Glin Hammerhelm
  9. Preceded by : Tutorial: Forging Ahead
  10. Followed by : Tutorial: Learning to Cook
  11. --]]
  12. function Init(Quest)
  13. SetQuestFeatherColor(Quest, 2)
  14. AddQuestStepCraft(Quest, 1, "I need to create a lead bracelet using the recipe the tutor gave me.", 1, 100, "I must follow the tutor's instructions to review the crafting process.", 952, 151332)
  15. AddQuestStepCompleteAction(Quest, 1, "CraftedBracelet")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. GiveQuestItem(Quest,Player,".",4142,31373)
  19. FaceTarget(QuestGiver, Player)
  20. conversation = CreateConversation()
  21. AddConversationOption(conversation, "I'll do my best!")
  22. StartConversation(conversation, QuestGiver, Player, "No, that was a particularly easy recipe. In most other cases though, you have the chance of these warnings appearing. They're random, but will always occur at the beginning of a new crafting round. You have until the end of that 4 second round to counter the event. I'd like you to go to the jeweler's workbench now and create a lead bracelet. You'll find the recipe in this book. Take care this time to watch out for warnings and counter them correctly. And don't forget you can also use your arts to help out even when there's no warning showing.")
  23. end
  24. function Deleted(Quest, QuestGiver, Player)
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. end
  28. function CraftedBracelet(Quest, QuestGiver, Player)
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I have reviewed the process of crafting an item.")
  30. AddQuestStepChat(Quest, 2, "I should return to the tutor with my bracelet.", 1, "I should return to the tutor with my bracelet.", 0, GetSpawnID(QuestGiver))
  31. AddQuestStepCompleteAction(Quest, 2, "CompleteQuest")
  32. end
  33. function CompleteQuest(Quest, QuestGiver, Player)
  34. GiveQuestReward(Quest, Player)
  35. end
  36. function Reload(Quest, QuestGiver, Player, Step)
  37. if Step == 1 then
  38. CraftedBracelet(Quest, QuestGiver, Player)
  39. end
  40. end