DawsonMagnificent.lua 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. --[[
  2. Script Name : SpawnScripts/NorthQeynos/DawsonMagnificent.lua
  3. Script Purpose : Dawson Magnificent
  4. Script Author : Dorbin
  5. Script Date : 2022.04.22
  6. Script Notes :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. local Message = 5546
  10. local Quest1 = 5782
  11. function spawn(NPC)
  12. ProvidesQuest(NPC,Message)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC,Spawn)
  18. if GetFactionAmount(Spawn,11) <0 then
  19. FactionCheckingCallout(NPC, Spawn, faction)
  20. else
  21. if math.random(1, 100) <= 70 then
  22. FaceTarget(NPC,Spawn)
  23. choice = math.random(1,2)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn)
  26. elseif choice == 2 then
  27. PlayFlavor(NPC, "", "", "bye", 0, 0, Spawn)
  28. end
  29. end
  30. end
  31. end
  32. function hailed(NPC, Spawn)
  33. FaceTarget(NPC,Spawn)
  34. if GetFactionAmount(Spawn,11) <0 then
  35. FaceTarget(NPC, Spawn)
  36. choice = math.random(1,2)
  37. if choice == 1 then
  38. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  39. elseif choice == 2 then
  40. PlayFlavor(NPC, "", "", "heckno", 0, 0, Spawn)
  41. end
  42. else
  43. local conversation = CreateConversation()
  44. FaceTarget(NPC,Spawn)
  45. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1052.mp3", "", "bye", 0, 0, Spawn, 0)
  46. if not HasQuest(Spawn,Message) and not HasCompletedQuest(Spawn, Message)then
  47. AddConversationOption(conversation, "You seem torn about something, Dawson.","QuestStart")
  48. end
  49. if HasQuest(Spawn,Quest1) and GetQuestStep(Spawn,Quest1)==3 then
  50. AddConversationOption(conversation,"Perhaps if you lost a few pounds, you wouldn't have that problem! Touche!","Dialog1")
  51. end
  52. if GetQuestStep(Spawn, Message) ==2 then
  53. AddConversationOption(conversation, "I let Galsway know you would be late tonight.","Delivered")
  54. end
  55. AddConversationOption(conversation, "Hope it's working out well for you. Goodbye.")
  56. StartConversation(conversation, NPC, Spawn, "Hello! I'm Dawson Magnificent, the renowned street performer! I'm known throughout the land for my troupe. My brother Gray is to my left, and to my right is our lovely assistant Andrea!")
  57. end
  58. end
  59. function QuestStart(NPC,Spawn)
  60. FaceTarget(NPC, Spawn)
  61. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  62. local conversation = CreateConversation()
  63. AddConversationOption(conversation, "Sure, I'll help you. It's the least I can do.", "Delivery2")
  64. AddConversationOption(conversation, "Hey, you're the performer. How do I know this isn't just an act?","Act")
  65. StartConversation(conversation, NPC, Spawn, "You're very observant, traveler. You see, we're going to be late for our performance over at the Fish Alehouse and Inn in the harbor, and I'd like to let old Galsway know. Would you mind helping out?")
  66. end
  67. function Act(NPC,Spawn)
  68. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  69. SendMessage(Spawn,"Dawson glares at you unapprovingly.")
  70. end
  71. function Delivery2(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. OfferQuest(NPC, Spawn,Message)
  74. end
  75. function Delivered(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn)
  78. local conversation = CreateConversation()
  79. AddConversationOption(conversation, "Thanks. Break a leg!", "FinishQuest")
  80. StartConversation(conversation, NPC, Spawn, "Wonderful! I hate to keep anyone waiting for me! Here's the coin I promised.")
  81. end
  82. function FinishQuest(NPC,Spawn)
  83. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. SetStepComplete(Spawn,Message, 2)
  86. end
  87. function Dialog1(NPC, Spawn)
  88. FaceTarget(NPC, Spawn)
  89. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  90. local conversation = CreateConversation()
  91. AddConversationOption(conversation, "I'll take your word for it, friend. The \'man\' part, if you misundertood", "Dialog2")
  92. AddConversationOption(conversation, "You... you smell!","Dialog1a")
  93. AddConversationOption(conversation, "Perhaps... err... I should give this some more thought.")
  94. StartConversation(conversation, NPC, Spawn, "Ha! You fancy yourself a wordsmith of the verbal sting. yes? I'm up for giving someone a good nose rubbing. I'll give you the first jab only because I'm a fair man.")
  95. end
  96. function Dialog1a(NPC,Spawn)
  97. PlayFlavor(NPC, "", "", "snicker", 0, 0, Spawn)
  98. SendMessage(Spawn,"Dawson snickers at you in victory.")
  99. end
  100. function Dialog2(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. PlayAnimation(NPC,12172)
  103. local conversation = CreateConversation()
  104. AddConversationOption(conversation, "I... uh... think you should go jump in the moat!... without pants?", "Dialog2a")
  105. AddConversationOption(conversation, "I wouldn't want you to miss out, seeing this is your first time you've heard it.","Dialog3")
  106. AddConversationOption(conversation, "Umm... I must be going!")
  107. StartConversation(conversation, NPC, Spawn, "A bit droll, but I guess you're warming up. Just let me know when you get to the witty parts.")
  108. end
  109. function Dialog2a(NPC,Spawn)
  110. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  111. SendMessage(Spawn,"Dawson chuckles at you in victory.")
  112. end
  113. function Dialog3(NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. PlayAnimation(NPC,"point")
  116. PlayFlavor(NPC, "", "", "point", 0, 0, Spawn)
  117. local conversation = CreateConversation()
  118. AddConversationOption(conversation, "I think you're mistaking that feeling for the broccoli you ate earlier.", "Dialog4")
  119. AddConversationOption(conversation, "You...your face makes me laugh!","Dialog3a")
  120. AddConversationOption(conversation, "Let's continue this... another time?")
  121. StartConversation(conversation, NPC, Spawn, "But not the first time I've seen it. Just looking at you makes me laugh!")
  122. end
  123. function Dialog3a(NPC,Spawn)
  124. PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn)
  125. SendMessage(Spawn,"Dawson shrugs at you in victory.")
  126. end
  127. function Dialog4(NPC, Spawn)
  128. FaceTarget(NPC, Spawn)
  129. PlayFlavor(NPC, "", "", "smirk", 0, 0, Spawn)
  130. local conversation = CreateConversation()
  131. AddConversationOption(conversation, "Hah! Toot.", "Dialog4a")
  132. AddConversationOption(conversation, "Is your mother still paying for you lessons?","Dialog5")
  133. AddConversationOption(conversation, "Let's continue this... another time?")
  134. StartConversation(conversation, NPC, Spawn, "Yes, I've been known to toot my own horn on occasion, friend. But the crowds I draw attest to my skill!")
  135. end
  136. function Dialog4a(NPC,Spawn)
  137. PlayFlavor(NPC, "", "", "confused", 0, 0, Spawn)
  138. AddConversationOption(conversation, "I mean...Is your mother still paying for you lessons?")
  139. StartConversation(conversation, NPC, Spawn, "...")
  140. SendMessage(Spawn,"Dawson rubs his head in confusion.")
  141. end
  142. function Dialog4(NPC, Spawn)
  143. SetStepComplete(Spawn,Quest1,3)
  144. FaceTarget(NPC, Spawn)
  145. PlayFlavor(NPC, "", "", "beg", 0, 0, Spawn)
  146. local conversation = CreateConversation()
  147. AddConversationOption(conversation, "Alright. Best of luck with the show. Try not to break any legs!")
  148. StartConversation(conversation, NPC, Spawn, "Ugh! I yield! I don't have any more time for this. Please, take yourself and your sharp tongue elsewhere. I have a show to prepare.")
  149. end