9
3

RondoTheBellyRoundstew.lua 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. --[[
  2. Script Name : SpawnScripts/Baubbleshire/RondoTheBellyRoundstew.lua
  3. Script Purpose : Rondo "The Belly" Roundstew <Halfling Mentor>
  4. Script Author : Scatman
  5. Script Date : 2009.09.27
  6. Script Notes :
  7. --]]
  8. -- Race ID's
  9. local Halfling = 7
  10. -- Quest ID's
  11. local HELPING_A_FRIEND = 323 -- was 70
  12. local HELPING_A_FRIEND_AGAIN = 324 -- was 71
  13. local HELPING_SOME_FRIENDS = 325 -- was 72
  14. local PAYING_OFF_A_SWEET_DEBT = 326 -- was 73
  15. local A_BUDDING_PRANKSTER = 327 -- was 74
  16. -- Item ID's
  17. local PRANK_PREPAREDNESS_KIT = 10574
  18. dofile("SpawnScripts/Generic/GenericVoiceOvers.lua")
  19. function spawn(NPC)
  20. ProvidesQuest(NPC, HELPING_A_FRIEND)
  21. ProvidesQuest(NPC, HELPING_A_FRIEND_AGAIN)
  22. ProvidesQuest(NPC, HELPING_SOME_FRIENDS)
  23. ProvidesQuest(NPC, PAYING_OFF_A_SWEET_DEBT)
  24. ProvidesQuest(NPC, A_BUDDING_PRANKSTER)
  25. end
  26. function respawn(NPC)
  27. spawn(NPC)
  28. end
  29. function hailed(NPC, Spawn)
  30. GenericHail(NPC, Spawn)
  31. if GetRace(Spawn) == Halfling then
  32. Begin(NPC, Spawn)
  33. else
  34. NotHalfling(NPC, Spawn)
  35. end
  36. end
  37. function NotHalfling(NPC, Spawn)
  38. FaceTarget(NPC, Spawn)
  39. Say(NPC, "Well hello there. I'd love to help you, but I'm currently busy with folk of a short, round nature. My apologies.", Spawn)
  40. end
  41. function Begin(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. conversation = CreateConversation()
  44. if HasCompletedQuest(Spawn, HELPING_A_FRIEND) then
  45. if HasCompletedQuest(Spawn, HELPING_A_FRIEND_AGAIN) then
  46. if HasCompletedQuest(Spawn, HELPING_SOME_FRIENDS) then
  47. if HasCompletedQuest(Spawn, PAYING_OFF_A_SWEET_DEBT) then
  48. if HasCompletedQuest(Spawn, A_BUDDING_PRANKSTER) then
  49. TalkedToRemmyYet(NPC, Spawn, conversation)
  50. elseif HasQuest(Spawn, A_BUDDING_PRANKSTER) then
  51. TalkedToRemmyYet(NPC, Spawn, conversation)
  52. else
  53. DoYouHaveTheHoney(NPC, Spawn, conversation)
  54. end
  55. elseif HasQuest(Spawn, PAYING_OFF_A_SWEET_DEBT) then
  56. DoYouHaveTheHoney(NPC, Spawn, conversation)
  57. else
  58. DidTheySuspectAnything(NPC, Spawn, conversation)
  59. end
  60. elseif HasQuest(Spawn, HELPING_SOME_FRIENDS) then
  61. if GetQuestStep(Spawn, HELPING_SOME_FRIENDS) == 1 then
  62. Yes(NPC, Spawn, conversation)
  63. else
  64. DidTheySuspectAnything(NPC, Spawn, conversation)
  65. end
  66. else
  67. DidFlowersWork(NPC, Spawn, conversation)
  68. end
  69. elseif HasQuest(Spawn, HELPING_A_FRIEND_AGAIN) then
  70. DidFlowersWork(NPC, Spawn, conversation)
  71. else
  72. HowIsMaela(NPC, Spawn, conversation)
  73. end
  74. elseif HasQuest(Spawn, HELPING_A_FRIEND) then
  75. HowIsMaela(NPC, Spawn, conversation)
  76. else
  77. HelloFriend(NPC, Spawn, conversation)
  78. end
  79. end
  80. ---------------------------------------------------------------------------------
  81. -- QUEST 1
  82. ---------------------------------------------------------------------------------
  83. function HelloFriend(NPC, Spawn, conversation)
  84. AddConversationOption(conversation, "We're friends already?", "dlg_2_1")
  85. AddConversationOption(conversation, "Hello and goodbye, friendliest friend.")
  86. StartConversation(conversation, NPC, Spawn, "Hello there, friendly friend.")
  87. end
  88. function dlg_2_1(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. AddConversationOption(conversation, "Oh, definitely.", "ThatsRightWeDo")
  92. AddConversationOption(conversation, "Sure, I suppose.", "ThatsRightWeDo")
  93. StartConversation(conversation, NPC, Spawn, "Of course we are! You just offered to buy me a pint if I'm not mistaken, hah! You're the friendly sort, I can tell. And so am I! Perfectly matched to be pals, I'd say. Halflings like us need to stick together, wouldn't you say?")
  94. end
  95. function ThatsRightWeDo(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. conversation = CreateConversation()
  98. AddConversationOption(conversation, "What can I do to help?", "dlg_4_3")
  99. StartConversation(conversation, NPC, Spawn, "That's right we do! I'm glad you agree, it's better when we all agree. We've lost so much. Needless arguments and anger and pain and sadness only upset what otherwise could be a fun situation! Sure, we all try to live by this philosophy but for some of us it's tougher than others.")
  100. end
  101. function dlg_4_3(NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. conversation = CreateConversation()
  104. AddConversationOption(conversation, "I will try to help her.", "OfferQuest1")
  105. StartConversation(conversation, NPC, Spawn, "To start you can find my friend Maela. The poor lass has been emotional support for myself--and countless other halflings--more times than I can count. The thing is, I don't think anyone's ever taken the time to listen to her problems. I think she would feel bad about asking, and whenever I try to help she backs away. She needs an outlet.")
  106. end
  107. function OfferQuest1(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. OfferQuest(NPC, Spawn, HELPING_A_FRIEND)
  110. end
  111. function HowIsMaela(NPC, Spawn, conversation)
  112. if (HasCompletedQuest(Spawn, HELPING_A_FRIEND) and not HasCompletedQuest(Spawn, HELPING_A_FRIEND_AGAIN)) or (HasQuest(Spawn, HELPING_A_FRIEND) and GetQuestStep(Spawn, HELPING_A_FRIEND) == 2) then
  113. AddConversationOption(conversation, "She seems perfectly fine. She didn't want to open up at all.", "dlg_7_1")
  114. end
  115. AddConversationOption(conversation, "I do not know yet.")
  116. StartConversation(conversation, NPC, Spawn, "How is Maela?")
  117. end
  118. function dlg_7_1(NPC, Spawn)
  119. if HasQuest(Spawn, HELPING_A_FRIEND) then
  120. SetStepComplete(Spawn, HELPING_A_FRIEND, 2)
  121. end
  122. FaceTarget(NPC, Spawn)
  123. conversation = CreateConversation()
  124. AddConversationOption(conversation, "All right.", "OfferQuest2")
  125. StartConversation(conversation, NPC, Spawn, "That sounds just like her. I hate to have to do this to her, but she's helped me too much for me to ignore her. Around the Baubbleshire you'll find some Misty Thicket Shadebloom flowers. Pick a bouquet for her, I have a feeling that will get her to open up some.")
  126. end
  127. ----------------------------------------------------------------------------------------------
  128. -- QUEST 2
  129. ----------------------------------------------------------------------------------------------
  130. function OfferQuest2(NPC, Spawn)
  131. FaceTarget(NPC, Spawn)
  132. OfferQuest(NPC, Spawn, HELPING_A_FRIEND_AGAIN)
  133. end
  134. function DidFlowersWork(NPC, Spawn, conversation)
  135. if (HasCompletedQuest(Spawn, HELPING_A_FRIEND_AGAIN) and not HasCompletedQuest(Spawn, HELPING_SOME_FRIENDS)) or (HasQuest(Spawn, HELPING_A_FRIEND_AGAIN) and GetQuestStep(Spawn, HELPING_A_FRIEND_AGAIN) == 3) then
  136. AddConversationOption(conversation, "Yes, I think she is doing well.", "dlg_15_1")
  137. end
  138. AddConversationOption(conversation, "I'm not sure yet.")
  139. StartConversation(conversation, NPC, Spawn, "Did the flowers work?")
  140. end
  141. function dlg_15_1(NPC, Spawn)
  142. FaceTarget(NPC, Spawn)
  143. conversation = CreateConversation()
  144. AddConversationOption(conversation, "She told me about her husband and the Shadebloom. I think it helped her a lot to finally share with someone, and I think she'll work on sharing more in the future. How did you know about the Shadebloom?", "dlg_15_2")
  145. StartConversation(conversation, NPC, Spawn, "Oh?")
  146. end
  147. function dlg_15_2(NPC, Spawn)
  148. if HasQuest(Spawn, HELPING_A_FRIEND_AGAIN) then
  149. SetStepComplete(Spawn, HELPING_A_FRIEND_AGAIN, 3)
  150. end
  151. FaceTarget(NPC, Spawn)
  152. conversation = CreateConversation()
  153. AddConversationOption(conversation, "Yes, it does.", "dlg_15_3")
  154. StartConversation(conversation, NPC, Spawn, "Maela is my friend. I've seen her reaction to those flowers change in the recent weeks. It doesn't take a magician to figure out her husband's absence has gotten to her, but until she admitted it was bothering her there wasn't much we could do to help her. Now that she's admitted it, I'm sure she'll get as much support as she needs. It feels good to help people, doesn't it?")
  155. end
  156. -----------------------------------------------------------------------------------------
  157. -- QUEST 3
  158. ------------------------------------------------------------------------------------------
  159. function dlg_15_3(NPC, Spawn)
  160. FaceTarget(NPC, Spawn)
  161. conversation = CreateConversation()
  162. AddConversationOption(conversation, "What do you mean?", "dlg_15_4")
  163. StartConversation(conversation, NPC, Spawn, "I was hoping you would say that. You know there are many, many ways to help people, right?")
  164. end
  165. function dlg_15_4(NPC, Spawn)
  166. FaceTarget(NPC, Spawn)
  167. conversation = CreateConversation()
  168. AddConversationOption(conversation, "What are you saying, exactly?", "dlg_15_5")
  169. StartConversation(conversation, NPC, Spawn, "Well, one thing I love to do is help. Another thing I love to do is joke around and play pranks. And, as luck would have it, playing pranks on people is a good way to let them know someone is paying attention to them. It's therapy, really, I think. Now, I would never think of playing a prank on Maela, she's far too sweet for that. But other halflings don't have the benefit of her disposition, and that makes them targets.")
  170. end
  171. function dlg_15_5(NPC, Spawn)
  172. FaceTarget(NPC, Spawn)
  173. conversation = CreateConversation()
  174. AddConversationOption(conversation, "What reputation?", "dlg_15_6")
  175. AddConversationOption(conversation, "Bristlebane?", "dlg_16_6")
  176. StartConversation(conversation, NPC, Spawn, "I'm talking about Bristlebane's Gift, his gift to US. The capacity to learn and grow and laugh and laugh from pranks! Pulling them, having them pulled on us, the benefit of Bristlebane is astounding on the halfling soul. And, I need someone to help me pull off my pranks due to my, eh, reputation.")
  177. end
  178. function dlg_15_6(NPC, Spawn)
  179. FaceTarget(NPC, Spawn)
  180. conversation = CreateConversation()
  181. AddConversationOption(conversation, "Well, all right.", "OfferQuest3")
  182. StartConversation(conversation, NPC, Spawn, "Never mind that, for now. Listen, I've got everything prepared, all I need is a little help from you. It shouldn't take too long, and should prove to be immensely hilarious! What do you say?")
  183. end
  184. function dlg_16_6(NPC, Spawn)
  185. FaceTarget(NPC, Spawn)
  186. conversation = CreateConversation()
  187. AddConversationOption(conversation, "What reputation?", "dlg_15_6")
  188. StartConversation(conversation, NPC, Spawn, "Bristlebane? Bristlebane? He's inside you right now and you don't even know it. He is of course the god of healing, love and kindness. Or, rather, the god of achieving those things through well-timed pranks. A halfling who doesn't know Bristlebane is, well, is like a flower without petals, or a pie without filling. Trust me, the more you get to know him the more you'll get to like him. Now, what do you say about helping me sidestep my reputation?")
  189. end
  190. function OfferQuest3(NPC, Spawn)
  191. FaceTarget(NPC, Spawn)
  192. OfferQuest(NPC, Spawn, HELPING_SOME_FRIENDS)
  193. end
  194. function GiveMeKit(NPC, Spawn)
  195. FaceTarget(NPC, Spawn)
  196. conversation = CreateConversation()
  197. -- Prank Preparedness Kit
  198. if not HasItem(Spawn, PRANK_PREPAREDNESS_KIT, 1) then
  199. SummonItem(Spawn, PRANK_PREPAREDNESS_KIT, 1)
  200. end
  201. AddConversationOption(conversation, "Thanks!")
  202. StartConversation(conversation, NPC, Spawn, "Here you go. Good luck!")
  203. end
  204. function Yes(NPC, Spawn, conversation)
  205. AddConversationOption(conversation, "I need the Prank Preparedness Kit.", "dlg_17_1")
  206. StartConversation(conversation, NPC, Spawn, "Yes?")
  207. end
  208. function dlg_17_1(NPC, Spawn)
  209. FaceTarget(NPC, Spawn)
  210. conversation = CreateConversation()
  211. -- Prank Preparedness Kit
  212. if HasItem(Spawn, PRANK_PREPAREDNESS_KIT, 1) then
  213. AddConversationOption(conversation, "Thanks!")
  214. StartConversation(conversation, NPC, Spawn, "It looks like you already have one. You need to examine it, it's in one of your bags or backpacks somewhere.")
  215. else
  216. SummonItem(Spawn, PRANK_PREPAREDNESS_KIT, 1)
  217. AddConversationOption(conversation, "Thanks!")
  218. StartConversation(conversation, NPC, Spawn, "Here you go. Good luck!")
  219. end
  220. end
  221. function DidTheySuspectAnything(NPC, Spawn, conversation)
  222. if (HasCompletedQuest(Spawn, HELPING_SOME_FRIENDS) and not HasCompletedQuest(Spawn, PAYING_OFF_A_SWEET_DEBT)) or (HasQuest(Spawn, HELPING_SOME_FRIENDS) and GetQuestStep(Spawn, HELPING_SOME_FRIENDS) == 5) then
  223. AddConversationOption(conversation, "I don't think anyone suspected anything.", "dlg_22_1")
  224. end
  225. AddConversationOption(conversation, "I'm not done yet.")
  226. StartConversation(conversation, NPC, Spawn, "Well? How did it go? Did they suspect anything?")
  227. end
  228. function dlg_22_1(NPC, Spawn)
  229. if HasQuest(Spawn, HELPING_SOME_FRIENDS) then
  230. SetStepComplete(Spawn, HELPING_SOME_FRIENDS, 5)
  231. end
  232. FaceTarget(NPC, Spawn)
  233. conversation = CreateConversation()
  234. AddConversationOption(conversation, "That didn't seem very expensive.", "dlg_22_2")
  235. StartConversation(conversation, NPC, Spawn, "Wonderful! I can't wait until I next talk to them. That's really the best part, you know. When you tell someone about something that they know you shouldn't know. The look on their face when they realize you must've had some part in their prank is, well, priceless. Ah, I couldn't live life any other way. I just wish pranking wasn't so expensive.")
  236. end
  237. -------------------------------------------------------------------------------------------------------------
  238. -- QUEST 4
  239. -------------------------------------------------------------------------------------------------------------
  240. function dlg_22_2(NPC, Spawn)
  241. FaceTarget(NPC, Spawn)
  242. conversation = CreateConversation()
  243. AddConversationOption(conversation, "Is that some kind of threat?", "dlg_22_3")
  244. StartConversation(conversation, NPC, Spawn, "I'm a halfling of modest means. I had to call in a number of favors in order to get everything together for that series of pranks. Say, you're just as indictable as I am in this incident, you really should help me pay off some of this debt.")
  245. end
  246. function dlg_22_3(NPC, Spawn)
  247. FaceTarget(NPC, Spawn)
  248. conversation = CreateConversation()
  249. AddConversationOption(conversation, "What do you need?", "dlg_22_4")
  250. StartConversation(conversation, NPC, Spawn, "No, of course not. But I really would appreciate some help. What do you say?")
  251. end
  252. function dlg_22_4(NPC, Spawn)
  253. FaceTarget(NPC, Spawn)
  254. conversation = CreateConversation()
  255. AddConversationOption(conversation, "I can help. Which trees will have honey?", "OfferQuest4")
  256. StartConversation(conversation, NPC, Spawn, "I used up some favors--and then some--to get those pies just perfect. I owe a chef friend of mine now, and I don't like owing people. I think I know the perfect way to pay her back though. If you could collect some honey from the trees around the Baubbleshire I'm sure that would be a perfect way to pay her back.")
  257. end
  258. function OfferQuest4(NPC, Spawn)
  259. FaceTarget(NPC, Spawn)
  260. OfferQuest(NPC, Spawn, PAYING_OFF_A_SWEET_DEBT)
  261. end
  262. function DoYouHaveTheHoney(NPC, Spawn, conversation)
  263. if (HasCompletedQuest(Spawn, PAYING_OFF_A_SWEET_DEBT) and not HasCompletedQuest(Spawn, A_BUDDING_PRANKSTER)) or (HasQuest(Spawn, PAYING_OFF_A_SWEET_DEBT) and GetQuestStep(Spawn, PAYING_OFF_A_SWEET_DEBT) == 2) then
  264. AddConversationOption(conversation, "Yes I do.", "dlg_24_1")
  265. end
  266. AddConversationOption(conversation, "Not yet.")
  267. StartConversation(conversation, NPC, Spawn, "Do you have the honey?")
  268. end
  269. function dlg_24_1(NPC, Spawn)
  270. if HasQuest(Spawn, PAYING_OFF_A_SWEET_DEBT) then
  271. SetStepComplete(Spawn, PAYING_OFF_A_SWEET_DEBT, 2)
  272. end
  273. FaceTarget(NPC, Spawn)
  274. conversation = CreateConversation()
  275. AddConversationOption(conversation, "Sure, what do I need to do?", "dlg_24_2")
  276. AddConversationOption(conversation, "No, but thanks.")
  277. StartConversation(conversation, NPC, Spawn, "Ah, wonderful. You're really a big help, you know that? Listen, I've got an idea of how I can pay you back. How would you like to pull a prank of your own?")
  278. end
  279. ----------------------------------------------------------------------------------------
  280. -- QUEST 5
  281. ----------------------------------------------------------------------------------------
  282. function dlg_24_2(NPC, Spawn)
  283. FaceTarget(NPC, Spawn)
  284. conversation = CreateConversation()
  285. AddConversationOption(conversation, "Ok!", "OfferQuest5")
  286. StartConversation(conversation, NPC, Spawn, "My friend Remmy is out in the Forest Ruins. He's currently in a small bind with the law, so he's in hiding. It's nothing serious, of course, but it involves a few stolen pies and he doesn't quite have the funds saved up to pay the charges. This is a simple prank but I think it'll be worth it. Just go up to him, act like a Qeynos guard, and call him 'Pie Man Sam.' I'm sure he'll get a huge kick out of it.")
  287. end
  288. function OfferQuest5(NPC, Spawn)
  289. FaceTarget(NPC, Spawn)
  290. OfferQuest(NPC, Spawn, A_BUDDING_PRANKSTER)
  291. end
  292. function TalkedToRemmyYet(NPC, Spawn, conversation)
  293. if HasCompletedQuest(Spawn, A_BUDDING_PRANKSTER) then
  294. AddConversationOption(conversation, "Yeah, I did.", "HowDidPrankGo")
  295. end
  296. AddConversationOption(conversation, "I haven't spoken to him yet.")
  297. StartConversation(conversation, NPC, Spawn, "Have you talked to Remmy yet?")
  298. end
  299. function HowDidPrankGo(NPC, Spawn)
  300. FaceTarget(NPC, Spawn)
  301. conversation = CreateConversation()
  302. AddConversationOption(conversation, "He fell for it big time.", "HahaThatsGreat")
  303. StartConversation(conversation, NPC, Spawn, "How did the prank go?")
  304. end
  305. function HahaThatsGreat(NPC, Spawn)
  306. FaceTarget(NPC, Spawn)
  307. conversation = CreateConversation()
  308. AddConversationOption(conversation, "It was great!")
  309. AddConversationOption(conversation, "It was much more fun than I thought it was going to be.")
  310. AddConversationOption(conversation, "It was okay.")
  311. AddConversationOption(conversation, "It wasn't that exciting.")
  312. StartConversation(conversation, NPC, Spawn, "Ha hah! That's great! I can't wait until I talk to him next, he's going to deny this ever happened, it's going to be great to rub his face in it. I hope you enjoyed pulling the prank!")
  313. end