Advertisement
iaretechnician

Untitled

Feb 8th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 36.45 KB | None | 0 0
  1. waituntil {!isnil "bis_fnc_init"};
  2.  
  3. BIS_MPF_remoteExecutionServer = {
  4.     if ((_this select 1) select 2 == "JIPrequest") then {
  5.         [nil,(_this select 1) select 0,"loc",rJIPEXEC,[any,any,"per","execVM","ca\Modules\Functions\init.sqf"]] call RE;
  6.     };
  7. };
  8. //plot pole fix
  9. DeadPlayerPlotObjects = [];
  10.  
  11. BIS_Effects_Burn =              {};
  12. //server_playerCharacters =     compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerCharacters.sqf";
  13. server_playerLogin =            compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf";
  14. server_playerSetup =            compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf";
  15. server_onPlayerDisconnect =     compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf";
  16. server_updateObject =           compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateObject.sqf";
  17. server_playerDied =             compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDied.sqf";
  18. server_publishObj =             compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf";
  19. server_deleteObj =              compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_deleteObj.sqf";
  20. server_swapObject =             compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_swapObject.sqf";
  21. server_publishVeh =             compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle.sqf";
  22. server_publishVeh2 =            compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle2.sqf";
  23. server_publishVeh3 =            compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle3.sqf";
  24. server_tradeObj =               compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_tradeObject.sqf";
  25. server_traders =                compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_traders.sqf";
  26. server_playerSync =             compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";
  27. server_spawnCrashSite  =        compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
  28. //Animated AN2 crashes
  29. server_spawnAN2CrashSite =  compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnAN2CrashSite.sqf";
  30. //AN2 carpackages
  31. server_spawnAN2 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnAN2.sqf";
  32. server_carepackagedrop = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_carepackagedrop.sqf";
  33. //Infected Camps
  34. spawnComposition = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\object_mapper.sqf"; // Include BIS compositions
  35. fn_bases = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fn_bases.sqf"; // Infected Camps
  36.  
  37. server_spawnEvents =            compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnEvent.sqf";
  38. //server_weather =              compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_weather.sqf";
  39. fnc_plyrHit   =                 compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";
  40. server_deaths =                 compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDeaths.sqf";
  41. server_maintainArea =           compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_maintainArea.sqf";
  42. //plot pole fix
  43. server_changePlotsOwner =       compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_changePlotsOwner.sqf";
  44.  
  45. /* PVS/PVC - Skaronator */
  46. server_sendToClient =           compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_sendToClient.sqf";
  47.  
  48. //onPlayerConnected             {[_uid,_name] call server_onPlayerConnect;};
  49. onPlayerDisconnected        {[_uid,_name] call server_onPlayerDisconnect;};
  50.  
  51. server_updateNearbyObjects = {
  52.     private["_pos"];
  53.     _pos = _this select 0;
  54.  
  55.     {
  56.         [_x, "gear"] call server_updateObject;
  57.     } count nearestObjects [_pos, dayz_updateObjects, 10];
  58. };
  59.  
  60. server_handleZedSpawn = {
  61.     private["_zed"];
  62.     _zed = _this select 0;
  63.     _zed enableSimulation false;
  64. };
  65.  
  66. zombie_findOwner = {
  67.     private["_unit"];
  68.     _unit = _this select 0;
  69.     #ifdef DZE_SERVER_DEBUG
  70.     diag_log ("CLEANUP: DELETE UNCONTROLLED ZOMBIE: " + (typeOf _unit) + " OF: " + str(_unit) );
  71.     #endif
  72.     deleteVehicle _unit;
  73. };
  74.  
  75. vehicle_handleInteract = {
  76.     private["_object"];
  77.     _object = _this select 0;
  78.     needUpdate_objects = needUpdate_objects - [_object];
  79.     [_object, "all"] call server_updateObject;
  80. };
  81.  
  82. array_reduceSizeReverse = {
  83.     private["_array","_count","_num","_newarray","_startnum","_index"];
  84.     _array = _this select 0;
  85.     _newarray = [];
  86.     _count = _this select 1;
  87.     _num = count _array;
  88.     if (_num > _count) then {
  89.         _startnum = _num - 1;
  90.         _index = _count - 1;
  91.         for "_i" from 0 to _index do {
  92.             _newarray set [(_index-_i),_array select (_startnum - _i)];
  93.         };
  94.         _array = _newarray;
  95.     };
  96.     _array
  97. };
  98.  
  99. array_reduceSize = {
  100.     private ["_array1","_array","_count","_num"];
  101.     _array1 = _this select 0;
  102.     _array = _array1 - ["Hatchet_Swing","Machete_Swing","Fishing_Swing","sledge_swing","crowbar_swing","CSGAS"];
  103.     _count = _this select 1;
  104.     _num = count _array;
  105.     if (_num > _count) then {
  106.         _array resize _count;
  107.     };
  108.     _array
  109. };
  110.  
  111. object_handleServerKilled = {
  112.     private["_unit","_objectID","_objectUID","_killer"];
  113.     _unit = _this select 0;
  114.     _killer = _this select 1;
  115.    
  116.     _objectID =  _unit getVariable ["ObjectID","0"];
  117.     _objectUID = _unit getVariable ["ObjectUID","0"];
  118.        
  119.     [_objectID,_objectUID,_killer] call server_deleteObj;
  120.    
  121.     _unit removeAllMPEventHandlers "MPKilled";
  122.     _unit removeAllEventHandlers "Killed";
  123.     _unit removeAllEventHandlers "HandleDamage";
  124.     _unit removeAllEventHandlers "GetIn";
  125.     _unit removeAllEventHandlers "GetOut";
  126. };
  127.  
  128. check_publishobject = {
  129.     private["_allowed","_object","_playername"];
  130.  
  131.     _object = _this select 0;
  132.     _playername = _this select 1;
  133.     _allowed = false;
  134.  
  135.     if ((typeOf _object) in dayz_allowedObjects) then {
  136.             //diag_log format ["DEBUG: Object: %1 published by %2 is Safe",_object, _playername];
  137.             _allowed = true;
  138.     };
  139.     _allowed
  140. };
  141.  
  142. //event Handlers
  143. eh_localCleanup = {
  144.     private ["_object"];
  145.     _object = _this select 0;
  146.     _object addEventHandler ["local", {
  147.         if(_this select 1) then {
  148.             private["_type","_unit"];
  149.             _unit = _this select 0;
  150.             _type = typeOf _unit;
  151.              _myGroupUnit = group _unit;
  152.             _unit removeAllMPEventHandlers "mpkilled";
  153.             _unit removeAllMPEventHandlers "mphit";
  154.             _unit removeAllMPEventHandlers "mprespawn";
  155.             _unit removeAllEventHandlers "FiredNear";
  156.             _unit removeAllEventHandlers "HandleDamage";
  157.             _unit removeAllEventHandlers "Killed";
  158.             _unit removeAllEventHandlers "Fired";
  159.             _unit removeAllEventHandlers "GetOut";
  160.             _unit removeAllEventHandlers "GetIn";
  161.             _unit removeAllEventHandlers "Local";
  162.             clearVehicleInit _unit;
  163.             deleteVehicle _unit;
  164.             if ((count (units _myGroupUnit) == 0) && (_myGroupUnit != grpNull)) then {
  165.                 deleteGroup _myGroupUnit;
  166.             };
  167.             //_unit = nil;
  168.             // diag_log ("CLEANUP: DELETED A " + str(_type) );
  169.         };
  170.     }];
  171. };
  172.  
  173. server_hiveWrite = {
  174.     private["_data"];
  175.         diag_log ("ATTEMPT WRITE: " + _this);
  176.     //_data = "HiveExt" callExtension _this;
  177. };
  178.  
  179. server_hiveReadWrite = {
  180.     private["_key","_resultArray","_data"];
  181.     _key = _this;
  182.         diag_log ("ATTEMPT READ/WRITE: " + _key);
  183.     //_data = "HiveExt" callExtension _key;
  184.     _resultArray = nil; //call compile format ["%1",_data];
  185.     _resultArray
  186. };
  187.  
  188. server_hiveReadWriteLarge = {
  189.     private["_key","_resultArray","_data"];
  190.     _key = _this;
  191.         diag_log ("ATTEMPT READ/WRITE LARGE: " + _key);
  192.     //_data = "HiveExt" callExtension _key;
  193.     _resultArray = nil; //call compile _data;
  194.     _resultArray
  195. };
  196.  
  197. server_checkIfTowed = {
  198.     private ["_vehicle","_player","_attached"];
  199.     if (DZE_HeliLift) then {
  200.         _vehicle =  _this select 0;
  201.         _player =   _this select 2;
  202.         _attached = _vehicle getVariable["attached",false];
  203.         if (typeName _attached == "OBJECT") then {
  204.             _player action ["eject", _vehicle];
  205.             detach _vehicle;
  206.             _vehicle setVariable["attached",false,true];
  207.             _attached setVariable["hasAttached",false,true];
  208.         };
  209.     };
  210. };
  211.  
  212. server_characterSync = {
  213.     private ["_characterID","_playerPos","_playerGear","_playerBackp","_medical","_currentState","_currentModel","_key"];
  214.     _characterID =  _this select 0;
  215.     _playerPos =    _this select 1;
  216.     _playerGear =   _this select 2;
  217.     _playerBackp =  _this select 3;
  218.     _medical =      _this select 4;
  219.     _currentState = _this select 5;
  220.     _currentModel = _this select 6;
  221.    
  222.     diag_log format["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,0,0,0,0,_currentState,0,0,_currentModel,0];
  223. };
  224.  
  225. if(isnil "dayz_MapArea") then {
  226.     dayz_MapArea = 10000;
  227. };
  228. if(isnil "DynamicVehicleArea") then {
  229.     DynamicVehicleArea = dayz_MapArea / 2;
  230. };
  231.  
  232. // Get all buildings && roads only once TODO: set variables to nil after done if nessicary
  233. MarkerPosition = getMarkerPos "center";
  234. RoadList = MarkerPosition nearRoads DynamicVehicleArea;
  235.  
  236. // Very taxing !!! but only on first startup
  237. BuildingList = [];
  238. {
  239.     if (DZE_MissionLootTable) then {
  240.         if (isClass (missionConfigFile >> "CfgBuildingLoot" >> (typeOf _x))) then
  241.         {
  242.                 BuildingList set [count BuildingList,_x];
  243.         };
  244.     } else {
  245.         if (isClass (configFile >> "CfgBuildingLoot" >> (typeOf _x))) then
  246.         {
  247.             BuildingList set [count BuildingList,_x];
  248.         };
  249.     };
  250.    
  251.    
  252. } count (MarkerPosition nearObjects ["building",DynamicVehicleArea]);
  253.  
  254. spawn_vehicles = {
  255.     private ["_random","_lastIndex","_weights","_index","_vehicle","_velimit","_qty","_isAir","_isShip","_position","_dir","_istoomany","_veh","_objPosition","_marker","_iClass","_itemTypes","_cntWeights","_itemType","_num","_allCfgLoots"];
  256.    
  257.     if (!isDedicated) exitWith { }; //Be sure the run this
  258.  
  259.     while {count AllowedVehiclesList > 0} do {
  260.         // BIS_fnc_selectRandom replaced because the index may be needed to remove the element
  261.         _index = floor random count AllowedVehiclesList;
  262.         _random = AllowedVehiclesList select _index;
  263.  
  264.         _vehicle = _random select 0;
  265.         _velimit = _random select 1;
  266.  
  267.         _qty = {_x == _vehicle} count serverVehicleCounter;
  268.  
  269.         // If under limit allow to proceed
  270.         if (_qty <= _velimit) exitWith {};
  271.  
  272.         // vehicle limit reached, remove vehicle from list
  273.         // since elements cannot be removed from an array, overwrite it with the last element && cut the last element of (as long as order is not important)
  274.         _lastIndex = (count AllowedVehiclesList) - 1;
  275.         if (_lastIndex != _index) then {
  276.             AllowedVehiclesList set [_index, AllowedVehiclesList select _lastIndex];
  277.         };
  278.         AllowedVehiclesList resize _lastIndex;
  279.     };
  280.  
  281.     if (count AllowedVehiclesList == 0) then {
  282.         diag_log("DEBUG: unable to find suitable vehicle to spawn");
  283.     } else {
  284.  
  285.         // add vehicle to counter for next pass
  286.         serverVehicleCounter set [count serverVehicleCounter,_vehicle];
  287.    
  288.         // Find Vehicle Type to better control spawns
  289.         _isAir = _vehicle isKindOf "Air";
  290.         _isShip = _vehicle isKindOf "Ship";
  291.    
  292.         if(_isShip || _isAir) then {
  293.             if(_isShip) then {
  294.                 // Spawn anywhere on coast on water
  295.                 waitUntil{!isNil "BIS_fnc_findSafePos"};
  296.                 _position = [MarkerPosition,0,DynamicVehicleArea,10,1,2000,1] call BIS_fnc_findSafePos;
  297.                 //diag_log("DEBUG: spawning boat near coast " + str(_position));
  298.             } else {
  299.                 // Spawn air anywhere that is flat
  300.                 waitUntil{!isNil "BIS_fnc_findSafePos"};
  301.                 _position = [MarkerPosition,0,DynamicVehicleArea,10,0,2000,0] call BIS_fnc_findSafePos;
  302.                 //diag_log("DEBUG: spawning air anywhere flat " + str(_position));
  303.             };
  304.        
  305.        
  306.         } else {
  307.             // Spawn around buildings && 50% near roads
  308.             if((random 1) > 0.5) then {
  309.            
  310.                 waitUntil{!isNil "BIS_fnc_selectRandom"};
  311.                 _position = RoadList call BIS_fnc_selectRandom;
  312.            
  313.                 _position = _position modelToWorld [0,0,0];
  314.            
  315.                 waitUntil{!isNil "BIS_fnc_findSafePos"};
  316.                 _position = [_position,0,10,10,0,2000,0] call BIS_fnc_findSafePos;
  317.            
  318.                 //diag_log("DEBUG: spawning near road " + str(_position));
  319.            
  320.             } else {
  321.            
  322.                 waitUntil{!isNil "BIS_fnc_selectRandom"};
  323.                 _position = BuildingList call BIS_fnc_selectRandom;
  324.            
  325.                 _position = _position modelToWorld [0,0,0];
  326.            
  327.                 waitUntil{!isNil "BIS_fnc_findSafePos"};
  328.                 _position = [_position,0,40,5,0,2000,0] call BIS_fnc_findSafePos;
  329.            
  330.                 //diag_log("DEBUG: spawning around buildings " + str(_position));
  331.        
  332.             };
  333.         };
  334.         // only proceed if two params otherwise BIS_fnc_findSafePos failed && may spawn in air
  335.         if ((count _position) == 2) then {
  336.    
  337.             _dir = round(random 180);
  338.        
  339.             _istoomany = _position nearObjects ["AllVehicles",50];
  340.             if((count _istoomany) > 0) exitWith { diag_log("DEBUG: Too many vehicles at " + str(_position)); };
  341.        
  342.             //place vehicle
  343.             _veh = createVehicle [_vehicle, _position, [], 0, "CAN_COLLIDE"];
  344.             _veh setdir _dir;
  345.             _veh setpos _position;     
  346.            
  347.             if(DZEdebug) then {
  348.                 _marker = createMarker [str(_position) , _position];
  349.                 _marker setMarkerShape "ICON";
  350.                 _marker setMarkerType "DOT";
  351.                 _marker setMarkerText _vehicle;
  352.             }; 
  353.        
  354.             // Get position with ground
  355.             _objPosition = getPosATL _veh;
  356.        
  357.             clearWeaponCargoGlobal  _veh;
  358.             clearMagazineCargoGlobal  _veh;
  359.             // _veh setVehicleAmmo DZE_vehicleAmmo;
  360.  
  361.             // Add 0-3 loots to vehicle using random cfgloots
  362.             _num = floor(random 4);
  363.             _allCfgLoots = ["trash","civilian","food","generic","medical","military","policeman","hunter","worker","clothes","militaryclothes","specialclothes","trash"];
  364.            
  365.             for "_x" from 1 to _num do {
  366.                 _iClass = _allCfgLoots call BIS_fnc_selectRandom;
  367.  
  368.                 _itemTypes = [];
  369.                 if (DZE_MissionLootTable) then{
  370.                     {
  371.                         _itemTypes set[count _itemTypes, _x select 0]
  372.                     } count getArray(missionConfigFile >> "cfgLoot" >> _iClass);
  373.                 }
  374.                 else {
  375.                     {
  376.                         _itemTypes set[count _itemTypes, _x select 0]
  377.                     } count getArray(configFile >> "cfgLoot" >> _iClass);
  378.                 };
  379.  
  380.                 _index = dayz_CLBase find _iClass;
  381.                 _weights = dayz_CLChances select _index;
  382.                 _cntWeights = count _weights;
  383.                
  384.                 _index = floor(random _cntWeights);
  385.                 _index = _weights select _index;
  386.                 _itemType = _itemTypes select _index;
  387.                 _veh addMagazineCargoGlobal [_itemType,1];
  388.                 //diag_log("DEBUG: spawed loot inside vehicle " + str(_itemType));
  389.             };
  390.  
  391.             [_veh,[_dir,_objPosition],_vehicle,true,"0"] call server_publishVeh;
  392.         };
  393.     };
  394. };
  395.  
  396. spawn_ammosupply = {
  397.     private ["_position","_veh","_istoomany","_marker","_spawnveh","_WreckList"];
  398.     if (isDedicated) then {
  399.         _WreckList = ["Supply_Crate_DZE"];
  400.         waitUntil{!isNil "BIS_fnc_selectRandom"};
  401.         _position = RoadList call BIS_fnc_selectRandom;
  402.         _position = _position modelToWorld [0,0,0];
  403.         waitUntil{!isNil "BIS_fnc_findSafePos"};
  404.         _position = [_position,5,20,5,0,2000,0] call BIS_fnc_findSafePos;
  405.         if ((count _position) == 2) then {
  406.  
  407.             _istoomany = _position nearObjects ["All",5];
  408.            
  409.             if((count _istoomany) > 0) exitWith { diag_log("DEBUG VEIN: Too many at " + str(_position)); };
  410.            
  411.             _spawnveh = _WreckList call BIS_fnc_selectRandom;
  412.  
  413.             if(DZEdebug) then {
  414.                 _marker = createMarker [str(_position) , _position];
  415.                 _marker setMarkerShape "ICON";
  416.                 _marker setMarkerType "DOT";
  417.                 _marker setMarkerText str(_spawnveh);
  418.             };
  419.            
  420.             _veh = createVehicle [_spawnveh,_position, [], 0, "CAN_COLLIDE"];
  421.             _veh enableSimulation false;
  422.             _veh setDir round(random 360);
  423.             _veh setpos _position;
  424.             _veh setVariable ["ObjectID","1",true];
  425.         };
  426.     };
  427. };
  428.  
  429. DZE_LocalRoadBlocks = [];
  430.  
  431. spawn_roadblocks = {
  432.     private ["_position","_veh","_istoomany","_marker","_spawnveh","_WreckList"];
  433.     _WreckList = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
  434.    
  435.     waitUntil{!isNil "BIS_fnc_selectRandom"};
  436.     if (isDedicated) then {
  437.    
  438.         _position = RoadList call BIS_fnc_selectRandom;
  439.        
  440.         _position = _position modelToWorld [0,0,0];
  441.        
  442.         waitUntil{!isNil "BIS_fnc_findSafePos"};
  443.         _position = [_position,0,10,5,0,2000,0] call BIS_fnc_findSafePos;
  444.        
  445.         if ((count _position) == 2) then {
  446.             // Get position with ground
  447.            
  448.             _istoomany = _position nearObjects ["All",5];
  449.        
  450.             if((count _istoomany) > 0) exitWith { diag_log("DEBUG: Too many at " + str(_position)); };
  451.            
  452.             waitUntil{!isNil "BIS_fnc_selectRandom"};
  453.             _spawnveh = _WreckList call BIS_fnc_selectRandom;
  454.  
  455.             if(DZEdebug) then {
  456.                 _marker = createMarker [str(_position) , _position];
  457.                 _marker setMarkerShape "ICON";
  458.                 _marker setMarkerType "DOT";
  459.                 _marker setMarkerText str(_spawnveh);
  460.             };
  461.  
  462.             _veh = createVehicle [_spawnveh,_position, [], 0, "CAN_COLLIDE"];
  463.             _veh enableSimulation false;
  464.  
  465.             _veh setDir round(random 360); // Randomize placement a bit
  466.             _veh setpos _position;
  467.  
  468.             _veh setVariable ["ObjectID","1",true];
  469.         };
  470.    
  471.     };
  472.    
  473. };
  474.  
  475. spawn_mineveins = {
  476.     private ["_position","_veh","_istoomany","_marker","_spawnveh","_positions"];
  477.  
  478.     if (isDedicated) then {
  479.        
  480.         _position = [getMarkerPos "center",0,(HeliCrashArea*0.75),10,0,2000,0] call BIS_fnc_findSafePos;
  481.  
  482.         if ((count _position) == 2) then {
  483.            
  484.             _positions = selectBestPlaces [_position, 500, "(1 + forest) * (1 + hills) * (1 - houses) * (1 - sea)", 10, 5];
  485.  
  486.             _position = (_positions call BIS_fnc_selectRandom) select 0;
  487.  
  488.             // Get position with ground
  489.             _istoomany = _position nearObjects ["All",10];
  490.        
  491.             if((count _istoomany) > 0) exitWith { diag_log("DEBUG VEIN: Too many objects at " + str(_position)); };
  492.  
  493.             if(isOnRoad _position) exitWith { diag_log("DEBUG VEIN: on road " + str(_position)); };
  494.            
  495.             _spawnveh = ["Iron_Vein_DZE","Iron_Vein_DZE","Iron_Vein_DZE","Iron_Vein_DZE","Iron_Vein_DZE","Silver_Vein_DZE","Silver_Vein_DZE","Silver_Vein_DZE","Gold_Vein_DZE","Gold_Vein_DZE"] call BIS_fnc_selectRandom;
  496.  
  497.             if(DZEDebug) then {
  498.                 _marker = createMarker [str(_position) , _position];
  499.                 _marker setMarkerShape "ICON";
  500.                 _marker setMarkerType "DOT";
  501.                 _marker setMarkerText str(_spawnveh);
  502.             };
  503.            
  504.             //diag_log("DEBUG: Spawning a crashed " + _spawnveh + " with " + _spawnloot + " at " + str(_position));
  505.             _veh = createVehicle [_spawnveh,_position, [], 0, "CAN_COLLIDE"];
  506.             _veh enableSimulation false;
  507.  
  508.             // Randomize placement a bit
  509.             _veh setDir round(random 360);
  510.             _veh setpos _position;
  511.  
  512.             _veh setVariable ["ObjectID","1",true];
  513.  
  514.        
  515.         };
  516.     };
  517. };
  518.  
  519. //Sector FNG inland
  520. execVM "\z\addons\dayz_server\CustomBuildings\sectorfng\sectorfng_init.sqf";
  521.  
  522. //IXXO
  523. execVM "\z\addons\dayz_server\CustomBuildings\balota.sqf";
  524. execVM "\z\addons\dayz_server\CustomBuildings\kamenka.sqf";
  525. execVM "\z\addons\dayz_server\CustomBuildings\Krasno.sqf";
  526. execVM "\z\addons\dayz_server\CustomBuildings\northeast.sqf";
  527. execVM "\z\addons\dayz_server\CustomBuildings\vybor.sqf";
  528. execVM "\z\addons\dayz_server\CustomBuildings\basebor.sqf";
  529. execVM "\z\addons\dayz_server\CustomBuildings\basedichina.sqf";
  530. execVM "\z\addons\dayz_server\CustomBuildings\basenovy.sqf";
  531. execVM "\z\addons\dayz_server\CustomBuildings\Zeleno.sqf";
  532.  
  533. //Caves
  534. execVM "\z\addons\dayz_server\CustomBuildings\Prud_Cave.sqf";
  535. execVM "\z\addons\dayz_server\CustomBuildings\North_Cave.sqf";
  536. execVM "\z\addons\dayz_server\CustomBuildings\South_Cave.sqf";
  537.  
  538. //Kameka mine
  539. execVM "\z\addons\dayz_server\CustomBuildings\mine_grotte.sqf";//removed ore and added to separate spawn
  540. execVM "\z\addons\dayz_server\CustomBuildings\mine_grotte_ore.sqf";//ore
  541. execVM "\z\addons\dayz_server\CustomBuildings\box_la_grotte.sqf";
  542.  
  543. //CDC Balota + Trader
  544. execVM "\z\addons\dayz_server\CustomBuildings\Trader_CDC_Balota.sqf";
  545.  
  546. //Altar
  547. execVM "\z\addons\dayz_server\CustomBuildings\altar.sqf";
  548.  
  549. //Golden River MIne
  550. execVM "\z\addons\dayz_server\CustomBuildings\golden_river_mine.sqf";
  551.  
  552. //cherno heliport
  553. execVM "\z\addons\dayz_server\CustomBuildings\heliport.sqf";
  554.  
  555. //beached aircraft carrier
  556. execVM "\z\addons\dayz_server\CustomBuildings\aircraftcarrier.sqf";
  557.  
  558. //BANK
  559. execVM "\z\addons\dayz_server\CustomBuildings\banks\nbank_novy_sobor.sqf";
  560.  
  561. //East coast cherno
  562. execVM "\z\addons\dayz_server\CustomBuildings\Eastcoast.sqf";
  563. execVM "\z\addons\dayz_server\CustomBuildings\Eastcoast2.sqf";
  564.  
  565. //Black Lake Castle
  566. execVM "\z\addons\dayz_server\CustomBuildings\blacklakecastle.sqf";
  567.  
  568. execVM "\z\addons\dayz_server\CustomBuildings\kabinocheckpoint.sqf";
  569. execVM "\z\addons\dayz_server\CustomBuildings\otmel.sqf";
  570.  
  571. //road from dam to sector FNG
  572. execVM "\z\addons\dayz_server\CustomBuildings\roadpobeda.sqf";
  573.  
  574. //Black forest outpost
  575. execVM "\z\addons\dayz_server\CustomBuildings\blackforestoutpost.sqf";
  576.  
  577. //Electro
  578. execVM "\z\addons\dayz_server\CustomBuildings\electro.sqf";
  579. execVM "\z\addons\dayz_server\CustomBuildings\electroZI.sqf";
  580.  
  581. //Cherno
  582. execVM "\z\addons\dayz_server\CustomBuildings\Cherno.sqf";
  583.  
  584.  
  585. if(isnil "DynamicVehicleDamageLow") then {
  586.     DynamicVehicleDamageLow = 0;
  587. };
  588. if(isnil "DynamicVehicleDamageHigh") then {
  589.     DynamicVehicleDamageHigh = 100;
  590. };
  591.  
  592. if(isnil "DynamicVehicleFuelLow") then {
  593.     DynamicVehicleFuelLow = 0;
  594. };
  595. if(isnil "DynamicVehicleFuelHigh") then {
  596.     DynamicVehicleFuelHigh = 100;
  597. };
  598.  
  599. if(isnil "DZE_DiagFpsSlow") then {
  600.     DZE_DiagFpsSlow = false;
  601. };
  602. if(isnil "DZE_DiagFpsFast") then {
  603.     DZE_DiagFpsFast = false;
  604. };
  605. if(isnil "DZE_DiagVerbose") then {
  606.     DZE_DiagVerbose = false;
  607. };
  608.  
  609. dze_diag_fps = {
  610.     if(DZE_DiagVerbose) then {
  611.         diag_log format["DEBUG FPS : %1 OBJECTS: %2 : PLAYERS: %3", diag_fps,(count (allMissionObjects "")),(playersNumber west)];
  612.     } else {
  613.         diag_log format["DEBUG FPS : %1", diag_fps];
  614.     };
  615. };
  616.  
  617. // Damage generator function
  618. generate_new_damage = {
  619.     private ["_damage"];
  620.     _damage = ((random(DynamicVehicleDamageHigh-DynamicVehicleDamageLow))+DynamicVehicleDamageLow) / 100;
  621.     _damage;
  622. };
  623.  
  624. // Damage generator fuction
  625. generate_exp_damage = {
  626.     private ["_damage"];
  627.     _damage = ((random(DynamicVehicleDamageHigh-DynamicVehicleDamageLow))+DynamicVehicleDamageLow) / 100;
  628.    
  629.     // limit this to 85% since vehicle would blow up otherwise.
  630.     //if(_damage >= 0.85) then {
  631.     //  _damage = 0.85;
  632.     //};
  633.     _damage;
  634. };
  635.  
  636. server_getDiff =    {
  637.     private["_variable","_object","_vNew","_vOld","_result"];
  638.     _variable = _this select 0;
  639.     _object =   _this select 1;
  640.     _vNew =     _object getVariable[_variable,0];
  641.     _vOld =     _object getVariable[(_variable + "_CHK"),_vNew];
  642.     _result =   0;
  643.     if (_vNew < _vOld) then {
  644.         //JIP issues
  645.         _vNew = _vNew + _vOld;
  646.         _object getVariable[(_variable + "_CHK"),_vNew];
  647.     } else {
  648.         _result = _vNew - _vOld;
  649.         _object setVariable[(_variable + "_CHK"),_vNew];
  650.     };
  651.     _result
  652. };
  653.  
  654. server_getDiff2 =   {
  655.     private["_variable","_object","_vNew","_vOld","_result"];
  656.     _variable = _this select 0;
  657.     _object =   _this select 1;
  658.     _vNew =     _object getVariable[_variable,0];
  659.     _vOld =     _object getVariable[(_variable + "_CHK"),_vNew];
  660.     _result = _vNew - _vOld;
  661.     _object setVariable[(_variable + "_CHK"),_vNew];
  662.     _result
  663. };
  664.  
  665. dayz_objectUID = {
  666.     private["_position","_dir","_key","_object"];
  667.     _object = _this;
  668.     _position = getPosATL _object;
  669.     _dir = direction _object;
  670.     _key = [_dir,_position] call dayz_objectUID2;
  671.     _key
  672. };
  673.  
  674. dayz_objectUID2 = {
  675.     private["_position","_dir","_key"];
  676.     if((count _this) == 2) then{
  677.         _dir = _this select 0;
  678.         _key = "";
  679.         _position = _this select 1;
  680.         {
  681.             _x = _x * 10;
  682.             if ( _x < 0 ) then { _x = _x * -10 };
  683.             _key = _key + str(round(_x));
  684.         } count _position;
  685.         _key = _key + str(round(_dir));
  686.     }else{
  687.         _key = "";
  688.         _position = _this select 1;
  689.         {
  690.             _x = _x * 10;
  691.             if ( _x < 0 ) then { _x = _x * -10 };
  692.             _key = _key + str(round(_x));
  693.         } count _position;
  694.        
  695.         _vecCnt = 0;
  696.         _vector = _this select 2;
  697.         {
  698.             _set = _x;
  699.             {
  700.                 _vecCnt = _vecCnt + (round (_x * 100))
  701.                
  702.             } foreach _set;
  703.            
  704.         } foreach _vector;
  705.         if(_vecCnt < 0)then{
  706.             _vecCnt = ((_vecCnt * -1) * 3);
  707.         };
  708.         _key = _key + str(_vecCnt);
  709.     };
  710.     _key
  711. };
  712.  
  713. dayz_objectUID3 = {
  714.     private["_position","_dir","_key"];
  715.     _dir = _this select 0;
  716.     _key = "";
  717.     _position = _this select 1;
  718.     {
  719.         _x = _x * 10;
  720.         if ( _x < 0 ) then { _x = _x * -10 };
  721.         _key = _key + str(round(_x));
  722.     } count _position;
  723.     _key = _key + str(round(_dir + time));
  724.     _key
  725. };
  726.  
  727. dayz_recordLogin = {
  728.     private["_key"];
  729.     diag_log format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
  730. };
  731.  
  732. //DZGM
  733. currentInvites = [];
  734. publicVariable "currentInvites";
  735.  
  736. dayz_perform_purge = {
  737.     if(!isNull(_this)) then {
  738.         _group = group _this;
  739.         _this removeAllMPEventHandlers "mpkilled";
  740.         _this removeAllMPEventHandlers "mphit";
  741.         _this removeAllMPEventHandlers "mprespawn";
  742.         _this removeAllEventHandlers "FiredNear";
  743.         _this removeAllEventHandlers "HandleDamage";
  744.         _this removeAllEventHandlers "Killed";
  745.         _this removeAllEventHandlers "Fired";
  746.         _this removeAllEventHandlers "GetOut";
  747.         _this removeAllEventHandlers "GetIn";
  748.         _this removeAllEventHandlers "Local";
  749.         clearVehicleInit _this;
  750.         deleteVehicle _this;
  751.         if ((count (units _group) == 0) && (_group != grpNull)) then {
  752.             deleteGroup _group;
  753.         };
  754.     };
  755. };
  756.  
  757. dayz_perform_purge_player = {
  758.  
  759.     private ["_countr","_backpack","_backpackType","_backpackWpn","_backpackMag","_objWpnTypes","_objWpnQty","_location","_dir","_holder","_weapons","_magazines"];
  760.     diag_log ("Purging player: " + str(_this));
  761.  
  762.     if(!isNull(_this)) then {
  763.  
  764.         _location = getPosATL _this;
  765.         _dir = getDir _this;
  766.  
  767.         _holder = createVehicle ["GraveDZE", _location, [], 0, "CAN_COLLIDE"];
  768.         _holder setDir _dir;
  769.         _holder setPosATL _location;
  770.  
  771.         _holder enableSimulation false;
  772.  
  773.         _weapons = weapons _this;
  774.         _magazines = magazines _this;
  775.  
  776.         // find backpack
  777.         if(!(isNull unitBackpack _this)) then {
  778.             _backpack = unitBackpack _this;
  779.             _backpackType = typeOf _backpack;
  780.             _backpackWpn = getWeaponCargo _backpack;
  781.             _backpackMag = getMagazineCargo _backpack;
  782.  
  783.             _holder addBackpackCargoGlobal [_backpackType,1];
  784.  
  785.             // add items from backpack
  786.             _objWpnTypes = _backpackWpn select 0;
  787.             _objWpnQty = _backpackWpn select 1;
  788.             _countr = 0;
  789.             {
  790.                 _holder addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
  791.                 _countr = _countr + 1;
  792.             } count _objWpnTypes;
  793.  
  794.             // add backpack magazine items
  795.             _objWpnTypes = _backpackMag select 0;
  796.             _objWpnQty = _backpackMag select 1;
  797.             _countr = 0;
  798.             {
  799.                 _holder addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
  800.                 _countr = _countr + 1;
  801.             } count _objWpnTypes;
  802.         };
  803.     };
  804.  
  805.     // add weapons
  806.     {
  807.         _holder addWeaponCargoGlobal [_x, 1];
  808.     } count _weapons;
  809.  
  810.     // add mags
  811.     {
  812.         _holder addMagazineCargoGlobal [_x, 1];
  813.     } count _magazines;
  814.     _group = group _this;
  815.     _this removeAllMPEventHandlers "mpkilled";
  816.     _this removeAllMPEventHandlers "mphit";
  817.     _this removeAllMPEventHandlers "mprespawn";
  818.     _this removeAllEventHandlers "FiredNear";
  819.     _this removeAllEventHandlers "HandleDamage";
  820.     _this removeAllEventHandlers "Killed";
  821.     _this removeAllEventHandlers "Fired";
  822.     _this removeAllEventHandlers "GetOut";
  823.     _this removeAllEventHandlers "GetIn";
  824.     _this removeAllEventHandlers "Local";
  825.     clearVehicleInit _this;
  826.     deleteVehicle _this;
  827.     if ((count (units _group) == 0) && (_group != grpNull)) then {
  828.         deleteGroup _group;
  829.     };
  830.     //  _this = nil;
  831. };
  832.  
  833.  
  834. dayz_removePlayerOnDisconnect = {
  835.     if(!isNull(_this)) then {
  836.         _group = group _this;
  837.         _this removeAllMPEventHandlers "mphit";
  838.         deleteVehicle _this;
  839.         deleteGroup (group _this);
  840.     };
  841. };
  842.  
  843. server_timeSync = {
  844.     //Send request
  845.     private ["_hour","_minute","_date","_key","_result","_outcome"];
  846.         //_key = "CHILD:307:";
  847.     //_result = _key call server_hiveReadWrite;
  848.     //_outcome = _result select 0;
  849.     //if(_outcome == "PASS") then {
  850.         _date = date; //_result select 1;
  851.        
  852.     //  if(dayz_fullMoonNights) then {
  853.     //      _hour = _date select 3;
  854.     //      _minute = _date select 4;
  855.     //      //Force full moon nights
  856.     //      _date = [2013,8,3,_hour,_minute];
  857.     //  };
  858.         //
  859.     //  setDate _date;
  860.         PVDZE_plr_SetDate = _date;
  861.         publicVariable "PVDZE_plr_SetDate";
  862.         diag_log ("TIME SYNC: Local Time set to " + str(_date));   
  863.     //};
  864. };
  865.  
  866. // must spawn these
  867. server_spawncleanDead = {
  868.     private ["_deathTime","_delQtyZ","_delQtyP","_qty","_allDead"];
  869.     _allDead = allDead;
  870.     _delQtyZ = 0;
  871.     _delQtyP = 0;
  872.     {
  873.         if (local _x) then {
  874.             if (_x isKindOf "zZombie_Base") then
  875.             {
  876.                 _x call dayz_perform_purge;
  877.                 sleep 0.05;
  878.                 _delQtyZ = _delQtyZ + 1;
  879.             } else {
  880.                 if (_x isKindOf "CAManBase") then {
  881.                     _deathTime = _x getVariable ["processedDeath", diag_tickTime];
  882.                     if (diag_tickTime - _deathTime > 1800) then {
  883.                         _x call dayz_perform_purge_player;
  884.                         sleep 0.025;
  885.                         _delQtyP = _delQtyP + 1;
  886.                     };
  887.                 };
  888.             };
  889.         };
  890.         sleep 0.025;
  891.     } count _allDead;
  892.     if (_delQtyZ > 0 || _delQtyP > 0) then {
  893.         _qty = count _allDead;
  894.         diag_log (format["CLEANUP: Deleted %1 players && %2 zombies out of %3 dead",_delQtyP,_delQtyZ,_qty]);
  895.     };
  896. };
  897. server_cleanupGroups = {
  898.     if (DZE_DYN_AntiStuck3rd > 3) then { DZE_DYN_GroupCleanup = nil; DZE_DYN_AntiStuck3rd = 0; };
  899.     if(!isNil "DZE_DYN_GroupCleanup") exitWith {  DZE_DYN_AntiStuck3rd = DZE_DYN_AntiStuck3rd + 1;};
  900.     DZE_DYN_GroupCleanup = true;
  901.     {
  902.         if ((count (units _x) == 0) && (_x != grpNull)) then {
  903.             deleteGroup _x;
  904.         };
  905.         sleep 0.001;
  906.     } count allGroups;
  907.     DZE_DYN_GroupCleanup = nil;
  908. };
  909.  
  910. server_checkHackers = {
  911.     if (DZE_DYN_AntiStuck2nd > 3) then { DZE_DYN_HackerCheck = nil; DZE_DYN_AntiStuck2nd = 0; };
  912.     if(!isNil "DZE_DYN_HackerCheck") exitWith {  DZE_DYN_AntiStuck2nd = DZE_DYN_AntiStuck2nd + 1;};
  913.     DZE_DYN_HackerCheck = true;
  914.     {
  915.     if (!((isNil "_x") || {(isNull _x)})) then {
  916.         if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle) && (vehicle _x getVariable ["MalSar",0] !=1) && (vehicle _x getVariable ["Sarge",0] !=1) && (vehicle _x getVariable ["Mission",0] !=1)) then {
  917.             diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
  918.             (vehicle _x) setDamage 1;
  919.             _x setDamage 1;
  920.             sleep 0.25;
  921.         };
  922.     };
  923.         sleep 0.001;
  924.     } count allUnits;
  925.     DZE_DYN_HackerCheck = nil;
  926. };
  927. server_spawnCleanFire = {
  928.     private ["_delQtyFP","_qty","_delQtyNull","_missionFires"];
  929.     _missionFires = allMissionObjects "Land_Fire_DZ";
  930.     _delQtyFP = 0;
  931.     {
  932.         if (local _x) then {
  933.             deleteVehicle _x;
  934.             sleep 0.025;
  935.             _delQtyFP = _delQtyFP + 1;
  936.         };
  937.         sleep 0.001;
  938.     } count _missionFires;
  939.     if (_delQtyFP > 0) then {
  940.         _qty = count _missionFires;
  941.         diag_log (format["CLEANUP: Deleted %1 fireplaces out of %2",_delQtyFP,_qty]);
  942.     };
  943. };
  944. server_spawnCleanLoot = {
  945.     private ["_created","_delQty","_nearby","_age","_keep","_qty","_missionObjs","_dateNow"];
  946.     if (DZE_DYN_AntiStuck > 3) then { DZE_DYN_cleanLoot = nil; DZE_DYN_AntiStuck = 0; };
  947.     if(!isNil "DZE_DYN_cleanLoot") exitWith {  DZE_DYN_AntiStuck = DZE_DYN_AntiStuck + 1;};
  948.     DZE_DYN_cleanLoot = true;
  949.  
  950.     _missionObjs =  allMissionObjects "ReammoBox";
  951.     _delQty = 0;
  952.     _dateNow = (DateToNumber date);
  953.     {
  954.         if (!isNull _x) then {
  955.             _keep = _x getVariable["permaLoot", false];
  956.             if (!_keep) then {
  957.                 _created = _x getVariable["created", -0.1];
  958.                 if (_created == -0.1) then{
  959.                     _x setVariable["created", _dateNow, false];
  960.                     _created = _dateNow;
  961.                 }
  962.                 else {
  963.                     _age = (_dateNow - _created) * 525948;
  964.                     if (_age > 20) then{
  965.                         _nearby = { (isPlayer _x) && (alive _x) } count(_x nearEntities[["CAManBase", "AllVehicles"], 130]);
  966.                         if (_nearby == 0) then{
  967.                             deleteVehicle _x;
  968.                             sleep 0.025;
  969.                             _delQty = _delQty + 1;
  970.                         };
  971.                     };
  972.                 };
  973.             };
  974.         };
  975.         sleep 0.001;
  976.     } count _missionObjs;
  977.     if (_delQty > 0) then {
  978.         _qty = count _missionObjs;
  979.         diag_log (format["CLEANUP: Deleted %1 Loot Piles out of %2",_delQty,_qty]);
  980.     };
  981.     DZE_DYN_cleanLoot = nil;
  982. };
  983.  
  984. server_spawnCleanAnimals = {
  985.     private ["_pos","_delQtyAnimal","_qty","_missonAnimals","_nearby"];
  986.     _missonAnimals = entities "CAAnimalBase";
  987.     _delQtyAnimal = 0;
  988.     {
  989.         if (local _x) then {
  990.             _x call dayz_perform_purge;
  991.             sleep 0.05;
  992.             _delQtyAnimal = _delQtyAnimal + 1;
  993.         } else {
  994.             if (!alive _x) then {
  995.                 _pos = getPosATL _x;
  996.                 if (count _pos > 0) then {
  997.                     _nearby = {(isPlayer _x) && (alive _x)} count (_pos nearEntities [["CAManBase","AllVehicles"], 130]);
  998.                     if (_nearby==0) then {
  999.                         _x call dayz_perform_purge;
  1000.                         sleep 0.05;
  1001.                         _delQtyAnimal = _delQtyAnimal + 1;
  1002.                     };
  1003.                 };
  1004.             };
  1005.         };
  1006.         sleep 0.001;
  1007.     } count _missonAnimals;
  1008.     if (_delQtyAnimal > 0) then {
  1009.         _qty = count _missonAnimals;
  1010.         diag_log (format["CLEANUP: Deleted %1 Animals out of %2",_delQtyAnimal,_qty]);
  1011.     };
  1012. };
  1013.  
  1014. server_logUnlockLockEvent = {
  1015.     private["_player", "_obj", "_objectID", "_objectUID", "_statusText", "_status"];
  1016.     _player = _this select 0;
  1017.     _obj = _this select 1;
  1018.     _status = _this select 2;
  1019.     if (!isNull(_obj)) then {
  1020.         _objectID = _obj getVariable["ObjectID", "0"];
  1021.         _objectUID = _obj getVariable["ObjectUID", "0"];
  1022.         _statusText = "UNLOCKED";
  1023.         if (_status) then {
  1024.             [_obj, "gear"] call server_updateObject;
  1025.             _statusText = "LOCKED";
  1026.         };
  1027.         diag_log format["SAFE %5: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (getPlayerUID _player), _statusText];
  1028.     };
  1029. };
  1030.  
  1031.  
  1032.  
  1033. //Enhanced Spawn Selection
  1034. donorListBase = [
  1035.     "10332294", //ebay example
  1036.     "0",
  1037.     "0"
  1038. ];
  1039.  
  1040. donorListBases = [
  1041.     [2324.2893,15365.067,0], //ebay example
  1042.     [],
  1043.     []
  1044. ];
  1045. donorClassLvl1 = ["120958982","110704838","108784838"];
  1046. donorClassLvl2 = ["120958982","110704838","108784838"];
  1047. donorClassLvl3 = ["120958982","110704838","108784838"];
  1048. donorListClass = [
  1049.     "120958982", //sheep
  1050.     "110704838",
  1051.     "108784838"
  1052. ];
  1053.  
  1054. donorListClasses = [
  1055.     ["ebay's Loadout","GUE_Soldier_2_DZ",["100Rnd_762x51_M240","100Rnd_762x51_M240","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine","Skin_GUE_Soldier_Sniper_DZ","ItemBandage"],["Mk_48_DZ","UZI_SD_EP1","Binocular_Vector","NVGoggles","ItemCompass","ItemHatchet","ItemKnife","Itemmatchbox","Itemetool","ItemSledge","ItemWatch","ItemGPS","ItemCrowbar"],"DZ_Backpack_EP1",["5Rnd_86x70_L115A1","5Rnd_86x70_L115A1","5Rnd_86x70_L115A1"],["BAF_LRR_scoped_W"],0,0],
  1056.     [],
  1057.     []
  1058. ];
  1059. DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemPainkiller","ItemWaterbottle","FoodPistachio","17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17"];
  1060. DefaultWeapons = ["ItemMap","ItemFlashlight","ItemToolbox","glock17_EP1"];
  1061. DefaultBackpack = "DZ_Assault_Pack_EP1";
  1062.  
  1063. presetClasses = [
  1064.     ["Bandit","Bandit2_DZ",["10x_303","10x_303"],["LeeEnfield"],"",[],[],0,-2000],
  1065.     ["Hero","Soldier_Sniper_PMC_DZ",["10x_303","10x_303"],["LeeEnfield"],"",[],[],0,5000],
  1066.     ["Survivor","Survivor2_DZ",[],[],"",[],[],0,0],
  1067.     ["British Soldier","Soldier1_DZ",["30Rnd_556x45_Stanag","30Rnd_556x45_Stanag"],["BAF_L85A2_RIS_Holo"],"",[],[],0,0],
  1068.     ["Business Person","Functionary1_EP1_DZ",["8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","ItemBriefcaseS20oz"],["Remington870_lamp"],"",[],[],0,0],
  1069.     ["Civilian","Haris_Press_EP1_DZ",["15Rnd_W1866_Slug","15Rnd_W1866_Slug"],["Winchester1866"],"",[],[],0,0],
  1070.     ["Czech Soldier","CZ_Special_Forces_GL_DES_EP1_DZ",["30Rnd_762x39_SA58","30Rnd_762x39_SA58"],["Sa58P_EP1"],"",[],[],0,0],
  1071.     ["Police Officer","RU_Policeman_DZ",["8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug"],["M1014"],"",[],[],0,0],
  1072.     ["Rocker","Rocker1_DZ",["30Rnd_9x19_MP5SD","30Rnd_9x19_MP5SD"],["MP5SD"],"",[],[],0,0],
  1073.     ["Terrorist","TK_INS_Soldier_EP1_DZ",["30Rnd_545x39_AK","30Rnd_545x39_AK"],["AK_74"],"",[],[],0,0],
  1074.     ["US Soldier","Graves_Light_DZ",["30Rnd_556x45_Stanag","30Rnd_556x45_Stanag"],["M4A1"],"",[],[],0,0],
  1075.     ["Scout*","INS_Soldier_AR_DZ",["100Rnd_556x45_BetaCMag","100Rnd_556x45_BetaCMag","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine"],["m16a4_acg","M9SD","Binocular_Vector"],"DZ_ALICE_Pack_EP1",[],[],1,0],
  1076.     ["Specialist**","INS_Soldier_CO_DZ",["100Rnd_762x51_M240","100Rnd_762x51_M240","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine"],["Mk_48_DZ","UZI_SD_EP1","Binocular_Vector"],"DZ_British_ACU",[],[],2,0],
  1077.     ["Sniper***","GUE_Soldier_Sniper_DZ",["20Rnd_762x51_DMR","20Rnd_762x51_DMR","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine"],["DMR","UZI_SD_EP1","Binocular_Vector"],"DZ_Backpack_EP1",[],[],3,0]
  1078. ];
  1079.  
  1080. publicVariable "donorListBase";
  1081. publicVariable "donorListBases";
  1082. publicVariable "donorListClass";
  1083. publicVariable "donorListClasses";
  1084. publicVariable "DefaultMagazines";
  1085. publicVariable "DefaultWeapons";
  1086. publicVariable "DefaultBackpack";
  1087. publicVariable "donorClassLvl1";
  1088. publicVariable "donorClassLvl2";
  1089. publicVariable "donorClassLvl3";
  1090. publicVariable "presetClasses";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement