BruhnKViir.lua 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. --[[
  2. Script Name : SpawnScripts/Nektulos/BruhnKViir.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.06.19 07:06:04
  5. Script Purpose :
  6. :
  7. --]]
  8. local ProveYourself = 5256
  9. local TrustMustBeEarnedPart1 = 5258
  10. local TrustMustBeEarnedPart2 = 5259
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 10, "InRange")
  13. end
  14. function InRange(NPC, Spawn)
  15. if not HasQuest(Spawn, ProveYourself) and not HasCompletedQuest(Spawn, ProveYourself) then
  16. ProvidesQuest(NPC, ProveYourself)
  17. SetInfoFlag(NPC)
  18. SetVisualFlag(NPC)
  19. elseif HasCompletedQuest(Spawn, ProveYourself) then
  20. ProvidesQuest(NPC, TrustMustBeEarnedPart1)
  21. SetInfoFlag(NPC)
  22. SetVisualFlag(NPC)
  23. elseif HasCompletedQuest(Spawn, TrustMustBeEarnedPart1) then
  24. ProvidesQuest(NPC, TrustMustBeEarnedPart2)
  25. SetInfoFlag(NPC)
  26. SetVisualFlag(NPC)
  27. end
  28. end
  29. function hailed(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. if not HasQuest(Spawn, ProveYourself) and not HasCompletedQuest(Spawn, ProveYourself) then
  32. local conversation = CreateConversation()
  33. AddConversationOption(conversation, "Yes, I can speak. What is this camp?", "Option1")
  34. AddConversationOption(conversation, "Actually, I am finding it quite difficult to talk to you. Goodbye.")
  35. StartConversation(conversation, NPC, Spawn, "You are quite a pitiful specimen. In fact, I am quite appalled that you are able to speak. You are able to speak, correct?")
  36. elseif HasCompletedQuest(Spawn, ProveYourself) and not HasQuest(Spawn, TrustMustBeEarnedPart1) and not HasCompletedQuest(Spawn, TrustMustBeEarnedPart1) then
  37. local conversation = CreateConversation()
  38. AddConversationOption(conversation, "Real funny. You told them to attack me, didn't you?", "Option5")
  39. AddConversationOption(conversation, "No, they weren't nice, and neither are you. Goodbye!")
  40. StartConversation(conversation, NPC, Spawn, "Congratulations. You are not as incompetent as I thought. Were the scouts nice to you?")
  41. elseif HasCompletedQuest(Spawn, TrustMustBeEarnedPart1) and not HasQuest(Spawn, TrustMustBeEarnedPart2) and not HasCompletedQuest(Spawn, TrustMustBeEarnedPart2) then
  42. local conversation = CreateConversation()
  43. AddConversationOption(conversation, "I can handle anything you can give.", "Option8")
  44. AddConversationOption(conversation, "You bore me. Goodbye.")
  45. StartConversation(conversation, NPC, Spawn, "Those plans were quite useful. More so than you, in fact. Nonetheless, I cannot ignore the aid you have provided, no matter how much I dislike that you have potential. I will give you another chance to earn our trust, if you think you can handle a real task...")
  46. elseif GetQuestStep(Spawn, ProveYourself) == 1 or GetQuestStep(Spawn, ProveYourself) == 2 or GetQuestStep(Spawn, ProveYourself) == 3 or GetQuestStep(Spawn, TrustMustBeEarnedPart1) == 1 or GetQuestStep(Spawn, TrustMustBeEarnedPart2) == 1 or GetQuestStep(Spawn, TrustMustBeEarnedPart2) == 2 then
  47. Quest_Progress(NPC, Spawn)
  48. elseif GetQuestStep(Spawn, ProveYourself) == 4 or GetQuestStep(Spawn, TrustMustBeEarnedPart1) == 2 then
  49. Quest1_2_Finish(NPC, Spawn)
  50. elseif GetQuestStep(Spawn, TrustMustBeEarnedPart2) == 3 then
  51. Quest3_Finish(NPC, Spawn)
  52. elseif HasCompletedQuest(Spawn, ProveYourself) and HasCompletedQuest(Spawn, TrustMustBeEarnedPart1) and HasCompletedQuest(Spawn, TrustMustBeEarnedPart2) then
  53. PlayFlavor(NPC, "", "I am finished with you. Make sure you have read the entire book and then speak with Torq.", "", 1689589577, 4560189, Spawn)
  54. end
  55. end
  56. function Option1(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. local conversation = CreateConversation()
  59. AddConversationOption(conversation, "I am not one of that... type.", "Option2")
  60. AddConversationOption(conversation, "I thought you would answer, but I was wrong. Goodbye.")
  61. StartConversation(conversation, NPC, Spawn, "Did you really think that I would answer that? I don't know you from any other fool who wanders along, saying hello for no good reason. They run by saying hello like I have pretty presents to hand out. It disgusts me.")
  62. end
  63. function Option2(NPC, Spawn)
  64. FaceTarget(NPC, Spawn)
  65. local conversation = CreateConversation()
  66. AddConversationOption(conversation, "I will take on your task.", "offer")
  67. AddConversationOption(conversation, "Does it mean I would have to speak with you again?", "Option3")
  68. AddConversationOption(conversation, "I'm busy right now. Goodbye.")
  69. StartConversation(conversation, NPC, Spawn, "Hmm, maybe you are, maybe you aren't. It doesn't really matter in the long run, does it? If you are truly interested in why we are here, then I have a task you could perform to prove yourself, if you wish it.")
  70. end
  71. function Option3(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. local conversation = CreateConversation()
  74. AddConversationOption(conversation, "Sure.", "offer")
  75. AddConversationOption(conversation, "I am no fool. Goodbye.")
  76. StartConversation(conversation, NPC, Spawn, "Funny... Do you want to learn or not, fool?")
  77. end
  78. function Option4(NPC, Spawn)
  79. SetStepComplete(Spawn, ProveYourself, 4)
  80. FaceTarget(NPC, Spawn)
  81. local conversation = CreateConversation()
  82. AddConversationOption(conversation, "Thank you.")
  83. StartConversation(conversation, NPC, Spawn, "And you're still alive... I'm impressed. Take this and speak with me again when you're ready for your next task.")
  84. end
  85. function Option5(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. local conversation = CreateConversation()
  88. AddConversationOption(conversation, "I suppose.", "Option6")
  89. AddConversationOption(conversation, "No, absolutely not.")
  90. StartConversation(conversation, NPC, Spawn, "They have standing orders to attack anyone they do not recognize, so yes and no... Do you still wish to learn more about our order?")
  91. end
  92. function Option6(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. local conversation = CreateConversation()
  95. AddConversationOption(conversation, "Yes, I can. I'll return shortly with the plans.", "offer2")
  96. AddConversationOption(conversation, "Not at the moment. Goodbye.")
  97. StartConversation(conversation, NPC, Spawn, "If you travel around the beach you will find several groups of filthy humans. One of these camps holds the tents of both the Tactician and the Commander. We have heard rumors that the pirates are planning to expand off the beach and deeper into the forest. We do not wish this, of course. I need you to find the Tactician's tent and steal the attack plans. Can you handle that?")
  98. end
  99. function Option7(NPC, Spawn)
  100. SetStepComplete(Spawn, TrustMustBeEarnedPart1, 2)
  101. FaceTarget(NPC, Spawn)
  102. local conversation = CreateConversation()
  103. AddConversationOption(conversation, "I will.")
  104. StartConversation(conversation, NPC, Spawn, "Good work. I will give these to Szin. Take this for your time and return to me later. I have more tasks for you.")
  105. end
  106. function Option8(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. local conversation = CreateConversation()
  109. AddConversationOption(conversation, "I can.", "offer3")
  110. AddConversationOption(conversation, "No, not right now.")
  111. StartConversation(conversation, NPC, Spawn, "I need you to find the Tactician and Commander and scour them from this beach. The plans for taking over the forest were more involved than we thought possible of their little human brains. Can you handle that?")
  112. end
  113. function Option9(NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. local conversation = CreateConversation()
  116. AddConversationOption(conversation, "This better be good, and not a set of ogre poetry.", "Option10")
  117. AddConversationOption(conversation, "No thanks. I won't be sacrificing lives to a book right now. Goodbye.")
  118. StartConversation(conversation, NPC, Spawn, "Yes, this of course isn't going to be, ''Oh, let's go sit under a tree and read this book!'' You should know better. These pages are shielded with an arcane magic beyond the comprehension of most mortal beings. It requires blood to reveal the truth written in its pages. You will know what kind of blood it desires when the time comes.")
  119. end
  120. function Option10(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. local conversation = CreateConversation()
  123. AddConversationOption(conversation, "I will.")
  124. StartConversation(conversation, NPC, Spawn, "All you have to do is take a look at the book and it will take you from there. If you manage to read the entire thing, come back and speak with Torq. He has more tasks for you if you wish to continue with the Trials.")
  125. end
  126. function Quest3_Finish(NPC, Spawn)
  127. SetStepComplete(Spawn, TrustMustBeEarnedPart2, 3)
  128. FaceTarget(NPC, Spawn)
  129. local conversation = CreateConversation()
  130. AddConversationOption(conversation, "You do realize this book is blank, do you not?", "Option9")
  131. AddConversationOption(conversation, "No thanks.")
  132. StartConversation(conversation, NPC, Spawn, "You have performed well. You show an interest in knowing why we are here. The book I gave you will answer many of your questions. You should feel honored; few have even touched that book in centuries.")
  133. end
  134. function offer(NPC, Spawn)
  135. OfferQuest(NPC, Spawn, ProveYourself)
  136. end
  137. function offer2(NPC, Spawn)
  138. OfferQuest(NPC, Spawn, TrustMustBeEarnedPart1)
  139. end
  140. function offer3(NPC, Spawn)
  141. OfferQuest(NPC, Spawn, TrustMustBeEarnedPart2)
  142. end
  143. function Quest_Progress(NPC, Spawn)
  144. FaceTarget(NPC, Spawn)
  145. local conversation = CreateConversation()
  146. AddConversationOption(conversation, "Okay...")
  147. StartConversation(conversation, NPC, Spawn, "Please, do not bother me until you are finished.")
  148. end
  149. function Quest1_2_Finish(NPC, Spawn)
  150. FaceTarget(NPC, Spawn)
  151. local conversation = CreateConversation()
  152. if GetQuestStep(Spawn, ProveYourself) == 4 then
  153. AddConversationOption(conversation, "Yes. I have delivered the supplies to the scouts.", "Option4")
  154. elseif GetQuestStep(Spawn, TrustMustBeEarnedPart1) == 2 then
  155. AddConversationOption(conversation, "Yes. Here are the attack plans.", "Option7")
  156. end
  157. AddConversationOption(conversation, "I must go.")
  158. StartConversation(conversation, NPC, Spawn, "Have you completed your tasks yet?")
  159. end
  160. function respawn(NPC)
  161. spawn(NPC)
  162. end