TheWheelOfVaniki.lua 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. --[[
  2. Script Name : Quests/TheCommonlands/TheWheelOfVaniki.lua
  3. Script Purpose : Handles the quest, "The Wheel of Vaniki"
  4. Script Author : premierio015
  5. Script Date : 23.05.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : World Event
  8. Quest Giver : Surveyor Menak
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "The Wheel is supposedly at a camp of "little ones."", 1, 100, "I need to locate the missing Wheel of Vaniki in the Commonlands at one of the camps.", 11)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. PlayAnimation(QuestGiver, 13064)
  19. local conversation = CreateConversation()
  20. AddConversationOption(conversation, "I'll take a look.")
  21. StartConversation(conversation, QuestGiver, Player, "Excellent! I know this is not nice to say about those we do not know, but there is a village in the Commonlands full of little ones. They took the Wheel and we must get it back. Go there, look around. They are not nice. The Wheel is ours!")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. -- Add dialog here for when the quest is declined
  25. end
  26. function Deleted(Quest, QuestGiver, Player)
  27. -- Remove any quest specific items here when the quest is deleted
  28. end
  29. function Step1Complete(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 1, "I've located the Wheel.")
  31. AddQuestStepChat(Quest, 2, "Speak with the Surveyor.", 1, "I need to locate the missing Wheel of Vaniki in the Commonlands at one of the camps.", 11, 330133)
  32. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  33. end
  34. function Step2Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I've spoken with Surveyor Menak.")
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I've found a Wheel, but it is incomplete.")
  37. AddQuestStepChat(Quest, 3, "Speak with Engineer Klaaska.", 1, "Surveyor Menak referred me to the engineer to learn more about the Wheel.", 11, 330278)
  38. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "Spoke with Engineer Klaaska.")
  42. UpdateQuestTaskGroupDescription(Quest, 2, "Engineer Klaaska gave me information about the Wheel.")
  43. GiveQuestItem(Quest, Player, "Engineer Klaaska gave me information about the Wheel.", 14377)
  44. AddQuestStep(Quest, 4, "Locate the Sacred Bottle of Contentment.", 1, 100, "I need to help the roekillik recreate the Wheel of Vaniki. Engineer Klaaska gave me some information on what I will need.", 11)
  45. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  46. end
  47. function Step4Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 4, "Found the Sacred Bottle of Contentment.")
  49. AddQuestStep(Quest, 5, "Examine the Wheel.", 1, 100, "I need to help the roekillik recreate the Wheel of Vaniki. Engineer Klaaska gave me some information on what I will need.", 11)
  50. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  51. end
  52. function Step5Complete(Quest, QuestGiver, Player)
  53. UpdateQuestStepDescription(Quest, 5, "Examined the Wheel.")
  54. AddQuestStep(Quest, 6, "Locate the Vial of Interaction.", 1, 100, "I need to help the roekillik recreate the Wheel of Vaniki. Engineer Klaaska gave me some information on what I will need.", 11)
  55. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  56. end
  57. function Step6Complete(Quest, QuestGiver, Player)
  58. UpdateQuestStepDescription(Quest, 6, "Found the Vial of Interaction.")
  59. AddQuestStep(Quest, 7, "Examine the Wheel.", 1, 100, "I need to help the roekillik recreate the Wheel of Vaniki. Engineer Klaaska gave me some information on what I will need.", 11)
  60. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  61. end
  62. function Step7Complete(Quest, QuestGiver, Player)
  63. UpdateQuestStepDescription(Quest, 7, "Examined the Wheel.")
  64. AddQuestStep(Quest, 8, "Locate the Ancient Alkaline Barrel.", 1, 100, "I need to help the roekillik recreate the Wheel of Vaniki. Engineer Klaaska gave me some information on what I will need.", 11)
  65. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  66. end
  67. function Step8Complete(Quest, QuestGiver, Player)
  68. UpdateQuestStepDescription(Quest, 8, "Found the Ancient Alkaline Barrel.")
  69. AddQuestStep(Quest, 9, "Examine the Wheel.", 1, 100, "I need to help the roekillik recreate the Wheel of Vaniki. Engineer Klaaska gave me some information on what I will need.", 11)
  70. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  71. end
  72. function Step9Complete(Quest, QuestGiver, Player)
  73. UpdateQuestStepDescription(Quest, 9, "Examined the Wheel.")
  74. AddQuestStepChat(Quest, 10, "I should take the Wheel back to Engineer Klaaska.", 1, "I need to help the roekillik recreate the Wheel of Vaniki. Engineer Klaaska gave me some information on what I will need.", 11, 330278)
  75. AddQuestStepCompleteAction(Quest, 10, "QuestComplete")
  76. end
  77. function QuestComplete(Quest, QuestGiver, Player)
  78. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  79. UpdateQuestStepDescription(Quest, 10, "I've recreated the Wheel of Vaniki for the roekillik.")
  80. UpdateQuestTaskGroupDescription(Quest, 3, "I've recreated the Wheel of Vaniki.")
  81. UpdateQuestDescription(Quest, "After doing a bit of leg work, I restored the Wheel of Vaniki. Turns out it's not a mystical ancient artifact as I thought, but a huge wheel of cheese! Even though the roekillik and I didn't exactly see eye-to-eye on things, at least they paid me for my efforts.")
  82. GiveQuestReward(Quest, Player)
  83. end
  84. function Reload(Quest, QuestGiver, Player, Step)
  85. if Step == 1 then
  86. Step1Complete(Quest, QuestGiver, Player)
  87. elseif Step == 2 then
  88. Step2Complete(Quest, QuestGiver, Player)
  89. elseif Step == 3 then
  90. Step3Complete(Quest, QuestGiver, Player)
  91. elseif Step == 4 then
  92. Step4Complete(Quest, QuestGiver, Player)
  93. elseif Step == 5 then
  94. Step5Complete(Quest, QuestGiver, Player)
  95. elseif Step == 6 then
  96. Step6Complete(Quest, QuestGiver, Player)
  97. elseif Step == 7 then
  98. Step7Complete(Quest, QuestGiver, Player)
  99. elseif Step == 8 then
  100. Step8Complete(Quest, QuestGiver, Player)
  101. elseif Step == 9 then
  102. Step9Complete(Quest, QuestGiver, Player)
  103. elseif Step == 10 then
  104. QuestComplete(Quest, QuestGiver, Player)
  105. end
  106. end