JPFeterman.lua 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/JPFeterman.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.01.06 07:01:46
  5. Script Purpose :
  6. :
  7. --]]
  8. local ProofIsInThePudding = 417
  9. local AHuntersTool = 418
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, ProofIsInThePudding)
  12. ProvidesQuest(NPC, AHuntersTool)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. local choice = math.random(1, 3)
  17. if choice == 1 then
  18. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1010.mp3", "", "", 0, 0, Spawn)
  19. elseif choice == 2 then
  20. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1010.mp3", "", "", 0, 0, Spawn)
  21. else
  22. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1010.mp3", "", "", 0, 0, Spawn)
  23. end
  24. if not HasQuest(Spawn, ProofIsInThePudding) and not HasCompletedQuest(Spawn, ProofIsInThePudding) then
  25. dlg(NPC, Spawn)
  26. elseif GetQuestStep(Spawn, ProofIsInThePudding) == 6 or GetQuestStep(Spawn, AHuntersTool) == 4 then
  27. dlg4(NPC, Spawn)
  28. elseif HasQuest(Spawn, ProofIsInThePudding) and not HasCompletedQuest(Spawn, ProofIsInThePudding) or HasQuest(Spawn, AHuntersTool) and not HasCompletedQuest(Spawn, AHuntersTool) then
  29. progress(NPC, Spawn)
  30. elseif HasCompletedQuest(Spawn, ProofIsInThePudding) and not HasCompletedQuest(Spawn, AHuntersTool) then
  31. dlg5(NPC, Spawn)
  32. end
  33. end
  34. function respawn(NPC)
  35. spawn(NPC)
  36. end
  37. -- -- PROOF IS IN THE PUDDING PART
  38. function dlg(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. conversation = CreateConversation()
  41. AddConversationOption(conversation, "Um, what are you talking about?", "dlg1")
  42. AddConversationOption(conversation, "Right, I really don't have time for this.")
  43. StartConversation(conversation, NPC, Spawn, "Salutations, friend! Ahh, by the look in your eyes I can see that you're in need of my considerable experience. It can be difficult learning the perilous ways of adventure in these harsh, barren lands. Many a poor, naive soul such as yourself has met their end out here.")
  44. end
  45. function dlg1(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. conversation = CreateConversation()
  48. AddConversationOption(conversation, "Well, you aren't full of yourself at all, are you?", "dlg2")
  49. AddConversationOption(conversation, "That's it, I'm not going to take this.")
  50. StartConversation(conversation, NPC, Spawn, "Oh, there's no need to pretend otherwise! I understand your fears. Not many are as knowledgeable of these things as I am, and I feel it's my duty to help those who could benefit from my tutelage. Why, even I was once as inexperienced as yourself a long, long time ago... but that is a story for another time.")
  51. end
  52. function dlg2(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. conversation = CreateConversation()
  55. AddConversationOption(conversation, "I guess it couldn't hurt...", "dlg3")
  56. AddConversationOption(conversation, "No way. I'm leaving.")
  57. StartConversation(conversation, NPC, Spawn, "Ahh, such spirit. It warms my heart to see it. Before I send you into the arms of danger, I'll need you to prove to me that you're ready to follow in my renowned footsteps. Once you've seen a few of the more perilous places of adventure, you should be ready to learn from my experience.")
  58. end
  59. function dlg3(NPC, Spawn)
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. AddConversationOption(conversation, "Okay.", "offer")
  63. StartConversation(conversation, NPC, Spawn, "That's the spirit! Here, let me just jot down a few of the more perilous locations here in The Commonlands in your journal.")
  64. end
  65. function dlg4(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. conversation = CreateConversation()
  68. if HasQuest(Spawn, ProofIsInThePudding) then
  69. AddConversationOption(conversation, "I have scouted the areas you asked me to, J.P.", "complete1")
  70. elseif HasQuest(Spawn, AHuntersTool) then
  71. AddConversationOption(conversation, "I have what you need to make your bow, J.P", "complete2")
  72. end
  73. AddConversationOption(conversation, "That's all the adventure I need for one day.")
  74. StartConversation(conversation, NPC, Spawn, "Hello again, young adventurer to be!")
  75. end
  76. function complete1(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. SetStepComplete(Spawn, ProofIsInThePudding, 6)
  79. conversation = CreateConversation()
  80. AddConversationOption(conversation, "Why thank you, J.P.")
  81. StartConversation(conversation, NPC, Spawn, "Very well done, or at least done... Anyways, I'm not done with you yet.")
  82. end
  83. -- NEXT PART
  84. function dlg5(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. conversation = CreateConversation()
  87. AddConversationOption(conversation, "Oh, is that what you think you are doing?", "dlg6")
  88. AddConversationOption(conversation, "You think that you are actually teaching me something? I think I'm done with this.")
  89. StartConversation(conversation, NPC, Spawn, "Back so soon? My, you are the eager little apprentice aren't you? Well, when I was your age, I too was looking for someone older and wiser to lead me down the road of adventuring.")
  90. end
  91. function dlg6(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. AddConversationOption(conversation, "What happened to your bow?", "dlg7")
  95. AddConversationOption(conversation, "I don't care about your silly bow.")
  96. StartConversation(conversation, NPC, Spawn, "Oh yes, very much so. Just because you can't see the lessons now doesn't mean that I am any less the mentor. Why, I'd be out there in the field hunting with you, if it weren't for the loss of my favorite bow.")
  97. end
  98. function dlg7(NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. conversation = CreateConversation()
  101. AddConversationOption(conversation, "Fine, I'll help you fix your bow.", "dlg8")
  102. AddConversationOption(conversation, "I've had enough of this. Fix your own bow.")
  103. StartConversation(conversation, NPC, Spawn, "It's just worn from overuse. Oh, the beasts I have slain with my mighty bow. I am simply too busy, with all of my many apprentices, to take the time to gather the components I need to fix my bow. I think it will be a wonderful task for your studies.")
  104. end
  105. function dlg8(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. conversation = CreateConversation()
  108. AddConversationOption(conversation, "Ok, I'll see what I can do.", "offer2")
  109. StartConversation(conversation, NPC, Spawn, "I'll need a few sturdy pieces of maple, some tuber strands to make a nice draw, and maybe you could convince a couple dervishes to relinquish a compound cam or two.")
  110. end
  111. function complete2(NPC, Spawn)
  112. FaceTarget(NPC, Spawn)
  113. SetStepComplete(Spawn, AHuntersTool, 4)
  114. conversation = CreateConversation()
  115. AddConversationOption(conversation, "I guess I will take that as a compliment.")
  116. StartConversation(conversation, NPC, Spawn, "Well done, but since you took so long, I repaired it myself. No matter. You show spunk, and I like that.")
  117. end
  118. function offer(NPC, Spawn)
  119. FaceTarget(NPC, Spawn)
  120. OfferQuest(NPC, Spawn, ProofIsInThePudding)
  121. end
  122. function offer2(NPC, Spawn)
  123. FaceTarget(NPC, Spawn)
  124. OfferQuest(NPC, Spawn, AHuntersTool)
  125. end
  126. function progress(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. conversation = CreateConversation()
  129. AddConversationOption(conversation, "Why do I put up with this?")
  130. StartConversation(conversation, NPC, Spawn, "Hurry on now! You've got a lot of work to do, my young friend. Come see me when you're finished.")
  131. end