9
3

BupipaGuryup.lua 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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.", "QuestBegin")
  95. AddConversationOption(conversation, "Perhaps another time then.")
  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. end
  98. function QuestBegin (NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. OfferQuest(NPC, Spawn, PickUp)
  101. end
  102. function PickedUp(NPC, Spawn)
  103. conversation = CreateConversation()
  104. AddConversationOption(conversation, "Be sure to try it out!", "Reward")
  105. AddConversationOption(conversation, "Good, that gives me enough time to get to a good distance away.", "Reward")
  106. AddConversationOption(conversation, "Oh, I'm sorry. This is the wrong device.")
  107. PlayFlavor(NPC, "","","confused",0,0,Spawn)
  108. StartConversation(conversation, NPC, Spawn, "Bravo! Here is thy payment I promised thee. Hmm ... it lookest like it will take a while to set up.")
  109. end
  110. function DuetOffer(NPC, Spawn)
  111. FaceTarget(NPC, Spawn)
  112. conversation = CreateConversation()
  113. PlayFlavor(NPC, "","","agree",0,0,Spawn)
  114. AddConversationOption(conversation, "I think he means to have you be a duet partner at the concert where he is the featured attraction.", "Duet2")
  115. 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.")
  116. end
  117. function Duet2(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. conversation = CreateConversation()
  120. PlayFlavor(NPC, "","","agree",0,0,Spawn)
  121. AddConversationOption(conversation, "I'll let him know. Thanks.", "DuetAccept")
  122. AddConversationOption(conversation, "He really is full of himself, isn't he... I'll let him know you agree.", "DuetAccept")
  123. StartConversation(conversation, NPC, Spawn, "Oh. Well ... I guess I am still interested... but I wisheth a solo!")
  124. end
  125. function DuetAccept(NPC, Spawn)
  126. SetStepComplete(Spawn, Duet, 1)
  127. end
  128. function Tryout(NPC,Spawn)
  129. PlayFlavor(NPC, "","Ahem...","snicker",0,0,Spawn)
  130. end
  131. function Tryout2(NPC,Spawn)
  132. Shout(NPC,"FRRROOOOOAK!....")
  133. PlayFlavor(NPC, "","","cackle",0,0,Spawn)
  134. end
  135. function Tryout3(NPC,Spawn)
  136. PlayFlavor(NPC, "","Oh... this is wonderful!","happy",0,0,Spawn)
  137. end
  138. function Reward(NPC, Spawn)
  139. SetStepComplete(Spawn, PickUp, 2)
  140. AddTimer(NPC,3000,"Tryout",1,Spawn)
  141. AddTimer(NPC,5000,"Tryout2",1,Spawn)
  142. AddTimer(NPC,8000,"Tryout3",1,Spawn)
  143. end
  144. end