Advertisement
Guest User

rickious init

a guest
Jul 19th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.98 KB | None | 0 0
  1. // Mission Initialization
  2. startLoadingScreen ["", "RscDisplayLoadCustom"];
  3. cutText ["", "BLACK OUT"];
  4. enableSaving [false, false];
  5.  
  6. // Variable Initialization
  7. dayZ_instance = 3;
  8. //dayZ_serverName = "31337"; // server name (country code + server number)
  9. hiveInUse = true;
  10. dayzHiveRequest = [];
  11. initialized = false;
  12. dayz_previousID = 0;
  13.  
  14. // Settings
  15. player setVariable ["BIS_noCoreConversations", true]; // Disable greeting menu
  16. //enableRadio false; // Disable global chat radio messages
  17.  
  18. // Compile and call important functions
  19. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\variables.sqf";
  20. progressLoadingScreen 0.1;
  21. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf";
  22. progressLoadingScreen 0.2;
  23. call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";
  24. progressLoadingScreen 0.4;
  25. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
  26. progressLoadingScreen 1.0;
  27.  
  28. // Set Tonemapping
  29. "Filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4];
  30. setToneMapping "Filmic";
  31.  
  32. BIS_Effects_startEvent = {
  33. switch (_this select 0) do {
  34. case "AirDestruction": {
  35. [_this select 1] spawn BIS_Effects_AirDestruction;
  36. };
  37. case "AirDestructionStage2": {
  38. [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
  39. };
  40. case "Burn": {
  41. [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
  42. };
  43. };
  44. };
  45.  
  46. "BIS_effects_gepv" addPublicVariableEventHandler {
  47. (_this select 1) call BIS_Effects_startEvent;
  48. };
  49.  
  50. if ((!isServer) && (isNull player) ) then
  51. {
  52. waitUntil {!isNull player};
  53. waitUntil {time > 3};
  54. };
  55.  
  56. if ((!isServer) && (player != player)) then
  57. {
  58. waitUntil {player == player};
  59. waitUntil {time > 3};
  60. };
  61.  
  62. // Run the server monitor
  63. if ((!isServer) && (isNull player) ) then
  64. {
  65. waitUntil {!isNull player};
  66. waitUntil {time > 3};
  67. };
  68.  
  69. if ((!isServer) && (player != player)) then
  70. {
  71. waitUntil {player == player};
  72. waitUntil {time > 3};
  73. };
  74.  
  75. if (isServer) then {
  76. _serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
  77. // "PVDZ_sec_atp" addPublicVariableEventHandler { diag_log format["%1", _this select 1];};
  78. };
  79.  
  80. // Run the player monitor
  81. if (!isDedicated) then {
  82. //Conduct map operations
  83. 0 fadeSound 0;
  84. waitUntil {!isNil "dayz_loadScreenMsg"};
  85. dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
  86.  
  87. //Run the player monitor
  88. _id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
  89. _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
  90. [] execVM "DamiMods\Adminz\functions.sqf";
  91. // [] execVM "\z\addons\dayz_code\system\antihack.sqf";
  92. };
  93.  
  94. // Logo watermark: adding a logo in the bottom left corner of the screen with the server name in it
  95. if (!isNil "dayZ_serverName") then {
  96. [] spawn {
  97. waitUntil {(!isNull Player) and (alive Player) and (player == player)};
  98. waituntil {!(isNull (findDisplay 46))};
  99. 5 cutRsc ["wm_disp","PLAIN"];
  100. ((uiNamespace getVariable "wm_disp") displayCtrl 1) ctrlSetText dayZ_serverName;
  101.  
  102. #include "gcam\gcam_config.hpp"
  103. #include "gcam\gcam_functions.sqf"
  104.  
  105. #ifdef GCAM
  106. waitUntil { alive Player };
  107. waituntil { !(IsNull (findDisplay 46)) };
  108.  
  109. if (serverCommandAvailable "#kick") then { (findDisplay 46) displayAddEventHandler ["keyDown", "_this call fnc_keyDown"]; };
  110. #endif
  111. };
  112.  
  113. #include "\z\addons\dayz_code\system\REsec.sqf"
  114.  
  115. // UPSMON
  116. call compile preprocessFileLineNumbers "addons\UPSMON\scripts\Init_UPSMON.sqf";
  117.  
  118. // run SAR_AI
  119. [] execVM "addons\SARGE\SAR_AI_init.sqf";
  120.  
  121. // admintools
  122. [] execVM "admintools\Activate.sqf";
  123.  
  124. // overwrite dayz code shit
  125. if (isServer) then {
  126.  
  127. // SARGE event handler to save relocated buildings
  128. "SAR_savebuilding" addPublicVariableEventHandler {(_this select 1) spawn SAR_save2hive};
  129.  
  130. // overwriting the Dayz teleport check
  131. "atp" addPublicVariableEventHandler {};
  132.  
  133. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement