9
3

TrainerAleksSilverhelm.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/TrainerAleksSilverhelm.lua
  3. Script Purpose : Trainer Aleks Silverhelm <Keeper of Magical and Martial Knowledge>
  4. Script Author : theFoof
  5. Script Date : 2013.5.18
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC, Spawn)
  15. end
  16. function LeaveRange(NPC, Spawn)
  17. end
  18. function hailed(NPC, Spawn)
  19. first_chat(NPC, Spawn)
  20. end
  21. function first_chat(NPC, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. conversation = CreateConversation()
  24. local choice = math.random(1,3)
  25. if choice == 1 then
  26. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1010.mp3", "", "", 0, 0, Spawn)
  27. AddConversationOption(conversation, "Let us begin.", "dlg_7_1")
  28. AddConversationOption(conversation, "I will return later.")
  29. StartConversation(conversation, NPC, Spawn, "I am here to explain something very important: how your Spells, Combat Arts, and Abilities work, as well as how to improve them.")
  30. elseif choice == 2 then
  31. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1010.mp3", "", "", 0, 0, Spawn)
  32. AddConversationOption(conversation, "Let us begin.", "dlg_7_1")
  33. AddConversationOption(conversation, "I will return later.")
  34. StartConversation(conversation, NPC, Spawn, "I am here to explain something very important: how your Spells, Combat Arts, and Abilities work, as well as how to improve them.")
  35. elseif choice == 3 then
  36. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1010.mp3", "", "", 0, 0, Spawn)
  37. AddConversationOption(conversation, "Let us begin.", "dlg_7_1")
  38. AddConversationOption(conversation, "I will return later.")
  39. StartConversation(conversation, NPC, Spawn, "I am here to explain something very important: how your Spells, Combat Arts, and Abilities work, as well as how to improve them.")
  40. end
  41. end
  42. function dlg_7_1(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. conversation = CreateConversation()
  45. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  46. AddConversationOption(conversation, "Tell me about Spells.", "dlg_7_2")
  47. AddConversationOption(conversation, "Tell me about Combat Arts.", "dlg_7_5")
  48. AddConversationOption(conversation, "Tell me about Abilities.", "dlg_7_8")
  49. AddConversationOption(conversation, "Where do I find my Spells, Combat Arts, and Abilities?", "dlg_7_11")
  50. AddConversationOption(conversation, "How do I obtain and improve my Spells and Combat Arts?", "dlg_7_14")
  51. AddConversationOption(conversation, "I will return for instruction later.")
  52. StartConversation(conversation, NPC, Spawn, "I am here to answer your questions. What can I help you with?")
  53. end
  54. function dlg_7_2(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. conversation = CreateConversation()
  57. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  58. AddConversationOption(conversation, "Who uses Spells?", "dlg_7_3")
  59. AddConversationOption(conversation, "I will return for instruction later.")
  60. StartConversation(conversation, NPC, Spawn, "A Spell is a magical ability, and spells have a variety of uses. Some allow you to damage an enemy, while others might provide benefits to yourself or an ally. You can hold your mouse pointer over a Spell's icon to see a description of what it does, or right-click on it and select 'Examine.'")
  61. end
  62. function dlg_7_3(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. conversation = CreateConversation()
  65. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  66. AddConversationOption(conversation, "I have more questions.", "dlg_7_4")
  67. AddConversationOption(conversation, "I will return for instruction later.")
  68. StartConversation(conversation, NPC, Spawn, "Mages, priests, paladins, shadowknights, troubadors, and dirges all cast Spells. Each class has a list of Spells that's unique. While other classes may have similar Spells, no one has capabilities exactly like that of another class. Also, certain magical items may be imbued with Spell effects that can be cast or that activate on their own.")
  69. end
  70. function dlg_7_5(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  74. AddConversationOption(conversation, "Who uses Combat Arts?")
  75. AddConversationOption(conversation, "I will return for instruction later.", "dlg_7_6")
  76. StartConversation(conversation, NPC, Spawn, "Combat Arts are a lot like Spells, but they usually take less time to cast and cannot be interrupted. As their name implies, many Combat Arts focus on some aspect of battle.")
  77. end
  78. function dlg_7_6(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  82. AddConversationOption(conversation, "I have more questions.", "dlg_7_1")
  83. AddConversationOption(conversation, "I will return for instruction later.")
  84. StartConversation(conversation, NPC, Spawn, "All fighters and scouts use Combat Arts. Each of these classes has unique Combat Arts that help distinguish them from other classes. Combat Arts have names and effects that fit the class that uses them.")
  85. end
  86. function dlg_7_8(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  90. AddConversationOption(conversation, "How are Abilities different from Spells and Combat Arts?", "dlg_7_9")
  91. AddConversationOption(conversation, "I will return for instruction later.")
  92. StartConversation(conversation, NPC, Spawn, "Abilities are general things your character can do, along with certain capabilities specific to your race. Some of your Abilities are extremely useful, such as Sprint, which allows you to run very fast for a short period of time. You can also Call for Help when you're in danger, or launch a Ranged Attack if you have a ranged weapon and, of course, ammo.")
  93. end
  94. function dlg_7_9(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. conversation = CreateConversation()
  97. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  98. AddConversationOption(conversation, "I have more questions.", "dlg_7_1")
  99. AddConversationOption(conversation, "I will return for instruction later.")
  100. StartConversation(conversation, NPC, Spawn, "Unlike Spells and Combat Arts, Abilities cannot be upgraded. Most of your Abilities are received when you first begin your adventures in Norrath, although certain new ones can be granted as you become more experienced.")
  101. end
  102. function dlg_7_11(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. conversation = CreateConversation()
  105. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  106. AddConversationOption(conversation, "How do I use my Spells, Combat Arts, and Abilities?", "dlg_7_12")
  107. AddConversationOption(conversation, "I will return for instruction later.")
  108. StartConversation(conversation, NPC, Spawn, "All your Spells and Combat Arts, as well as other Abilities, are found in your Knowledge Book. Press the K key to open it at any time, and click the name of the tab you wish to view: Abilities, Spells, or Combat Arts.")
  109. end
  110. function dlg_7_12(NPC, Spawn)
  111. FaceTarget(NPC, Spawn)
  112. conversation = CreateConversation()
  113. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  114. AddConversationOption(conversation, "I have more questions.", "dlg_7_1")
  115. AddConversationOption(conversation, "I will return for instruction later.")
  116. StartConversation(conversation, NPC, Spawn, "To use a Spell, Combat Art, or Ability, drag its icon from your Knowledge Book onto your hotbar. Some have already been placed there for you. To use one, simply click its icon on your hotbar or press the key assigned to it. You can open additional hotbars by right-clicking on a hotbar and selecting 'Open New Hotbar.'")
  117. end
  118. function dlg_7_14(NPC, Spawn)
  119. FaceTarget(NPC, Spawn)
  120. conversation = CreateConversation()
  121. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  122. AddConversationOption(conversation, "How can I judge the effectiveness of my Spells and Combat Arts?", "dlg_7_15")
  123. AddConversationOption(conversation, "I will return for further instruction later.")
  124. StartConversation(conversation, NPC, Spawn, "Most of your Spells or Combat Arts are given to you as you advance in levels and will be automatically scribed in your Knowledge Book. Certain special Spells or Combat Arts can be obtained by doing quests.")
  125. end
  126. function dlg_7_15(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. conversation = CreateConversation()
  129. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  130. AddConversationOption(conversation, "How can I improve my Spells and Combat Arts?", "dlg_7_16")
  131. AddConversationOption(conversation, "I will return for further instruction later.")
  132. StartConversation(conversation, NPC, Spawn, "There are six ranks of Spells and Combat Arts: Apprentice, Journeyman, Adept, Expert, Master and Grandmaster. Spells and Combat Arts that are automatically granted to you are usually given at the Apprentice rank. You should always try to have the highest rank of your Spells and Combat Arts, because they gain effectiveness as you improve them.")
  133. end
  134. function dlg_7_16(NPC, Spawn)
  135. FaceTarget(NPC, Spawn)
  136. conversation = CreateConversation()
  137. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  138. AddConversationOption(conversation, "What about other ranks of Spells and Arts?", "dlg_7_17")
  139. AddConversationOption(conversation, "I will return later.")
  140. StartConversation(conversation, NPC, Spawn, "Spells gained through quests or racial abilities are usually at their highest level and cannot be upgraded. Grandmaster spells are only available from your class training choices every ten levels starting at 14. You can see the choices by selecting the L key on your keyboard. ")
  141. end
  142. function dlg_7_17(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. conversation = CreateConversation()
  145. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  146. AddConversationOption(conversation, "Are there other ways to improve my Spells and Combat Arts?", "dlg_7_18")
  147. AddConversationOption(conversation, "I will return later.")
  148. StartConversation(conversation, NPC, Spawn, "You will also find more potent ranks of spells and arts as you defeat opponents in battle. Many enemies will carry Adept versions of Spells and Combat Arts, while conquering some extremely powerful foes may result in the extremely rare Master versions.")
  149. end
  150. function dlg_7_18(NPC, Spawn)
  151. FaceTarget(NPC, Spawn)
  152. conversation = CreateConversation()
  153. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  154. AddConversationOption(conversation, "Are all my Spells and Combat Arts unique?", "dlg_7_19")
  155. AddConversationOption(conversation, "I will return for further instruction later.")
  156. StartConversation(conversation, NPC, Spawn, "In addition, certain crafters can make upgrades to your Spells and Combat Arts using harvested components. They can create Journeyman quality spells, as well as valuable Expert scrolls using rare components. Buying from or trading with other players is an excellent way to upgrade your Spells and Combat Arts.")
  157. end
  158. function dlg_7_19(NPC, Spawn)
  159. FaceTarget(NPC, Spawn)
  160. conversation = CreateConversation()
  161. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  162. AddConversationOption(conversation, "How can I keep all these Spells and Arts straight in my Knowledge Book?", "dlg_7_20")
  163. AddConversationOption(conversation, "I will return for further instruction later.")
  164. StartConversation(conversation, NPC, Spawn, "As you advance in level, you will obtain many completely new abilities as well as more effective versions of Spells or Combat Arts you have already learned. The background colors of the spell icon tell you its type. Beneficial spells have a yellow, orange or purple color, while attack spells have a red, green or blue color. ")
  165. end
  166. function dlg_7_20(NPC, Spawn)
  167. FaceTarget(NPC, Spawn)
  168. conversation = CreateConversation()
  169. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  170. AddConversationOption(conversation, "I have more questions.", "dlg_7_1")
  171. AddConversationOption(conversation, "I will return for further instruction later.")
  172. StartConversation(conversation, NPC, Spawn, "Your Spells and Combat Arts can easily be organized according to your individual, personal taste. Just open your Knowledge Book and click the 'Sort' button in the upper right corner. This allows you to organize your Spells and Arts for easy access to the abilities that you wish to use.")
  173. end