becoming_a_crusader.lua 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. --[[
  2. Script Name : Quests/Hallmark/becoming_a_crusader.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.29 03:09:23
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepChat(Quest, 1, "I need to find the defectors.", 1, "I need to find where the defectors are hiding before they leave the city.", 11, 1)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. -- Add dialog here for when the quest is accepted
  17. end
  18. function Declined(Quest, QuestGiver, Player)
  19. -- Add dialog here for when the quest is declined
  20. end
  21. function Deleted(Quest, QuestGiver, Player)
  22. -- Remove any quest specific items here when the quest is deleted
  23. end
  24. function Step1Complete(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I found the place where the defectors are hiding.")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I overheard a man talking about getting others ready to leave on a boat.")
  27. AddQuestStepChat(Quest, 2, "I should confront the defectors in the building.", 1, "I should go inside and confront the defectors.", 11, 1)
  28. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I entered the building to investigate.")
  32. UpdateQuestTaskGroupDescription(Quest, 2, "I entered the building to investigate.")
  33. AddQuestStepKill(Quest, 3, "I need to subdue the defectors!", 1, 100, "I need to subdue these defectors!", 11, 1)
  34. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  35. end
  36. function Step3Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 3, "I subdued the defectors.")
  38. UpdateQuestTaskGroupDescription(Quest, 3, "I subdued the hostile defectors.")
  39. AddQuestStepChat(Quest, 4, "I need to speak with the surviving defectors.", 1, "I should speak to the surviving defectors.", 11, 1)
  40. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  41. end
  42. function Step4Complete(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 4, "I convinced the survivors to surrender.")
  44. UpdateQuestTaskGroupDescription(Quest, 4, "I convinced the surviving defectors to surrender.")
  45. AddQuestStepChat(Quest, 5, "I need to report back to Tychus.", 1, "I need to report back to Tychus.", 11, 1)
  46. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  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, 5, "I reported back to Tychus.")
  51. UpdateQuestTaskGroupDescription(Quest, 5, "I reported back to Tychus.")
  52. UpdateQuestDescription(Quest, "I stopped the defection and saved the lives of the misguided. To be a Crusader I must stand unswerving for my beliefs and that is what I have done. The Commandant was impressed with my conviction.")
  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. Step3Complete(Quest, QuestGiver, Player)
  62. elseif Step == 4 then
  63. Step4Complete(Quest, QuestGiver, Player)
  64. elseif Step == 5 then
  65. QuestComplete(Quest, QuestGiver, Player)
  66. end
  67. end