selwyns_errands__part_iii.lua 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 II
  10. Followed by : Selwyn's Errands - Part IV
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I must repay several feign zombies for an injury to Selwyn in Stormhold.", 8, 100, "I'm almost done with resizing the next piece. If you could do me a favor dear and look for some old druid greenstone rings the Stormhold knights used to keep in their strongboxes that would mean a lot to me. And the things called feign zombies should be on your way to the library. Destroy a few of them just for me, they left me with a nasty bump one time and I like to make them pay for that. - Selwyn", 91, 2010031)
  15. AddQuestStepKill(Quest, 2, "I must recover the glowing greenstone rings kept in the strongboxes in Stormhold and bring them to Selwyn.", 8, 90, "I'm almost done with resizing the next piece. If you could do me a favor dear and look for some old druid greenstone rings the Stormhold knights used to keep in their strongboxes that would mean a lot to me. And the things called feign zombies should be on your way to the library. Destroy a few of them just for me, they left me with a nasty bump one time and I like to make them pay for that. - Selwyn", 2931, 2010002,2010013 ,2040001)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. UpdateQuestZone(Quest,"Stormhold")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. Dialog.New(QuestGiver, Player)
  23. Dialog.AddDialog( "Well, it seems some pesky undead have been wandering about, among other things. But could you go take care of them for me? I have the directions around here... ah ha! Here you are. Now you take care.")
  24. -- Dialog.AddVoiceover("voiceover/english/selwyn_oakheart/qey_south/quests/selwyn_oakheart/selwyn001.mp3", 390832885, 49061382)
  25. PlayFlavor(QuestGiver,"","","nod", 0, 0, Player)
  26. Dialog.AddOption( "Undead? They won't be trouble soon.")
  27. Dialog.Start()
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function Step1Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have destroyed several feign zombies for Selwyn.")
  33. CheckProgress(Quest, QuestGiver, Player)
  34. end
  35. function Step2Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "I have destroyed the mimics in Stormhold and recovered the rings from them.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function CheckProgress(Quest, QuestGiver, Player)
  40. if QuestStepIsComplete(Player, 5608, 1) and QuestStepIsComplete(Player, 5608, 2) then
  41. UpdateQuestTaskGroupDescription(Quest, 1, "I have done everything Selwyn has asked of me I should return to her.")
  42. UpdateQuestZone(Quest,"South Qeynos")
  43. AddQuestStepChat(Quest, 3, "I should return to Selwyn in South Qeynos.", 1, 100, "I need to speak to Selwyn Oakheart in South Qeynos.", 11,2310028)
  44. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  45. end
  46. end
  47. function QuestComplete(Quest, QuestGiver, Player)
  48. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  49. UpdateQuestStepDescription(Quest, 3, "I have returned to Selwyn in South Qeynos.")
  50. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Selwyn in South Qeynos.")
  51. UpdateQuestDescription(Quest, "Selwyn has paid me with some armor for my shoulders.")
  52. GiveQuestReward(Quest, Player)
  53. end
  54. function Reload(Quest, QuestGiver, Player, Step)
  55. if Step == 1 then
  56. Step1Complete(Quest, QuestGiver, Player)
  57. elseif Step == 2 then
  58. Step2Complete(Quest, QuestGiver, Player)
  59. elseif Step == 3 then
  60. QuestComplete(Quest, QuestGiver, Player)
  61. end
  62. end