Dienark7

1.8.0.3 vars

Nov 21st, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.93 KB | None | 0 0
  1. disableSerialization;
  2.  
  3. // Enable
  4. // 0=False/off, 1=True/on
  5. dayz_Trash = 1;
  6.  
  7.  
  8. //Model Variables
  9. Bandit1_DZ = "Bandit1_DZ";
  10. BanditW1_DZ = "BanditW1_DZ";
  11. Survivor1_DZ = "Survivor2_DZ";
  12. Survivor2_DZ = "Survivor2_DZ";
  13. SurvivorW2_DZ = "SurvivorW2_DZ";
  14. Sniper1_DZ = "Sniper1_DZ";
  15. Camo1_DZ = "Camo1_DZ";
  16. Soldier1_DZ = "Soldier1_DZ";
  17. Rocket_DZ = "Rocket_DZ";
  18.  
  19. AllPlayers = ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Soldier1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","Survivor3_DZ"];
  20.  
  21. MeleeWeapons = ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeBaseball","MeleeBaseBallBat","MeleeBaseBallBatBarbed","MeleeBaseBallBatNails","MeleeFishingPole"];
  22. MeleeMagazines = ["hatchet_swing","crowbar_swing","Machete_swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing"];
  23. Dayz_fishingItems = ["MeleeFishingPole"];
  24. Dayz_plants = ["Dayz_Plant1","Dayz_Plant2","Dayz_Plant3"];
  25.  
  26. //New Zeds
  27. DayZ_ViralZeds = ["z_new_villager2","z_new_villager3","z_new_villager4","z_new_worker2","z_new_worker3","z_new_worker4"];
  28. //Bags
  29. DayZ_Backpacks = ["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_Czech_Vest_Puch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_CivilBackpack_EP1","DZ_Backpack_EP1"];
  30.  
  31. SafeObjects = ["Land_Fire_DZ", "TentStorage", "Wire_cat1", "Sandbag1_DZ", "Hedgehog_DZ", "StashSmall", "StashMedium", "BearTrap_DZ", "DomeTentStorage", "CamoNet_DZ", "Trap_Cans", "TrapTripwireFlare", "TrapBearTrapSmoke", "TrapTripwireGrenade", "TrapTripwireSmoke", "TrapBearTrapFlare"];
  32.  
  33. //Cooking
  34. meatraw = [
  35. "FoodSteakRaw",
  36. "FoodmeatRaw",
  37. "FoodbeefRaw",
  38. "FoodmuttonRaw",
  39. "FoodchickenRaw",
  40. "FoodrabbitRaw",
  41. "FoodbaconRaw",
  42. "FoodgoatRaw",
  43. "FishRawTrout",
  44. "FishRawSeaBass",
  45. "FishRawTuna"
  46. ];
  47. meatcooked = [
  48. "FoodSteakCooked",
  49. "FoodmeatCooked",
  50. "FoodbeefCooked",
  51. "FoodmuttonCooked",
  52. "FoodchickenCooked",
  53. "FoodrabbitCooked",
  54. "FoodbaconCooked",
  55. "FoodgoatCooked",
  56. "FishCookedTrout",
  57. "FishCookedSeaBass",
  58. "FishCookedTuna"
  59. ];
  60.  
  61. //Eating
  62. no_output_food = [
  63. "FoodMRE",
  64. "FoodPistachio",
  65. "FoodNutmix",
  66. "FoodCandyAnders",
  67. "FoodCandyLegacys",
  68. "FoodCandyMintception"
  69. ]+meatcooked+meatraw;
  70.  
  71. food_with_output=[
  72. "FoodCanBakedBeans",
  73. "FoodCanSardines",
  74. "FoodCanFrankBeans",
  75. "FoodCanPasta",
  76. "FoodCanGriff",
  77. "FoodCanBadguy",
  78. "FoodCanBoneboy",
  79. "FoodCanCorn",
  80. "FoodCanCurgon",
  81. "FoodCanDemon",
  82. "FoodCanFraggleos",
  83. "FoodCanHerpy",
  84. "FoodCanDerpy",
  85. "FoodCanOrlok",
  86. "FoodCanPowell",
  87. "FoodCanTylers",
  88. "FoodCanUnlabeled",
  89. "FoodCanRusUnlabeled",
  90. "FoodCanRusPork",
  91. "FoodCanRusPeas",
  92. "FoodCanRusMilk",
  93. "FoodCanRusCorn",
  94. "FoodCanRusStew",
  95. "FoodChipsSulahoops",
  96. "FoodChipsMysticales"
  97. ];
  98.  
  99. food_output = [
  100. "TrashTinCan",
  101. "TrashTinCan",
  102. "TrashTinCan",
  103. "TrashTinCan",
  104. "FoodCanGriffEmpty",
  105. "FoodCanBadguyEmpty",
  106. "FoodCanBoneboyEmpty",
  107. "FoodCanCornEmpty",
  108. "FoodCanCurgonEmpty",
  109. "FoodCanDemonEmpty",
  110. "FoodCanFraggleosEmpty",
  111. "FoodCanHerpyEmpty",
  112. "FoodCanDerpyEmpty",
  113. "FoodCanOrlokEmpty",
  114. "FoodCanPowellEmpty",
  115. "FoodCanTylersEmpty",
  116. "FoodCanUnlabeledEmpty",
  117. "FoodCanRusUnlabeledEmpty",
  118. "FoodCanRusPorkEmpty",
  119. "FoodCanRusPeasEmpty",
  120. "FoodCanRusMilkEmpty",
  121. "FoodCanRusCornEmpty",
  122. "FoodCanRusStewEmpty",
  123. "FoodChipsSulahoopsEmpty",
  124. "FoodChipsMysticalesEmpty"
  125. ];
  126. //Drinking
  127. no_output_drink = ["ItemWaterbottle", "ItemWaterbottleBoiled"];
  128.  
  129. drink_with_output = [
  130. "ItemSoda", //just to define item for ItemSodaEmpty
  131. "ItemSodaCoke",
  132. "ItemSodaPepsi",
  133. "ItemSodaMdew",
  134. "ItemSodaMtngreen",
  135. "ItemSodaR4z0r",
  136. "ItemSodaClays",
  137. "ItemSodaSmasht",
  138. "ItemSodaDrwaste",
  139. "ItemSodaLemonade",
  140. "ItemSodaLvg",
  141. "ItemSodaMzly",
  142. "ItemSodaRabbit"
  143. ];
  144. drink_output = [
  145. "ItemSodaEmpty",
  146. "ItemSodaCokeEmpty",
  147. "ItemSodaPepsiEmpty",
  148. "ItemSodaMdewEmpty",
  149. "ItemSodaMtngreenEmpty",
  150. "ItemSodaR4z0rEmpty",
  151. "ItemSodaClaysEmpty",
  152. "ItemSodaSmashtEmpty",
  153. "ItemSodaDrwasteEmpty",
  154. "ItemSodaLemonadeEmpty",
  155. "ItemSodaLvgEmpty",
  156. "ItemSodaMzlyEmpty",
  157. "ItemSodaRabbitEmpty"
  158. ];
  159. boil_tin_cans = [
  160. "TrashTinCan",
  161. "FoodCanGriffEmpty",
  162. "FoodCanBadguyEmpty",
  163. "FoodCanBoneboyEmpty",
  164. "FoodCanCornEmpty",
  165. "FoodCanCurgonEmpty",
  166. "FoodCanDemonEmpty",
  167. "FoodCanFraggleosEmpty",
  168. "FoodCanHerpyEmpty",
  169. "FoodCanDerpyEmpty",
  170. "FoodCanOrlokEmpty",
  171. "FoodCanPowellEmpty",
  172. "FoodCanTylersEmpty",
  173. "FoodCanUnlabeledEmpty",
  174. "FoodCanRusUnlabeledEmpty",
  175. "FoodCanRusStewEmpty",
  176. "FoodCanRusPorkEmpty",
  177. "FoodCanRusPeasEmpty",
  178. "FoodCanRusMilkEmpty",
  179. "FoodCanRusCornEmpty",
  180. "ItemSodaEmpty",
  181. "ItemSodaCokeEmpty",
  182. "ItemSodaPepsiEmpty",
  183. "ItemSodaMdewEmpty",
  184. "ItemSodaMtngreenEmpty",
  185. "ItemSodaR4z0rEmpty",
  186. "ItemSodaClaysEmpty",
  187. "ItemSodaSmashtEmpty",
  188. "ItemSodaDrwasteEmpty",
  189. "ItemSodaLemonadeEmpty",
  190. "ItemSodaLvgEmpty",
  191. "ItemSodaMzlyEmpty",
  192. "ItemSodaRabbitEmpty"
  193. ];
  194.  
  195. canPickup = false;
  196. pickupInit = false;
  197.  
  198. //Hunting Variables
  199. dayZ_partClasses = [
  200. "PartFueltank",
  201. "PartWheel",
  202. //"PartGeneric", //No need to add, it is default for everything
  203. "PartEngine"
  204. ];
  205. dayZ_explosiveParts = [
  206. "palivo",
  207. "motor"
  208. ];
  209. //Survival Variables
  210. SleepFood = 2160; //minutes (48 hours)
  211. SleepWater = 1440; //minutes (24 hours)
  212. SleepTemperatur = 90 / 100; //Firs Value = Minutes untill Player reaches the coldest Point at night (without other effects! night factor expected to be -1) //TeeChange
  213.  
  214. //Server Variables
  215. allowConnection = false;
  216. dayz_serverObjectMonitor = [];
  217.  
  218. //Streaming Variables (player only)
  219. dayz_Locations = [];
  220. dayz_locationsActive = [];
  221.  
  222. //GUI
  223. Dayz_GUI_R = 0.38; // 0.7 .38
  224. Dayz_GUI_G = 0.63; // -0.63
  225. Dayz_GUI_B = 0.26; // -0.26
  226.  
  227. //actions blockers
  228. a_player_cooking = false;
  229. a_player_boil = false;
  230. a_player_jerryfilling = false;
  231. a_player_repairing = false;
  232.  
  233. //Player self-action handles
  234. dayz_resetSelfActions = {
  235. s_player_equip_carry = -1;
  236. s_player_dragbody = -1;
  237. s_player_fire = -1;
  238. s_player_cook = -1;
  239. s_player_boil = -1;
  240. s_player_fireout = -1;
  241. s_player_butcher = -1;
  242. s_player_packtent = -1;
  243. s_player_fillwater = -1;
  244. s_player_fillwater2 = -1;
  245. s_player_fillfuel = -1;
  246. s_player_grabflare = -1;
  247. s_player_removeflare = -1;
  248. s_player_painkiller = -1;
  249. s_player_studybody = -1;
  250. s_build_Sandbag1_DZ = -1;
  251. s_build_Hedgehog_DZ = -1;
  252. s_build_Wire_cat1 = -1;
  253. s_player_deleteBuild = -1;
  254. s_player_forceSave = -1;
  255. s_player_flipveh = -1;
  256. s_player_stats = -1;
  257. s_player_sleep = -1;
  258. s_player_fillfuel20 = -1;
  259. s_player_fillfuel5 = -1;
  260. s_player_siphonfuel = -1;
  261. s_player_repair_crtl = -1;
  262. s_player_fishing = -1;
  263. s_player_fishing_veh = -1;
  264. s_player_gather = -1;
  265. };
  266. call dayz_resetSelfActions;
  267.  
  268. //Engineering variables
  269. s_player_lastTarget = objNull;
  270. s_player_repairActions = [];
  271.  
  272. //for carry slot since determining mouse pos doesn't work right
  273. mouseOverCarry = false;
  274.  
  275. //Initialize Medical Variables
  276. force_dropBody = false;
  277. r_interrupt = false;
  278. r_doLoop = false;
  279. r_self = false;
  280. r_self_actions = [];
  281. r_drag_sqf = false;
  282. r_action = false;
  283. r_action_unload = false;
  284. r_player_handler = false;
  285. r_player_handler1 = false;
  286. r_player_dead = false;
  287. r_player_unconscious = false;
  288. r_player_infected = false;
  289. //infection from hits
  290. r_player_Sepsis = [false, 0];
  291. r_player_injured = false;
  292. r_player_inpain = false;
  293. r_player_loaded = false;
  294. r_player_cardiac = false;
  295. r_fracture_legs = false;
  296. r_fracture_arms = false;
  297. r_player_vehicle = player;
  298. r_player_blood = 12000;
  299. //Blood Regen
  300. r_player_bloodregen = 0;
  301. //Blood Gain Per Sec
  302. r_player_bloodgainpersec = 0;
  303. //Blood Loss Per Sec
  304. r_player_bloodlosspersec = 0;
  305. //Blood Per Sec (gain - loss)
  306. r_player_bloodpersec = 0;
  307. //Food Stack
  308. r_player_foodstack = 1;
  309. //player skill
  310. r_player_lowblood = false;
  311. r_player_timeout = 0;
  312. r_player_bloodTotal = r_player_blood;
  313. r_public_blood = r_player_blood;
  314. r_player_bloodDanger = r_player_bloodTotal * 0.2;
  315. r_player_actions = [];
  316. r_handlerCount = 0;
  317. r_action_repair = false;
  318. r_action_targets = [];
  319. r_pitchWhine = false;
  320. r_isBandit = false;
  321.  
  322. //count actions
  323. r_action_count = 0;
  324.  
  325. //ammo routine
  326. r_player_actions2 = [];
  327. r_action2 = false;
  328. r_player_lastVehicle = objNull;
  329. r_player_lastSeat = [];
  330. r_player_removeActions2 = {
  331. if (!isNull r_player_lastVehicle) then {
  332. {
  333. r_player_lastVehicle removeAction _x;
  334. } forEach r_player_actions2;
  335. r_player_actions2 = [];
  336. r_action2 = false;
  337. };
  338. };
  339.  
  340. USEC_woundHit = [ // limbs hit given by arma engine when fnc_usec_damageHandler is called
  341. "",
  342. "body",
  343. "hands",
  344. "legs",
  345. "head_hit"
  346. ];
  347. DAYZ_woundHit = [
  348. [
  349. "body",
  350. "hands",
  351. "legs",
  352. "head_hit"
  353. ],
  354. [ 0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,3]
  355. ];
  356. DAYZ_woundHit_ok = [
  357. [
  358. "body",
  359. "hands",
  360. "legs"
  361. ],
  362. [0,0,0,0,0,1,1,1,2,2]
  363. ];
  364. USEC_MinorWounds = [
  365. "hands",
  366. "legs"
  367. ];
  368. USEC_woundPoint = [ // translation table USEC_woundHit -> SV suffixes
  369. ["Pelvis","aimpoint"],
  370. ["aimpoint"], //,"RightShoulder","LeftShoulder"
  371. ["lelbow","relbow"],
  372. ["RightFoot","LeftFoot"],
  373. ["neck","pilot"]
  374. ];
  375. USEC_typeOfWounds = [ // used by player_sumMedical, should contains all limbs described in USEC_woundPoint. These limbs statuses are saved by server_playerSync in HIVE if they are bleeding (medical select 8)
  376. "Pelvis",
  377. "aimpoint",
  378. "lelbow","relbow",
  379. "RightFoot","LeftFoot",
  380. "neck","pilot"
  381. ];
  382.  
  383. //Initialize Zombie Variables
  384. dayz_zombieTargetList = [
  385. ["SoldierWB",50],
  386. ["Air",500],
  387. ["LandVehicle",200]
  388. ];
  389. PVDZ_obj_Publish = []; //used for eventhandler to spawn a mirror of players tent
  390. PVCDZ_obj_HideBody = objNull;
  391.  
  392. //DayZ settings
  393. dayz_maxAnimals = 5;
  394. dayz_maxPlants = 3;
  395. dayz_animalDistance = 600;
  396. dayz_plantDistance = 600;
  397.  
  398. dayz_maxMaxModels = 80; // max quantity of Man models (player or Z, dead or alive) around players. Below this limit we can spawn Z // max quantity of loot piles around players. Below this limit we can spawn some loot
  399. dayz_spawnArea = 200; // radius around player where we can spawn loot & Z
  400. dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing and angle checks
  401. dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
  402. dayz_canDelete = 300; // Z, further than this distance from its "owner", will be deleted
  403.  
  404. //init global arrays for Loot Chances
  405. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\loot_init.sqf";
  406.  
  407. if(isServer) then {
  408. dayz_players = [];
  409. dead_bodyCleanup = [];
  410. needUpdate_objects = [];
  411. Server_InfectedCamps = [];
  412. //dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
  413. //dayz_spawnInfectedSite_clutterCutter=0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
  414. dayz_traps = [];
  415. dayz_traps_active = [];
  416. dayz_traps_trigger = [];
  417. };
  418.  
  419. if(!isDedicated) then {
  420. //Establish Location Streaming
  421. _funcGetLocation =
  422. {
  423. dayz_Locations = [];
  424. for "_i" from 0 to ((count _this) - 1) do
  425. {
  426. private ["_location","_config","_locHdr","_position","_size","_type"];
  427. //Get Location Data from config
  428. _config = (_this select _i);
  429. _position = getArray (_config >> "position");
  430. _locHdr = configName _config;
  431. _size = getNumber (_config >> "size");
  432. dayz_Locations set [count dayz_Locations, [_position,_locHdr,_size]];
  433. };
  434. };
  435. _cfgLocation = configFile >> "CfgTownGeneratorChernarus";
  436. _cfgLocation call _funcGetLocation;
  437.  
  438. dayz_buildingMonitor = []; //Buildings to check
  439. dayz_bodyMonitor = [];
  440. dayz_flyMonitor = []; //used for monitor flies
  441. dayz_zedMonitor = [];
  442. dayz_buildingBubbleMonitor = [];
  443.  
  444. dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
  445.  
  446. //temperature variables
  447. dayz_temperatur = 36; //TeeChange
  448. dayz_temperaturnormal = 36; //TeeChange
  449. dayz_temperaturmax = 42; //TeeChange
  450. dayz_temperaturmin = 27; //TeeChange
  451.  
  452. //player special variables
  453. dayZ_lastPlayerUpdate = 0;
  454. dayz_hunger = 0;
  455. dayz_thirst = 0;
  456. dayz_preloadFinished = true;
  457. dayz_statusArray = [1,1];
  458. dayz_disAudial = 0;
  459. dayz_disVisual = 0;
  460. dayz_firedCooldown = 0;
  461. dayz_damageCounter = time;
  462. dayz_lastSave = time;
  463. dayz_isSwimming = true;
  464. dayz_currentDay = 0;
  465. dayz_hasLight = false;
  466. dayz_surfaceNoise = 0;
  467. dayz_surfaceType = "None";
  468. dayz_noPenalty = [];
  469. dayz_heavenCooldown = 0;
  470. deathHandled = false;
  471. dayz_firstGroup = group player;
  472. dayz_originalPlayer = player;
  473. dayz_playerName = "Unknown";
  474. dayz_sourceBleeding = objNull;
  475. dayz_clientPreload = false;
  476. dayz_authed = false;
  477. dayz_panicCooldown = 0;
  478. dayz_areaAffect = 3.5;
  479. dayz_monitorPeriod = 0.6; // number of seconds between each player_zombieCheck calls
  480. dayz_heartBeat = false;
  481. //Current local
  482. dayz_spawnZombies = 0;
  483. dayz_swarmSpawnZombies = 0;
  484. //Max local
  485. dayz_maxLocalZombies = 30; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z
  486. //Current NearBy
  487. dayz_CurrentNearByZombies = 0;
  488. //Max NearBy
  489. dayz_maxNearByZombies = 60; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z
  490. //Current total
  491. dayz_currentGlobalZombies = 0;
  492. //Max global zeds.
  493. dayz_maxGlobalZeds = 3000;
  494. //Animals
  495. dayz_currentGlobalAnimals = 0;
  496. dayz_maxGlobalAnimals = 100;
  497. //Plnats
  498. dayz_currentGlobalPlants = 0;
  499. dayz_maxGlobalPlants = 100;
  500. //Loot
  501. dayz_tickTimeOffset = 0;
  502. dayz_currentWeaponHolders = 0;
  503. dayz_maxMaxWeaponHolders = 80;
  504. dayz_inVehicle = false;
  505. dayzGearSave = false;
  506. dayz_unsaved = false;
  507. dayz_scaleLight = 0;
  508. dayzDebug = false;
  509. dayzState = -1;
  510. dayz_onBack = "";
  511. dayz_onBackActive = false;
  512. dayz_fishingInprogress = false;
  513. dayz_siphonFuelInProgress = false;
  514. dayz_salvageInProgress = false;
  515. lastSpawned = diag_tickTime;
  516. lastSepsis = 0;
  517. //uiNamespace setVariable ['DAYZ_GUI_display',displayNull];
  518. //if (uiNamespace getVariable ['DZ_displayUI', 0] == 2) then {
  519. // dayzDebug = true;
  520. //};
  521. };
Advertisement
Add Comment
Please, Sign In to add comment