InnkeeperRothskild.lua 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. --[[
  2. Script Name : SpawnScripts/Graystone/InnkeeperRothskild.lua
  3. Script Purpose : Innkeeper Rothskild <Housing>
  4. Script Author : Dorbin
  5. Script Date : 2022.03.12
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC, Spawn) --Quest Callout
  15. if math.random(1, 100) <= 75 then
  16. choice = math.random(1,2)
  17. FaceTarget(NPC, Spawn)
  18. if choice ==1 then
  19. PlayFlavor(NPC, "", "", "hello", 0, 0)
  20. else
  21. PlayFlavor(NPC, "", "", "nod", 0, 0)
  22. end
  23. end
  24. end
  25. function hailed(NPC, Spawn)
  26. conversation = CreateConversation()
  27. choice = math.random(1,2)
  28. FaceTarget(NPC, Spawn)
  29. if choice ==1 then
  30. PlayFlavor(NPC, "voiceover/english/dwarf_eco_good_1/ft/service/innkeeper/dwarf_innkeeper_service_good_1_hail_gf_b9a44b08.mp3", "", "hello", 3808996191, 327968555, Spawn)
  31. elseif choice ==2 then
  32. PlayFlavor(NPC, "voiceover/english/dwarf_eco_good_1/ft/service/innkeeper/dwarf_innkeeper_service_good_1_hail_gf_f9f93f86.mp3", "", "agree", 1511689015, 1470886898, Spawn)
  33. end
  34. AddConversationOption(conversation, "I would like to know more about inn rooms.", "dlg_2_1")
  35. AddConversationOption(conversation, "Thank you.")
  36. 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.")
  37. end
  38. --[[ OLD Dialogue from parser - 2022 Dorbin
  39. FaceTarget(NPC, Spawn)
  40. conversation = CreateConversation()
  41. PlayFlavor(NPC, "voiceover/english/innkeeper_yeoni/qey_village05/innkeeper010.mp3", "", "", 57172292, 1639146546, Spawn)
  42. AddConversationOption(conversation, "Yes, please.", "dlg_2_1")
  43. AddConversationOption(conversation, "Not right now.")
  44. 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?")
  45. --]]
  46. function dlg_2_1(NPC, Spawn)
  47. FaceTarget(NPC, Spawn)
  48. conversation = CreateConversation()
  49. PlayFlavor(NPC, "innkeeper_millbanks/qey_village06/innkeeper001.mp3", "", "", 4001228290, 3829134373, Spawn)
  50. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  51. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  52. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  53. AddConversationOption(conversation, "Nevermind for right now, thanks.")
  54. StartConversation(conversation, NPC, Spawn, "What would you like to know?")
  55. end
  56. function dlg_2_2(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. conversation = CreateConversation()
  59. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper002.mp3", "", "", 3750108879, 603350042, Spawn)
  60. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  61. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  62. AddConversationOption(conversation, "That's enough for now, thanks.")
  63. 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.")
  64. end
  65. function dlg_2_3(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. conversation = CreateConversation()
  68. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper007.mp3", "", "", 1015751749, 2650517021, Spawn)
  69. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  70. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  71. AddConversationOption(conversation, "That's enough for now, thanks.")
  72. 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.")
  73. end
  74. function dlg_2_4(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. conversation = CreateConversation()
  77. PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper003.mp3", "", "", 3477497917, 3032281679, Spawn)
  78. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  79. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  80. AddConversationOption(conversation, "That's enough for now, thanks.")
  81. 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.")
  82. end
  83. -- this stuff below goes in the accepted function of the quest
  84. function dlg_2_1(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. conversation = CreateConversation()
  87. PlayFlavor(NPC, "innkeeper_millbanks/qey_village06/innkeeper001.mp3", "", "", 4001228290, 3829134373, Spawn)
  88. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  89. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  90. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  91. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  92. AddConversationOption(conversation, "Nevermind for right now, thanks.")
  93. StartConversation(conversation, NPC, Spawn, "What would you like to know?")
  94. end
  95. function dlg_2_2(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. conversation = CreateConversation()
  98. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper002.mp3", "", "", 3750108879, 603350042, Spawn)
  99. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  100. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  101. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  102. AddConversationOption(conversation, "That's enough for now, thanks.")
  103. 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.")
  104. end
  105. function dlg_2_3(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. conversation = CreateConversation()
  108. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper007.mp3", "", "", 1015751749, 2650517021, Spawn)
  109. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  110. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  111. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  112. AddConversationOption(conversation, "That's enough for now, thanks.")
  113. 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.")
  114. end
  115. function dlg_2_4(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. conversation = CreateConversation()
  118. --PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper003.mp3", "", "", 3477497917, 3032281679, Spawn)
  119. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  120. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  121. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  122. AddConversationOption(conversation, "That's enough for now, thanks.")
  123. 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.")
  124. end
  125. function dlg_2_5(NPC, Spawn)
  126. FaceTarget(NPC, Spawn)
  127. conversation = CreateConversation()
  128. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  129. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  130. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  131. AddConversationOption(conversation, "That's enough for now, thanks.")
  132. 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.")
  133. end