Actions cleanup

This commit is contained in:
ebaydayz
2016-03-29 14:47:28 -04:00
parent e1a0bfebc1
commit 71b975b05e
38 changed files with 330 additions and 503 deletions

View File

@@ -17,6 +17,7 @@
- dayz_allowedObjects --> DayZ_SafeObjects
- dayz_fullMoonNights --> dayz_ForcefullmoonNights
- dayz_updateObjects --> DayZ_GearedObjects
- DZE_CanPickup --> canPickup
- freeTarget --> OpenTarget
- PVDZE_serverObjectMonitor --> dayz_serverObjectMonitor
- Duplicate public variables have been renamed:

View File

@@ -1,4 +1,5 @@
private ["_ammoType","_vehicle","_ammo","_weapon","_turret","_text","_array","_magazines"];
private ["_array","_vehicle","_weapon","_turret","_ammo","_text","_magazines","_ammoType"];
_array = _this select 3;
_vehicle = _array select 0;
_weapon = _array select 1;
@@ -11,9 +12,10 @@ _magazines = getArray (configFile >> "cfgWeapons" >> _weapon >> "magazines");
{
_ammoType = getText (configFile >> "cfgMagazines" >> _x >> "displayName");
if (_ammoType == "") then {_ammoType = _x;};
if (!(_ammoType in _text)) then {_text set [count _text,_ammoType];};
if !(_ammoType in _text) then {_text set [count _text,_ammoType];};
if (_x in magazines player) exitWith {_ammo = _x;};
} count _magazines;
if (_ammo != "") then {
_vehicle removeMagazineTurret [_ammo,_turret];
_vehicle addMagazineTurret [_ammo,_turret];

View File

@@ -1,4 +1,4 @@
private ["_bottletext","_tin1text","_tin2text","_tintext","_hasbottleitem","_hastinitem","_qty","_dis","_sfx"];
private ["_bottletext","_tin1text","_tin2text","_tintext","_hasbottleitem","_hastinitem","_qty","_dis","_sfx","_bottleInfected","_msg"];
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_22","PLAIN DOWN"];};
DZE_ActionInProgress = true;
@@ -7,29 +7,20 @@ _bottletext = getText (configFile >> "CfgMagazines" >> "ItemWaterBottle" >> "dis
_tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName");
_tin2text = getText (configFile >> "CfgMagazines" >> "ItemSodaEmpty" >> "displayName");
_tintext = format["%1 / %2",_tin1text,_tin2text];
_bottleInfected = false;
_hasbottleitem = (("ItemWaterBottle" in magazines player) || ("ItemWaterBottleInfected" in magazines player) || ("ItemWaterBottleSafe" in magazines player));
_hasbottleitem = (("ItemWaterBottle" in magazines player) || {"ItemWaterBottleInfected" in magazines player} || {"ItemWaterBottleSafe" in magazines player});
_hastinitem = false;
a_player_boil = true;
player removeAction s_player_boil;
//s_player_boil = -1;
if ("ItemWaterBottleInfected" in magazines player) then {
_bottleInfected = true;
};
_bottleInfected = if ("ItemWaterBottleInfected" in magazines player) then {true} else {false};
{
if (_x in magazines player) then {
_hastinitem = true;
};
if (_x in magazines player) exitWith {_hastinitem = true;};
} count boil_tin_cans;
} forEach boil_tin_cans;
if (!_hasbottleitem) exitWith {cutText [DZE_ActionInProgress = false; format [localize "str_player_31",_bottletext,localize "str_player_31_fill"] , "PLAIN DOWN"]; a_player_boil = false;};
if (!_hastinitem) exitWith {DZE_ActionInProgress = false; cutText [format [localize "str_player_31",_tintext,localize "str_player_31_fill"] , "PLAIN DOWN"]; a_player_boil = false;};
if (!_hasbottleitem) exitWith {cutText [format [localize "str_player_31",_bottletext,localize "str_player_31_fill"] , "PLAIN DOWN"]; a_player_boil = false;};
if (!_hastinitem) exitWith {cutText [format [localize "str_player_31",_tintext,localize "str_player_31_fill"] , "PLAIN DOWN"]; a_player_boil = false;};
if (_hasbottleitem and _hastinitem) then {
_qty = 0;
@@ -56,15 +47,14 @@ if (_hasbottleitem and _hastinitem) then {
};
};
//if ([0.1] call fn_chance) then {
//player addMagazine "ItemWaterBottleDmg";
if (dayz_waterBottleBreaking && {[0.1] call fn_chance}) then {
player addMagazine "ItemWaterBottleDmg";
//systemChat (localize ("str_waterbottle_broke"));
//_msg = localize "str_waterbottle_broke";
//_msg call dayz_rollingMessages;
//} else {
_msg = localize "str_waterbottle_broke";
_msg call dayz_rollingMessages;
} else {
player addMagazine "ItemWaterBottleBoiled";
//};
};
};
//cutText [format [localize "str_player_boiledwater",_qty], "PLAIN DOWN"];
_msg = format [localize "str_player_boiledwater",_qty];

View File

@@ -1,8 +1,6 @@
private ["_rawmeat","_cookedmeat","_meat","_meatcooked","_text","_qty","_dis","_sfx"];
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_23","PLAIN DOWN"];};
DZE_ActionInProgress = true;
//diag_log ("Cook Enabled");
player removeAction s_player_cook;
s_player_cook = -1;

View File

