destroying_the_goblins_supplies.lua 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --[[
  2. Script Name : Quests/IsleofRefuge/destroying_the_goblins_supplies.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.10 08:09:07
  5. Script Purpose :
  6. Zone : IsleofRefuge
  7. Quest Giver: Mizan Vaeolin
  8. Preceded by: Speaking with Mizan
  9. Followed by: Gathering Sealant Components
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to destroy five supply crates with my Lightning Burst spell.", 5, 100, "I need to raid the goblin supply camps west of the outpost and destroy five supply crates with my Lightning Burst spell.", 566, 3250067)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. Dialog.New(QuestGiver, Player)
  19. Dialog.AddDialog("Excellent. Others are heading towards the camp now. Use your lightning burst spell to destroy the goblin supply crates. You must ruin several of the crates, if you are successful you shall receive a reward. Please report back to me when you have completed this assignment.")
  20. Dialog.AddVoiceover("voiceover/english/mizan_vaeoulin/tutorial_island02/mizanvaeoulin004.mp3", 2611909866, 614181676)
  21. PlayFlavor(QuestGiver, "", "", "nod", 0, 0, Player)
  22. Dialog.AddOption("I will take care of the supply crates.")
  23. Dialog.Start()
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. -- Add dialog here for when the quest is declined
  27. end
  28. function Deleted(Quest, QuestGiver, Player)
  29. -- Remove any quest specific items here when the quest is deleted
  30. end
  31. function Step1Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I destroyed five supply crates.")
  33. UpdateQuestTaskGroupDescription(Quest, 1, "I destroyed five supply crates.")
  34. AddQuestStepChat(Quest, 2, "I need to report back to Mizan.", 1, "I need to return to Mizan in the outpost and report the crates' destruction to him.", 11, 3250057)
  35. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I reported back to Mizan.")
  39. UpdateQuestTaskGroupDescription(Quest, 2, "I reported back to Mizan.")
  40. AddQuestStepChat(Quest, 3, "I need to visit the bank to pick up my boots.", 1, "I need to go to the bank in the village to pick up my boots.", 11, 3250036)
  41. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  42. end
  43. function QuestComplete(Quest, QuestGiver, Player)
  44. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  45. UpdateQuestStepDescription(Quest, 3, "I visited the bank to pick up my boots.")
  46. UpdateQuestTaskGroupDescription(Quest, 3, "I've gone to the bank in the village to pick up my boots.")
  47. UpdateQuestDescription(Quest, "Mizan was grateful for my help and rewarded me with a pair of boots he placed in my bank. Hopefully my work contributed to slow down the goblins attacks.")
  48. GiveQuestReward(Quest, Player)
  49. end
  50. function Reload(Quest, QuestGiver, Player, Step)
  51. if Step == 1 then
  52. Step1Complete(Quest, QuestGiver, Player)
  53. elseif Step == 2 then
  54. Step2Complete(Quest, QuestGiver, Player)
  55. elseif Step == 3 then
  56. QuestComplete(Quest, QuestGiver, Player)
  57. end
  58. end