ians_forgetful_family__part_i.lua 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. --[[
  2. Script Name : Quests/QeynosHarbor/ians_forgetful_family__part_i.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.15 04:06:50
  5. Script Purpose :
  6. Zone : QeynosHarbor
  7. Quest Giver: Ian Cathlan
  8. Preceded by: None
  9. Followed by: Ian's Forgetful Family - Part II
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "Ian's brother lost the royal spades out of his deck of cards while fighting Sabertooth tormentors in Antonica.", 4, 100, "My brother, being the ever present adventurer that he is, happened to lose an entire suit of spades from the deck of cards we gave him for his birthday. He was out fighting Sabertooth tormentors in Antonica when he lost them. If you could look around them it's probably a good start. And I happened to lose my journal fighting undead knights near the Caltorsis ruins. If you could try and recover what you can of my missing pages I'd very much appreciate it. - Ian", 2298, 121450,121451,120380,120381)
  14. AddQuestStepKill(Quest, 2, "I should try and collect the pages from Caltorsis knights out of Ian's old journal in Antonica.", 20, 100, "My brother, being the ever present adventurer that he is, happened to lose an entire suit of spades from the deck of cards we gave him for his birthday. He was out fighting Sabertooth tormentors in Antonica when he lost them. If you could look around them it's probably a good start. And I happened to lose my journal fighting undead knights near the Caltorsis ruins. If you could try and recover what you can of my missing pages I'd very much appreciate it. - Ian", 2179, 120126,120126)
  15. UpdateQuestZone(Quest, "Antonica")
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. Dialog.New(QuestGiver, Player)
  22. Dialog.AddDialog("I've a list of places where I may have misplaced a few things. Check the area to see if you can find anything. ")
  23. Dialog.AddVoiceover("voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan004.mp3", 4043265445, 3117554557)
  24. Dialog.AddOption("I'll return if I find anything.")
  25. Dialog.Start()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 found the cards Ian's brother lost.")
  34. CheckProgress(Quest, QuestGiver, Player)
  35. end
  36. function Step2Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I have the missing pages Ian lost, though they are all a bit mangled.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function CheckProgress(Quest, QuestGiver, Player)
  41. if QuestStepIsComplete(Player, 5588, 1) and QuestStepIsComplete(Player, 5588, 2) then
  42. UpdateQuestTaskGroupDescription(Quest, 1, "I have recovered Ian's lost journal pages and missing cards. I should return to him.")
  43. UpdateQuestZone(Quest, "Qeynos Harbor")
  44. AddQuestStepChat(Quest, 3, "I should return to Ian in Qeynos Harbor.", 1, "I need to speak to Ian Cathlan in the Qeynos Harbor.", 11, 2210084)
  45. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  46. end
  47. end
  48. function QuestComplete(Quest, QuestGiver, Player)
  49. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  50. UpdateQuestStepDescription(Quest, 3, "I have returned to Ian in Qeynos Harbor.")
  51. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Ian in Qeynos Harbor.")
  52. UpdateQuestDescription(Quest, "Ian has rewarded me with armor for collecting a few of his lost family's possessions.")
  53. GiveQuestReward(Quest, Player)
  54. end
  55. function Reload(Quest, QuestGiver, Player, Step)
  56. if Step == 1 then
  57. Step1Complete(Quest, QuestGiver, Player)
  58. elseif Step == 2 then
  59. Step2Complete(Quest, QuestGiver, Player)
  60. elseif Step == 3 then
  61. QuestComplete(Quest, QuestGiver, Player)
  62. end
  63. end