Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.19 KB | None | 0 0
  1. private ["_tempArray","_InfPool","_MotPool","_ACHPool","_CHPool","_uavPool","_stPool","_shipPool","_diverPool","_crewPool","_heliCrew","_ArmPool"];
  2. _faction=(_this select 0);
  3. _type=(_this select 1);
  4. _tempArray=[];
  5.  
  6. // EAST CSAT FACTION
  7. if (_faction==0) then {
  8. _InfPool= ["O_SoldierU_SL_F","O_soldierU_repair_F","O_soldierU_medic_F","O_sniper_F","O_Soldier_A_F","O_Soldier_AA_F","O_Soldier_AAA_F","O_Soldier_AAR_F","O_Soldier_AAT_F","O_Soldier_AR_F","O_Soldier_AT_F","O_soldier_exp_F","O_Soldier_F","O_engineer_F","O_engineer_U_F","O_medic_F","O_recon_exp_F","O_recon_F","O_recon_JTAC_F","O_recon_LAT_F","O_recon_M_F","O_recon_medic_F","O_recon_TL_F"];
  9. _ArmPool= ["O_APC_Tracked_02_AA_F","O_APC_Tracked_02_cannon_F","O_APC_Wheeled_02_rcws_F","O_MBT_02_arty_F","O_MBT_02_cannon_F"];
  10. _MotPool= ["O_Truck_02_covered_F","O_Truck_02_transport_F","O_MRAP_02_F","O_MRAP_02_gmg_F","O_MRAP_02_hmg_F","O_Truck_02_medical_F"];
  11. _ACHPool= ["O_Heli_Attack_02_black_F","O_Heli_Attack_02_F"];
  12. _CHPool= ["O_Heli_Light_02_F","O_Heli_Light_02_unarmed_F"];
  13. _uavPool= ["O_UAV_01_F","O_UAV_02_CAS_F","O_UGV_01_rcws_F"];
  14. _stPool= ["O_Mortar_01_F","O_static_AT_F","O_static_AA_F"];
  15. _shipPool= ["O_Boat_Armed_01_hmg_F","O_Boat_Transport_01_F"];
  16. _diverPool= ["O_diver_exp_F","O_diver_F","O_diver_TL_F"];
  17. _crewPool= ["O_crew_F"];
  18. _heliCrew= ["O_helicrew_F","O_helipilot_F"];
  19. };
  20. // WEST NATO FACTION
  21. if (_faction==1) then {
  22. _InfPool= ["B_sniper_F","B_Soldier_A_F","B_Soldier_AA_F","B_Soldier_AAA_F","B_Soldier_AAR_F","B_Soldier_AAT_F","B_Soldier_AR_F","B_Soldier_AT_F","B_soldier_exp_F","B_Soldier_F","B_engineer_F","B_medic_F","B_recon_exp_F","B_recon_F","B_recon_JTAC_F","B_recon_LAT_F","B_recon_M_F","B_recon_medic_F","B_recon_TL_F"];
  23. _ArmPool= ["B_MBT_01_arty_F","B_MBT_01_cannon_F","B_MBT_01_mlrs_F","B_APC_Tracked_01_AA_F","B_APC_Tracked_01_CRV_F","B_APC_Tracked_01_rcws_F","B_APC_Wheeled_01_cannon_F","B_MBT_02_cannon_F"];
  24. _MotPool= ["B_Truck_01_covered_F","B_Truck_01_transport_F","B_MRAP_01_F","B_MRAP_01_gmg_F","B_MRAP_01_hmg_F","B_Truck_01_medical_F"];
  25. _ACHPool= ["B_Heli_Attack_01_F","B_Heli_Light_01_armed_F"];
  26. _CHPool= ["B_Heli_Light_01_F","B_Heli_Transport_01_camo_F","B_Heli_Transport_01_F"];
  27. _uavPool= ["B_UAV_01_F","B_UAV_01_CAS_F","B_UGV_01_rcws_F"];
  28. _stPool= ["B_Mortar_01_F","B_static_AT_F","B_static_AA_F"];
  29. _shipPool= ["B_Boat_Armed_01_minigun_F","B_Boat_Transport_01_F"];
  30. _diverPool= ["B_diver_exp_F","B_diver_F","B_diver_TL_F"];
  31. _crewPool= ["B_crew_F"];
  32. _heliCrew= ["B_helicrew_F","B_helipilot_F"];
  33. };
  34. // INDEPENDENT AAF FACTION
  35. if (_faction==2) then {
  36. _InfPool= ["I_engineer_F","I_Soldier_A_F","I_Soldier_AA_F","I_Soldier_AAA_F","I_Soldier_AAR_F","I_Soldier_AAT_F","I_Soldier_AR_F","I_Soldier_AT_F","I_Soldier_exp_F","I_soldier_F","I_Soldier_GL_F","I_Soldier_repair_F"];
  37. _ArmPool= ["I_APC_Wheeled_03_cannon_F"];
  38. _MotPool= ["I_MRAP_03_F","I_MRAP_03_gmg_F","I_MRAP_03_hmg_F","I_Truck_02_medical_F"];
  39. _ACHPool= [];
  40. _CHPool= ["I_Heli_Transport_02_F","B_Heli_Light_02_unarmed_F"];
  41. _uavPool= ["I_UAV_01_F","I_UAV_02_CAS_F","I_UGV_01_rcws_F"];
  42. _stPool= ["I_Mortar_01_F"];
  43. _shipPool= ["I_Boat_Transport_01_F","I_G_Boat_Transport_01_F","I_Boat_Armed_01_minigun_F"];
  44. _diverPool= ["I_diver_exp_F","I_diver_F","I_diver_TL_F"];
  45. _crewPool= ["I_crew_F"];
  46. _heliCrew= ["I_helicrew_F","I_helipilot_F"];
  47. };
  48. // CIVILIAN
  49. if (_faction==3) then {
  50. _InfPool= ["C_man_1","C_man_1_1_F","C_man_1_2_F","C_man_1_3_F","C_man_hunter_1_F","C_man_p_beggar_F","C_man_p_beggar_F_afro","C_man_p_fugitive_F","C_man_p_shorts_1_F","C_man_pilot_F","C_man_polo_1_F","C_man_polo_2_F","C_man_polo_3_F","C_man_polo_4_F","C_man_polo_5_F","C_man_polo_6_F","C_man_shorts_1_F","C_man_shorts_2_F","C_man_shorts_3_F","C_man_shorts_4_F","C_man_w_worker_F"];
  51. _ArmPool= ["C_Hatchback_01_F","C_Hatchback_01_sport_F","C_Quadbike_01_F","C_SUV_01_F","C_Van_01_transport_F","C_Van_01_box_F"];
  52. _MotPool= ["C_Hatchback_01_F","C_Hatchback_01_sport_F","C_Quadbike_01_F","C_SUV_01_F","C_Van_01_transport_F","C_Van_01_box_F"];
  53. _ACHPool= [];
  54. _CHPool= [];
  55. _uavPool= [];
  56. _stPool= [];
  57. _shipPool= ["C_Boat_Civil_01_F","C_Boat_Civil_01_rescue_F","C_Boat_Civil_04_F","C_Rubberboat"];
  58. _diverPool= [];
  59. _crewPool= ["C_man_1"];
  60. _heliCrew= ["C_man_1","C_man_1"];
  61. };
  62. // WEST FIA FACTION
  63. if (_faction==4) then {
  64. _InfPool= ["B_G_engineer_F","B_G_medic_F","B_G_officer_F","B_G_Soldier_A_F","B_G_Soldier_AR_F","B_G_Soldier_exp_F","B_G_Soldier_F","B_G_Soldier_GL_F","B_G_Soldier_LAT_F","B_G_Soldier_lite_F","B_G_Soldier_M_F","B_G_Soldier_SL_F","B_G_Soldier_TL_F"];
  65. _ArmPool= [];
  66. _MotPool= ["B_G_Offroad_01_F","B_G_Offroad_01_armed_F","B_G_Van_01_transport_F","B_G_Van_01_fuel_F"];
  67. _ACHPool= [];
  68. _CHPool= [];
  69. _uavPool= [];
  70. _stPool= ["B_G_Mortar_01_F"];
  71. _shipPool= ["B_G_Boat_Transport_01_F"];
  72. _diverPool= [];
  73. _crewPool= [];
  74. _heliCrew= [];
  75. };
  76. // ADD CLASSNAMES AFGANOI
  77. if (_faction==5) then {
  78. _InfPool= ["CUP_O_TK_INS_Soldier_AR","CUP_O_TK_INS_Soldier_MG","CUP_O_TK_INS_Soldier_AA","CUP_O_TK_INS_Soldier_AT","CUP_O_TK_INS_Soldier","CUP_O_TK_INS_Sniper","CUP_O_TK_INS_Soldier_FNFAL","CUP_O_TK_INS_Commander"];
  79. _ArmPool= ["CUP_O_BTR40_MG_TKM"];
  80. _MotPool= ["CUP_O_LR_MG_TKM"];
  81. _ACHPool= [];
  82. _CHPool= [];
  83. _uavPool= [];
  84. _stPool= [];
  85. _shipPool= [];
  86. _diverPool= [];
  87. _crewPool= [];
  88. _heliCrew= [];
  89. };
  90.  
  91. // ADD CLASSNAMES
  92. if (_faction==6) then {
  93. _InfPool= [];
  94. _ArmPool= [];
  95. _MotPool= [];
  96. _ACHPool= [];
  97. _CHPool= [];
  98. _uavPool= [];
  99. _stPool= [];
  100. _shipPool= [];
  101. _diverPool= [];
  102. _crewPool= [];
  103. _heliCrew= [];};
  104.  
  105. // ADD CLASSNAMES
  106. if (_faction==7) then {
  107. _InfPool= [];
  108. _ArmPool= [];
  109. _MotPool= [];
  110. _ACHPool= [];
  111. _CHPool= [];
  112. _uavPool= [];
  113. _stPool= [];
  114. _shipPool= [];
  115. _diverPool= [];
  116. _crewPool= [];
  117. _heliCrew= [];};
  118.  
  119. ////////////////////////////////////////////////////////////////////////////////////////
  120. if (_type==0) then {
  121. for "_i" from 0 to 5 do{
  122. _unit=_InfPool select (floor(random(count _InfPool)));
  123. _tempArray set [count _tempArray,_unit];};
  124. };
  125.  
  126. if (_type==1) then {_tempArray=_diverPool};
  127.  
  128.  
  129. // CREATE ARMOUR & CREW
  130. if (_type==2) then {
  131. _tempUnit=_ArmPool select (floor(random(count _ArmPool)));
  132. _temparray set [count _temparray,_tempUnit];
  133. _crew=_crewPool select (floor(random(count _crewPool)));
  134. _temparray set [count _temparray,_crew];
  135. };
  136.  
  137. // CREATE ATTACK CHOPPER & CREW
  138. if (_type==3) then {
  139. _tempUnit=_ACHPool select (floor(random(count _ACHPool)));
  140. _temparray set [count _temparray,_tempUnit];
  141. _crew=_heliCrew select (floor(random(count _heliCrew)));
  142. _temparray set [count _temparray,_crew];
  143. };
  144.  
  145. // CREATE TRANSPORT CHOPPER & CREW
  146. if (_type==4) then {
  147. _tempUnit=_CHPool select (floor(random(count _CHPool)));
  148. _temparray set [count _temparray,_tempUnit];
  149. _crew=_heliCrew select (floor(random(count _heliCrew)));
  150. _temparray set [count _temparray,_crew];
  151. };
  152.  
  153. // CREATE STATIC & CREW
  154. if (_type==5) then {
  155. _tempUnit=_stPool select (floor(random(count _stPool)));
  156. _temparray set [count _temparray,_tempUnit];
  157. _crew=_crewPool select (floor(random(count _crewPool)));
  158. _temparray set [count _temparray,_crew];
  159.  
  160. };
  161. if (_type==6) then {_tempArray=_uavPool select (floor(random(count _uavPool)));};
  162.  
  163. // CREATE TRANSPORT & CREW
  164. if (_type==7) then {
  165. _tempUnit=_MotPool select (floor(random(count _MotPool)));
  166. _temparray set [count _temparray,_tempUnit];
  167. _crew=_crewPool select (floor(random(count _crewPool)));
  168. _temparray set [count _temparray,_crew];
  169. };
  170.  
  171. // CREATE BOAT & DIVER CREW
  172. if (_type==8) then {
  173. _tempUnit=_shipPool select (floor(random(count _shipPool)));
  174. _temparray set [count _temparray,_tempUnit];
  175. _crew=_diverPool select (floor(random(count _diverPool)));
  176. _temparray set [count _temparray,_crew];
  177. };
  178.  
  179. // CREATE CARGO
  180. if (_type==9) then {
  181. for "_i" from 0 to 4 do{
  182. _unit=_InfPool select (floor(random(count _InfPool)));
  183. _temparray set [count _temparray,_unit];
  184. };
  185. };
  186.  
  187. // CREATE DIVER CARGO
  188. if (_type==10) then {
  189. for "_i" from 0 to 4 do{
  190. _unit=_diverPool select (floor(random(count _diverPool)));
  191. _temparray set [count _temparray,_unit];
  192. };
  193. };
  194.  
  195. //hint format ["%1",_tempArray];
  196. _tempArray
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement