9
3

AssistantDreak.lua 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/AssistantDreak.lua
  3. Script Author : Ememjr
  4. Script Date : 2022.03.27 09:03:56
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Cellar =5749
  10. function spawn(NPC)
  11. ProvidesQuest(NPC,Cellar)
  12. SetPlayerProximityFunction(NPC, 11, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC,Player)
  15. if not HasQuest(Player,Cellar) and not HasCompletedQuest(Player,Cellar) then
  16. PlayFlavor(NPC,"voiceover/english/assistant_dreak/tutorial_island02/030_wizard_assistant_dreak_aoicallout_e3958bf.mp3","Such a mess! Malvonicus is going to kill me!","grumble",541493613,293203409, Spawn)
  17. end
  18. end
  19. function hailed(NPC, Player)
  20. if not HasQuest(Player,Cellar) and not HasCompletedQuest(Player,Cellar) or GetQuestStep(Player,Cellar)<=8 and not HasCompletedQuest(Player,Cellar) then
  21. Dialog1(NPC,Player)
  22. elseif GetQuestStep(Player, Cellar)==9 or GetQuestStep(Player, Cellar)==10 then
  23. Dialog2(NPC,Player)
  24. elseif GetQuestStep(Player, Cellar)==11 then
  25. Dialog3(NPC,Player)
  26. elseif HasCompletedQuest(Player, Cellar) then
  27. Finished(NPC,Player)
  28. end
  29. end
  30. function Dialog1(NPC, Player)
  31. FaceTarget(NPC, Player)
  32. Dialog.New(NPC, Player)
  33. Dialog.AddDialog("Oh, hello there. Welcome to the mage tower. If you're looking for masters Mizan or Malvonicus, they can both be found upstairs. If you've come to use the workshop ... well, I'm afraid you're out of luck for the time being.")
  34. Dialog.AddVoiceover("voiceover/english/assistant_dreak/tutorial_island02/assistant_dreak001.mp3",2907679285,3779656812)
  35. PlayFlavor(NPC,"","","hello",0,0,Player)
  36. if not HasQuest(Player,Cellar) and not HasCompletedQuest(Player,Cellar) then
  37. Dialog.AddOption("Why, what happened to the workshop?","WhatHappened")
  38. end
  39. if GetQuestStep(Player,Cellar)==8 then
  40. Dialog.AddOption("I cleaned up the workshop.","CleanedUp")
  41. end
  42. Dialog.AddOption("Ok, thanks.")
  43. Dialog.Start()
  44. end
  45. function WhatHappened(NPC, Player)
  46. FaceTarget(NPC, Player)
  47. Dialog.New(NPC, Player)
  48. Dialog.AddDialog("It's all my fault, really. I could've sworn I wrote down the directions for that alacrity potion correctly. I mean, honestly, who could've expected such a spectacular explosion? Now the lab's a mess, and no one can use the workshop. I can't even clean it up now, because I'm supposed to be welcoming the refugees.")
  49. Dialog.AddVoiceover("voiceover/english/assistant_dreak/tutorial_island02/assistant_dreak002.mp3",402125016,2910805792)
  50. PlayFlavor(NPC,"","","pout",0,0,Player)
  51. Dialog.AddOption("What's this workshop for anyways?","ItsMyFault")
  52. Dialog.AddOption("Ok, thanks.")
  53. Dialog.Start()
  54. end
  55. function ItsMyFault(NPC, Player)
  56. FaceTarget(NPC, Player)
  57. Dialog.New(NPC, Player)
  58. Dialog.AddDialog("For crafting, of course! With the right recipes and materials, you can make just about anything you want down there, from metal working to brewing. Say... if you're interested in learning more about crafting yourself, I'd be willing to make you a deal. I'll give you free, unlimited access to the workshop, if you'd be willing to clean up the place. What do you say?")
  59. Dialog.AddVoiceover("voiceover/english/assistant_dreak/tutorial_island02/assistant_dreak003.mp3",1218168009,4084296157)
  60. PlayFlavor(NPC,"","","nod",0,0,Player)
  61. Dialog.AddOption("All right, it's a deal.","ForCrafting")
  62. Dialog.AddOption("I've got my hands full on this island already.")
  63. Dialog.Start()
  64. end
  65. function ForCrafting(NPC, Player)
  66. FaceTarget(NPC,Player)
  67. OfferQuest(NPC,Player,Cellar)
  68. end
  69. function CleanedUp(NPC, Player)
  70. FaceTarget(NPC, Player)
  71. Dialog.New(NPC, Player)
  72. Dialog.AddDialog("That you did! I happened to poke my head down there and I must say that you've done a great job. Now there's just one more thing I need from you, and then you can feel free to use the place all you want.")
  73. Dialog.AddVoiceover("voiceover/english/assistant_dreak/tutorial_island02/assistant_dreak005.mp3",1034189295,1232169339)
  74. PlayFlavor(NPC,"","","nod",0,0,Player)
  75. Dialog.AddOption("What's that?","WhatsNext")
  76. Dialog.Start()
  77. end
  78. function WhatsNext(NPC, Player)
  79. FaceTarget(NPC, Player)
  80. Dialog.New(NPC, Player)
  81. Dialog.AddDialog("It seems that the explosion destroyed the lock on the door to the workshop, and I'll need a new one to replace it. I asked the blacksmith, Braksan, to make one for me, but he's so backed up repairing arms and weapons for the goblin incursions, that he said it would take at least a week for him to get to it. I was thinking that perhaps you, being interested in crafting and all, could make at least a spike to hold the entrance closed.")
  82. Dialog.AddVoiceover("voiceover/english/assistant_dreak/tutorial_island02/assistant_dreak006.mp3",1046698674,1827875757)
  83. PlayFlavor(NPC,"","","tapfoot",0,0,Player)
  84. Dialog.AddOption("Sure, but how?","QuestUpdate8")
  85. Dialog.Start()
  86. end
  87. function QuestUpdate8(NPC, Player)
  88. FaceTarget(NPC, Player)
  89. Dialog.New(NPC, Player)
  90. Dialog.AddDialog("First, you must gather all the components required to make the spike. I'll provide you with the recipe and ingredients required. Everything you need can be found on this island. Once you have them all, take them to the forge in the workshop and craft the spike itself. Return the lock to me once it's complete.")
  91. Dialog.AddVoiceover("voiceover/english/assistant_dreak/tutorial_island02/assistant_dreak007.mp3",3742209773,3742478459)
  92. Dialog.AddOption("All right, I'll be back with your lock.")
  93. Dialog.Start()
  94. SetStepComplete(Player, Cellar,8)
  95. if GetTradeskillLevel(Player)<2 then
  96. SetTradeskillLevel(Player,2)
  97. SetTradeskillClass(Player,1)
  98. SendMessage(Player, "You are now an Artisan!")
  99. SendPopUpMessage(Player, "You are now an Artisan!", 200, 200, 200)
  100. end
  101. end
  102. function respawn(NPC)
  103. spawn(NPC)
  104. end
  105. function Dialog2(NPC,Player)
  106. choice = MakeRandomInt(1,3)
  107. if choice == 1 then
  108. PlayFlavor(NPC,"voiceover/english/voice_emotes/greetings/greetings_1_1034.mp3","I hope to become a powerful mage one day, but... it's a difficult journey.","pout",0,0,Player)
  109. elseif choice == 2 then
  110. PlayFlavor(NPC,"voiceover/english/voice_emotes/greetings/greetings_2_1034.mp3","Hello there! Do you need some candles?","hello",0,0,Player)
  111. elseif choice == 3 then
  112. PlayFlavor(NPC,"voiceover/english/voice_emotes/greetings/greetings_3_1034.mp3","I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage.","nod",0,0,Player)
  113. end
  114. end
  115. function Dialog3(NPC, Player)
  116. FaceTarget(NPC, Player)
  117. Dialog.New(NPC, Player)
  118. Dialog.AddDialog("Well done! The masters will be so pleased with me... err, you I mean! As promised, you're welcome to use the workshop for all of your crafting needs for as long as you stay on the island.")
  119. Dialog.AddVoiceover("voiceover/english/assistant_dreak/tutorial_island02/assistant_dreak008.mp3",2753065662,90696178)
  120. PlayFlavor(NPC,"","","happy",0,0,Player)
  121. if GetTradeskillLevel(Player)<3 then
  122. SetTradeskillLevel(Player,3)
  123. end
  124. Dialog.AddOption("Thanks.")
  125. Dialog.Start()
  126. SetStepComplete(Player, Cellar,11)
  127. end
  128. function Finished(NPC, Player)
  129. FaceTarget(NPC, Player)
  130. PlayFlavor(NPC,"voiceover/english/assistant_dreak/tutorial_island02/030_wizard_assistant_dreak_quest_completed_e3b1aced.mp3","Thanks for all your help! Make sure to clean up when you're done in the cellar.","thanks",1096069834,205718440, Spawn)
  131. end
  132. --[[
  133. (1113153331)[Sun Apr 10 13:15:31 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says to you,"Oh, hello there. Welcome to the mage tower. If you're looking for masters Mizan or Malvonicus, they can both be found upstairs. If you've come to use the workshop ... well, I'm afraid you're out of luck for the time being."
  134. (1113153334)[Sun Apr 10 13:15:34 2005] You say to Assistant Dreak,"I cleaned up the workshop."
  135. (1113153334)[Sun Apr 10 13:15:34 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says to you,"That you did! I happened to poke my head down there and I must say that you've done a great job. Now there's just one more thing I need from you, and then you can feel free to use the place all you want."
  136. (1113153335)[Sun Apr 10 13:15:35 2005] You say to Assistant Dreak,"What's that?"
  137. (1113153335)[Sun Apr 10 13:15:35 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says to you,"It seems that the explosion destroyed the lock on the door to the workshop, and I'll need a new one to replace it. I asked the blacksmith, Braksan, to make one for me, but he's so backed up repairing arms and weapons for the goblin incursions, that he said it would take at least a week for him to get to it. I was thinking that perhaps you, being interested in crafting and all, could make at least a spike to hold the entrance closed."
  138. (1113153335)[Sun Apr 10 13:15:35 2005] You say to Assistant Dreak,"Sure, but how?"
  139. (1113153335)[Sun Apr 10 13:15:35 2005] Your quest journal has been updated.
  140. (1113153335)[Sun Apr 10 13:15:35 2005] Your quest journal has been updated.
  141. (1113153335)[Sun Apr 10 13:15:35 2005] You gain tradeskill experience!
  142. (1113153335)[Sun Apr 10 13:15:35 2005] Your tradeskill level is now 2.
  143. (1113153335)[Sun Apr 10 13:15:35 2005] Recipe: "Tin Bar" put in recipe book.
  144. (1113153335)[Sun Apr 10 13:15:35 2005] Recipe: "Tin Spike" put in recipe book.
  145. (1113153335)[Sun Apr 10 13:15:35 2005] Recipe: "Roasted Barley" put in recipe book.
  146. (1113153335)[Sun Apr 10 13:15:35 2005] Recipe: "White Tea Leaf" put in recipe book.
  147. (1113153335)[Sun Apr 10 13:15:35 2005] Recipe: "Black Coffee" put in recipe book.
  148. (1113153335)[Sun Apr 10 13:15:35 2005] Recipe: "Refine Nutmeg" put in recipe book.
  149. (1113153335)[Sun Apr 10 13:15:35 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says to you,"First, you must gather all the components required to make the spike. I'll provide you with the recipe and ingredients required. Everything you need can be found on this island. Once you have them all, take them to the forge in the workshop and craft the spike itself. Return the lock to me once it's complete."
  150. (1113153336)[Sun Apr 10 13:15:36 2005] You say to Assistant Dreak,"All right, I'll be back with your lock."
  151. (1113153534)[Sun Apr 10 13:18:54 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  152. (1113153538)[Sun Apr 10 13:18:58 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  153. (1113153539)[Sun Apr 10 13:18:59 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  154. (1113153540)[Sun Apr 10 13:19:00 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  155. (1113153541)[Sun Apr 10 13:19:01 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  156. (1113153541)[Sun Apr 10 13:19:01 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  157. (1113153543)[Sun Apr 10 13:19:03 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  158. (1113153543)[Sun Apr 10 13:19:03 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  159. (1113153543)[Sun Apr 10 13:19:03 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  160. (1113153544)[Sun Apr 10 13:19:04 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  161. (1113153544)[Sun Apr 10 13:19:04 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  162. (1113153545)[Sun Apr 10 13:19:05 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  163. (1113153545)[Sun Apr 10 13:19:05 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  164. (1113153547)[Sun Apr 10 13:19:07 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  165. (1113153548)[Sun Apr 10 13:19:08 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  166. (1113153548)[Sun Apr 10 13:19:08 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  167. (1113153548)[Sun Apr 10 13:19:08 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  168. (1113153549)[Sun Apr 10 13:19:09 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  169. (1113153549)[Sun Apr 10 13:19:09 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  170. (1113153549)[Sun Apr 10 13:19:09 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  171. (1113153549)[Sun Apr 10 13:19:09 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  172. (1113153550)[Sun Apr 10 13:19:10 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  173. (1113153551)[Sun Apr 10 13:19:11 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  174. (1113153551)[Sun Apr 10 13:19:11 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  175. (1113153552)[Sun Apr 10 13:19:12 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  176. (1113153552)[Sun Apr 10 13:19:12 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  177. (1113153554)[Sun Apr 10 13:19:14 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  178. (1113153554)[Sun Apr 10 13:19:14 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  179. (1113153554)[Sun Apr 10 13:19:14 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  180. (1113153555)[Sun Apr 10 13:19:15 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  181. (1113153556)[Sun Apr 10 13:19:16 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  182. (1113153557)[Sun Apr 10 13:19:17 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  183. (1113153558)[Sun Apr 10 13:19:18 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  184. (1113153559)[Sun Apr 10 13:19:19 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  185. (1113153559)[Sun Apr 10 13:19:19 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  186. (1113153559)[Sun Apr 10 13:19:19 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  187. (1113153560)[Sun Apr 10 13:19:20 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  188. (1113153562)[Sun Apr 10 13:19:22 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  189. (1113153562)[Sun Apr 10 13:19:22 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  190. (1113153563)[Sun Apr 10 13:19:23 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"Hello there! Do you need some candles?"
  191. (1113153563)[Sun Apr 10 13:19:23 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I hope to become a powerful mage one day, but... it's a difficult journey."
  192. (1113153566)[Sun Apr 10 13:19:26 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you're seeking to learn the ways of a mage."
  193. (1113153566)[Sun Apr 10 13:19:26 2005] \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says,"I need to finish these candles for Mizan. You should speak to him if you'r
  194. Your quest journal has been updated.
  195. You gain tradeskill experience!
  196. Your tradeskill level is now 3.
  197. Your quest journal has been updated.
  198. \aNPC 117481 Assistant Dreak:Assistant Dreak\/a says to you,"Well done! The masters will be so pleased with me... err, you I mean! As promised, you're welcome to use the workshop for all of your crafting needs for as long as you stay on the island."
  199. You say to Assistant Dreak,"Thanks."]]--