ProvingYourWorth.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : Quests/Commonlands/ProvingYourWorth.lua
  3. Script Purpose : Handles the quest, "Proving Your Worth"
  4. Script Author : premierio015
  5. Script Date : 19.05.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver : Captain Vertas
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to kill four dervish heretics", 4, 100, "Captain Vertas has ordered me to kill several Dervs here in the commonlands. I should begin my search to the west.", 611, 330095, 330107)
  14. AddQuestStepKill(Quest, 2, "I need to kill three dervish outlanders", 3, 100, "Captain Vertas has ordered me to kill several Dervs here in the commonlands. I should begin my search to the west.", 611, 330093, 330101)
  15. AddQuestStepKill(Quest, 3, "I need to kill two dervish cutthroats", 2, 100, "Captain Vertas has ordered me to kill several Dervs here in the commonlands. I should begin my search to the west.", 611, 330104, 330092)
  16. AddQuestStepKill(Quest, 4, "I need to kill one dervish thaumaturge", 1, 100, "Captain Vertas has ordered me to kill several Dervs here in the commonlands. I should begin my search to the west.", 611, 330094, 330106)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  20. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  21. end
  22. function Accepted(Quest, QuestGiver, Player)
  23. FaceTarget(QuestGiver, Player)
  24. local conversation = CreateConversation()
  25. AddConversationOption(conversation, "Yeah, yeah.")
  26. StartConversation(conversation, QuestGiver, Player, "You had better.")
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. -- Add dialog here for when the quest is declined
  30. end
  31. function Deleted(Quest, QuestGiver, Player)
  32. -- Remove any quest specific items here when the quest is deleted
  33. end
  34. function Step1Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 1, "I have killed four dervish heretics.")
  36. CheckProgress(Quest, QuestGiver, Player)
  37. end
  38. function Step2Complete(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 2, "I have killed three dervish outlanders.")
  40. CheckProgress(Quest, QuestGiver, Player)
  41. end
  42. function Step3Complete(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 3, "I have killed two dervish cutthroats.")
  44. CheckProgress(Quest, QuestGiver, Player)
  45. end
  46. function Step4Complete(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 4, "I have killed one dervish thaumaturge.")
  48. CheckProgress(Quest, QuestGiver, Player)
  49. end
  50. function QuestComplete(Quest, QuestGiver, Player)
  51. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  52. UpdateQuestStepDescription(Quest, 5, "I reported to Captain Vertas at the Crossroads.")
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I have returned to Captain Vertas.")
  54. UpdateQuestDescription(Quest, "I have removed some of the dervish threat in the Commonlands for Captain Vertas.")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function CheckProgress(Quest, QuestGiver, Player)
  58. if QuestStepIsComplete(Player, 443, 1) and QuestStepIsComplete(Player, 443, 2) and QuestStepIsComplete(Player, 443, 3) and QuestStepIsComplete(Player, 443, 4) then
  59. UpdateQuestTaskGroupDescription(Quest, 1, "I have done my duty by removing much of the dervish threat to The Commonlands.")
  60. AddQuestStepChat(Quest, 5, "I must return to Captain Vertas", 1, "I have done my part in removing the dervish threat and should return to Captain Vertas at the Crossroads to notify him of my doings.", 11, 330178)
  61. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  62. end
  63. end
  64. function Reload(Quest, QuestGiver, Player, Step)
  65. if Step == 1 then
  66. Step1Complete(Quest, QuestGiver, Player)
  67. elseif Step == 2 then
  68. Step2Complete(Quest, QuestGiver, Player)
  69. elseif Step == 3 then
  70. Step3Complete(Quest, QuestGiver, Player)
  71. elseif Step == 4 then
  72. Step4Complete(Quest, QuestGiver, Player)
  73. elseif Step == 5 then
  74. QuestComplete(Quest, QuestGiver, Player)
  75. end
  76. end