Advertisement
paddy1223

init.sqf

Jul 1st, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1. /*
  2. INITILIZATION
  3. */
  4. startLoadingScreen ["","RscDisplayLoadCustom"];
  5. cutText ["","BLACK OUT"];
  6. enableSaving [false, false];
  7. //REALLY IMPORTANT VALUES
  8. dayZ_instance = 9206; // The instance
  9. //dayZ_serverName = "UK1337"; // server name (country code + server number)
  10. dayzHiveRequest = [];
  11. initialized = false;
  12. dayz_previousID = 0;
  13. //disable greeting menu
  14. player setVariable ["BIS_noCoreConversations", true];
  15. //disable radio messages to be heard and shown in the left lower corner of the screen
  16. enableRadio false;
  17. //Load in compiled functions
  18. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
  19. progressLoadingScreen 0.1;
  20. call compile preprocessFileLineNumbers "fixes\publicEH.sqf"; //Initilize the publicVariable event handlers
  21. progressLoadingScreen 0.2;
  22. call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; //Functions used by CLIENT for medical
  23. progressLoadingScreen 0.4;
  24. call compile preprocessFileLineNumbers "fixes\compiles.sqf"; //Compile regular functions
  25. //Base Building Start
  26. call compile preprocessFileLineNumbers "dayz_code\init\variables.sqf"; //Initializes custom variables
  27. call compile preprocessFileLineNumbers "dayz_code\init\compiles.sqf"; //Compile custom compiles
  28. call compile preprocessFileLineNumbers "dayz_code\init\settings.sqf"; //Initialize custom clientside settings
  29. //Base Building End
  30. progressLoadingScreen 1.0;
  31. "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";
  32. /* BIS_Effects_* fixes from Dwarden */
  33. BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf";
  34. BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf";
  35. BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf";
  36. BIS_Effects_globalEvent = {
  37. BIS_effects_gepv = _this;
  38. publicVariable "BIS_effects_gepv";
  39. _this call BIS_Effects_startEvent;
  40. };
  41. BIS_Effects_startEvent = {
  42. switch (_this select 0) do {
  43. case "AirDestruction": {
  44. [_this select 1] spawn BIS_Effects_AirDestruction;
  45. };
  46. case "AirDestructionStage2": {
  47. [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
  48. };
  49. case "Burn": {
  50. [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
  51. };
  52. };
  53. };
  54. "BIS_effects_gepv" addPublicVariableEventHandler {
  55. (_this select 1) call BIS_Effects_startEvent;
  56. };
  57. if ((!isServer) && (isNull player) ) then
  58. {
  59. waitUntil {!isNull player};
  60. waitUntil {time > 3};
  61. };
  62. if ((!isServer) && (player != player)) then
  63. {
  64. waitUntil {player == player};
  65. waitUntil {time > 3};
  66. };
  67. if (isServer) then {
  68. _serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
  69. // "PVDZ_sec_atp" addPublicVariableEventHandler { diag_log format["%1", _this select 1];};
  70. };
  71. if (!isDedicated) then {
  72. //Conduct map operations
  73. 0 fadeSound 0;
  74. waitUntil {!isNil "dayz_loadScreenMsg"};
  75. dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
  76. //Run the player monitor
  77. _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "scripts\intro\playerspawn.sqf";}];
  78. _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
  79. _nul = [] execVM "scripts\intro\playerspawn.sqf";
  80. [] execVM "scripts\autorepair\repairactions.sqf";
  81. // [] execVM "\z\addons\dayz_code\system\antihack.sqf";
  82. };
  83. // Logo watermark: adding a logo in the bottom left corner of the screen with the server name in it
  84. if (!isNil "dayZ_serverName") then {
  85. [] spawn {
  86. waitUntil {(!isNull Player) and (alive Player) and (player == player)};
  87. waituntil {!(isNull (findDisplay 46))};
  88. 5 cutRsc ["wm_disp","PLAIN"];
  89. ((uiNamespace getVariable "wm_disp") displayCtrl 1) ctrlSetText dayZ_serverName;
  90. };
  91. };
  92. if (!isDedicated) then {
  93. [] execVM "fixes\effects.sqf";
  94. };
  95. //#include "\z\addons\dayz_code\system\REsec.sqf";
  96.  
  97. //Sector FNG
  98. [] execVM "sectorfng\sectorfng.sqf";
  99.  
  100. //Base Building Execs
  101. [] execVM "custombases\westoutpost.sqf";
  102. [] execVM "custombases\skalistybridge.sqf";
  103. [] execVM "custombases\skalistybase.sqf";
  104. [] execVM "custombases\tradingpost.sqf";
  105. [] execVM "custombases\klenbase.sqf";
  106. [] execVM "custombases\starynovy.sqf";
  107. [] execVM "custombases\redcrosscamp.sqf";
  108. //End of Base Building Execs
  109.  
  110. //Sarge AI
  111. call compile preprocessFileLineNumbers "addons\UPSMON\scripts\Init_UPSMON.sqf";
  112. call compile preprocessfile "addons\SHK_pos\shk_pos_init.sqf";
  113. [] execVM "addons\SARGE\SAR_AI_init.sqf";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement