InnkeeperZixiWuggle.lua 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. --[[
  2. Script Name : SpawnScripts/TempleSt/InnkeeperZixiWuggle.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.11.14 04:11:22
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. function respawn(NPC)
  10. spawn(NPC)
  11. end
  12. require "SpawnScripts/Generic/DialogModule"
  13. function spawn(NPC)
  14. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange(NPC, Spawn)
  20. if MakeRandomInt(1, 100) <= 12 and GetFactionAmount(Spawn,12) >0 then
  21. FaceTarget(NPC, Spawn)
  22. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_1/ft/service/innkeeper/darkelf_innkeeper_service_evil_1_aoi_gm_523a90f5.mp3", "Ah hello there! A traveling adventurer. You're in luck, we just had a recent death... err last minute cancellation.", "bye", 0, 0, Spawn)
  23. elseif GetFactionAmount(Spawn,12) <=0 then
  24. FaceTarget(NPC, Spawn)
  25. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_1/ft/service/innkeeper/darkelf_innkeeper_service_evil_1_notcitizen_gm_85c35337.mp3", "We don't serve your pathetic kind here. Get out of my sight!", "heckno", 0, 0, Spawn, 0)
  26. end
  27. end
  28. function hailed(NPC, Spawn)
  29. if GetFactionAmount(Spawn,12) >0 then
  30. Dialog1(NPC, Spawn)
  31. else
  32. FaceTarget(NPC, Spawn)
  33. PlayFlavor(NPC, "voiceover/english/darkelf_eco_evil_1/ft/service/innkeeper/darkelf_innkeeper_service_evil_1_notcitizen_gm_85c35337.mp3", "We don't serve your pathetic kind here. Get out of my sight!", "heckno", 0, 0, Spawn, 0)
  34. end
  35. end
  36. --[[function Dialog1(NPC, Spawn)
  37. FaceTarget(NPC, Spawn)
  38. Dialog.New(NPC, Spawn)
  39. Dialog.AddDialog("Hello, I am the Innkeeper for this district. We have received word of your arrival and have a room prepared for you. Would you like to know more about housing?")
  40. Dialog.AddVoiceover("innkeeper_melus/fprt_hood04/innkeeper010.mp3", 328655352, 2391913046)
  41. Dialog.AddOption("Yes.", "Dialog9")
  42. Dialog.AddOption("No thanks.")
  43. Dialog.Start()
  44. end]]--
  45. function Dialog1(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. Dialog.New(NPC, Spawn)
  48. local choice = MakeRandomInt(1,4)
  49. if choice == 1 then
  50. Dialog.AddDialog("Room rates are by the night not by the hour!")
  51. Dialog.AddVoiceover("voiceover/english/optional2/human_eco_evil_1/ft/service/innkeeper/human_innkeeper_service_evil_1_hail_gf_252bf582.mp3", 3227496969, 3582150955)
  52. PlayFlavor(NPC, "", "", "scold", 0, 0, Spawn, 0)
  53. elseif choice == 2 then
  54. Dialog.AddDialog("Can't you see I'm busy doing some very important things now. I don't care if there's any hot water! ")
  55. Dialog.AddVoiceover("voiceover/english/optional2/human_eco_evil_1/ft/service/innkeeper/human_innkeeper_service_evil_1_hail_gf_a81dfaee.mp3", 2674682883, 3858759889)
  56. PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn, 0)
  57. elseif choice == 3 then
  58. Dialog.AddDialog("What! What do you want?")
  59. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1005.mp3", 0, 0)
  60. PlayFlavor(NPC, "", "", "boggle", 0, 0, Spawn, 0)
  61. elseif choice == 4 then
  62. Dialog.AddDialog("Look I'm no cook, but I was going to have some fresh kidneys myself. You want me to get you a pair?")
  63. Dialog.AddVoiceover("voiceover/english/optional2/human_eco_evil_1/ft/service/innkeeper/human_innkeeper_service_evil_1_hail_gf_cac7726b.mp3", 595200411, 980025698)
  64. PlayFlavor(NPC, "", "", "shrug", 0, 0, Spawn, 0)
  65. end
  66. Dialog.AddOption("How can I place an item in my house?", "Dialog7")
  67. Dialog.AddOption("What kind of housing is available to me?", "Dialog10")
  68. Dialog.AddOption("What is the marketboard for?", "Dialog6")
  69. Dialog.AddOption("What is my house for?", "Dialog5")
  70. Dialog.AddOption("Nothing right now.")
  71. Dialog.Start()
  72. end
  73. function Dialog7(NPC, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. Dialog.New(NPC, Spawn)
  76. Dialog.AddDialog("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.")
  77. Dialog.AddVoiceover("innkeeper_uglar_splinterthumb/fprt_hood04/innkeeper002.mp3", 1857367756, 71125254)
  78. Dialog.AddOption("What kind of housing is available to me?", "Dialog8")
  79. Dialog.AddOption("What is the marketboard for?", "Dialog6")
  80. Dialog.AddOption("What is my house for?", "Dialog5")
  81. Dialog.AddOption("That's enough for now, thanks.")
  82. Dialog.Start()
  83. end
  84. function Dialog6(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. Dialog.New(NPC, Spawn)
  87. Dialog.AddDialog("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 Freeport. 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.")
  88. Dialog.AddVoiceover("innkeeper_uglar_splinterthumb/fprt_hood04/innkeeper005.mp3", 2660278888, 1868873136)
  89. Dialog.AddOption("How do I sell items using my marketboard?", "Dialog4")
  90. Dialog.AddOption("How can I place an item in my house?", "Dialog7")
  91. Dialog.AddOption("What kind of housing is available to me?", "Dialog8")
  92. Dialog.AddOption("What is my house for?", "Dialog5")
  93. Dialog.AddOption("That's enough for now, thanks.")
  94. Dialog.Start()
  95. end
  96. function Dialog2(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. Dialog.New(NPC, Spawn)
  99. Dialog.AddDialog("Yes. For a fee, brokers are willing to post the goods you are willing to sell to other adventurers. Brokers can be found in all primary districts of the city as well as in the Tradeskill wholesalers.")
  100. Dialog.AddOption("How can I place an item in my house?", "Dialog7")
  101. Dialog.AddOption("What kind of housing is available to me?", "Dialog10")
  102. Dialog.AddOption("What is the marketboard for?", "Dialog6")
  103. Dialog.AddOption("That's enough for now, thanks.")
  104. Dialog.Start()
  105. end
  106. function Dialog4(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. Dialog.New(NPC, Spawn)
  109. Dialog.AddDialog("Selling through your market board works the same way as directly selling through a broker, it just allows you to do it from the comfort of your home.")
  110. Dialog.AddVoiceover("innkeeper_uglar_splinterthumb/fprt_hood04/innkeeper006.mp3", 2214886491, 395905537)
  111. Dialog.AddOption("I can sell things through a broker?", "Dialog2")
  112. Dialog.AddOption("How can I place an item in my house?", "Dialog7")
  113. Dialog.AddOption("What kind of housing is available to me?", "Dialog10")
  114. Dialog.AddOption("What is my house for?", "Dialog5")
  115. Dialog.AddOption("That's enough for now, thanks.")
  116. Dialog.Start()
  117. end
  118. function Dialog5(NPC, Spawn)
  119. FaceTarget(NPC, Spawn)
  120. Dialog.New(NPC, Spawn)
  121. Dialog.AddDialog("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.")
  122. Dialog.AddVoiceover("innkeeper_uglar_splinterthumb/fprt_hood04/innkeeper007.mp3", 2480708099, 1450070298)
  123. Dialog.AddOption("Anything else?")
  124. Dialog.AddOption("How can I place an item in my house?", "Dialog7")
  125. Dialog.AddOption("What kind of housing is available to me?", "Dialog10")
  126. Dialog.AddOption("What is the marketboard for?", "Dialog6")
  127. Dialog.AddOption("That's enough for now, thanks.")
  128. Dialog.Start()
  129. end
  130. function Dialog8(NPC, Spawn)
  131. FaceTarget(NPC, Spawn)
  132. Dialog.New(NPC, Spawn)
  133. Dialog.AddDialog("Many different kinds of housing are available in the city of Freeport. In reward for your services, the Overlord has awarded you a one bedroom house for free at this time.")
  134. Dialog.AddVoiceover("innkeeper_uglar_splinterthumb/fprt_hood04/innkeeper003.mp3", 3512269476, 1166894802)
  135. Dialog.AddOption("Is any other housing available?", "Dialog10")
  136. Dialog.AddOption("How can I place an item in my house?", "Dialog7")
  137. Dialog.AddOption("What is the marketboard for?", "Dialog6")
  138. Dialog.AddOption("What is my house for?", "Dialog5")
  139. Dialog.AddOption("That's enough for now, thanks.")
  140. Dialog.Start()
  141. end
  142. function Dialog10(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. Dialog.New(NPC, Spawn)
  145. Dialog.AddDialog("Yes, the grand city of Freeport has houses ranging from the basic one bedroom model on up to 5 bedroom apartments, although the most ostentatious of these are only available to the most prestigious citizens of the city.")
  146. Dialog.AddVoiceover("innkeeper_uglar_splinterthumb/fprt_hood04/innkeeper004.mp3", 1780122794, 3374523197)
  147. Dialog.AddOption("How can I place an item in my house?", "Dialog7")
  148. Dialog.AddOption("What is the marketboard for?", "Dialog6")
  149. Dialog.AddOption("What is my house for?", "Dialog5")
  150. Dialog.AddOption("That’s enough for now, thanks.")
  151. Dialog.Start()
  152. end