9
3

TrainerCaelBlackstock.lua 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/TrainerCaelBlackstock.lua
  3. Script Purpose : Trainer Cael Blackstock <Know Your Inventory and Equipment>
  4. Script Author : theFoof
  5. Script Date : 2013.05.21
  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. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1002.mp3", "", "", 0, 0, Spawn)
  25. AddConversationOption(conversation, "Tell me about items and equipment.", "equip_chat_1")
  26. AddConversationOption(conversation, "Tell me about my inventory.", "inv_chat_1")
  27. AddConversationOption(conversation, "I will return for instruction later.")
  28. StartConversation(conversation, NPC, Spawn, "Well met. I'm here to teach our newest recruits about equipment and inventory space. Good equipment is one of the most important tools of any adventurer!")
  29. end
  30. function equip_chat_1(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. conversation = CreateConversation()
  33. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  34. AddConversationOption(conversation, "What can I do with the treasures I earn while adventuring?", "equip_chat_2")
  35. StartConversation(conversation, NPC, Spawn, "Norrath is full of treasures for brave heroes like you. Sometimes the opponents you defeat in battle leave behind treasure chests with valuable loot. You can also buy items from other players, craft them as an artisan, or be awarded items for completing quests.")
  36. end
  37. function equip_chat_2(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. conversation = CreateConversation()
  40. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  41. AddConversationOption(conversation, "What does the item information tell me?", "equip_chat_3")
  42. AddConversationOption(conversation, "I will return for instruction later.")
  43. StartConversation(conversation, NPC, Spawn, "Some items you obtain can be equipped on your person. If you find weapons, armor, jewelry, or certain other goodies, you may be able to use them. To look at a piece of equipment and determine if you can use it, move your mouse pointer over the item.")
  44. end
  45. function equip_chat_3(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. conversation = CreateConversation()
  48. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  49. AddConversationOption(conversation, "Are things like attribute bonuses important?", "equip_chat_4")
  50. AddConversationOption(conversation, "I will return for instruction later.")
  51. StartConversation(conversation, NPC, Spawn, "For items that can be equipped, such as weapons and armor, mousing over it tells you which professions can use the item and at what level it can be equipped. You'll also see any benefits, such as attribute bonuses and resists, that the equipment provides.")
  52. end
  53. function equip_chat_4(NPC, Spawn)
  54. FaceTarget(NPC, Spawn)
  55. conversation = CreateConversation()
  56. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  57. AddConversationOption(conversation, "How can I tell which of two weapons is better?", "equip_chat_5")
  58. AddConversationOption(conversation, "I will return for instruction later.")
  59. StartConversation(conversation, NPC, Spawn, "A wise adventurer is always trying to improve his or her equipment. Whenever you see gear that provides an overall greater benefit than what you have, that item is an upgrade for you.")
  60. end
  61. function equip_chat_5(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. conversation = CreateConversation()
  64. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  65. AddConversationOption(conversation, "How can I tell which of two pieces of armor is better?", "equip_chat_6")
  66. AddConversationOption(conversation, "I will return for instruction later.")
  67. StartConversation(conversation, NPC, Spawn, "Weapons have a Damage Rating that shows the relative damage you can do with them. A higher Damage Rating is always better. Be sure you are comparing weapons of the same type, such as a two-handed weapon with another two-hander, or one dual-wield weapon with another.")
  68. end
  69. function equip_chat_6(NPC, Spawn)
  70. FaceTarget(NPC, Spawn)
  71. conversation = CreateConversation()
  72. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  73. AddConversationOption(conversation, "What about scouts and priests?", "equip_chat_7")
  74. AddConversationOption(conversation, "I will return for instruction later.")
  75. StartConversation(conversation, NPC, Spawn, "How you judge armor depends on your profession. Fighters who take a beating care most about obtaining armor that has high Mitigation, which decreases the amount of damage they take. Mages, on the other hand, know they can't take much punishment anyway, so would rather have armor that provides nice attribute bonuses.")
  76. end
  77. function equip_chat_7(NPC, Spawn)
  78. FaceTarget(NPC, Spawn)
  79. conversation = CreateConversation()
  80. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  81. AddConversationOption(conversation, "What about scouts and priests?", "equip_chat_8")
  82. AddConversationOption(conversation, "I will return for instruction later.")
  83. StartConversation(conversation, NPC, Spawn, "How you judge armor depends on your profession. Fighters who take a beating care most about obtaining armor that has high Mitigation, which decreases the amount of damage they take. Mages, on the other hand, know they can't take much punishment anyway, so would rather have armor that provides nice attribute bonuses.")
  84. end
  85. function equip_chat_8(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. conversation = CreateConversation()
  88. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  89. AddConversationOption(conversation, "Why are some items marked 'No Value' or 'No Trade'?", "equip_chat_9")
  90. AddConversationOption(conversation, "I will return for instruction later.")
  91. StartConversation(conversation, NPC, Spawn, "An item can be sold to a non-player merchant for cash unless it has the 'No Value' flag on it. Items can be sold or traded to another player unless it has the 'No Trade' flag. If an item says it is 'Lore,' you can only have one of them on your character at a time.")
  92. end
  93. function equip_chat_9(NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. conversation = CreateConversation()
  96. AddConversationOption(conversation, 'What does it mean when an item says it is "Attuneable"?', "equip_chat_10")
  97. AddConversationOption(conversation, "I will return to instruction later.")
  98. StartConversation(conversation, NPC, Spawn, 'Some items are marked "No Value" because they are easy to obtain, such as harvested goods. You have to work to earn wealth,' .. GetName(Spawn) .. '! Items are marked "No Trade" in order to ensure that you earn them yourself, such as defeating a very tough monster or completing a long quest.')
  99. end
  100. function equip_chat_10(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. conversation = CreateConversation()
  103. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  104. AddConversationOption(conversation, "How do I manage my inventory?", "inv_chat_1")
  105. StartConversation(conversation, NPC, Spawn, "If an item is marked 'Attuneable,' you must attune it to yourself before it provides any benefits. You'll notice a message on screen when you are wearing an item that must be attuned. To attune it, right-click on the item and select 'Attune.' Once attuned, that item can no longer be traded or sold to another player.")
  106. end
  107. function inv_chat_1(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. conversation = CreateConversation()
  110. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  111. AddConversationOption(conversation, "Can I put bags inside of bags?", "inv_chat_2")
  112. AddConversationOption(conversation, "I will return for instruction later.")
  113. StartConversation(conversation, NPC, Spawn, "Press the C key to open your character window. Beneath your portrait are six slots that can hold items. You can place bags or other containers in those slots, which will give you even more storage space. Press the B key to open all your bags at once.")
  114. end
  115. function inv_chat_2(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. conversation = CreateConversation()
  118. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  119. AddConversationOption(conversation, "So one item takes up one bag slot?", "inv_chat_3")
  120. AddConversationOption(conversation, "I will return for instruction later.")
  121. StartConversation(conversation, NPC, Spawn, "Only empty bags can go inside other bags. For this reason, it's a good idea to get hold of containers with many slots. After a long night of adventuring or harvesting, you'll want to have as many places to store your goodies as possible.")
  122. end
  123. function inv_chat_3(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. conversation = CreateConversation()
  126. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  127. AddConversationOption(conversation, "So one item takes up one bag slot?", "inv_chat_4")
  128. AddConversationOption(conversation, "I will return for instruction later.")
  129. StartConversation(conversation, NPC, Spawn, "Only empty bags can go inside other bags. For this reason, it's a good idea to get hold of containers with many slots. After a long night of adventuring or harvesting, you'll want to have as many places to store your goodies as possible.")
  130. end
  131. function inv_chat_4(NPC, Spawn)
  132. FaceTarget(NPC, Spawn)
  133. conversation = CreateConversation()
  134. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  135. AddConversationOption(conversation, "I'll be back if I need to refresh my memory on this.")
  136. StartConversation(conversation, NPC, Spawn, "Certain items, such as ammunition or harvested resources, can be stacked up to 200 at a time, depending on the item. Many goods, such as armor and clothing, cannot be stacked at all.")
  137. end