9
3

HaddekVimki.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. --[[
  2. Script Name : (SpawnScripts/Antonica/HaddekVimki.lua
  3. Script Purpose : Haddek Vimki dialogue script
  4. Script Author : Jabantiz, premierio015
  5. Script Date : 08/29/2019 - 04.09.2021
  6. Script Notes :
  7. --]]
  8. local RunningOutOfBeer = 5352
  9. local OuchMyHead = 5353
  10. local RiseAndShineWine = 5354
  11. local PracticalJokeOnBlarton = 5355
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, RunningOutOfBeer)
  14. ProvidesQuest(NPC, OuchMyHead)
  15. ProvidesQuest(NPC, RiseAndShineWine)
  16. ProvidesQuest(NPC, PracticalJokeOnBlarton)
  17. SetPlayerProximityFunction(NPC, 10, "InRange", Spawn)
  18. end
  19. function InRange(NPC, Spawn)
  20. if not HasCompletedQuest(Spawn, RunningOutOfBeer) then
  21. ProvidesQuest(NPC, RunningOutOfBeer)
  22. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) then
  23. ProvidesQuest(NPC, OuchMyHead)
  24. SetInfoFlag(NPC)
  25. SetVisualFlag(NPC)
  26. elseif HasCompletedQuest(Spawn, OuchMyHead) then
  27. ProvidesQuest(NPC, RiseAndShineWine)
  28. SetInfoFlag(NPC)
  29. SetVisualFlag(NPC)
  30. elseif HasCompletedQuest(Spawn, RiseAndShineWine) then
  31. ProvidesQuest(NPC, PracticalJokeOnBlarton)
  32. SetInfoFlag(NPC)
  33. SetVisualFlag(NPC)
  34. end
  35. end
  36. function respawn(NPC)
  37. spawn(NPC)
  38. end
  39. function hailed(NPC, Spawn)
  40. local choice = MakeRandomInt(1, 4)
  41. if choice == 1 then
  42. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1060.mp3", "", "", 0, 0, Spawn)
  43. elseif choice == 2 then
  44. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1060.mp3", "", "", 0, 0, Spawn)
  45. elseif choice == 3 then
  46. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1060.mp3", "", "", 0, 0, Spawn)
  47. elseif choice == 4 then
  48. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0, Spawn)
  49. end
  50. FaceTarget(NPC, Spawn)
  51. local conversation = CreateConversation()
  52. if not HasQuest(Spawn, RunningOutOfBeer) and not HasCompletedQuest(Spawn, RunningOutOfBeer) then
  53. Option1(NPC, Spawn)
  54. elseif GetQuestStep(Spawn, RunningOutOfBeer) == 1 or GetQuestStep(Spawn, OuchMyHead) == 1 or GetQuestStep(Spawn, OuchMyHead) == 2 or GetQuestStep(Spawn, OuchMyHead) == 3 or GetQuestStep(Spawn, RiseAndShineWine) == 1 or GetQuestStep(Spawn, PracticalJokeOnBlarton) == 1 then
  55. PlayFlavor(NPC, "", "Hruh? What? I thought I told you what I wanted from you. If you're not going to take care of it I'm going to have old Aroof here take care of... Well... it don't look like he is going to be taking care of much... but when I tell him tomorrow, he will be awful angry!", "", 1689589577, 4560189, Spawn)
  56. elseif GetQuestStep(Spawn, RunningOutOfBeer) == 2 then
  57. Option7(NPC, Spawn) -- BETWEEN QUEST-STEPS PROGRESS
  58. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) and not HasQuest(Spawn, OuchMyHead) and not HasCompletedQuest(Spawn, OuchMyHead) then
  59. Option8(NPC, Spawn)
  60. elseif GetQuestStep(Spawn, OuchMyHead) == 4 then
  61. Option10(NPC, Spawn)
  62. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) and HasCompletedQuest(Spawn, OuchMyHead) and not HasQuest(Spawn, RiseAndShineWine) and not HasCompletedQuest(Spawn, RiseAndShineWine) then
  63. Option11(NPC, Spawn)
  64. elseif GetQuestStep(Spawn, RiseAndShineWine) == 2 then
  65. Option15(NPC, Spawn)
  66. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) and HasCompletedQuest(Spawn, OuchMyHead) and HasCompletedQuest(Spawn, RiseAndShineWine) and not HasQuest(Spawn, PracticalJokeOnBlarton) and not HasCompletedQuest(Spawn, PracticalJokeOnBlarton) then
  67. Option16(NPC, Spawn)
  68. elseif GetQuestStep(Spawn, PracticalJokeOnBlarton) == 2 then
  69. Option19(NPC, Spawn)
  70. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) and HasCompletedQuest(Spawn, OuchMyHead) and HasCompletedQuest(Spawn, RiseAndShineWine) and HasCompletedQuest(Spawn, PracticalJokeOnBlarton) then
  71. Quest_Completed(NPC, Spawn)
  72. end
  73. end
  74. function Option1(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. local conversation = CreateConversation()
  77. AddConversationOption(conversation, "Sure, what do you need from me?", "Option2")
  78. AddConversationOption(conversation, "Why don't you make yourself useful?!")
  79. StartConversation(conversation, NPC, Spawn, "So, then I said, \"That's what the Gnome is for!\" Wraahaahaa! Huh? What? If you're goin' to come over here and badger me, why don't you make yourself useful?")
  80. end
  81. function Option2(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. local conversation = CreateConversation()
  84. AddConversationOption(conversation, "I'm looking for some work.", "Option3")
  85. AddConversationOption(conversation, "I think I'll be going now.")
  86. StartConversation(conversation, NPC, Spawn, "Ahhh, Aroof... He's a good chap, but he's about as smart as a trog. Me an' the big guy here are in the middle of something. What do you want? ")
  87. end
  88. function Option3(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. local conversation = CreateConversation()
  91. AddConversationOption(conversation, "And?", "Option4")
  92. AddConversationOption(conversation, "Okay, I have had enough. Bye.")
  93. StartConversation(conversation, NPC, Spawn, "Ya see, twinkletoes over here has had quite a bit to drink. The big oaf isn't as coordinated as the barkeep would like him to be. Seems last time I sent him up to get us another round, he tripped over a ratonga sitting by the bar.")
  94. end
  95. function Option4(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. local conversation = CreateConversation()
  98. AddConversationOption(conversation, "Okay. So?", "Option5")
  99. AddConversationOption(conversation, "Umm, never mind.")
  100. StartConversation(conversation, NPC, Spawn, "... And, it turns out the ratonga had what you might call... financial responsibilities to take care of for the proprietor. Looks like the little fur ball won't be back for quite some time! Hraahaha! The barkeep will throw us both out if the big guy over here comes stumbling upstairs one more time. Besides, I don't think he's feeling up to going anywhere right now.")
  101. end
  102. function Option5(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. local conversation = CreateConversation()
  105. AddConversationOption(conversation, "Okay, get on with it.", "Option6")
  106. AddConversationOption(conversation, "Uphill? I think I've heard this one.")
  107. StartConversation(conversation, NPC, Spawn, "You're an impatient one, aren't you? You need to slow down a bit! Sit back, grab an ale, and enjoy the sights. Get up you drunken fool! You know, when I was a young pup like yourself I used to be all over Norrath fighting Drakota... with my bare hands.")
  108. end
  109. function Option6(NPC, Spawn)
  110. FaceTarget(NPC, Spawn)
  111. local conversation = CreateConversation()
  112. AddConversationOption(conversation, "Sure, I will be right back", "offer")
  113. AddConversationOption(conversation, "No, it looks like you two have had enough.")
  114. StartConversation(conversation, NPC, Spawn, "And look where it got me. Sitting here with a drunken fool who can't keep both feet on the ground, and talking to a whelp like you. Where was I? Aye, I want a drink! Why don't you grab the big guy and I an ale.")
  115. end
  116. function Option7(NPC, Spawn)
  117. SetStepComplete(Spawn, RunningOutOfBeer, 2)
  118. FaceTarget(NPC, Spawn)
  119. local conversation = CreateConversation()
  120. AddConversationOption(conversation, "Great, thank you.")
  121. StartConversation(conversation, NPC, Spawn, "Ha! Great! Why don't you take this? It doesn't look like old Aroof will be needing it. Hmph!")
  122. end
  123. function Option8(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. local conversation = CreateConversation()
  126. AddConversationOption(conversation, "Okay.", "Option9")
  127. AddConversationOption(conversation, "I think I have had enough.")
  128. StartConversation(conversation, NPC, Spawn, "Shhhh! Do you have to be so loud? Look, here's what I need from you. I think that Aroof over here has a bit of a hangover. Ha! Think you can help him out a bit? I would do it, but I've got to stay around and help the poor guy out.")
  129. end
  130. function Option9(NPC, Spawn)
  131. FaceTarget(NPC, Spawn)
  132. local conversation = CreateConversation()
  133. AddConversationOption(conversation, "Okay. Go on.", "offer2")
  134. AddConversationOption(conversation, "On second thought, never mind.")
  135. StartConversation(conversation, NPC, Spawn, "Why don't you be a pal and grab my friend here what I, er... he needs to get rid of this horrendous, terrible, splitting headache. But, bring it to me. I need to give it a taste first before he tries it. I'm a good friend, ya know. I've got to make sure he'll like it.")
  136. end
  137. function Option10(NPC, Spawn)
  138. SetStepComplete(Spawn, OuchMyHead, 4)
  139. FaceTarget(NPC, Spawn)
  140. local conversation = CreateConversation()
  141. AddConversationOption(conversation, "Yeah, you do that.")
  142. StartConversation(conversation, NPC, Spawn, "Ahhh. That's some wretched stuff right there. Aroof isn't going to tolerate slop like this. Looks like I will have to just drink it for him.")
  143. end
  144. function Option11(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. local conversation = CreateConversation()
  147. AddConversationOption(conversation, "Okay, back to what you were saying.", "Option12")
  148. AddConversationOption(conversation, "I was just thinking the same thing.")
  149. StartConversation(conversation, NPC, Spawn, "Hey there! Good to see you again! Care to do an old dwarf another favor? I'm making something special, but I need some help getting a few of the ingredients. But, you see, I'm not quite as young as I used to be, and I need a bit of help. Sometimes I wonder why I waste my time with this fool.")
  150. end
  151. function Option12(NPC, Spawn)
  152. FaceTarget(NPC, Spawn)
  153. local conversation = CreateConversation()
  154. AddConversationOption(conversation, "Sure, why not?", "Option13")
  155. AddConversationOption(conversation, "You're nuts!")
  156. StartConversation(conversation, NPC, Spawn, "Right, right. You see, I have this, let's call him, \"friend.\" This \"friend\" has been giving me and Aroof here a hard time. I got something in mind for him, and I need your help.")
  157. end
  158. function Option13(NPC, Spawn)
  159. FaceTarget(NPC, Spawn)
  160. local conversation = CreateConversation()
  161. AddConversationOption(conversation, "Sure, I'll help you out. ", "Option14")
  162. AddConversationOption(conversation, "No, I don't think that's a good idea.")
  163. StartConversation(conversation, NPC, Spawn, "You see, Blarton put something in our drinks, and whatever it is has got big, tough Aroof over here in quite a mess. We need to get back at Blarton! I got this idea for a wine... something that will really knock his socks off.")
  164. end
  165. function Option14(NPC, Spawn)
  166. FaceTarget(NPC, Spawn)
  167. local conversation = CreateConversation()
  168. AddConversationOption(conversation, "No problem.", "offer3")
  169. AddConversationOption(conversation, "Umm, I don't think so. ")
  170. StartConversation(conversation, NPC, Spawn, "Good, good! I need to get some goo from the risen protectors. Go pick me up some of that stuff an' I'll make it worth your while.")
  171. end
  172. function Option15(NPC, Spawn)
  173. SetStepComplete(Spawn, RiseAndShineWine, 2)
  174. FaceTarget(NPC, Spawn)
  175. local conversation = CreateConversation()
  176. AddConversationOption(conversation, "I am sure he is.")
  177. StartConversation(conversation, NPC, Spawn, "Great! This is just what I needed! I hope it wasn't too much trouble for you. Ha! I am sure you did fine. This will do rather nicely... Blarton is in for a treat!")
  178. end
  179. function Option16(NPC, Spawn)
  180. FaceTarget(NPC, Spawn)
  181. local conversation = CreateConversation()
  182. AddConversationOption(conversation, "I suppose.", "Option17")
  183. AddConversationOption(conversation, "I don't think so.")
  184. StartConversation(conversation, NPC, Spawn, "This is going to be the best bottle of Rise and Shine Wine yet! I've really outdone myself this time. Hey, you think you can help me out one last time? I could really use the help, and Aroof here can barely lift his ale, let alone do what I have in mind. ")
  185. end
  186. function Option17(NPC, Spawn)
  187. FaceTarget(NPC, Spawn)
  188. local conversation = CreateConversation()
  189. AddConversationOption(conversation, "Okay, so what do you want?", "Option18")
  190. AddConversationOption(conversation, "Never mind.")
  191. StartConversation(conversation, NPC, Spawn, "Blarton an' I go way back. I am looking to put a little excitement in his day. Go on over to Windstalker Village and give him this here wine. After he gets some of this stuff in him, he'll be up playing drinking games with me an' Aroof for the next three seasons! Ha!")
  192. end
  193. function Option18(NPC, Spawn)
  194. FaceTarget(NPC, Spawn)
  195. local conversation = CreateConversation()
  196. AddConversationOption(conversation, "I'll do it.", "offer4")
  197. AddConversationOption(conversation, "Not a chance.")
  198. StartConversation(conversation, NPC, Spawn, "Go find Blarton, and give him this drink. Don't just go over there and try to pour it down his throat either. You need to be delicate about it. Don't raise any suspicions. Blarton is not the smartest chap in the world, but if he thinks you're up to no good, it will spoil the whole prank. When you're done, come back here and let me know. Blarton will probably be here before you are if he drinks that stuff! Ha!")
  199. end
  200. function Option19(NPC, Spawn)
  201. SetStepComplete(Spawn, PracticalJokeOnBlarton, 2)
  202. FaceTarget(NPC, Spawn)
  203. local conversation = CreateConversation()
  204. AddConversationOption(conversation, "Yeah, I think I will be leaving then.")
  205. StartConversation(conversation, NPC, Spawn, "If only I could have seen the look on that Blarton's face when he took a drink of that wine! Great job! Thanks for your services. Now, unless you're going to grab us another ale, you can get out of here.")
  206. end
  207. function offer(NPC, Spawn)
  208. OfferQuest(NPC, Spawn, RunningOutOfBeer)
  209. end
  210. function offer2(NPC, Spawn)
  211. OfferQuest(NPC, Spawn, OuchMyHead)
  212. end
  213. function offer3(NPC, Spawn)
  214. OfferQuest(NPC, Spawn, RiseAndShineWine)
  215. end
  216. function offer4(NPC, Spawn)
  217. OfferQuest(NPC, Spawn, PracticalJokeOnBlarton)
  218. end
  219. function Quest_Completed(NPC, Spawn)
  220. FaceTarget(NPC, Spawn)
  221. local conversation = CreateConversation()
  222. AddConversationOption(conversation, "You're right, I don't think I want to be around for that.")
  223. StartConversation(conversation, NPC, Spawn, "Ha! Welcome back. Why don't you pull up a seat and share an ale with me 'n Aroof? Well, on second thought, Aroof here don't look so good. I'm not sure you're going to want to stay around much longer. You know what they say about barbarians and Teir’Dal wine.")
  224. end