9
3

achipractitionerRight.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/achipractitionerRight.lua
  3. Script Author : Rylec
  4. Script Date : 2021.01.27 03:01:52
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. local model = MakeRandomInt(1,3)
  10. if model == 1 then
  11. SetModelType(NPC, "132")
  12. SpawnSet(NPC, "soga_model_type", "132")
  13. SpawnSet(NPC, "chest_type", "5529")
  14. SpawnSet(NPC, "legs_type", "5530")
  15. elseif model == 2 then
  16. SetModelType(NPC, "134")
  17. SpawnSet(NPC, "soga_model_type", "134")
  18. SpawnSet(NPC, "chest_type", "5533")
  19. SpawnSet(NPC, "legs_type", "5534")
  20. else
  21. SetModelType(NPC, "97")
  22. SpawnSet(NPC, "soga_model_type", "97")
  23. SpawnSet(NPC, "chest_type", "5549")
  24. SpawnSet(NPC, "legs_type", "5550")
  25. end
  26. local hair = MakeRandomInt(1121,1140)
  27. SpawnSet(NPC, "hair_type", hair)
  28. SpawnSet(NPC, "soga_hair_type", hair)
  29. local beard = MakeRandomInt(1164,1191)
  30. SpawnSet(NPC, "facial_hair_type", beard)
  31. SpawnSet(NPC, "soga_facial_hair_type", beard)
  32. SetPlayerProximityFunction(NPC, 10, "InRange")
  33. AddTimer(NPC, 5000, "Stand")
  34. end
  35. function hailed(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. local type = GetModelType(NPC)
  38. if type == 132 then
  39. humanFemale(NPC)
  40. elseif type == 134 then
  41. humanMale(NPC)
  42. else
  43. kerran(NPC)
  44. end
  45. end
  46. function humanFemale(NPC)
  47. local chiChoice = MakeRandomInt(1,7)
  48. if chiChoice == 1 then
  49. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gf_63aeaecb.mp3", "Hail, good traveler!", "agree", 3880132810, 2976839399, Spawn)
  50. elseif chiChoice == 2 then
  51. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gf_c5cb5ec8.mp3", "Hail to you as well, traveler. There is much work to be done in Qeynos, might as well get started on it now.", "smile", 3197561806, 3190128247, Spawn)
  52. elseif chiChoice == 3 then
  53. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gf_e9f03834.mp3", "Welcome to Qeynos, traveler, know that you are among allies.", "bye", 2097755939, 469858505, Spawn)
  54. elseif chiChoice == 4 then
  55. PlayFlavor(NPC, "", "Good day to you. I trust your journey to our city was not overly hazardous.", "fullcurtsey", 0, 0, Spawn)
  56. elseif chiChoice == 5 then
  57. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gf_a1a2ce02.mp3", "Hello and welcome to the city. Everything you need can be found here in Qeynos.", "thanks", 3632185330, 3617071255, Spawn)
  58. elseif chiChoice == 6 then
  59. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gf_bf6c3bd5.mp3", "Hello there, friend, I hope the day finds you well.", "nod", 2878226663, 595387800, Spawn)
  60. else
  61. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gf_408eb029.mp3", "Greetings traveler and welcome to our village. Be sure to help us keep it tidy.", "scold", 748098747, 1246453163, Spawn)
  62. end
  63. end
  64. function humanMale(NPC)
  65. local chiChoice = MakeRandomInt(1,9)
  66. if chiChoice == 1 then
  67. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_13b79d2d.mp3", "Welcome...welcome traveler, to the fair city of Qeynos! My, isn't it a magnificent day?", "hello", 3746934207, 794965138, Spawn)
  68. elseif chiChoice == 2 then
  69. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_ef2b9651.mp3", "Will you quit pestering me? Don't force me to summon the guards!", "tapfoot", 3345611839, 1442739842, Spawn)
  70. elseif chiChoice == 3 then
  71. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_d38d1fff.mp3", "Ah, what have we here? Glad to see you endured the journey here, adventurer.", "wave", 2806352129, 3453714070, Spawn)
  72. elseif chiChoice == 4 then
  73. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_26f4c608.mp3", "Greetings visitor, I'm glad to meet you.", "bye", 1300497520, 2713745446, Spawn)
  74. elseif chiChoice == 5 then
  75. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_3fc546db.mp3", "As a citizen of the mighty city, Qeynos, I greet you openly.", "salute", 2645256785, 1334313741, Spawn)
  76. elseif chiChoice == 6 then
  77. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_7e3b456a.mp3", "Hail, pleasure to meet you.", "agree", 471367832, 2417424572, Spawn)
  78. elseif chiChoice == 7 then
  79. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_60dfe3da.mp3", "Welcome to Qeynos, friend.", "nod", 3850495157, 2924033866, Spawn)
  80. elseif chiChoice == 8 then
  81. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_9b2049a3.mp3", "Well met, friend. It's good to make your acquaintance!", "bow", 754727055, 3165426316, Spawn)
  82. else
  83. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_e58035f3.mp3", "What do you want? Leave me be!", "shrug", 1323474108, 3355478224, Spawn)
  84. end
  85. end
  86. function kerran(NPC)
  87. local chiChoice = MakeRandomInt(1,8)
  88. if chiChoice == 1 then
  89. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_hail_gm_6b58eeec.mp3", "I keep my wit as sharp as my claws. I never know which one I will need to rely on.", "stretch", 3670900464, 1104739099, Spawn)
  90. elseif chiChoice == 2 then
  91. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_hail_gm_1f19f9ef.mp3", "Tact is the knack of making a point without making an enemy.", "agree", 216091278, 201326460, Spawn)
  92. elseif chiChoice == 3 then
  93. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_hail_gm_44b38e8c.mp3", "Was it me or did I just see something move over there?", "wave", 3599874332, 7461740, Spawn)
  94. elseif chiChoice == 4 then
  95. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_hail_gm_ac88207.mp3", "The goal isn't always catching the prey, rather it's the chase.", "smile", 152508601, 1517122703, Spawn)
  96. elseif chiChoice == 5 then
  97. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_hail_gm_f8a140a8.mp3", "Who would have known that one's paws could become so stained from pie?", "shrug", 2791956809, 3567994575, Spawn)
  98. elseif chiChoice == 6 then
  99. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_hail_gm_efb7fbaf.mp3", "Those gnolls don't scare me! Well, maybe just a little.", "flex", 3516960004, 2208859201, Spawn)
  100. elseif chiChoice == 7 then
  101. PlayFlavor(NPC, "", "Sorry, I can't speak now. I must prepare for my sparring exercises.", "", 0, 0, Spawn)
  102. else
  103. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_hail_gm_8647b14e.mp3", "I am no ordinary kerra.", "flex", 3153151742, 2518854444, Spawn)
  104. end
  105. end
  106. function respawn(NPC)
  107. spawn(NPC)
  108. end
  109. function Stand(NPC)
  110. SpawnSet(NPC, "visual_state", "0")
  111. PlayAnimation(NPC, 539)
  112. AddTimer(NPC, 3500, "Dance01")
  113. end
  114. function Dance01(NPC)
  115. PlayAnimation(NPC, 10955)
  116. LeavesTimer(NPC)
  117. AddTimer(NPC, 2400, "Dance02")
  118. end
  119. function Dance02(NPC)
  120. PlayAnimation(NPC, 323)
  121. PlayAnimation(NPC, 10955)
  122. AddTimer(NPC, 2400, "Dance03")
  123. end
  124. function Dance03(NPC)
  125. PlayAnimation(NPC, 323)
  126. PlayAnimation(NPC, 10955)
  127. AddTimer(NPC, 2400, "Dance04")
  128. end
  129. function Dance04(NPC)
  130. PlayAnimation(NPC, 323)
  131. PlayAnimation(NPC, 10955)
  132. AddTimer(NPC, 2400, "DanceEnd")
  133. end
  134. function DanceEnd(NPC)
  135. PlayAnimation(NPC, 323)
  136. PlayAnimation(NPC, 10963)
  137. SpawnSet(NPC, "action_state", "0")
  138. AddTimer(NPC, 4500, "Sit")
  139. end
  140. function Sit(NPC)
  141. PlayAnimation(NPC, 538)
  142. AddTimer(NPC, 2000, "SitIdle")
  143. end
  144. function SitIdle(NPC)
  145. SpawnSet(NPC, "visual_state", "540")
  146. AddTimer(NPC, 20000, "Stand")
  147. end
  148. function LeavesTimer(NPC)
  149. AddTimer(NPC, 2400, "LeavesStart")
  150. end
  151. function LeavesStart(NPC)
  152. SpawnSet(NPC, "action_state", "144")
  153. end
  154. function InRange(NPC, Spawn)
  155. FaceTarget(NPC, Spawn)
  156. local type = GetModelType(NPC)
  157. if type == 132 then
  158. humanFemaleProximity(NPC)
  159. elseif type == 134 then
  160. humanMaleProximity(NPC)
  161. else
  162. kerranProximity(NPC)
  163. end
  164. end
  165. function humanFemaleProximity(NPC)
  166. local chiChoice = MakeRandomInt(1,4)
  167. if chiChoice == 1 then
  168. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gf_79781fd.mp3", "Welcome to the city, newcomer. All are welcome in the court of Antonia Bayle.", "bow", 4027811518, 2764738720, Spawn)
  169. elseif chiChoice == 2 then
  170. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_aoi_gf_7b765111.mp3", "You stand within the sturdy and unyielding walls of Qeynos, give thanks for their existence!", "point", 1908238477, 1252205270, Spawn)
  171. elseif chiChoice == 3 then
  172. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gf_9a63d2e3.mp3", "Hail, I am pleased to see so many eager new adventurers among us.", "hello", 3500366421, 3655995659, Spawn)
  173. else
  174. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gf_1dba0c5b.mp3", "Salutations and warm greetings to you.", "curtsey", 707852693, 1737331106, Spawn)
  175. end
  176. end
  177. function humanMaleProximity(NPC)
  178. local chiChoice = MakeRandomInt(1,4)
  179. if chiChoice == 1 then
  180. PlayFlavor(NPC, "", "Welcome...welcome traveler, to the fair city of Qeynos! My, isn't it a magnificent day?", "hello", 0, 0, Spawn)
  181. elseif chiChoice == 2 then
  182. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_aoi_gm_4d212798.mp3", "I'm confident that the merchants of our city will fill all equipment needs with the utmost hospitality.", "smile", 2600666744, 586734676, Spawn)
  183. elseif chiChoice == 3 then
  184. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_aoi_gm_2c5409ba.mp3", "Another lovely day in the city of Qeynos!", "sigh", 2759856909, 614688407, Spawn)
  185. else
  186. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/human/human_eco_good_1_hail_gm_34d7a9e6.mp3", "Well met. Here, in Qeynos, you shall find a wealth of useful supplies, and more importantly, ale.", "wink", 3467166298, 3144147842, Spawn)
  187. end
  188. end
  189. function kerranProximity(NPC)
  190. local chiChoice = MakeRandomInt(1,5)
  191. if chiChoice == 1 then
  192. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_hail_gm_3fd40378.mp3", "Keep your ears open.", "listen", 1525987814, 3335262701, Spawn)
  193. elseif chiChoice == 2 then
  194. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_aoi_gm_c0c28955.mp3", "Honest as a kerra, when the fish are out of reach.", "wink", 306655625, 4097745959, Spawn)
  195. elseif chiChoice == 3 then
  196. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_hail_gm_a981f363.mp3", "It is better to swallow your pride than to lose your life.", "nod", 2178756893, 2548415956, Spawn)
  197. elseif chiChoice == 4 then
  198. PlayFlavor(NPC, "", "", "cheer", 0, 0, Spawn)
  199. else
  200. PlayFlavor(NPC, "voiceover/english/kerran_eco_good_1/ft/kerran/kerran_eco_good_1_aoi_gm_a3788b05.mp3", "Watch the tail! Watch the tail!", "scold", 1917905155, 2497295526, Spawn)
  201. end
  202. end