selwyns_errands__part_iv.lua 5.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. --[[
  2. Script Name : selwyns_errands_-_part_v.lua
  3. Script Purpose : Handles the quest, "Selwyn's Errands - Part V"
  4. Script Author : Dorbin
  5. Script Date : 7/8/2022
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : The City of Qeynos
  8. Quest Giver : Selwyn
  9. Preceded by : Selwyn's Errands - Part III
  10. Followed by : Selwyn's Errands - Part V
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I must destroy the diseased corpses within the Crypt of Betrayal.", 10, 100, "Everything you've done has been so nice. I can make the other alterations but have a little bigger set of errands this time. We must ever keep the numbers of the rising undead down within the catacombs, if you could go down to the Crypt of Betrayal and destroy several of the diseased corpses it would do me and Qeynos a favor. Also, the scarabs always increase in number, can you make sure they get a decrease this time? And lastly if you can find some of the shrillers within the catacombs, make sure to bring me some of their wings. - Selwyn", 91, 2010031)
  15. AddQuestStepKill(Quest, 2, "I must squash several of the deathly scarabs within the Crypt of Betrayal.", 20, 100, "Everything you've done has been so nice. I can make the other alterations but have a little bigger set of errands this time. We must ever keep the numbers of the rising undead down within the catacombs, if you could go down to the Crypt of Betrayal and destroy several of the diseased corpses it would do me and Qeynos a favor. Also, the scarabs always increase in number, can you make sure they get a decrease this time? And lastly if you can find some of the shrillers within the catacombs, make sure to bring me some of their wings. - Selwyn", 1806, 2010002,2010013 ,2040001)
  16. AddQuestStepKill(Quest, 3, "I must collect some forsaken shriller wings for Selwyn within the Crypt of Betrayal.", 15, 100, "Everything you've done has been so nice. I can make the other alterations but have a little bigger set of errands this time. We must ever keep the numbers of the rising undead down within the catacombs, if you could go down to the Crypt of Betrayal and destroy several of the diseased corpses it would do me and Qeynos a favor. Also, the scarabs always increase in number, can you make sure they get a decrease this time? And lastly if you can find some of the shrillers within the catacombs, make sure to bring me some of their wings. - Selwyn", 140, 2010003, 2010026, 2010035)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  20. UpdateQuestZone(Quest,"Crypt of Betrayal")
  21. end
  22. function Accepted(Quest, QuestGiver, Player)
  23. FaceTarget(QuestGiver, Player)
  24. Dialog.New(QuestGiver, Player)
  25. Dialog.AddDialog( "Oh, mercy no! I usually take Mr. Whiskers with me, he makes wonderful company when he isn't sleeping in some warm sunbeam. It would get lonely out in the wilds smiting the undead abominations all by my lonesome. Oh, where are my manners! You probably don't want to hear that. Here, let me give you the list and let you get going.")
  26. -- Dialog.AddVoiceover("voiceover/english/selwyn_oakheart/qey_south/quests/selwyn_oakheart/selwyn001.mp3", 390832885, 49061382)
  27. PlayFlavor(QuestGiver,"","","heckno", 0, 0, Player)
  28. Dialog.AddOption( "Um, sure. I'll be back.")
  29. Dialog.Start()
  30. end
  31. function Declined(Quest, QuestGiver, Player)
  32. -- Add dialog here for when the quest is declined
  33. end
  34. function Deleted(Quest, QuestGiver, Player)
  35. -- Remove any quest specific items here when the quest is deleted
  36. end
  37. function Step1Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 1, "I have destroyed several of the diseased corpses.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function Step2Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 2, "I have squashed several of the deathly scarabs.")
  43. CheckProgress(Quest, QuestGiver, Player)
  44. end
  45. function Step3Complete(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 3, "I have collected the shriller wings Selwyn needed")
  47. CheckProgress(Quest, QuestGiver, Player)
  48. end
  49. function CheckProgress(Quest, QuestGiver, Player)
  50. if QuestStepIsComplete(Player, 5609, 1) and QuestStepIsComplete(Player, 5609, 2) and QuestStepIsComplete(Player, 5609, 3) then
  51. UpdateQuestTaskGroupDescription(Quest, 1, "I have completed all of Selwyn's errands I should return to her.")
  52. UpdateQuestZone(Quest,"South Qeynos")
  53. AddQuestStepChat(Quest, 4, "I should return to Selwyn in South Qeynos.", 1, "I need to speak to Selwyn Oakheart in South Qeynos.", 11, 2310028)
  54. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  55. end
  56. end
  57. function QuestComplete(Quest, QuestGiver, Player)
  58. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  59. UpdateQuestStepDescription(Quest, 4, "I have returned to Selwyn in South Qeynos.")
  60. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Selwyn in South Qeynos.")
  61. UpdateQuestDescription(Quest, "Selwyn has paid me with some armor for my shoulders.")
  62. GiveQuestReward(Quest, Player)
  63. end
  64. function Reload(Quest, QuestGiver, Player, Step)
  65. if Step == 1 then
  66. Step1Complete(Quest, QuestGiver, Player)
  67. elseif Step == 2 then
  68. Step2Complete(Quest, QuestGiver, Player)
  69. elseif Step == 3 then
  70. Step3Complete(Quest, QuestGiver, Player)
  71. elseif Step == 4 then
  72. QuestComplete(Quest, QuestGiver, Player)
  73. end
  74. end