InnkeeperValean.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. --[[
  2. Script Name : SpawnScripts/Castleview/InnkeeperValean.lua
  3. Script Purpose : Innkeeper Valean <Housing>
  4. Script Author : Dorbin
  5. Script Date : 2022.01.15
  6. Script Notes :
  7. --]]
  8. local Books = 5453
  9. local Delivery = 5443
  10. local Dinner = 238
  11. local Reservation = 5452
  12. local LostBook = 5468
  13. --dofile("SpawnScripts/Generic/GenericVoiceOvers.lua")
  14. function spawn(NPC)
  15. ProvidesQuest(NPC,Books)
  16. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function InRange (NPC,Spawn)
  22. if not HasQuest(Spawn, LostBook) and not HasCompletedQuest(Spawn, LostBooks) then
  23. if math.random(1, 100) <= 70 then
  24. PlayFlavor(NPC, "voiceover/english/innkeeper_valean/qey_village04/100_innkeeper_valean_callout_9071232c.mp3", "Welcome to the Bed and Book Inn. A fine establishment for recuperating a body and expanding a mind.", "hello", 1080804291, 518202081, Spawn)
  25. end
  26. else
  27. if math.random(1, 100) <= 50 then
  28. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  29. end
  30. end
  31. end
  32. --
  33. function hailed(NPC, Spawn)
  34. --GenericHail(NPC, Spawn)
  35. --[[ local choice = math.random(1,3)
  36. if choice == 1 then
  37. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1012.mp3", "", "hello", 0, 0, Spawn)
  38. elseif choice==2 then
  39. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1012.mp3", "", "bow", 0, 0, Spawn)
  40. else]]--
  41. PlayFlavor(NPC, "voiceover/english/innkeeper_valean/qey_village04/innkeepervalean.mp3", "", "bow",3631971111,2641145010, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. conversation = CreateConversation()
  44. if GetQuestStep (Spawn, Delivery) == 1 then
  45. AddConversationOption(conversation, "Ganla Dindlenod wants you to take a look at this book.", "BookDelivery")
  46. end
  47. if GetQuestStep (Spawn, Dinner) == 1 then
  48. AddConversationOption(conversation, "Faeadaen says she must work late tonight and can't make it back for dinner.", "NoDinner")
  49. end
  50. if GetQuestStep (Spawn, Reservation) == 1 then
  51. AddConversationOption(conversation, "I need to make a room reservation for Taneran.", "KnowTaneran")
  52. end
  53. if not HasQuest(Spawn,Books) and not HasCompletedQuest(Spawn,Books) then
  54. AddConversationOption(conversation, "You have a great number of books in your collection.", "BookCollection")
  55. end
  56. if GetQuestStep (Spawn, Books) == 2 then
  57. AddConversationOption(conversation, "I found your books being sold in the catacombs.", "FoundBooks")
  58. end
  59. if GetQuestStep (Spawn, LostBook) == 2 then
  60. AddConversationOption(conversation, "Faeadaen mentioned she left a book of Arbos here. Have you seen it?", "Arbos")
  61. end
  62. AddConversationOption(conversation, "I would like to know about a room.", "dlg_2_1")
  63. AddConversationOption(conversation, "No thanks.")
  64. StartConversation(conversation, NPC, Spawn, "Welcome to the Bed and Book Inn. A fine establishment for recuperating a body and expanding a mind. We have many fine rooms available. Interested, traveler?")
  65. -- StartConversation(conversation, NPC, Spawn, "Hello " .. GetName(Spawn) .. ", I am the Innkeeper for this village. We have received word of your arrival and have a room prepared for you. Would you like to know more about housing?")
  66. end
  67. function Arbos(NPC, Spawn)
  68. FaceTarget(NPC, Spawn)
  69. conversation = CreateConversation()
  70. AddConversationOption(conversation, "Alright. I'll check the shelves for the book.", "ShelfUpdate")
  71. StartConversation(conversation, NPC, Spawn, "Yes! I've just recently shelved the book on the great tree. Unfortunately, I don't recall where it is amongst my other books. You're welcome to look at my collections upstairs for it.")
  72. PlayFlavor(NPC, "", "", "agree", 0,0 , Spawn)
  73. end
  74. function BookDelivery(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. conversation = CreateConversation()
  77. AddConversationOption(conversation, "I'll let Ganla know. I hope it contains something good!", "UpdateDelivery")
  78. StartConversation(conversation, NPC, Spawn, "Ah, Yes! Ganla's treasure! I was expecting this. I shall decipher it, but it will take some time. Please inform Ganla I will return the journal as soon as possible.")
  79. PlayFlavor(NPC, "voiceover/english/innkeeper_valean/qey_village04/innkeepervalean005.mp3", "", "agree", 3924782316,102930417 , Spawn)
  80. end
  81. function NoDinner(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. conversation = CreateConversation()
  84. PlayFlavor(NPC, "voiceover/english/innkeeper_valean/qey_village04/innkeepervalean000.mp3", "", "sigh",4169629165,2563079815, Spawn)
  85. AddConversationOption(conversation, "I'm sorry to have to deliver the news.", "UpdateDinner")
  86. StartConversation(conversation, NPC, Spawn, "Again?! That froglok should hire more people so Faeadaen isn't worked to the bone. Thanks for letting me know. I guess I'll dine alone tonight.")
  87. end
  88. function KnowTaneran(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. AddConversationOption(conversation, "I wan't aware they were to be wed.", "UpdateReservation")
  92. AddConversationOption(conversation, "I don't really know either of them.", "UpdateReservation")
  93. StartConversation(conversation, NPC, Spawn, "Ah! Taneran! I know him well! It seems he's in town quite often visiting Listalania. They're quite a pair, arn't they? I suppose when they wed I'll lose his loyal patronage at my inn.")
  94. PlayFlavor(NPC, "voiceover/english/innkeeper_valean/qey_village04/innkeepervalean001.mp3", "", "agree", 3017286284,4228062292 , Spawn)
  95. end
  96. function UpdateReservation(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. conversation = CreateConversation()
  99. AddConversationOption(conversation, "I will let her know.", "ReservationMade")
  100. AddConversationOption(conversation, "I must congratulation them!", "ReservationMade")
  101. AddConversationOption(conversation, "Perhaps don't assume next time. Thank you.", "ReservationMade")
  102. StartConversation(conversation, NPC, Spawn, "Pardon my indiscretion, friend. I assumed... because you're making his reservation that... you were a close friend of Taneran's. He and I speak sometimes when he retires for the night. Please don't mention this to the Lady. I will see that his room is ready.")
  103. PlayFlavor(NPC, "voiceover/english/innkeeper_valean/qey_village04/innkeepervalean002.mp3", "", "boggle", 1569016427,2379789272 , Spawn)
  104. end
  105. function BookCollection(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. conversation = CreateConversation()
  108. AddConversationOption(conversation, "If I see them down there, I'll let you know.", "BookLook")
  109. AddConversationOption(conversation, "The catacombs? Ew. No.")
  110. StartConversation(conversation, NPC, Spawn, "I do have many, but I use to have more before hoodlums pilfered my shelves. I heard tales of a merchant in the Down Below selling books... MY BOOKS! I must confirm this before I approach the Qeynos guard.")
  111. PlayFlavor(NPC, "voiceover/english/innkeeper_valean/qey_village04/innkeepervalean003.mp3", "", "agree", 1990579767,1971786194 , Spawn)
  112. end
  113. function BookLook (NPC, Spawn)
  114. FaceTarget(NPC, Spawn)
  115. OfferQuest(NPC, Spawn, Books)
  116. end
  117. function FoundBooks(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. conversation = CreateConversation()
  120. AddConversationOption(conversation, "I'm glad I could help.", "BooksDone")
  121. StartConversation(conversation, NPC, Spawn, "I'll report this to the Qeynos guard! Hopefully they'll lock these criminals up and throw away the key. Thank you for relaying this information. Please, take this small token of my appreciation.")
  122. PlayFlavor(NPC, "voiceover/english/innkeeper_valean/qey_village04/innkeepervalean004.mp3", "", "boggle", 4073559800,1910490855 , Spawn)
  123. end
  124. function ShelfUpdate(NPC, Spawn)
  125. SetStepComplete(Spawn, LostBook, 2)
  126. end
  127. function UpdateDelivery(NPC, Spawn)
  128. SetStepComplete(Spawn, Delivery, 1)
  129. end
  130. function UpdateDinner(NPC, Spawn)
  131. SetStepComplete(Spawn, Dinner, 1)
  132. end
  133. function ReservationMade(NPC, Spawn)
  134. SetStepComplete(Spawn, Reservation, 1)
  135. end
  136. function BooksDone(NPC, Spawn)
  137. SetStepComplete(Spawn, Books, 2)
  138. end
  139. function dlg_2_1(NPC, Spawn)
  140. FaceTarget(NPC, Spawn)
  141. conversation = CreateConversation()
  142. PlayFlavor(NPC, "innkeeper_millbanks/qey_village06/innkeeper001.mp3", "", "", 4001228290, 3829134373, Spawn)
  143. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  144. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  145. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  146. AddConversationOption(conversation, "Nevermind for right now, thanks.")
  147. StartConversation(conversation, NPC, Spawn, "What would you like to know?")
  148. end
  149. function dlg_2_2(NPC, Spawn)
  150. FaceTarget(NPC, Spawn)
  151. conversation = CreateConversation()
  152. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  153. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  154. AddConversationOption(conversation, "That's enough for now, thanks.")
  155. StartConversation(conversation, NPC, Spawn, "To place an item in your house you must first find the item in your inventory, once you have done so right-click on the item and select the [place] option. You will then see a tinted outline of your item in your house, when the item is highlighted green you may place it in that location, if it is highlighted red you cannot.")
  156. end
  157. function dlg_2_3(NPC, Spawn)
  158. FaceTarget(NPC, Spawn)
  159. conversation = CreateConversation()
  160. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  161. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  162. AddConversationOption(conversation, "That's enough for now, thanks.")
  163. StartConversation(conversation, NPC, Spawn, "You will find that your house has many uses, the first of which is the ability to store house items. Each house has a limit to the number of house items you can place in it, so as you gain more possessions you wish to display you will need larger houses to do so.")
  164. end
  165. function dlg_2_4(NPC, Spawn)
  166. FaceTarget(NPC, Spawn)
  167. conversation = CreateConversation()
  168. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  169. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  170. AddConversationOption(conversation, "That's enough for now, thanks.")
  171. StartConversation(conversation, NPC, Spawn, "Many different kinds of housing are available in the city of Qeynos. As a show of appreciation, Antonia Bayle has awarded you a one bedroom house for free at this time.")
  172. end
  173. --[[
  174. PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village04/innkeeper001.mp3", "", "", 1553251638, 3978555092)
  175. AddConversationOption(conversation, "How can I place an item in my house?", "dlg_7_1")
  176. AddConversationOption(conversation, "What kind of housing is available to me?")
  177. AddConversationOption(conversation, "What is the marketboard for?")
  178. AddConversationOption(conversation, "What is my house for?")
  179. AddConversationOption(conversation, "Nothing right now.")
  180. StartConversation(conversation, NPC, Spawn, "Hello there" .. GetName(Spawn) .. ". what can I help you with?")
  181. --]]