Advertisement
Guest User

variables.sqf

a guest
Jan 11th, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.11 KB | None | 0 0
  1.  
  2. disableSerialization;
  3.  
  4.  
  5.  
  6.  
  7.  
  8. //Model Variables
  9.  
  10.  
  11. Bandit1_DZ = "Bandit1_DZ";
  12.  
  13.  
  14. BanditW1_DZ = "BanditW1_DZ";
  15.  
  16.  
  17. Survivor1_DZ = "Survivor2_DZ";
  18.  
  19.  
  20. Survivor2_DZ = "Survivor2_DZ";
  21.  
  22.  
  23. SurvivorW2_DZ = "SurvivorW2_DZ";
  24.  
  25.  
  26. Sniper1_DZ = "Sniper1_DZ";
  27.  
  28.  
  29. Camo1_DZ = "Camo1_DZ";
  30.  
  31.  
  32. Soldier1_DZ = "Soldier1_DZ";
  33.  
  34.  
  35. Rocket_DZ = "Rocket_DZ";
  36.  
  37.  
  38.  
  39.  
  40.  
  41. dayz_combatLog = "";
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. //Hunting Variables
  51.  
  52.  
  53. dayZ_partClasses = [
  54.  
  55.  
  56. "PartFueltank",
  57.  
  58.  
  59. "PartWheel",
  60.  
  61.  
  62. //"PartGeneric", //No need to add, it is default for everything
  63.  
  64.  
  65. "PartEngine"
  66.  
  67.  
  68. ];
  69.  
  70.  
  71. dayZ_explosiveParts = [
  72.  
  73.  
  74. "palivo",
  75.  
  76.  
  77. "motor"
  78.  
  79.  
  80. ];
  81.  
  82.  
  83. //Survival Variables
  84.  
  85.  
  86. SleepFood = 2160; //minutes (48 hours)
  87.  
  88.  
  89. SleepWater = 1440; //minutes (24 hours)
  90.  
  91.  
  92. SleepTemperatur = 90 / 100; //Firs Value = Minutes untill Player reaches the coldest Point at night (without other effects! night factor expected to be -1) //TeeChange
  93.  
  94.  
  95.  
  96.  
  97.  
  98. //Server Variables
  99.  
  100.  
  101. dayZ_hivePipe1 = "\\.\pipe\dayz"; //The named pipe
  102.  
  103.  
  104. dayZ_hivePipeAuth = "\\.\pipe\dayzAuth"; //The named pipe
  105.  
  106.  
  107. hiveInUse = false;
  108.  
  109.  
  110. allowConnection = false;
  111.  
  112.  
  113. isSinglePlayer = false;
  114.  
  115.  
  116. dayz_serverObjectMonitor = [];
  117.  
  118.  
  119.  
  120.  
  121.  
  122. //Streaming Variables (player only)
  123.  
  124.  
  125. dayz_Locations = [];
  126.  
  127.  
  128. dayz_locationsActive = [];
  129.  
  130.  
  131.  
  132.  
  133.  
  134. //GUI
  135.  
  136.  
  137. Dayz_GUI_R = 0.38; // 0.7
  138.  
  139.  
  140. Dayz_GUI_G = 0.63; // -0.63
  141.  
  142.  
  143. Dayz_GUI_B = 0.26; // -0.26
  144.  
  145.  
  146.  
  147.  
  148.  
  149. //Player self-action handles
  150.  
  151.  
  152. dayz_resetSelfActions = {
  153.  
  154.  
  155. s_player_fire = -1;
  156.  
  157.  
  158. s_player_cook = -1;
  159.  
  160.  
  161. s_player_fireout = -1;
  162.  
  163.  
  164. s_player_butcher = -1;
  165.  
  166.  
  167. s_player_packtent = -1;
  168.  
  169.  
  170. s_player_fillwater = -1;
  171.  
  172.  
  173. s_player_fillwater2 = -1;
  174.  
  175.  
  176. s_player_fillfuel = -1;
  177.  
  178.  
  179. s_player_grabflare = -1;
  180.  
  181.  
  182. s_player_removeflare = -1;
  183.  
  184.  
  185. s_player_painkiller = -1;
  186.  
  187.  
  188. s_player_studybody = -1;
  189.  
  190.  
  191. s_build_Sandbag1_DZ = -1;
  192.  
  193.  
  194. s_build_Hedgehog_DZ = -1;
  195.  
  196.  
  197. s_build_Wire_cat1 = -1;
  198.  
  199.  
  200. s_player_deleteBuild = -1;
  201.  
  202.  
  203. s_player_forceSave = -1;
  204.  
  205.  
  206. };
  207.  
  208.  
  209. call dayz_resetSelfActions;
  210.  
  211.  
  212.  
  213.  
  214.  
  215. //Engineering variables
  216.  
  217.  
  218. s_player_lastTarget = objNull;
  219.  
  220.  
  221. s_player_repairActions = [];
  222.  
  223.  
  224.  
  225.  
  226.  
  227. //Initialize Medical Variables
  228.  
  229.  
  230. r_interrupt = false;
  231.  
  232.  
  233. r_doLoop = false;
  234.  
  235.  
  236. r_self = false;
  237.  
  238.  
  239. r_self_actions = [];
  240.  
  241.  
  242. r_drag_sqf = false;
  243.  
  244.  
  245. r_action = false;
  246.  
  247.  
  248. r_action_unload = false;
  249.  
  250.  
  251. r_player_handler = false;
  252.  
  253.  
  254. r_player_handler1 = false;
  255.  
  256.  
  257. r_player_dead = false;
  258.  
  259.  
  260. r_player_unconscious = false;
  261.  
  262.  
  263. r_player_infected = false;
  264.  
  265.  
  266. r_player_injured = false;
  267.  
  268.  
  269. r_player_inpain = false;
  270.  
  271.  
  272. r_player_loaded = false;
  273.  
  274.  
  275. r_player_cardiac = false;
  276.  
  277.  
  278. r_fracture_legs = false;
  279.  
  280.  
  281. r_fracture_arms = false;
  282.  
  283.  
  284. r_player_vehicle = player;
  285.  
  286.  
  287. r_player_blood = 12000;
  288.  
  289.  
  290. r_player_lowblood = false;
  291.  
  292.  
  293. r_player_timeout = 0;
  294.  
  295.  
  296. r_player_bloodTotal = r_player_blood;
  297.  
  298.  
  299. r_public_blood = r_player_blood;
  300.  
  301.  
  302. r_player_bloodDanger = r_player_bloodTotal * 0.2;
  303.  
  304.  
  305. r_player_actions = [];
  306.  
  307.  
  308. r_handlerCount = 0;
  309.  
  310.  
  311. r_action_repair = false;
  312.  
  313.  
  314. r_action_targets = [];
  315.  
  316.  
  317. r_pitchWhine = false;
  318.  
  319.  
  320. r_isBandit = false;
  321.  
  322.  
  323. USEC_woundHit = [
  324.  
  325.  
  326. "",
  327.  
  328.  
  329. "body",
  330.  
  331.  
  332. "hands",
  333.  
  334.  
  335. "legs",
  336.  
  337.  
  338. "head_hit"
  339.  
  340.  
  341. ];
  342.  
  343.  
  344. DAYZ_woundHit = [
  345.  
  346.  
  347. [
  348.  
  349.  
  350. "body",
  351.  
  352.  
  353. "hands",
  354.  
  355.  
  356. "legs",
  357.  
  358.  
  359. "head_hit"
  360.  
  361.  
  362. ],[
  363.  
  364.  
  365. 0.45,
  366.  
  367.  
  368. 0.4,
  369.  
  370.  
  371. 0.1,
  372.  
  373.  
  374. 0.05
  375.  
  376.  
  377. ]
  378.  
  379.  
  380. ];
  381.  
  382.  
  383. DAYZ_woundHit_ok = [
  384.  
  385.  
  386. [
  387.  
  388.  
  389. "body",
  390.  
  391.  
  392. "hands",
  393.  
  394.  
  395. "legs"
  396.  
  397.  
  398. ],[
  399.  
  400.  
  401. 0.5,
  402.  
  403.  
  404. 0.3,
  405.  
  406.  
  407. 0.2
  408.  
  409.  
  410. ]
  411.  
  412.  
  413. ];
  414.  
  415.  
  416. USEC_MinorWounds = [
  417.  
  418.  
  419. "hands",
  420.  
  421.  
  422. "legs"
  423.  
  424.  
  425. ];
  426.  
  427.  
  428. USEC_woundPoint = [
  429.  
  430.  
  431. ["Pelvis","aimpoint"],
  432.  
  433.  
  434. ["aimpoint"], //,"RightShoulder","LeftShoulder"
  435.  
  436.  
  437. ["lelbow","relbow"],
  438.  
  439.  
  440. ["RightFoot","LeftFoot"],
  441.  
  442.  
  443. ["neck","pilot"]
  444.  
  445.  
  446. ];
  447.  
  448.  
  449. USEC_typeOfWounds = [
  450.  
  451.  
  452. "Pelvis",
  453.  
  454.  
  455. "aimpoint",
  456.  
  457.  
  458. "lelbow","relbow",
  459.  
  460.  
  461. "RightFoot","LeftFoot",
  462.  
  463.  
  464. "neck","pilot"
  465.  
  466.  
  467. ];
  468.  
  469.  
  470.  
  471.  
  472.  
  473. //Initialize Zombie Variables
  474.  
  475.  
  476. dayz_zombieTargetList = [
  477.  
  478.  
  479. ["SoldierWB",50],
  480.  
  481.  
  482. ["Air",500],
  483.  
  484.  
  485. ["LandVehicle",200]
  486.  
  487.  
  488. ];
  489.  
  490.  
  491. dayzHit = [];
  492.  
  493.  
  494. dayzPublishObj = []; //used for eventhandler to spawn a mirror of players tent
  495.  
  496.  
  497. dayzHideBody = objNull;
  498.  
  499.  
  500.  
  501.  
  502.  
  503. //DayZ settings
  504.  
  505.  
  506. dayz_dawn = 6;
  507.  
  508.  
  509. dayz_dusk = 18;
  510.  
  511.  
  512. dayz_maxAnimals = 5;
  513.  
  514.  
  515. DAYZ_agentnumber = 0;
  516.  
  517.  
  518. dayz_animalDistance = 800;
  519.  
  520.  
  521. dayz_zSpawnDistance = 1000;
  522.  
  523.  
  524. dayz_maxLocalZombies = 40;
  525.  
  526.  
  527. dayz_spawnPos = getPosATL player;
  528.  
  529.  
  530.  
  531.  
  532.  
  533. if(isDedicated) then {
  534.  
  535.  
  536. dayz_disco = [];
  537.  
  538.  
  539. };
  540.  
  541.  
  542.  
  543.  
  544.  
  545. if(isServer) then {
  546.  
  547.  
  548. dayz_players = [];
  549.  
  550.  
  551. dead_bodyCleanup = [];
  552.  
  553.  
  554. needUpdate_objects = [];
  555.  
  556.  
  557. };
  558.  
  559.  
  560.  
  561.  
  562.  
  563. if(!isDedicated) then {
  564.  
  565.  
  566. //Establish Location Streaming
  567.  
  568.  
  569. _funcGetLocation =
  570.  
  571.  
  572. {
  573.  
  574.  
  575. for "_i" from 0 to ((count _this) - 1) do
  576.  
  577.  
  578. {
  579.  
  580.  
  581. private ["_location","_config","_locHdr","_position","_size","_type"];
  582.  
  583.  
  584. //Get Location Data from config
  585.  
  586.  
  587. _config = (_this select _i);
  588.  
  589.  
  590. _locHdr = configName _config;
  591.  
  592.  
  593. _position = getArray (_config >> "position");
  594.  
  595.  
  596. _size = getNumber (_config >> "size");
  597.  
  598.  
  599. _type = getText (_config >> "type");
  600.  
  601.  
  602.  
  603.  
  604.  
  605. //Find the Location
  606.  
  607.  
  608. _location = nearestLocation [_position, _type];
  609.  
  610.  
  611.  
  612.  
  613.  
  614. //Record details
  615.  
  616.  
  617. dayz_Locations set [count dayz_Locations, [_location,_locHdr,_size]];
  618.  
  619.  
  620. };
  621.  
  622.  
  623. };
  624.  
  625.  
  626. _cfgLocation = configFile >> "CfgTownGenerator";
  627.  
  628.  
  629. _cfgLocation call _funcGetLocation;
  630.  
  631.  
  632.  
  633.  
  634.  
  635. dayz_buildingMonitor = []; //Buildings to check
  636.  
  637.  
  638. dayz_bodyMonitor = [];
  639.  
  640.  
  641. dayz_flyMonitor = []; //used for monitor flies
  642.  
  643.  
  644.  
  645.  
  646.  
  647. dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
  648.  
  649.  
  650.  
  651.  
  652.  
  653. //temperature variables
  654.  
  655.  
  656. dayz_temperatur = 36; //TeeChange
  657.  
  658.  
  659. dayz_temperaturnormal = 36; //TeeChange
  660.  
  661.  
  662. dayz_temperaturmax = 42; //TeeChange
  663.  
  664.  
  665. dayz_temperaturmin = 27; //TeeChange
  666.  
  667.  
  668.  
  669.  
  670.  
  671. //player special variables
  672.  
  673.  
  674. dayZ_lastPlayerUpdate = 0;
  675.  
  676.  
  677. dayZ_everyonesTents = [];
  678.  
  679.  
  680. dayz_hunger = 0;
  681.  
  682.  
  683. dayz_thirst = 0;
  684.  
  685.  
  686. dayz_combat = 0;
  687.  
  688.  
  689. dayz_preloadFinished = false;
  690.  
  691.  
  692. dayz_statusArray = [1,1];
  693.  
  694.  
  695. dayz_disAudial = 0;
  696.  
  697.  
  698. dayz_disVisual = 0;
  699.  
  700.  
  701. dayz_firedCooldown = 0;
  702.  
  703.  
  704. dayz_DeathActioned = false;
  705.  
  706.  
  707. dayz_canDisconnect = true;
  708.  
  709.  
  710. dayz_damageCounter = time;
  711.  
  712.  
  713. dayz_lastSave = time;
  714.  
  715.  
  716. dayz_isSwimming = true;
  717.  
  718.  
  719. dayz_currentDay = 0;
  720.  
  721.  
  722. dayz_hasLight = false;
  723.  
  724.  
  725. dayz_surfaceNoise = 0;
  726.  
  727.  
  728. dayz_surfaceType = "None";
  729.  
  730.  
  731. dayz_noPenalty = [];
  732.  
  733.  
  734. dayz_heavenCooldown = 0;
  735.  
  736.  
  737. deathHandled = false;
  738.  
  739.  
  740. dayz_lastHumanity = 0;
  741.  
  742.  
  743. dayz_guiHumanity = -90000;
  744.  
  745.  
  746. dayz_firstGroup = group player;
  747.  
  748.  
  749. dayz_originalPlayer = player;
  750.  
  751.  
  752. dayz_playerName = "Unknown";
  753.  
  754.  
  755. dayz_sourceBleeding = objNull;
  756.  
  757.  
  758. dayz_clientPreload = false;
  759.  
  760.  
  761. dayz_panicCooldown = 0;
  762.  
  763.  
  764. dayz_areaAffect = 2;
  765.  
  766.  
  767. dayz_heartBeat = false;
  768.  
  769.  
  770. dayzClickTime = 0;
  771.  
  772.  
  773. dayz_spawnDelay = 300;
  774.  
  775.  
  776. dayz_spawnWait = -300;
  777.  
  778.  
  779. dayz_lootDelay = 3;
  780.  
  781.  
  782. dayz_lootWait = -300;
  783.  
  784.  
  785. dayz_spawnZombies = 0;
  786.  
  787.  
  788. dayz_inVehicle = false;
  789.  
  790.  
  791. dayz_Magazines = [];
  792.  
  793.  
  794. dayzGearSave = false;
  795.  
  796.  
  797. dayz_unsaved = false;
  798.  
  799.  
  800. dayz_scaleLight = 0;
  801.  
  802.  
  803. dayzDebug = false;
  804.  
  805.  
  806. dayzState = -1;
  807.  
  808.  
  809. uiNamespace setVariable ['DAYZ_GUI_display',displayNull];
  810.  
  811.  
  812. //if (uiNamespace getVariable ['DZ_displayUI', 0] == 2) then {
  813.  
  814.  
  815. // dayzDebug = true;
  816.  
  817.  
  818. //};
  819.  
  820.  
  821. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement