vaughns_stuff.lua 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --[[
  2. Script Name : Quests/TheForestRuins/vaughns_stuff.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.02.21 02:02:37
  5. Script Purpose :
  6. Zone : TheForestRuins
  7. Quest Giver: Outrider Vaughn
  8. Preceded by: None
  9. Followed by: Letter for Hunter Forestdeep (5484)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "Recover the satchel.", 1, 15, " I need to recover the Outlander's satchel and the items that were in it. The Blackfurl deckhands were the ones that stole the Outlanders gear, I'll start with them.", 399, 1960060,8270058, 8270059, 8270060)
  13. AddQuestStepKill(Quest, 2, "Recover the journal.", 1, 30, " I need to recover the Outlander's satchel and the items that were in it. The Blackfurl deckhands were the ones that stole the Outlanders gear, I'll start with them.", 195, 1960060 ) -- need correct icon
  14. AddQuestStepKill(Quest, 3, "Recover the ring.", 1, 20, " I need to recover the Outlander's satchel and the items that were in it. The Blackfurl deckhands were the ones that stole the Outlanders gear, I'll start with them.", 596, 1960060 ) -- need correct icon
  15. AddQuestStepKill(Quest, 4, "Recover the sealed letter.", 1, 25, " I need to recover the Outlander's satchel and the items that were in it. The Blackfurl deckhands were the ones that stole the Outlanders gear, I'll start with them.", 1223, 1960060) -- need correct icon
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  19. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  20. end
  21. function Step1Complete(Quest, QuestGiver, Player)
  22. UpdateQuestStepDescription(Quest, 1, "I've found the satchel.")
  23. CheckProgress(Quest, QuestGiver, Player)
  24. end
  25. function Step2Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 2, "I've found the journal.")
  27. CheckProgress(Quest, QuestGiver, Player)
  28. end
  29. function Step3Complete(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 3, "I've found the ring.")
  31. CheckProgress(Quest, QuestGiver, Player)
  32. end
  33. function Step4Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 4, "I've found the letter.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function CheckProgress(Quest, QuestGiver, Player)
  38. if QuestStepIsComplete(Player, 5483, 1) and QuestStepIsComplete(Player, 5483, 2) and QuestStepIsComplete(Player, 5483, 3) and QuestStepIsComplete(Player, 5483, 4) then
  39. UpdateQuestTaskGroupDescription(Quest,2, "I've recovered all of the Outlander's gear.")
  40. AddQuestStepChat(Quest, 5, "I should return to Outlander Vaughn.", 1, "I need to return to Outlander Vaughn and give him back his items.", 399, 1960053,8270029)
  41. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  42. end
  43. end
  44. function Accepted(Quest, QuestGiver, Player)
  45. -- Add dialog here for when the quest is accepted
  46. end
  47. function Declined(Quest, QuestGiver, Player)
  48. -- Add dialog here for when the quest is declined
  49. end
  50. function Deleted(Quest, QuestGiver, Player)
  51. -- Remove any quest specific items here when the quest is deleted
  52. end
  53. function QuestComplete(Quest, QuestGiver, Player)
  54. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  55. UpdateQuestStepDescription(Quest, 5, "I've returned the items to the Outlander.")
  56. UpdateQuestTaskGroupDescription(Quest, 2, "The Outlander was grateful to get his gear back.")
  57. UpdateQuestDescription(Quest, "I eventually found all of Outlander Vaughn's items. He was grateful and asked if I would help him with something else.")
  58. GiveQuestReward(Quest, Player)
  59. end
  60. function Reload(Quest, QuestGiver, Player, Step)
  61. if Step == 1 then
  62. Step1Complete(Quest, QuestGiver, Player)
  63. elseif Step == 2 then
  64. Step2Complete(Quest, QuestGiver, Player)
  65. elseif Step == 3 then
  66. Step3Complete(Quest, QuestGiver, Player)
  67. elseif Step == 4 then
  68. Step4Complete(Quest, QuestGiver, Player)
  69. elseif Step == 5 then
  70. QuestComplete(Quest, QuestGiver, Player)
  71. end
  72. end