foiling_the_flank.lua 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/FrostfangSea/foiling_the_flank.lua
  3. Script Purpose : for the quest "Foiling the Flank"
  4. Script Author : theFoof
  5. Script Date : 2013.6.2
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Rakan RockBreaker
  9. Preceded by : The Demand for Supplies
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. SetQuestRepeatable(Quest)
  14. SetQuestFeatherColor(Quest, 3)
  15. AddQuestRewardCoin(Quest, math.random(5,80), math.random(13,25), 0, 0)
  16. AddQuestStepKill(Quest, 1, "I must kill several sprinting Ry'Gorr gatecallers.", 5, 100, "I must kill several sprinting Ry'Gorr gatecallers and several Ry'Gorr portal casters. The gatecallers have been sneaking up the choke from the battlefield, and the portal casters can be found at the summit of Herga's Choke.", 611, 4700075)
  17. AddQuestStepKill(Quest, 2, "I must kill several Ry'Gorr portal casters.", 3, 100, "I must kill several sprinting Ry'Gorr gatecallers and several Ry'Gorr portal casters. The gatecallers have been sneaking up the choke from the battlefield, and the portal casters can be found at the summit of Herga's Choke.", 611, 4701115, 4701120)
  18. AddQuestStepCompleteAction(Quest, 1, "KilledGateCaller")
  19. AddQuestStepCompleteAction(Quest, 2, "KilledPortalCaster")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. FaceTarget(QuestGiver, Player)
  23. conversation = CreateConversation()
  24. PlayFlavor(QuestGiver, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker013.mp3", "", "", 3252337968, 480414167, Player)
  25. AddConversationOption(conversation, "Thank you.")
  26. AddConversationOption(conversation, "I will be back shortly.")
  27. StartConversation(conversation, QuestGiver, Player, "Ye delivered the last of the visors to Orica Deadshot, but ye should still be able to pick out the camouflaged Ry'Gorr gatecallers if ye look for that tell-tale glimmer. Head to the peak of Herga's Choke to find the portal casters. Good luck and good hunting, " .. GetName(Player) .. ".")
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. end
  31. function Declined(Quest, QuestGiver, Player)
  32. end
  33. function KilledGateCaller(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I successfully killed several sprinting Ry'Gorr gatecallers.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function KilledPortalCaster(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I successfully killed several Ry'Gorr portal casters.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function CheckProgress(Quest, QuestGiver, Player)
  42. if QuestStepIsComplete(Player, 46, 1) and QuestStepIsComplete(Player, 46, 2) then
  43. AddStep3(Quest, QuestGiver, Player)
  44. end
  45. end
  46. function AddStep3(Quest, QuestGiver, Player)
  47. UpdateQuestTaskGroupDescription(Quest, 1, "I successfully killed several sprinting Ry'Gorr gatecallers and several Ry'Gorr portal casters.")
  48. AddQuestStepChat(Quest, 3, "I must speak to Rakan Rockbreaker.", 1, "I must speak to Rakan Rockbreaker, who can be found in the cave at the Great Shelf.", 0, 4700082)
  49. AddQuestStepCompleteAction(Quest, 3, "CompleteQuest")
  50. end
  51. function CompleteQuest(Quest, QuestGiver, Player)
  52. GiveQuestReward(Quest, Player)
  53. end
  54. function Reload(Quest, QuestGiver, Player, Step)
  55. if QuestStepIsComplete(Player, 46, 1) then
  56. KilledGateCaller(Quest, QuestGiver, Player)
  57. end
  58. if QuestStepIsComplete(Player, 46, 2) then
  59. KilledPortalCaster(Quest, QuestGiver, Player)
  60. end
  61. end