OtherMaterials.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. --[[
  2. Script Name : OtherMaterials.lua
  3. Script Purpose : Handles the quest, "Other Materials?"
  4. Script Author : FeaRFx
  5. Script Date : 26/01/2017
  6. Script Notes :
  7. Zone : Darklight Wood
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepObtainItem(Quest, 1, "I need three rock samples from near the Warpfont Spire.", 3, 100, "I need to collect rocks from the Warpfont Spire and the Harrowglade for Geldax Xalylharil.", 188, 15326)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "I have the rocks from the Warpfont Spire.")
  18. AddQuestStepObtainItem(Quest, 2, "I need three rock samples from the Harrowglade.", 3, 100, "I need to collect rocks from the Warpfont Spire and the Harrowglade for Geldax Xalylharil.", 188, 8056)
  19. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  20. end
  21. function Step2Complete(Quest, QuestGiver, Player)
  22. UpdateQuestStepDescription(Quest, 2, "I have the rocks from the Harrowglade.")
  23. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected the rocks.")
  24. AddQuestStepChat(Quest, 3, "I must return to Geldax Xalylharil.", 1, "I need to bring the rocks back to Geldax Xalylharil.", 188, 340147)
  25. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  26. end
  27. function QuestComplete(Quest, QuestGiver, Player)
  28. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  29. UpdateQuestStepDescription(Quest, 3, "I have given Geldax Xalylharil the rocks.")
  30. UpdateQuestTaskGroupDescription(Quest, 2, "I have brought the rocks to Geldax Xalylharil.")
  31. UpdateQuestDescription(Quest, "I have collected rocks from the Warpfont Spire and the Harrowglade and given them to Geldax Xalylharil.")
  32. GiveQuestReward(Quest, Player)
  33. end
  34. function Reload(Quest, QuestGiver, Player, Step)
  35. if Step == 1 then
  36. Step1Complete(Quest, QuestGiver, Player)
  37. elseif Step == 2 then
  38. Step2Complete(Quest, QuestGiver, Player)
  39. elseif Step == 3 then
  40. QuestComplete(Quest, QuestGiver, Player)
  41. end
  42. end
  43. function Accepted(Quest, QuestGiver, Player)
  44. -- Add dialog here for when the quest is accepted
  45. end
  46. function Declined(Quest, QuestGiver, Player)
  47. -- Add dialog here for when the quest is declined
  48. end