9
3

RondoTheBellyRoundstew.lua 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  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. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  26. end
  27. function respawn(NPC)
  28. spawn(NPC)
  29. end
  30. function hailed(NPC, Spawn)
  31. GenericHail(NPC, Spawn)
  32. if GetRace(Spawn) == Halfling then
  33. Begin(NPC, Spawn)
  34. else
  35. NotHalfling(NPC, Spawn)
  36. end
  37. end
  38. function InRange(NPC, Spawn)
  39. if not HasCompletedQuest (Spawn, HELPING_A_FRIEND) and not HasQuest (Spawn, HELPING_A_FRIEND) and GetRace(Spawn) == 7 then
  40. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  41. elseif HasCompletedQuest (Spawn, HELPING_A_FRIEND) then
  42. if math.random(1, 100) <= 75 then
  43. choice = math.random(1,3)
  44. FaceTarget(NPC, Spawn)
  45. if choice ==1 then
  46. PlayFlavor(NPC, "", "", "chuckle", 0, 0, Spawn)
  47. elseif choice ==2 then
  48. PlayFlavor(NPC, "", "", "wink", 0, 0, Spawn)
  49. else
  50. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  51. end
  52. else
  53. end
  54. end
  55. end
  56. function NotHalfling(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. 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)
  59. end
  60. function Begin(NPC, Spawn)
  61. FaceTarget(NPC, Spawn)
  62. conversation = CreateConversation()
  63. if HasCompletedQuest(Spawn, HELPING_A_FRIEND) then
  64. if HasCompletedQuest(Spawn, HELPING_A_FRIEND_AGAIN) then
  65. if HasCompletedQuest(Spawn, HELPING_SOME_FRIENDS) then
  66. if HasCompletedQuest(Spawn, PAYING_OFF_A_SWEET_DEBT) then
  67. if HasCompletedQuest(Spawn, A_BUDDING_PRANKSTER) then
  68. TalkedToRemmyYet(NPC, Spawn, conversation)
  69. elseif HasQuest(Spawn, A_BUDDING_PRANKSTER) then
  70. TalkedToRemmyYet(NPC, Spawn, conversation)
  71. else
  72. DoYouHaveTheHoney(NPC, Spawn, conversation)
  73. end
  74. elseif HasQuest(Spawn, PAYING_OFF_A_SWEET_DEBT) then
  75. DoYouHaveTheHoney(NPC, Spawn, conversation)
  76. else
  77. DidTheySuspectAnything(NPC, Spawn, conversation)
  78. end
  79. elseif HasQuest(Spawn, HELPING_SOME_FRIENDS) then
  80. if GetQuestStep(Spawn, HELPING_SOME_FRIENDS) == 1 then
  81. Yes(NPC, Spawn, conversation)
  82. else
  83. DidTheySuspectAnything(NPC, Spawn, conversation)
  84. end
  85. else
  86. DidFlowersWork(NPC, Spawn, conversation)
  87. end
  88. elseif HasQuest(Spawn, HELPING_A_FRIEND_AGAIN) then
  89. DidFlowersWork(NPC, Spawn, conversation)
  90. else
  91. HowIsMaela(NPC, Spawn, conversation)
  92. end
  93. elseif HasQuest(Spawn, HELPING_A_FRIEND) then
  94. HowIsMaela(NPC, Spawn, conversation)
  95. else
  96. HelloFriend(NPC, Spawn, conversation)
  97. end
  98. end
  99. ---------------------------------------------------------------------------------
  100. -- QUEST 1
  101. ---------------------------------------------------------------------------------
  102. function HelloFriend(NPC, Spawn, conversation)
  103. AddConversationOption(conversation, "We're friends already?", "dlg_2_1")
  104. AddConversationOption(conversation, "Hello and goodbye, friendliest friend.")
  105. StartConversation(conversation, NPC, Spawn, "Hello there, friendly friend.")
  106. end
  107. function dlg_2_1(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. conversation = CreateConversation()
  110. AddConversationOption(conversation, "Oh, definitely.", "ThatsRightWeDo")
  111. AddConversationOption(conversation, "Sure, I suppose.", "ThatsRightWeDo")
  112. 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?")
  113. end
  114. function ThatsRightWeDo(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. conversation = CreateConversation()
  117. AddConversationOption(conversation, "What can I do to help?", "dlg_4_3")
  118. 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.")
  119. end
  120. function dlg_4_3(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. conversation = CreateConversation()
  123. AddConversationOption(conversation, "I will try to help her.", "OfferQuest1")
  124. 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.")
  125. end
  126. function OfferQuest1(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. OfferQuest(NPC, Spawn, HELPING_A_FRIEND)
  129. end
  130. function HowIsMaela(NPC, Spawn, conversation)
  131. 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
  132. AddConversationOption(conversation, "She seems perfectly fine. She didn't want to open up at all.", "dlg_7_1")
  133. end
  134. AddConversationOption(conversation, "I do not know yet.")
  135. StartConversation(conversation, NPC, Spawn, "How is Maela?")
  136. end
  137. function dlg_7_1(NPC, Spawn)
  138. if HasQuest(Spawn, HELPING_A_FRIEND) then
  139. SetStepComplete(Spawn, HELPING_A_FRIEND, 2)
  140. end
  141. FaceTarget(NPC, Spawn)
  142. conversation = CreateConversation()
  143. AddConversationOption(conversation, "All right.", "OfferQuest2")
  144. 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.")
  145. end
  146. ----------------------------------------------------------------------------------------------
  147. -- QUEST 2
  148. ----------------------------------------------------------------------------------------------
  149. function OfferQuest2(NPC, Spawn)
  150. FaceTarget(NPC, Spawn)
  151. OfferQuest(NPC, Spawn, HELPING_A_FRIEND_AGAIN)
  152. end
  153. function DidFlowersWork(NPC, Spawn, conversation)
  154. 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
  155. AddConversationOption(conversation, "Yes, I think she is doing well.", "dlg_15_1")
  156. end
  157. AddConversationOption(conversation, "I'm not sure yet.")
  158. StartConversation(conversation, NPC, Spawn, "Did the flowers work?")
  159. end
  160. function dlg_15_1(NPC, Spawn)
  161. FaceTarget(NPC, Spawn)
  162. conversation = CreateConversation()
  163. 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")
  164. StartConversation(conversation, NPC, Spawn, "Oh?")
  165. end
  166. function dlg_15_2(NPC, Spawn)
  167. if HasQuest(Spawn, HELPING_A_FRIEND_AGAIN) then
  168. SetStepComplete(Spawn, HELPING_A_FRIEND_AGAIN, 3)
  169. end
  170. FaceTarget(NPC, Spawn)
  171. conversation = CreateConversation()
  172. AddConversationOption(conversation, "Yes, it does.", "dlg_15_3")
  173. 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?")
  174. end
  175. -----------------------------------------------------------------------------------------
  176. -- QUEST 3
  177. ------------------------------------------------------------------------------------------
  178. function dlg_15_3(NPC, Spawn)
  179. FaceTarget(NPC, Spawn)
  180. conversation = CreateConversation()
  181. AddConversationOption(conversation, "What do you mean?", "dlg_15_4")
  182. StartConversation(conversation, NPC, Spawn, "I was hoping you would say that. You know there are many, many ways to help people, right?")
  183. end
  184. function dlg_15_4(NPC, Spawn)
  185. FaceTarget(NPC, Spawn)
  186. conversation = CreateConversation()
  187. AddConversationOption(conversation, "What are you saying, exactly?", "dlg_15_5")
  188. 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.")
  189. end
  190. function dlg_15_5(NPC, Spawn)
  191. FaceTarget(NPC, Spawn)
  192. conversation = CreateConversation()
  193. AddConversationOption(conversation, "What reputation?", "dlg_15_6")
  194. AddConversationOption(conversation, "Bristlebane?", "dlg_16_6")
  195. 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.")
  196. end
  197. function dlg_15_6(NPC, Spawn)
  198. FaceTarget(NPC, Spawn)
  199. conversation = CreateConversation()
  200. AddConversationOption(conversation, "Well, all right.", "OfferQuest3")
  201. 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?")
  202. end
  203. function dlg_16_6(NPC, Spawn)
  204. FaceTarget(NPC, Spawn)
  205. conversation = CreateConversation()
  206. AddConversationOption(conversation, "What reputation?", "dlg_15_6")
  207. 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?")
  208. end
  209. function OfferQuest3(NPC, Spawn)
  210. FaceTarget(NPC, Spawn)
  211. OfferQuest(NPC, Spawn, HELPING_SOME_FRIENDS)
  212. end
  213. function GiveMeKit(NPC, Spawn)
  214. FaceTarget(NPC, Spawn)
  215. conversation = CreateConversation()
  216. -- Prank Preparedness Kit
  217. if not HasItem(Spawn, PRANK_PREPAREDNESS_KIT, 1) then
  218. SummonItem(Spawn, PRANK_PREPAREDNESS_KIT, 1)
  219. end
  220. AddConversationOption(conversation, "Thanks!")
  221. StartConversation(conversation, NPC, Spawn, "Here you go. Good luck!")
  222. end
  223. function Yes(NPC, Spawn, conversation)
  224. AddConversationOption(conversation, "I need the Prank Preparedness Kit.", "dlg_17_1")
  225. StartConversation(conversation, NPC, Spawn, "Yes?")
  226. end
  227. function dlg_17_1(NPC, Spawn)
  228. FaceTarget(NPC, Spawn)
  229. conversation = CreateConversation()
  230. -- Prank Preparedness Kit
  231. if HasItem(Spawn, PRANK_PREPAREDNESS_KIT, 1) then
  232. AddConversationOption(conversation, "Thanks!")
  233. 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.")
  234. else
  235. SummonItem(Spawn, PRANK_PREPAREDNESS_KIT, 1)
  236. AddConversationOption(conversation, "Thanks!")
  237. StartConversation(conversation, NPC, Spawn, "Here you go. Good luck!")
  238. end
  239. end
  240. function DidTheySuspectAnything(NPC, Spawn, conversation)
  241. 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
  242. AddConversationOption(conversation, "I don't think anyone suspected anything.", "dlg_22_1")
  243. end
  244. AddConversationOption(conversation, "I'm not done yet.")
  245. StartConversation(conversation, NPC, Spawn, "Well? How did it go? Did they suspect anything?")
  246. end
  247. function dlg_22_1(NPC, Spawn)
  248. if HasQuest(Spawn, HELPING_SOME_FRIENDS) then
  249. SetStepComplete(Spawn, HELPING_SOME_FRIENDS, 5)
  250. end
  251. FaceTarget(NPC, Spawn)
  252. conversation = CreateConversation()
  253. AddConversationOption(conversation, "That didn't seem very expensive.", "dlg_22_2")
  254. 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.")
  255. end
  256. -------------------------------------------------------------------------------------------------------------
  257. -- QUEST 4
  258. -------------------------------------------------------------------------------------------------------------
  259. function dlg_22_2(NPC, Spawn)
  260. FaceTarget(NPC, Spawn)
  261. conversation = CreateConversation()
  262. AddConversationOption(conversation, "Is that some kind of threat?", "dlg_22_3")
  263. 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.")
  264. end
  265. function dlg_22_3(NPC, Spawn)
  266. FaceTarget(NPC, Spawn)
  267. conversation = CreateConversation()
  268. AddConversationOption(conversation, "What do you need?", "dlg_22_4")
  269. StartConversation(conversation, NPC, Spawn, "No, of course not. But I really would appreciate some help. What do you say?")
  270. end
  271. function dlg_22_4(NPC, Spawn)
  272. FaceTarget(NPC, Spawn)
  273. conversation = CreateConversation()
  274. AddConversationOption(conversation, "I can help. Which trees will have honey?", "OfferQuest4")
  275. 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.")
  276. end
  277. function OfferQuest4(NPC, Spawn)
  278. FaceTarget(NPC, Spawn)
  279. OfferQuest(NPC, Spawn, PAYING_OFF_A_SWEET_DEBT)
  280. end
  281. function DoYouHaveTheHoney(NPC, Spawn, conversation)
  282. 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
  283. AddConversationOption(conversation, "Yes I do.", "dlg_24_1")
  284. end
  285. AddConversationOption(conversation, "Not yet.")
  286. StartConversation(conversation, NPC, Spawn, "Do you have the honey?")
  287. end
  288. function dlg_24_1(NPC, Spawn)
  289. if HasQuest(Spawn, PAYING_OFF_A_SWEET_DEBT) then
  290. SetStepComplete(Spawn, PAYING_OFF_A_SWEET_DEBT, 2)
  291. end
  292. FaceTarget(NPC, Spawn)
  293. conversation = CreateConversation()
  294. AddConversationOption(conversation, "Sure, what do I need to do?", "dlg_24_2")
  295. AddConversationOption(conversation, "No, but thanks.")
  296. 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?")
  297. end
  298. ----------------------------------------------------------------------------------------
  299. -- QUEST 5
  300. ----------------------------------------------------------------------------------------
  301. function dlg_24_2(NPC, Spawn)
  302. FaceTarget(NPC, Spawn)
  303. conversation = CreateConversation()
  304. AddConversationOption(conversation, "Ok!", "OfferQuest5")
  305. 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.")
  306. end
  307. function OfferQuest5(NPC, Spawn)
  308. FaceTarget(NPC, Spawn)
  309. OfferQuest(NPC, Spawn, A_BUDDING_PRANKSTER)
  310. end
  311. function TalkedToRemmyYet(NPC, Spawn, conversation)
  312. if HasCompletedQuest(Spawn, A_BUDDING_PRANKSTER) then
  313. AddConversationOption(conversation, "Yeah, I did.", "HowDidPrankGo")
  314. end
  315. AddConversationOption(conversation, "I haven't spoken to him yet.")
  316. StartConversation(conversation, NPC, Spawn, "Have you talked to Remmy yet?")
  317. end
  318. function HowDidPrankGo(NPC, Spawn)
  319. FaceTarget(NPC, Spawn)
  320. conversation = CreateConversation()
  321. AddConversationOption(conversation, "He fell for it big time.", "HahaThatsGreat")
  322. StartConversation(conversation, NPC, Spawn, "How did the prank go?")
  323. end
  324. function HahaThatsGreat(NPC, Spawn)
  325. FaceTarget(NPC, Spawn)
  326. conversation = CreateConversation()
  327. AddConversationOption(conversation, "It was great!")
  328. AddConversationOption(conversation, "It was much more fun than I thought it was going to be.")
  329. AddConversationOption(conversation, "It was okay.")
  330. AddConversationOption(conversation, "It wasn't that exciting.")
  331. 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!")
  332. end