TrainerHawkDunlop.lua 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/TrainerHawkDunlop.lua
  3. Script Purpose : Trainer Hawk Dunlop <Harvesting and Collections>
  4. Script Author : Foof
  5. Script Date : 2013.5.15
  6. Script Notes :
  7. --]]
  8. local HarvestTutorial = 11
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. ProvidesQuest(NPC, HarvestTutorial)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function InRange(NPC, Spawn)
  17. end
  18. function LeaveRange(NPC, Spawn)
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. if GetQuestStep(Spawn, HarvestTutorial) == 8 then
  23. SetStepComplete(Spawn, HarvestTutorial, 8)
  24. conversation = CreateConversation()
  25. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0, Spawn)
  26. AddConversationOption(conversation, "Thank you.")
  27. StartConversation(conversation, NPC, Spawn, "Excellent work learning about harvesting! As a reward, allow me to offer you this box for storing harvested items. It's quite heavy, so I suggest you put it in your bank rather than carrying it, but it has plenty of storage room for harvests.")
  28. else
  29. BaseChat(NPC, Spawn)
  30. end
  31. end
  32. function collections_chat_1(NPC, Spawn)
  33. FaceTarget(NPC, Spawn)
  34. conversation = CreateConversation()
  35. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  36. AddConversationOption(conversation, "What happens next?", "collections_chat_2")
  37. StartConversation(conversation, NPC, Spawn, "Collectibles are seen as a glow rising from the ground. If you're close enough, you'll notice a question mark above it. Double-click or right-click the glow and select 'harvest.' The item you gather will go into your inventory. You can examine this item in your inventory.")
  38. end
  39. function collections_chat_2(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. conversation = CreateConversation()
  42. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  43. AddConversationOption(conversation, "How do I complete the collection?", "collections_chat_3")
  44. StartConversation(conversation, NPC, Spawn, "Your quest journal will open up automatically to the Collections tab. Use the Add button to add that item to a collection. As you travel through Norrath, you'll find different collectibles in different areas of the world. Some items can be part of more than one collection.")
  45. end
  46. function collections_chat_3(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  50. AddConversationOption(conversation, "I'd like to learn about harvesting and gathering now.", "harvests_chat_1")
  51. AddConversationOption(conversation, "Thanks for the information.")
  52. StartConversation(conversation, NPC, Spawn, "Continue to gather and examine all the items you find until all the icons of that collection are highlighted in your quest journal. Then you'll be able to turn the completed collection in to a collector who will reward you with some experience. If you already have a collectible in all collections that call for it, you can sell it to a merchant or trade it to another player.")
  53. end
  54. function harvests_chat_1(NPC, Spawn)
  55. FaceTarget(NPC, Spawn)
  56. conversation = CreateConversation()
  57. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  58. AddConversationOption(conversation, "What are harvestables used for?", "harvests_chat_2")
  59. StartConversation(conversation, NPC, Spawn, "Harvestables are natural resources that can be found around most parts of the outdoors. You have harvesting skills that allow you collect them. These can be seen by opening your Character window (C), clicking on the Skills tab, and selecting the General skills. Rocks increase mining, logs increase foresting, dens increase trapping, fish increase fishing, and shrubs increase gathering.")
  60. end
  61. function harvests_chat_2(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. conversation = CreateConversation()
  64. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  65. AddConversationOption(conversation, "Why do I need to increase my harvesting skills?", "OfferHarvesttutorial")
  66. StartConversation(conversation, NPC, Spawn, "The items found through harvesting are the basic building blocks of tradeskills. They cannot be sold to vendors, but they can be traded or sold to other players who need them for their respective tradeskill professions. Some components that can be found through harvesting are very rare and can be worth quite a bit of money to tradeskillers.")
  67. end
  68. function harvests_chat_3(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. conversation = CreateConversation()
  71. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  72. AddConversationOption(conversation, "I'd like to learn about collections now.", "collections_chat_1")
  73. AddConversationOption(conversation, "Thanks for the information.")
  74. StartConversation(conversation, NPC, Spawn, "The skill required to harvest in a given area increases along with the difficulty of the area. If you find that you are unable to harvest in an area you should return to a less difficult area and practice.")
  75. end
  76. function elemental_chat_1(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  80. AddConversationOption(conversation, "Oh... Well you were talking about collections?", "BaseChat")
  81. StartConversation(conversation, NPC, Spawn, "It is bothersome, but I have seen worse. That is why I love collections so much. It helps me to forget...")
  82. end
  83. function BaseChat(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. conversation = CreateConversation()
  86. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", "", "", 0, 0, Spawn)
  87. AddConversationOption(conversation, "I'd like to learn about collections.", "collections_chat_1")
  88. AddConversationOption(conversation, "I'd like to learn about harvesting.", "harvests_chat_1")
  89. AddConversationOption(conversation, "Aren't you worried about the elemental attacks?", "elemental_chat_1")
  90. AddConversationOption(conversation, "I've no time to chat right now.")
  91. StartConversation(conversation, NPC, Spawn, "I am able to answer any questions you have about collections or harvesting.")
  92. end
  93. function OfferHarvesttutorial(NPC, Spawn)
  94. if HasCompletedQuest(Spawn, HarvestTutorial) == false and HasQuest(Spawn, HarvestTutorial) == false then
  95. OfferQuest(NPC, Spawn, HarvestTutorial)
  96. end
  97. harvests_chat_3(NPC, Spawn)
  98. end