the_demand_for_supplies.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --[[
  2. Script Name : Quests/FrostfangSea/the_demand_for_supplies.lua
  3. Script Purpose : for the quest "The Demand for Supplies"
  4. Script Author : theFoof
  5. Script Date : 2013.6.1
  6. Script Notes :
  7. Zone : Frostfang Sea
  8. Quest Giver : Rakan RockBreaker
  9. Preceded by : None
  10. Followed by : Foiling the Flank
  11. --]]
  12. function Init(Quest)
  13. AddQuestRewardCoin(Quest, math.random(5,90), math.random(13,25), 0, 0)
  14. AddQuestStepChat(Quest, 1, "I must deliver the supplies to Orica Deadshot.", 1, "I must deliver the supplies to Orica Deadshot and Battlemaster Golben. They can be found near the peak of Herga's Choke, facing off against a horde of Ry'Gorr.", 398, 4701112)
  15. AddQuestStepChat(Quest, 2, "I must deliver the supplies to Battlemaster Golben.", 1, "I must deliver the supplies to Orica Deadshot and Battlemaster Golben. They can be found near the peak of Herga's Choke, facing off against a horde of Ry'Gorr.", 398, 4700098)
  16. AddQuestStepCompleteAction(Quest, 1, "DeliveredOrica")
  17. AddQuestStepCompleteAction(Quest, 2, "DeliveredGolben")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. conversation = CreateConversation()
  22. PlayFlavor(QuestGiver, "rakan_rockbreaker/halas/great_shelf/rakan_rockbreaker/rakan_rockbreaker005.mp3", "", "", 2645967514, 1229482070, Player)
  23. AddConversationOption(conversation, "Don't worry.")
  24. AddConversationOption(conversation, "I'll be right back!")
  25. StartConversation(conversation, QuestGiver, Player, "Please do, " .. GetName(Player) .. ", and hurry!")
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function DeliveredOrica(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have delivered the supplies to Orica Deadshot.")
  33. CheckProgress(Quest, QuestGiver, Player)
  34. end
  35. function DeliveredGolben(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "I have delivered the supplies to Battlemaster Golben.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function CheckProgress(Quest, QuestGiver, Player)
  40. if QuestStepIsComplete(Player, 45, 1) and QuestStepIsComplete(Player, 45, 2) then
  41. AddStep3(Quest, QuestGiver, Player)
  42. end
  43. end
  44. function AddStep3(Quest, QuestGiver, Player)
  45. UpdateQuestTaskGroupDescription(Quest, 1, "I have delivered the supplies to Orica Deadshot and Battlemaster Golben.")
  46. 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)
  47. AddQuestStepCompleteAction(Quest, 3, "CompleteQuest")
  48. end
  49. function CompleteQuest(Quest, QuestGiver, Player)
  50. GiveQuestReward(Quest, Player)
  51. end
  52. function Reload(Quest, QuestGiver, Player, Step)
  53. if Step == 1 then
  54. DeliveredOrica(Quest, QuestGiver, Player)
  55. end
  56. if Step == 2 then
  57. DeliveredGolben(Quest, QuestGiver, Player)
  58. end
  59. end