BigGameHunting.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : Quests/Commonlands/BigGameHunting.lua
  3. Script Purpose : Handles the quest, "Big Game Hunting"
  4. Script Author : premierio015
  5. Script Date : 18.05.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver : J.P. Feterman
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to acquire a fierce carrion hound skull", 1, 100, "J.P. wants to complete his collection. I need to get started collecting the items he asked for.", 101, 330079, 330768)
  14. AddQuestStepKill(Quest, 2, "I need to acquire a Bloodskull mason's pick", 1, 100, "J.P. wants to complete his collection. I need to get started collecting the items he asked for.", 1668, 330289)
  15. AddQuestStepKill(Quest, 3, "I need to acquire a plains elephant tusk", 1, 100, "J.P. wants to complete his collection. I need to get started collecting the items he asked for.", 97, 330274, 330767)
  16. AddQuestStepKill(Quest, 4, "I need to acquire a rhinoceros horn", 1, 100, "J.P. wants to complete his collection. I need to get started collecting the items he asked for.", 102, 330140, 330760, 330273)
  17. AddQuestStepKill(Quest, 5, "I need to acquire a digger wasp stinger", 1, 100, "J.P. wants to complete his collection. I need to get started collecting the items he asked for.", 112, 330160, 330664)
  18. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  19. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  20. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  21. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  22. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  23. end
  24. function Accepted(Quest, QuestGiver, Player)
  25. FaceTarget(QuestGiver, Player)
  26. local conversation = CreateConversation()
  27. AddConversationOption(conversation, "... I'll be back.")
  28. StartConversation(conversation, QuestGiver, Player, "Haven't I, though? Haven't I?")
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. -- Add dialog here for when the quest is declined
  32. end
  33. function Deleted(Quest, QuestGiver, Player)
  34. -- Remove any quest specific items here when the quest is deleted
  35. end
  36. function Step1Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 1, "I have a fierce carrion hound skull for J.P. at the Crossroads.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function Step2Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 2, "I have a Bloodskull pick for J.P. at the Crossroads.")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function Step3Complete(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 3, "I have an elephant tusk for J.P. at the Crossroads.")
  46. CheckProgress(Quest, QuestGiver, Player)
  47. end
  48. function Step4Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 4, "I have a rhinoceros horn for J.P. Feterman at the Crossroads.")
  50. CheckProgress(Quest, QuestGiver, Player)
  51. end
  52. function Step5Complete(Quest, QuestGiver, Player)
  53. UpdateQuestStepDescription(Quest, 5, "I have a digger wasp stinger for J.P. Feterman at the Crossroads.")
  54. CheckProgress(Quest, QuestGiver, Player)
  55. end
  56. function CheckProgress(Quest, QuestGiver, Player)
  57. if QuestStepIsComplete(Player, 419, 1) and QuestStepIsComplete(Player, 419, 2) and QuestStepIsComplete(Player, 419, 3) and QuestStepIsComplete(Player, 419, 4) and QuestStepIsComplete(Player, 419, 5) then
  58. UpdateQuestTaskGroupDescription(Quest, 1, "I have gathered the skull, pick, tusk, horn and stinger for J.P. at the Crossroads.")
  59. AddQuestStepChat(Quest, 6, "I should return these items to J.P. Feterman", 1, "I have gathered all of the components J.P. Feterman asked for.", 11, 330261)
  60. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  61. end
  62. end
  63. function QuestComplete(Quest, QuestGiver, Player)
  64. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  65. UpdateQuestStepDescription(Quest, 6, "I gave J.P. Feterman the items he asked for.")
  66. UpdateQuestTaskGroupDescription(Quest, 2, "I returned to J.P. Feterman at the Crossroads.")
  67. UpdateQuestDescription(Quest, "I gave the skull, pick, tusk, horn, and stinger to J.P. Feterman at the Crossroads.")
  68. GiveQuestReward(Quest, Player)
  69. end
  70. function Reload(Quest, QuestGiver, Player, Step)
  71. if Step == 1 then
  72. Step1Complete(Quest, QuestGiver, Player)
  73. elseif Step == 2 then
  74. Step2Complete(Quest, QuestGiver, Player)
  75. elseif Step == 3 then
  76. Step3Complete(Quest, QuestGiver, Player)
  77. elseif Step == 4 then
  78. Step4Complete(Quest, QuestGiver, Player)
  79. elseif Step == 5 then
  80. Step5Complete(Quest, QuestGiver, Player)
  81. elseif Step == 6 then
  82. QuestComplete(Quest, QuestGiver, Player)
  83. end
  84. end