the_charge.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. --[[
  2. Script Name : Quests/FrostfangSea/the_charge.lua
  3. Script Purpose : the quest The Charge
  4. Script Author : theFoof
  5. Script Date : 2013.6.5
  6. Zone : Frostfang Sea
  7. Quest Giver : Battlepriest Herga
  8. Preceded by : Loosening Their Grip
  9. Followed by : The Siege is Not Over
  10. --]]
  11. function Init(Quest)
  12. AddQuestRewardCoin(Quest, math.random(5,90), math.random(6,15), 0, 0)
  13. AddQuestStepKill(Quest, 1, "I must kill several Ry'Gorr bushwhackers.", 3, 100, "I must kill several Ry'Gorr orcs on Ry'Gorr Isle. The isle is to the west, off the coast of Erollis.", 611, 4701123)
  14. AddQuestStepKill(Quest, 2, "I must kill several Ry'Gorr zealots.", 2, 100, "I must kill several Ry'Gorr orcs on Ry'Gorr Isle. The isle is to the west, off the coast of Erollis.", 611, 4701125, 4700875)
  15. AddQuestStepKill(Quest, 3, "I must kill several Ry'Gorr marauders.", 3, 100, "I must kill several Ry'Gorr orcs on Ry'Gorr Isle. The isle is to the west, off the coast of Erollis.", 611, 4700874, 47001124)
  16. AddQuestStepCompleteAction(Quest, 1, "KilledBush")
  17. AddQuestStepCompleteAction(Quest, 2, "KilledZeal")
  18. AddQuestStepCompleteAction(Quest, 3, "KilledMaur")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. conversation = CreateConversation()
  23. PlayFlavor(QuestGiver, "battlepriest_herga/halas/great_shelf/battlepriest_herga/battlepriest_herga018.mp3", "", "", 1084322054, 1642797259, Player)
  24. AddConversationOption(conversation, "I will kill the orcs in your honor.")
  25. AddConversationOption(conversation, "Consider them done for.")
  26. AddConversationOption(conversation, "The battle is over as far as I'm concerned. Goodbye.")
  27. StartConversation(conversation, QuestGiver, Player, "Clinging. Clinging to life. The orcs cling to their foothold on the floating rock, south of Erollis. Take the fight to them.")
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. end
  31. function Declined(Quest, QuestGiver, Player)
  32. end
  33. function KilledBush(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have killed several Ry'Gorr bushwhackers.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function KilledZeal(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have killed several Ry'Gorr zealots.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function KilledMaur(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I have killed several Ry'Gorr marauders.")
  43. CheckProgress(Quest, QuestGiver, Player)
  44. end
  45. function CheckProgress(Quest, QuestGiver, Player)
  46. if QuestStepIsComplete(Player, 52, 1) and QuestStepIsComplete(Player, 52, 2) and QuestStepIsComplete(Player, 52, 3) then
  47. AddStep4(Quest, QuestGiver, Player)
  48. end
  49. end
  50. function AddStep4(Quest, QuestGiver, Player)
  51. UpdateQuestTaskGroupDescription(Quest, 1, "I have killed several Ry'Gorr orcs on Ry'Gorr Isle.")
  52. AddQuestStepChat(Quest, 4, "I must speak with Battlepriest Herga.", 1, "I must speak with Battlepriest Herga, who can be found on the battlefield at the Great Shelf.", 0, 4700100)
  53. AddQuestStepCompleteAction(Quest, 4, "CompleteQuest")
  54. end
  55. function CompleteQuest(Quest, QuestGiver, Player)
  56. GiveQuestReward(Quest, Player)
  57. end
  58. function Reload(Quest, QuestGiver, Player, Step)
  59. if QuestStepIsComplete(Player, 52, 1) then
  60. KilledBush(Quest, QuestGiver, Player)
  61. end
  62. if QuestStepIsComplete(Player, 52, 2) then
  63. KilledZeal(Quest, QuestGiver, Player)
  64. end
  65. if QuestStepIsComplete(Player, 52, 3) then
  66. KilledMaur(Quest, QuestGiver, Player)
  67. end
  68. end