9
3

TrainerDurbok.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. --[[
  2. Script Name : SpawnScripts/Sprawl/TrainerDurbok.lua
  3. Script Purpose : Trainer Durbok <Dreadnaught>
  4. Script Author : Scatman
  5. Script Date : 2008.09.29
  6. Script Notes :
  7. --]]
  8. local QUEST_1_FROM_KURDEK = 455
  9. local QUEST_3_FROM_KURDEK = 541
  10. local QUEST_1 = 545 -- repeatable
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange")
  13. ProvidesQuest(NPC, QUEST_1)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. local choice = math.random(1, 5)
  20. if choice == 1 then
  21. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quest/quest_trainer_durbok_callout_4b619d6e.mp3", "With my training, you Giantslayers might amount to something yet!", "agree", 677573718, 693214962, Spawn)
  22. elseif choice == 2 then
  23. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quest/quest_trainer_durbok_callout_620ddf6f.mp3", "That's right, bob and weave.", "agree", 2563477319, 1972593588, Spawn)
  24. elseif choice == 3 then
  25. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quest/quest_trainer_durbok_callout_6cf1b665.mp3", "Dominate your enemies through force!", "threaten", 2765968733, 31376268, Spawn)
  26. elseif choice == 4 then
  27. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quest/quest_trainer_durbok_callout_d028d77b.mp3", "Parry and uppercut! Don't forget to use your jab!", "threaten", 1525930784, 909688040, Spawn)
  28. elseif choice == 5 then
  29. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quest/quest_trainer_durbok_callout_f22abebb.mp3", "Tarden's laziness has been rubbing off on you Giantslayers!", "shakefist", 2685681648, 4087837540, Spawn)
  30. end
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. conversation = CreateConversation()
  35. if HasCompletedQuest(Spawn, QUEST_1_FROM_KURDEK) or (HasQuest(Spawn, QUEST_1_FROM_KURDEK) and GetQuestStep(Spawn, QUEST_1_FROM_KURDEK) > 1) then
  36. if HasCompletedQuest(Spawn, QUEST_3_FROM_KURDEK) then
  37. if HasCompletedQuest(Spawn, QUEST_1) then
  38. -- repeatable
  39. elseif HasQuest(Spawn, QUEST_1) then
  40. OnQuest1(NPC, Spawn, conversation)
  41. else
  42. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok006.mp3", "", "", 2664707401, 3770487430, Spawn)
  43. AddConversationOption(conversation, "Enforcer Kurdek mentioned that you could use a hand.", "dlg_0_1")
  44. AddConversationOption(conversation, "Just passing through.")
  45. StartConversation(conversation, NPC, Spawn, "Ah, you again. What brings you back to this part of the Sprawl?")
  46. end
  47. else
  48. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok001.mp3", "", "", 3497395239, 3242764181, Spawn)
  49. AddConversationOption(conversation, "Sorry, I didn't mean to interrupt.")
  50. StartConversation(conversation, NPC, Spawn, "Hey! Can't you see I'm busy training these recruits how to fight?")
  51. end
  52. else
  53. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok001.mp3", "", "", 3497395239, 3242764181, Spawn)
  54. if HasQuest(Spawn, QUEST_1_FROM_KURDEK) and GetQuestStep(Spawn, QUEST_1_FROM_KURDEK) == 1 then
  55. AddConversationOption(conversation, "My name is " .. GetName(Spawn) .. ". Enforcer Kurdek sent me to ask how things are going.", "dlg_18_1")
  56. end
  57. AddConversationOption(conversation, "Sorry, I didn't mean to interrupt.")
  58. StartConversation(conversation, NPC, Spawn, "Hey! Can't you see I'm busy training these recruits how to fight?")
  59. end
  60. --[[
  61. if convo==2 then
  62. end
  63. if convo==3 then
  64. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok012.mp3", "", "", 857680969, 589713294, Spawn)
  65. AddConversationOption(conversation, "Yes, I'm looking for more work to do.", "dlg_3_1")
  66. AddConversationOption(conversation, "No thanks.")
  67. StartConversation(conversation, NPC, Spawn, "Welcome back. Are you ready to put more of those scum back in their place?")
  68. end
  69. if convo==4 then
  70. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok009.mp3", "", "", 2879942612, 4077208169, Spawn)
  71. AddConversationOption(conversation, "There are a few less troublemakers to worry about.", "dlg_4_1")
  72. AddConversationOption(conversation, "Not yet.")
  73. StartConversation(conversation, NPC, Spawn, "Hello again, adventurer. Have you finished thinning out the excess population around here?")
  74. end
  75. if convo==5 then
  76. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok012.mp3", "", "", 857680969, 589713294, Spawn)
  77. AddConversationOption(conversation, "Yes, I'm looking for more work to do.", "dlg_5_1")
  78. AddConversationOption(conversation, "No thanks.")
  79. StartConversation(conversation, NPC, Spawn, "Welcome back. Are you ready to put more of those scum back in their place?")
  80. end
  81. if convo==6 then
  82. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok009.mp3", "", "", 2879942612, 4077208169, Spawn)
  83. AddConversationOption(conversation, "Not yet.", "dlg_6_1")
  84. StartConversation(conversation, NPC, Spawn, "Hello again, adventurer. Have you finished thinning out the excess population around here?")
  85. end
  86. if convo==7 then
  87. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok009.mp3", "", "", 2879942612, 4077208169, Spawn)
  88. AddConversationOption(conversation, "Not yet.", "dlg_7_1")
  89. StartConversation(conversation, NPC, Spawn, "Hello again, adventurer. Have you finished thinning out the excess population around here?")
  90. end
  91. if convo==8 then
  92. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok009.mp3", "", "", 2879942612, 4077208169, Spawn)
  93. AddConversationOption(conversation, "There are a few less troublemakers to worry about.", "dlg_8_1")
  94. AddConversationOption(conversation, "Not yet.")
  95. StartConversation(conversation, NPC, Spawn, "Hello again, adventurer. Have you finished thinning out the excess population around here?")
  96. end
  97. if convo==9 then
  98. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok012.mp3", "", "", 857680969, 589713294, Spawn)
  99. AddConversationOption(conversation, "Yes, I'm looking for more work to do.", "dlg_9_1")
  100. AddConversationOption(conversation, "No thanks.")
  101. StartConversation(conversation, NPC, Spawn, "Welcome back. Are you ready to put more of those scum back in their place?")
  102. end
  103. if convo==18 then
  104. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok001.mp3", "", "", 3497395239, 3242764181, Spawn)
  105. AddConversationOption(conversation, "My name is Whipew. Enforcer Kurdek sent me to ask how things are going.", "dlg_18_1")
  106. AddConversationOption(conversation, "Sorry, I didn't mean to interrupt.")
  107. StartConversation(conversation, NPC, Spawn, "Hey! Can't you see I'm busy training these recruits how to fight?")
  108. end
  109. if convo==19 then
  110. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok001.mp3", "", "", 3497395239, 3242764181, Spawn)
  111. AddConversationOption(conversation, "Sorry, I didn't mean to interrupt.", "dlg_19_1")
  112. StartConversation(conversation, NPC, Spawn, "Hey! Can't you see I'm busy training these recruits how to fight?")
  113. end
  114. --]]
  115. end
  116. -------------------------------------------------------------------------------------------------------------------
  117. -- QUEST_1_FROM_KURDEK
  118. -------------------------------------------------------------------------------------------------------------------
  119. function dlg_18_1(NPC, Spawn)
  120. FaceTarget(NPC, Spawn)
  121. conversation = CreateConversation()
  122. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok002.mp3", "", "", 3758292268, 2300851073, Spawn)
  123. AddConversationOption(conversation, "So how goes the training?", "dlg_18_2")
  124. AddConversationOption(conversation, "It sounds like a bother, so never mind.")
  125. StartConversation(conversation, NPC, Spawn, "That figures. Kurdek can't be bothered to ask me himself, eh? Fine, I suppose I can tell you instead.")
  126. end
  127. function dlg_18_2(NPC, Spawn)
  128. FaceTarget(NPC, Spawn)
  129. conversation = CreateConversation()
  130. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok003.mp3", "", "", 641451677, 496874931, Spawn)
  131. AddConversationOption(conversation, "What do you mean?", "dlg_18_3")
  132. AddConversationOption(conversation, "That doesn't sound like my problem.")
  133. StartConversation(conversation, NPC, Spawn, "There are a few worthwhile Giantslayers here, but for the most part they're too sloppy to ever become Dreadnaughts. I don't really blame them, though. Clearly they aren't getting the proper direction.")
  134. end
  135. function dlg_18_3(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok004.mp3", "", "", 321268147, 2623146346, Spawn)
  139. AddConversationOption(conversation, "What do you think should be done about it?", "dlg_18_4")
  140. AddConversationOption(conversation, "Good luck with that.")
  141. StartConversation(conversation, NPC, Spawn, "The one who claims to be the leader of the Giantslayers is a worthless barbarian named Brutemaster Tarden. I think he cares more about extorting money from the locals than he does about making sure his gang controls the Black Magi and the Dervish.")
  142. end
  143. function dlg_18_4(NPC, Spawn)
  144. SetStepComplete(Spawn, QUEST_1_FROM_KURDEK, 1)
  145. FaceTarget(NPC, Spawn)
  146. conversation = CreateConversation()
  147. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok005.mp3", "", "", 768810452, 746067812, Spawn)
  148. AddConversationOption(conversation, "I'll let him know.")
  149. StartConversation(conversation, NPC, Spawn, "I recommend that we strike a little fear into Tarden so that he remembers who's really in charge around here. Tell Enforcer Kurdek that it's time to teach that lazy Giantslayer a lesson he won't soon forget.")
  150. end
  151. -------------------------------------------------------------------------------------------------------------------
  152. -- QUEST 1
  153. -------------------------------------------------------------------------------------------------------------------
  154. function dlg_0_1(NPC, Spawn)
  155. FaceTarget(NPC, Spawn)
  156. conversation = CreateConversation()
  157. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok007.mp3", "", "", 3620375691, 3328248556, Spawn)
  158. AddConversationOption(conversation, "You've got a deal.", "OfferQuest1")
  159. AddConversationOption(conversation, "No thanks.")
  160. StartConversation(conversation, NPC, Spawn, "Aye, some of the rival gangs are interfering with my ability to train the Giantslayers. I'd pay you well if you would get rid of some of them for me.")
  161. end
  162. function OfferQuest1(NPC, Spawn)
  163. FaceTarget(NPC, Spawn)
  164. OfferQuest(NPC, Spawn, QUEST_1)
  165. end
  166. function OnQuest1(NPC, Spawn, conversation)
  167. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok009.mp3", "", "", 2879942612, 4077208169, Spawn)
  168. if GetQuestStep(Spawn, QUEST_1) == 2 then
  169. AddConversationOption(conversation, "There are a few less troublemakers to worry about.", "dlg_2_1")
  170. end
  171. AddConversationOption(conversation, "Not yet.")
  172. StartConversation(conversation, NPC, Spawn, "Hello again, adventurer. Have you finished thinning out the excess population around here?")
  173. end
  174. function dlg_2_1(NPC, Spawn)
  175. SetStepComlete(Spawn, QUEST_1, 2)
  176. FaceTarget(NPC, Spawn)
  177. conversation = CreateConversation()
  178. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok010.mp3", "", "", 1104739099, 151745645, Spawn)
  179. AddConversationOption(conversation, "I'll check back.", "dlg_2_2")
  180. StartConversation(conversation, NPC, Spawn, "Great news! As promised, here's your reward. If you're available, I might have more work for you in the future.")
  181. end
  182. --[[
  183. function dlg_5_1(NPC, Spawn)
  184. FaceTarget(NPC, Spawn)
  185. conversation = CreateConversation()
  186. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/trainer_durbok/fprt_adv03_sprawl/quests/trainer_durbok008.mp3", "", "", 2693497223, 3993753671, Spawn)
  187. AddConversationOption(conversation, "Will do.", "dlg_5_2")
  188. StartConversation(conversation, NPC, Spawn, "Sounds good. I'll jot down the particulars in your journal. Come back to me for payment when you're finished showing those scum who's boss.")
  189. end
  190. --]]