0.9 + pre 1.7.5

This commit is contained in:
vbawol
2013-02-03 08:26:46 -06:00
parent 8fd13cf31f
commit 6cdcf6c094
20 changed files with 32879 additions and 257 deletions

View File

@@ -94,114 +94,83 @@ class CfgMagazines {
};
};
class FoodmuttonRaw : CA_Magazine {
class FoodEdible;
class FoodmeatRaw : FoodEdible {
scope = public;
count = 1;
type = 256;
displayName = $STR_FOOD_EQIP_CODE_NAME_0;
model = "\dayz_equip\models\food_steak_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_ca.paa";
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_0;
bloodRegen = 100;
};
class FoodmuttonRaw : FoodmeatRaw {
displayName = $STR_FOOD_EQIP_CODE_NAME_1;
//model = "\z\addons\dayz_communityassets\models\boar_raw.p3d";
//picture = "\z\addons\dayz_communityassets\pictures\icon_boar_steak_raw_ca.paa";
model = "\dayz_equip\models\food_steak_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_ca.paa";
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_1;
bloodRegen = 100;
};
class FoodchickenRaw : CA_Magazine {
scope = public;
count = 1;
type = 256;
class FoodchickenRaw : FoodmeatRaw {
displayName = $STR_FOOD_EQIP_CODE_NAME_2;
//model = "\z\addons\dayz_communityassets\models\chicken_raw.p3d";
//picture = "\z\addons\dayz_communityassets\pictures\icon_chicken_raw_ca.paa";
model = "\dayz_equip\models\food_steak_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_ca.paa";
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_2;
bloodRegen = 100;
};
class FoodrabbitRaw : CA_Magazine {
scope = public;
count = 1;
type = 256;
class FoodrabbitRaw : FoodmeatRaw {
displayName = $STR_FOOD_EQIP_CODE_NAME_3;
//model = "\z\addons\dayz_communityassets\models\rabbit_raw.p3d";
//picture = "\z\addons\dayz_communityassets\pictures\i_rabbit_raw_co.paa";
model = "\dayz_equip\models\food_steak_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_ca.paa";
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_3;
bloodRegen = 400;
};
class FoodbaconRaw : CA_Magazine {
scope = public;
count = 1;
type = 256;
class FoodbaconRaw : FoodmeatRaw {
displayName = $STR_FOOD_EQIP_CODE_NAME_4;
//model = "\z\addons\dayz_communityassets\models\bacon_raw.p3d";
//picture = "\z\addons\dayz_communityassets\pictures\i_bacon_raw.paa";
model = "\dayz_equip\models\food_steak_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_ca.paa";
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_4;
bloodRegen = 150;
};
class FoodbeefRaw : FoodmeatRaw {
displayName = $STR_FOOD_EQIP_CODE_NAME_6;
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_6;
bloodRegen = 100;
};
class DayZ_Code_FoodEdible : CA_Magazine {
isFood = 1;
count = 1;
type = 256;
class ItemActions {
class Eat {
text = $STR_EAT_FOOD;
script = "spawn player_eat;";
};
};
};
class FoodmuttonCooked : DayZ_Code_FoodEdible {
class FoodmeatCooked : FoodEdible {
scope = public;
count = 1;
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_0;
model = "\dayz_equip\models\food_steak_cooked_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_cooked_ca.paa";
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_0;
bloodRegen = 800;
};
class FoodmuttonCooked : FoodmeatCooked {
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_1;
//model = "\z\addons\dayz_communityassets\models\boar_cooked.p3d";
//picture = "\z\addons\dayz_communityassets\pictures\icon_boar_steak_cooked_ca.paa";
model = "\dayz_equip\models\food_steak_cooked_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_cooked_ca.paa";
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_1;
bloodRegen = 200;
bloodRegen = 400;
};
class FoodchickenCooked : DayZ_Code_FoodEdible {
scope = public;
count = 1;
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_2; //$STR_EQUIP_NAME_25
//model = "\z\addons\dayz_communityassets\models\chicken_cooked.p3d";
//picture = "\z\addons\dayz_communityassets\pictures\icon_chicken_cooked_ca.paa";
model = "\dayz_equip\models\food_steak_cooked_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_cooked_ca.paa";
class FoodchickenCooked : FoodmeatCooked {
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_2;
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_2;
bloodRegen = 400;
};
class FoodBaconCooked : DayZ_Code_FoodEdible {
scope = public;
count = 1;
class FoodbaconCooked : FoodmeatCooked {
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_4;
//model = "\z\addons\dayz_communityassets\models\bacon_cooked.p3d";
//picture = "\z\addons\dayz_communityassets\pictures\i_bacon_cooked.paa";
model = "\dayz_equip\models\food_steak_cooked_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_cooked_ca.paa";
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_4;
bloodRegen = 800;
bloodRegen = 400;
};
class FoodRabbitCooked : DayZ_Code_FoodEdible {
scope = public;
count = 1;
class FoodrabbitCooked : FoodmeatCooked {
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_3;
//model = "\z\addons\dayz_communityassets\models\rabbit_cooked.p3d";
//picture = "\z\addons\dayz_communityassets\pictures\i_rabbit_cooked_co.paa";
model = "\dayz_equip\models\food_steak_cooked_gear.p3d";
picture = "\dayz_equip\textures\equip_steak_cooked_ca.paa";
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_3;
bloodRegen = 100;
bloodRegen = 1600;
};
class AngelCookies : DayZ_Code_FoodEdible {
class FoodbeefCooked : FoodmeatCooked {
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_6;
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_6;
bloodRegen = 600;
};
class AngelCookies : FoodEdible {
scope = public;
count = 1;
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_5;
@@ -210,4 +179,9 @@ class CfgMagazines {
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_5;
bloodRegen = 100;
};
class ItemWaterbottle;
class ItemWaterbottleBoiled : ItemWaterbottle {
displayName = $STR_ITEMWATERBOTTLEBOILED_CODE_NAME;
descriptionShort = $STR_ITEMWATERBOTTLEBOILED_CODE_DESC;
};
};

32517
dayz_code/CfgTownGenerator.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,32 @@
private["_hasbottleitem","_hastinitem","_bottletext","_tin1text","_tin2text","_tintext","_qty","_id"];
player removeAction s_player_boil;
s_player_boil = -1;
_hasbottleitem = "ItemWaterbottle" in magazines player;
_hastinitem = ("TrashTinCan" in magazines player) or ("ItemSodaEmpty" in magazines player);
_bottletext = getText (configFile >> "CfgMagazines" >> "ItemWaterbottle" >> "displayName");
_tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName");
_tin2text = getText (configFile >> "CfgMagazines" >> "ItemSodaEmpty" >> "displayName");
_tintext = format["%1 / %2",_tin1text,_tin2text];
if (!_hasbottleitem) exitWith {cutText [format[(localize "str_player_31"),_bottletext,"fill"] , "PLAIN DOWN"]};
if (!_hastinitem) exitWith {cutText [format[(localize "str_player_31"),_tintext,"fill"] , "PLAIN DOWN"]};
if (_hasbottleitem and _hastinitem) then {
_qty = {_x == "ItemWaterbottle"} count magazines player;
if ("ItemWaterbottle" in magazines player) then {
player playActionNow "Medic";
[player,"fillwater",0,false] call dayz_zombieSpeak;
_id = [player,10,true,(getPosATL player)] spawn player_alertZombies;
sleep _qty;
for "_x" from 1 to _qty do {
player removeMagazine "ItemWaterbottle";
player addMagazine "ItemWaterbottleBoiled";
};
cutText [format[(localize "str_player_01"),_qty], "PLAIN DOWN"];
} else {
cutText [(localize "str_player_02") , "PLAIN DOWN"];
};
};

View File

@@ -1,105 +1,26 @@
private["_hasFoodMeat","_hasFoodTin","_item","_wait"];
private["_config","_item","_text","_rawmeat","_cookedmeat","_meat","_meatcooked","_qty","_id"];
player removeAction s_player_cook;
s_player_cook = -1;
//_qty = {_x == "FoodSteakRaw"} count magazines player;
_wait = 5 - _qty;
_rawmeat = meatraw;
_cookedmeat = meatcooked;
if ("FoodSteakRaw" in magazines player) then {
_qty = {_x == "FoodSteakRaw"} count magazines player;
{
_meat = _x;
_meatcooked = _cookedmeat select (_rawmeat find _meat);
if (_meat in magazines player) then {
_text = getText (configFile >> "CfgMagazines" >> _meatcooked >> "displayName");
_qty = {_x == _meat} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
//_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
sleep _qty;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodSteakRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodSteakRaw";
player addMagazine "FoodSteakCooked";
sleep 1;
player removeMagazine _meat;
player addMagazine _meatcooked;
if !(_meat in magazines player) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
//FoodmuttonRaw > FoodmuttonCooked
if ("FoodmuttonRaw" in magazines player) then {
_qty = {_x == "FoodmuttonRaw"} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodmuttonRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodmuttonRaw";
player addMagazine "FoodmuttonCooked";
sleep 1;
cutText [format[(localize "str_success_cooked"),_qty,_text], "PLAIN DOWN"];
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
//FoodchickenRaw > FoodchickenCooked
if ("FoodchickenRaw" in magazines player) then {
_qty = {_x == "FoodchickenRaw"} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodchickenRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodchickenRaw";
player addMagazine "FoodchickenCooked";
sleep 1;
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
//FoodrabbitRaw > FoodBaconCooked
if ("FoodrabbitRaw" in magazines player) then {
_qty = {_x == "FoodrabbitRaw"} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodrabbitRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodrabbitRaw";
player addMagazine "FoodRabbitCooked";
sleep 1;
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
//FoodbaconRaw > FoodRabbitCooked
if ("FoodbaconRaw" in magazines player) then {
_qty = {_x == "FoodbaconRaw"} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,70,true,(getPosATL player)] spawn player_alertZombies;
sleep _wait;
for "_x" from 1 to _qty do {
_hasFoodMeat = "FoodbaconRaw" in magazines player;
if (!_hasFoodMeat) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
player removeMagazine "FoodbaconRaw";
player addMagazine "FoodBaconCooked";
sleep 1;
};
cutText [format[(localize "str_success_cooked"),_qty,(localize "STR_EQUIP_NAME_24")], "PLAIN DOWN"];
};
/*
_hasFoodMeat = "FoodSteakRaw" in magazines player;
_qty = {_x == "ItemWaterbottleUnfilled"} count magazines player;
if (_hasFoodMeat) then {
player removeMagazine "FoodSteakRaw";
player playActionNow "Medic";
[player,"eat",0,false] call dayz_zombieSpeak;
sleep 6;
player addMagazine "FoodSteakCooked";
cutText [localize "str_success_cooked_steak", "PLAIN DOWN"];
};
*/
} forEach _rawmeat;

View File

@@ -10,6 +10,7 @@ if (["forest",dayz_surfaceType] call fnc_inString) then {
} else {
cutText [localize "str_player_24", "PLAIN DOWN"];
};
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
} else {
cutText [localize "str_player_23", "PLAIN DOWN"];
};

View File

@@ -1,4 +1,4 @@
private["_hasFood","_item","_text","_key","_config","_sfx"];
private["_onLadder","_item","_hasdrinkitem","_config","_text","_sfx","_id","_display"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
@@ -10,10 +10,7 @@ if (vehicle player != player) exitWith {cutText ["You may not drink while in a v
//if (dayz_lastDrink < 180) exitWith {cutText ["You may not drink, your not thirsty", "PLAIN DOWN"]};
_item = _this;
_hasdrinkitem = _this in magazines player;
_rndInfection = (random 15);
_DrinkInfection = (_rndInfection < 1);
_hasdrinkitem = _item in magazines player;
_config = configFile >> "CfgMagazines" >> _item;
_text = getText (_config >> "displayName");
@@ -26,32 +23,24 @@ player removeMagazine _item;
sleep 1;
[player,_sfx,0,false] call dayz_zombieSpeak;
if (_item == "ItemWaterbottle") then {
if (_item == "ItemWaterbottle" or _item == "ItemWaterbottleBoiled") then {
player addMagazine "ItemWaterbottleUnfilled";
if (_DrinkInfection) then {
if ((random 15 < 1) and (_item == "ItemWaterbottle")) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
};
//_id = [player,5,true,(getPosATL player)] spawn player_alertZombies;
} else {
player addMagazine "ItemSodaEmpty";
_id = [player,10,true,(getPosATL player)] spawn player_alertZombies;
};
};
player setVariable ["messing",[dayz_hunger,dayz_thirst],true];
/*
_update = player getVariable["updatePlayer",[false,false,false,false,false]];
_update set [4,true];
player setVariable["updatePlayer",_update,true];
*/
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
dayz_lastDrink = time;
dayz_thirst = 0;
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1302;
_control ctrlShow true;
(_display displayCtrl 1302) ctrlShow true;
cutText [format[(localize "str_player_consumed"),_text], "PLAIN DOWN"];

View File

@@ -1,25 +1,21 @@
private ["_onLadder","_item","_config","_text","_regen","_display","_control","_bloodVal","_ctrlBlood","_rndInfection","_cookedfood","_hasfooditem","_EatInfection","_id"];
private["_onLadder","_item","_hasfooditem","_rawfood","_cookedfood","_config","_text","_regen","_id","_display"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_cookedfood = _item in ["FoodSteakCooked","FoodmuttonCooked","FoodchickenCooked","FoodRabbitCooked","FoodBaconCooked","FoodBioMeat"];
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
if (vehicle player != player) exitWith {cutText ["You may not eat while in a vehicle", "PLAIN DOWN"]};
//Force players to wait 3 mins to eat again
//if (dayz_lastMeal < 180) exitWith {cutText ["You may not eat, you're already full", "PLAIN DOWN"]};
_item = _this;
_hasfooditem = _this in magazines player;
_hasfooditem = _item in magazines player;
if (_item == "FoodBioMeat") then {
_rndInfection = (random 7);
} else {
_rndInfection = (random 15);
};
_EatInfection = (_rndInfection < 1);
//_rawfood = _item in ["FoodSteakRaw","FoodmeatRaw","FoodbeefRaw","FoodmuttonRaw","FoodchickenRaw","FoodrabbitRaw","FoodbaconRaw"];
//_cookedfood = _item in ["FoodSteakCooked","FoodmeatCooked","FoodbeefCooked","FoodmuttonCooked","FoodchickenCooked","FoodrabbitCooked","FoodbaconCooked"];
_rawfood = _item in meatraw;
_cookedfood = item in meatcooked;
_config = configFile >> "CfgMagazines" >> _item;
_text = getText (_config >> "displayName");
@@ -27,14 +23,6 @@ _regen = getNumber (_config >> "bloodRegen");
if (!_hasfooditem) exitWith {cutText [format[(localize "str_player_31"),_text,"consume"] , "PLAIN DOWN"]};
if (_EatInfection and _cookedfood) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
};
//Rawtime = getVarable _item
//_Cookedtime = _item getVariable ["timemeatCooked", time];
player playActionNow "PutDown";
player removeMagazine _item;
sleep 1;
@@ -45,6 +33,17 @@ if (dayz_lastMeal < 3600) then {
};
};
if ( _rawfood and (random 15 < 1)) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
};
[player,"eat",0,false] call dayz_zombieSpeak;
if (!_rawfood and !_cookedfood) then{
player addMagazine "TrashTinCan";
};
r_player_blood = r_player_blood + _regen;
if (r_player_blood > r_player_bloodTotal) then {
r_player_blood = r_player_bloodTotal;
@@ -54,26 +53,18 @@ player setVariable ["messing",[dayz_hunger,dayz_thirst],true];
player setVariable["USEC_BloodQty",r_player_blood,true];
player setVariable["medForceUpdate",true];
[player,"eat",0,false] call dayz_zombieSpeak;
/*
_update = player getVariable["updatePlayer",[false,false,false,false,false]];
_update set [3,true];
player setVariable["updatePlayer",_update,true];
*/
["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
dayz_lastMeal = time;
dayz_hunger = 0;
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
_id = [player,5,true,(getPosATL player)] spawn player_alertZombies;
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1301;
_control ctrlShow true;
(_display displayCtrl 1301) ctrlShow true;
_bloodVal = r_player_blood / r_player_bloodTotal;
if (_bloodVal >= 0.2) then {
_ctrlBlood ctrlShow true;
if (r_player_blood / r_player_bloodTotal >= 0.2) then {
(_display displayCtrl 1300) ctrlShow true;
};
cutText [format[(localize "str_player_consumed"),_text], "PLAIN DOWN"];

View File

@@ -47,7 +47,6 @@ if (_section and _hasToolbox) then {
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
dayz_myCursorTarget = objNull;
s_player_repair_crtl = -1;
//check if repaired fully
_hitpoints = _vehicle call vehicle_getHitpoints;
@@ -64,3 +63,4 @@ if (_allFixed) then {
_vehicle setDamage 0;
["dayzUpdateVehicle",[_vehicle,"repair"]] call callRpcProcedure;
};
s_player_repair_crtl = -1;

View File

@@ -49,7 +49,7 @@ _hitpoints = _vehicle call vehicle_getHitpoints;
if( _part == "PartGlass" or _part == "PartWheel" ) then {
_color = "color='#ff0000'"; //red
_string = format["<t %2>Remove %1</t>",_cmpt,_color]; //Remove - Part
_string = format["<t %2>Remove%1</t>",_cmpt,_color]; //Remove - Part
_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];
};

View File

@@ -196,9 +196,6 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
r_player_actions set [count r_player_actions,_action];
};
};
if (r_action) then {
r_action_targets = r_action_targets + [_unit];
};

View File

@@ -19,6 +19,9 @@ _hasmuttonRaw = "FoodmuttonRaw" in magazines player;
_haschickenRaw = "FoodchickenRaw" in magazines player;
_hasrabbitRaw = "FoodrabbitRaw" in magazines player;
_hasbaconRaw = "FoodbaconRaw" in magazines player;
//boiled Water
_hasbottleitem = "ItemWaterbottle" in magazines player;
_hastinitem = ("TrashTinCan" in magazines player) or ("ItemSodaEmpty" in magazines player);
//Define all Raw food
_hasRawMeat = _hasSteakRaw or _hasmuttonRaw or _haschickenRaw or _hasrabbitRaw or _hasbaconRaw;
@@ -69,6 +72,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_isMan = cursorTarget isKindOf "Man";
_traderType = typeOf cursorTarget;
_ownerID = cursorTarget getVariable ["characterID","0"];
diag_log ("owner = " + str(_ownerID) + " of " + str(cursorTarget));
_isAnimal = cursorTarget isKindOf "Animal";
_isDog = (cursorTarget isKindOf "DZ_Pastor" || cursorTarget isKindOf "DZ_Fin");
_isZombie = cursorTarget isKindOf "zZombie_base";
@@ -78,6 +82,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_isAlive = alive cursorTarget;
_canmove = canmove cursorTarget;
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
_rawmeat = meatraw;
_hasRawMeat = false;
{
if (_x in magazines player) then {
_hasRawMeat = true;
};
} forEach _rawmeat;
if (_hasFuelE) then {
_isFuel = (cursorTarget isKindOf "Land_Ind_TankSmall") or (cursorTarget isKindOf "Land_fuel_tank_big") or (cursorTarget isKindOf "Land_fuel_tank_stairs") or (cursorTarget isKindOf "Land_fuel_tank_stairs_ep1") or (cursorTarget isKindOf "Land_wagon_tanker") or (cursorTarget isKindOf "Land_fuelstation") or (cursorTarget isKindOf "Land_fuelstation_army");
};
@@ -171,7 +184,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
};
};
//Fireplace Actions check
if(inflamed cursorTarget and (_hasSteakRaw or _hasmuttonRaw or _haschickenRaw or _hasrabbitRaw or _hasbaconRaw) and _canDo) then {
if(inflamed _cursor and _hasRawMeat and _canDo) then {
if (s_player_cook < 0) then {
s_player_cook = player addAction [localize "str_actions_self_05", "\z\addons\dayz_code\actions\cook.sqf",cursorTarget, 3, true, true, "", ""];
};
@@ -179,6 +192,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
player removeAction s_player_cook;
s_player_cook = -1;
};
if(inflamed _cursor and (_hasbottleitem and _hastinitem) and _canDo) then {
if (s_player_boil < 0) then {
s_player_boil = player addAction [localize "str_actions_boilwater", "\z\addons\dayz_code\actions\boil.sqf",_cursor, 3, true, true, "", ""];
};
} else {
player removeAction s_player_boil;
s_player_boil = -1;
};
if(cursorTarget == dayz_hasFire and _canDo) then {
if ((s_player_fireout < 0) and !(inflamed cursorTarget) and (player distance cursorTarget < 3)) then {
s_player_fireout = player addAction [localize "str_actions_self_06", "\z\addons\dayz_code\actions\fire_pack.sqf",cursorTarget, 0, false, true, "",""];
@@ -407,13 +429,13 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
dayz_myCursorTarget = objNull;
{player removeAction _x} forEach s_player_madsci;s_player_madsci = [];
//{player removeAction _x} forEach s_player_madsci;s_player_madsci = [];
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
//{player removeAction _x} forEach s_player_bank;s_player_bank = [];
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_madsci_crtl = -1;
//s_player_madsci_crtl = -1;
s_player_parts_crtl = -1;
s_last_trader = -1;
@@ -436,6 +458,8 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
s_player_butcher = -1;
player removeAction s_player_cook;
s_player_cook = -1;
player removeAction s_player_boil;
s_player_boil = -1;
player removeAction s_player_fireout;
s_player_fireout = -1;
player removeAction s_player_packtent;

View File

@@ -0,0 +1,33 @@
if ("ItemMap_Debug" in items player) then {
_world = toUpper(worldName);
_maptype = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
_config = configFile >> "CfgWorlds" >> worldName >> "Names";
for "_i" from 0 to (count _config -1) do {
_class = _config select _i; //Returns a conif
_name = getText (_class >> "name");
_type = getText (_class >> "type");
_position = getArray (_class >> "position");
_radiusA = getNumber (_class >> "radiusA");
_radiusB = getNumber (_class >> "radiusB");
if (_type in _maptype) then {
diag_log(format["Config Type, Name: %1 / Type: %2 / Position: %3, Passed",_name,_type,_position]);
// _rnd = random 1;
// _chance = 0.6;
// if (_rnd < _chance) then {
_markerstr = createMarkerLocal ["markername_" +str (_name), _position];
_markerstr setMarkerTextLocal _name;
_markerstr setMarkerColorLocal "ColorGreen";
_markerstr setMarkerShapeLocal "ELLIPSE";
_markerstr setMarkerBrushLocal "Grid";
_markerstr setMarkerSizeLocal [_radiusA, _radiusB];
// };
};
};
};

View File

@@ -13,9 +13,7 @@ private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"];
_isDead = !alive player;
if(r_fracture_legs) exitWith {_btnRespawn ctrlEnable true;};
if(_isDead) exitwith {_btnAbort ctrlEnable true;};
sleep 1;
while {!isNull _display} do {
switch true do {
case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : {

View File

@@ -0,0 +1,76 @@
private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"];
_position = _this select 0;
_maxZombies = _this select 1;
_totalzeds = dayz_spawnZombies;
diag_log ("totalzeds" +str"_totalzeds");
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
_doLoiter = true;
_loot = "";
_array = [];
_agent = objNull;
_type = _unitTypes call BIS_fnc_selectRandom;
diag_log ("Wild Loaded");
//Create the Group and populate it
//diag_log ("Spawned: " + _type);
_radius = 40;
_method = "NONE";
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
if (_nearByPlayer) then {
_position = [_position,55,100,10,0,0,0] call BIS_fnc_findSafePos;
};
_agent = createAgent [_type, _position, [], _radius, _method];
if (_doLoiter) then {
//_agent setPosATL _position;
//_agent setVariable ["doLoiter",true,true];
_agent setDir round(random 180);
};
dayz_spawnZombies = dayz_spawnZombies + 1;
if (random 1 > 0.7) then {
_agent setUnitPos "Middle";
};
//diag_log ("CREATED: " + str(_agent));
if (isNull _agent) exitWith {
dayz_spawnZombies = dayz_spawnZombies - 1;
};
_isAlive = alive _agent;
_myDest = getPosATL _agent;
_newDest = getPosATL _agent;
_agent setVariable ["myDest",_myDest];
_agent setVariable ["newDest",_newDest];
//Add some loot
_rnd = random 1;
if (_rnd > 0.3) then {
_lootType = configFile >> "CfgVehicles" >> _type >> "zombieLoot";
if (isText _lootType) then {
_array = []+ getArray (configFile >> "cfgLoot" >> getText(_lootType));
if (count _array > 0) then {
_loot = _array call BIS_fnc_selectRandomWeighted;
if(!isNil "_array") then {
_agent addMagazine _loot;
};
};
};
};
//Start behavior
_id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";
diag_log ("Wild Ended");

View File

@@ -9,7 +9,7 @@ _array = [];
_agent = objNull;
//Exit if a player is nearby
if (!isNoone) exitWith {};
if (!_isNoone) exitWith {};
if (count _unitTypes == 0) then {
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");

View File

@@ -32,8 +32,8 @@ class CfgMods
picture = "z\addons\dayz_code\gui\dayz_logo_ca.paa";
hidePicture = 0;
hideName = 0;
action = "http://www.dayepoch.com";
version = "0.891";
action = "http://www.dayzepoch.com";
version = "0.9";
hiveVersion = 0.96; //0.93
};
};
@@ -72,7 +72,6 @@ class CfgInGameUI
cueColor[] = {0,0,0,0};
};
class MPTable
{
color[] = {0,0,0,0}; //{0.7,0.7,0.7,1};
@@ -83,8 +82,8 @@ class CfgInGameUI
colorEast[] = {0,0,0,0}; //{0.95,0.7,0.7,1};
colorCiv[] = {0,0,0,0}; //{0.8,0.8,0.8,1};
colorRes[] = {0,0,0,0}; //{0.7,0.7,0.95,1};
font = "";
size = ""; //"( 21 / 408 )";
font = "EtelkaNarrowMediumPro";
size = "0"; //"( 21 / 408 )";
class Columns
{
class Order
@@ -139,7 +138,7 @@ class CfgInGameUI
width = 0; //0.1;
doubleLine = 0;
colorBg[] = {0,0,0,0}; //{0.1,0.35,0.1,0.9};
picture = "\ca\ui\data\stats_total_ca.paa"; //"\ca\ui\data\stats_total_ca.paa";
picture = ""; //"\ca\ui\data\stats_total_ca.paa";
};
};
};
@@ -198,11 +197,11 @@ class CfgSurvival {
class Meat {
class Default {
yield = 2;
rawfoodtype = "FoodSteakRaw";
rawfoodtype = "FoodmeatRaw";
};
class Cow: Default {
yield = 8;
rawfoodtype = "FoodSteakRaw";
yield = 6;
rawfoodtype = "FoodbeefRaw";
};
class Cow01: Cow{};
class Cow02: Cow{};
@@ -211,7 +210,7 @@ class CfgSurvival {
class Cow01_EP1: Cow{};
class Goat: Default {
yield = 4;
rawfoodtype = "FoodSteakRaw";
rawfoodtype = "FoodmuttonRaw";
};
class Goat01_EP1: Goat{};
class Goat02_EP1: Goat{};
@@ -226,7 +225,7 @@ class CfgSurvival {
rawfoodtype = "FoodbaconRaw";
};
class Hen: Default {
yield = 4;
yield = 2;
rawfoodtype = "FoodchickenRaw";
};
class Cock: Hen{};
@@ -236,7 +235,7 @@ class CfgSurvival {
};
class DZ_Pastor: DZ_Fin{};
class Rabbit: Default {
yield = 4;
yield = 1;
rawfoodtype = "FoodrabbitRaw";
};

Binary file not shown.

View File

@@ -49,6 +49,9 @@ pz_villager2 = "pz_villager2";
pz_villager3 = "pz_villager3";
pz_priest = "pz_priest";
//Cooking
meatraw = ["FoodBioMeat", "FoodSteakRaw", "FoodmeatRaw","FoodbeefRaw","FoodmuttonRaw","FoodchickenRaw","FoodrabbitRaw","FoodbaconRaw"];
meatcooked = ["FoodSteakCooked","FoodmeatCooked","FoodbeefCooked","FoodmuttonCooked","FoodchickenCooked","FoodrabbitCooked","FoodbaconCooked"];
dayz_combatLog = "";
canRoll = true;
@@ -89,6 +92,7 @@ Dayz_GUI_B = 0.26; // -0.26
dayz_resetSelfActions = {
s_player_fire = -1;
s_player_cook = -1;
s_player_boil = -1;
s_player_fireout = -1;
s_player_butcher = -1;
s_player_packtent = -1;

View File

@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
class DAYZ_Version : CA_Version
{
idc = -1;
text = "DayZ Epoch 0.891 (1.7.5.M2D1)";
text = "DayZ Epoch 0.9 (1.7.5)";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
};
class CA_TitleMainMenu;

View File

@@ -1164,6 +1164,24 @@
<Dutch>Your Knife appears to be too bunt.</Dutch>
<French>Votre couteau semble trop émoussé</French>
</Key>
<Key ID="STR_FOOD_EQIP_CODE_NAME_0">
<Original>Raw Meat</Original>
<English>Raw Meat</English>
<German>Raw Meat</German>
<Russian>Ñûðîå ìÿñî</Russian>
<Spanish>Raw Meat</Spanish>
<Dutch>Raw Meat</Dutch>
<French>Raw Meat</French>
</Key>
<Key ID="STR_FOOD_EQUIP_CODE_DESC_0">
<Original>Raw Meat to be used for sustainment, should be cooked prior to safe eating.</Original>
<English>Raw Meat to be used for sustainment, should be cooked prior to safe eating.</English>
<German>Raw Meat to be used for sustainment, should be cooked prior to safe eating.</German>
<Russian>Ñûðîå ìÿñî. Áóäåò âêóñíåå è áåçîïàñíåå, åñëè åãî ïðèãîòîâèòü.</Russian>
<Spanish>Raw Meat to be used for sustainment, should be cooked prior to safe eating.</Spanish>
<Dutch>Raw Meat to be used for sustainment, should be cooked prior to safe eating.</Dutch>
<French>Raw Meat to be used for sustainment, should be cooked prior to safe eating.</French>
</Key>
<Key ID="STR_FOOD_EQIP_CODE_NAME_1">
<Original>Mutton Raw</Original>
<English>Mutton Raw</English>
@@ -1236,6 +1254,42 @@
<Dutch>Bacon to be used for sustainment, must be cooked prior to eating.</Dutch>
<French>Le bacon cru peut être consommé mais doit être cuit avant de le manger.</French>
</Key>
<Key ID="STR_FOOD_EQIP_CODE_NAME_6">
<Original>Raw Beef</Original>
<English>Raw Beef</English>
<German>Raw Beef</German>
<Russian>Ãîâÿäèíà</Russian>
<Spanish>Raw Beef</Spanish>
<Dutch>Raw Beef</Dutch>
<French>Raw Beef</French>
</Key>
<Key ID="STR_FOOD_EQUIP_CODE_DESC_6">
<Original>Beef to be used for sustainment, should be cooked prior to safe eating.</Original>
<English>Beef to be used for sustainment, should be cooked prior to safe eating.</English>
<German>Beef to be used for sustainment, should be cooked prior to safe eating.</German>
<Russian>Ãîâÿäèíà. Áóäåò âêóñíåå è áåçîïàñíåå, åñëè åå ïðèãîòîâèòü.</Russian>
<Spanish>Beef to be used for sustainment, should be cooked prior to safe eating.</Spanish>
<Dutch>Beef to be used for sustainment, should be cooked prior to safe eating.</Dutch>
<French>Beef to be used for sustainment, should be cooked prior to safe eating.</French>
</Key>
<Key ID="STR_FOODCOOKED_EQIP_CODE_NAME_0">
<Original>Cooked Meat</Original>
<English>Cooked Meat</English>
<German>Cooked Meat</German>
<Russian>Æàðåíîå ìÿñî</Russian>
<Spanish>Cooked Meat</Spanish>
<Dutch>Cooked Meat</Dutch>
<French>Cooked Meat</French>
</Key>
<Key ID="STR_FOODCOOKED_EQUIP_CODE_DESC_0">
<Original>Cooked Meat to be used for sustainment.</Original>
<English>Cooked Meat to be used for sustainment.</English>
<German>Cooked Meat to be used for sustainment.</German>
<Russian>Æàðåíîå ìÿñî, ãîòîâàÿ ê óïîòðåáëåíèþ.</Russian>
<Spanish>Cooked Meat to be used for sustainment.</Spanish>
<Dutch>Cooked Meat to be used for sustainment.</Dutch>
<French>Cooked Meat to be used for sustainment.</French>
</Key>
<Key ID="STR_FOODCOOKED_EQIP_CODE_NAME_1">
<Original>Cooked Mutton</Original>
<English>Cooked Mutton</English>
@@ -1300,13 +1354,13 @@
<French>Bacon</French>
</Key>
<Key ID="STR_FOODCOOKED_EQUIP_CODE_DESC_4">
<Original>Bacon to be used for sustainment, must be cooked prior to eating.</Original>
<English>Bacon to be used for sustainment, must be cooked prior to eating.</English>
<German>Bacon to be used for sustainment, must be cooked prior to eating.</German>
<Russian>Bacon to be used for sustainment, must be cooked prior to eating.</Russian>
<Spanish>Bacon to be used for sustainment, must be cooked prior to eating.</Spanish>
<Dutch>Bacon to be used for sustainment, must be cooked prior to eating.</Dutch>
<French>Bacon to be used for sustainment, must be cooked prior to eating.</French>
<Original>Bacon to be used for sustainment.</Original>
<English>Bacon to be used for sustainment.</English>
<German>Bacon to be used for sustainment.</German>
<Russian>Bacon to be used for sustainment.</Russian>
<Spanish>Bacon to be used for sustainment.</Spanish>
<Dutch>Bacon to be used for sustainment.</Dutch>
<French>Bacon to be used for sustainment.</French>
</Key>
<Key ID="STR_FOODCOOKED_EQIP_CODE_NAME_5">
<Original>Angel Cookies</Original>
@@ -1326,5 +1380,17 @@
<Dutch>Angel Cookies to boost your moral up!</Dutch>
<French>Angel Cookies to boost your moral up!</French>
</Key>
<Key ID="STR_ITEMWATERBOTTLEBOILED_CODE_NAME">
<Original>Water Bottle (Boiled)</Original>
<English>Water Bottle (Boiled)</English>
<German>Water Bottle (Boiled)</German>
<Russian>Ôëÿæêà êèïÿ÷åíîé âîäû</Russian>
</Key>
<Key ID="STR_ITEMWATERBOTTLEBOILED_CODE_DESC">
<Original>A bottle of boiled water that has been filled and can be consumed.</Original>
<English>A bottle of boiledwater that has been filled and can be consumed.</English>
<German>A bottle of boiledwater that has been filled and can be consumed.</German>
<Russian>Ôëÿæêà êèïÿ÷åíîé âîäû. Ïðèãîäíà äëÿ ïèòüÿ.</Russian>
</Key>
</Package>
</Project>