@@ -1,11 +1,14 @@
private["_obj"];
private "_obj";
_obj = _this select 3;
player playActionNow "Medic";
uiSleep 6;
if(_obj isKindOf "Land_fire") then {
if (_obj isKindOf "Land_fire") then {
dayz_hasFire = objNull;
deleteVehicle _obj;
};
cutText [localize "str_fireplace_removed", "PLAIN DOWN"];
player removeAction s_player_fireout;
s_player_fireout = -1;

View File

@@ -1,5 +1,4 @@
private ["_item", "_type", "_hasHarvested", "_config", "_knifeArray", "_PlayerNear", "_isListed", "_activeKnife", "_text", "_dis", "_sfx", "_sharpnessRemaining"];
private ["_item","_type","_hasHarvested","_config","_knifeArray","_PlayerNear","_isListed","_activeKnife","_text","_dis","_sfx","_sharpnessRemaining","_qty","_chance","_msg","_string"];
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_29","PLAIN DOWN"];};
DZE_ActionInProgress = true;
@@ -14,7 +13,7 @@ player removeAction s_player_butcher;
s_player_butcher = -1;
_PlayerNear = {isPlayer _x} count ((getPosATL _item) nearEntities ["CAManBase", 10]) > 1;
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_5", "PLAIN DOWN"]};
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_5", "PLAIN DOWN"] DZE_ActionInProgress = false;};
//Count how many active tools the player has
{
@@ -23,21 +22,20 @@ if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_5", "PLAIN DOWN"]
};
} count Dayz_Gutting;
if ((count _knifeArray) < 1) exitwith { cutText [localize "str_cannotgut", "PLAIN DOWN"] };
if ((count _knifeArray) < 1) exitwith { cutText [localize "str_cannotgut", "PLAIN DOWN"]; DZE_ActionInProgress = false; };
if ((count _knifeArray > 0) and !_hasHarvested) then {
private ["_qty"];
private "_qty";
//Select random can from array
_activeKnife = _knifeArray call BIS_fnc_selectRandom;
//Get Animal Type
_isListed = isClass (_config);
_isListed = isClass _config;
_text = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
player playActionNow "Medic";
_dis=10;
_sfx = "gut";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
@@ -48,18 +46,14 @@ if ((count _knifeArray > 0) and !_hasHarvested) then {
_item setVariable ["meatHarvested",true,true];
_qty = 2;
if (_isListed) then {
_qty = getNumber (_config >> "yield");
};
_qty = if (_isListed) then {getNumber (_config >> "yield")} else {2};
if (_activeKnife == "ItemKnifeBlunt") then { _qty = round(_qty / 2); };
if (local _item) then {
[_item,_qty] spawn local_gutObject; //leave as spawn (sleeping in loops will work but can freeze the script)
} else {
PVCDZE_obj_GutBody =[_item,_qty];
publicVariable "PVCDZE_obj_GutBody";
PVCDZ_obj_GutBody =[_item,_qty];
publicVariable "PVCDZ_obj_GutBody";
//achievement system
if (!achievement_Gut) then {
@@ -67,34 +61,35 @@ if ((count _knifeArray > 0) and !_hasHarvested) then {
};
};
//_sharpnessRemaining = getText (configFile >> "cfgWeapons" >> _activeKnife >> "sharpnessRemaining");
/* switch _activeKnife do {
case "ItemKnife" : {
//_chance = getNumber (configFile >> "cfgWeapons" >> _activeKnife >> "chance");
if ([0.2] call fn_chance) then {
if (dayz_knifeDulling) then {
_sharpnessRemaining = getText (configFile >> "cfgWeapons" >> _activeKnife >> "sharpnessRemaining");
switch _activeKnife do {
case "ItemKnife" : {
//_chance = getNumber (configFile >> "cfgWeapons" >> _activeKnife >> "chance");
if ([0.2] call fn_chance) then {
player removeWeapon _activeKnife;
player addWeapon _sharpnessRemaining;
//systemChat (localize "str_info_bluntknife");
_msg = localize "str_info_bluntknife";
_msg call dayz_rollingMessages;
};
};
case "ItemKnifeBlunt" : {
//do nothing
};
default {
player removeWeapon _activeKnife;
player addWeapon _sharpnessRemaining;
//systemChat (localize "str_info_bluntknife");
_msg = localize "str_info_bluntknife";
_msg call dayz_rollingMessages;
};
};
};
case "ItemKnifeBlunt" : {
//do nothing
};
default {
player removeWeapon _activeKnife;
player addWeapon _sharpnessRemaining;
};
}; */
};
uisleep 6;
uiSleep 6;
_string = format[localize "str_success_gutted_animal",_text,_qty];
closedialog 0;
uisleep 0.02;
closeDialog 0;
uiSleep 0.02;
//cutText [_string, "PLAIN DOWN"];
_string call dayz_rollingMessages;
};

View File

@@ -1,58 +1,43 @@
private ["_item", "_type", "_hasHarvested", "_config", "_knifeArray", "_PlayerNear", "_isListed", "_activeKnife", "_text", "_dis", "_sfx", "_sharpnessRemaining"];
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_29","PLAIN DOWN"];};
private ["_item","_type","_hasHarvested","_config","_knifeArray","_playerNear","_isListed","_activeKnife","_text","_sharpnessRemaining","_qty","_chance","_msg","_string"];
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_31","PLAIN DOWN"];};
DZE_ActionInProgress = true;
_item = _this select 3;
_type = typeOf _item;
_hasHarvested = _item getVariable["meatHarvested",false];
_hasHarvested = _item getVariable ["meatHarvested",false];
_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
_knifeArray = [];
player removeAction s_player_butcher;
s_player_butcher = -1;
_PlayerNear = {isPlayer _x} count ((getPosATL _item) nearEntities ["CAManBase", 10]) > 1;
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_5", "PLAIN DOWN"]};
_playerNear = {isPlayer _x} count ((getPosATL _item) nearEntities ["CAManBase", 10]) > 1;
if (_playerNear) exitWith {cutText [localize "str_pickup_limit_5","PLAIN DOWN"]; DZE_ActionInProgress = false;};
//Count how many active tools the player has
{
if (_x IN items player) then {
_knifeArray set [count _knifeArray, _x];
};
if (_x in items player) then {_knifeArray set [count _knifeArray, _x];};
} count Dayz_Gutting;
if ((count _knifeArray) < 1) exitwith { cutText [localize "str_cannotgut", "PLAIN DOWN"] };
if ((count _knifeArray) < 1) exitWith {cutText [localize "str_cannotgut","PLAIN DOWN"]; DZE_ActionInProgress = false; };
if ((count _knifeArray > 0) and !_hasHarvested) then {
private ["_qty"];
if ((count _knifeArray > 0) && !_hasHarvested) then {
private "_qty";
//Select random can from array
_activeKnife = _knifeArray call BIS_fnc_selectRandom;
//Get Animal Type
_isListed = isClass (_config);
//Get Zombie Type
_isListed = isClass _config;
_text = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
player playActionNow "Medic";
_dis=10;
_sfx = "gut";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] call player_alertZombies;
// Added Nutrition-Factor for work
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
[player,"gut",0,false,10] call dayz_zombieSpeak;
[player,10,true,(getPosATL player)] call player_alertZombies;
["Working",0,[20,40,15,0]] call dayz_NutritionSystem; // Added Nutrition-Factor for work
_item setVariable ["meatHarvested",true,true];
_qty = 2;
if (_isListed) then {
_qty = getNumber (_config >> "yield");
};
_qty = if (_isListed) then {getNumber (_config >> "yield")} else {2};
if (_activeKnife == "ItemKnifeBlunt") then { _qty = round(_qty / 2); };
if (local _item) then {
@@ -62,39 +47,38 @@ if ((count _knifeArray > 0) and !_hasHarvested) then {
publicVariable "PVDZE_plr_GutBodyZ";
};
//_sharpnessRemaining = getText (configFile >> "cfgWeapons" >> _activeKnife >> "sharpnessRemaining");
/* switch _activeKnife do {
case "ItemKnife" : {
//_chance = getNumber (configFile >> "cfgWeapons" >> _activeKnife >> "chance");
if ([0.2] call fn_chance) then {
if (dayz_knifeDulling) then {
_sharpnessRemaining = getText (configFile >> "cfgWeapons" >> _activeKnife >> "sharpnessRemaining");
switch _activeKnife do {
case "ItemKnife" : {
//_chance = getNumber (configFile >> "cfgWeapons" >> _activeKnife >> "chance");
if ([0.2] call fn_chance) then {
player removeWeapon _activeKnife;
player addWeapon _sharpnessRemaining;
//systemChat (localize "str_info_bluntknife");
_msg = localize "str_info_bluntknife";
_msg call dayz_rollingMessages;
};
};
case "ItemKnifeBlunt" : {
//do nothing
};
default {
player removeWeapon _activeKnife;
player addWeapon _sharpnessRemaining;
//systemChat (localize "str_info_bluntknife");
_msg = localize "str_info_bluntknife";
_msg call dayz_rollingMessages;
};
};
};
case "ItemKnifeBlunt" : {
//do nothing
};
default {
player removeWeapon _activeKnife;
player addWeapon _sharpnessRemaining;
};
}; */
};
// Reduce humanity for gutting zeds
_humanity = player getVariable["humanity",0];
_humanity = player getVariable ["humanity",0];
_humanity = _humanity - 10;
player setVariable["humanity",_humanity,true];
player setVariable ["humanity",_humanity,true];
uisleep 6;
_string = format["Successfully Gutted Zombie",_text,_qty];
//cutText [_string, "PLAIN DOWN"];
closedialog 0;
uisleep 0.02;
uiSleep 6;
_string = format[localize "str_success_gutted_animal",_text,_qty]; //%1 has been gutted, %2 meat steaks now on the carcass
closeDialog 0;
uiSleep 0.02;
//cutText [_string, "PLAIN DOWN"];
_string call dayz_rollingMessages;
};

View File

@@ -24,7 +24,7 @@ _qty = count _fuelCans;
_fillCounter = _fillCounter + 1;
cutText [format[(localize "str_epoch_player_133"),_displayName], "PLAIN DOWN"];
cutText [format[(localize "str_siphon_preparing"),_displayName], "PLAIN DOWN"];
[1,1] call dayz_HungerThirst;
// force animation
@@ -65,7 +65,7 @@ _qty = count _fuelCans;
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
};
cutText [localize "str_epoch_player_35","PLAIN DOWN"];
cutText [localize "str_siphon_canceled","PLAIN DOWN"];
_abort = true;
};

View File

