9
3

BraksanSteelforge.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/BraksanSteelforge.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.04 02:09:38
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Fighter2 = 5731
  10. local Fighter3 = 5735
  11. local Fighter4 = 5739
  12. local Fighter5 = 5743
  13. local Fighter6 = 5751
  14. function spawn(NPC)
  15. SetPlayerProximityFunction(NPC, 14, "InRange", "LeaveRange")
  16. ProvidesQuest(NPC, Fighter3)
  17. ProvidesQuest(NPC, Fighter4)
  18. ProvidesQuest(NPC, Fighter5)
  19. ProvidesQuest(NPC, Fighter6)
  20. end
  21. function InRange(NPC,Spawn)
  22. if GetClass(Spawn)== 0 then
  23. FaceTarget(NPC, Spawn)
  24. PlayFlavor(NPC,"","You there! You look like a fighter, but I can't be helping someone who isn't properly registered with Garven. Go back to the beach, find him, and register at once.","no",0,0, Spawn)
  25. else
  26. if HasQuest(Spawn,Fighter2)then
  27. FaceTarget(NPC, Spawn)
  28. PlayFlavor(NPC,"voiceover/english/braksan_steelforge/tutorial_island02_fvo_fighterintro.mp3","You there! You look like someone who can destroy those little green monsters. I need your help.","hello",3168609453,3358176897, Spawn)
  29. elseif not HasQuest(Spawn, Fighter4) and HasCompletedQuest(Spawn,Fighter3) and not HasCompletedQuest(Spawn,Fighter4) then
  30. FaceTarget(NPC, Spawn)
  31. PlayFlavor(NPC,"voiceover/english/braksan_steelforge/tutorial_island02_fvo_fighterq2.mp3","Ahh, there you are! I can use your help.","beckon",2456679786,1937248917, Spawn)
  32. elseif not HasQuest(Spawn, Fighter6) and HasCompletedQuest(Spawn,Fighter5) and not HasCompletedQuest(Spawn,Fighter6) then
  33. FaceTarget(NPC, Spawn)
  34. PlayFlavor(NPC,"","Nice to see you're still alive and well!","hello",0,0, Spawn)
  35. end
  36. end
  37. end
  38. function hailed(NPC, Spawn)
  39. if HasQuest(Spawn, Fighter2) or not HasQuest(Spawn, Fighter3) and not HasCompletedQuest(Spawn, Fighter3) and HasCompletedQuest(Spawn,Fighter2) then
  40. Dialog2(NPC,Spawn)
  41. else
  42. FaceTarget(NPC, Spawn)
  43. Dialog.New(NPC, Spawn)
  44. Dialog.AddDialog("I wish I could chit-chat but I must work. The goblins don't care how many times I fix these things, they just keep breaking them.")
  45. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge001.mp3", 3328433629, 3720216759)
  46. if GetQuestStep(Spawn,Fighter3)==2 then
  47. Dialog.AddOption("There are four less goblins to worry about.","Quest3Turnin")
  48. end
  49. if not HasQuest(Spawn, Fighter4) and HasCompletedQuest(Spawn,Fighter3) and not HasCompletedQuest(Spawn,Fighter4) then
  50. Dialog.AddOption("I am interested in helping out. Do you have any work for me?","Quest4Start")
  51. end
  52. if not HasQuest(Spawn, Fighter5) and HasCompletedQuest(Spawn,Fighter4) and not HasCompletedQuest(Spawn,Fighter5) then
  53. Dialog.AddOption("What other work did you want to talk about?","Quest5Start")
  54. end
  55. if not HasQuest(Spawn, Fighter6) and HasCompletedQuest(Spawn,Fighter5) and not HasCompletedQuest(Spawn,Fighter6) then
  56. Dialog.AddOption("I am interested in helping out. Do you have any work for me?","Quest6Start")
  57. end
  58. if GetQuestStep(Spawn,Fighter4)==2 then
  59. Dialog.AddOption("I killed five of the goblin aggressors.","Quest4Turnin")
  60. end
  61. if GetQuestStep(Spawn,Fighter5)==2 then
  62. Dialog.AddOption("I have four flint head spears for you.","Quest5Turnin")
  63. end
  64. if GetQuestStep(Spawn,Fighter6)==3 then
  65. Dialog.AddOption("Grimgash won't be organizing any more goblin raids.","Quest6Turnin")
  66. end
  67. if HasCompletedQuest(Spawn,Fighter6) then
  68. Dialog.AddOption("Greetings Braksan. I hope your work has slowed down some.","Thanks")
  69. end
  70. Dialog.AddOption("I will leave you to your work.")
  71. Dialog.Start()
  72. end
  73. end
  74. function Thanks(NPC,Spawn)
  75. FaceTarget(NPC, Spawn)
  76. PlayFlavor(NPC,"","Nice to see you're still alive and well!","hello",0,0, Spawn)
  77. end
  78. function respawn(NPC)
  79. spawn(NPC)
  80. end
  81. --------------------------------------------------------------------------------------------------------------------------------
  82. -- QUEST 3
  83. --------------------------------------------------------------------------------------------------------------------------------
  84. function Dialog2(NPC,Spawn)
  85. FaceTarget(NPC, Spawn)
  86. Dialog.New(NPC, Spawn)
  87. Dialog.AddDialog("I heard you smacked around a few goblins at the gate. Good work! Those nasty critters need a whooping to knock some sense into their thick skulls. If you are lookin for work, I could use some help. Are you interested?")
  88. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge002.mp3", 1509886457, 290634781)
  89. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  90. Dialog.AddOption("I am interested. What is it?","Interested")
  91. Dialog.AddOption("Not right now.")
  92. Dialog.Start()
  93. if HasQuest(Spawn, Fighter2) then
  94. SetStepComplete(Spawn,Fighter2,1)
  95. end
  96. end
  97. function Interested(NPC,Spawn)
  98. FaceTarget(NPC, Spawn)
  99. Dialog.New(NPC, Spawn)
  100. Dialog.AddDialog("The duke has charged me with rounding up a few brave warriors and you fit the bill. Goblins are staging attacks from a forward supply camp in the west. We've charged a few finger wagglin' mages to destroy the supplies, but in their fancy robes they're not much use. We need help with the supply runners guarding the camp. Would you help us, adventurer?")
  101. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge003.mp3", 3096036841, 3817796616)
  102. Dialog.AddOption("It'd be my pleasure to bust a few more goblin skulls.","Quest3Start")
  103. Dialog.Start()
  104. end
  105. function Quest3Start(NPC,Player)
  106. OfferQuest(NPC,Player,Fighter3)
  107. FaceTarget(NPC, Spawn)
  108. end
  109. function Quest3Turnin(NPC,Spawn)
  110. FaceTarget(NPC, Spawn)
  111. Dialog.New(NPC, Spawn)
  112. Dialog.AddDialog("Nice job! I knew you'd do well. As payment I placed a fine pair of boots in your bank. Talk to Banker Vertbridge and he'll get the boots for you.")
  113. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge005.mp3", 856327109, 3223978873)
  114. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  115. Dialog.AddOption("I will go check the bank.")
  116. Dialog.Start()
  117. if not HasItem(Spawn,152754) then
  118. SummonItem (Spawn, 152754, 1, "bank", 1)
  119. end
  120. SetStepComplete(Spawn,Fighter3,2)
  121. end
  122. --------------------------------------------------------------------------------------------------------------------------------
  123. -- QUEST 4
  124. --------------------------------------------------------------------------------------------------------------------------------
  125. function Quest4Start(NPC,Spawn)
  126. FaceTarget(NPC, Spawn)
  127. Dialog.New(NPC, Spawn)
  128. Dialog.AddDialog("I must organize a search party for some refugees who wandered into the wilderness. Unfortunately, because our guards are watching over the barricades, I've been unable to organize a party. I'm afraid those goblin buggers are holding the refugees in an alcove west of here. Will you be willing to crack a few goblin skulls for us?")
  129. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge006.mp3", 2676048621, 3798941591)
  130. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  131. Dialog.AddOption("I can handle a few goblins.","Quest4Offer")
  132. Dialog.AddOption("No, thanks. I'm busy.")
  133. Dialog.Start()
  134. end
  135. function Quest4Offer(NPC,Player)
  136. OfferQuest(NPC,Player,Fighter4)
  137. FaceTarget(NPC, Spawn)
  138. end
  139. function Quest4Turnin(NPC,Spawn)
  140. FaceTarget(NPC, Spawn)
  141. Dialog.New(NPC, Spawn)
  142. Dialog.AddDialog("Excellent work adventurer! The refugees are safe. Hopefully now they will know better than to wander off into the woods. As promised here is your reward. These leggings will protect you, and trust me, you'll need them. I have another job for you. The scouts discovered more useful information. Curious to know what they found?")
  143. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge008.mp3", 2823482933, 2765578198)
  144. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  145. Dialog.AddOption("Perhaps, what is it?","Quest5Start")
  146. Dialog.AddOption("Not right now. Let me deal with other things first.")
  147. Dialog.Start()
  148. SetStepComplete(Spawn,Fighter4,2)
  149. end
  150. --------------------------------------------------------------------------------------------------------------------------------
  151. -- QUEST 5
  152. --------------------------------------------------------------------------------------------------------------------------------
  153. function Quest5Start(NPC,Spawn)
  154. FaceTarget(NPC, Spawn)
  155. Dialog.New(NPC, Spawn)
  156. Dialog.AddDialog("I knew you'd help! It's time for those green beasties to get what's coming to them! Our scouts located the goblins' main encampment in the northwest! Other adventurers are setting out to give those goblins a good arse kicking! They'll need your help. No one serves up a whoopin' like a fighter. Am I right?")
  157. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge009.mp3", 3901042740, 207303651)
  158. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  159. Dialog.AddOption("Of course you are!","Quest5Offer")
  160. Dialog.AddOption("Actually, I have some other buisness to attend to.")
  161. Dialog.Start()
  162. end
  163. function Quest5Offer(NPC,Player)
  164. OfferQuest(NPC,Player,Fighter5)
  165. FaceTarget(NPC, Spawn)
  166. end
  167. function Quest5Turnin(NPC,Spawn)
  168. FaceTarget(NPC, Spawn)
  169. Dialog.New(NPC, Spawn)
  170. Dialog.AddDialog("Ah, yes. The spears will do just fine. Thank you for your hard work, friend. I knew you were a brave fighter. Please accept this hand-made tunic for your hard work in the outpost. Now I hate to ask you, knowing how much fighting you have already done, but I thought you might be curious about what's causing the goblin attacks.")
  171. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge011.mp3", 2911283846, 1300227614)
  172. PlayFlavor(NPC, "", "", "smile", 0, 0, Spawn)
  173. Dialog.AddOption("I am interested in helping out. Do you have any work for me?","Quest6Start")
  174. Dialog.AddOption("No, I want to get off this island.")
  175. Dialog.Start()
  176. SetStepComplete(Spawn,Fighter5,2)
  177. end
  178. --------------------------------------------------------------------------------------------------------------------------------
  179. -- QUEST 6
  180. --------------------------------------------------------------------------------------------------------------------------------
  181. function Quest6Start(NPC,Spawn)
  182. FaceTarget(NPC, Spawn)
  183. Dialog.New(NPC, Spawn)
  184. Dialog.AddDialog("An orc was spotted in the northeast part of the island. Rumor is that it's the infamous Grimgash the Black, a fearsome orc pirate. If this is true, it explains why the goblins are attacking our outpost. Grimgash may have taken control of the local goblin tribe and turned them into his private army.")
  185. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge012.mp3", 1342121038, 4256806125)
  186. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  187. Dialog.AddOption("Okay, I'll take care of that for you. An orc leader won't be a problem.","Quest6Offer")
  188. Dialog.AddOption("No, thanks. I'm busy.")
  189. Dialog.Start()
  190. end
  191. function Quest6Offer(NPC,Player)
  192. OfferQuest(NPC,Player,Fighter6)
  193. FaceTarget(NPC, Spawn)
  194. end
  195. function Quest6Turnin(NPC,Spawn)
  196. FaceTarget(NPC, Spawn)
  197. Dialog.New(NPC, Spawn)
  198. Dialog.AddDialog("HA! Look at that would you! I knew you'd take care of that nasty orc! Now that Grimgash is slain the goblin attacks should slow down. You've served the outpost well, friend. As thanks, please accept this buckler, I know you'll use it well. Be careful and don't get your bell rung too often. Old Braksan hates funerals!")
  199. Dialog.AddVoiceover("voiceover/english/braksan_steelforge/tutorial_island02/braksansteelforge014.mp3", 3277683994, 3720991068)
  200. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  201. Dialog.AddOption("Glad I could be of assistance. Take care Braksan.")
  202. Dialog.Start()
  203. SetStepComplete(Spawn,Fighter6,3)
  204. end