9
3

selwyns_errands__part_i.lua 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 : None
  10. Followed by : Selwyn's Errands - Part II
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I must find and destroy the fetishes that the Sabertooth elders wear within Antonica.", 4, 100, "Thank you for the help dear. If you could do me two favors I should have those gloves for you in no time. Well first the foul Sabertooth gnolls are at their tricks again. They need to be taught a little bit of a lesson. If they can't handle their gifts responsibily we'll have to take their toys away. Destroy the fetishes that the Sabertooth elders wear, as many as you can. And I need to destroy several of the Caltorsis clerics out in the old ruins in Antonica. If you could do that for me it would go a long way to helping me out. - Selwyn", 372, 120376)
  15. AddQuestStepKill(Quest, 2, "I need to destroy the Caltorsis clerics within Antonica.", 20, 100, "Thank you for the help dear. If you could do me two favors I should have those gloves for you in no time. Well first the foul Sabertooth gnolls are at their tricks again. They need to be taught a little bit of a lesson. If they can't handle their gifts responsibily we'll have to take their toys away. Destroy the fetishes that the Sabertooth elders wear, as many as you can. And I need to destroy several of the Caltorsis clerics out in the old ruins in Antonica. If you could do that for me it would go a long way to helping me out. - Selwyn", 611, 120131)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. UpdateQuestZone(Quest,"Antonica")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. Dialog.New(QuestGiver, Player)
  23. Dialog.AddDialog( "Oh, I always make a list so I don't forget. Here let me get that out. Hrm ... oh yes I'd forgotten about that. Well, here you are. I'll just give it to you and write myself a new list for those adjustments. Thank you so much, dear, for your help.")
  24. -- Dialog.AddVoiceover("voiceover/english/selwyn_oakheart/qey_south/quests/selwyn_oakheart/selwyn001.mp3", 390832885, 49061382)
  25. PlayFlavor(QuestGiver,"","","agree", 0, 0, Player)
  26. Dialog.AddOption( "My pleasure Selwyn. I'll be back 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 found and destroyed the fetishes that the Sabertooth elders wear within Antonica.")
  33. CheckProgress(Quest, QuestGiver, Player)
  34. end
  35. function Step2Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "I have returned several Caltorsis clerics back to their graves.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function CheckProgress(Quest, QuestGiver, Player)
  40. if QuestStepIsComplete(Player, 5606, 1) and QuestStepIsComplete(Player, 5606, 2) and QuestStepIsComplete(Player, 5606, 3) then
  41. UpdateQuestTaskGroupDescription(Quest, 1, "I have completed all of Selwyn's errands I should return to her.")
  42. UpdateQuestZone(Quest,"South Qeynos")
  43. AddQuestStepChat(Quest, 3, "I should return to Selwyn in South Qeynos.", 1, "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 hands.")
  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