9
3

InnkeeperYeoni.lua 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/InnkeeperYeoni.lua
  3. Script Purpose : Innkeeper Yeoni <Housing>
  4. Script Author : Scatman
  5. Script Date : 2009.09.15
  6. Script Notes : Added Quest & updated dialogue flow - 2022.2.? -Dorbin
  7. --]]
  8. local Message = 5479
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. if math.random(1, 100) <= 70 then
  17. RandomGreeting(NPC, Spawn)
  18. check = math.random(1,2)
  19. if check ==1 then
  20. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  21. else
  22. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  23. end
  24. end
  25. end
  26. function RandomGreeting(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. local choice = MakeRandomInt(1,4)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "voiceover/english/optional2/halfelf_eco_good_1/ft/service/innkeeper/halfelf_innkeeper_service_good_1_hail_gf_f9f93f86.mp3", "Many adventurers fresh from the road, head straight in to have a hot bath. Shall I prepare one for you?", "wink", 1745153471, 1126955121, Spawn, 0)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "voiceover/english/optional2/halfelf_eco_good_1/ft/service/innkeeper/halfelf_innkeeper_service_good_1_hail_gf_b9a44b08.mp3", "Hello there, will you be needing a room for the evening.", "hello", 3306251302, 2577851930, Spawn, 0)
  33. elseif choice == 3 then
  34. PlayFlavor(NPC, "voiceover/english/optional2/halfelf_eco_good_1/ft/service/innkeeper/halfelf_innkeeper_service_good_1_hail_gf_dc02003d.mp3", "Good day to you adventurer, can I fix you up something to eat?", "smile", 195141551, 1613034466, Spawn, 0)
  35. elseif choice == 4 then
  36. PlayFlavor(NPC, "voiceover/english/optional2/halfelf_eco_good_1/ft/service/innkeeper/halfelf_innkeeper_service_good_1_hail_gf_ff8f2e0b.mp3", "Is there something I can get for you. Do you need extra towels or a new set of sheets?", "shrug", 2772660615, 737066360, Spawn, 0)
  37. end
  38. end
  39. function hailed(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. conversation = CreateConversation()
  42. PlayFlavor(NPC, "voiceover/english/innkeeper_yeoni/qey_village05/innkeeper010.mp3", "", "", 57172292, 1639146546, Spawn)
  43. if GetQuestStep(Spawn, Message)==1 then
  44. AddConversationOption(conversation, "I have this note from Jendan at the docks. He wanted to know if his brother has stopped in today.","MessageUpdate")
  45. end
  46. --if not HasQuest(Spawn, HOUSE_QUEST) then
  47. -- AddConversationOption(conversation, "Please.", "OfferQuest1")
  48. --end
  49. AddConversationOption(conversation, "Yes, please.", "dlg_2_1")
  50. AddConversationOption(conversation, "Not right now.")
  51. 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?")
  52. end
  53. function OfferQuest1(NPC, Spawn)
  54. end
  55. function MessageUpdate(NPC, Spawn)
  56. PlayFlavor(NPC, "","", "sigh", 1068773246, 2639950014, Spawn)
  57. FaceTarget(NPC,Spawn)
  58. conversation = CreateConversation()
  59. AddConversationOption(conversation, "I hope so too. I'll let him know that there wasn't any message left for him today. ", "UpdateMessage")
  60. StartConversation(conversation, NPC, Spawn, "Oh, the poor dear. He asks at least twice a day if I've seen his brother. Unfortunately, I've no message for him. I do hope poor Jendan finds him soon.")
  61. end
  62. function UpdateMessage(NPC, Spawn)
  63. SetStepComplete(Spawn, Message, 1)
  64. end
  65. function dlg_2_1(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. conversation = CreateConversation()
  68. PlayFlavor(NPC, "innkeeper_millbanks/qey_village06/innkeeper001.mp3", "", "", 4001228290, 3829134373, Spawn)
  69. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  70. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  71. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  72. AddConversationOption(conversation, "Nevermind for right now, thanks.")
  73. StartConversation(conversation, NPC, Spawn, "What would you like to know?")
  74. end
  75. function dlg_2_2(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. conversation = CreateConversation()
  78. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper002.mp3", "", "", 3750108879, 603350042, Spawn)
  79. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  80. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  81. AddConversationOption(conversation, "That's enough for now, thanks.")
  82. 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.")
  83. end
  84. function dlg_2_3(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. conversation = CreateConversation()
  87. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper007.mp3", "", "", 1015751749, 2650517021, Spawn)
  88. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  89. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  90. AddConversationOption(conversation, "That's enough for now, thanks.")
  91. 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.")
  92. end
  93. function dlg_2_4(NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. conversation = CreateConversation()
  96. PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper003.mp3", "", "", 3477497917, 3032281679, Spawn)
  97. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  98. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  99. AddConversationOption(conversation, "That's enough for now, thanks.")
  100. 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.")
  101. end
  102. -- this stuff below goes in the accepted function of the quest
  103. function dlg_2_1(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. conversation = CreateConversation()
  106. PlayFlavor(NPC, "innkeeper_millbanks/qey_village06/innkeeper001.mp3", "", "", 4001228290, 3829134373, Spawn)
  107. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  108. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  109. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  110. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  111. AddConversationOption(conversation, "Nevermind for right now, thanks.")
  112. StartConversation(conversation, NPC, Spawn, "What would you like to know?")
  113. end
  114. function dlg_2_2(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. conversation = CreateConversation()
  117. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper002.mp3", "", "", 3750108879, 603350042, Spawn)
  118. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  119. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  120. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  121. AddConversationOption(conversation, "That's enough for now, thanks.")
  122. 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.")
  123. end
  124. function dlg_2_3(NPC, Spawn)
  125. FaceTarget(NPC, Spawn)
  126. conversation = CreateConversation()
  127. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper007.mp3", "", "", 1015751749, 2650517021, Spawn)
  128. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  129. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  130. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  131. AddConversationOption(conversation, "That's enough for now, thanks.")
  132. 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.")
  133. end
  134. function dlg_2_4(NPC, Spawn)
  135. FaceTarget(NPC, Spawn)
  136. conversation = CreateConversation()
  137. --PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper003.mp3", "", "", 3477497917, 3032281679, Spawn)
  138. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  139. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  140. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  141. AddConversationOption(conversation, "That's enough for now, thanks.")
  142. 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.")
  143. end
  144. function dlg_2_5(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. conversation = CreateConversation()
  147. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  148. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  149. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  150. AddConversationOption(conversation, "That's enough for now, thanks.")
  151. StartConversation(conversation, NPC, Spawn, "The marketboard is a house item, similar to books, beds, pets and other such items. What sets the marketboard apart from the rest however is that once your marketboard is mounted on a wall in your home you can use it to sell items to other citizens of Qeynos. These items can be purchased by your fellow citizens at a Broker. Brokers can be found in all primary districts of the city as well as in the Tradeskill wholesalers.")
  152. end