9
3

a_diplomatic_mission.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. --[[
  2. Script Name : Quests/QueensColony/a_diplomatic_mission.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.09.05
  5. Script Purpose : Handles the quest "A Diplomatic Mission"
  6. Zone : Queen's Colony
  7. Quest Giver: a Sapswill soothsayer
  8. Preceded by: Doggone It! (doggone_it.lua)
  9. Followed by: None
  10. --]]
  11. local ADiplomaticMission = 166
  12. function Init(Quest)
  13. -- Diplomat's Badge
  14. AddQuestStepChat(Quest, 1, "Greet a musician.", 1, "The Sapswill soothsayer said I need to get the members of their community. Guess it's all part of the diplomatic stuff.", 0, 2530226)
  15. AddQuestStepChat(Quest, 2, "Greet an incapacitated Sapswill.", 1, "The Sapswill soothsayer said I need to get the members of their community. Guess it's all part of the diplomatic stuff.", 0, 2530230)
  16. AddQuestStepChat(Quest, 3, "Greet a seated Sapswill.", 1, "The Sapswill soothsayer said I need to get the members of their community. Guess it's all part of the diplomatic stuff.", 0, 2530036)
  17. AddQuestStepChat(Quest, 4, "Greet an active Sapswill.", 1, "The Sapswill soothsayer said I need to get the members of their community. Guess it's all part of the diplomatic stuff.", 0, 2530228)
  18. AddQuestStepChat(Quest, 5, "Greet a happy Sapswill.", 1, "The Sapswill soothsayer said I need to get the members of their community. Guess it's all part of the diplomatic stuff.", 0, 2530229)
  19. AddQuestStepChat(Quest, 6, "Greet Durg.", 1, "The Sapswill soothsayer said I need to get the members of their community. Guess it's all part of the diplomatic stuff.", 0, 2530035)
  20. AddQuestStepChat(Quest, 7, "Greet Gonk.", 1, "The Sapswill soothsayer said I need to get the members of their community. Guess it's all part of the diplomatic stuff.", 0, 2530034)
  21. AddQuestStepCompleteAction(Quest, 1, "step1_complete_greetedMusician")
  22. AddQuestStepCompleteAction(Quest, 2, "step2_complete_greetedIncapacitated")
  23. AddQuestStepCompleteAction(Quest, 3, "step3_complete_greetedSeated")
  24. AddQuestStepCompleteAction(Quest, 4, "step4_complete_greetedActive")
  25. AddQuestStepCompleteAction(Quest, 5, "step5_complete_greetedHappy")
  26. AddQuestStepCompleteAction(Quest, 6, "step6_complete_greetedDurg")
  27. AddQuestStepCompleteAction(Quest, 7, "step7_complete_greetedGonk")
  28. end
  29. function Accepted(Quest, QuestGiver, Player)
  30. if QuestGiver ~= nil then
  31. if GetDistance(Player, QuestGiver) < 30 then
  32. FaceTarget(QuestGiver, Player)
  33. conversation = CreateConversation()
  34. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/a_sapswill_soothsayer/tutorial_island02_revamp/quests/sapswill_soothsayer/sapswill_soothsayer011.mp3", "", "nod", 2132440732, 232283022, Spawn)
  35. AddConversationOption(conversation, "To long life!")
  36. StartConversation(conversation, QuestGiver, Player, "To long life, and happy friendships!")
  37. end
  38. end
  39. end
  40. function Declined(Quest, QuestGiver, Player)
  41. end
  42. function step1_complete_greetedMusician(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 1, "I've greeted a Sapswill musician.")
  44. if QuestIsComplete(Player, ADiplomaticMission) then
  45. multiple_steps_complete(Quest, QuestGiver, Player)
  46. end
  47. end
  48. function step2_complete_greetedIncapacitated(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 2, "Greeted a passed out Sapswill.")
  50. if QuestIsComplete(Player, ADiplomaticMission) then
  51. multiple_steps_complete(Quest, QuestGiver, Player)
  52. end
  53. end
  54. function step3_complete_greetedSeated(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 3, "Greeted a leisurely Sapswill.")
  56. if QuestIsComplete(Player, ADiplomaticMission) then
  57. multiple_steps_complete(Quest, QuestGiver, Player)
  58. end
  59. end
  60. function step4_complete_greetedActive(Quest, QuestGiver, Player)
  61. UpdateQuestStepDescription(Quest, 4, "Greeted a frenzied dancer.")
  62. if QuestIsComplete(Player, ADiplomaticMission) then
  63. multiple_steps_complete(Quest, QuestGiver, Player)
  64. end
  65. end
  66. function step5_complete_greetedHappy(Quest, QuestGiver, Player)
  67. UpdateQuestStepDescription(Quest, 5, "Greeted a very happy Sapswill.")
  68. if QuestIsComplete(Player, ADiplomaticMission) then
  69. multiple_steps_complete(Quest, QuestGiver, Player)
  70. end
  71. end
  72. function step6_complete_greetedDurg(Quest, QuestGiver, Player)
  73. UpdateQuestStepDescription(Quest, 6, "I've greeted Durg.")
  74. if QuestIsComplete(Player, ADiplomaticMission) then
  75. multiple_steps_complete(Quest, QuestGiver, Player)
  76. end
  77. end
  78. function step7_complete_greetedGonk(Quest, QuestGiver, Player)
  79. UpdateQuestStepDescription(Quest, 7, "I've greeted Gonk.")
  80. if QuestIsComplete(Player, ADiplomaticMission) then
  81. multiple_steps_complete(Quest, QuestGiver, Player)
  82. end
  83. end
  84. function multiple_steps_complete(Quest, QuestGiver, Player)
  85. UpdateQuestTaskGroupDescription(Quest, 1, "I've greeted as many Sapswills as I could.")
  86. AddQuestStepChat(Quest, 8, "Pay respects to High Chieftain Grexx.", 1, "Now that I've introduced myself to several Sapswill goblins, I should pay my respects to High Chieftain Grexx.", 0, 2530038)
  87. AddQuestStepCompleteAction(Quest, 8, "quest_complete")
  88. end
  89. function quest_complete(Quest, QuestGiver, Player)
  90. UpdateQuestDescription(Quest, "I greeted many of the Sapswills, including their High Chieftan Grexx. They seem like such a harmless bunch; it's hard to imagine that anyone would want to turn them from their simple ways.")
  91. GiveQuestReward(Quest, Player)
  92. end
  93. function Reload(Quest, QuestGiver, Player, Step)
  94. if Step == 1 then
  95. step1_complete_greetedMusician(Quest, QuestGiver, Player)
  96. elseif Step == 2 then
  97. step2_complete_greetedIncapacitated(Quest, QuestGiver, Player)
  98. elseif Step == 3 then
  99. step3_complete_greetedSeated(Quest, QuestGiver, Player)
  100. elseif Step == 4 then
  101. step4_complete_greetedActive(Quest, QuestGiver, Player)
  102. elseif Step == 5 then
  103. step5_complete_greetedHappy(Quest, QuestGiver, Player)
  104. elseif Step == 6 then
  105. step6_complete_greetedDurg(Quest, QuestGiver, Player)
  106. elseif Step == 7 then
  107. step7_complete_greetedGonk(Quest, QuestGiver, Player)
  108. end
  109. end