TheSkeletonKey.lua 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : Quests/Commonlands/TheSkeletonKey.lua
  3. Script Purpose : Handles the quest, "The Skeleton Key"
  4. Script Author : premierio015
  5. Script Date : 11.05.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver : Ventar T'Kal
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "I need the blood-stained pointer finger of an undead Ree orc", 1, 100, "I need to collect the bloody finger bones of the Shin'Ree orcs from outside the Wailing Caves in the Commonlands.", 161)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. local conversation = CreateConversation()
  19. AddConversationOption(conversation, "I will return.")
  20. StartConversation(conversation, QuestGiver, Player, "Indeed you will, then you will see what spoils we reap in such jobs as these.")
  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 the blood-stained pointer finger.")
  30. AddQuestStep(Quest, 2, "I need the blood-stained middle finger of an undead Ree orc", 1, 100, "I need to collect the bloody finger bones of the Shin'Ree orcs from outside the Wailing Caves in the Commonlands.", 161)
  31. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  32. end
  33. function Step2Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "I have the blood-stained middle finger.")
  35. AddQuestStep(Quest, 3, "I need the blood-stained ring finger of an undead Ree orc", 1, 100, "I need to collect the bloody finger bones of the Shin'Ree orcs from outside the Wailing Caves in the Commonlands.", 161)
  36. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  37. end
  38. function Step3Complete(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 3, "I have the blood-stained ring finger.")
  40. AddQuestStep(Quest, 4, "I need the blood-stained little finger of an undead Ree orc", 1, 100, "I need to collect the bloody finger bones of the Shin'Ree orcs from outside the Wailing Caves in the Commonlands.", 161)
  41. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  42. end
  43. function Step4Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 4, "I have the blood-stained little finger.")
  45. AddQuestStep(Quest, 5, "I need the blood-stained thumb of an undead Ree orc", 1, 100, "I need to collect the bloody finger bones of the Shin'Ree orcs from outside the Wailing Caves in the Commonlands.", 161)
  46. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  47. end
  48. function Step5Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 5, "I have the blood-stained thumb.")
  50. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected enough bloody finger bones to make a hand and unlock the Shin'Ree treasure box.")
  51. AddQuestStepChat(Quest, 6, "I need to return to Ventar", 1, "Now that I have done as he asked, I should return to Ventar.", 11, 330214)
  52. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  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, 6, "I have spoken with Ventar.")
  57. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Ventar.")
  58. UpdateQuestDescription(Quest, "The Shin'Ree "treasure" was an earring and something called "The Code of the Shin'Ree." Ventar was quite disappointed, but still believes he can sell it to get some money. He gave the earring to me.")
  59. GiveQuestReward(Quest, Player)
  60. end
  61. function Reload(Quest, QuestGiver, Player, Step)
  62. if Step == 1 then
  63. Step1Complete(Quest, QuestGiver, Player)
  64. elseif Step == 2 then
  65. Step2Complete(Quest, QuestGiver, Player)
  66. elseif Step == 3 then
  67. Step3Complete(Quest, QuestGiver, Player)
  68. elseif Step == 4 then
  69. Step4Complete(Quest, QuestGiver, Player)
  70. elseif Step == 5 then
  71. Step5Complete(Quest, QuestGiver, Player)
  72. elseif Step == 6 then
  73. QuestComplete(Quest, QuestGiver, Player)
  74. end
  75. end