Advertisement
Guest User

init.sqf

a guest
Dec 6th, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.39 KB | None | 0 0
  1. startLoadingScreen ["","RscDisplayLoadCustom"];
  2. cutText ["","BLACK OUT"];
  3. enableSaving [false, false];
  4.  
  5. //Server Settings
  6. dayZ_instance = 1; // The instance
  7. dayZ_serverName = "Zombie Madness"; // server name (country code + server number)
  8. dayz_antihack = 0; // DayZ Antihack / 1 = enabled // 0 = disabled
  9. dayz_REsec = 0; // DayZ RE Security / 1 = enabled // 0 = disabled
  10.  
  11. //Game Settings
  12. dayz_spawnselection = 1; // DayZ Spawnselection / 1 = enabled // 0 = disabled, No current spawn limits.
  13. dayz_spawnCrashSite_clutterCutter = 1; // Helicrash Settings / 0 = loot hidden in grass // 1 = loot lifted // 2 = no grass around the Helicrash
  14. dayz_spawnInfectedSite_clutterCutter = 2; // Infected Base Settings / 0 = loot hidden in grass // 1 = loot lifted // 2 = no grass around the infected base
  15.  
  16. initialized = false;
  17. dayzHiveRequest = [];
  18. dayz_previousID = 0;
  19. 0 fadeSound 0;
  20. //disable greeting menu
  21. player setVariable ["BIS_noCoreConversations", true];
  22. //disable radio messages to be heard and shown in the left lower corner of the screen
  23. enableRadio false;
  24.  
  25.  
  26. //Load in compiled functions
  27. call compile preprocessFileLineNumbers "custom\code\variables.sqf"; //Initilize the Variables (IMPORTANT: Must happen very early)
  28. progressLoadingScreen 0.1;
  29. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; //Initilize the publicVariable event handlers
  30. progressLoadingScreen 0.2;
  31. call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf"; //Functions used by CLIENT for medical
  32. progressLoadingScreen 0.4;
  33. call compile preprocessFileLineNumbers "custom\code\compiles.sqf"; //Compile regular functions
  34. progressLoadingScreen 1.0;
  35.  
  36.  
  37. ///////////////////// REMOVES ALL THE ITEMS ROCKET PUT IN - NO WRECKS BASES OR RANDOM TRASH /////////////////////
  38.  
  39. stream_locationCheck = {
  40. //Thank you for the garbage rocket!
  41. };
  42.  
  43. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  44.  
  45.  
  46.  
  47. "filmic" setToneMappingParams [0.153, 0.357, 0.231, 0.1573, 0.011, 3.750, 6, 4]; setToneMapping "Filmic";
  48.  
  49.  
  50.  
  51.  
  52.  
  53. [] spawn {
  54. while {true} do {
  55. waitUntil {((isNil "BIS_Effects_Rifle") OR {(count(toArray(str(BIS_Effects_Rifle)))!=7)})};
  56. diag_log "Res3tting B!S effects...";
  57. /* BIS_Effects_* fixes from Dwarden */
  58. BIS_Effects_EH_Killed = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\killed.sqf";
  59. BIS_Effects_AirDestruction = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestruction.sqf";
  60. BIS_Effects_AirDestructionStage2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\BIS_Effects\AirDestructionStage2.sqf";
  61.  
  62. BIS_Effects_globalEvent = {
  63. BIS_effects_gepv = _this;
  64. publicVariable "BIS_effects_gepv";
  65. _this call BIS_Effects_startEvent;
  66. };
  67.  
  68. BIS_Effects_startEvent = {
  69. switch (_this select 0) do {
  70. case "AirDestruction": {
  71. [_this select 1] spawn BIS_Effects_AirDestruction;
  72. };
  73. case "AirDestructionStage2": {
  74. [_this select 1, _this select 2, _this select 3] spawn BIS_Effects_AirDestructionStage2;
  75. };
  76. case "Burn": {
  77. [_this select 1, _this select 2, _this select 3, false, true] spawn BIS_Effects_Burn;
  78. };
  79. };
  80. };
  81.  
  82. "BIS_effects_gepv" addPublicVariableEventHandler {
  83. (_this select 1) call BIS_Effects_startEvent;
  84. };
  85.  
  86. BIS_Effects_EH_Fired = {false};
  87. BIS_Effects_Rifle = {false};
  88. sleep 1;
  89. };
  90. };
  91.  
  92. if ((!isServer) && (isNull player) ) then
  93. {
  94. waitUntil {!isNull player};
  95. waitUntil {time > 3};
  96. };
  97.  
  98. if ((!isServer) && (player != player)) then
  99. {
  100. waitUntil {player == player};
  101. waitUntil {time > 3};
  102. };
  103.  
  104. if (isServer) then {
  105. _serverMonitor = [] execVM "\z\addons\dayz_code\system\server_monitor.sqf";
  106. "PVDZ_sec_atp" addPublicVariableEventHandler {
  107. _x = _this select 1;
  108. if (typeName _x == "STRING") then {
  109. diag_log _x;
  110. }
  111. else {
  112. _unit = _x select 0;
  113. _source = _x select 1;
  114. if (((!(isNil {_source})) AND {(!(isNull _source))}) AND {((_source isKindOf "CAManBase") AND {(owner _unit != owner _source)})}) then {
  115. diag_log format ["P1ayer %1 hit by %2 %3 from %4 meters",
  116. _unit call fa_plr2Str, _source call fa_plr2Str, _x select 2, _x select 3];
  117. if (_unit getVariable["processedDeath", 0] == 0) then {
  118. _unit setVariable [ "attacker", name _source ];
  119. _unit setVariable [ "noatlf4", diag_ticktime ]; // server-side "not in combat" test, if player is not already dead
  120. };
  121. };
  122. };
  123. };
  124. };
  125.  
  126. if (!isDedicated) then {
  127. //Conduct map operations
  128.  
  129.  
  130. waitUntil {!isNil "dayz_loadScreenMsg"};
  131. dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
  132.  
  133. //Run the player monitor
  134. ////////// welcome message //////////
  135. _id = player addEventHandler ["Respawn", {_id = [] spawn player_death; _nul = [] execVM "custom\player_spawn_message\playerspawn.sqf";}];
  136. _playerMonitor = [] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
  137. _nul = [] execVM "custom\player_spawn_message\playerspawn.sqf";
  138.  
  139.  
  140. if (dayz_antihack == 1) then {
  141. [] execVM "\z\addons\dayz_code\system\antihack.sqf";
  142.  
  143.  
  144. };
  145. };
  146.  
  147.  
  148. if (dayz_REsec == 1) then {
  149. #include "\z\addons\dayz_code\system\REsec.sqf"
  150. };
  151.  
  152.  
  153.  
  154. //////////////////////////////////////////////////////////// 3rd party addons below /////////////////////////////////////////////////
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161. ///////////////////// COLOUR EFFECTS - OFF BY DEFAULT /////////////////////
  162. //[] execVM "custom\EFFECTS\clear contrast.sqf";
  163. //[] execVM "custom\EFFECTS\wasteland.sqf";
  164. //[] execVM "custom\EFFECTS\summer colours.sqf";
  165. //[] execVM "custom\EFFECTS\photo effect.sqf";
  166. //[] execVM "custom\EFFECTS\warzone effect.sqf";
  167. //[] execVM "custom\EFFECTS\Snow Storm.sqf";
  168. //[] execVM "custom\EFFECTS\WindDust.sqf";
  169. [] execVM "custom\EFFECTS\earthquake.sqf";
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176. ///////////////////// AIRLIFT AND TOW /////////////////////
  177. _logistic = execVM "custom\tow_lift\=BTC=_Logistic\=BTC=_Logistic_Init.sqf";
  178. _logistic = execVM "custom\tow_lift\=BTC=_LogisticTow\=BTC=_Logistic_Init.sqf";
  179.  
  180.  
  181.  
  182.  
  183. ///////////////////// ANTI-THEFT BACKPACKS - OFF BY DEFAULT /////////////////////
  184. //execVM "custom\anti_theft\anti_theft.sqf";
  185.  
  186.  
  187.  
  188. ///////////////////// AUTO REFUEL /////////////////////
  189. if (!isDedicated) then {[] execVM "custom\vehicle_refuel\kh_actions.sqf"};
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. ///////////////////// WELCOME CREDITS /////////////////////
  197. if (!isDedicated) then {[] execVM "custom\Server_Welcome_Credits\Server_WelcomeCredits.sqf"};
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. ///////////////////// MISSION FIX /////////////////////
  205. if (!isDedicated) then {[] execVM "custom\Mission_fix\faction.sqf"};
  206. if (!isDedicated) then {[] execVM "custom\debug\addmarkers.sqf"};
  207. if (!isDedicated) then {[] execVM "custom\debug\addmarkers75.sqf"};
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214. ///////////////////// RADIO CHATTER /////////////////////
  215. //[broadcast chance, sleep timer]
  216. if (!isDedicated) then {[0.05, 600] execVM "custom\radioChatter\radioChatter.sqf"};
  217.  
  218. ///////////////////// AI Mission Spawned vehicle Warning /////////////////////
  219. while (true) do {
  220. waitUntil {vehicle player != player};
  221. _pVehicle = vehicle player;
  222. if (_pVehicle getVariable "Mission" == 1) then {
  223. cutText [format["This is a mission vehicle that will despawn on restart!"], "PLAIN DOWN"];
  224. sleep 5;
  225. cutText [format["You have been warned. Your loss if you leave anything inside it!"], "PLAIN DOWN"];
  226. };
  227. waitUntil {vehicle player = player};
  228. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement