Advertisement
Guest User

Init.sqf

a guest
Oct 7th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.20 KB | None | 0 0
  1. /*
  2. INITILIZATION
  3. */
  4. startLoadingScreen ["","RscDisplayLoadCustom"];
  5. cutText ["","BLACK OUT"];
  6. enableSaving [false, false];
  7.  
  8. //REALLY IMPORTANT VALUES
  9. dayZ_instance = 867; //The instance
  10. dayzHiveRequest = [];
  11. initialized = false;
  12. dayz_previousID = 0;
  13. dayzLoginRecord = nil;
  14.  
  15. //disable greeting menu
  16. player setVariable ["BIS_noCoreConversations", true];
  17. //disable radio messages to be heard and shown in the left lower corner of the screen
  18. enableRadio false;
  19.  
  20. // DayZ Epoch config
  21. spawnShoremode = 1; // Default = 1 (on shore)
  22. spawnArea= 1500; // Default = 1500
  23. MaxHeliCrashes= 10; // Default = 5
  24. MaxVehicleLimit = 350; // Default = 50
  25. MaxDynamicDebris = 500; // Default = 100
  26. dayz_MapArea = 14000; // Default = 10000
  27. dayz_maxLocalZombies = 30; // Default = 30
  28.  
  29.  
  30. EpochEvents = [["any","any","any","any",30,"crash_spawner"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
  31.  
  32. DefaultMagazines = ["8Rnd_9x18_Makarov","8Rnd_9x18_Makarov","ItemBandage","ItemBandage","ItemMorphine","ItemPainkiller","ItemWaterbottleUnfilled"];
  33. DefaultWeapons = ["ItemFlashlight","ItemWatch","ItemCompass","Makarov"];
  34. DefaultBackpack = "DZ_Patrol_Pack_EP1";
  35. DefaultBackpackWeapon = "";
  36.  
  37. dayz_fullMoonNights = true;
  38.  
  39. //Load in compiled functions
  40. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
  41. progressLoadingScreen 0.1;
  42. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; //Initilize the publicVariable event handlers
  43. progressLoadingScreen 0.2;
  44. call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; //Functions used by CLIENT for medical
  45. progressLoadingScreen 0.4;
  46. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf"; //Compile regular functions
  47. progressLoadingScreen 0.5;
  48. call compile preprocessFileLineNumbers "server_traders.sqf"; //Compile trader configs
  49. progressLoadingScreen 1.0;
  50. call compile preprocessFileLineNumbers "scripts\compiles.sqf"; //Compile custom compiles
  51.  
  52. "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";
  53.  
  54. /* BIS_Effects_* fixes from Dwarden */
  55. BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf";
  56. BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf";
  57. BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf";
  58.  
  59. BIS_Effects_globalEvent = {
  60. BIS_effects_gepv = _this;
  61. publicVariable "BIS_effects_gepv";
  62. _this call BIS_Effects_startEvent;
  63. };
  64.  
  65. BIS_Effects_startEvent = {
  66. switch (_this select 0) do {
  67. case "AirDestruction": {
  68. [_this select 1] spawn BIS_Effects_AirDestruction;
  69. };
  70. case "AirDestructionStage2": {
  71. [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
  72. };
  73. case "Burn": {
  74. [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
  75. };
  76. };
  77. };
  78.  
  79. "BIS_effects_gepv" addPublicVariableEventHandler {
  80. (_this select 1) call BIS_Effects_startEvent;
  81. };
  82.  
  83. if ((!isServer) && (isNull player) ) then
  84. {
  85. waitUntil {!isNull player};
  86. waitUntil {time > 3};
  87. };
  88.  
  89. if ((!isServer) && (player != player)) then
  90. {
  91. waitUntil {player == player};
  92. waitUntil {time > 3};
  93. };
  94.  
  95. if (isServer) then {
  96. call compile preprocessFileLineNumbers "dynamic_vehicle.sqf"; //Compile vehicle configs
  97.  
  98. // Add trader citys
  99. _nil = [] execVM "mission.sqf";
  100. _serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
  101. };
  102.  
  103. if (!isDedicated) then {
  104. //Conduct map operations
  105. 0 fadeSound 0;
  106. waitUntil {!isNil "dayz_loadScreenMsg"};
  107. dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
  108.  
  109. //Run the player monitor
  110. _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "camera_init.sqf";}];
  111. _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
  112. _nul = [] execVM "camera\loginCamera.sqf";
  113. _void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
  114. _playerMonitor = [] execFSM "admintools\player_monitor.fsm";
  115.  
  116.  
  117. //Lights
  118. //[17,6,true,false,true,true,72,242,600,10,[0.698, 0.556, 0.419],"Generator_DZ",208,"",0.5] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
  119. };
  120.  
  121. #include "\z\addons\dayz_code\system\REsec.sqf"
  122.  
  123. [] ExecVM "map_updates\Barrage_Dan_BBC.sqf"; // Topolka Dam Military Base
  124. [] ExecVM "map_updates\BlackLac_Dan_BBC.sqf"; // Black Lake Miltary Base
  125. [] ExecVM "map_updates\bois1_Dan_BBC.sqf"; // Hidden Killers Ranch
  126. [] ExecVM "map_updates\LieuxditPenduAto.sqf"; // Wreck Sites
  127. [] ExecVM "map_updates\castle.sqf";
  128.  
  129. [] ExecVM "map_updates\devilscastle.sqf";
  130.  
  131. [] ExecVM "map_updates\villages.sqf"; // Epoch Trader Villages 1.2
  132. [] ExecVM "map_updates\buildings.sqf"; // Extra Charnarus Buildings 1.2
  133. //[] ExecVM "map_updates\raceday.sqf"; // Coastal Racetrack 1.1
  134. //[] ExecVM "map_updates\fightyard.sqf";
  135.  
  136. [] ExecVM "R3F_ARTY_AND_LOG\init.sqf";
  137.  
  138. [] ExecVM "custom_scripts\kh_actions.sqf";
  139.  
  140. [] execVM "scripts\fn_selfActions.sqf";
  141.  
  142. [] call fnc_usec_selfActions;
  143.  
  144. [] execVM "admintools\Activate.sqf";
  145.  
  146. // CPC Nametags
  147. [] execVM "cpcnametags.sqf";
  148.  
  149. call compile preprocessFileLineNumbers "addons\UPSMON\scripts\Init_UPSMON.sqf"; // UPSMON (Needed for Sarge)
  150. call compile preprocessfile "addons\SHK_pos\shk_pos_init.sqf"; // SHK (Needed for Sarge)
  151. [] ExecVM "addons\SARGE\SAR_AI_init.sqf";
  152.  
  153. sleep 1; _fast_rope = [] execVM "addons\BTC_fast_roping_init.sqf";
  154.  
  155. [] execVM "Scripts\repairactions.sqf";
  156.  
  157. if (!isDedicated) then {
  158. [] execVM "lights\house_lights.sqf";
  159. [] ExecVM "custom_monitor.sqf";
  160. };
  161.  
  162.  
  163. if (isServer) then {
  164. axe_server_lampObjs = compile preprocessFileLineNumbers "lights\fnc_returnLampWS.sqf";
  165. "axeLampObjects" addPublicVariableEventHandler {_id = (_this select 1) spawn axe_server_lampObjs};
  166. };
  167.  
  168. if (!isDedicated) then {
  169. //StreetLights
  170. [] execVM "lights\street_lights.sqf";
  171. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement