9
3

vegalys_keldranes_betrayal.lua 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. --[[
  2. Script Name : Quests/TheCryptofBetrayal/vegalys_keldranes_betrayal.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.10.15 09:10:40
  5. Script Purpose :
  6. Zone : TheCryptofBetrayal
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepChat(Quest, 1, "I need to speak with Vegalys Keldrane's fallen comrade, Adun.", 1, "I must speak with Vegalys Keldrane's three fallen comrades here in the Crypt of Betrayal.", 11, 2010020)
  13. AddQuestStepChat(Quest, 2, "I need to speak with Vegalys Keldrane's fallen comrade, Borthen.", 1, "I must speak with Vegalys Keldrane's three fallen comrades here in the Crypt of Betrayal.", 11, 2010025)
  14. AddQuestStepChat(Quest, 3, "I need to speak with Vegalys Keldrane's fallen comrade, Vargon.", 1, "I must speak with Vegalys Keldrane's three fallen comrades here in the Crypt of Betrayal.", 11, 2010032)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. local conversation = CreateConversation()
  22. PlayFlavor(QuestGiver, "voiceover/english/vegalys_keldrane/qey_catacomb03/keldrane_dialog005.mp3", "", "", 1342332250, 3378137049, Player)
  23. AddConversationOption(conversation, "It's my pleasure.")
  24. StartConversation(conversation, QuestGiver, Player, "Good. Perhaps within their tales, we can set truth apart from lies.")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is declined
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. -- Remove any quest specific items here when the quest is deleted
  31. end
  32. function Step1Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have spoken with Adun.")
  34. CheckProgress(Quest, QuestGiver, Player)
  35. end
  36. function Step2Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I spoke with Borthen.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I spoke with Vargon.")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function CheckProgress(Quest, QuestGiver, Player)
  45. if QuestStepIsComplete(Player, 5371, 1) and QuestStepIsComplete(Player, 5371, 2) and QuestStepIsComplete(Player, 5371, 3) then
  46. UpdateQuestTaskGroupDescription(Quest, 1, "I have spoken with all of Vegalys Keldrane's fallen comrades. Now I need to speak again with Keldrane himself.")
  47. AddQuestStepChat(Quest, 4, "Vegalys Keldrane's spirit is within the Crypt of Betrayal.", 1, "I must speak with Vegalys Keldrane.", 11, 2010030)
  48. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  49. end
  50. end
  51. function QuestComplete(Quest, QuestGiver, Player)
  52. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  53. UpdateQuestStepDescription(Quest, 4, "I spoke with Vegalys Keldrane's spirit.")
  54. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken to Vegalys Keldrane.")
  55. UpdateQuestDescription(Quest, "There is much unrest in the Crypt of Betrayal. The passions, both love and hatred, have followed the dead. Hopefully, the information I gleaned from the spirits of his fallen comrades will put Vegalys Keldrane's spirit at ease.")
  56. GiveQuestReward(Quest, Player)
  57. end
  58. function Reload(Quest, QuestGiver, Player, Step)
  59. if Step == 1 then
  60. Step1Complete(Quest, QuestGiver, Player)
  61. elseif Step == 2 then
  62. Step2Complete(Quest, QuestGiver, Player)
  63. elseif Step == 3 then
  64. Step3Complete(Quest, QuestGiver, Player)
  65. elseif Step == 4 then
  66. QuestComplete(Quest, QuestGiver, Player)
  67. end
  68. end