@@ -1,14 +1,11 @@
private ["_array","_type","_classname","_holder","_playerID","_text","_broken","_claimedBy","_config","_isOk","_PlayerNear","_wpn","_ismelee"];
if (player isKindOf "PZombie_VB") exitWith {};
private ["_array","_type","_classname","_holder","_playerID","_text","_broken","_claimedBy","_config","_isOk","_PlayerNear","_wpn","_ismelee","_hasBag"];
_array = _this select 3;
_type = _array select 0;
_classname = _array select 1;
_holder = _array select 2;
// Check if closest player
_PlayerNear = _holder call dze_isnearest_player;
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};
if (player distance _holder > 3) exitwith { localize "str_pickup_limit_1","PLAIN DOWN" };
@@ -16,7 +13,7 @@ _playerID = getPlayerUID player;
player removeAction s_player_holderPickup;
_text = getText (configFile >> _type >> _classname >> "displayName");
if (!canPickup || !DZE_CanPickup) exitwith {
if (!canPickup) exitwith {
if (pickupInit) then {
cutText [localize "str_pickup_limit_2","PLAIN DOWN"];
} else {
@@ -31,22 +28,14 @@ if (isnil "claimed") then {
};
canPickup = false;
DZE_CanPickup = false;
if(_classname isKindOf "TrapBear") exitwith {DZE_CanPickup = true; deleteVehicle _holder; };
if (_classname isKindOf "TrapBear") exitWith { deleteVehicle _holder; };
player playActionNow "PutDown";
//Adding random chance of arrow is re-usable on pickup
_broken = false;
if(_classname == "WoodenArrow") then {
if ([0.15] call fn_chance) then {
_broken = true;
};
};
if (_broken) exitWith {DZE_CanPickup = true; deleteVehicle _holder; cutText [localize "str_broken_arrow", "PLAIN DOWN"]; };
_broken = if ((_classname == "WoodenArrow") && {[0.15] call fn_chance}) then {true} else {false};
if (_broken) exitWith { deleteVehicle _holder; cutText [localize "str_broken_arrow", "PLAIN DOWN"]; };
uiSleep 0.25; //Why are we waiting? Animation
@@ -54,9 +43,9 @@ _claimedBy = _holder getVariable["claimed","0"];
if (_claimedBy != _playerID) exitWith { cutText [format [localize "str_player_beinglooted",_text] , "PLAIN DOWN"]; };
if(_classname isKindOf "Bag_Base_EP1") exitwith {
if (_classname isKindOf "Bag_Base_EP1") exitWith {
_PlayerNear = {isPlayer _x} count ((getPosATL _holder) nearEntities ["CAManBase", 10]) > 1;
if (_PlayerNear) exitWith {DZE_CanPickup = true; cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};
diag_log("Picked up a bag: " + _classname);
@@ -66,16 +55,13 @@ if(_classname isKindOf "Bag_Base_EP1") exitwith {
player action ["TakeBag", _holder];
} else {
player action ["putbag", player];
uisleep 0.03;
uiSleep 0.03;
player action ["TakeBag", _holder];
};
DZE_CanPickup = true;
//Lets wait to make sure the player has some kind of backpack.
waitUntil { !isNull (unitBackpack player) };
uisleep 0.03;
uiSleep 0.03;
//Lets call inventory save
PVDZ_plr_Save = [player,nil,false];
@@ -85,7 +71,7 @@ if(_classname isKindOf "Bag_Base_EP1") exitwith {
_config = (configFile >> _type >> _classname);
//Remove melee magazines (BIS_fnc_invAdd fix)
{player removeMagazines _x} forEach MeleeMagazines;
{player removeMagazines _x} count MeleeMagazines;
_isOk = [player,_config] call BIS_fnc_invAdd;
@@ -97,14 +83,11 @@ if (_isOk) then {
cutText [localize "str_player_24", "PLAIN DOWN"];
};
};
uisleep 3;
uiSleep 3;
//adding melee mags back if needed
_wpn = primaryWeapon player;
//diag_log format["Classname: %1, WPN: %2", _classname,_wpn];
_ismelee = (getNumber (configFile >> "CfgWeapons" >> _wpn >> "melee") == 1);
if (_ismelee) then {
call dayz_meleeMagazineCheck;
};
DZE_CanPickup = true;
};

View File

@@ -1,17 +1,18 @@
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_39","PLAIN DOWN"];};
DZE_ActionInProgress = true;
private ["_item","_config","_onLadder","_hastoolweapon","_onBack","_text","_create","_config2","_melee2tb","_isOk"];
disableSerialization;
_item = _this;
_config = configFile >> "cfgWeapons" >> _item;
_onBack = dayz_onBack in MeleeWeapons;
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_39","PLAIN DOWN"];};
DZE_ActionInProgress = true;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_21", "PLAIN DOWN"]};
if (_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"]; DZE_ActionInProgress = false;};
_hastoolweapon = _item in weapons player;
_text = getText (_config >> "displayName");
if (!_hastoolweapon and !_onBack) exitWith {DZE_ActionInProgress = false; cutText [format [localize "str_player_30",_text] , "PLAIN DOWN"]};
if (!_hastoolweapon and !_onBack) exitWith {cutText [format [localize "str_player_30",_text] , "PLAIN DOWN"]; DZE_ActionInProgress = false;};
call gear_ui_init;
@@ -21,24 +22,26 @@ _config2 = configFile >> "cfgWeapons" >> _create;
//removing current melee weapon if new melee selected
_melee2tb = "";
if ((_item in ["MeleeHatchet_DZE","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) || _item == DayZ_onBack) then {
if ((_item in ["ItemHatchet","ItemCrowbar","ItemMachete","ItemFishingPole","ItemHatchet_DZE","ItemSledge"]) || _item == DayZ_onBack) then {
if (!carryClick) then {
//free primary slot for new melee (remember item to add after)
switch (primaryWeapon player) do {
case "MeleeHatchet_DZE": { if (!("ItemHatchet_DZE" in weapons player)) then { player removeWeapon "MeleeHatchet_DZE"; _melee2tb = "ItemHatchet_DZE"; }; };
case "MeleeCrowbar": { if (!("ItemCrowbar" in weapons player)) then { player removeWeapon "MeleeCrowbar"; _melee2tb = "ItemCrowbar"; }; };
case "MeleeMachete": { if (!("ItemMachete" in weapons player)) then { player removeWeapon "MeleeMachete"; _melee2tb = "ItemMachete"; }; };
case "MeleeHatchet": {if !("ItemHatchet" in weapons player) then {player removeWeapon "MeleeHatchet"; _melee2tb = "ItemHatchet";};};
case "MeleeCrowbar": {if !("ItemCrowbar" in weapons player) then {player removeWeapon "MeleeCrowbar"; _melee2tb = "ItemCrowbar";};};
case "MeleeMachete": {if !("ItemMachete" in weapons player) then {player removeWeapon "MeleeMachete"; _melee2tb = "ItemMachete";};};
case "MeleeFishingPole": {player removeWeapon "MeleeFishingPole"; _melee2tb = "ItemFishingPole";};
case "MeleeSledge": {player removeWeapon "MeleeSledge"; _melee2tb = "ItemSledge";};
case "MeleeHatchet_DZE": {if !("ItemHatchet_DZE" in weapons player) then {player removeWeapon "MeleeHatchet_DZE"; _melee2tb = "ItemHatchet_DZE";};};
case "MeleeSledge": {if !("ItemSledge" in weapons player) then {player removeWeapon "MeleeSledge"; _melee2tb = "ItemSledge";};};
};
} else {
if (DayZ_onBack != "" || _item == DayZ_onBack) then {
switch DayZ_onBack do {
case "MeleeHatchet_DZE": { if (!("ItemHatchet_DZE" in weapons player)) then { dayz_onBack = ""; _melee2tb = "ItemHatchet_DZE"; }; };
case "MeleeCrowbar": { if (!("ItemCrowbar" in weapons player)) then { dayz_onBack = ""; _melee2tb = "ItemCrowbar"; }; };
case "MeleeMachete": { if (!("ItemMachete" in weapons player)) then { dayz_onBack = ""; _melee2tb = "ItemMachete"; }; };
case "MeleeHatchet": {if !("ItemHatchet" in weapons player) then {dayz_onBack = ""; _melee2tb = "ItemHatchet";};};
case "MeleeCrowbar": {if !("ItemCrowbar" in weapons player) then {dayz_onBack = ""; _melee2tb = "ItemCrowbar";};};
case "MeleeMachete": {if !("ItemMachete" in weapons player) then {dayz_onBack = ""; _melee2tb = "ItemMachete";};};
case "MeleeFishingPole": {dayz_onBack = ""; _melee2tb = "ItemFishingPole";};
case "MeleeSledge": {dayz_onBack = ""; _melee2tb = "ItemSledge";};
case "MeleeHatchet_DZE": {if !("ItemHatchet_DZE" in weapons player) then {dayz_onBack = ""; _melee2tb = "ItemHatchet_DZE";};};
case "MeleeSledge": {if !("ItemSledge" in weapons player) then {dayz_onBack = ""; _melee2tb = "ItemSledge";};};
};
carryClick = false;
((findDisplay 106) displayCtrl 1209) ctrlSetText "";
@@ -47,7 +50,7 @@ if ((_item in ["MeleeHatchet_DZE","MeleeCrowbar","MeleeMachete","MeleeFishingPol
};
//Remove melee magazines (BIS_fnc_invAdd fix) (add new melee ammo to array if needed)
{player removeMagazines _x} forEach ["Hatchet_Swing","Sledge_Swing","Crowbar_Swing","Machete_Swing","Fishing_Swing"];
{player removeMagazines _x} count ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Fishing_Swing","Sledge_Swing"];
_isOk = [player,_config2] call BIS_fnc_invAdd;
if (_isOk) then {
@@ -57,9 +60,9 @@ if (_isOk) then {
//we know there is place to add item but to prevent BE spam using _config2
_config2 = _melee2tb;
_isOk = [player,_config2] call BIS_fnc_invAdd;
};
};
} else {
closeDialog 0;
cutText [localize "str_player_24", "PLAIN DOWN"];
};
DZE_ActionInProgress = false;
DZE_ActionInProgress = false;

View File

@@ -14,13 +14,14 @@ if (dayZ_OnBack != "") exitWith {closeDialog 0; cutText [format [localize "str_p
call gear_ui_init;
if (_item in ["ItemHatchet_DZE","ItemCrowbar","ItemMachete","ItemFishingPole","ItemSledge"]) then {
if (_item in ["ItemHatchet","ItemHatchet_DZE","ItemCrowbar","ItemMachete","ItemFishingPole","ItemSledge"]) then {
//free primary slot for new melee (remember item to add after)
switch (_item) do {
case "ItemHatchet_DZE": {player removeWeapon "ItemHatchet_DZE"; dayz_onBack = "MeleeHatchet_DZE";};
case "ItemHatchet": {player removeWeapon "ItemHatchet"; dayz_onBack = "MeleeHatchet";};
case "ItemCrowbar": {player removeWeapon "ItemCrowbar"; dayz_onBack = "MeleeCrowbar";};
case "ItemMachete": {player removeWeapon "ItemMachete"; dayz_onBack = "MeleeMachete";};
case "ItemFishingPole": {player removeWeapon "ItemFishingPole"; dayz_onBack = "MeleeFishingPole";};
case "ItemHatchet_DZE": {player removeWeapon "ItemHatchet_DZE"; dayz_onBack = "MeleeHatchet_DZE";};
case "ItemSledge": {player removeWeapon "ItemSledge"; dayz_onBack = "MeleeSledge";};
};
disableSerialization;

View File

@@ -1,3 +1,5 @@
// If parameters were passed redirect to vanilla player_build (Epoch items don't pass anything)
if ((!isNil "_this") && {typeName _this == "ARRAY"} && {count _this > 0}) exitWith {_this spawn player_buildVanilla;};
/*
DayZ Base Building
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.

View File

@@ -1,3 +1,6 @@
// If no parameters were passed redirect to vanilla player_craftItem (Epoch items always pass an array)
if ((isNil "_this") or {(typeName _this == "ARRAY") && (count _this < 1)}) exitWith {[] spawn player_craftItemVanilla;};
/*
DayZ Epoch Crafting 0.3
Made for DayZ Epoch && Unleashed by [VB]AWOL please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.

View File

@@ -1,4 +1,4 @@
private["_playerPos","_canFill","_isPond","_isWell","_pondPos","_objectsWell","_onLadder","_hasbottleitem","_config","_item","_text","_objectsPond","_qty","_dis","_sfx","_isInfected","_bodiesNear","_chance"];
private ["_playerPos","_canFill","_isPond","_isWell","_pondPos","_objectsWell","_onLadder","_hasbottleitem","_config","_item","_text","_objectsPond","_qty","_dis","_sfx","_isInfected","_bodiesNear","_chance","_itemorignal","_well"];
call gear_ui_init;
closeDialog 0;
@@ -53,10 +53,10 @@ if (!_canFill) then {
};
if (_canFill) then {
_chance = 0.05;
_chance = 0.1;
if (_itemorignal in boil_tin_cans) then {
_chance = 0.03;
_chance = 0.06;
["FoodDrink",0,[0,0,300,0]] call dayz_NutritionSystem; //[Energy,food,water,temp]
} else {
_chance = 0.03;

View File

@@ -1,8 +1,9 @@
private ["_item","_config","_onLadder","_consume","_bag","_droppedtype"];
private ["_item","_config","_onLadder","_consume","_bag","_droppedType"];
disableSerialization;
_item = _this;
_config = configFile >> "CfgWeapons" >> _item;
_droppedtype = (gettext (_config >> "droppeditem"));
_droppedType = getText (_config >> "droppeditem");
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith { cutText [localize "str_player_21", "PLAIN DOWN"]; r_action_count = 0; };
@@ -17,19 +18,19 @@ if ((dayz_onBack != "") && (dayz_onBack in MeleeWeapons) && carryClick) then {
case "MeleeHatchet": {_item = "ItemHatchet"; dayz_onBack = "";};
case "MeleeCrowbar": {_item = "ItemCrowbar"; dayz_onBack = "";};
case "MeleeMachete": {_item = "ItemMachete"; dayz_onBack = "";};
case "MeleeHatchet_DZE": {_item = "ItemHatchet_DZE"; dayz_onBack = "";};
case "MeleeSledge": {_item = "ItemSledge"; dayz_onBack = "";};
case "MeleeFishingPole": {_item = "ItemFishingPole"; dayz_onBack = "";};
};
carryClick = false;
((findDisplay 106) displayCtrl 1209) ctrlSetText "";
} else {
player removeMagazines _consume;
player removeWeapon _item;
if (_droppedtype == "") then { _item = _this; } else { _item = _droppedtype; };
_item = if (_droppedType == "") then {_this} else {_droppedType};
};
_bag = createVehicle [format["WeaponHolder_%1",_item],getPosATL player,[], 1, "CAN_COLLIDE"];
_bag modelToWorld getPosATL player;
_bag setdir (getDir player);
_bag setDir (getDir player);
player reveal _bag;
r_action_count = 0;

View File

@@ -4,8 +4,8 @@
Made for DayZ Mod please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
fixed by facoptere@gmail.com for dayzmod
*/
private ["_linecastmax","_linecastmin","_num","_position","_ispond","_objectsPond","_isPondNearBy","_isOk","_counter",
"_vehicle","_inVehicle","_rnd","_itemOut","_text","_item","_itemtodrop","_result", "_elevation"];
private ["_linecastmax","_linecastmin","_num","_position","_ispond","_objectsPond","_isPondNearBy","_isOk","_counter","_vehicle","_inVehicle",
"_rnd","_itemOut","_text","_item","_itemtodrop","_result","_elevation","_inBoat","_i","_ret","_bb","_w2m","_dir"];
//if (!isNil "faco_goFishing") exitWith { _this call faco_goFishing };
@@ -21,7 +21,7 @@ dayz_fishingInprogress = true;
_linecastmax = 67;
_isOk = false;
_inBoat = (player != vehicle player) and {((vehicle player) isKindOf "Ship")};
_inBoat = (player != vehicle player) && {(vehicle player) isKindOf "Ship"};
for "_i" from 1 to 10 do {
_num = floor(random (2 * _linecastmax / 3) + _linecastmax / 3);
_position = if (_inBoat) then { (vehicle player) modeltoworld [-_num, 0 ,0] } else { player modeltoworld [0,_num,0] };
@@ -52,11 +52,11 @@ for "_i" from 1 to 10 do {
};
} count (nearestObjects [_x, [], 2]); // find ponds
if (_ret) exitWith {};
} foreach nearestObjects [_position, ["waterHoleProxy"], 45]; // find waterholeproxy close to pond centers
} forEach nearestObjects [_position, ["waterHoleProxy"], 45]; // find waterholeproxy close to pond centers
_ret
};
// diag_log [ _position, _elevation, surfaceIsWater _position, _linecastmax, _ispond, "=>", ((surfaceIsWater _position or _ispond) and ((player == vehicle player) or {((vehicle player) isKindOf "Ship")})) ];
if ((surfaceIsWater _position or _ispond) and ((player == vehicle player) or {((vehicle player) isKindOf "Ship")})) exitWith {
if ((surfaceIsWater _position or _ispond) && ((player == vehicle player) or {(vehicle player) isKindOf "Ship"})) exitWith {
_isOk = true;
};
};
@@ -73,7 +73,6 @@ player playActionNow "GestureSwing";
// Alert zeds
[player,3,true,(getPosATL player)] call player_alertZombies;
r_interrupt = false;
while {_isOk} do {
@@ -87,9 +86,7 @@ while {_isOk} do {
cutText [localize "str_fishing_canceled", "PLAIN DOWN"];
} else {
//make sure the player isnt swimming
// wait for animation
uiSleep 2;
uiSleep 2; // wait for animation
// check if player is in boat
_vehicle = vehicle player;
@@ -104,7 +101,7 @@ while {_isOk} do {
if (rain > 0) then {_rnd = _rnd / 2;};
// 1% chance to catch anything
if((random _rnd) <= 5) then {
if ((random _rnd) <= 5) then {
// Just the one fish for now
_itemOut = [];
_itemOut = switch (true) do {
@@ -115,7 +112,7 @@ while {_isOk} do {
};
_itemOut = _itemOut call BIS_fnc_selectRandom;
_text = getText (configFile >> "CfgMagazines" >> _itemOut >> "displayName");
if(_inVehicle) then {
if (_inVehicle) then {
_item = _vehicle;
_itemtodrop = _itemOut;
_item addMagazineCargoGlobal [_itemtodrop,1];
@@ -140,7 +137,6 @@ while {_isOk} do {
["Working",0,[3,2,8,0]] call dayz_NutritionSystem;
_isOk = false;
} else {
switch (true) do {
case (_counter == 0) : { cutText [format [localize "str_fishing_cast",_num], "PLAIN DOWN"]; };
case (_counter == 4) : { cutText [localize "str_fishing_pull", "PLAIN DOWN"]; player playActionNow "GesturePoint"; };
@@ -149,9 +145,9 @@ while {_isOk} do {
};
_counter = _counter + 1;
if(_counter == 12) then {
if (_counter == 12) then {
_isOk = false;
uisleep 1;
uiSleep 1;
cutText [localize "str_fishing_failed", "PLAIN DOWN"];
};
};

View File

@@ -1,4 +1,4 @@
private ["_item","_config","_text","_booleans","_worldspace","_dir","_location","_dis","_fire"];
private ["_item","_config","_text","_booleans","_worldspace","_dir","_location","_dis","_fire","_tool","_itemPile"];
_tool = _this;
call gear_ui_init;
@@ -6,12 +6,11 @@ closeDialog 0;
_item = "ItemLog";
_itemPile = "PartWoodPile";
_config = configFile >> "CfgMagazines" >> _item;
_text = getText (_config >> "displayName");
// item is missing or tools are missing
if ((!(_item IN magazines player)) && (!(_itemPile in magazines player))) exitWith {
if (!(_item in magazines player) && !(_itemPile in magazines player)) exitWith {
//cutText [localize "str_player_22", "PLAIN DOWN"];
(localize "str_player_22") call dayz_rollingMessages;
};
@@ -45,17 +44,15 @@ if ((count _worldspace) == 2) then {
// Added Nutrition-Factor for work
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
uiSleep 5;
_fire = createVehicle ["Land_Fire_DZ", getMarkerpos "respawn_west", [], 0, "CAN_COLLIDE"];
_fire setDir _dir;
_fire setPos _location; // follow terrain slope
player reveal _fire;
[_fire,true] call dayz_inflame;
_fire spawn player_fireMonitor;
if (dayz_playerAchievements select 14 < 1) then {
// Firestarter

View File

@@ -1,4 +1,4 @@
private["_item","_config","_onLadder","_classname","_text","_consume","_hastrapitem","_location","_object"];
private ["_item","_config","_onLadder","_classname","_text","_consume","_hastrapitem","_location","_object"];
_item = _this;
_config = configFile >> "CfgWeapons" >> _item;
@@ -22,7 +22,7 @@ player removeMagazine _item;
_location = getPosATL player;
player playActionNow "PutDown";
uiSleep 1;
sleep 1;
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
_object setDir (getDir player);

View File

@@ -1,7 +1,6 @@
private ["_playArray","_lastRest","_blood"];
private ["_playArray","_lastRest","_blood","_timesincedrink","_bloodinc","_Moves","_sleepArray","_animState","_started","_finished","_timer","_i","_r","_cureAttempt","_isAsleep","_cureChance","_infectedStatus","_randomamount"];
//_timesincedrink = time - dayz_lastDrink;
//_bloodinc =100; Removed for now(untested) due to it not needed yet
//http://community.bistudio.com/wiki/ArmA2:_Moves
_sleepArray = ["aidlppnemstpsnonwnondnon_sleepc_laydown","aidlppnemstpsnonwnondnon_sleepc_lookaround","aidlppnemstpsnonwnondnon_sleepc_scratch","aidlppnemstpsnonwnondnon_sleepc_sleep","aidlppnemstpsnonwnondnon_sleepc_sleep0"];
@@ -24,15 +23,10 @@ _lastRest = player getVariable ["lastRest", 0];
while {r_doLoop} do {
_isAsleep = (animationState player) in _sleepArray;
if (_isAsleep and !_started) then {
_started = true;
};
if (_isAsleep && !_started) then {_started = true;};
if (_started) then {
if (!r_player_unconscious) then {
if (r_player_infected) then {
//every 30 seconds run Random Chance to cure infection
if (diag_ticktime - _lastRest > 30) then {
@@ -58,7 +52,7 @@ while {r_doLoop} do {
};
//make sure player isnt infected or inpain.
if (!r_player_injured AND !r_player_infected AND !(r_player_Sepsis select 0)) then {
if (!r_player_injured && !r_player_infected && !(r_player_Sepsis select 0)) then {
//Give 53 + random amount of blood every 16 secs if player isn't injured.
if ((diag_tickTime - _timer) >= 16) then {
if (r_player_blood < 12000) then {
@@ -67,7 +61,7 @@ while {r_doLoop} do {
_blood = 53 + _randomamount; //Max Possible 153.
};
//Lets make sure we do go over the max amount
//Make sure we don't go over the max amount
if ((r_player_blood - 12000) < _blood) then {
r_player_bloodregen = r_player_bloodregen + _blood;
} else {
@@ -77,8 +71,7 @@ while {r_doLoop} do {
_timer = diag_tickTime;
_infectedStatus = if (r_player_infected) then { "Yes" } else { "Cured" };
cutText [format [localize "str_sleepStats",_blood,r_player_blood], "PLAIN DOWN"];
};
};
};
if (!_isAsleep) then {
@@ -97,7 +90,7 @@ while {r_doLoop} do {
r_doLoop = false;
if (r_interrupt) then {
systemChat(localize ("str_endSleepStandUp"));
systemChat (localize "str_endSleepStandUp");
r_interrupt = false;
player playmoveNow "";
player playActionNow "stop";
@@ -106,5 +99,4 @@ if (r_interrupt) then {
//Removed due to player sync returning []
//PVDZ_plr_Save = [player,nil,true,dayz_playerAchievements];
//publicVariableServer "PVDZ_plr_Save";
R3F_TIRED_Accumulator = 0;
R3F_TIRED_Accumulator = 0;

View File

@@ -25,7 +25,7 @@ dz_fn_switchWeapon =
if (vehicle player != player) exitWith {};
if Player_IsOnLadder() exitWith {};
private ["_current", "_primary", "_secondary"];
private ["_current","_primary","_secondary","_swapWeapons"];
_current = currentWeapon player;
@@ -101,6 +101,8 @@ dz_fn_switchWeapon =
//In primary
case 1:
{
if (Player_GetStance() == Player_GetStance_PRONE) then
{ player playMoveNow "AmovPpneMstpSrasWrflDnon"; };
player selectWeapon primaryWeapon player;
};
@@ -108,6 +110,8 @@ dz_fn_switchWeapon =
case 2:
{
if (diag_tickTime - dz_switchWeapon_pistolTime < 1) exitWith {};
if (Player_GetStance() == Player_GetStance_PRONE) then
{ player playMoveNow "AmovPpneMstpSrasWrflDnon"; };
true call dz_fn_switchWeapon_swap;
};
};
@@ -179,12 +183,16 @@ dz_fn_switchWeapon =
case 1:
{
player selectWeapon primaryWeapon player;
if (Player_GetStance() == Player_GetStance_PRONE) then
{ player playMoveNow "AmovPpneMstpSrasWrflDnon"; };
};
//On back
case 2:
{
if (diag_tickTime - dz_switchWeapon_pistolTime < 1) exitWith {};
if (Player_GetStance() == Player_GetStance_PRONE) then
{ player playMoveNow "AmovPpneMstpSrasWrflDnon"; };
true call dz_fn_switchWeapon_swap;
};
};
@@ -241,12 +249,12 @@ dz_fn_switchWeapon_swapSecure =
dz_switchWeapon_anim = format
[
"AmovP%1MstpSrasWrflDnon_AmovP%1MstpSrasWpstDnon",
//Switch on the 6th letter of the animation class
switch ((toArray animationState player) select 5) do
//Switch on player stance
switch Player_GetStance() do
{
case 101: { "erc" }; //e for erc for erected
case 107: { "knl" }; //k for knl for kneeling
case 112: { "pne" }; //p for pne for prone
case Player_GetStance_STAND: { "erc" };
case Player_GetStance_KNEEL: { "knl" };
case Player_GetStance_PRONE: { "pne" };
}
];
@@ -259,7 +267,7 @@ dz_fn_switchWeapon_swapSecure =
dz_fn_switchWeapon_animDone =
{
//Wait at most TIMEOUT seconds
if (dz_switchWeapon_time - diag_tickTime > TIMEOUT) exitWith
if (diag_tickTime - dz_switchWeapon_time > TIMEOUT) exitWith
{
player removeEventHandler ["AnimDone", dz_switchWeapon_handler];
Mutex_Unlock(dz_switchWeapon_mutex);

View File

@@ -1,4 +1,4 @@
private["_item","_onLadder","_hasmeditem","_config","_text","_id"];
private ["_item","_onLadder","_hasmeditem","_config","_text","_display"];
_item = _this;
call gear_ui_init;

View File

@@ -1,7 +1,7 @@
private["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_fueling"];
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_24","PLAIN DOWN"]};
DZE_ActionInProgress = true;
private ["_vehicle","_canSize","_configVeh","_capacity","_nameType","_curFuel","_newFuel","_dis","_sfx","_fueling","_array","_cantype",
"_emptycan","_isMan","_isAnimal","_isZombie","_started","_finished","_animState","_isRefuel"];
_vehicle = cursorTarget;
_array = _this select 3;
@@ -18,11 +18,10 @@ _isMan = _vehicle isKindOf "Man";
_isAnimal = _vehicle isKindOf "Animal";
_isZombie = _vehicle isKindOf "zZombie_base";
if (_isMan or _isAnimal or _isZombie) exitWith {DZE_ActionInProgress = false; cutText [localize "str_refuel_notvehicle", "PLAIN DOWN"] };
if (fuel _vehicle == 1) exitwith {DZE_ActionInProgress = false;};
if (_isMan or _isAnimal or _isZombie) exitWith { cutText [localize "str_refuel_notvehicle", "PLAIN DOWN"]; DZE_ActionInProgress = false;};
if (fuel _vehicle == 1) exitWith {DZE_ActionInProgress = false;};
player removeAction s_player_fillfuel + _capacity;
a_player_jerryfilling = true;
player setVariable ["fueling", true];
@@ -57,7 +56,7 @@ if (!_fueling) then {
r_doLoop = false;
_finished = true;
};
uisleep 0.1;
uiSleep 0.1;
};
r_doLoop = false;
@@ -70,8 +69,7 @@ if (!_fueling) then {
};
cutText [format [localize "str_player_05",_nameType,_canSize], "PLAIN DOWN"];
uisleep 1;
uiSleep 1;
call fnc_usec_medic_removeActions;
};
[player] allowGetIn true;

View File

@@ -1,6 +1,6 @@
private["_id","_array","_vehicle","_part","_hitpoint","_type","_hasToolbox","_section","_nameType","_namePart","_damage","_selection","_dis","_sfx","_hitpoints","_allFixed"];
if (DZE_ActionInProgress) exitWith {cutText [localize "str_epoch_player_92","PLAIN DOWN"];};
DZE_ActionInProgress = true;
private ["_array","_vehicle","_part","_hitpoint","_type","_hasToolbox","_section","_nameType","_namePart","_damage","_selection","_dis","_sfx","_hitpoints","_allFixed","__FILE__"];
_id = _this select 2;
_array = _this select 3;
@@ -25,7 +25,7 @@ _namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
if (_section and _hasToolbox) then {
player removeMagazine _part;
player playActionNow "Medic";
uisleep 1;
sleep 1;
_dis=20;
_sfx = "repair";
@@ -35,7 +35,7 @@ if (_section and _hasToolbox) then {
// Added Nutrition-Factor for work
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
uisleep 5;
sleep 5;
_damage = [_vehicle,_hitpoint] call object_getHit;
_vehicle removeAction _id;

View File

@@ -1,7 +1,7 @@
private ["_part","_cancel","_color","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints","_damagePercent","_configVeh"];
_vehicle = _this select 3;
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
dayz_myCursorTarget = _vehicle;
_hitpoints = _vehicle call vehicle_getHitpoints;
@@ -17,7 +17,7 @@ _hitpoints = _vehicle call vehicle_getHitpoints;
_configVeh = configFile >> "cfgVehicles" >> "RepairParts" >> _x;
_part = getText(_configVeh >> "part");
if (isnil ("_part")) then { _part = "PartGeneric"; };
if (isNil "_part") then { _part = "PartGeneric"; };
// get every damaged part no matter how tiny damage is!
_damagePercent = str(round(_damage * 100))+"% Damage";
@@ -29,15 +29,15 @@ _hitpoints = _vehicle call vehicle_getHitpoints;
_cmpt = format[localize "str_actions_medical_09",_cmpt,_damagePercent];
_string = format["<t %1>%2</t>",_color,_cmpt]; //Repair - Part
_handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\repair.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
_handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\repair.sqf",[_vehicle,_part,_x], 0, false, true];
s_player_repairActions set [count s_player_repairActions,_handle];
};
} forEach _hitpoints;
if(count _hitpoints > 0 ) then {
if (count _hitpoints > 0 ) then {
//ArmA OA String
_cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false, "",""];
_cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false];
s_player_repairActions set [count s_player_repairActions,_cancel];
s_player_repair_crtl = 1;
};

View File

@@ -1,6 +1,6 @@
private ["_vehicle","_part","_hitpoint","_type","_selection","_array","_started","_finished","_animState","_isMedic","_isOK","_brokenPart","_findPercent","_damage","_hasToolbox","_nameType","_namePart"];
private ["_array","_vehicle","_part","_hitpoint","_type","_isOK","_brokenPart","_started","_finished","_hasToolbox","_nameType","_namePart","_animState","_isMedic","_damage","_BreakableParts","_selection","_wpn","_classname","_ismelee"];
if (dayz_salvageInProgress) exitWith {cutText [localize "str_salvage_inprogress", "PLAIN DOWN"]; };
if (dayz_salvageInProgress) exitWith { cutText [localize "str_salvage_inprogress", "PLAIN DOWN"]; };
dayz_salvageInProgress = true;
_array = _this select 3;
@@ -8,25 +8,21 @@ _vehicle = _array select 0;
_part = _array select 1;
_hitpoint = _array select 2;
_type = typeOf _vehicle;
_isOK = false;
_brokenPart = false;
_started = false;
_finished = false;
_hasToolbox = "ItemToolbox" in items player;
_nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
{_vehicle removeAction _x} forEach s_player_repairActions;
s_player_repairActions = [];
{_vehicle removeAction _x} count s_player_repairActions;
s_player_repairActions = [];
s_player_repair_crtl = 1;
if (_hasToolbox) then {
player playActionNow "Medic";
[player,"repair",0,false] call dayz_zombieSpeak;
[player,50,true,(getPosATL player)] call player_alertZombies;
@@ -49,11 +45,10 @@ if (_hasToolbox) then {
if (_finished) then {
_damage = [_vehicle,_hitpoint] call object_getHit;
if (_damage < 1) then {
if (_damage < 0.10) then {
_BreakableParts = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitLGlass","HitRGlass","HitEngine","HitFuel","HitHRotor"];
if (_hitpoint in _BreakableParts) then {
_findPercent = (1 - _damage) * 10;
if(ceil (random _findPercent) == 1) then {
if ((random 1) < 0.3) then {
_isOK = true;
_brokenPart = true;
} else {
@@ -78,9 +73,9 @@ if (_hasToolbox) then {
_vehicle call fnc_veh_ResetEH;
_vehicle setvelocity [0,0,1];
if(_brokenPart) then {
cutText [format [localize "str_salvage_destroyed",_namePart,_nameType], "PLAIN DOWN"];
cutText [format [localize "str_salvage_destroyed",_namePart,_nameType], "PLAIN DOWN"];
} else {
cutText [format [localize "str_salvage_removed",_namePart,_nameType], "PLAIN DOWN"];
cutText [format [localize "str_salvage_removed",_namePart,_nameType], "PLAIN DOWN"];
};
} else {
cutText [localize "str_player_24", "PLAIN DOWN"];
@@ -100,7 +95,6 @@ if (_hasToolbox) then {
dayz_myCursorTarget = objNull;
s_player_repair_crtl = -1;
dayz_salvageInProgress = false;
//adding melee mags back if needed
@@ -109,4 +103,4 @@ _wpn = primaryWeapon player;
_ismelee = (getNumber (configFile >> "CfgWeapons" >> _wpn >> "melee") == 1);
if (_ismelee) then {
call dayz_meleeMagazineCheck;
};
};

View File

@@ -1,7 +1,8 @@
private ["_part","_color"];
private ["_part","_color","_vehicle","_PlayerNear","_hitpoints","_cursorTarget","_isATV","_is6WheelType","_HasNoGlassKind",
"_6WheelTypeArray","_NoGlassArray","_NoExtraWheelsArray","_RemovedPartsArray","_damage","_cmpt","_configVeh","_damagePercent","_string","_handle","_cancel"];
_vehicle = _this select 3;
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
{dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = [];
_PlayerNear = {isPlayer _x} count ((getPosATL _vehicle) nearEntities ["CAManBase", 10]) > 1;
if (_PlayerNear) exitWith {dayz_myCursorTarget = objNull; cutText [localize "str_pickup_limit_5", "PLAIN DOWN"];};
@@ -12,7 +13,7 @@ _hitpoints = _vehicle call vehicle_getHitpoints;
_cursorTarget = cursorTarget;
_isATV = typeof _cursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"];
_is6WheelType = typeOf _cursorTarget in ["V3S_Civ","Ural_TK_CIV_EP1"];
_HasNoGlassKind = (_cursorTarget iskindof "Motorcycle") or (_cursorTarget iskindof "Bicycle");
_HasNoGlassKind = (_cursorTarget isKindOf "Motorcycle") or (_cursorTarget isKindOf "Bicycle");
_6WheelTypeArray = ["HitLMWheel","HitRMWheel"];
_NoGlassArray = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitLGlass","HitRGlass"];
@@ -23,11 +24,11 @@ if (_isATV or _HasNoGlassKind) then {
_hitpoints = _hitpoints - _NoGlassArray;
};
if (_cursorTarget iskindof "tractor") then {
if (_cursorTarget isKindOf "tractor") then {
_hitpoints = _hitpoints - ["motor","HitLFWheel","HitRFWheel","HitLBWheel","HitRBWheel","HitLF2Wheel","HitRF2Wheel","HitLMWheel","HitRMWheel"];
};
if ((_cursorTarget iskindof "Bicycle") or (_cursorTarget iskindof "Motocycle")) then {
if ((_cursorTarget isKindOf "Bicycle") or (_cursorTarget isKindOf "Motocycle")) then {
_hitpoints = _hitpoints - ["HitEngine","HitFuel"];
};
@@ -40,7 +41,7 @@ if (_is6WheelType) then {
{
_damage = [_vehicle,_x] call object_getHit;
if (!(_x in _RemovedPartsArray)) then {
if !(_x in _RemovedPartsArray) then {
_cmpt = toArray (_x);
_cmpt set [0,20];
_cmpt set [1,toArray ("-") select 0];
@@ -53,14 +54,14 @@ if (_is6WheelType) then {
//get every damaged part no matter how tiny damage is!
_damagePercent = str(round(_damage * 100))+"% Damage";
if (_damage < 1) then {
if (_damage < 0.10) then {
if ((_damage >= 0) and (_damage <= 0.25)) then {_color = "color='#00ff00'";}; //green
if ((_damage >= 0.26) and (_damage <= 0.50)) then {_color = "color='#ffff00'";}; //yellow
if ((_damage >= 0.51) and (_damage <= 0.75)) then {_color = "color='#ff8800'";}; //orange
if ((_damage >= 0.76) and (_damage <= 1)) then {_color = "color='#ff0000'";}; //red
_string = format[localize "str_actions_repair_01",_cmpt,_damagePercent];
_string = format["<t %1>%2</t>",_color,_string]; //Remove - Part
_handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\salvage.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
_handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\salvage.sqf",[_vehicle,_part,_x], 0, false, true];
s_player_repairActions set [count s_player_repairActions,_handle];
};
};
@@ -68,7 +69,7 @@ if (_is6WheelType) then {
if (count _hitpoints > 0 ) then {
//ArmA OA String
_cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false, "",""];
_cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false];
s_player_repairActions set [count s_player_repairActions,_cancel];
s_player_repair_crtl = 1;
};

View File

@@ -1,4 +1,6 @@
private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort","_canNameEmpty","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCanEmpty","_configVeh","_capacity","_nameText","_availableCansEmpty","_hasHose"];
private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort",
"_canNameEmpty","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCanEmpty","_configVeh","_capacity","_nameText",
"_availableCansEmpty","_hasHose","_PlayerNear","_isMan","_isAnimal","_isZombie"];
player removeAction s_player_siphonfuel;
_hasHose = "equip_hose" in magazines player;
@@ -13,7 +15,7 @@ _vehicle = _this select 3;
_abort = false;
// Static vehicle fuel information
_configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle);
_configVeh = configFile >> "cfgVehicles" >> typeOf _vehicle;
_capacity = getNumber(_configVeh >> "fuelCapacity");
_nameText = getText(_configVeh >> "displayName");
_isMan = _vehicle isKindOf "Man";

View File

@@ -3,6 +3,8 @@
// To change a variable copy it to your mission init.sqf in the Epoch Config Variables section
// Standard DayZ variables are found in dayz_code\init\variables.sqf
dayz_knifeDulling = false; // Enable knife dulling. Knives need to be sharpened after so many uses.
dayz_waterBottleBreaking = false; // Water bottles have a chance to break when boiling and require duct tape to fix
dayz_sellDistance_vehicle = 10; // Max distance players can sell land vehicles from at traders
dayz_sellDistance_boat = 30; // Max distance players can sell boats from at traders
dayz_sellDistance_air = 40; // Max distance players can sell air vehicles from at traders

View File

@@ -91,6 +91,7 @@ if (!isDedicated) then {
} else {
player_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_build.sqf";
};
player_buildVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_buildVanilla.sqf";
fn_buildCamera = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildCamera.sqf";
object_build = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_build.sqf";
object_upgradeFireplace = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\object_upgradeFireplace.sqf";
@@ -134,7 +135,7 @@ if (!isDedicated) then {
//Crafting
fn_updateCraftUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_updateCraftUI.sqf";
player_craftItem_DZV = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem.sqf";
player_craftItemVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemVanilla.sqf";
player_craftItemGUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemGUI.sqf";
player_checkRecipe = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_checkRecipe.sqf";

View File

@@ -34,7 +34,7 @@ DayZ_Female = ["SurvivorW2_DZ","BanditW1_DZ","BanditW2_DZ","SurvivorWcombat_DZ",
//Classnames for specific items
MeleeWeapons = ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeBaseball","MeleeBaseBallBat","MeleeBaseBallBatBarbed","MeleeBaseBallBatNails","MeleeFishingPole","MeleeSledge","MeleeHatchet_DZE"];
MeleeMagazines = ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing"];
MeleeMagazines = ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing","Sledge_Swing"];
Dayz_fishingItems = ["MeleeFishingPole"];
Dayz_plants = ["Dayz_Plant1","Dayz_Plant2","Dayz_Plant3"];
Dayz_attachment_array = ["Attachment_ACG","Attachment_AIM"];
@@ -711,7 +711,6 @@ if (!isDedicated) then {
DZE_myHaloVehicle = objNull;
dayz_myLiftVehicle = objNull;
DZE_Friends = [];
DZE_CanPickup = true;
DZE_Q = false;
DZE_Z = false;
DZE_Q_alt = false;

View File

@@ -1,5 +0,0 @@
// promptRName.sqf
_unit = _this select 0;
call compile format ["server globalChat reviver_%1", _unit];

View File

@@ -1089,6 +1089,7 @@
<Czech>Demontáž již probíhá.</Czech>
<French>Récupération déjà en cours.</French>
<German>Die Demontage läuft bereits.</German>
<Dutch>Reeds bezig met bergen.</Dutch>
</Key>
<Key ID="str_salvage_destroyed">
<!-- %1 part name %2 veh name -->
@@ -1098,6 +1099,7 @@
<Czech>%1 se vám při pokusu o demontáž z %2 podařilo úplně zničit.</Czech>
<French>Vous avez détruit %1 lors tentative de retrait de %2</French>
<German>%1 wurde zerstoert, als du versucht hast, %2 auszuschlachten.</German>
<Dutch>Je hebt %1 gesloopt tijdens het demonteren van de %2</Dutch>
</Key>
<Key ID="str_salvage_removed">
<!-- %1 part name %2 veh name -->
@@ -1107,6 +1109,7 @@
<Czech>Úspěšně jste odmontovali %1 z %2</Czech>
<French>Vous avez retiré %1 de %2</French>
<German>%1 wurde erfolgreich aus %2 ausgebaut.</German>
<Dutch>Je hebt met succes de %1 van de %2 verwijderd.</Dutch>
</Key>
<Key ID="str_salvage_canceled">
<English>Salvage canceled.</English>
@@ -1224,6 +1227,7 @@
<Czech>Přečerpávání již probíhá.</Czech>
<French>Siphonnage en cours.</French>
<German>Der Treibstoff fliesst bereits ab.</German>
<Dutch>Reeds bezig met brandstofverplaatsing.</Dutch>
</Key>
<Key ID="str_siphon_preparing">
<!-- %1 empty jerrycan name -->
@@ -1233,6 +1237,7 @@
<Czech>Začíná přečerpávání. Stůjte klidně, abyste naplnili %1.</Czech>
<French>Prêt pour le siphonnage, ne bougez plus pour remplir le %1</French>
<German>Der Treibstoff kann abgezapft werden. Stillhalten, um %1 zu fuellen.</German>
<Dutch>Bezig met brandstofverplaatsing, sta stil om %1 te vullen.</Dutch>
</Key>
<Key ID="str_siphon_drained">
<!-- %1 vehicle name -->
@@ -1242,6 +1247,7 @@
<Czech>Z %1 bylo přečerpáno %2 litrů paliva.</Czech>
<French>Le %1 a été siphonné de %2 litres de carburant</French>
<German>%1 wurden %2 Liter Treibstoff abgezapft.</German>
<Dutch>Je hebt %2 liter brandstof uit de %1 gehaald.</Dutch>
</Key>
<Key ID="str_siphon_notenough">
<!-- %1 vehicle name -->
@@ -1251,6 +1257,7 @@
<Czech>%1 nemá dostatek paliva k přečerpání.</Czech>
<French>Le %1 n&apos;a pas assez de carburant à siphonner.</French>
<German>Es ist nicht mehr genuegend Treibstoff im %1, um etwas abzuzapfen.</German>
<Dutch>Deze %1 heeft niet voldoende brandstof.</Dutch>
</Key>
<Key ID="str_siphon_canceled">
<English>Canceled siphon</English>
@@ -1259,6 +1266,7 @@
<Czech>Přečerpávání přerušeno.</Czech>
<French>Annuler le siphonnage</French>
<German>Abzapfen abgebrochen</German>
<Dutch>Brandstofverplaatsing stopgezet</Dutch>
</Key>
<Key ID="str_waterbottle_broke">
<English>As you boil the water you notice a leak. Looks like you need to fix that.</English>
@@ -7433,6 +7441,7 @@
<Spanish>Cargaste exitosamente munición de %1</Spanish>
<French>Vous avez chargé %1 munitions.</French>
<Czech>Úspěšně jste nabili munici %1.</Czech>
<Dutch>Je hebt met succes %1 munitie bijgeladen.</Dutch>
</Key>
<Key ID="str_player_ammo_fail">
<English>You need %1 type of ammo to do this.</English>
@@ -7441,9 +7450,8 @@
<Spanish>Necesitas munición del tipo %1 para hacer esto.</Spanish>
<French>Vous avez besoin de %1 type de munition pour ce faire.</French>
<Czech>Pro toto potřebujete tento typ munice: %1.</Czech>
<Dutch>Je hebt minstens %1 munitie nodig om dit te doen.</Dutch>
</Key>
<Key ID="str_player_ammo_2primary">
<English>You can&apos;t carry two primary weapons at the same time!</English>
<Russian>Нельзя одновременно носить наготове два основных типа оружия!</Russian>
@@ -9648,8 +9656,7 @@
<Czech>Kovový plot</Czech>
<German>Metallzaun</German>
</Key>
</Package>
</Package>
<Package name="weapons">
<!-- **** WEAPONS **** -->
@@ -10481,4 +10488,4 @@
<Original>A Rail Integration System kit designed for the SA-58 assault rifle.</Original>
</Key>
</Package>
</Project>
</Project>

View File

@@ -428,15 +428,6 @@
<French>Le dépeçage de l'animal est déjà en cours.</French>
<Czech>Kuchání zvířete již probíhá.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_30">
<English>Canceled gutting.</English>
<German>Ausweiden abgerochen.</German>
<Russian>Разделывание отменено.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Gestopt met opensnijden.</Dutch>
<French>Dépeçage interrompu.</French>
<Czech>Akce zrušena.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_31">
<English>Gutting zombie already in progress.</English>
<German>Ausweiden des Zombies bereits im Gange.</German>
@@ -473,15 +464,6 @@
<French>Le remplissage du jerrycan est déjà en cours.</French>
<Czech>Plnění kanystru již probíhá.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_35">
<English>Canceled siphon.</English>
<German>Umfüllen abgebrochen.</German>
<Russian>Слив отменён.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Brandstofverplaatsing stopgezet</Dutch>
<French>Siphonage annulé.</French>
<Czech>Přečerpávání přerušeno.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_36">
<English>\n\nNo recent Deaths.</English>
<German>\n\nKeine aktuellen Todesfälle.</German>
@@ -860,15 +842,6 @@
<French>\n\nVous ne pouvez pas porter les vêtements du sexe opposé.</French>
<Czech>\n\nNemůžete nosit oblečení opačného pohlaví.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_87">
<English>Canceled refuel.</English>
<German>Befüllen abgebrochen.</German>
<Russian>Заправка отменена.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Bijtanken gestopt.</Dutch>
<French>Remplissage du réservoir annulé.</French>
<Czech>Tankování zrušeno.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_88">
<English>Remove already in progress.</English>
<German>Entfernen bereits im Gange.</German>
@@ -914,33 +887,6 @@
<French>La réparation est déjà en cours.</French>
<Czech>Opravování již probíhá.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_93">
<English>Canceled Repair.</English>
<German>Reperatur abgebrochen.</German>
<Russian>Починка отменена.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Reparatie afgebroken.</Dutch>
<French>Réparation annulée.</French>
<Czech>Zrušena oprava.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_94">
<English>Salvage already in progress.</English>
<German>Bergen bereits im Gange.</German>
<Russian>Уже снимается.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Reeds bezig met bergen.</Dutch>
<French>La récupération est déjà en cours.</French>
<Czech>Demontáž i probíhá.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_95">
<English>Canceled Salvage.</English>
<German>Bergen abgebrochen.</German>
<Russian>Снятие отменено.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Berging afgebroken.</Dutch>
<French>Récupération annulée.</French>
<Czech>Demontáž zrušena.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_96">
<English>already in progress.</English>
<German>bereits im Gange.</German>
@@ -959,15 +905,6 @@
<French>La transaction est déjà en cours.</French>
<Czech>Obchodování již probíhá.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_98">
<English>Siphon already in progress.</English>
<German>Umfüllen bereits im Gange.</German>
<Russian>Уже сливается.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Reeds bezig met brandstofverplaatsing.</Dutch>
<French>Le siphonage est déjà en cours.</French>
<Czech>Přečerpávání již probíhá.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_99">
<English>Stop already in progress.</English>
<German>Stoppen des Generators bereits im Gange.</German>
@@ -1193,42 +1130,6 @@
<French>Combinaison incorrecte, %1 reste verrouillé.</French>
<Czech>Nesprávná kombinace, %1 je stále zamknut.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_127">
<English>You have successfully loaded %1 ammunition.</English>
<German>Sie haben erfolgreich %1 Munition geladen.</German>
<Russian>Вы успешно загрузили %1 боеприпасы.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Je hebt met succes %1 munitie bijgeladen.</Dutch>
<French>Vous avez rechargé les munitions de %1 avec succés.</French>
<Czech>Úspěšně jste naložili %1 munici.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_128">
<English>You need %1 type of ammo to do this.</English>
<German>Sie benötigen folgene Muntion um dies zu tun: %1</German>
<Russian>Вам нужен %1 тип патронов, чтобы сделать это.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Je hebt minstens %1 munitie nodig om dit te doen.</Dutch>
<French>Vous avez besoin de munitions %1 pour faire ça.</French>
<Czech>Potřebujete munici typu %1 pro dokončení.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_129">
<English>Started cooking %1</English>
<German>Beginne das Kochen von %1</German>
<Russian>Начали готовить %1</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Begonnen met het koken van %1</Dutch>
<French>Début de la cuisson de %1</French>
<Czech>Začalo vaření %1</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_130">
<English>Canceled cooking %1</English>
<German>Kochen von %1 abgebrochen</German>
<Russian>Приготовление %1 отменено</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Gestopt met het koken van %1</Dutch>
<French>Cuisson de %1 annulée</French>
<Czech>Zrušeno vaření %1</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_131">
<English>Filling up %1, move to cancel.</English>
<German>Betanken von %1, bewegen Sie sich um den Vorgang abzubrechen.</German>
@@ -1247,15 +1148,6 @@
<French>%1 est rempli(e) à %2 pourcents de sa capacité.</French>
<Czech>%1 je naplněno do %2 procent kapacity.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_133">
<English>Preparing to siphon, stand still to fill %1.</English>
<German>Starte das Umfüllen, bewegen Sie sich nicht um %1 zu befüllen.</German>
<Russian>Подготовка к сливу, стойте на месте, чтобы заполнить %1.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Bezig met brandstofverplaatsing, sta stil om %1 te vullen.</Dutch>
<French>Préparation du siphonage, restez immobile pour remplir %1.</French>
<Czech>Příprava pro přečerpání, stůjte na místě pro naplnění %1.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_134">
<English>You have filled %1 with fuel.</English>
<German>Sie haben %1 mit Kraftstoff befüllt.</German>
@@ -1490,24 +1382,6 @@
<!-- <French></French> -->
<Czech>Upgranuli jste %1.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_160">
<English>Preparing to refuel, stand still to drain %1.</English>
<German>Betanken von %1 wird vorbereitet, bewegen Sie sich um den Vorgang abzubrechen.</German>
<Russian>Подготовка к заправке, стойте на месте, чтобы опустошить 1%.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Bijtanken aan het voorbereiden. Sta stil om de %1 leeg te gieten.</Dutch>
<!-- <French></French> -->
<Czech>Příprava přečerpání, stůjte na místě pro čerpání z %1.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_161">
<English>%1 cannot hold that much fuel.</English>
<German>%1 kann nicht so viel Kraftstoff halten.</German>
<Russian>%1 не может хранить столько топлива.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Geen ruimte meer voor brandstof in deze %1.</Dutch>
<!-- <French></French> -->
<Czech>%1 nemůže mít tolik paliva.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_162">
<English>Starting de-construction of %1.</English>
<German>Starte Dekonstruktion von %1.</German>
@@ -1544,69 +1418,6 @@
<!-- <French></French> -->
<Czech>Rozebírání %1.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_166">
<English>You have successfully attached %1 to the %2</English>
<German>Sie haben erfolgreich %1 zum/zur %2 hinzugefügt.</German>
<Russian>Вы успешно установили %1 на %2</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Je hebt succesvol %1 aan de %2 gemonteerd.</Dutch>
<!-- <French></French> -->
<Czech>Úspěšně jste připevnili %1 ke %2</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_167">
<English>You need %1 to repair this</English>
<German>Sie benötigen %1 um dies zu reparieren.</German>
<Russian>Вам нужно %1, чтобы отремонтировать это</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Om dit te repareren heb je %1 nodig.</Dutch>
<!-- <French></French> -->
<Czech>K opravě tohoto potřebujete %1</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_168">
<English>You have destroyed %1 while attempting to remove from %2</English>
<German>Beim Abmontieren von dem/der %2 wurde %1 zerstört.</German>
<Russian>Вы сломали %1, при попытке снятия с %2</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Je hebt %1 gesloopt tijdens het demonteren van de %2</Dutch>
<!-- <French></French> -->
<Czech>Zničili jste %1 při pokusu o odstranění z %2</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_169">
<English>You have successfully removed %1 from the %2</English>
<German>Sie haben erfolgreich ein(e) %1 von dem/der %2 demontiert.</German>
<Russian>Вы успешно сняли %1 с %2</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Je hebt met succes de %1 van de %2 verwijderd.</Dutch>
<!-- <French></French> -->
<Czech>Úspěšně jste odstranili %1 z %2</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_170">
<English>You need %1 to remove this part.</English>
<German>Sie benötigen eine %1 um dieses Teil zu demontieren.</German>
<Russian>Вам нужно %1, чтобы снять эту запчасть.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Je hebt %1 nodig om dit deel te verwijderen.</Dutch>
<!-- <French></French> -->
<Czech>Potřebujete %1 k odstranění této části.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_171">
<English>%1 has been drained for %2 litres of Fuel</English>
<German>Sie haben %2 Gallonen Kraftstoff von dem/der %1 entfernt.</German>
<!-- <Russian></Russian> -->
<!-- <Spanish></Spanish> -->
<Dutch>Je hebt %2 liter brandstof uit de %1 gehaald.</Dutch>
<!-- <French></French> -->
<Czech>Z %1 bylo odčerpáno %2 litrů paliva</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_172">
<English>%1 does not have enough fuel to siphon.</English>
<German>Diese(r) %1 hat nicht genug Kraftstoff.</German>
<Russian>%1 не имеет достаточно топлива для слития.</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Deze %1 heeft niet voldoende brandstof.</Dutch>
<!-- <French></French> -->
<Czech>%1 nemá dostatek paliva na odčerpání.</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_173">
<English>Dog consumed %1, and is now tamed.</English>
<German>Der Hund hat %1 konsumiert und ist nun gezähmt.</German>
@@ -2984,15 +2795,6 @@
<French>Vérifier la cargaison</French>
<Czech>Kontrola nákladu</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_CANCEL">
<English>Cancel</English>
<German>Abbrechen</German>
<Russian>Отмена</Russian>
<!-- <Spanish></Spanish> -->
<Dutch>Annuleren</Dutch>
<French>Annuler</French>
<Czech>Zrušit</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_UPGRADEV">
<English>Upgrade Vehicle</English>
<German>Fahrzeug upgraden</German>

View File

@@ -21,12 +21,26 @@ Author:
#define SEARCH_SLOPE_MAX 1000
#define SEARCH_BLACKLIST [[[12923,3643],[14275,2601]]]
private ["_typeGroup","_position","_type","_class","_vehicle","_loot","_lootGroup","_lootNum","_lootPos","_lootVeh","_size"];
private
[
"_typeGroup",
"_position",
"_type",
"_class",
"_vehicle",
"_loot",
"_lootGroup",
"_lootNum",
"_lootPos",
"_lootVeh",
"_size"
];
_lootGroup = Loot_GetGroup("CarePackage");
_typeGroup = Loot_GetGroup("CarePackageType");
for "_i" from 1 to (SPAWN_NUM) do {
for "_i" from 1 to (SPAWN_NUM) do
{
_type = Loot_SelectSingle(_typeGroup);
_class = _type select 1;
_lootNum = round Math_RandomRange(_type select 2, _type select 3);
@@ -49,15 +63,21 @@ for "_i" from 1 to (SPAWN_NUM) do {
_lootVeh = Loot_Spawn(_x, _lootPos);
_lootVeh setVariable ["permaLoot", true];
switch (dayz_spawncarepkgs_clutterCutter) do {
case 1: { //Lift loot up by 5cm
switch (dayz_spawncarepkgs_clutterCutter) do
{
case 1: //Lift loot up by 5cm
{
_lootPos set [2, 0.05];
_lootVeh setPosATL _lootpos;
};
case 2: { //Clutter cutter
};
case 2: //Clutter cutter
{
createVehicle ["ClutterCutter_small_2_EP1", _lootPos, [], 0, "CAN_COLLIDE"];
};
case 3: { //Debug sphere
};
case 3: //Debug sphere
{
createVehicle ["Sign_sphere100cm_EP1", _lootPos, [], 0, "CAN_COLLIDE"];
};
};

View File

@@ -34,11 +34,31 @@ Author:
#define LOOT_MIN 5
#define LOOT_MAX 8
private ["_debugZone","_spawnCrashSite","_type","_class","_lootGroup","_position","_vehicle","_lootParams","_dir","_mag","_lootNum","_lootPos","_lootVeh","_lootpos","_time"];
private
[
"_debugZone",
"_spawnCrashSite",
"_type",
"_class",
"_lootGroup",
"_position",
"_vehicle",
// "_size",
// "_loot",
"_lootParams",
"_dir",
"_mag",
"_lootNum",
"_lootPos",
"_lootVeh",
"_lootpos",
"_time"
];
diag_log format ["CRASHSPAWNER: Starting crash site spawner. Frequency: %1±%2 min. Spawn chance: %3", SPAWN_FREQUENCY, SPAWN_VARIANCE, SPAWN_CHANCE];
_spawnCrashSite = {
_spawnCrashSite =
{
_type = Loot_SelectSingle(Loot_GetGroup("CrashSiteType"));
_class = _type select 1;
_lootGroup = Loot_GetGroup(_type select 2);
@@ -71,36 +91,49 @@ _spawnCrashSite = {
_lootVeh = Loot_Spawn(_x, _lootPos);
_lootVeh setVariable ["permaLoot", true];
switch (dayz_spawnCrashSite_clutterCutter) do {
case 1: { //Lift loot up by 5cm
switch (dayz_spawnCrashSite_clutterCutter) do
{
case 1: //Lift loot up by 5cm
{
_lootPos set [2, 0.05];
_lootVeh setPosATL _lootpos;
};
case 2: { //Clutter cutter
case 2: //Clutter cutter
{
createVehicle ["ClutterCutter_small_2_EP1", _lootPos, [], 0, "CAN_COLLIDE"];
};
case 3: { //Debug sphere
case 3: //Debug sphere
{
createVehicle ["Sign_sphere100cm_EP1", _lootPos, [], 0, "CAN_COLLIDE"];
};
};
} forEach Loot_Select(_lootGroup, _lootNum);
}
forEach Loot_Select(_lootGroup, _lootNum);
};
//Spawn initial crash sites
for "_i" from 1 to (INITIAL_NUM) do {
for "_i" from 1 to (INITIAL_NUM) do
{
call _spawnCrashSite;
};
while {true} do {
while {true} do
{
//Pick a time to attempt spawning
//currentTime + frequency + ±1 * variance
_time = time + 60 * ((SPAWN_FREQUENCY) + ((round random 1) * 2 - 1) * random (SPAWN_VARIANCE));
//Wait until the previously decided time
while {time < _time} do {
while {time < _time} do
{
uiSleep (60 * (SPAWN_FREQUENCY) / (TIMER_RESOLUTION));
};
//try to spawn
if ((SPAWN_CHANCE) > random 1) then {call _spawnCrashSite;};
if ((SPAWN_CHANCE) > random 1) then
{
call _spawnCrashSite;
};
};

View File

@@ -35,19 +35,32 @@ Author:
#define SEARCH_PRECISION 30
#define SEARCH_ATTEMPTS 10
private ["_typeGroup","_lootGroup","_objectGroup","_type","_position","_composition","_compositionObjects","_objectPos"];
private
[
"_typeGroup",
"_lootGroup",
"_objectGroup",
"_type",
"_position",
"_composition",
"_compositionObjects",
"_objectPos"
];
_typeGroup = Loot_GetGroup("InfectedCampType");
_lootGroup = Loot_GetGroup("InfectedCamp");
_objectGroup = Loot_GetGroup("InfectedCampObject");
for "_i" from 1 to (CAMP_NUM) do {
for "_i" from 1 to (CAMP_NUM) do
{
//Select type of camp
_type = Loot_SelectSingle(_typeGroup);
_composition = _type select 1;
//Find a position
for "_j" from 1 to (SEARCH_ATTEMPTS) do {
for "_j" from 1 to (SEARCH_ATTEMPTS) do
{
_position = ((selectBestPlaces [SEARCH_CENTER, SEARCH_RADIUS, SEARCH_EXPRESSION, SEARCH_PRECISION, 1]) select 0) select 0;
_position set [2, 0];
@@ -62,7 +75,8 @@ for "_i" from 1 to (CAMP_NUM) do {
//Add loot to containers
{
if (_x isKindOf (CAMP_CONTAINER_BASE)) then {
if (_x isKindOf (CAMP_CONTAINER_BASE)) then
{
Loot_InsertCargo(_x, _lootGroup, round Math_RandomRange(LOOT_MIN, LOOT_MAX));
};
} forEach _compositionObjects;