HaddekVimki.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. SetPlayerProximityFunction(NPC, 10, "InRange", Spawn)
  14. end
  15. function InRange(NPC, Spawn)
  16. if not HasCompletedQuest(Spawn, RunningOutOfBeer) then
  17. ProvidesQuest(NPC, RunningOutOfBeer)
  18. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) then
  19. ProvidesQuest(NPC, OuchMyHead)
  20. SetInfoFlag(NPC)
  21. SetVisualFlag(NPC)
  22. elseif HasCompletedQuest(Spawn, OuchMyHead) then
  23. ProvidesQuest(NPC, RiseAndShineWine)
  24. SetInfoFlag(NPC)
  25. SetVisualFlag(NPC)
  26. elseif HasCompletedQuest(Spawn, RiseAndShineWine) then
  27. ProvidesQuest(NPC, PracticalJokeOnBlarton)
  28. SetInfoFlag(NPC)
  29. SetVisualFlag(NPC)
  30. end
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end
  35. function hailed(NPC, Spawn)
  36. local choice = MakeRandomInt(1, 4)
  37. if choice == 1 then
  38. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1060.mp3", "", "", 0, 0, Spawn)
  39. elseif choice == 2 then
  40. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1060.mp3", "", "", 0, 0, Spawn)
  41. elseif choice == 3 then
  42. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1060.mp3", "", "", 0, 0, Spawn)
  43. elseif choice == 4 then
  44. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0, Spawn)
  45. end
  46. FaceTarget(NPC, Spawn)
  47. local conversation = CreateConversation()
  48. if not HasQuest(Spawn, RunningOutOfBeer) and not HasCompletedQuest(Spawn, RunningOutOfBeer) then
  49. Option1(NPC, Spawn)
  50. 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
  51. 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)
  52. elseif GetQuestStep(Spawn, RunningOutOfBeer) == 2 then
  53. Option7(NPC, Spawn) -- BETWEEN QUEST-STEPS PROGRESS
  54. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) and not HasQuest(Spawn, OuchMyHead) and not HasCompletedQuest(Spawn, OuchMyHead) then
  55. Option8(NPC, Spawn)
  56. elseif GetQuestStep(Spawn, OuchMyHead) == 4 then
  57. Option10(NPC, Spawn)
  58. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) and HasCompletedQuest(Spawn, OuchMyHead) and not HasQuest(Spawn, RiseAndShineWine) and not HasCompletedQuest(Spawn, RiseAndShineWine) then
  59. Option11(NPC, Spawn)
  60. elseif GetQuestStep(Spawn, RiseAndShineWine) == 2 then
  61. Option15(NPC, Spawn)
  62. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) and HasCompletedQuest(Spawn, OuchMyHead) and HasCompletedQuest(Spawn, RiseAndShineWine) and not HasQuest(Spawn, PracticalJokeOnBlarton) and not HasCompletedQuest(Spawn, PracticalJokeOnBlarton) then
  63. Option16(NPC, Spawn)
  64. elseif GetQuestStep(Spawn, PracticalJokeOnBlarton) == 2 then
  65. Option19(NPC, Spawn)
  66. elseif HasCompletedQuest(Spawn, RunningOutOfBeer) and HasCompletedQuest(Spawn, OuchMyHead) and HasCompletedQuest(Spawn, RiseAndShineWine) and HasCompletedQuest(Spawn, PracticalJokeOnBlarton) then
  67. Quest_Completed(NPC, Spawn)
  68. end
  69. end
  70. function Option1(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. local conversation = CreateConversation()
  73. AddConversationOption(conversation, "Sure, what do you need from me?", "Option2")
  74. AddConversationOption(conversation, "Why don't you make yourself useful?!")
  75. 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?")
  76. end
  77. function Option2(NPC, Spawn)
  78. FaceTarget(NPC, Spawn)
  79. local conversation = CreateConversation()
  80. AddConversationOption(conversation, "I'm looking for some work.", "Option3")
  81. AddConversationOption(conversation, "I think I'll be going now.")
  82. 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? ")
  83. end
  84. function Option3(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. local conversation = CreateConversation()
  87. AddConversationOption(conversation, "And?", "Option4")
  88. AddConversationOption(conversation, "Okay, I have had enough. Bye.")
  89. 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.")
  90. end
  91. function Option4(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. local conversation = CreateConversation()
  94. AddConversationOption(conversation, "Okay. So?", "Option5")
  95. AddConversationOption(conversation, "Umm, never mind.")
  96. 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.")
  97. end
  98. function Option5(NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. local conversation = CreateConversation()
  101. AddConversationOption(conversation, "Okay, get on with it.", "Option6")
  102. AddConversationOption(conversation, "Uphill? I think I've heard this one.")
  103. 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.")
  104. end
  105. function Option6(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. local conversation = CreateConversation()
  108. AddConversationOption(conversation, "Sure, I will be right back", "offer")
  109. AddConversationOption(conversation, "No, it looks like you two have had enough.")
  110. 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.")
  111. end
  112. function Option7(NPC, Spawn)
  113. SetStepComplete(Spawn, RunningOutOfBeer, 2)
  114. FaceTarget(NPC, Spawn)
  115. local conversation = CreateConversation()
  116. AddConversationOption(conversation, "Great, thank you.")
  117. StartConversation(conversation, NPC, Spawn, "Ha! Great! Why don't you take this? It doesn't look like old Aroof will be needing it. Hmph!")
  118. end
  119. function Option8(NPC, Spawn)
  120. FaceTarget(NPC, Spawn)
  121. local conversation = CreateConversation()
  122. AddConversationOption(conversation, "Okay.", "Option9")
  123. AddConversationOption(conversation, "I think I have had enough.")
  124. 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.")
  125. end
  126. function Option9(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. local conversation = CreateConversation()
  129. AddConversationOption(conversation, "Okay. Go on.", "offer2")
  130. AddConversationOption(conversation, "On second thought, never mind.")
  131. 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.")
  132. end
  133. function Option10(NPC, Spawn)
  134. SetStepComplete(Spawn, OuchMyHead, 4)
  135. FaceTarget(NPC, Spawn)
  136. local conversation = CreateConversation()
  137. AddConversationOption(conversation, "Yeah, you do that.")
  138. 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.")
  139. end
  140. function Option11(NPC, Spawn)
  141. FaceTarget(NPC, Spawn)
  142. local conversation = CreateConversation()
  143. AddConversationOption(conversation, "Okay, back to what you were saying.", "Option12")
  144. AddConversationOption(conversation, "I was just thinking the same thing.")
  145. 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.")
  146. end
  147. function Option12(NPC, Spawn)
  148. FaceTarget(NPC, Spawn)
  149. local conversation = CreateConversation()
  150. AddConversationOption(conversation, "Sure, why not?", "Option13")
  151. AddConversationOption(conversation, "You're nuts!")
  152. 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.")
  153. end
  154. function Option13(NPC, Spawn)
  155. FaceTarget(NPC, Spawn)
  156. local conversation = CreateConversation()
  157. AddConversationOption(conversation, "Sure, I'll help you out. ", "Option14")
  158. AddConversationOption(conversation, "No, I don't think that's a good idea.")
  159. 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.")
  160. end
  161. function Option14(NPC, Spawn)
  162. FaceTarget(NPC, Spawn)
  163. local conversation = CreateConversation()
  164. AddConversationOption(conversation, "No problem.", "offer3")
  165. AddConversationOption(conversation, "Umm, I don't think so. ")
  166. 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.")
  167. end
  168. function Option15(NPC, Spawn)
  169. SetStepComplete(Spawn, RiseAndShineWine, 2)
  170. FaceTarget(NPC, Spawn)
  171. local conversation = CreateConversation()
  172. AddConversationOption(conversation, "I am sure he is.")
  173. 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!")
  174. end
  175. function Option16(NPC, Spawn)
  176. FaceTarget(NPC, Spawn)
  177. local conversation = CreateConversation()
  178. AddConversationOption(conversation, "I suppose.", "Option17")
  179. AddConversationOption(conversation, "I don't think so.")
  180. 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. ")
  181. end
  182. function Option17(NPC, Spawn)
  183. FaceTarget(NPC, Spawn)
  184. local conversation = CreateConversation()
  185. AddConversationOption(conversation, "Okay, so what do you want?", "Option18")
  186. AddConversationOption(conversation, "Never mind.")
  187. 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!")
  188. end
  189. function Option18(NPC, Spawn)
  190. FaceTarget(NPC, Spawn)
  191. local conversation = CreateConversation()
  192. AddConversationOption(conversation, "I'll do it.", "offer4")
  193. AddConversationOption(conversation, "Not a chance.")
  194. 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!")
  195. end
  196. function Option19(NPC, Spawn)
  197. SetStepComplete(Spawn, PracticalJokeOnBlarton, 2)
  198. FaceTarget(NPC, Spawn)
  199. local conversation = CreateConversation()
  200. AddConversationOption(conversation, "Yeah, I think I will be leaving then.")
  201. 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.")
  202. end
  203. function offer(NPC, Spawn)
  204. OfferQuest(NPC, Spawn, RunningOutOfBeer)
  205. end
  206. function offer2(NPC, Spawn)
  207. OfferQuest(NPC, Spawn, OuchMyHead)
  208. end
  209. function offer3(NPC, Spawn)
  210. OfferQuest(NPC, Spawn, RiseAndShineWine)
  211. end
  212. function offer4(NPC, Spawn)
  213. OfferQuest(NPC, Spawn, PracticalJokeOnBlarton)
  214. end
  215. function Quest_Completed(NPC, Spawn)
  216. FaceTarget(NPC, Spawn)
  217. local conversation = CreateConversation()
  218. AddConversationOption(conversation, "You're right, I don't think I want to be around for that.")
  219. 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.")
  220. end