Advertisement
Guest User

variables.sqf

a guest
Feb 18th, 2017
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.26 KB | None | 0 0
  1. disableSerialization;
  2.  
  3. //Model Variables
  4. Bandit1_DZ = "Bandit1_DZ";
  5. Bandit2_DZ = "Bandit2_DZ";
  6. BanditW1_DZ = "BanditW1_DZ";
  7. BanditW2_DZ = "BanditW2_DZ";
  8. Survivor1_DZ = "Survivor2_DZ";
  9. Survivor2_DZ = "Survivor2_DZ";
  10. SurvivorW2_DZ = "SurvivorW2_DZ";
  11. SurvivorW3_DZ = "SurvivorW2_DZ";
  12. Sniper1_DZ = "Sniper1_DZ";
  13. Camo1_DZ = "Camo1_DZ";
  14. Soldier1_DZ = "Soldier1_DZ";
  15. Rocket_DZ = "Rocket_DZ";
  16.  
  17. AllPlayers = ["Survivor2_DZ","SurvivorWcombat_DZ","SurvivorWdesert_DZ","SurvivorWurban_DZ","SurvivorWsequishaD_DZ","SurvivorWsequisha_DZ","SurvivorWpink_DZ","SurvivorW3_DZ","SurvivorW2_DZ","Bandit1_DZ","Bandit2_DZ","BanditW1_DZ","BanditW2_DZ","Soldier_Crew_PMC","Sniper1_DZ","Camo1_DZ","Soldier1_DZ","Rocket_DZ","Rocker1_DZ","Rocker2_DZ","Rocker3_DZ","Rocker4_DZ","Priest_DZ","Functionary1_EP1_DZ","GUE_Commander_DZ","Ins_Soldier_GL_DZ","Haris_Press_EP1_DZ","Pilot_EP1_DZ","RU_Policeman_DZ","pz_policeman","pz_suit1","pz_suit2","pz_worker1","pz_worker2","pz_worker3","pz_doctor","pz_teacher","pz_hunter","pz_villager1","pz_villager2","pz_villager3","pz_priest","Soldier_TL_PMC_DZ","Soldier_Sniper_PMC_DZ","Soldier_Bodyguard_AA12_PMC_DZ","Drake_Light_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","FR_OHara_DZ","FR_Rodriguez_DZ","CZ_Soldier_Sniper_EP1_DZ","Graves_Light_DZ","GUE_Soldier_MG_DZ","GUE_Soldier_Sniper_DZ","GUE_Soldier_Crew_DZ","GUE_Soldier_CO_DZ","GUE_Soldier_2_DZ","TK_Special_Forces_MG_EP1_DZ","TK_Soldier_Sniper_EP1_DZ","TK_Commander_EP1_DZ","RU_Soldier_Crew_DZ","INS_Lopotev_DZ","INS_Soldier_AR_DZ","INS_Soldier_CO_DZ","INS_Bardak_DZ","INS_Worker2_DZ"];
  18. MeleeWeapons = ["MeleeFishingPole","MeleeCrowbar","MeleeBaseBallBatNails","MeleeBaseBallBatBarbed","MeleeBaseBallBat","Crossbow_DZ","MeleeSledge","MeleeMachete","MeleeHatchet_DZE"];
  19. gear_done = false;
  20. //Cooking
  21. meatraw = [
  22. "FoodSteakRaw",
  23. "FoodmeatRaw",
  24. "FoodbeefRaw",
  25. "FoodmuttonRaw",
  26. "FoodchickenRaw",
  27. "FoodrabbitRaw",
  28. "FoodbaconRaw",
  29. "ItemTrout",
  30. "ItemSeaBass",
  31. "ItemTuna"
  32. ];
  33. exceptionsraw = ["ItemTuna"];
  34. meatcooked = [
  35. "FoodSteakCooked",
  36. "FoodmeatCooked",
  37. "FoodbeefCooked",
  38. "FoodmuttonCooked",
  39. "FoodchickenCooked",
  40. "FoodrabbitCooked",
  41. "FoodbaconCooked",
  42. "ItemTroutCooked",
  43. "ItemSeaBassCooked",
  44. "ItemTunaCooked"
  45. ];
  46. //Eating
  47. no_output_food = ["FoodMRE", "FoodPistachio", "FoodNutmix","FoodBioMeat"]+meatcooked+meatraw;
  48.  
  49. // Food with increased chance for infection.
  50. badfood = ["FoodBioMeat","FoodCanUnlabeled"];
  51.  
  52. food_with_output=[
  53. "FoodCanBakedBeans",
  54. "FoodCanSardines",
  55. "FoodCanFrankBeans",
  56. "FoodCanPasta",
  57. "FoodCanGriff",
  58. "FoodCanBadguy",
  59. "FoodCanBoneboy",
  60. "FoodCanCorn",
  61. "FoodCanCurgon",
  62. "FoodCanDemon",
  63. "FoodCanFraggleos",
  64. "FoodCanHerpy",
  65. "FoodCanOrlok",
  66. "FoodCanPowell",
  67. "FoodCanTylers",
  68. "FoodCanUnlabeled"
  69. ];
  70.  
  71. food_output = [
  72. "TrashTinCan",
  73. "TrashTinCan",
  74. "TrashTinCan",
  75. "TrashTinCan",
  76. "FoodCanGriffEmpty",
  77. "FoodCanBadguyEmpty",
  78. "FoodCanBoneboyEmpty",
  79. "FoodCanCornEmpty",
  80. "FoodCanCurgonEmpty",
  81. "FoodCanDemonEmpty",
  82. "FoodCanFraggleosEmpty",
  83. "FoodCanHerpyEmpty",
  84. "FoodCanOrlokEmpty",
  85. "FoodCanPowellEmpty",
  86. "FoodCanTylersEmpty",
  87. "FoodCanUnlabeledEmpty"
  88. ];
  89. //Drinking
  90. no_output_drink = ["ItemWaterbottle", "ItemWaterbottleBoiled"];
  91. drink_with_output = [
  92. "ItemSoda", //just to define item for ItemSodaEmpty
  93. "ItemSodaRbull",
  94. "ItemSodaOrangeSherbet",
  95. "ItemSodaCoke",
  96. "ItemSodaPepsi",
  97. "ItemSodaMdew",
  98. "ItemSodaMtngreen",
  99. "ItemSodaR4z0r",
  100. "ItemSodaClays",
  101. "ItemSodaSmasht",
  102. "ItemSodaDrwaste",
  103. "ItemSodaLemonade",
  104. "ItemSodaLvg",
  105. "ItemSodaMzly",
  106. "ItemSodaRabbit"
  107. ];
  108. drink_output = [
  109. "ItemSodaEmpty",
  110. "ItemSodaEmpty",
  111. "ItemSodaEmpty",
  112. "ItemSodaCokeEmpty",
  113. "ItemSodaPepsiEmpty",
  114. "ItemSodaMdewEmpty",
  115. "ItemSodaMtngreenEmpty",
  116. "ItemSodaR4z0rEmpty",
  117. "ItemSodaClaysEmpty",
  118. "ItemSodaSmashtEmpty",
  119. "ItemSodaDrwasteEmpty",
  120. "ItemSodaLemonadeEmpty",
  121. "ItemSodaLvgEmpty",
  122. "ItemSodaMzlyEmpty",
  123. "ItemSodaRabbitEmpty"
  124. ];
  125. boil_tin_cans = [
  126. "TrashTinCan",
  127. "FoodCanGriffEmpty",
  128. "FoodCanBadguyEmpty",
  129. "FoodCanBoneboyEmpty",
  130. "FoodCanCornEmpty",
  131. "FoodCanCurgonEmpty",
  132. "FoodCanDemonEmpty",
  133. "FoodCanFraggleosEmpty",
  134. "FoodCanHerpyEmpty",
  135. "FoodCanOrlokEmpty",
  136. "FoodCanPowellEmpty",
  137. "FoodCanTylersEmpty",
  138. "FoodCanUnlabeledEmpty",
  139. "ItemSodaEmpty",
  140. "ItemSodaCokeEmpty",
  141. "ItemSodaPepsiEmpty",
  142. "ItemSodaMdewEmpty",
  143. "ItemSodaMtngreenEmpty",
  144. "ItemSodaR4z0rEmpty",
  145. "ItemSodaClaysEmpty",
  146. "ItemSodaSmashtEmpty",
  147. "ItemSodaDrwasteEmpty",
  148. "ItemSodaLemonadeEmpty",
  149. "ItemSodaLvgEmpty",
  150. "ItemSodaMzlyEmpty",
  151. "ItemSodaRabbitEmpty"
  152. ];
  153.  
  154.  
  155.  
  156. dayz_combination = "";
  157. dayz_humanitytarget = "";
  158. dayz_combatLog = "";
  159. canRoll = true;
  160.  
  161. canbuild = true;
  162.  
  163. //Hunting Variables
  164. dayZ_partClasses = [
  165. "PartFueltank",
  166. "PartWheel",
  167. //"PartGeneric", //No need to add, it is default for everything
  168. "PartEngine"
  169. ];
  170. dayZ_explosiveParts = [
  171. "palivo",
  172. "motor"
  173. ];
  174. //Survival Variables
  175. SleepFood = 2160; //minutes (48 hours)
  176. SleepWater = 1440; //minutes (24 hours)
  177. SleepTemperatur = 90 / 100; //Firs Value = Minutes untill Player reaches the coldest Point at night (without other effects! night factor expected to be -1) //TeeChange
  178.  
  179. //Server Variables
  180. allowConnection = false;
  181. isSinglePlayer = false;
  182. PVDZE_serverObjectMonitor = [];
  183. PlayerDeaths = [];
  184.  
  185. //Streaming Variables (player only)
  186. dayz_Locations = [];
  187. dayz_locationsActive = [];
  188.  
  189. //GUI
  190. Dayz_GUI_R = 0.38; // 0.7
  191. Dayz_GUI_G = 0.63; // -0.63
  192. Dayz_GUI_B = 0.26; // -0.26
  193.  
  194. //Player self-action handles
  195. dayz_resetSelfActions = {
  196. s_player_run_events = -1;
  197. s_player_hospitalhero = -1;
  198. s_player_plotManagement = -1;
  199. s_player_fire = -1;
  200. s_player_cook = -1;
  201. s_player_boil = -1;
  202. s_player_fireout = -1;
  203. s_player_butcher = -1;
  204. s_player_packtent = -1;
  205. s_player_packvault = -1;
  206. s_player_lockvault = -1;
  207. s_player_unlockvault = -1;
  208. s_player_fillwater = -1;
  209. s_player_fillwater2 = -1;
  210. s_player_fillfuel = -1;
  211. s_player_grabflare = -1;
  212. s_player_callzombies = -1;
  213. s_player_showname = -1;
  214. s_player_debuglootpos = -1;
  215. s_player_pzombiesattack = -1;
  216. s_player_pzombiesvision = -1;
  217. s_player_pzombiesfeed = -1;
  218. s_player_removeflare = -1;
  219. s_player_painkiller = -1;
  220. s_player_studybody = -1;
  221. s_player_tamedog = -1;
  222. s_player_madsci_crtl = -1;
  223. s_player_parts_crtl = -1;
  224. s_build_Sandbag1_DZ = -1;
  225. s_build_Hedgehog_DZ = -1;
  226. s_build_Wire_cat1 = -1;
  227. s_player_deleteBuild = -1;
  228. s_player_forceSave = -1;
  229. s_player_checkGear = -1;
  230. s_player_flipveh = -1;
  231. s_player_stats = -1;
  232. s_player_sleep = -1;
  233. s_player_movedog = -1;
  234. s_player_speeddog = -1;
  235. s_player_calldog = -1;
  236. s_player_feeddog = -1;
  237. s_player_waterdog = -1;
  238. s_player_staydog = -1;
  239. s_player_trackdog = -1;
  240. s_player_barkdog = -1;
  241. s_player_warndog = -1;
  242. s_player_followdog = -1;
  243. s_player_repair_crtl = -1;
  244. s_player_information = -1;
  245. s_player_fuelauto = -1;
  246. s_player_fuelauto2 = -1;
  247. s_player_fillgen = -1;
  248. s_player_upgrade_build = -1;
  249. s_player_maint_build = -1;
  250. s_player_downgrade_build = -1;
  251. s_player_towing = -1;
  252. s_halo_action = -1;
  253. s_player_SurrenderedGear = -1;
  254. s_player_maintain_area = -1;
  255. s_player_maintain_area_preview = -1;
  256. s_player_heli_lift = -1;
  257. s_player_heli_detach = -1;
  258. s_player_lockUnlock_crtl = -1;
  259. s_player_stopwork = -1;
  260. s_player_work = -1;
  261. s_player_stopworkscrap = -1;
  262. s_player_workscrap = -1;
  263. s_player_stopworkwood = -1;
  264. s_player_workwood = -1;
  265. s_player_stopworktrash = -1;
  266. s_player_worktrash = -1;
  267. s_player_stopworkammo = -1;
  268. s_player_workammo = -1;
  269. s_player_levelbuilds = -1;
  270. };
  271. call dayz_resetSelfActions;
  272.  
  273. //Engineering variables
  274. s_player_lastTarget = [objNull,objNull,objNull,objNull,objNull];
  275. s_player_repairActions = [];
  276. s_player_lockunlock = [];
  277.  
  278. // Custom
  279. s_player_madsci = [];
  280. s_player_parts = [];
  281. s_player_combi = [];
  282.  
  283. //Initialize Medical Variables
  284. r_interrupt = false;
  285. r_doLoop = false;
  286. r_self = false;
  287. r_self_actions = [];
  288. r_drag_sqf = false;
  289. r_action = false;
  290. r_action_unload = false;
  291. r_player_handler = false;
  292. r_player_handler1 = false;
  293. r_player_dead = false;
  294. r_player_unconscious = false;
  295. r_player_infected = false;
  296. r_player_injured = false;
  297. r_player_inpain = false;
  298. r_player_loaded = false;
  299. r_player_cardiac = false;
  300. r_fracture_legs = false;
  301. r_fracture_arms = false;
  302. r_player_vehicle = player;
  303. r_player_blood = 12000;
  304. r_player_lowblood = false;
  305. r_player_timeout = 0;
  306. r_player_bloodTotal = r_player_blood;
  307. r_public_blood = r_player_blood;
  308. r_player_bloodDanger = r_player_bloodTotal * 0.2;
  309. r_player_actions = [];
  310. r_handlerCount = 0;
  311. r_action_repair = false;
  312. r_action_targets = [];
  313. r_pitchWhine = false;
  314. r_isBandit = false;
  315. isInTraderCity = false;
  316. NORRN_dropAction = -1;
  317. DZE_PROTOBOX = objNull;
  318.  
  319. //ammo routine
  320. r_player_actions2 = [];
  321. r_action2 = false;
  322. r_player_lastVehicle = objNull;
  323. r_player_lastSeat = [];
  324. r_player_removeActions2 = {
  325. if (!isNull r_player_lastVehicle) then {
  326. {
  327. r_player_lastVehicle removeAction _x;
  328. } count r_player_actions2;
  329. r_player_actions2 = [];
  330. r_action2 = false;
  331. };
  332. };
  333.  
  334. USEC_woundHit = [
  335. "",
  336. "body",
  337. "hands",
  338. "legs",
  339. "head_hit"
  340. ];
  341. DAYZ_woundHit = [
  342. [
  343. "body",
  344. "hands",
  345. "legs",
  346. "head_hit"
  347. ],
  348. [ 0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,3]
  349. ];
  350. DAYZ_woundHit_ok = [
  351. [
  352. "body",
  353. "hands",
  354. "legs"
  355. ],
  356. [0,0,0,0,0,1,1,1,2,2]
  357. ];
  358. DAYZ_woundHit_dog = [
  359. [
  360. "body",
  361. "hands",
  362. "legs"
  363. ],
  364. [0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2]
  365. ];
  366. USEC_MinorWounds = [
  367. "hands",
  368. "legs"
  369. ];
  370. USEC_woundPoint = [
  371. ["Pelvis","aimpoint"],
  372. ["aimpoint"], //,"RightShoulder","LeftShoulder"
  373. ["lelbow","relbow"],
  374. ["RightFoot","LeftFoot"],
  375. ["neck","pilot"]
  376. ];
  377. USEC_typeOfWounds = [
  378. "Pelvis",
  379. "aimpoint",
  380. "lelbow","relbow",
  381. "RightFoot","LeftFoot",
  382. "neck","pilot"
  383. ];
  384.  
  385. DZE_vehicleZwounds = [
  386. "sklo predni L",
  387. "sklo predni P",
  388. "sklo zadni",
  389. "sklo zadni L",
  390. "sklo zadni P",
  391. "sklo P",
  392. "Glass1",
  393. "Glass2",
  394. "Glass3",
  395. "Glass4",
  396. "Glass5",
  397. "Glass6"
  398. ];
  399.  
  400. DZE_HeliAllowTowFrom = [
  401. "CH_47F_EP1_DZE",
  402. "CH_47F_EP1_DZ",
  403. "CH_47F_BAF",
  404. "CH_47F_EP1",
  405. "BAF_Merlin_DZE",
  406. "CH53_DZE"
  407. ];
  408.  
  409. DZE_HeliAllowToTow = [
  410. "hilux1_civil_1_open",
  411. "HMMWV_Base",
  412. "Lada_base",
  413. "Offroad_DSHKM_base",
  414. "Pickup_PK_base",
  415. "SkodaBase",
  416. "tractor",
  417. "VWGolf",
  418. "Volha_TK_CIV_Base_EP1",
  419. "S1203_TK_CIV_EP1",
  420. "SUV_Base_EP1",
  421. "ArmoredSUV_Base_PMC",
  422. "UAZ_Base",
  423. "LandRover_Base",
  424. "Ship"
  425. ];
  426.  
  427. //Initialize Zombie Variables
  428. dayz_zombieTargetList = [
  429. ["SoldierWB",50],
  430. ["Air",500],
  431. ["LandVehicle",200]
  432. ];
  433. PVDZE_plr_Hit = [];
  434. PVDZE_obj_Publish = []; //used for eventhandler to spawn a mirror of players tent
  435. PVDZE_plr_HideBody = objNull;
  436. dayz_selectedVault = objNull;
  437. dayz_selectedDoor = objNull;
  438.  
  439. PVDZE_veh_Publish = []; // for vehicle traders
  440. PVDZE_obj_Trade = []; // For all traders increment qty
  441. PVDZE_plr_TradeMenu = []; // For all traders
  442. PVDZE_plr_DeathB = [];
  443.  
  444. //DayZ settings
  445. dayz_dawn = 6;
  446. dayz_dusk = 18;
  447. DAYZ_agentnumber = 0;
  448. dayz_animalDistance = 800;
  449. dayz_zSpawnDistance = 1000;
  450.  
  451. dayz_maxMaxModels = 80; // max quantity of Man models (player || Z, dead || 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
  452. dayz_spawnArea = 200; // radius around player where we can spawn loot & Z
  453. dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing && angle checks
  454. dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
  455. dayz_canDelete = 300; // Z, further than this distance from its "owner", will be deleted
  456.  
  457. if(isNil "DZE_SelfTransfuse") then {
  458. DZE_SelfTransfuse = false;
  459. };
  460. if(isNil "dayz_maxAnimals") then {
  461. dayz_maxAnimals = 5;
  462. };
  463. if(isNil "timezoneswitch") then {
  464. timezoneswitch = 0;
  465. };
  466. if(isNil "dayz_maxLocalZombies") then {
  467. dayz_maxLocalZombies = 5;
  468. };
  469. if(isNil "dayz_maxGlobalZombiesInit") then {
  470. dayz_maxGlobalZombiesInit = 15;
  471. };
  472. if(isNil "dayz_maxGlobalZombiesIncrease") then {
  473. dayz_maxGlobalZombiesIncrease = 2;
  474. };
  475. if(isNil "dayz_maxZeds") then {
  476. dayz_maxZeds = 50;
  477. };
  478. if (isNil "DZE_PlayerZed") then {
  479. DZE_PlayerZed = false;
  480. };
  481. if (isNil "DZE_GodModeBase") then {
  482. DZE_GodModeBase = false;
  483. };
  484. if(isNil "DZEdebug") then {
  485. DZEdebug = false;
  486. };
  487. if (isNil "DZE_Debug_Damage") then {
  488. DZE_Debug_Damage = true;
  489. };
  490. if(isNil "DZE_TRADER_SPAWNMODE") then {
  491. DZE_TRADER_SPAWNMODE = false;
  492. };
  493. if(isNil "dayz_tameDogs") then {
  494. dayz_tameDogs = false;
  495. };
  496. if(isNil "dayz_sellDistance_vehicle") then {
  497. dayz_sellDistance_vehicle = 10;
  498. };
  499. if(isNil "dayz_sellDistance_boat") then {
  500. dayz_sellDistance_boat = 30;
  501. };
  502. if(isNil "dayz_sellDistance_air") then {
  503. dayz_sellDistance_air = 40;
  504. };
  505. if(isNil "dayz_paraSpawn") then {
  506. dayz_paraSpawn = false;
  507. };
  508. if(isNil "dayz_minpos") then {
  509. dayz_minpos = -20000;
  510. };
  511. if(isNil "dayz_maxpos") then {
  512. dayz_maxpos = 20000;
  513. };
  514. if(isNil "DZE_BuildingLimit") then {
  515. DZE_BuildingLimit = 150;
  516. };
  517. if(isNil "DZE_HumanityTargetDistance") then {
  518. DZE_HumanityTargetDistance = 25;
  519. };
  520. if(isNil "DZE_FriendlySaving") then {
  521. DZE_FriendlySaving = true;
  522. };
  523. if(isNil "DZE_BuildOnRoads") then {
  524. DZE_BuildOnRoads = false;
  525. };
  526. if(isNil "DZE_MissionLootTable") then {
  527. DZE_MissionLootTable = true;
  528. };
  529. if(isNil "DZE_ConfigTrader") then {
  530. DZE_ConfigTrader = false;
  531. };
  532. if(isNil "DZE_LootSpawnTimer") then {
  533. DZE_LootSpawnTimer = 10;
  534. };
  535. if(isNil "DZE_HeliLift") then {
  536. DZE_HeliLift = true;
  537. };
  538. if(isNil "DZE_DamageBeforeMaint") then {
  539. DZE_DamageBeforeMaint = 0.1;
  540. };
  541. if(isNil "DZE_StaticConstructionCount") then {
  542. DZE_StaticConstructionCount = 0;
  543. };
  544. if (isNil "DZE_selfTransfuse_Values") then {
  545. DZE_selfTransfuse_Values = [12000, 15, 300];
  546. };
  547.  
  548. // needed on server
  549. if(isNil "DZE_PlotPole") then {
  550. DZE_PlotPole = [30,45];
  551. };
  552. if(isNil "DZE_maintainRange") then {
  553. DZE_maintainRange = ((DZE_PlotPole select 0)+20);
  554. };
  555.  
  556. DZE_REPLACE_WEAPONS = [["Crossbow","ItemMatchbox","ItemHatchet"],["Crossbow_DZ","ItemMatchbox_DZE","ItemHatchet_DZE"]];
  557.  
  558. if(isNil "dayz_zedSpawnVehCount") then {
  559. dayz_zedSpawnVehCount = dayz_maxLocalZombies / 2;
  560. };
  561. if(isNil "dayz_spawnAirCount") then {
  562. dayz_spawnAirCount = 0;
  563. };
  564. if(isNil "dayz_zedsAttackVehicles") then {
  565. dayz_zedsAttackVehicles = true;
  566. };
  567.  
  568. // update objects
  569. dayz_updateObjects = ["Plane","Tank","Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage","LockboxStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ","Scaffolding_DZ"];
  570. dayz_disallowedVault = ["TentStorage", "BuiltItems","ModularItems","DZE_Base_Object"];
  571. dayz_reveal = ["AllVehicles","WeaponHolder","Land_A_tent","BuiltItems","ModularItems","DZE_Base_Object"];
  572. advworkshop = ["MAP_kulna","Land_Misc_Well_L_EP1","MAP_Misc_Boogieman","MAP_Shed_W01","MAP_P_Stavebni_kozy","MAP_parabola_big","MAP_office_table_a","Loudspeakers_EP1","MAP_Dkamna_bila","MAP_plot_green_draty","GUE_WarfareBFieldhHospital","MAP_bouda2_vnitrek","MAP_deutshe_mini","MAP_Mil_Mil_Guardhouse","MAP_Pristresek_mensi","Land_fort_bagfence_corner","MAP_plot_provizorni","M2StaticMG_US_EP1","DSHKM_Gue","SearchLight_RUS"];
  573. dayz_allowedObjects = advworkshop +["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ"];
  574.  
  575. DZE_SurvivedHouseRemove = advworkshop;
  576.  
  577. DZE_LockableStorage = ["VaultStorage","VaultStorageLocked","LockboxStorageLocked","LockboxStorage"];
  578. DZE_LockedStorage = ["VaultStorageLocked","LockboxStorageLocked"];
  579. DZE_UnLockedStorage = ["VaultStorage","LockboxStorage"];
  580. DZE_maintainClasses = advworkshop +["ModularItems","DZE_Housebase","LightPole_DZ","BuiltItems","Plastic_Pole_EP1_DZ","Fence_corrugated_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","StickFence_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","DeerStand_DZ","Scaffolding_DZ","FireBarrel_DZ"];
  581.  
  582. DZE_DoorsLocked = ["Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallDoorLocked_DZ","CinderWallDoorSmallLocked_DZ"];
  583.  
  584. // List of removable items that require crowbar
  585. DZE_isRemovable = ["Fence_corrugated_DZ","ParkBench_DZ","Plastic_Pole_EP1_DZ","FireBarrel_DZ","Scaffolding_DZ"];
  586. DZE_isWreck = ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
  587. DZE_isWreckBuilding = ["Land_wreck_cinder","Land_wood_wreck_quarter","Land_wood_wreck_floor","Land_wood_wreck_third","Land_wood_wreck_frame","Land_iron_vein_wreck","Land_silver_vein_wreck","Land_gold_vein_wreck","Land_ammo_supply_wreck"];
  588. DZE_isNewStorage = ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","GunRack_DZ","WoodCrate_DZ"];
  589.  
  590. // These work with just a running generator
  591. dayz_fuelpumparray = ["FuelPump_DZ","Land_A_FuelStation_Feed","Land_Ind_FuelStation_Feed_EP1","Land_FuelStation_Feed_PMC","FuelStation","Land_ibr_FuelStation_Feed","Land_fuelstation_army","Land_fuelstation","land_fuelstation_w","Land_benzina_schnell"];
  592. DZE_fueltruckarray = ["KamazRefuel_DZ","UralRefuel_TK_EP1_DZ","MtvrRefuel_DES_EP1_DZ","V3S_Refuel_TK_GUE_EP1_DZ","MtvrRefuel_DZ","KamazRefuel_DZE","UralRefuel_TK_EP1_DZE","MtvrRefuel_DES_EP1_DZE","V3S_Refuel_TK_GUE_EP1_DZE","MtvrRefuel_DZE"];
  593.  
  594. // Standard Fuel sources
  595. dayz_fuelsources = ["Land_Ind_TankSmall","Land_fuel_tank_big","Land_fuel_tank_stairs","Land_fuel_tank_stairs_ep1","Land_wagon_tanker","Land_fuelstation","Land_fuelstation_army","land_fuelstation_w","Land_benzina_schnell"];
  596.  
  597. DZE_Lock_Door = "";
  598.  
  599. //init global arrays for Loot Chances
  600. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\loot_init.sqf";
  601.  
  602. if(isServer) then {
  603. dayz_players = [];
  604. dead_bodyCleanup = [];
  605. needUpdate_objects = [];
  606.  
  607. DZE_DYN_AntiStuck = 0;
  608. DZE_DYN_AntiStuck2nd = 0;
  609. DZE_DYN_AntiStuck3rd = 0;
  610.  
  611. if(isNil "dayz_fullMoonNights") then {
  612. dayz_fullMoonNights = false;
  613. };
  614. if(isNil "EpochEvents") then {
  615. EpochEvents = [];
  616. };
  617. if(isNil "DZE_vehicleAmmo") then {
  618. DZE_vehicleAmmo = 0;
  619. };
  620.  
  621. if(isNil "DZE_BackpackGuard") then {
  622. DZE_BackpackGuard = true;
  623. };
  624.  
  625. if(isNil "DZE_CleanNull") then {
  626. DZE_CleanNull = false;
  627. };
  628. if (isNil "DZE_DeathMsgGlobal") then {
  629. DZE_DeathMsgGlobal = false;
  630. };
  631. if (isNil "DZE_DeathMsgSide") then {
  632. DZE_DeathMsgSide = false;
  633. };
  634. if (isNil "DZE_DeathMsgTitleText") then {
  635. DZE_DeathMsgTitleText = false;
  636. };
  637. DZE_safeVehicle = advworkshop + ["ParachuteWest","ParachuteC"];
  638. };
  639.  
  640. if(!isDedicated) then {
  641.  
  642. dayz_spawnPos = getPosATL player;
  643.  
  644. dayz_buildingMonitor = []; //Buildings to check
  645. dayz_bodyMonitor = [];
  646.  
  647. // weather control var
  648. zeroPreviousWeather = [0,0,[0,0],0];
  649. zeroCurrentWeather = [0,0,[0,0],0];
  650.  
  651. if (DZE_MissionLootTable) then {
  652. dayz_baseTypes = getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
  653. } else {
  654. dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
  655. };
  656.  
  657.  
  658. //temperature variables
  659. dayz_temperatur = 36; //TeeChange
  660. dayz_temperaturnormal = 36; //TeeChange
  661. dayz_temperaturmax = 42; //TeeChange
  662. dayz_temperaturmin = 27; //TeeChange
  663.  
  664. //player special variables
  665. dayZ_lastPlayerUpdate = 0;
  666. dayZ_everyonesTents = [];
  667. dayz_hunger = 0;
  668. dayz_thirst = 0;
  669. dayz_combat = 0;
  670. dayz_preloadFinished = false;
  671. dayz_statusArray = [1,1];
  672. dayz_disAudial = 0;
  673. dayz_disVisual = 0;
  674. dayz_firedCooldown = 0;
  675. dayz_DeathActioned = false;
  676. dayz_canDisconnect = true;
  677. dayz_damageCounter = time;
  678. dayz_lastSave = time;
  679. dayz_isSwimming = true;
  680. dayz_isKneeling = false;
  681. dayz_isCrawling = false;
  682. dayz_PreviousTown = "Wilderness";
  683. dayz_currentDay = 0;
  684. dayz_hasLight = false;
  685. dayz_surfaceNoise = 0;
  686. dayz_surfaceType = "None";
  687. dayz_noPenalty = [];
  688. dayz_heavenCooldown = 0;
  689. deathHandled = false;
  690. dayz_lastHumanity = 0;
  691. dayz_guiHumanity = -90000;
  692. dayz_firstGroup = group player;
  693. dayz_originalPlayer = player;
  694. dayz_sourceBleeding = objNull;
  695. dayz_clientPreload = false;
  696. dayz_authed = false;
  697. dayz_panicCooldown = 0;
  698. dayz_areaAffect = 2.5;
  699. dayz_heartBeat = false;
  700. dayzClickTime = 0;
  701. //Current local
  702. dayz_spawnZombies = 0;
  703. dayz_swarmSpawnZombies = 0;
  704. //Max local
  705. dayz_maxLocalZombies = 30; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z
  706. //Current NearBy
  707. dayz_CurrentNearByZombies = 0;
  708. //Max NearBy
  709. dayz_maxNearByZombies = 60; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z
  710. //Current total
  711. dayz_currentGlobalZombies = 0;
  712. //Max global zeds.
  713. dayz_maxGlobalZeds = 3000;
  714. dayz_spawnDelay = 120;
  715. dayz_spawnWait = -120;
  716. dayz_lootDelay = 3;
  717. dayz_lootWait = -300;
  718. //used to count global zeds around players
  719. dayz_CurrentZombies = 0;
  720. //Used to limit overall zed counts
  721. dayz_tickTimeOffset = 0;
  722. dayz_currentWeaponHolders = 0;
  723. dayz_maxMaxWeaponHolders = 80;
  724. dayz_maxCurrentZeds = 0;
  725. dayz_inVehicle = false;
  726. dayz_Magazines = [];
  727. dayzGearSave = false;
  728. dayz_unsaved = false;
  729. dayz_scaleLight = 0;
  730. dayzDebug = false;
  731. dayzState = -1;
  732. //uiNamespace setVariable ['DAYZ_GUI_display',displayNull];
  733. //if (uiNamespace getVariable ['DZ_displayUI', 0] == 2) then {
  734. // dayzDebug = true;
  735. //};
  736.  
  737. DZE_ActionInProgress = false;
  738.  
  739. // DayZ Epoch Client only variables
  740. if(isNil "DZE_AllowForceSave") then {
  741. DZE_AllowForceSave = false;
  742. };
  743. if(isNil "DZE_AllowCargoCheck") then {
  744. DZE_AllowCargoCheck = true;
  745. };
  746. if(isNil "DZE_ForceNameTags") then {
  747. DZE_ForceNameTags = false;
  748. };
  749. if(isNil "DZE_ForceNameTagsOff") then {
  750. DZE_ForceNameTagsOff = true;
  751. };
  752. if(isNil "DZE_ForceNameTagsInTrader") then {
  753. DZE_ForceNameTagsInTrader = true;
  754. };
  755. if(isNil "DZE_HaloJump") then {
  756. DZE_HaloJump = true;
  757. };
  758.  
  759. if(isNil "DZE_AntiWallLimit") then {
  760. DZE_AntiWallLimit = 3;
  761. };
  762. if(isNil "DZE_requireplot") then {
  763. DZE_requireplot = 1;
  764. };
  765. if(isNil "DZE_R3F_WEIGHT") then {
  766. DZE_R3F_WEIGHT = true;
  767. };
  768.  
  769.  
  770. DZE_AntiWallCounter = 0;
  771.  
  772. DZE_FreshSpawn = false;
  773.  
  774. DZE_myHaloVehicle = objNull;
  775. dayz_myLiftVehicle = objNull;
  776.  
  777. DZE_Friends = [];
  778.  
  779. DZE_CanPickup = true;
  780. DZE_Q = false;
  781. DZE_Z = false;
  782.  
  783. DZE_Q_alt = false;
  784. DZE_Z_alt = false;
  785.  
  786. DZE_Q_ctrl = false;
  787. DZE_Z_ctrl = false;
  788.  
  789. DZE_5 = false;
  790. DZE_4 = false;
  791. DZE_6 = false;
  792.  
  793. DZE_cancelBuilding = false;
  794. DZE_PZATTACK = false;
  795.  
  796. DZE_trees = ["t_picea2s_snow.p3d","b_corylus.p3d","t_quercus3s.p3d","t_larix3s.p3d","t_pyrus2s.p3d","str_briza_kriva.p3d","dd_borovice.p3d","les_singlestrom_b.p3d","les_singlestrom.p3d","smrk_velky.p3d","smrk_siroky.p3d","smrk_maly.p3d","les_buk.p3d","str krovisko vysoke.p3d","str_fikovnik_ker.p3d","str_fikovnik.p3d","str vrba.p3d","hrusen2.p3d","str dub jiny.p3d","str lipa.p3d","str briza.p3d","p_akat02s.p3d","jablon.p3d","p_buk.p3d","str_topol.p3d","str_topol2.p3d","p_osika.p3d","t_picea3f.p3d","t_picea2s.p3d","t_picea1s.p3d","t_fagus2w.p3d","t_fagus2s.p3d","t_fagus2f.p3d","t_betula1f.p3d","t_betula2f.p3d","t_betula2s.p3d","t_betula2w.p3d","t_alnus2s.p3d","t_acer2s.p3d","t_populus3s.p3d","t_quercus2f.p3d","t_sorbus2s.p3d","t_malus1s.p3d","t_salix2s.p3d","t_picea1s_w.p3d","t_picea2s_w.p3d","t_ficusb2s_ep1.p3d","t_populusb2s_ep1.p3d","t_populusf2s_ep1.p3d","t_amygdalusc2s_ep1.p3d","t_pistacial2s_ep1.p3d","t_pinuse2s_ep1.p3d","t_pinuss3s_ep1.p3d","t_prunuss2s_ep1.p3d","t_pinusn2s.p3d","t_pinusn1s.p3d","t_pinuss2f.p3d","t_poplar2f_dead_pmc.p3d","misc_torzotree_pmc.p3d","misc_burnspruce_pmc.p3d","brg_cocunutpalm8.p3d","brg_umbrella_acacia01b.p3d","brg_jungle_tree_canopy_1.p3d","brg_jungle_tree_canopy_2.p3d","brg_cocunutpalm4.p3d","brg_cocunutpalm3.p3d","palm_01.p3d","palm_02.p3d","palm_03.p3d","palm_04.p3d","palm_09.p3d","palm_10.p3d","brg_cocunutpalm2.p3d","brg_jungle_tree_antiaris.p3d","brg_cocunutpalm1.p3d","str habr.p3d"];
  797. DZE_TEMP_treedmg = 1;
  798.  
  799. DZE_Surrender = false;
  800. DZE_Quarantine = false;
  801. DZE_InRadiationZone = false;
  802.  
  803. DZE_SaveTime = 30;
  804. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement