tutorial_countering_problems.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. SummonItem(Player, 31373, 1)
  19. SummonItem(Player, 4142, 1)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. AddConversationOption(conversation, "I'll do my best!")
  23. 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.")
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. end
  29. function CraftedBracelet(Quest, QuestGiver, Player)
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I have created a lead bracelet.")
  31. 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))
  32. AddQuestStepCompleteAction(Quest, 2, "CompleteQuest")
  33. end
  34. function CompleteQuest(Quest, QuestGiver, Player)
  35. GiveQuestReward(Quest, Player)
  36. end
  37. function Reload(Quest, QuestGiver, Player, Step)
  38. if Step == 1 then
  39. CraftedBracelet(Quest, QuestGiver, Player)
  40. end
  41. end