Advertisement
Guest User

SaOk

a guest
Feb 3rd, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.69 KB | None | 0 0
  1. private ["_posPl","_xx","_yy","_start","_st","_tank","_tg1","_tg1wp1","_group","_class","_air"];
  2. sleep (random 20);
  3. _posPl = _this select 0;
  4. if (count VehicleGroups < EVEHMAX) then {
  5. _xx = random (1100);
  6. _yy = 1100 - _xx;
  7. if (random 1 < 0.5) then {_xx = _xx*(-1)};
  8. if (random 1 < 0.5) then {_yy = _yy*(-1)};
  9. _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
  10. _st = [_start, 400,"(1 - forest) * (1 - sea) * (1 - houses)"] CALL FUNKTIO_POS;
  11. _start = (_st select 0) select 0;
  12. while {surfaceIsWater [_start select 0, _start select 1] || {_start distance _x < 500} count VarBlackListE > 0} do {
  13. _xx = random (1100);
  14. _yy = 1100 - _xx;
  15. if (random 1 < 0.5) then {_xx = _xx*(-1)};
  16. if (random 1 < 0.5) then {_yy = _yy*(-1)};
  17. _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
  18. _st = [_start, 400,"(1 - forest) * (1 - sea) * (1 - houses)"] CALL FUNKTIO_POS;
  19. _start = (_st select 0) select 0;
  20. };
  21. if (random 1 < 0.7) then {
  22. _tank = VarVEH call BIS_fnc_selectRandom;
  23. _tg1 = [_start, 0, _tank, EAST] call BIS_fnc_spawnVehicle;
  24. _tg1wp1= (_tg1 select 2) addWaypoint [_posPl, 0];
  25. [(_tg1 select 2), 1] setWaypointBehaviour "COMBAT";
  26. VehicleGroups set [count VehicleGroups,(_tg1 select 2)];
  27. _nul = [(_tg1 select 2),"ColorRed"] SPAWN FUNKTIO_GM;
  28. _nul = [(_tg1 select 0), _posPl] SPAWN FUNKTIO_VS;
  29. CARS set [count CARS,(_tg1 select 0)];
  30. if (random 1 > VarRes) then {(_tg1 select 0) setfuel (random VarRes);};
  31. } else {
  32. if (VarAIR && VarRes > 0.3) then {
  33. _group = [[8152.21,1975.24,0], EAST, ["TK_Soldier_Pilot_EP1"],[],[],[0.4,0.8]] call BIS_fnc_spawnGroup;
  34. _class = ["L39_TK_EP1","Su25_TK_EP1"];
  35. if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_class = ["Su25_TK_2035","L39_TK_2035"];};
  36. _class = _class call BIS_fnc_selectRandom;
  37. _air = createVehicle [_class, [8152.21,1975.24,0], [], 0, "NONE"];
  38. _air setdir 240;
  39. CARS set [count CARS,_air];
  40. leader _group moveindriver _air;
  41. _tg1wp1= _group addWaypoint [_posPl, 0];
  42. [_group, 1] setWaypointBehaviour "AWARE";
  43. [_group, 1] setWaypointType "GUARD";
  44. _nul = [_group, [8152.21,1975.24,0],300] SPAWN FUNKTIO_MAD;
  45. AirGroups set [count AirGroups,_group];
  46. };
  47. };
  48.  
  49. };
  50.  
  51. sleep (random 20);
  52. if (random 1 < 0.3 && count VehicleGroups < EVEHMAX) then {
  53. _xx = random (1100);
  54. _yy = 1100 - _xx;
  55. if (random 1 < 0.5) then {_xx = _xx*(-1)};
  56. if (random 1 < 0.5) then {_yy = _yy*(-1)};
  57. _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
  58. _st = [_start, 400,"(1 - forest) * (1 - sea) * (1 - houses)"] CALL FUNKTIO_POS;
  59. _start = (_st select 0) select 0;
  60. while {surfaceIsWater [_start select 0, _start select 1] || {_start distance _x < 500} count VarBlackListE > 0} do {
  61. sleep 0.5;
  62. _xx = random (1100);
  63. _yy = 1100 - _xx;
  64. if (random 1 < 0.5) then {_xx = _xx*(-1)};
  65. if (random 1 < 0.5) then {_yy = _yy*(-1)};
  66. _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
  67. _st = [_start, 400,"(1 - forest) * (1 - sea) * (1 - houses)"] CALL FUNKTIO_POS;
  68. _start = (_st select 0) select 0;
  69. };
  70. _class = ["BMP2_TK_EP1","BRDM2_TK_EP1","BTR60_TK_EP1","M113_TK_EP1","T34_TK_EP1","T55_TK_EP1","LandRover_MG_TK_EP1","LandRover_SPG9_TK_EP1","UAZ_AGS30_TK_EP1","UAZ_MG_TK_EP1"];
  71. if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_class = ["UAZ_SPG9_TK_2035","T90_TK_2035","BTR90_TK_2035","BRDM2_ATGM_TK_2035","BRDM2_TK_2035","BMP3_TK_2035","BMP2_TK_2035"];};
  72. _class = _class call BIS_fnc_selectRandom;
  73. _tg1 = [_start, 0, _class, EAST] call BIS_fnc_spawnVehicle;
  74. _tg1wp1= (_tg1 select 2) addWaypoint [_posPl, 0];
  75. [(_tg1 select 2), 1] setWaypointBehaviour "COMBAT";
  76. VehicleGroups set [count VehicleGroups,(_tg1 select 2)];
  77. _nul = [(_tg1 select 2),"ColorRed"] SPAWN FUNKTIO_GM;
  78. _nul = [(_tg1 select 0), _posPl] SPAWN FUNKTIO_VS;
  79. CARS set [count CARS,(_tg1 select 0)];
  80. if (random 1 > VarRes) then {(_tg1 select 0) setfuel (random VarRes);};
  81. };
  82.  
  83. sleep (random 30);
  84. if (random 1 < 0.3 && count VehicleGroups < EVEHMAX) then {
  85. _xx = random (1100);
  86. _yy = 1100 - _xx;
  87. if (random 1 < 0.5) then {_xx = _xx*(-1)};
  88. if (random 1 < 0.5) then {_yy = _yy*(-1)};
  89. _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
  90. _st = [_start, 400,"(1 - forest) * (1 - sea) * (1 - houses)"] CALL FUNKTIO_POS;
  91. _start = (_st select 0) select 0;
  92. while {surfaceIsWater [_start select 0, _start select 1] || {_start distance _x < 500} count VarBlackListE > 0} do {
  93. sleep 0.5;
  94. _xx = random (1100);
  95. _yy = 1100 - _xx;
  96. if (random 1 < 0.5) then {_xx = _xx*(-1)};
  97. if (random 1 < 0.5) then {_yy = _yy*(-1)};
  98. _start = [(getposATL (vehicle player) select 0) + _xx,(getposATL (vehicle player) select 1) + _yy,0];
  99. _st = [_start, 400,"(1 - forest) * (1 - sea) * (1 - houses)"] CALL FUNKTIO_POS;
  100. _start = (_st select 0) select 0;
  101. };
  102. _class = ["BMP2_TK_EP1","BRDM2_TK_EP1","BTR60_TK_EP1","M113_TK_EP1","T34_TK_EP1","T55_TK_EP1","LandRover_MG_TK_EP1","LandRover_SPG9_TK_EP1","UAZ_AGS30_TK_EP1","UAZ_MG_TK_EP1"];
  103. if (isClass(configFile >> "cfgVehicles" >> "BMP2_TK_2035")) then {_class = ["UAZ_SPG9_TK_2035","T90_TK_2035","BTR90_TK_2035","BRDM2_ATGM_TK_2035","BRDM2_TK_2035","BMP3_TK_2035","BMP2_TK_2035"];};
  104. _class = _class call BIS_fnc_selectRandom;
  105. _tg1 = [_start, 0, _class, EAST] call BIS_fnc_spawnVehicle;
  106. _tg1wp1= (_tg1 select 2) addWaypoint [_posPl, 0];
  107. [(_tg1 select 2), 1] setWaypointBehaviour "COMBAT";
  108. VehicleGroups set [count VehicleGroups,(_tg1 select 2)];
  109. _nul = [(_tg1 select 2),"ColorRed"] SPAWN FUNKTIO_GM;
  110. _nul = [(_tg1 select 0), _posPl] SPAWN FUNKTIO_VS;
  111. CARS set [count CARS,(_tg1 select 0)];
  112. if (random 1 > VarRes) then {(_tg1 select 0) setfuel (random VarRes);};
  113. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement