Advertisement
secondcoming

Untitled

Sep 9th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 2.00 KB | None | 0 0
  1. private ["_buildings","_buildingToSpawn","_positionsToSpawn","_zombies"];
  2. _zombies =
  3. [
  4.     "RyanZombieC_man_1slow","RyanZombieC_man_polo_1_Fslow","RyanZombieC_man_polo_2_Fslow","RyanZombieC_man_polo_4_Fslow","RyanZombieC_man_polo_5_Fslow","RyanZombieC_man_polo_6_Fslow","RyanZombieC_man_p_fugitive_Fslow","RyanZombieC_man_w_worker_Fslow","RyanZombieC_man_hunter_1_Fslow",
  5.     "RyanZombieC_man_1medium","RyanZombieC_man_polo_1_Fmedium","RyanZombieC_man_polo_2_Fmedium","RyanZombieC_man_polo_4_Fmedium","RyanZombieC_man_polo_5_Fmedium","RyanZombieC_man_polo_6_Fmedium","RyanZombieC_man_p_fugitive_Fmedium","RyanZombieC_man_w_worker_Fmedium","RyanZombieC_man_hunter_1_Fmedium",
  6.     "RyanZombieC_man_1walker","RyanZombieC_man_polo_1_Fwalker","RyanZombieC_man_polo_2_Fwalker","RyanZombieC_man_polo_4_Fwalker","RyanZombieC_man_polo_5_Fwalker","RyanZombieC_man_polo_6_Fwalker","RyanZombieC_man_p_fugitive_Fwalker","RyanZombieC_man_w_worker_Fwalker","RyanZombieC_scientist_Fwalker","RyanZombieC_man_hunter_1_Fwalker","RyanZombieC_man_pilot_Fwalker","RyanZombieC_journalist_Fwalker","RyanZombieC_Oresteswalker","RyanZombieC_Nikoswalker"
  7. ];
  8.  
  9. _chance = 50;
  10.  
  11. if (ExileReborn_playerIsWounded) then {_chance = _chance + 25;};
  12. if (ExileReborn_playerIsInfected) then {_chance = _chance + 40;};
  13.  
  14.  
  15. _position       = position player;
  16.  
  17. // is position in range of a territory?
  18. if([_position, 250] call ExileClient_util_world_isTerritoryInRange) then { _chance = 0; };
  19.  
  20. // is position in range of a trader zone?
  21. if([_position, 500] call ExileClient_util_world_isTraderZoneInRange) then { _chance = 0; };
  22.  
  23. if (_chance >= random 100) then
  24. {
  25.     _buildings = player nearObjects ["House", 300];
  26.     {
  27.         if !(_buildings isEqualTo []) then
  28.         {
  29.             _nearZombies = getPos _x nearEntities [_zombies,150];
  30.             if ((count _nearZombies) > 0) exitWith {};
  31.             _positionsToSpawn = _x buildingPos -1;
  32.             //if (random 1 > 0.8) then
  33.             //{
  34.                 ["spawnZombieNearTarget", [_positionsToSpawn]] call ExileClient_system_network_send;
  35.             //};   
  36.         };
  37.     } forEach _buildings;
  38. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement