9
3

selwyns_errands__part_v.lua 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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 IV
  10. Followed by : Selwyn's Errands - Part VI
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I must give the unearthed settlers within the Thundering Steppes their final rest.", 8, 100, "Oh thank you dear for all your help. I'm almost done with all the armor if you'll give me a little while longer. I do have some other errands though, a druid's work is never done. The settlers within the Thundering Steppes always make me feel so sorry for them, if you could find some of them and lay them to rest it would do my heart good. A friend of mine thinks he's seen several of the Sabertooth diviners trying to use their influence to raid the docks. If you could find them and convince them to change their plans that would be good. And both the swarm beetles and corpse feeders have gotten too plentiful in the Steppes. It's hurting the other local animals, please reduce their numbers - Selwyn", 91, 2490150)
  15. AddQuestStepKill(Quest, 2, "I must teach the Sabertooth diviners the error of their ways.", 12, 100, "Oh thank you dear for all your help. I'm almost done with all the armor if you'll give me a little while longer. I do have some other errands though, a druid's work is never done. The settlers within the Thundering Steppes always make me feel so sorry for them, if you could find some of them and lay them to rest it would do my heart good. A friend of mine thinks he's seen several of the Sabertooth diviners trying to use their influence to raid the docks. If you could find them and convince them to change their plans that would be good. And both the swarm beetles and corpse feeders have gotten too plentiful in the Steppes. It's hurting the other local animals, please reduce their numbers - Selwyn", 611, 170019,2490312 )
  16. AddQuestStepKill(Quest, 3, "I need to cut the number of swarm beetles in the Steppes.", 25, 100, "Oh thank you dear for all your help. I'm almost done with all the armor if you'll give me a little while longer. I do have some other errands though, a druid's work is never done. The settlers within the Thundering Steppes always make me feel so sorry for them, if you could find some of them and lay them to rest it would do my heart good. A friend of mine thinks he's seen several of the Sabertooth diviners trying to use their influence to raid the docks. If you could find them and convince them to change their plans that would be good. And both the swarm beetles and corpse feeders have gotten too plentiful in the Steppes. It's hurting the other local animals, please reduce their numbers - Selwyn", 1811, 2490058)
  17. AddQuestStepKill(Quest, 4, "I need to cut the number of corpse feeders in the Steppes.", 12, 100, "Oh thank you dear for all your help. I'm almost done with all the armor if you'll give me a little while longer. I do have some other errands though, a druid's work is never done. The settlers within the Thundering Steppes always make me feel so sorry for them, if you could find some of them and lay them to rest it would do my heart good. A friend of mine thinks he's seen several of the Sabertooth diviners trying to use their influence to raid the docks. If you could find them and convince them to change their plans that would be good. And both the swarm beetles and corpse feeders have gotten too plentiful in the Steppes. It's hurting the other local animals, please reduce their numbers - Selwyn", 77, 2490128)
  18. UpdateQuestZone(Quest,"Thundering Steppes")
  19. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  20. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  21. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  22. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  23. end
  24. function Accepted(Quest, QuestGiver, Player)
  25. FaceTarget(QuestGiver, Player)
  26. Dialog.New(QuestGiver, Player)
  27. Dialog.AddDialog( "I certainly try. A druid's work is never done, of course. Sun and season wait for no one. Please take the list and do what you can. It's a long one today, but I'm sure you'll manage. And I should be able to finish up those leggings by the time you get back.")
  28. -- Dialog.AddVoiceover("voiceover/english/selwyn_oakheart/qey_south/quests/selwyn_oakheart/selwyn001.mp3", 390832885, 49061382)
  29. PlayFlavor(QuestGiver,"","","agree", 0, 0, Player)
  30. Dialog.AddOption( "Your tone ... nevermind. I'll return when I'm done.")
  31. Dialog.Start()
  32. end
  33. function Declined(Quest, QuestGiver, Player)
  34. -- Add dialog here for when the quest is declined
  35. end
  36. function Deleted(Quest, QuestGiver, Player)
  37. -- Remove any quest specific items here when the quest is deleted
  38. end
  39. function Step1Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 1, "I have given the unearthed settlers their final rest.")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function Step2Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 2, "I have taught the Sabertooth diviners the error of their ways.")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function Step3Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 3, "I have decreased the number of swarm beetles within the Steppes.")
  49. CheckProgress(Quest, QuestGiver, Player)
  50. end
  51. function Step4Complete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 4, "I have decreased the number of corpse feeders within the Steppes.")
  53. CheckProgress(Quest, QuestGiver, Player)
  54. end
  55. function CheckProgress(Quest, QuestGiver, Player)
  56. if QuestStepIsComplete(Player, 5610, 1) and QuestStepIsComplete(Player, 5610, 2) and QuestStepIsComplete(Player, 5610, 3) and QuestStepIsComplete(Player, 5610, 4) then
  57. UpdateQuestTaskGroupDescription(Quest, 1, "I have completed Selwyn's errands. I should return to her.")
  58. UpdateQuestZone(Quest,"South Qeynos")
  59. AddQuestStepChat(Quest, 5, "I should return to Selwyn in South Qeynos", 1, "I need to speak to Selwyn Oakheart in the South Qeynos.", 11, 2310028)
  60. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  61. end
  62. end
  63. function QuestComplete(Quest, QuestGiver, Player)
  64. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  65. UpdateQuestStepDescription(Quest, 5, "I have returned to Selwyn in South Qeynos.")
  66. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Selwyn in South Qeynos.")
  67. UpdateQuestDescription(Quest, "Selwyn has paid me with some armor for my legs.")
  68. GiveQuestReward(Quest, Player)
  69. end
  70. function Reload(Quest, QuestGiver, Player, Step)
  71. if Step == 1 then
  72. Step1Complete(Quest, QuestGiver, Player)
  73. elseif Step == 2 then
  74. Step2Complete(Quest, QuestGiver, Player)
  75. elseif Step == 3 then
  76. Step3Complete(Quest, QuestGiver, Player)
  77. elseif Step == 4 then
  78. Step4Complete(Quest, QuestGiver, Player)
  79. elseif Step == 5 then
  80. QuestComplete(Quest, QuestGiver, Player)
  81. end
  82. end