amonkinitiate.lua 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/amonkinitiate.lua
  3. Script Author : Rylec
  4. Script Date : 2021.02.14 05:02:23
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. local model = MakeRandomInt(1,2)
  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. else
  16. SetModelType(NPC, "134")
  17. SpawnSet(NPC, "soga_model_type", "134")
  18. SpawnSet(NPC, "chest_type", "5533")
  19. SpawnSet(NPC, "legs_type", "5534")
  20. end
  21. local hair = MakeRandomInt(1121,1140)
  22. SpawnSet(NPC, "hair_type", hair)
  23. SpawnSet(NPC, "soga_hair_type", hair)
  24. local beard = MakeRandomInt(1164,1191)
  25. SpawnSet(NPC, "facial_hair_type", beard)
  26. SpawnSet(NPC, "soga_facial_hair_type", beard)
  27. SetPlayerProximityFunction(NPC, 10, "InRange")
  28. AddTimer(NPC, 4000, "EmoteLoop")
  29. end
  30. function hailed(NPC, Spawn)
  31. FaceTarget(NPC, Spawn)
  32. local type = GetModelType(NPC)
  33. if type == 132 then
  34. humanFemale(NPC)
  35. else
  36. humanMale(NPC)
  37. end
  38. end
  39. function humanFemale(NPC)
  40. local chiChoice = MakeRandomInt(1,7)
  41. if chiChoice == 1 then
  42. 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)
  43. elseif chiChoice == 2 then
  44. 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)
  45. elseif chiChoice == 3 then
  46. 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)
  47. elseif chiChoice == 4 then
  48. PlayFlavor(NPC, "", "Good day to you. I trust your journey to our city was not overly hazardous.", "fullcurtsey", 0, 0, Spawn)
  49. elseif chiChoice == 5 then
  50. 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)
  51. elseif chiChoice == 6 then
  52. 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)
  53. else
  54. 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)
  55. end
  56. end
  57. function humanMale(NPC)
  58. local chiChoice = MakeRandomInt(1,9)
  59. if chiChoice == 1 then
  60. 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)
  61. elseif chiChoice == 2 then
  62. 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)
  63. elseif chiChoice == 3 then
  64. 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)
  65. elseif chiChoice == 4 then
  66. 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)
  67. elseif chiChoice == 5 then
  68. 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)
  69. elseif chiChoice == 6 then
  70. 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)
  71. elseif chiChoice == 7 then
  72. 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)
  73. elseif chiChoice == 8 then
  74. 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)
  75. else
  76. 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)
  77. end
  78. end
  79. function respawn(NPC)
  80. spawn(NPC)
  81. end
  82. function InRange(NPC, Spawn)
  83. FaceTarget(NPC, Spawn)
  84. local type = GetModelType(NPC)
  85. if type == 132 then
  86. humanFemaleProximity(NPC)
  87. else
  88. humanMaleProximity(NPC)
  89. end
  90. end
  91. function humanFemaleProximity(NPC)
  92. local chiChoice = MakeRandomInt(1,4)
  93. if chiChoice == 1 then
  94. 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)
  95. elseif chiChoice == 2 then
  96. 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)
  97. elseif chiChoice == 3 then
  98. 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)
  99. else
  100. 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)
  101. end
  102. end
  103. function humanMaleProximity(NPC)
  104. local chiChoice = MakeRandomInt(1,4)
  105. if chiChoice == 1 then
  106. PlayFlavor(NPC, "", "Welcome...welcome traveler, to the fair city of Qeynos! My, isn't it a magnificent day?", "hello", 0, 0, Spawn)
  107. elseif chiChoice == 2 then
  108. 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)
  109. elseif chiChoice == 3 then
  110. 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)
  111. else
  112. 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)
  113. end
  114. end
  115. function EmoteLoop(NPC)
  116. SpawnSet(NPC, "action_state", 0)
  117. local choice = MakeRandomInt(1,10)
  118. if choice == 1 then
  119. PlayAnimation(NPC, 1181)
  120. AddTimer(NPC, 1300, "Idle")
  121. elseif choice == 2 then
  122. PlayAnimation(NPC, 1284)
  123. AddTimer(NPC, 1550, "Idle")
  124. elseif choice == 3 then
  125. PlayAnimation(NPC, 1286)
  126. AddTimer(NPC, 1300, "Idle")
  127. elseif choice == 4 then
  128. PlayAnimation(NPC, 4506)
  129. AddTimer(NPC, 1550, "Idle")
  130. elseif choice == 5 then
  131. PlayAnimation(NPC, 11824)
  132. AddTimer(NPC, 950, "Idle")
  133. elseif choice == 6 then
  134. PlayAnimation(NPC, 11828)
  135. AddTimer(NPC, 3000, "Idle")
  136. elseif choice == 7 then
  137. PlayAnimation(NPC, 11830)
  138. AddTimer(NPC, 1300, "Idle")
  139. elseif choice == 8 then
  140. PlayAnimation(NPC, 11831)
  141. AddTimer(NPC, 2450, "Idle")
  142. elseif choice == 9 then
  143. PlayAnimation(NPC, 11832)
  144. AddTimer(NPC, 1750, "Idle")
  145. else
  146. PlayAnimation(NPC, 11848)
  147. AddTimer(NPC, 2000, "Idle")
  148. end
  149. end
  150. function Idle(NPC)
  151. PlayAnimation(NPC, 372)
  152. SpawnSet(NPC, "action_state", 372)
  153. local timer = MakeRandomInt(500,2500)
  154. AddTimer(NPC, timer, "EmoteLoop")
  155. end