Advertisement
Guest User

what did i do wrong

a guest
Nov 3rd, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.58 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.  
  228. //actions blockers
  229. a_player_cooking = false;
  230. a_player_boil = false;
  231. a_player_jerryfilling = false;
  232. a_player_repairing = false;
  233.  
  234. //Prevent zed from spawning in specific spots according to position - Used in player_spawncheck.sqf and building_spawnzombies.sqf - ^bdc
  235. PreventZedSpawnPositions = [[6551.1,14067.7,0.001],[[25,[3039.73,7880.1,0.002]];
  236. // Devil's Castle 75m, Balota airfield E end of runway (75m)
  237. // Marker positions in X, Y, and Z coordinates; can be derived from Object or Character entries in dBase
  238. PreventZedSpawnDistances = [200,1000];
  239. // Radius (in meters) of zed/loot no-spawn markers relative to position in above array
  240. PreventZedSpawnLootInclusions = [true,false];
  241. // Include no-spawning of loot at given position within defined radius (default true per element)
  242.  
  243. //Player self-action handles
  244. dayz_resetSelfActions = {
  245. s_player_equip_carry = -1;
  246. s_player_dragbody = -1;
  247. s_player_fire = -1;
  248. s_player_cook = -1;
  249. s_player_boil = -1;
  250. s_player_fireout = -1;
  251. s_player_butcher = -1;
  252. s_player_packtent = -1;
  253. s_player_fillwater = -1;
  254. s_player_fillwater2 = -1;
  255. s_player_fillfuel = -1;
  256. s_player_grabflare = -1;
  257. s_player_removeflare = -1;
  258. s_player_painkiller = -1;
  259. s_player_studybody = -1;
  260. s_build_Sandbag1_DZ = -1;
  261. s_build_Hedgehog_DZ = -1;
  262. s_build_Wire_cat1 = -1;
  263. s_player_deleteBuild = -1;
  264. s_player_forceSave = -1;
  265. s_player_flipveh = -1;
  266. s_player_stats = -1;
  267. s_player_sleep = -1;
  268. s_player_fillfuel20 = -1;
  269. s_player_fillfuel5 = -1;
  270. s_player_siphonfuel = -1;
  271. s_player_repair_crtl = -1;
  272. s_player_fishing = -1;
  273. s_player_fishing_veh = -1;
  274. s_player_gather = -1;
  275. };
  276. call dayz_resetSelfActions;
  277.  
  278. //Engineering variables
  279. s_player_lastTarget = objNull;
  280. s_player_repairActions = [];
  281.  
  282. //for carry slot since determining mouse pos doesn't work right
  283. mouseOverCarry = false;
  284.  
  285. //Initialize Medical Variables
  286. force_dropBody = false;
  287. r_interrupt = false;
  288. r_doLoop = false;
  289. r_self = false;
  290. r_self_actions = [];
  291. r_drag_sqf = false;
  292. r_action = false;
  293. r_action_unload = false;
  294. r_player_handler = false;
  295. r_player_handler1 = false;
  296. r_player_dead = false;
  297. r_player_unconscious = false;
  298. r_player_infected = false;
  299. //infection from hits
  300. r_player_Sepsis = [false, 0];
  301. r_player_injured = false;
  302. r_player_inpain = false;
  303. r_player_loaded = false;
  304. r_player_cardiac = false;
  305. r_fracture_legs = false;
  306. r_fracture_arms = false;
  307. r_player_vehicle = player;
  308. r_player_blood = 12000;
  309. //Blood Regen
  310. r_player_bloodregen = 0;
  311. //Blood Gain Per Sec
  312. r_player_bloodgainpersec = 0;
  313. //Blood Loss Per Sec
  314. r_player_bloodlosspersec = 0;
  315. //Blood Per Sec (gain - loss)
  316. r_player_bloodpersec = 0;
  317. //Food Stack
  318. r_player_foodstack = 1;
  319. //player skill
  320. r_player_lowblood = false;
  321. r_player_timeout = 0;
  322. r_player_bloodTotal = r_player_blood;
  323. r_public_blood = r_player_blood;
  324. r_player_bloodDanger = r_player_bloodTotal * 0.2;
  325. r_player_actions = [];
  326. r_handlerCount = 0;
  327. r_action_repair = false;
  328. r_action_targets = [];
  329. r_pitchWhine = false;
  330. r_isBandit = false;
  331.  
  332. //count actions
  333. r_action_count = 0;
  334.  
  335. //ammo routine
  336. r_player_actions2 = [];
  337. r_action2 = false;
  338. r_player_lastVehicle = objNull;
  339. r_player_lastSeat = [];
  340. r_player_removeActions2 = {
  341. if (!isNull r_player_lastVehicle) then {
  342. {
  343. r_player_lastVehicle removeAction _x;
  344. } forEach r_player_actions2;
  345. r_player_actions2 = [];
  346. r_action2 = false;
  347. };
  348. };
  349.  
  350. USEC_woundHit = [ // limbs hit given by arma engine when fnc_usec_damageHandler is called
  351. "",
  352. "body",
  353. "hands",
  354. "legs",
  355. "head_hit"
  356. ];
  357. DAYZ_woundHit = [
  358. [
  359. "body",
  360. "hands",
  361. "legs",
  362. "head_hit"
  363. ],
  364. [ 0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,3]
  365. ];
  366. DAYZ_woundHit_ok = [
  367. [
  368. "body",
  369. "hands",
  370. "legs"
  371. ],
  372. [0,0,0,0,0,1,1,1,2,2]
  373. ];
  374. USEC_MinorWounds = [
  375. "hands",
  376. "legs"
  377. ];
  378. USEC_woundPoint = [ // translation table USEC_woundHit -> SV suffixes
  379. ["Pelvis","aimpoint"],
  380. ["aimpoint"], //,"RightShoulder","LeftShoulder"
  381. ["lelbow","relbow"],
  382. ["RightFoot","LeftFoot"],
  383. ["neck","pilot"]
  384. ];
  385. 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)
  386. "Pelvis",
  387. "aimpoint",
  388. "lelbow","relbow",
  389. "RightFoot","LeftFoot",
  390. "neck","pilot"
  391. ];
  392.  
  393. //Initialize Zombie Variables
  394. dayz_zombieTargetList = [
  395. ["SoldierWB",50],
  396. ["Air",500],
  397. ["LandVehicle",200]
  398. ];
  399. PVDZ_obj_Publish = []; //used for eventhandler to spawn a mirror of players tent
  400. PVCDZ_obj_HideBody = objNull;
  401.  
  402. //DayZ settings
  403. dayz_maxAnimals = 5;
  404. dayz_maxPlants = 3;
  405. dayz_animalDistance = 600;
  406. dayz_plantDistance = 600;
  407.  
  408. 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
  409. dayz_spawnArea = 200; // radius around player where we can spawn loot & Z
  410. dayz_cantseeDist = 150; // distance from which we can spawn a Z in front of any player without ray-tracing and angle checks
  411. dayz_cantseefov = 70; // half player field-of-view. Visible Z won't be spawned in front of any near players
  412. dayz_canDelete = 300; // Z, further than this distance from its "owner", will be deleted
  413.  
  414. //init global arrays for Loot Chances
  415. call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\loot_init.sqf";
  416.  
  417. if(isServer) then {
  418. dayz_players = [];
  419. dead_bodyCleanup = [];
  420. needUpdate_objects = [];
  421. Server_InfectedCamps = [];
  422. //dayz_spawnCrashSite_clutterCutter=0; // helicrash spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
  423. //dayz_spawnInfectedSite_clutterCutter=0; // infected base spawn... 0: loot hidden in grass, 1: loot lifted, 2: no grass
  424. dayz_traps = [];
  425. dayz_traps_active = [];
  426. dayz_traps_trigger = [];
  427. };
  428.  
  429. if(!isDedicated) then {
  430. //Establish Location Streaming
  431. _funcGetLocation =
  432. {
  433. dayz_Locations = [];
  434. for "_i" from 0 to ((count _this) - 1) do
  435. {
  436. private ["_location","_config","_locHdr","_position","_size","_type"];
  437. //Get Location Data from config
  438. _config = (_this select _i);
  439. _position = getArray (_config >> "position");
  440. _locHdr = configName _config;
  441. _size = getNumber (_config >> "size");
  442. dayz_Locations set [count dayz_Locations, [_position,_locHdr,_size]];
  443. };
  444. };
  445. _cfgLocation = configFile >> "CfgTownGeneratorChernarus";
  446. _cfgLocation call _funcGetLocation;
  447.  
  448. dayz_buildingMonitor = []; //Buildings to check
  449. dayz_bodyMonitor = [];
  450. dayz_flyMonitor = []; //used for monitor flies
  451. dayz_zedMonitor = [];
  452. dayz_buildingBubbleMonitor = [];
  453.  
  454. dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
  455.  
  456. //temperature variables
  457. dayz_temperatur = 36; //TeeChange
  458. dayz_temperaturnormal = 36; //TeeChange
  459. dayz_temperaturmax = 42; //TeeChange
  460. dayz_temperaturmin = 27; //TeeChange
  461.  
  462. //player special variables
  463. dayZ_lastPlayerUpdate = 0;
  464. dayz_hunger = 0;
  465. dayz_thirst = 0;
  466. dayz_preloadFinished = true;
  467. dayz_statusArray = [1,1];
  468. dayz_disAudial = 0;
  469. dayz_disVisual = 0;
  470. dayz_firedCooldown = 0;
  471. dayz_damageCounter = time;
  472. dayz_lastSave = time;
  473. dayz_isSwimming = true;
  474. dayz_currentDay = 0;
  475. dayz_hasLight = false;
  476. dayz_surfaceNoise = 0;
  477. dayz_surfaceType = "None";
  478. dayz_noPenalty = [];
  479. dayz_heavenCooldown = 0;
  480. deathHandled = false;
  481. dayz_firstGroup = group player;
  482. dayz_originalPlayer = player;
  483. dayz_playerName = "Unknown";
  484. dayz_sourceBleeding = objNull;
  485. dayz_clientPreload = false;
  486. dayz_authed = false;
  487. dayz_panicCooldown = 0;
  488. dayz_areaAffect = 3.5;
  489. dayz_monitorPeriod = 0.6; // number of seconds between each player_zombieCheck calls
  490. dayz_heartBeat = false;
  491. //Current local
  492. dayz_spawnZombies = 0;
  493. dayz_swarmSpawnZombies = 0;
  494. //Max local
  495. dayz_maxLocalZombies = 30; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z
  496. //Current NearBy
  497. dayz_CurrentNearByZombies = 0;
  498. //Max NearBy
  499. dayz_maxNearByZombies = 60; // max quantity of Z controlled by local gameclient, used by player_spawnCheck. Below this limit we can spawn Z
  500. //Current total
  501. dayz_currentGlobalZombies = 0;
  502. //Max global zeds.
  503. dayz_maxGlobalZeds = 3000;
  504. //Animals
  505. dayz_currentGlobalAnimals = 0;
  506. dayz_maxGlobalAnimals = 100;
  507. //Plnats
  508. dayz_currentGlobalPlants = 0;
  509. dayz_maxGlobalPlants = 100;
  510. //Loot
  511. dayz_tickTimeOffset = 0;
  512. dayz_currentWeaponHolders = 0;
  513. dayz_maxMaxWeaponHolders = 80;
  514. dayz_inVehicle = false;
  515. dayzGearSave = false;
  516. dayz_unsaved = false;
  517. dayz_scaleLight = 0;
  518. dayzDebug = false;
  519. dayzState = -1;
  520. dayz_onBack = "";
  521. dayz_onBackActive = false;
  522. dayz_fishingInprogress = false;
  523. dayz_siphonFuelInProgress = false;
  524. dayz_salvageInProgress = false;
  525. lastSpawned = diag_tickTime;
  526. lastSepsis = 0;
  527. //uiNamespace setVariable ['DAYZ_GUI_display',displayNull];
  528. //if (uiNamespace getVariable ['DZ_displayUI', 0] == 2) then {
  529. // dayzDebug = true;
  530. //};
  531. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement