a_pain_in_the_backside.lua 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. --[[
  2. Script Name : Quests/Antonica/a_pain_in_the_backside.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.05.19 02:05:40
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I should find strong pieces of armor from the Darkpaw soldiers in Antonica.", 5, 100, "I must replace the back section of this armor. I suspect I can find a Gnoll that would have something suitable.", 228, 120212)
  13. AddQuestStepZoneLoc(Quest, 2, "I should wash the blood from these new pieces of armor, Crater Pond would be a good location.", 27, "I must replace the back section of this armor. I suspect I can find a Gnoll that would have something suitable.", 228, 125.62, -28.07, 472.29,12)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. -- Add dialog here for when the quest is accepted
  19. end
  20. function Declined(Quest, QuestGiver, Player)
  21. -- Add dialog here for when the quest is declined
  22. end
  23. function Deleted(Quest, QuestGiver, Player)
  24. -- Remove any quest specific items here when the quest is deleted
  25. end
  26. function Step1Complete(Quest, QuestGiver, Player)
  27. UpdateQuestStepDescription(Quest, 1, "I have found some sturdy sections of gnoll armor.")
  28. QuestCheck1(Quest, QuestGiver, Player)
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I have cleaned the fresh blood from the armor segments.")
  32. QuestCheck1(Quest, QuestGiver, Player)
  33. end
  34. function QuestCheck1(Quest, QuestGiver, Player)
  35. if QuestStepIsComplete(Player,5841,1) and QuestStepIsComplete(Player,5841,2) then
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I have acquired a suitable replacement for the missing armor section.")
  37. AddQuestStep(Quest, 3, "I need to inspect the armor again. I can try to use the gnoll armor to repair the back of it.", 1, 100, "I must replace the back section of this armor. I suspect I can find a Gnoll that would have something suitable.", 11)
  38. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  39. end
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest,3 , "The armor resisted the gnoll armor fragments!")
  43. AddQuestStepKill(Quest, 4, "Take the eye from The Klicnik Queen..", 1, 100, "I have examined the armor. It rejected the gnoll armor segments I tried to attach. It seems arcane forces are at work here. The eye of a Klicnik queen is said to have the ability to enchant some metals, perhaps it can help disenchant this armor so that I can repair it.", 83, 120452)
  44. AddQuestStep(Quest, 5, "I need to find the arcane devices belonging to the Darkpaw Gnolls in their cave hideout.", 1, 100, "I have examined the armor. It rejected the gnoll armor segments I tried to attach. It seems arcane forces are at work here. The eye of a Klicnik queen is said to have the ability to enchant some metals, perhaps it can help disenchant this armor so that I can repair it.", 887)
  45. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  46. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  47. end
  48. function Step4Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 3, "This is much too Dangerous. The Darkpaw gnolls have a hideout in the hills near here, perhaps I can use their arcane devices.")
  50. QuestCheck2(Quest, QuestGiver, Player)
  51. end
  52. function Step5Complete(Quest, QuestGiver, Player)
  53. UpdateQuestStepDescription(Quest, 5, "I have found the Darkpaw Gnoll's arcane device.")
  54. QuestCheck2(Quest, QuestGiver, Player)
  55. end
  56. function QuestCheck2(Quest, QuestGiver, Player)
  57. if QuestStepIsComplete(Player,5841,4) and QuestStepIsComplete(Player,5841,5) then
  58. UpdateQuestTaskGroupDescription(Quest, 2, "Now that the armor will no longer reject any repairs, I should be able to fix it.")
  59. AddQuestStep(Quest, 6, "I need to inspect the armor again. I can try disenchanting the armor using these items.", 1, 100, "I must replace the back section of this armor. I suspect I can find a Gnoll that would have something suitable.", 756)
  60. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  61. end
  62. end
  63. function Step6Complete(Quest, QuestGiver, Player)
  64. UpdateQuestStepDescription(Quest, 6, "I have disenchanted the armor.")
  65. AddQuestStepKill(Quest, 7, "Kill young kodiak bears in antonica until suitable lining is found.", 1, 100, "It appears that the edges in this armor are much too jagged to attempt to wear. I should find something to make this a bit more comfortable.", 122, 120294)
  66. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  67. end
  68. function Step7Complete(Quest, QuestGiver, Player)
  69. UpdateQuestStepDescription(Quest, 7, "I have found a suitable lining for the Bloodsaber Armor.")
  70. AddQuestStep(Quest, 8, "I need to inspect the armor again. I can use these bear pelts to make a lining.", 1, 100, "It appears that the edges in this armor are much too jagged to attempt to wear. I should find something to make this a bit more comfortable.", 756)
  71. AddQuestStepCompleteAction(Quest, 8, "QuestComplete")
  72. end
  73. function QuestComplete(Quest, QuestGiver, Player)
  74. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  75. UpdateQuestStepDescription(Quest, 8, "I have made a suitable lining for the Bloodsaber Armor.")
  76. UpdateQuestTaskGroupDescription(Quest, 3, "I have made a suitable lining for the Bloodsaber armor.")
  77. UpdateQuestDescription(Quest, "I have managed to restore to the Bloodsaber chestpiece to a usable condition. ")
  78. GiveQuestReward(Quest, Player)
  79. end
  80. function Reload(Quest, QuestGiver, Player, Step)
  81. if Step == 1 then
  82. Step1Complete(Quest, QuestGiver, Player)
  83. elseif Step == 2 then
  84. Step2Complete(Quest, QuestGiver, Player)
  85. elseif Step == 3 then
  86. Step3Complete(Quest, QuestGiver, Player)
  87. elseif Step == 4 then
  88. Step4Complete(Quest, QuestGiver, Player)
  89. elseif Step == 5 then
  90. Step5Complete(Quest, QuestGiver, Player)
  91. elseif Step == 6 then
  92. Step6Complete(Quest, QuestGiver, Player)
  93. elseif Step == 7 then
  94. Step7Complete(Quest, QuestGiver, Player)
  95. elseif Step == 8 then
  96. QuestComplete(Quest, QuestGiver, Player)
  97. end
  98. end