CaptainElgrondethsDilemma.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --[[
  2. Script Name : Quests/Nettleville/CaptainElgrondethsDilemma.lua
  3. Script Purpose : Handles the quest, "Captain Elgrondeth's Dilemma"
  4. Script Author : Jabantiz
  5. Script Date : 6/12/2018
  6. Script Notes :
  7. Zone : Nettleville
  8. Quest Giver : Knight-Captain Elgrondeth (2330030)
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I must kill ten sonic shriekers in Antonica.", 10, 100, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 611, 120297, 121406)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. end
  18. function Deleted(Quest, QuestGiver, Player)
  19. end
  20. function Declined(Quest, QuestGiver, Player)
  21. end
  22. function Step1Complete(Quest, QuestGiver, Player)
  23. UpdateQuestStepDescription(Quest, 1, "I have killed ten sonic shriekers.")
  24. AddQuestStepChat(Quest, 2, "I need to speak to Captain Elgrondeth in Nettleville.", 1, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 0, 2330030)
  25. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  26. end
  27. function Step2Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 2, "I spoke to Captain Elgrondeth in Nettleville.")
  29. AddQuestStepKill(Quest, 3, "I must kill five young brown bears roaming Antonica.", 5, 100, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 611, 120011, 121191)
  30. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  31. end
  32. function Step3Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 3, "I have killed five young brown bears.")
  34. AddQuestStepChat(Quest, 4, "I need to speak to Captain Elgrondeth in Nettleville.", 1, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 0, 2330030)
  35. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  36. end
  37. function Step4Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 4, "I spoke to Captain Elgrondeth in Nettleville.")
  39. AddQuestStepKill(Quest, 5, "I must hunt down and slay ten timber wolves in Antonica.", 5, 100, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 611, 120008, 121188)
  40. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  41. end
  42. function Step5Complete(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 5, "I have killed ten timber wolves.")
  44. AddQuestStepChat(Quest, 6, "I need to speak to Captain Elgrondeth in Nettleville.", 1, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 0, 2330030)
  45. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  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, 6, "I spoke to Captain Elgrondeth in Nettleville.")
  50. UpdateQuestTaskGroupDescription(Quest, 1, "I have sought out and slain the creatures required by the Captain.")
  51. UpdateQuestDescription(Quest, "I have accomplished all the tasks laid out before me by Captain Elgrondeth. He was impressed by my abilities. ")
  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. Step3Complete(Quest, QuestGiver, Player)
  61. elseif step == 4 then
  62. Step4Complete(Quest, QuestGiver, Player)
  63. elseif step == 5 then
  64. Step5Complete(Quest, QuestGiver, Player)
  65. end
  66. end