BupipaGuryup.lua 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. --[[
  2. Script Name : SpawnScripts/Castleview/BupipaGuryup.lua
  3. Script Purpose : Bupipa Guryup
  4. Script Author : Dorbin
  5. Script Date : 2022.01.25
  6. Script Notes :
  7. --]]
  8. local PickUp = 5454
  9. local Duet = 5471
  10. dofile("SpawnScripts/Generic/GenericVoiceOvers.lua")
  11. function spawn(NPC)
  12. SetPlayerProximityFunction(NPC, 12, "InRange", "LeaveRange")
  13. ProvidesQuest(NPC, PickUp)
  14. end
  15. function InRange(NPC, Spawn) --Quest Callout
  16. if GetFactionAmount(Spawn,11) <0 then
  17. choice = math.random(1,2)
  18. if choice == 1 then
  19. PlayFlavor(NPC, "", "", "noway", 0, 0, Spawn)
  20. elseif choice == 2 then
  21. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  22. end
  23. else
  24. if not HasCompletedQuest (Spawn, PickUp) and not HasQuest (Spawn, PickUp) then
  25. if math.random(1, 100) <= 70 then
  26. choice = math.random(1,3)
  27. FaceTarget(NPC, Spawn)
  28. if choice ==1 then
  29. PlayFlavor(NPC, "", "Ahem... FROAK! FROAK FROOOOAAAAKKK!", "cackle", 0, 0, Spawn)
  30. elseif choice ==2 then
  31. PlayFlavor(NPC, "", "The sounds of the swamp are sweet to hear! FROAK! FROAK FROAK! ", "orate", 0, 0, Spawn)
  32. else
  33. PlayFlavor(NPC, "", "The bugs so sweet it brings a tear! FROAK! FROAK FROOOOAAAAKKK!", "orate", 0, 0, Spawn)
  34. end
  35. end
  36. end
  37. end
  38. end
  39. function respawn(NPC)
  40. spawn(NPC)
  41. end
  42. function hailed(NPC, Spawn)
  43. if GetFactionAmount(Spawn,11) <0 then
  44. local choice = math.random(1,2)
  45. if choice == 1 then
  46. PlayFlavor(NPC, "", "", "noway", 0, 0, Spawn)
  47. elseif choice == 2 then
  48. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  49. end
  50. else
  51. GenericHail(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. if not HasCompletedQuest (Spawn, PickUp) and not HasQuest (Spawn, PickUp) then
  54. conversation = CreateConversation()
  55. PlayFlavor(NPC, "","","fullcurtsey",0,0,Spawn)
  56. if GetQuestStep (Spawn, Duet) == 1 then
  57. AddConversationOption(conversation, "Kualdin Swoonsong over in Willow Wood is planning a concert in the future. He wanted to know if you were interested.", "DuetOffer")
  58. end
  59. AddConversationOption(conversation, "You sing quite beautifully.", "Voice")
  60. StartConversation(conversation, NPC, Spawn, "I must continue to practice mine songs, for one day I mayhaps be invited to sing before Antonia Bayle! Froooaak! Froak! Froak! FrooOOOOooaak!")
  61. elseif GetQuestStep (Spawn, Duet) == 1 then
  62. conversation = CreateConversation()
  63. PlayFlavor(NPC, "","","ponder",0,0,Spawn)
  64. AddConversationOption(conversation, "Kualdin Swoonsong over in Willow Wood is planning a concert in the future. He wanted to know if you were interested.", "DuetOffer")
  65. AddConversationOption(conversation, "I think I am going to find some place quieter than here.")
  66. StartConversation(conversation, NPC, Spawn, "You appear to have something for me?")
  67. elseif not HasCompletedQuest (Spawn, PickUp) and HasQuest (Spawn, PickUp) then
  68. FaceTarget(NPC, Spawn)
  69. conversation = CreateConversation()
  70. if GetQuestStep (Spawn, PickUp) == 2 then
  71. AddConversationOption(conversation, "I brought you your device from Bizrinn.", "PickedUp")
  72. end
  73. if GetQuestStep (Spawn, Duet) == 1 then
  74. AddConversationOption(conversation, "Kualdin Swoonsong would like to invite you to be apart of his upcoming performance.", "DuetOffer")
  75. end
  76. PlayFlavor(NPC, "","","hello",0,0,Spawn)
  77. AddConversationOption(conversation, "I'm still heading that way.")
  78. StartConversation(conversation, NPC, Spawn, "I must continue to practice mine songs, for one day I mayhaps be invited to sing before Antonia Bayle! Froooaak! Froak! Froak! FrooOOOOooaak!")
  79. else
  80. choice = math.random(1,3)
  81. if choice ==1 then
  82. FaceTarget(NPC, Spawn)
  83. PlayFlavor(NPC, "", "This amplificator did not come with a manual...", "sigh", 0, 0, Spawn)
  84. elseif choice ==2 then
  85. PlayFlavor(NPC, "", "I'm still trying to setup this fangled machine!", "frustrated", 0, 0, Spawn)
  86. else
  87. PlayFlavor(NPC, "", "Come to enjoy my moving ballads, have you?", "orate", 0, 0, Spawn)
  88. end
  89. end
  90. end
  91. function Voice(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. AddConversationOption(conversation, "I should be able to do that for you.", "Sing")
  95. AddConversationOption(conversation, "Your froak doesn't bring all the boys to the terrace anymore?", "Sing")
  96. StartConversation(conversation, NPC, Spawn, "Why, thank you very much! I couldst use thy help if thou art so willing. I need an order picked up from some gnome tinkerers, but I really need to stay and practice. Wouldst thou be so kind to get the item for me?")
  97. --StartConversation(conversation, NPC, Spawn, "You see... my voice is not what it once was. I use to sing across our bog for the whole world to hear. Revelers flocked to my seranade!")
  98. end
  99. function Sing(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. conversation = CreateConversation()
  102. PlayFlavor(NPC, "","","no",0,0,Spawn)
  103. AddConversationOption(conversation, "I hope it isn`t too heavy.", "QuestBegin")
  104. StartConversation(conversation, NPC, Spawn, "Many thanks unto thee. Here is the bill of sale for the order. Just take this to Bizrinn Clamorclang in the Baubbleshire and he'll give thou the order. I cannot wait for it to get here!")
  105. -- StartConversation(conversation, NPC, Spawn, "Unfortunately, no... but a gnome came to me the other day and offered a new device. An Amplificator! He promised it would allow the whole city to love my music! Ahhh, how I miss the flocking adulation.")
  106. end
  107. --[[ This was Fabricated until actual dialgue was found
  108. function QuestAlmost(NPC, Spawn)
  109. FaceTarget(NPC, Spawn)
  110. conversation = CreateConversation()
  111. PlayFlavor(NPC, "","","agree",0,0,Spawn)
  112. AddConversationOption(conversation, "I'll pick it up for you.", "QuestBegin")
  113. StartConversation(conversation, NPC, Spawn, "Why, yes! I've already paid for the new device... would you pick it up for me from Bizrinn Clamorclang in the Baubbleshire? I have the recipt for it right here.")
  114. end
  115. ]]--
  116. function QuestBegin (NPC, Spawn)
  117. FaceTarget(NPC, Spawn)
  118. OfferQuest(NPC, Spawn, PickUp)
  119. end
  120. function PickedUp(NPC, Spawn)
  121. conversation = CreateConversation()
  122. AddConversationOption(conversation, "Be sure to try it out!", "Reward")
  123. AddConversationOption(conversation, "Good, that gives me enough time to get to a good distance away.", "Reward")
  124. AddConversationOption(conversation, "Oh, I'm sorry. This is the wrong device.")
  125. PlayFlavor(NPC, "","","confused",0,0,Spawn)
  126. StartConversation(conversation, NPC, Spawn, "Bravo! Here is thy payment I promised thee. Hmm ... it lookest like it will take a while to set up.")
  127. end
  128. function DuetOffer(NPC, Spawn)
  129. FaceTarget(NPC, Spawn)
  130. conversation = CreateConversation()
  131. PlayFlavor(NPC, "","","agree",0,0,Spawn)
  132. AddConversationOption(conversation, "I think he means to have you be a duet partner at the concert where he is the featured attraction.", "Duet2")
  133. StartConversation(conversation, NPC, Spawn, "Huzzah! A concert! Of course I am interested! I canst not believe he wouldst want to feature me. He must be an admirer of mine voice. Yea, 'tis a renowned sound, you know.")
  134. end
  135. function Duet2(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFlavor(NPC, "","","agree",0,0,Spawn)
  139. AddConversationOption(conversation, "I'll let him know. Thanks.", "DuetAccept")
  140. AddConversationOption(conversation, "He really is full of himself, isn't he... I'll let him know you agree.", "DuetAccept")
  141. StartConversation(conversation, NPC, Spawn, "Oh. Well ... I guess I am still interested... but I wisheth a solo!")
  142. end
  143. function DuetAccept(NPC, Spawn)
  144. SetStepComplete(Spawn, Duet, 1)
  145. end
  146. function Tryout(NPC,Spawn)
  147. PlayFlavor(NPC, "","Ahem...","snicker",0,0,Spawn)
  148. end
  149. function Tryout2(NPC,Spawn)
  150. Shout(NPC,"FRRROOOOOAK!....")
  151. PlayFlavor(NPC, "","","cackle",0,0,Spawn)
  152. end
  153. function Tryout3(NPC,Spawn)
  154. PlayFlavor(NPC, "","Oh... this is wonderful!","happy",0,0,Spawn)
  155. end
  156. function Reward(NPC, Spawn)
  157. SetStepComplete(Spawn, PickUp, 2)
  158. AddTimer(NPC,3000,"Tryout",1,Spawn)
  159. AddTimer(NPC,5000,"Tryout2",1,Spawn)
  160. AddTimer(NPC,8000,"Tryout3",1,Spawn)
  161. end
  162. end