Vladiminn.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/Vladiminn.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.04 02:09:03
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Scout2 = 5730
  10. local Scout3 = 5737
  11. local Scout4 = 5741
  12. local Scout5 = 5745
  13. local Scout6 = 5753
  14. function spawn(NPC)
  15. SetPlayerProximityFunction(NPC, 12, "InRange", "LeaveRange")
  16. ProvidesQuest(NPC, Scout3)
  17. ProvidesQuest(NPC, Scout4)
  18. ProvidesQuest(NPC, Scout5)
  19. ProvidesQuest(NPC, Scout6)
  20. CastSpell(NPC,8231)
  21. end
  22. function InRange(NPC,Spawn)
  23. if HasQuest(Spawn,Scout2)then
  24. FaceTarget(NPC, Spawn)
  25. PlayFlavor(NPC,"","You there, you look like a scout. That slight shift of the eyes and careful evaluation of your surroundings... Yes, definitely a scout. Please, why don't you come and chat with me?","hello",0,0, Spawn)
  26. elseif not HasQuest(Spawn, Scout4) and HasCompletedQuest(Spawn,Scout3) and not HasCompletedQuest(Spawn,Scout4) then
  27. FaceTarget(NPC, Spawn)
  28. PlayFlavor(NPC,"voiceover/english/vladiminn/tutorial_island02_fvo_scoutq2.mp3","Ahh, it's you there! Would you help me out again?","bye",4065853934,2005213688, Spawn)
  29. elseif not HasQuest(Spawn, Scout5) and HasCompletedQuest(Spawn,Scout4) and not HasCompletedQuest(Spawn,Scout5) then
  30. FaceTarget(NPC, Spawn)
  31. PlayFlavor(NPC,"","Just in time! You're back in time to help me out with something!","hello",0,0, Spawn)
  32. end
  33. end
  34. function hailed(NPC, Spawn)
  35. if GetClass(Spawn)== 0 then
  36. PlayFlavor(NPC,"voiceover/english/voice_emotes/greetings/greetings_2_1032.mp3","Hey! I'm quite certain we could make use of you here, but first you have to register with Garven right away. That's it, stop staring and go back to the beach.","point",0,0, Spawn)
  37. else
  38. FaceTarget(NPC, Spawn)
  39. Dialog.New(NPC, Spawn)
  40. Dialog.AddDialog("You weathered the seas well, but are you fit enough to help on the island?")
  41. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn000.mp3", 1539680326, 2349388024)
  42. if not HasQuest(Spawn, Scout3) and not HasCompletedQuest(Spawn, Scout3) and HasCompletedQuest(Spawn,Scout2) or HasQuest(Spawn,Scout2) then
  43. Dialog.AddOption("Oh I am, I am indeed...","Quest3Start")
  44. end
  45. if GetQuestStep(Spawn,Scout3)==2 then
  46. Dialog.AddOption("I've brought back enough meat to feed quite a few refugees.","Quest3Turnin")
  47. end
  48. if GetQuestStep(Spawn,Scout4)==2 then
  49. Dialog.AddOption("I've got the numbers for you, here are the notes I've made.","Quest4Turnin")
  50. end
  51. if GetQuestStep(Spawn,Scout5)==2 then
  52. Dialog.AddOption("I've got what you needed from the wolves.","Quest5Turnin")
  53. end
  54. if GetQuestStep(Spawn,Scout6)==3 then
  55. Dialog.AddOption("It is done. The orc leader is no more.","Quest6Turnin")
  56. end
  57. if not HasQuest(Spawn, Scout4) and HasCompletedQuest(Spawn,Scout3) and not HasCompletedQuest(Spawn,Scout4) then
  58. Dialog.AddOption("I wouldn't mind helping out again.","Quest4Start")
  59. end
  60. if not HasQuest(Spawn, Scout5) and HasCompletedQuest(Spawn,Scout4) and not HasCompletedQuest(Spawn,Scout5) then
  61. Dialog.AddOption("I was fine for the first two bits, let's get on with this.","Quest5Start")
  62. end
  63. if not HasQuest(Spawn, Scout6) and HasCompletedQuest(Spawn,Scout5) and not HasCompletedQuest(Spawn,Scout6) then
  64. Dialog.AddOption("Are you certain you could not use my help?","Quest6Start")
  65. end
  66. if HasCompletedQuest(Spawn, Scout6) then
  67. Dialog.AddOption("Fit as I can be thanks you. I must prepare for my voyage off this island. Farewell, Vladiminn.")
  68. end
  69. Dialog.AddOption("Fit, but currently unwilling.")
  70. Dialog.Start()
  71. end
  72. end
  73. function respawn(NPC)
  74. spawn(NPC)
  75. end
  76. --------------------------------------------------------------------------------------------------------------------------------
  77. -- QUEST 3
  78. --------------------------------------------------------------------------------------------------------------------------------
  79. function Quest3Start(NPC,Spawn)
  80. FaceTarget(NPC, Spawn)
  81. Dialog.New(NPC, Spawn)
  82. Dialog.AddDialog("Goblins destroyed our supply lines with repeated attacks, and some strange malady has stricken the deer on the island. Fortunately, the priests found a cure for the strange disease. Now we need help re-stocking our depleted stores.")
  83. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn001.mp3", 320173863, 4078504276)
  84. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  85. Dialog.AddOption("I'll help, perhaps it will help to repay for the voyage.","Quest3Offer")
  86. Dialog.AddOption("That is unfortunate, but I must be going.")
  87. Dialog.Start()
  88. end
  89. function Quest3Offer(NPC,Spawn)
  90. OfferQuest(NPC,Spawn,Scout3)
  91. FaceTarget(NPC, Spawn)
  92. end
  93. function Quest3Turnin(NPC,Spawn)
  94. FaceTarget(NPC, Spawn)
  95. Dialog.New(NPC, Spawn)
  96. Dialog.AddDialog("I'm pleased to hear of your success. I had no doubts... well, well what I mean is that uh we, 'we' were getting concerned about how we would feed our people. I asked Banker Vertbridge to put a pair of boots in your bank. These boots shall keep your feet warm and your footsteps silent while stalking prey.")
  97. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn003.mp3", 426623345,2089912142)
  98. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  99. Dialog.AddOption("Thank you, Vladiminn, I'm sure they'll be wonderful.")
  100. Dialog.Start()
  101. if not HasItem(Spawn,158693) then
  102. SummonItem (Spawn, 158693, 1, "bank", 1)
  103. end
  104. SetStepComplete(Spawn,Scout3,2)
  105. end
  106. --------------------------------------------------------------------------------------------------------------------------------
  107. -- QUEST 4
  108. --------------------------------------------------------------------------------------------------------------------------------
  109. function Quest4Start(NPC,Spawn)
  110. FaceTarget(NPC, Spawn)
  111. Dialog.New(NPC, Spawn)
  112. Dialog.AddDialog("Excellent! Let's put those scout skills to test. I've been asked to gather some preliminary scouting information on the goblin camp but my duties here with the refugees prevent me from leaving my post.")
  113. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn004.mp3", 1528224948,1863420311)
  114. PlayFlavor(NPC, "", "", "scheme", 0, 0, Spawn)
  115. Dialog.AddOption("And that's of course where I come in.","Quest4SOffer")
  116. Dialog.AddOption("Going to the goblin camp? No way!")
  117. Dialog.Start()
  118. end
  119. function Quest4SOffer(NPC,Player)
  120. OfferQuest(NPC,Player,Scout4)
  121. FaceTarget(NPC, Spawn)
  122. end
  123. function Quest4Turnin(NPC,Spawn)
  124. FaceTarget(NPC, Spawn)
  125. Dialog.New(NPC, Spawn)
  126. Dialog.AddDialog("Your notes show a frightening number of goblins. I never imagined facing such a battalion of ghouls. Destroying the vicious beasts will be a daunting task indeed. You've done well adventurer. As reward, take these new leggings to replace your tattered and worn pair.")
  127. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn006.mp3", 394325845,2096678701)
  128. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  129. Dialog.AddOption("Thank you... if they're as comfortable as the boots, I'll be in great shape.")
  130. Dialog.Start()
  131. SetStepComplete(Spawn,Scout4,2)
  132. end
  133. --------------------------------------------------------------------------------------------------------------------------------
  134. -- QUEST 5
  135. --------------------------------------------------------------------------------------------------------------------------------
  136. function Quest5Start(NPC,Spawn)
  137. FaceTarget(NPC, Spawn)
  138. Dialog.New(NPC, Spawn)
  139. Dialog.AddDialog("Anxious, are we? Before you get too excited I should tell you this next task is dangerous, far more dangerous than previous tasks. Are you willing to risk your life for your fellow refugees? I'll reward you handsomely at the end of your duty but an award is of no use to a dead man. I ask you now, are you up for the task?")
  140. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn007.mp3", 2208035850,4224224811)
  141. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  142. Dialog.AddOption("I'm up for anything.","Quest5Offer")
  143. Dialog.AddOption("Going to the goblin camp? No way!")
  144. Dialog.Start()
  145. end
  146. function Quest5Offer(NPC,Player)
  147. OfferQuest(NPC,Player,Scout5)
  148. FaceTarget(NPC, Spawn)
  149. end
  150. function Quest5Turnin(NPC,Spawn)
  151. FaceTarget(NPC, Spawn)
  152. Dialog.New(NPC, Spawn)
  153. Dialog.AddDialog("Let me take a look at these for a moment. Hmm... interesting... I've not seen collars like this since... by Thule, it's worse than I'd expected! Well, it looks like your part in this is at an end. I did promise you a reward though. Take this tunic, it will go well with your leggings and boots.")
  154. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn009.mp3", 125664112,3235575096)
  155. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  156. Dialog.AddOption("Are you certain you could not use my help?","Quest6Start")
  157. Dialog.AddOption("Best of luck piecing this puzzle together.")
  158. Dialog.Start()
  159. SetStepComplete(Spawn,Scout5,2)
  160. end
  161. --------------------------------------------------------------------------------------------------------------------------------
  162. -- QUEST 6
  163. --------------------------------------------------------------------------------------------------------------------------------
  164. function Quest6Start(NPC,Spawn)
  165. FaceTarget(NPC, Spawn)
  166. Dialog.New(NPC, Spawn)
  167. Dialog.AddDialog("Your reports have clarified the situation. The pieces fit, and it makes perfect sense...")
  168. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn010.mp3", 1457997083,1132195032)
  169. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  170. Dialog.AddOption("What makes perfect sense?","Quest6StartB")
  171. Dialog.Start()
  172. end
  173. function Quest6StartB(NPC,Spawn)
  174. FaceTarget(NPC, Spawn)
  175. Dialog.New(NPC, Spawn)
  176. Dialog.AddDialog("I don't want panic our people, but I believe an orc is responsible for the chaos on the island. No mere goblin chief is capable of creating such fury and frenzy in an entire camp, but an orc is certainly capable of creating such turmoil.")
  177. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn011.mp3", 472635060,3815131652)
  178. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  179. Dialog.AddOption("[continue]","Quest6Offer")
  180. Dialog.AddOption("I've heard enough. I want off this island!")
  181. Dialog.Start()
  182. end
  183. function Quest6Offer(NPC,Player)
  184. OfferQuest(NPC,Player,Scout6)
  185. FaceTarget(NPC, Spawn)
  186. end
  187. function Quest6Turnin(NPC,Spawn)
  188. FaceTarget(NPC, Spawn)
  189. Dialog.New(NPC, Spawn)
  190. Dialog.AddDialog("I commend you on your progress. Your talents are too valuable to waste on this island. Please accept this final gift to help on your world journey. Whatever city you choose to reside shall be lucky to have you as its citizen. Farewell adventurer!")
  191. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn013.mp3", 1409277433,3036762776)
  192. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  193. Dialog.AddOption("Thank you. I'll put my skills to good use.")
  194. Dialog.Start()
  195. SetStepComplete(Spawn,Scout6,3)
  196. end