Vladiminn.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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. dofile("SpawnScripts/Generic/ClassSkillCheck.lua")
  10. local Scout2 = 5730
  11. local Scout3 = 5737
  12. local Scout4 = 5741
  13. local Scout5 = 5745
  14. local Scout6 = 5753
  15. function spawn(NPC)
  16. SetPlayerProximityFunction(NPC, 12, "InRange", "LeaveRange")
  17. ProvidesQuest(NPC, Scout3)
  18. ProvidesQuest(NPC, Scout4)
  19. ProvidesQuest(NPC, Scout5)
  20. ProvidesQuest(NPC, Scout6)
  21. CastSpell(NPC,8231)
  22. end
  23. function InRange(NPC,Spawn)
  24. if HasQuest(Spawn,Scout2)then
  25. FaceTarget(NPC, Spawn)
  26. 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)
  27. elseif not HasQuest(Spawn, Scout4) and HasCompletedQuest(Spawn,Scout3) and not HasCompletedQuest(Spawn,Scout4) then
  28. FaceTarget(NPC, Spawn)
  29. 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)
  30. elseif not HasQuest(Spawn, Scout5) and HasCompletedQuest(Spawn,Scout4) and not HasCompletedQuest(Spawn,Scout5) then
  31. FaceTarget(NPC, Spawn)
  32. PlayFlavor(NPC,"","Just in time! You're back in time to help me out with something!","hello",0,0, Spawn)
  33. end
  34. end
  35. function hailed(NPC, Spawn)
  36. if GetClass(Spawn)== 0 then
  37. 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)
  38. else
  39. FaceTarget(NPC, Spawn)
  40. Dialog.New(NPC, Spawn)
  41. Dialog.AddDialog("You weathered the seas well, but are you fit enough to help on the island?")
  42. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn000.mp3", 1539680326, 2349388024)
  43. if not HasQuest(Spawn, Scout3) and not HasCompletedQuest(Spawn, Scout3) and HasCompletedQuest(Spawn,Scout2) or HasQuest(Spawn,Scout2) then
  44. Dialog.AddOption("Oh I am, I am indeed...","Quest3Start")
  45. end
  46. if GetQuestStep(Spawn,Scout3)==2 then
  47. Dialog.AddOption("I've brought back enough meat to feed quite a few refugees.","Quest3Turnin")
  48. end
  49. if GetQuestStep(Spawn,Scout4)==2 then
  50. Dialog.AddOption("I've got the numbers for you, here are the notes I've made.","Quest4Turnin")
  51. end
  52. if GetQuestStep(Spawn,Scout5)==2 then
  53. Dialog.AddOption("I've got what you needed from the wolves.","Quest5Turnin")
  54. end
  55. if GetQuestStep(Spawn,Scout6)==3 then
  56. Dialog.AddOption("It is done. The orc leader is no more.","Quest6Turnin")
  57. end
  58. if not HasQuest(Spawn, Scout4) and HasCompletedQuest(Spawn,Scout3) and not HasCompletedQuest(Spawn,Scout4) then
  59. Dialog.AddOption("I wouldn't mind helping out again.","Quest4Start")
  60. end
  61. if not HasQuest(Spawn, Scout5) and HasCompletedQuest(Spawn,Scout4) and not HasCompletedQuest(Spawn,Scout5) then
  62. Dialog.AddOption("I was fine for the first two bits, let's get on with this.","Quest5Start")
  63. end
  64. if not HasQuest(Spawn, Scout6) and HasCompletedQuest(Spawn,Scout5) and not HasCompletedQuest(Spawn,Scout6) then
  65. Dialog.AddOption("Are you certain you could not use my help?","Quest6Start")
  66. end
  67. if HasCompletedQuest(Spawn, Scout6) then
  68. Dialog.AddOption("Fit as I can be thanks you. I must prepare for my voyage off this island. Farewell, Vladiminn.")
  69. end
  70. Dialog.AddOption("Fit, but currently unwilling.")
  71. if GetClass(Spawn)==31 then
  72. Dialog.AddOption("Can you make sure my skills are in order?","Skills")
  73. end
  74. Dialog.Start()
  75. end
  76. end
  77. function Skills(NPC,Spawn)
  78. SkillCheck(NPC,Spawn)
  79. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  80. end
  81. function respawn(NPC)
  82. spawn(NPC)
  83. end
  84. --------------------------------------------------------------------------------------------------------------------------------
  85. -- QUEST 3
  86. --------------------------------------------------------------------------------------------------------------------------------
  87. function Quest3Start(NPC,Spawn)
  88. FaceTarget(NPC, Spawn)
  89. Dialog.New(NPC, Spawn)
  90. 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.")
  91. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn001.mp3", 320173863, 4078504276)
  92. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  93. Dialog.AddOption("I'll help, perhaps it will help to repay for the voyage.","Quest3Offer")
  94. Dialog.AddOption("That is unfortunate, but I must be going.")
  95. Dialog.Start()
  96. end
  97. function Quest3Offer(NPC,Spawn)
  98. OfferQuest(NPC,Spawn,Scout3)
  99. FaceTarget(NPC, Spawn)
  100. end
  101. function Quest3Turnin(NPC,Spawn)
  102. FaceTarget(NPC, Spawn)
  103. Dialog.New(NPC, Spawn)
  104. 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.")
  105. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn003.mp3", 426623345,2089912142)
  106. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  107. Dialog.AddOption("Thank you, Vladiminn, I'm sure they'll be wonderful.")
  108. Dialog.Start()
  109. if not HasItem(Spawn,158693) then
  110. SummonItem (Spawn, 158693, 1, "bank", 1)
  111. end
  112. SetStepComplete(Spawn,Scout3,2)
  113. end
  114. --------------------------------------------------------------------------------------------------------------------------------
  115. -- QUEST 4
  116. --------------------------------------------------------------------------------------------------------------------------------
  117. function Quest4Start(NPC,Spawn)
  118. FaceTarget(NPC, Spawn)
  119. Dialog.New(NPC, Spawn)
  120. 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.")
  121. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn004.mp3", 1528224948,1863420311)
  122. PlayFlavor(NPC, "", "", "scheme", 0, 0, Spawn)
  123. Dialog.AddOption("And that's of course where I come in.","Quest4SOffer")
  124. Dialog.AddOption("Going to the goblin camp? No way!")
  125. Dialog.Start()
  126. end
  127. function Quest4SOffer(NPC,Player)
  128. OfferQuest(NPC,Player,Scout4)
  129. FaceTarget(NPC, Spawn)
  130. end
  131. function Quest4Turnin(NPC,Spawn)
  132. FaceTarget(NPC, Spawn)
  133. Dialog.New(NPC, Spawn)
  134. 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.")
  135. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn006.mp3", 394325845,2096678701)
  136. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  137. Dialog.AddOption("Thank you... if they're as comfortable as the boots, I'll be in great shape.")
  138. Dialog.Start()
  139. SetStepComplete(Spawn,Scout4,2)
  140. end
  141. --------------------------------------------------------------------------------------------------------------------------------
  142. -- QUEST 5
  143. --------------------------------------------------------------------------------------------------------------------------------
  144. function Quest5Start(NPC,Spawn)
  145. FaceTarget(NPC, Spawn)
  146. Dialog.New(NPC, Spawn)
  147. 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?")
  148. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn007.mp3", 2208035850,4224224811)
  149. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  150. Dialog.AddOption("I'm up for anything.","Quest5Offer")
  151. Dialog.AddOption("Going to the goblin camp? No way!")
  152. Dialog.Start()
  153. end
  154. function Quest5Offer(NPC,Player)
  155. OfferQuest(NPC,Player,Scout5)
  156. FaceTarget(NPC, Spawn)
  157. end
  158. function Quest5Turnin(NPC,Spawn)
  159. FaceTarget(NPC, Spawn)
  160. Dialog.New(NPC, Spawn)
  161. 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.")
  162. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn009.mp3", 125664112,3235575096)
  163. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  164. Dialog.AddOption("Are you certain you could not use my help?","Quest6Start")
  165. Dialog.AddOption("Best of luck piecing this puzzle together.")
  166. Dialog.Start()
  167. SetStepComplete(Spawn,Scout5,2)
  168. end
  169. --------------------------------------------------------------------------------------------------------------------------------
  170. -- QUEST 6
  171. --------------------------------------------------------------------------------------------------------------------------------
  172. function Quest6Start(NPC,Spawn)
  173. FaceTarget(NPC, Spawn)
  174. Dialog.New(NPC, Spawn)
  175. Dialog.AddDialog("Your reports have clarified the situation. The pieces fit, and it makes perfect sense...")
  176. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn010.mp3", 1457997083,1132195032)
  177. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  178. Dialog.AddOption("What makes perfect sense?","Quest6StartB")
  179. Dialog.Start()
  180. end
  181. function Quest6StartB(NPC,Spawn)
  182. FaceTarget(NPC, Spawn)
  183. Dialog.New(NPC, Spawn)
  184. 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.")
  185. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn011.mp3", 472635060,3815131652)
  186. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  187. Dialog.AddOption("[continue]","Quest6Offer")
  188. Dialog.AddOption("I've heard enough. I want off this island!")
  189. Dialog.Start()
  190. end
  191. function Quest6Offer(NPC,Player)
  192. OfferQuest(NPC,Player,Scout6)
  193. FaceTarget(NPC, Spawn)
  194. end
  195. function Quest6Turnin(NPC,Spawn)
  196. FaceTarget(NPC, Spawn)
  197. Dialog.New(NPC, Spawn)
  198. 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!")
  199. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn013.mp3", 1409277433,3036762776)
  200. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  201. Dialog.AddOption("Thank you. I'll put my skills to good use.")
  202. Dialog.Start()
  203. SetStepComplete(Spawn,Scout6,3)
  204. end