Krysa.lua 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. --[[
  2. Script Name : SpawnScripts/TempleSt/Krysa.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.10.22 02:10:54
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Makeup = 5925
  10. local EnchantedEvening = 5926
  11. local TheMissingBook = 5681
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, Makeup)
  14. ProvidesQuest(NPC, EnchantedEvening)
  15. SetInfoStructString(NPC, "action_state", "dance")
  16. SetTempVariable(NPC,"CalloutTimer","false")
  17. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function InRange(NPC, Spawn)
  23. if GetFactionAmount(Spawn,12) <0 then
  24. FaceTarget(NPC, Spawn)
  25. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  26. elseif GetTempVariable(NPC,"CalloutTimer")=="false"then
  27. SetTempVariable(NPC,"CalloutTimer","true")
  28. AddTimer(NPC,24000,"ResetCallout",1,Spawn)
  29. if not HasCompletedQuest(Spawn, Makeup) and not HasQuest(Spawn, Makeup) then
  30. if MakeRandomInt(0, 100) <= 100 then
  31. FaceTarget(NPC, Spawn)
  32. PlayFlavor(NPC, "voiceover/english/krysa/fprt_hood03/100_barentertainerkrysa_callout_a56d9ec5.mp3", "Welcome to Pshavost's bar! You want a drink?", "flustered", 3717169563, 2070235233, Spawn, 0)
  33. end
  34. elseif HasQuest(Spawn,Makeup) then
  35. FaceTarget(NPC, Spawn)
  36. PlayFlavor(NPC, "voiceover/english/krysa/fprt_hood03/100_barentertainerkrysa_multhail3_1c499723.mp3", "Where's my makeup? I need makeup for my pretty face!", "grumble", 840511031, 3336551011, Spawn, 0)
  37. elseif HasCompletedQuest(Spawn, Makeup) and not HasCompletedQuest(Spawn, EnchantedEvening) and not HasQuest(Spawn, EnchantedEvening) then
  38. if MakeRandomInt(0, 100) <= 85 then
  39. FaceTarget(NPC, Spawn)
  40. PlayFlavor(NPC, "voiceover/english/krysa/fprt_hood03/100_barentertainerkrysa_multhail2_7c1029d0.mp3", "Welcome to Pshavost's bar. If you want a drink, find my ugly sister Krasa or see Pshavost at the bar.", "bye", 766013067, 711037507, Spawn, 0)
  41. end
  42. end
  43. end
  44. end
  45. function ResetCallout(NPC,Spawn)
  46. SetTempVariable(NPC,"CalloutTimer","false")
  47. end
  48. function hailed(NPC, Spawn)
  49. if GetFactionAmount(Spawn,12) <0 then
  50. FaceTarget(NPC, Spawn)
  51. PlayFlavor(NPC, "","","shakefist",0,0, Spawn)
  52. elseif CanReceiveQuest(Spawn, Makeup) then
  53. Dialog1(NPC,Spawn)
  54. elseif HasQuest(Spawn, Makeup) and GetQuestStep(Spawn,Makeup) ==1 then
  55. DialogWait_Quest1(NPC,Spawn)
  56. elseif HasQuest(Spawn, Makeup) and GetQuestStep(Spawn,Makeup) ==2 then
  57. DialogWait_Quest1(NPC,Spawn)
  58. elseif CanReceiveQuest(Spawn, EnchantedEvening) then
  59. Dialog3_Quest2 (NPC,Spawn)
  60. elseif HasQuest(Spawn, EnchantedEvening) and GetQuestStep(Spawn,EnchantedEvening) ==1 then
  61. Dialog3_Quest2 (NPC,Spawn)
  62. elseif HasQuest(Spawn, EnchantedEvening) and GetQuestStep(Spawn,EnchantedEvening) ==2 then
  63. Dialog3_Quest2 (NPC,Spawn)
  64. else
  65. Dialog1(NPC,Spawn)
  66. end
  67. end
  68. function Dialog1(NPC, Spawn)
  69. FaceTarget(NPC, Spawn)
  70. Dialog.New(NPC, Spawn)
  71. Dialog.AddDialog("Welcome to Pshavost's bar. If you want a drink, find my ugly sister Krasa or see Pshavost at the bar.")
  72. Dialog.AddVoiceover("voiceover/english/krysa/fprt_hood03/mer_barentertainerkrysa_hail.mp3", 2129178406, 2161516525)
  73. PlayFlavor(NPC,"","","hello",0,0,Spawn)
  74. if CanReceiveQuest(Spawn, Makeup) then
  75. Dialog.AddOption("Your sister?","Dialog1_Quest1")
  76. end
  77. if GetQuestStep(Spawn, TheMissingBook) == 1 then
  78. Dialog.AddOption("Enough! Where is the stolen tome from Longshadow Alley?","Dialog6")
  79. end
  80. Dialog.AddOption("I just might.")
  81. Dialog.Start()
  82. end
  83. function Dialog1_Quest1(NPC,Spawn)
  84. FaceTarget(NPC, Spawn)
  85. Dialog.New(NPC, Spawn)
  86. Dialog.AddDialog("Can't you see her from here? She's the ugliest ratonga in the street. That's why I'm an entertainer, and she does dirty work like picking up rubbish! Haha! Perhaps I'll tell her to give you a free drink if you help pretty, pretty Krysa.")
  87. Dialog.AddVoiceover("voiceover/english/krysa/fprt_hood03/quests/krysa/krysa_x1_initial.mp3", 4232264280, 1676289715)
  88. PlayFlavor(NPC, "", "", "giggle", 0, 0, Spawn)
  89. Dialog.AddOption("I could use a drink...","Offer1")
  90. Dialog.AddOption("I wouldn't trust you to scrub my boots, much less fetch me a drink.")
  91. Dialog.Start()
  92. end
  93. function Offer1(NPC,Spawn)
  94. OfferQuest(NPC, Spawn, Makeup)
  95. end
  96. function DialogWait_Quest1(NPC,Spawn)
  97. FaceTarget(NPC, Spawn)
  98. Dialog.New(NPC, Spawn)
  99. Dialog.AddDialog("Where's my makeup? I need makeup for my pretty face!")
  100. Dialog.AddVoiceover("voiceover/english/krysa/fprt_hood03/100_barentertainerkrysa_multhail3_1c499723.mp3", 840511031, 3336551011)
  101. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  102. if GetQuestStep(Spawn, Makeup)==2 then
  103. Dialog.AddOption("Brashk said he didn't have any more makeup.","Dialog2_Quest1")
  104. else
  105. Dialog.AddOption("I'm still on my way!")
  106. end
  107. if GetQuestStep(Spawn, TheMissingBook) == 1 then
  108. Dialog.AddOption("Enough! Where is the stolen tome from Longshadow Alley?","Dialog6")
  109. end
  110. Dialog.Start()
  111. end
  112. function Dialog2_Quest1(NPC,Spawn)
  113. FaceTarget(NPC, Spawn)
  114. Dialog.New(NPC, Spawn)
  115. SetStepComplete(Spawn, Makeup, 2)
  116. Dialog.AddDialog("Wahaaa?! That filthy rubbish picker lied to me!! He said he had all the makeups I would ever need! Bah! Spit on that dirt licker next time I sees him. Now I must make my ugly sister look even uglier! You no bring me any makeups, so I no tell Krasa to give you's a free drink. Go away from me! You stink like a rubbish picker!")
  117. Dialog.AddVoiceover("voiceover/english/krysa/fprt_hood03/quests/krysa/krysa_x1_finish.mp3", 34509770, 2231226281)
  118. PlayFlavor(NPC, "", "", "boggle", 0, 0, Spawn)
  119. Dialog.AddOption("Hey... That was uncalled for!","Continue")
  120. Dialog.AddOption("Well, no amount of makup will help 'that' face!","Continue")
  121. Dialog.Start()
  122. end
  123. function Continue(NPC,Spawn)
  124. end
  125. function Dialog3_Quest2(NPC,Spawn)
  126. FaceTarget(NPC, Spawn)
  127. Dialog.New(NPC, Spawn)
  128. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  129. Dialog.AddDialog("Krysa no help you now. She busy with other customers. You come back later, yes?")
  130. Dialog.AddVoiceover("voiceover/english/krysa/fprt_hood03/100_barentertainerkrysa_multhail1_e0137dd4.mp3", 1716069852, 2277389123)
  131. if CanReceiveQuest(Spawn,EnchantedEvening) then
  132. Dialog.AddOption("Have you managed to get any more makeup?","Dialog4_Quest2")
  133. end
  134. if GetQuestStep(Spawn, EnchantedEvening)==2 then
  135. Dialog.AddOption("Raban said she would perform the enchantments asked about for free.","Dialog5_Quest2")
  136. end
  137. if GetQuestStep(Spawn, TheMissingBook) == 1 then
  138. Dialog.AddOption("Enough! Where is the stolen tome from Longshadow Alley?","Dialog6")
  139. end
  140. Dialog.AddOption("Fine.")
  141. Dialog.Start()
  142. end
  143. function Dialog4_Quest2(NPC,Spawn)
  144. FaceTarget(NPC, Spawn)
  145. Dialog.New(NPC, Spawn)
  146. PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn)
  147. Dialog.AddDialog("No, I didn't get more makeups. Are you rubbing it in Krysa's face, eh? If you are then I'll cuts you! I warn you! If you want to HELP pretty, pretty Krysa, then I can use you...")
  148. Dialog.AddVoiceover("voiceover/english/krysa/fprt_hood03/quests/krysa/krysa_x2_initial.mp3", 2921023636, 1840780338)
  149. Dialog.AddOption("What did you have in mind?","Offer2")
  150. Dialog.AddOption("Pretty pretty sure I don't.")
  151. Dialog.Start()
  152. end
  153. function Offer2(NPC,Spawn)
  154. OfferQuest(NPC, Spawn, EnchantedEvening)
  155. end
  156. function Dialog5_Quest2(NPC,Spawn)
  157. SetStepComplete(Spawn, EnchantedEvening, 2)
  158. FaceTarget(NPC, Spawn)
  159. Dialog.New(NPC, Spawn)
  160. PlayFlavor(NPC, "", "", "happy", 0, 0, Spawn)
  161. Dialog.AddDialog("She will? She will! Ohhh ... that Erudite is the most wonderful person I ever met! She cares so much about me that she gives me more spells! Haha! If only Spezi and Krasa knew what I was doing to them. Hahaha!!! They are stupid and ugly! Hahaha! Now you go! I no want Krasa to know what I am doing.")
  162. Dialog.AddVoiceover("voiceover/english/krysa/fprt_hood03/quests/krysa/krysa_x2_finish.mp3", 1881536618, 1447012024)
  163. Dialog.AddOption("Good luck!","Continue")
  164. Dialog.AddOption("I wonder if you'll ever figure out that... wait, nevermind.","Continue")
  165. Dialog.Start()
  166. end
  167. function Dialog6(NPC, Spawn)
  168. FaceTarget(NPC, Spawn)
  169. Dialog.New(NPC, Spawn)
  170. Dialog.AddDialog("I do nots know who you speaks of! You mistakes me for someoneses else!")
  171. Dialog.AddVoiceover("voiceover/english/spezi_the_street_hag/fprt_hood05/quests/lotniklria/falseratonga_lotni_x1_initial.mp3", 1342345543, 1293466742)
  172. PlayFlavor(NPC,"","","confused",0,0,Spawn)
  173. Dialog.AddOption("Alright.")
  174. Dialog.Start()
  175. end