9
3

TrainerSythortheAllSeeing.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. --[[
  2. Spawn Template
  3. Script Name: Trainer Sythor the All-Seeing.lua
  4. Script Purpose: Combat Arts, Spells, and Abilities training
  5. Script Author: John Adams
  6. Script Date: 2008.09.06
  7. Script Notes: Auto-Generated Conversation from PacketParser Data
  8. --]]
  9. local AquaticResearchNotebook = 488
  10. function spawn(NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. conversation = CreateConversation()
  18. choice = math.random(1,3)
  19. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_" .. choice .. "_1004.mp3", "", "", 0, 0, Spawn)
  20. if HasQuest(Spawn, AquaticResearchNotebook) then
  21. if GetQuestStep(Spawn, AquaticResearchNotebook) == 5 then
  22. FoundNotebook(NPC, Spawn)
  23. end
  24. end
  25. AddConversationOption(conversation, "Let us begin.", "Begin")
  26. AddConversationOption(conversation, "I will return for instruction later.")
  27. StartConversation(conversation, NPC, Spawn, "Welcome to the service of the Overlord. Our great leader has sent me here to explain something very important: how your Spells, Combat Arts, and Abilities work, as well as how to improve them. Listen and learn from the mighty Sythor the All-Seeing!")
  28. end
  29. function Begin(NPC, Spawn)
  30. conversation = CreateConversation()
  31. AddConversationOption(conversation, "Tell me about Spells.", "AboutSpells")
  32. AddConversationOption(conversation, "Tell me about Combat Arts.", "AboutCombatArts")
  33. AddConversationOption(conversation, "Tell me about Abilities.", "AboutAbilities")
  34. AddConversationOption(conversation, "Where do I find my Spells, Combat Arts, and Abilities?", "Find")
  35. AddConversationOption(conversation, "How do I obtain and improve my Spells and Combat Arts?", "Improve")
  36. AddConversationOption(conversation, "I will return for instruction later.")
  37. StartConversation(conversation, NPC, Spawn, "I am here to share my vast knowledge. What can I help you with?")
  38. end
  39. function AboutSpells(NPC, Spawn)
  40. conversation = CreateConversation()
  41. AddConversationOption(conversation, "Who uses Spells?", "UsesSpells")
  42. AddConversationOption(conversation, "I will return for instruction later.")
  43. StartConversation(conversation, NPC, Spawn, "A Spell is a magical ability. Spells can 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.'")
  44. end
  45. function UsesSpells(NPC, Spawn)
  46. conversation = CreateConversation()
  47. AddConversationOption(conversation, "I have more questions.", "Begin")
  48. AddConversationOption(conversation, "I will return for instruction later.")
  49. StartConversation(conversation, NPC, Spawn, "Mages, priests, paladins, shadowknights, troubadors, and dirges all cast Spells. Each class has a list of Spells that is 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.")
  50. end
  51. function AboutCombatArts(NPC, Spawn)
  52. conversation = CreateConversation()
  53. AddConversationOption(conversation, "Who uses Combat Arts?", "UsesCombatArts")
  54. AddConversationOption(conversation, "I will return for instruction later.")
  55. 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.")
  56. end
  57. function UsesCombatArts(NPC, Spawn)
  58. conversation = CreateConversation()
  59. AddConversationOption(conversation, "I have more questions.", "Begin")
  60. AddConversationOption(conversation, "I will return for instruction later.")
  61. 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.")
  62. end
  63. function AboutAbilities(NPC, Spawn)
  64. conversation = CreateConversation()
  65. AddConversationOption(conversation, "How are Abilities different from Spells and Combat Arts?", "Abilities")
  66. AddConversationOption(conversation, "I will return for instruction later.")
  67. 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 are in danger, or launch a Ranged Attack if you have a ranged weapon and ammo.")
  68. end
  69. function Abilities(NPC, Spawn)
  70. conversation = CreateConversation()
  71. AddConversationOption(conversation, "I have more questions.", "Begin")
  72. AddConversationOption(conversation, "I will return for instruction later.")
  73. StartConversation(conversation, NPC, Spawn, "Unlike Spells and Combat Arts, Abilities cannot be upgraded. Most of your Abilities are received when you first enter the world, although certain new ones can be granted as you become more experienced.")
  74. end
  75. function Find(NPC, Spawn)
  76. conversation = CreateConversation()
  77. AddConversationOption(conversation, "How do I use my Spells, Combat Arts, and Abilities?", "UseKnowledge")
  78. AddConversationOption(conversation, "I will return for instruction later.")
  79. 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.")
  80. end
  81. function UseKnowledge(NPC, Spawn)
  82. conversation = CreateConversation()
  83. AddConversationOption(conversation, "I have more questions.", "Begin")
  84. AddConversationOption(conversation, "I will return for instruction later.")
  85. 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'.")
  86. end
  87. function Improve(NPC, Spawn)
  88. conversation = CreateConversation()
  89. AddConversationOption(conversation, "How can I judge the effectiveness of my spells and Combat Arts?", "Ranks")
  90. AddConversationOption(conversation, "I'll return for training later.")
  91. StartConversation(conversation, NPC, Spawn, "Most of your Spells or Combat Arts are given to you as you advance in levels from 1 to 50. Certain special Spells or Combat Arts can be obtained by doing quests. Once you are level 51 and higher, you must find ways to purchase or obtain your new Spells and Combat Arts.")
  92. end
  93. function Ranks(NPC, Spawn)
  94. conversation = CreateConversation()
  95. AddConversationOption(conversation, "How can I improve my Spells and Combat Arts?", "Upgrades")
  96. AddConversationOption(conversation, "I will return for instruction later.")
  97. StartConversation(conversation, NPC, Spawn, "There are three main ranks of Spells and Combat Arts: Apprentice, Adept, and Master. Within each rank are up to four tiers of quality. Spells and Combat Arts that are automatically granted to you are usually given at the Apprentice I rank. You should always try to have the highest rank of your Spells and Combat Arts, because they gain effectiveness as you improve them.")
  98. end
  99. function Upgrades(NPC, Spawn)
  100. conversation = CreateConversation()
  101. AddConversationOption(conversation, "What about other ranks of Spells and Arts?", "OtherRanks")
  102. AddConversationOption(conversation, "I will return for instruction later.")
  103. StartConversation(conversation, NPC, Spawn, "You can buy Apprentice II versions of spells or combat arts here in the tower. Just purchase them from the appropriate merchant. When you arrive in Freeport, you will find a Class Trainer that sells Apprentice II versions of your Spells or Combat Arts.")
  104. end
  105. function OtherRanks(NPC, Spawn)
  106. conversation = CreateConversation()
  107. AddConversationOption(conversation, "Are there other ways to improve my Spells and Combat Arts?", "OtherWaysToImprove")
  108. AddConversationOption(conversation, "I will return for instruction later.")
  109. StartConversation(conversation, NPC, Spawn, "You will also find more potent ranks of spells as you defeat opponents in battle. Many enemies will carry Adept I versions of Spells and Combat Arts, while conquering some extremely powerful foes may result in the extremely rare Master I versions.")
  110. end
  111. function OtherWaysToImprove(NPC, Spawn)
  112. conversation = CreateConversation()
  113. AddConversationOption(conversation, "Are all my Spells and Combat Arts unique?", "Unique")
  114. AddConversationOption(conversation, "I will return for instruction later.")
  115. StartConversation(conversation, NPC, Spawn, "In addition, certain crafters can make upgrades to your Spells and Combat Arts using harvested components. They can create Apprentice IV quality spells, as well as valuable Adept III scrolls using rare components. Buying from or trading with other players is an excellent way to upgrade your Spells and Combat Arts.")
  116. end
  117. function Unique(NPC, Spawn)
  118. conversation = CreateConversation()
  119. AddConversationOption(conversation, "How can I keep all these Spells and Arts stright in my Knowledge Book?", "SortKnowledge")
  120. AddConversationOption(conversation, "I will return for instruction later.")
  121. 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 names and icons of these upgrades are often similar, but the newer versions are more effective. Again, you will want to obtain the highest rank of these new abilities that you can.")
  122. end
  123. function SortKnowledge(NPC, Spawn)
  124. conversation = CreateConversation()
  125. AddConversationOption(conversation, "I have more questions.", "Begin")
  126. AddConversationOption(conversation, "I will return for instruction later.")
  127. StartConversation(conversation, NPC, Spawn, "Your Spells and Combat Arts can easily be organized according to your 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 you wish to use.")
  128. end
  129. function FoundNotebook(NPC, Spawn)
  130. AddConversationOption(conversation, "I found this research notebook and completed the work described in it for you. Apparently the person sent before me wasn't so lucky.", "FoundNotebook2")
  131. end
  132. function FoundNotebook2(NPC, Spawn)
  133. FaceTarget(NPC, Spawn)
  134. conversation = CreateConversation()
  135. PlayFlavor(NPC, "trainer_sythor_the_all-seeing/tutorial_island02_evil_revamp/trainers/spells_arts_abilities/spells_arts017.mp3", "", "", 654103180, 563259402, Spawn)
  136. AddConversationOption(conversation, "Thanks.", "FoundNotebook3")
  137. StartConversation(conversation, NPC, Spawn, "I knew I shouldn't have sent such a tasty looking gnome into dangerous waters. Ludz will be slightly missed... Anyways, here is the reward I was going to give him, but I guess it's yours now.")
  138. end
  139. function FoundNotebook3(NPC, Spawn)
  140. SetStepComplete(Spawn, AquaticResearchNotebook, 5)
  141. end