an_orcish_trinket.lua 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : Quests/TheCommonlands/an_orcish_trinket.lua
  3. Script Purpose : Handles the quest, "An Orcish Trinket"
  4. Script Author : premierio015
  5. Script Date : 05.06.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. AddQuestStepChat(Quest, 1, "I need to speak with someone who knows about orc history", 1, "I should see if I can find someone who knows about this orcish object.", 11, 330258)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. -- Add dialog here for when the quest is accepted
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is declined
  21. end
  22. function Deleted(Quest, QuestGiver, Player)
  23. -- Remove any quest specific items here when the quest is deleted
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "Rilkrik in the Crossroads told me of the story of Raegnir.")
  27. UpdateQuestTaskGroupDescription(Quest, 1, "Rilkrik told me of Raegnir the orc.")
  28. AddQuestStepObtainItem(Quest, 2, "I need Argorym's blade", 1, 100, "I need to find the three remaining objects that made up Raegnir's weapon.", 72, 3963)
  29. AddQuestStepObtainItem(Quest, 3, "I need the ''Daughter of the Sky'' jewel", 1, 100, "I need to find the three remaining objects that made up Raegnir's weapon.", 771, 6282)
  30. AddQuestStepObtainItem(Quest, 4, "I need the ''Son of the Sky'' jewel", 1, 100, "I need to find the three remaining objects that made up Raegnir's weapon.", 768, 13124)
  31. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  32. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  33. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  34. end
  35. function Step2Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "I have acquired Argorym's blade.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function Step3Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 3, "I have acquired the "Daughter of the Sky" jewel.")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function CheckProgress(Quest, QuestGiver, Player)
  44. if QuestStepIsComplete(Player, 5254, 2) and QuestStepIsComplete(Player, 5254, 3) and QuestStepIsComplete(Player, 5254, 4) then
  45. UpdateQuestTaskGroupDescription(Quest, 2, "I have found all that made up Raegnir's weapon.")
  46. AddQuestStepChat(Quest, 5, "I need to seek out Raegnir in The Siege Lands", 1, "I need to travel to the Siege Lands outside of Freeport and find the spirit of Raegnir.", 11, 330405)
  47. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  48. end
  49. end
  50. function Step4Complete(Quest, QuestGiver, Player)
  51. UpdateQuestStepDescription(Quest, 4, "I have acquired the ''Son of the Sky'' jewel.")
  52. CheckProgress(Quest, QuestGiver, Player)
  53. end
  54. function QuestComplete(Quest, QuestGiver, Player)
  55. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  56. UpdateQuestStepDescription(Quest, 5, "I have found Raegnir.")
  57. UpdateQuestTaskGroupDescription(Quest, 3, "I have given Raegnir the remnants of his old weapon.")
  58. UpdateQuestDescription(Quest, "I found all the pieces of Raegnir's blade and returned them to him. I also told Raegnir the true story of what happened when he died. He thanked me for both the blade and the truth.")
  59. GiveQuestReward(Quest, Player)
  60. RemoveItem(Player, 13124)
  61. RemoveItem(Player, 6282)
  62. RemoveItem(Player, 3963)
  63. end
  64. function Reload(Quest, QuestGiver, Player, Step)
  65. if Step == 1 then
  66. Step1Complete(Quest, QuestGiver, Player)
  67. elseif Step == 2 then
  68. Step2Complete(Quest, QuestGiver, Player)
  69. elseif Step == 3 then
  70. Step3Complete(Quest, QuestGiver, Player)
  71. elseif Step == 4 then
  72. Step4Complete(Quest, QuestGiver, Player)
  73. elseif Step == 5 then
  74. QuestComplete(Quest, QuestGiver, Player)
  75. end
  76. end