TrainerGaniMaccusson.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/TrainerGaniMaccusson.lua
  3. Script Purpose : Trainer Gani Maccusson <Knowledge of Repairs and Banking>
  4. Script Author :theFoof
  5. Script Date : 2013.5.19
  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,2)
  25. if choice == 1 then
  26. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1041.mp3", "", "", 0, 0, Spawn)
  27. AddConversationOption(conversation, "Tell me about banking.", "bank_1")
  28. AddConversationOption(conversation, "Tell me about mending items.", "mend_1")
  29. AddConversationOption(conversation, "I'll return for training later.")
  30. StartConversation(conversation, NPC, Spawn, "I can explain the finer points of banking and mending to you if you like, " .. GetName(Spawn) .. ". Would you care to hear about either?")
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1041.mp3", "", "", 0, 0, Spawn)
  33. AddConversationOption(conversation, "Tell me about banking.", "bank_1")
  34. AddConversationOption(conversation, "Tell me about mending items.", "mend_1")
  35. AddConversationOption(conversation, "I'll return for training later.")
  36. StartConversation(conversation, NPC, Spawn, "I can explain the finer points of banking and mending to you if you like, " .. GetName(Spawn) .. ". Would you care to hear about either?")
  37. end
  38. end
  39. function bank_1(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. conversation = CreateConversation()
  42. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  43. AddConversationOption(conversation, "How do I open my bank?", "bank_2")
  44. StartConversation(conversation, NPC, Spawn, "You may already have an account set up. Speak with Norfryd Brisbane to access your account. You can access your bank account from cities allied with New Halas as well.")
  45. end
  46. function bank_2(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  50. AddConversationOption(conversation, "How do I make deposits and withdrawals?", "bank_3")
  51. AddConversationOption(conversation, "I'll return for training later.")
  52. StartConversation(conversation, NPC, Spawn, "Inside the bank, your mouse pointer will turn into a dial icon when hovered over a banker. Just click on the banker to open your bank window. You'll see twelve general slots and eight 'shared' slots. You can put bags or containers in your bank to increase the number of available slots.")
  53. end
  54. function bank_3(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. conversation = CreateConversation()
  57. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  58. AddConversationOption(conversation, 'What are "shared" bank slots?', "bank_4")
  59. StartConversation(conversation, NPC, Spawn, "Coins and items can be dragged from your inventory to the bank window. To drag one item from a stack, hold down the Ctrl key as you drag it. To drag a certain number of coins or items, hold down the Shift key and drag, then enter the quantity.")
  60. end
  61. function bank_4(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. conversation = CreateConversation()
  64. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  65. AddConversationOption(conversation, "Any other banking facts I should know?", "bank_5")
  66. StartConversation(conversation, NPC, Spawn, "Items (but not coin) placed in your shared slots can be accessed by other characters on your account that are of the same alignment. Lore and No-Trade items cannot be put into the shared slots.")
  67. end
  68. function bank_5(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. conversation = CreateConversation()
  71. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  72. AddConversationOption(conversation, "I want to learn about mending items.", "mend_1")
  73. AddConversationOption(conversation, "I'll return for training later.")
  74. StartConversation(conversation, NPC, Spawn, "If you choose to join a guild made up of your fellow players one day, you can access your guild bank by right-clicking on a banker and selecting 'Guild Bank.'")
  75. end
  76. function mend_1(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  80. AddConversationOption(conversation, "Tell me about banking.", "bank_1")
  81. AddConversationOption(conversation, "I'll return for training later.")
  82. StartConversation(conversation, NPC, Spawn, "Your weapons and armor wear down when you die during combat. When they are down to zero durability, you no longer receive any benefit from them. You can visit a mender to get them repaired. Luckily, Bull the Crafty has set up his work station for mending here, on Pilgrims' Landing.")
  83. end