InnkeeperYeoni.lua 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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 :
  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) --Quest Callout
  16. if math.random(1, 100) <= 70 then
  17. choice = math.random(1,2)
  18. if choice ==1 then
  19. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  20. else
  21. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  22. end
  23. end
  24. end
  25. function hailed(NPC, Spawn)
  26. FaceTarget(NPC, Spawn)
  27. conversation = CreateConversation()
  28. PlayFlavor(NPC, "voiceover/english/innkeeper_yeoni/qey_village05/innkeeper010.mp3", "", "", 57172292, 1639146546, Spawn)
  29. if GetQuestStep(Spawn, Message)==1 then
  30. AddConversationOption(conversation, "I have this note from Jendan at the docks. He wanted to know if his brother has stopped in today.","MessageUpdate")
  31. end
  32. --if not HasQuest(Spawn, HOUSE_QUEST) then
  33. -- AddConversationOption(conversation, "Please.", "OfferQuest1")
  34. --end
  35. AddConversationOption(conversation, "Yes, please.", "dlg_2_1")
  36. AddConversationOption(conversation, "Not right now.")
  37. 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?")
  38. end
  39. function OfferQuest1(NPC, Spawn)
  40. end
  41. function MessageUpdate(NPC, Spawn)
  42. PlayFlavor(NPC, "","", "sigh", 1068773246, 2639950014, Spawn)
  43. FaceTarget(NPC,Spawn)
  44. conversation = CreateConversation()
  45. AddConversationOption(conversation, "I hope so too. I'll let him know that there wasn't any message left for him today. ", "UpdateMessage")
  46. 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.")
  47. end
  48. function UpdateMessage(NPC, Spawn)
  49. SetStepComplete(Spawn, Message, 1)
  50. end
  51. function dlg_2_1(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. conversation = CreateConversation()
  54. PlayFlavor(NPC, "innkeeper_millbanks/qey_village06/innkeeper001.mp3", "", "", 4001228290, 3829134373, Spawn)
  55. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  56. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  57. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  58. AddConversationOption(conversation, "Nevermind for right now, thanks.")
  59. StartConversation(conversation, NPC, Spawn, "What would you like to know?")
  60. end
  61. function dlg_2_2(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. conversation = CreateConversation()
  64. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper002.mp3", "", "", 3750108879, 603350042, Spawn)
  65. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  66. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  67. AddConversationOption(conversation, "That's enough for now, thanks.")
  68. 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.")
  69. end
  70. function dlg_2_3(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper007.mp3", "", "", 1015751749, 2650517021, Spawn)
  74. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  75. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  76. AddConversationOption(conversation, "That's enough for now, thanks.")
  77. 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.")
  78. end
  79. function dlg_2_4(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. conversation = CreateConversation()
  82. PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper003.mp3", "", "", 3477497917, 3032281679, Spawn)
  83. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  84. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  85. AddConversationOption(conversation, "That's enough for now, thanks.")
  86. 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.")
  87. end
  88. -- this stuff below goes in the accepted function of the quest
  89. function dlg_2_1(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. conversation = CreateConversation()
  92. PlayFlavor(NPC, "innkeeper_millbanks/qey_village06/innkeeper001.mp3", "", "", 4001228290, 3829134373, Spawn)
  93. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  94. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  95. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  96. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  97. AddConversationOption(conversation, "Nevermind for right now, thanks.")
  98. StartConversation(conversation, NPC, Spawn, "What would you like to know?")
  99. end
  100. function dlg_2_2(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. conversation = CreateConversation()
  103. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper002.mp3", "", "", 3750108879, 603350042, Spawn)
  104. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  105. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  106. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  107. AddConversationOption(conversation, "That's enough for now, thanks.")
  108. 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.")
  109. end
  110. function dlg_2_3(NPC, Spawn)
  111. FaceTarget(NPC, Spawn)
  112. conversation = CreateConversation()
  113. -- PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper007.mp3", "", "", 1015751749, 2650517021, Spawn)
  114. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  115. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  116. AddConversationOption(conversation, "Is this the only place I can live in the city?", "dlg_2_4")
  117. AddConversationOption(conversation, "That's enough for now, thanks.")
  118. 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.")
  119. end
  120. function dlg_2_4(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. conversation = CreateConversation()
  123. --PlayFlavor(NPC, "innkeeper_uglar_splinterthumb/qey_village06/innkeeper003.mp3", "", "", 3477497917, 3032281679, Spawn)
  124. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  125. AddConversationOption(conversation, "How do I sell items using my marketboard?", "dlg_2_5")
  126. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  127. AddConversationOption(conversation, "That's enough for now, thanks.")
  128. 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.")
  129. end
  130. function dlg_2_5(NPC, Spawn)
  131. FaceTarget(NPC, Spawn)
  132. conversation = CreateConversation()
  133. AddConversationOption(conversation, "What can I use my house for?", "dlg_2_3")
  134. AddConversationOption(conversation, "How do I place furniture in my home?", "dlg_2_2")
  135. AddConversationOption(conversation, "Are there other places I can live in the city?", "dlg_2_4")
  136. AddConversationOption(conversation, "That's enough for now, thanks.")
  137. 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.")
  138. end