roughing_up_the_reinforcements.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. --[[
  2. Script Name : Quests/FrostfangSea/roughing_up_the_reinforcements.lua
  3. Script Purpose : for the quest Roughing Up the Reinforcements
  4. Script Author : theFoof
  5. Script Date : 2013.6.10
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Thirin Veliumdelver
  9. Preceded by : Nothing to Waste
  10. Followed by : Through Thine Eyes
  11. --]]
  12. function Init(Quest)
  13. AddQuestRewardCoin(Quest, math.random(5,90), math.random(12,24), 0, 0)
  14. AddQuestStepKill(Quest, 1, "I must slay four Ry'Gorr grenadiers.", 4, 100, "I must travel to the Jagged Daggers Isle and engage the Ry'Gorr orcs. While there I should also destroy as many weapon supplies as I can find.", 2488, 4700120, 4700543)
  15. AddQuestStepKill(Quest, 2, "I must slay four Ry'Gorr infiltrators.", 4, 100, "I must travel to the Jagged Daggers Isle and engage the Ry'Gorr orcs. While there I should also destroy as many weapon supplies as I can find.", 2488, 4700119, 4700538)
  16. AddQuestStep(Quest, 3, "I must destroy four of the Ry'Gorr orcs' weapon supplies.", 4, 100, "I must travel to the Jagged Daggers Isle and engage the Ry'Gorr orcs. While there I should also destroy as many weapon supplies as I can find.", 287)
  17. AddQuestStepCompleteAction(Quest, 1, "KilledGrenadiers")
  18. AddQuestStepCompleteAction(Quest, 2, "KilledInfiltrators")
  19. AddQuestStepCompleteAction(Quest, 3, "DestroyedSpears")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. local thirin = GetSpawnByLocationID(GetZone(QuestGiver), 14520)
  23. FaceTarget(thirin, Player)
  24. conversation = CreateConversation()
  25. PlayFlavor(thirin, "thirin_veliumdelver/halas/thirin_veliumdelver/thirin_veliumdelver012.mp3", "", "", 830312044, 2813539587, Player)
  26. AddConversationOption(conversation, "And you, Thirin.")
  27. StartConversation(conversation, thirin, Player, "Good. Brell be with you on your quest, adventurer.")
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. end
  31. function Declined(Quest, QuestGiver, Player)
  32. end
  33. function KilledGrenadiers(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have slain four Ry'Gorr grenadiers.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function KilledInfiltrators(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have slain four Ry'Gorr infiltrators.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function DestroyedSpears(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I have destroyed the Ry'Gorr orcs' weapon supplies.")
  43. CheckProgress(Quest, QuestGiver, Player)
  44. end
  45. function CheckProgress(Quest, QuestGiver, Player)
  46. if QuestStepIsComplete(Player, 57, 1) and QuestStepIsComplete(Player, 57, 2) and QuestStepIsComplete(Player, 57, 3) then
  47. AddStep4(Quest, QuestGiver, Player)
  48. end
  49. end
  50. function AddStep4(Quest, QuestGiver, Player)
  51. UpdateQuestTaskGroupDescription(Quest, 1, "With so many Ry'Gorr weapons and orcs destroyed, re-enforcement will be hard.")
  52. AddQuestStepKill(Quest, 4, "Thirin requested that I slay a war shaman as well, to prevent their scrying magics.", 1, 100, "I should slay a Ry'Gorr war shaman so the Ry'Gorr will be unable to scry Thirin's encampment.", 2488, 4700542, 4700121)
  53. AddQuestStepCompleteAction(Quest, 4, "KilledShaman")
  54. end
  55. function KilledShaman(Quest, QuestGiver, Player)
  56. UpdateQuestStepDescription(Quest, 4, "The Ry'Gorr war shaman, now slain, may have something useful on them.")
  57. AddQuestStepObtainItem(Quest, 5, "I should see what the Ry'Gorr war shaman has. There may be something of use.", 1, 100, "I should slay a Ry'Gorr war shaman so the Ry'Gorr will be unable to scry Thirin's encampment.", 83, 11820)
  58. AddQuestStepCompleteAction(Quest, 5, "GotEye")
  59. end
  60. function GotEye(Quest, QuestGiver, Player)
  61. UpdateQuestStepDescription(Quest, 5, "It appears to the war shaman has some sort of Orcish scrying eye. I should show this to Thirin Veliumdelver at the Cragged Spine.")
  62. UpdateQuestTaskGroupDescription(Quest, 2, "I found an odd Orcish scrying eye. Thirin would be interested in this.")
  63. AddQuestStepChat(Quest, 6, "I must speak with Thirin Veliumdelver.", 1, "I should return to Thirin Veliumdelver, with the Orcish scrying eye, at the Cragged Spine.", 0, 4700112)
  64. AddQuestStepCompleteAction(Quest, 6, "CompleteQuest")
  65. end
  66. function CompleteQuest(Quest, QuestGiver, Player)
  67. GiveQuestReward(Quest, Player)
  68. end
  69. function Reload(Quest, QuestGiver, Player, Step)
  70. if QuestStepIsComplete(Player, 57, 1) and GetQuestStep(Player, 57) < 4 then
  71. KilledGrenadiers(Quest, QuestGiver, Player)
  72. end
  73. if QuestStepIsComplete(Player, 57, 2) and GetQuestStep(Player, 57) < 4 then
  74. KilledInfiltrators(Quest, QuestGiver, Player)
  75. end
  76. if QuestStepIsComplete(Player, 57, 3) and GetQuestStep(Player, 57) < 4 then
  77. DestroyedSpears(Quest, QuestGiver, Player)
  78. end
  79. if GetQuestStep(Player, 57) == 4 then
  80. AddStep4(Quest, QuestGiver, Player)
  81. elseif Step == 4 then
  82. KilledShaman(Quest, QuestGiver, Player)
  83. elseif Step == 5 then
  84. GotEye(Quest, QuestGiver, Player)
  85. end
  86. end