CaptainEitoa.lua 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. --[[
  2. Script Name : SpawnScripts/Antonica/CaptainEitoa.lua
  3. Script Purpose : Captain Eitoa
  4. Script Author : geordie0511
  5. Script Date : 2019.03.19
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. NOTE: NEEDS DIALOG RESTRUCTURED. DIALOG FLOW IS NOT ACCURATE.
  8. --]]
  9. local Keep = 470
  10. local Gnoll = 471
  11. local Captain = 472
  12. function spawn(NPC)
  13. SetPlayerProximityFunction(NPC, 10, "InRange")
  14. waypoints(NPC)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange(NPC, Spawn)
  20. if not HasQuest(Spawn, Keep) and not HasCompletedQuest(Spawn, Keep) then
  21. ProvidesQuest(NPC, Keep)
  22. SetInfoFlag(NPC)
  23. SetVisualFlag(NPC)
  24. elseif HasCompletedQuest(Spawn, Keep) then
  25. ProvidesQuest(NPC, Gnoll)
  26. SetInfoFlag(NPC)
  27. SetVisualFlag(NPC)
  28. elseif HasCompletedQuest(Spawn, Gnoll) then
  29. ProvidesQuest(NPC, Captain)
  30. SetInfoFlag(NPC)
  31. SetVisualFlag(NPC)
  32. end
  33. end
  34. function hailed(NPC, Spawn)
  35. FaceTarget(NPC, Spawn)
  36. conversation = CreateConversation()
  37. PlayFlavor(NPC, "voiceover/english/captain_eitoa/antonica/captaineitoa000.mp3", "", "", 1089362944, 4215517300, Spawn)
  38. if GetQuestStep(Spawn, Keep) == 2 then
  39. PlayFlavor(NPC, "voiceover/english/captain_eitoa/antonica/captaineitoa003.mp3", "", "", 1980389994, 2821940048, Spawn)
  40. AddConversationOption(conversation, "I was happy to be of assistance.")
  41. StartConversation(conversation, NPC, Spawn, "Good. I worry about our outposts, especially the ones that... well, let's just say I'm relieved. At any rate, here's a bit of coin from the city's coffers. Qeynos thanks you for your service.")
  42. SetStepComplete(Spawn, Keep, 2)
  43. elseif GetQuestStep(Spawn, Gnoll) == 4 then
  44. AddConversationOption(conversation, "Beltho's report, as you requested.", "dlg_18_1")
  45. AddConversationOption(conversation, "Ok, thanks anyway.")
  46. StartConversation(conversation, NPC, Spawn, "I wouldn't mind chatting with you in Irontoe's East, but here I've got work to do.")
  47. elseif GetQuestStep(Spawn, Captain) == 2 then
  48. SetStepComplete(Spawn, Captain, 2)
  49. elseif HasCompletedQuest(Spawn, Keep) == false and HasQuest(Spawn, Keep) == false then
  50. PlayFlavor(NPC, "voiceover/english/captain_eitoa/antonica/captaineitoa001.mp3", "", "", 1114858162, 289977028, Spawn)
  51. AddConversationOption(conversation, "It is the least I can do for Qeynos.", "dlg_2_2")
  52. AddConversationOption(conversation, "That sounds a bit too far for me.")
  53. StartConversation(conversation, NPC, Spawn, "There is something you can do. I've posted a guard at the Keep of the Ardent Needle, and he hasn't been reporting to me as often as I'd like. Would you go inspect the keep and make sure everything is in order?")
  54. elseif HasCompletedQuest(Spawn, Gnoll) == false and HasQuest(Spawn, Gnoll) == false and HasCompletedQuest(Spawn, Keep) then
  55. PlayFlavor(NPC, "voiceover/english/captain_eitoa/antonica/captaineitoa004.mp3", "", "", 14052338, 3802502153, Spawn)
  56. AddConversationOption(conversation, "I suppose I can do that.", "dlg_4_2")
  57. AddConversationOption(conversation, "Let someone else deal with it, I'm not interested.")
  58. StartConversation(conversation, NPC, Spawn, "I do. I need someone to check with Captain Beltho at Gnollslayer Keep and return with his report about the gnolls. I hope he's made progress since the last one.")
  59. elseif HasCompletedQuest(Spawn, Captain) == false and HasQuest(Spawn, Captain) == false and HasCompletedQuest(Spawn, Gnoll) then
  60. OfferQuest(NPC, Spawn, Captain)
  61. end
  62. end
  63. function Quest1(NPC, Spawn)
  64. OfferQuest(NPC, Spawn, Keep)
  65. end
  66. function Quest2(NPC, Spawn)
  67. OfferQuest(NPC, Spawn, Gnoll)
  68. end
  69. --------------- Keep
  70. function dlg_2_2(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. PlayFlavor(NPC, "voiceover/english/captain_eitoa/antonica/captaineitoa002.mp3", "", "", 2766073172, 817198256, Spawn)
  74. AddConversationOption(conversation, "I'll return after I've performed the inspection.", "Quest1")
  75. StartConversation(conversation, NPC, Spawn, "Go then. You'll find the Keep on the north side of the ridge, just this side of the Tower of the Oracles. It's one of the few keeps in pristine condition.")
  76. end
  77. --------------- Quest2
  78. function dlg_4_2(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. PlayFlavor(NPC, "voiceover/english/captain_eitoa/antonica/captaineitoa005.mp3", "", "", 1672181328, 1405369900, Spawn)
  82. AddConversationOption(conversation, "I'll return when I'm finished.", "Quest2")
  83. StartConversation(conversation, NPC, Spawn, "It's a fair distance, but not hard to find. Take the south path around the mountain range that splits Antonica. Once you cross the bridge at the far side of the valley, follow the river a hundred cogs or so, then turn east until you see a small keep with a moat. Captain Beltho should be there. If he's not, I'll want to know why he's not at his post.")
  84. end
  85. ---- Gnoll
  86. function dlg_18_1(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. PlayFlavor(NPC, "voiceover/english/captain_eitoa/antonica/captaineitoa006.mp3", "", "", 3813922311, 2543607309, Spawn)
  90. AddConversationOption(conversation, "I suppose I was lucky to some extent. ", "dlg_18_2")
  91. StartConversation(conversation, NPC, Spawn, "Give me a moment to read over this... Finally, some real progress! Beltho mentions your involvement with finding the hidden entrance to the gnoll lair. Well done!")
  92. end
  93. function dlg_18_2(NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. conversation = CreateConversation()
  96. PlayFlavor(NPC, "voiceover/english/captain_eitoa/antonica/captaineitoa007.mp3", "", "", 193114966, 1655403283, Spawn)
  97. AddConversationOption(conversation, "Thank you very much. Once again, I am happy to have been of service.")
  98. StartConversation(conversation, NPC, Spawn, "Don't underplay your skills. Without your help, Beltho would still be searching for the hidden entrance to the lair. Take this signet ring as a mark of my gratitude and trust.")
  99. SetStepComplete(Spawn, Gnoll, 4)
  100. end
  101. ---------------------
  102. function waypoints(NPC)
  103. MovementLoopAddLocation(NPC, -12.4, -14.06, -66.35, 2, 2)
  104. MovementLoopAddLocation(NPC, -14.02, -14.06, -67.65, 2, 0)
  105. MovementLoopAddLocation(NPC, -7.31, -14.1, -62.56, 2, 0)
  106. MovementLoopAddLocation(NPC, 2.28, -14.24, -55.72, 2, 0)
  107. MovementLoopAddLocation(NPC, 7.07, -14.21, -52.43, 2, 0)
  108. MovementLoopAddLocation(NPC, 21.54, -15.8, -38.2, 2, 0)
  109. MovementLoopAddLocation(NPC, 33.92, -18.14, -31.5, 2, 0)
  110. MovementLoopAddLocation(NPC, 46.84, -19, -19.41, 2, 0)
  111. MovementLoopAddLocation(NPC, 56.29, -19.4, -15.96, 2, 0)
  112. MovementLoopAddLocation(NPC, 78.01, -20.7, -21.08, 2, 2)
  113. MovementLoopAddLocation(NPC, 73.37, -20.35, -27.53, 2, 0)
  114. MovementLoopAddLocation(NPC, 64.24, -19.44, -36.2, 2, 0)
  115. MovementLoopAddLocation(NPC, 52.14, -19.02, -35.91, 2, 0)
  116. MovementLoopAddLocation(NPC, 38.15, -18.52, -32.95, 2, 0)
  117. MovementLoopAddLocation(NPC, 25.95, -16.51, -37.23, 2, 0)
  118. MovementLoopAddLocation(NPC, 16.43, -15.17, -42.51, 2, 0)
  119. MovementLoopAddLocation(NPC, 9.61, -14.4, -50.18, 2, 0)
  120. MovementLoopAddLocation(NPC, -7.7, -14.09, -63.08, 2, 0)
  121. MovementLoopAddLocation(NPC, -10.9, -14.06, -65.18, 2, 2)
  122. MovementLoopAddLocation(NPC, -12.76, -14.06, -65.48, 2, 0)
  123. MovementLoopAddLocation(NPC, -3.57, -14.16, -59.98, 2, 0)
  124. MovementLoopAddLocation(NPC, 7.14, -14.27, -53.2, 2, 0)
  125. MovementLoopAddLocation(NPC, 18.99, -15.38, -41.23, 2, 0)
  126. MovementLoopAddLocation(NPC, 26.66, -16.71, -35.75, 2, 0)
  127. MovementLoopAddLocation(NPC, 32.71, -17.89, -33.89, 2, 0)
  128. MovementLoopAddLocation(NPC, 39.65, -18.59, -34.7, 2, 0)
  129. MovementLoopAddLocation(NPC, 50.85, -18.94, -37.86, 2, 0)
  130. MovementLoopAddLocation(NPC, 59.56, -19.19, -38.97, 2, 0)
  131. MovementLoopAddLocation(NPC, 71.94, -20.26, -27.9, 2, 0)
  132. MovementLoopAddLocation(NPC, 82.66, -20.98, -22.66, 2, 2)
  133. MovementLoopAddLocation(NPC, 76.72, -20.64, -23.21, 2, 0)
  134. MovementLoopAddLocation(NPC, 70.7, -20.26, -18.17, 2, 0)
  135. MovementLoopAddLocation(NPC, 63.72, -19.83, -15.3, 2, 0)
  136. MovementLoopAddLocation(NPC, 51.24, -19.21, -16.03, 2, 0)
  137. MovementLoopAddLocation(NPC, 47.21, -19.02, -19.61, 2, 0)
  138. MovementLoopAddLocation(NPC, 34.35, -18.24, -30.19, 2, 0)
  139. MovementLoopAddLocation(NPC, 23.38, -16.01, -37.68, 2, 0)
  140. MovementLoopAddLocation(NPC, 13.28, -14.8, -46.19, 2, 0)
  141. MovementLoopAddLocation(NPC, -0.05, -14.21, -57.04, 2, 0)
  142. end