essence_hunting_for_obidudyn.lua 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --[[
  2. Script Name : Quests/StarcrestCommune/essence_hunting_for_obidudyn.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.01 06:07:52
  5. Script Purpose :
  6. Zone : StarcrestCommune
  7. Quest Giver: Scholar Obidudyn
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I must gather the essence of forgotten guardians in the forest ruins.", 6, 85, "I need to collect six Essence of Elemental for Scholar Obidudyn. To do this I need to crush forgotten guardians in the Forest Ruins.", 2515, 1960038, 1960058,8270056,8270011,8270009,8270061,8270062,8270063)
  14. AddQuestStepCompleteAction(Quest, 1, "step1_complete_killedGuardians")
  15. UpdateQuestZone(Quest, "Forest Ruins")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("Splended. You show immense promise. You will find fire and earth elements in the old Forest Ruins. I require several of the essences of elementals. Though I believe assisting me in my studies is payment enough, I understand the needs of others. Therefore, I shall compensate you for your time.")
  21. PlayFlavor(QuestGiver, "", "", "nod", 0, 0, Player)
  22. Dialog.AddVoiceover("voiceover/english/scholar_obidudyn/qey_village02/scholarobidudyn002.mp3", 3440536439, 973813642)
  23. Dialog.AddOption("That is quite gracious of you. I'll be back.")
  24. Dialog.AddOption("Well, I would hope so. I'll return with the essences.")
  25. Dialog.Start()
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. -- Add dialog here for when the quest is declined
  29. end
  30. function Deleted(Quest, QuestGiver, Player)
  31. -- Remove any quest specific items here when the quest is deleted
  32. end
  33. function step1_complete_killedGuardians(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have gathered the essence I needed.")
  35. UpdateQuestTaskGroupDescription(Quest, 1, "I collected six Essence of Elemental for Scholar Obidudyn.")
  36. UpdateQuestZone(Quest, "Starcrest Commune")
  37. AddQuestStepChat(Quest, 2, "I must return to Scholar Obidudyn.", 1, "I need to return to Scholar Obidudyn in Starcrest Commune.", 2515, 2340034)
  38. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  39. end
  40. function QuestComplete(Quest, QuestGiver, Player)
  41. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  42. UpdateQuestStepDescription(Quest, 2, "I have returned to Scholar Obidudyn.")
  43. UpdateQuestTaskGroupDescription(Quest, 2, "I delivered six Essence of Elemental to Scholar Obidudyn.")
  44. UpdateQuestDescription(Quest, "I was able to collect six Essence of Elemental that Scholar Obidudyn tasked me with finding and paid me for the job. He seemed a little surprised in how quickly I managed to fulfill his request.")
  45. GiveQuestReward(Quest, Player)
  46. end
  47. function Reload(Quest, QuestGiver, Player, Step)
  48. if Step == 1 then
  49. step1_complete_killedGuardians(Quest, QuestGiver, Player)
  50. end
  51. end