9
3

AHuntersTool.lua 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. --[[
  2. Script Name : Quests/Commonlands/AHuntersTool.lua
  3. Script Purpose : Handles the quest, "A Hunter's Tool"
  4. Script Author : premierio015
  5. Script Date : 11.01.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepHarvest(Quest, 1, "I need to gather maple from wind felled trees", 5, 100, "J.P. Feterman has asked me to gather some components for him to fix his favorite bow.", 824, 12101)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. AddConversationOption(conversation, "Sure you were.")
  20. StartConversation(conversation, QuestGiver, Player, "Ah, I can imagine using it even now. Greatest ever, I was.")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. -- Add dialog here for when the quest is declined
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. -- Remove any quest specific items here when the quest is deleted
  27. end
  28. function Step1Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have gathered maple for J.P. Feterman.")
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I have gathered maple for J.P. Feterman.")
  31. AddQuestStepHarvest(Quest, 2, "I need to gather tuber strands from desert roots", 3, 100, "J.P. Feterman has asked me to gather some components for him to fix his favorite bow.", 194, 14701)
  32. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  33. end
  34. function Step2Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have J.P. Feterman's tuber strands.")
  36. UpdateQuestTaskGroupDescription(Quest, 2, "I have J.P. Feterman's tuber strands.")
  37. AddQuestStepKill(Quest, 3, "I need compound bow cams from dervish cutthroats", 2, 100, "J.P. Feterman has asked me to gather some components for him to fix his favorite bow.", 2279, 330092, 330104)
  38. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have the bow cams for J.P. Feterman.")
  42. UpdateQuestTaskGroupDescription(Quest, 1, "I have gathered the components and should return to J.P. Feterman.")
  43. AddQuestStepChat(Quest, 4, "I need to return to J.P. Feterman", 1, "I have J.P. Feterman's bow components and should speak with him again.", 9, 330261)
  44. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  45. end
  46. function QuestComplete(Quest, QuestGiver, Player)
  47. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  48. UpdateQuestStepDescription(Quest, 4, "I have given J.P. Feterman his bow.")
  49. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with J.P. Feterman.")
  50. UpdateQuestDescription(Quest, "I gathered the components that J.P. Feterman needed to reconstruct his bow.")
  51. GiveQuestReward(Quest, Player)
  52. end
  53. function Reload(Quest, QuestGiver, Player, Step)
  54. if Step == 1 then
  55. Step1Complete(Quest, QuestGiver, Player)
  56. elseif Step == 2 then
  57. Step2Complete(Quest, QuestGiver, Player)
  58. elseif Step == 3 then
  59. Step3Complete(Quest, QuestGiver, Player)
  60. elseif Step == 4 then
  61. QuestComplete(Quest, QuestGiver, Player)
  62. end
  63. end