9
3

OrcModule.lua 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. --[[
  2. Script Name : SpawnScripts/Generic/OrcModule.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2024.01.05 03:01:35
  5. Script Purpose :
  6. :
  7. --]]
  8. function OrcModule(NPC, Spawn, FactionID, ArmorType, ArmorRarity)
  9. armor = ArmorType
  10. rarity = ArmorRarity
  11. faction = FactionID
  12. class = GetClass(NPC)
  13. SpawnSet(NPC,"model_type",137)
  14. SpawnSet(NPC, "race", 19)
  15. OrcFaction(NPC, Spawn)
  16. OrcArmor(NPC, Spawn)
  17. OrcWeapons(NPC, Spawn)
  18. end
  19. function OrcFaction(NPC, Spawn)
  20. SpawnSet(NPC, "faction", faction)
  21. if faction == 0 or Faction == 1 then
  22. Generic(NPC)
  23. elseif faction == 119 then
  24. Deathfist(NPC)
  25. elseif faction == 120 then
  26. Bloodskull(NPC)
  27. elseif faction == 367 then
  28. Brokentusk(NPC)
  29. elseif faction == 366 then
  30. Lonetusk(NPC)
  31. elseif faction == 121 then
  32. Ree(NPC)
  33. end
  34. end
  35. function Deathfist(NPC, Spawn)
  36. end
  37. function Bloodskull(NPC, Spawn)
  38. end
  39. function Brokentusk(NPC, Spawn)
  40. SpawnSet(NPC, "skin_color", "110 75 75")
  41. SpawnSet(NPC, "eye_color", "98 63 28")
  42. end
  43. function Lonetusk(NPC, Spawn)
  44. SpawnSet(NPC, "skin_color", "92 52 52")
  45. SpawnSet(NPC, "eye_color", "98 63 28")
  46. end
  47. function Ree(NPC, Spawn)
  48. end
  49. function Generic(NPC, Spawn)
  50. SpawnSet(NPC, "skin_color", "75 100 75")
  51. SpawnSet(NPC, "eye_color", "98 63 28")
  52. end
  53. function OrcArmor(NPC, Spawn)
  54. if armor == 1 then
  55. VeryLightArmor(NPC, Spawn)
  56. elseif armor == 2 then
  57. LightArmor(NPC, Spawn)
  58. elseif armor == 3 then
  59. MediumArmor(NPC, Spawn)
  60. elseif armor == 4 then
  61. HeavyArmor(NPC, Spawn)
  62. else
  63. LightArmor(NPC, Spawn)
  64. end
  65. end
  66. function VeryLightArmor(NPC, Spawn)
  67. end
  68. function LightArmor(NPC, Spawn)
  69. --if rarity == 1 then
  70. Mismatched(NPC, Spawn)
  71. --end
  72. end
  73. function MediumArmor(NPC, Spawn)
  74. end
  75. function HeavyArmor(NPC, Spawn)
  76. end
  77. function OrcWeapons(NPC, Spawn)
  78. if class >= 1 and class <= 4 then
  79. FighterWeapons(NPC)
  80. elseif class >= 5 and class <=7 then
  81. BrawlerWeapons(NPC)
  82. elseif class >= 8 and class <= 10 then
  83. FighterWeapons(NPC)
  84. elseif class >= 11 and class <= 20 then
  85. PriestWeapons(NPC)
  86. elseif class >= 21 and class <= 30 then
  87. MageWeapons(NPC)
  88. else
  89. ScoutWeapons(NPC)
  90. end
  91. end
  92. function FighterWeapons(NPC, Spawn)
  93. local weapon = MakeRandomInt(1,10)
  94. if weapon == 1 then
  95. SetEquipment(NPC, Primary, 2228, 255, 255, 255, 255, 255, 255)
  96. elseif weapon == 2 then
  97. SetEquipment(NPC, Primary, 2237, 255, 255, 255, 255, 255, 255)
  98. elseif weapon == 3 then
  99. SetEquipment(NPC, Primary, 2240, 255, 255, 255, 255, 255, 255)
  100. elseif weapon == 4 then
  101. SetEquipment(NPC, Primary, 2296, 255, 255, 255, 255, 255, 255)
  102. elseif weapon == 5 then
  103. SetEquipment(NPC, Primary, 2319, 255, 255, 255, 255, 255, 255)
  104. elseif weapon == 6 then
  105. SetEquipment(NPC, Primary, 2548, 255, 255, 255, 255, 255, 255)
  106. elseif weapon == 7 then
  107. SetEquipment(NPC, Primary, 3242, 255, 255, 255, 255, 255, 255)
  108. elseif weapon == 8 then
  109. SetEquipment(NPC, Primary, 2282, 255, 255, 255, 255, 255, 255)
  110. SetEquipment(NPC, Secondary, 3255, 255, 255, 255, 255, 255, 255)
  111. elseif weapon == 9 then
  112. SetEquipment(NPC, Primary, 2409, 255, 255, 255, 255, 255, 255)
  113. SetEquipment(NPC, Secondary, 3255, 255, 255, 255, 255, 255, 255)
  114. elseif weapon == 10 then
  115. SetEquipment(NPC, Primary, 2240, 255, 255, 255, 255, 255, 255)
  116. SetEquipment(NPC, Secondary, 3255, 255, 255, 255, 255, 255, 255)
  117. end
  118. end
  119. function PriestWeapons(NPC, Spawn)
  120. local weapon = MakeRandomInt(1,6)
  121. if weapon == 1 then
  122. SetEquipment(NPC, Primary, 3292, 255, 255, 255, 255, 255, 255)
  123. SetEquipment(NPC, Secondary, 3255, 255, 255, 255, 255, 255, 255)
  124. elseif weapon == 2 then
  125. SetEquipment(NPC, Primary, 3843, 255, 255, 255, 255, 255, 255)
  126. SetEquipment(NPC, Secondary, 3255, 255, 255, 255, 255, 255, 255)
  127. elseif weapon == 3 then
  128. SetEquipment(NPC, Primary, 2324, 255, 255, 255, 255, 255, 255)
  129. SetEquipment(NPC, Secondary, 3255, 255, 255, 255, 255, 255, 255)
  130. elseif weapon == 4 then
  131. SetEquipment(NPC, Primary, 2287, 255, 255, 255, 255, 255, 255)
  132. SetEquipment(NPC, Secondary, 3255, 255, 255, 255, 255, 255, 255)
  133. elseif weapon == 5 then
  134. SetEquipment(NPC, Primary, 2516, 255, 255, 255, 255, 255, 255)
  135. elseif weapon == 6 then
  136. SetEquipment(NPC, Primary, 2396, 255, 255, 255, 255, 255, 255)
  137. end
  138. end
  139. function MageWeapons(NPC, Spawn)
  140. local weapon = MakeRandomInt(1,4)
  141. if weapon == 1 then
  142. SetEquipment(NPC, Primary, 3642, 255, 255, 255, 255, 255, 255)
  143. elseif weapon == 2 or weapon == 3 then
  144. SetEquipment(NPC, Primary, 2426, 255, 255, 255, 255, 255, 255)
  145. elseif weapon == 4 then
  146. SetEquipment(NPC, Primary, 3675, 255, 255, 255, 255, 255, 255)
  147. end
  148. end
  149. function ScoutWeapons(NPC, Spawn)
  150. local weapon = MakeRandomInt(1,3)
  151. if weapon == 1 then
  152. SetEquipment(NPC, Primary, 2264, 255, 255, 255, 255, 255, 255)
  153. SetEquipment(NPC, Secondary, 2264, 255, 255, 255, 255, 255, 255)
  154. elseif weapon == 2 then
  155. SetEquipment(NPC, Primary, 2312, 255, 255, 255, 255, 255, 255)
  156. SetEquipment(NPC, Secondary, 2312, 255, 255, 255, 255, 255, 255)
  157. elseif weapon == 3 then
  158. SetEquipment(NPC, Primary, 3286, 255, 255, 255, 255, 255, 255)
  159. SetEquipment(NPC, Secondary, 3286, 255, 255, 255, 255, 255, 255)
  160. end
  161. end
  162. function BrawlerWeapons(NPC, Spawn)
  163. local weapon = MakeRandomInt(1,4)
  164. if weapon == 1 then
  165. SetEquipment(NPC, Primary, 2536, 255, 255, 255, 255, 255, 255)
  166. SetEquipment(NPC, Secondary, 2536, 255, 255, 255, 255, 255, 255)
  167. elseif weapon == 2 then
  168. SetEquipment(NPC, Primary, 2534, 255, 255, 255, 255, 255, 255)
  169. SetEquipment(NPC, Secondary, 2534, 255, 255, 255, 255, 255, 255)
  170. elseif weapon == 3 then
  171. SetEquipment(NPC, Primary, 2274, 255, 255, 255, 255, 255, 255)
  172. SetEquipment(NPC, Secondary, 2274, 255, 255, 255, 255, 255, 255)
  173. elseif weapon == 4 then
  174. SetEquipment(NPC, Primary, 3290, 255, 255, 255, 255, 255, 255)
  175. SetEquipment(NPC, Secondary, 3290, 255, 255, 255, 255, 255, 255)
  176. end
  177. end
  178. function Mismatched(NPC, Spawn)
  179. local mismatch = MakeRandomInt(1,6)
  180. if mismatch == 1 then
  181. SetEquipment(NPC, Legs, 1084, 255, 255, 255, 255, 255, 255)
  182. SetEquipment(NPC, Forearms, 1081, 255, 255, 255, 255, 255, 255)
  183. SetEquipment(NPC, Feet, 1080, 255, 255, 255, 255, 255, 255)
  184. elseif mismatch ==2 then
  185. SetEquipment(NPC, Legs, 1084, 255, 255, 255, 255, 255, 255)
  186. SetEquipment(NPC, Forearms, 1081, 255, 255, 255, 255, 255, 255)
  187. SetEquipment(NPC, Feet, 1080, 255, 255, 255, 255, 255, 255)
  188. SetEquipment(NPC, Chest, 1079, 255, 255, 255, 255, 255, 255)
  189. elseif mismatch == 3 then
  190. SetEquipment(NPC, Legs, 1084, 255, 255, 255, 255, 255, 255)
  191. SetEquipment(NPC, Forearms, 1081, 255, 255, 255, 255, 255, 255)
  192. SetEquipment(NPC, Feet, 1080, 255, 255, 255, 255, 255, 255)
  193. SetEquipment(NPC, Head, 1083, 255, 255, 255, 255, 255, 255)
  194. elseif mismatch == 4 then
  195. SetEquipment(NPC, Legs, 1084, 255, 255, 255, 255, 255, 255)
  196. elseif mismatch == 5 then
  197. SetEquipment(NPC, Legs, 1084, 255, 255, 255, 255, 255, 255)
  198. SetEquipment(NPC, Forearms, 1081, 255, 255, 255, 255, 255, 255)
  199. SetEquipment(NPC, Feet, 1080, 255, 255, 255, 255, 255, 255)
  200. SetEquipment(NPC, Head, 1083, 255, 255, 255, 255, 255, 255)
  201. SetEquipment(NPC, Chest, 1079, 255, 255, 255, 255, 255, 255)
  202. elseif mismatch == 6 then
  203. SetEquipment(NPC, Legs, 1084, 255, 255, 255, 255, 255, 255)
  204. SetEquipment(NPC, Feet, 1080, 255, 255, 255, 255, 255, 255)
  205. end
  206. end