mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
0.69 + 1.7.5.M1D15
This commit is contained in:
197
dayz_code/CfgMagazines.hpp
Normal file
197
dayz_code/CfgMagazines.hpp
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
class CfgMagazines {
|
||||||
|
class CA_Magazine; // External class reference
|
||||||
|
|
||||||
|
class ItemTent : CA_Magazine {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
type = (256 * 3);
|
||||||
|
displayName = $STR_EQUIP_NAME_20;
|
||||||
|
model = "\dayz_equip\models\tentbag_gear.p3d";
|
||||||
|
picture = "\dayz_equip\textures\equip_tentbag_ca.paa";
|
||||||
|
descriptionShort = $STR_EQUIP_DESC_20;
|
||||||
|
|
||||||
|
class ItemActions {
|
||||||
|
class Pitch {
|
||||||
|
text = $STR_PITCH_TENT;
|
||||||
|
script = "spawn player_tentPitch;";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class ItemSandbag : CA_Magazine {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
type = 256;
|
||||||
|
displayName = $STR_EQUIP_NAME_21;
|
||||||
|
model = "\dayz_equip\models\sandbags.p3d";
|
||||||
|
picture = "\dayz_equip\textures\equip_sandbag_ca.paa";
|
||||||
|
descriptionShort = $STR_EQUIP_DESC_21;
|
||||||
|
|
||||||
|
class ItemActions {
|
||||||
|
class Build {
|
||||||
|
text = "Build me";
|
||||||
|
script = "spawn player_build;";
|
||||||
|
require = "ItemEtool";
|
||||||
|
create = "Sandbag1_DZ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class ItemTankTrap : CA_Magazine {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
type = 256;
|
||||||
|
displayName = $STR_EQUIP_NAME_22;
|
||||||
|
model = "\dayz_equip\models\tank_trap_kit.p3d";
|
||||||
|
picture = "\dayz_equip\textures\equip_tanktrap_kit_CA.paa";
|
||||||
|
descriptionShort = $STR_EQUIP_DESC_22;
|
||||||
|
|
||||||
|
class ItemActions {
|
||||||
|
class Build {
|
||||||
|
text = $STR_ACTIONS_BUILD;
|
||||||
|
script = "spawn player_build;";
|
||||||
|
require = "ItemToolbox";
|
||||||
|
create = "Hedgehog_DZ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class TrapBear : CA_Magazine {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
type = 256;
|
||||||
|
displayName = "Bear Trap";
|
||||||
|
model = "\dayz_equip\models\bear_trap_gear.p3d";
|
||||||
|
picture = "\dayz_equip\textures\equip_bear_trap_ca.paa";
|
||||||
|
descriptionShort = "Place to add a bear trap";
|
||||||
|
|
||||||
|
class ItemActions {
|
||||||
|
class Build {
|
||||||
|
text = "Place Trap";
|
||||||
|
script = "spawn player_setTrap;";
|
||||||
|
require = "ItemToolbox";
|
||||||
|
create = "BearTrap_DZ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class ItemWire : CA_Magazine {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
type = 256;
|
||||||
|
displayName = $STR_EQUIP_NAME_23;
|
||||||
|
model = "\dayz_equip\models\Fence_wire_kit.p3d";
|
||||||
|
picture = "\dayz_equip\textures\equip_fencewire_kit_CA.paa";
|
||||||
|
descriptionShort = $STR_EQUIP_DESC_23;
|
||||||
|
|
||||||
|
class ItemActions {
|
||||||
|
class Build {
|
||||||
|
text = $STR_ACTIONS_BUILD;
|
||||||
|
script = "spawn player_build;";
|
||||||
|
require = "ItemToolbox";
|
||||||
|
create = "Wire_cat1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class FoodmuttonRaw : CA_Magazine {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
type = 256;
|
||||||
|
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";
|
||||||
|
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_1;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FoodchickenRaw : CA_Magazine {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
type = 256;
|
||||||
|
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";
|
||||||
|
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_2;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FoodrabbitRaw : CA_Magazine {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
type = 256;
|
||||||
|
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";
|
||||||
|
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_3;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FoodbaconRaw : CA_Magazine {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
type = 256;
|
||||||
|
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";
|
||||||
|
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_4;
|
||||||
|
};
|
||||||
|
|
||||||
|
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 {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_1;
|
||||||
|
model = "\z\addons\dayz_communityassets\models\boar_geo.p3d";
|
||||||
|
picture = "\z\addons\dayz_communityassets\pictures\icon_boar_steak_cooked_ca.paa";
|
||||||
|
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_1;
|
||||||
|
bloodRegen = 200;
|
||||||
|
};
|
||||||
|
|
||||||
|
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";
|
||||||
|
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_2;
|
||||||
|
bloodRegen = 400;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FoodBaconCooked : DayZ_Code_FoodEdible {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
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";
|
||||||
|
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_4;
|
||||||
|
bloodRegen = 800;
|
||||||
|
};
|
||||||
|
class FoodRabbitCooked : DayZ_Code_FoodEdible {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
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";
|
||||||
|
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_3;
|
||||||
|
bloodRegen = 100;
|
||||||
|
};
|
||||||
|
class AngelCookies : DayZ_Code_FoodEdible {
|
||||||
|
scope = public;
|
||||||
|
count = 1;
|
||||||
|
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_5;
|
||||||
|
model = "\z\addons\dayz_communityassets\models\buiscits_box.p3d";
|
||||||
|
picture = "\z\addons\dayz_communityassets\pictures\i_buiscit_cai_buiscit_ca.paa";
|
||||||
|
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_5;
|
||||||
|
bloodRegen = 100;
|
||||||
|
};
|
||||||
|
};
|
||||||
43
dayz_code/CfgMarkers.hpp
Normal file
43
dayz_code/CfgMarkers.hpp
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
class CfgMarkers
|
||||||
|
{
|
||||||
|
class Cricle01 {
|
||||||
|
name = "Marker description";
|
||||||
|
icon = "\z\addons\dayz_communityassets\cricle_01_raw.paa";
|
||||||
|
color[] = {1, 0, 0, 1};
|
||||||
|
size = 32;
|
||||||
|
shadow = true;
|
||||||
|
scope = private;
|
||||||
|
};
|
||||||
|
class Cricle02 {
|
||||||
|
name = "Marker description";
|
||||||
|
icon = "\z\addons\dayz_communityassets\cricle_02_raw.paa";
|
||||||
|
color[] = {1, 0, 0, 1};
|
||||||
|
size = 32;
|
||||||
|
shadow = true;
|
||||||
|
scope = private;
|
||||||
|
};
|
||||||
|
class Cross01 {
|
||||||
|
name = "Marker description";
|
||||||
|
icon = "\z\addons\dayz_communityassets\cross_01_raw.paa";
|
||||||
|
color[] = {1, 0, 0, 1};
|
||||||
|
size = 32;
|
||||||
|
shadow = true;
|
||||||
|
scope = private;
|
||||||
|
};
|
||||||
|
class Cross02 {
|
||||||
|
name = "Marker description";
|
||||||
|
icon = "\z\addons\dayz_communityassets\cross_02_raw.paa";
|
||||||
|
color[] = {1, 0, 0, 1};
|
||||||
|
size = 32;
|
||||||
|
shadow = true;
|
||||||
|
scope = private;
|
||||||
|
};
|
||||||
|
class Questionmark {
|
||||||
|
name = "Marker description";
|
||||||
|
icon = "\z\addons\dayz_communityassets\questionmark_raw.paa";
|
||||||
|
color[] = {1, 0, 0, 1};
|
||||||
|
size = 32;
|
||||||
|
shadow = true;
|
||||||
|
scope = private;
|
||||||
|
};
|
||||||
|
};
|
||||||
72
dayz_code/CfgWeapons.hpp
Normal file
72
dayz_code/CfgWeapons.hpp
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
class CfgWeapons {
|
||||||
|
class ItemCore;
|
||||||
|
class ItemMap1: ItemCore {
|
||||||
|
descriptionshort = "Map";
|
||||||
|
displayname = "Map";
|
||||||
|
picture = "\z\addons\dayz_communityassets\icons\gear_picture_map_01_ca.paa";
|
||||||
|
scope = 2;
|
||||||
|
simulation = "ItemMap";
|
||||||
|
};
|
||||||
|
class ItemMap2: ItemCore {
|
||||||
|
descriptionshort = "Map";
|
||||||
|
displayname = "Map";
|
||||||
|
picture = "\z\addons\dayz_communityassets\icons\gear_picture_map_02_ca.paa";
|
||||||
|
scope = 2;
|
||||||
|
simulation = "ItemMap";
|
||||||
|
};
|
||||||
|
class ItemMap3: ItemCore {
|
||||||
|
descriptionshort = "Map";
|
||||||
|
displayname = "Map";
|
||||||
|
picture = "\z\addons\dayz_communityassets\icons\gear_picture_map_03_ca.paa";
|
||||||
|
scope = 2;
|
||||||
|
simulation = "ItemMap";
|
||||||
|
};
|
||||||
|
class ItemMap_Debug: ItemCore {
|
||||||
|
descriptionshort = "Debug Map - Admin use only";
|
||||||
|
displayname = "Map";
|
||||||
|
picture = "\ca\ui\data\gear_picture_map_ca.paa";
|
||||||
|
scope = 2;
|
||||||
|
simulation = "ItemMap";
|
||||||
|
class Library {
|
||||||
|
libtextdesc = "Debug Map - Admin use only";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class ItemMatchboxWet : ItemCore {
|
||||||
|
scope = public;
|
||||||
|
displayName = $STR_EQUIP_CODE_NAME_3;
|
||||||
|
model = "\dayz_equip\models\matchbox_gear.p3d";
|
||||||
|
picture = "\z\addons\dayz_communityassets\pictures\equip_matchbox_wet_CA.paa";
|
||||||
|
descriptionShort = $STR_EQUIP_CODE_DESC_3;
|
||||||
|
};
|
||||||
|
class ItemMatchboxEmpty : ItemCore {
|
||||||
|
scope = public;
|
||||||
|
displayName = "Empty Match Box";
|
||||||
|
model = "\dayz_equip\models\matchbox_gear.p3d";
|
||||||
|
picture = "\z\addons\dayz_communityassets\pictures\equip_matchbox_wet_CA.paa";
|
||||||
|
descriptionShort = $STR_EQUIP_CODE_DESC_3;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ItemBrokeHatchet : ItemCore {
|
||||||
|
scope = public;
|
||||||
|
displayName = $STR_EQUIP_CODE_NAME_41;
|
||||||
|
model = "\dayz_equip\models\hatchet.p3d";
|
||||||
|
picture = "\dayz_equip\textures\equip_hatchet_CA.paa";
|
||||||
|
descriptionShort = $STR_EQUIP_CODE_DESC_41;
|
||||||
|
class ItemActions {
|
||||||
|
class Toolbelt {
|
||||||
|
text = "Remove from Toolbelt";
|
||||||
|
script = "spawn player_addToolbelt;";
|
||||||
|
use[] = {"ItemBrokeHatchet"};
|
||||||
|
output[] = {"MeleeHatchet"};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class ItemKnifeBlunt : ItemCore {
|
||||||
|
scope = public;
|
||||||
|
displayName = $STR_EQUIP_CODE_NAME_4;
|
||||||
|
model = "\dayz_equip\models\knife_gear.p3d";
|
||||||
|
picture = "\dayz_equip\textures\equip_knife_ca.paa";
|
||||||
|
descriptionShort = $STR_EQUIP_CODE_DESC_4;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
@@ -33,11 +33,7 @@ player reveal _object;
|
|||||||
|
|
||||||
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
||||||
|
|
||||||
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
|
["dayzPublishObj",[dayz_characterID,_object,[_dir,_location],_classname]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzPublishObj";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzPublishObj call server_publishObj;
|
|
||||||
};
|
|
||||||
|
|
||||||
sleep 2;
|
sleep 2;
|
||||||
player allowDamage true;
|
player allowDamage true;
|
||||||
@@ -10,11 +10,7 @@ _category = (_this select 3) select 1;
|
|||||||
|
|
||||||
diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
|
diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
|
||||||
|
|
||||||
dayzTraderMenu = [_activatingPlayer,_trader_id,_category,_action];
|
["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzTraderMenu";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzTraderMenu call server_traders;
|
|
||||||
};
|
|
||||||
|
|
||||||
waitUntil {!isNil "dayzTraderMenuResult"};
|
waitUntil {!isNil "dayzTraderMenuResult"};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
private["_object"];
|
private["_object"];
|
||||||
|
|
||||||
dayzUpdateVehicle = [_this select 3,"all"];
|
["dayzUpdateVehicle",[_this select 3,"all"]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzUpdateVehicle";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzUpdateVehicle call server_updateObject;
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -1,38 +1,43 @@
|
|||||||
private["_hasKnife","_qty","_item","_text","_string","_type","_loop","_meat","_timer"];
|
private["_item","_hasKnife","_hasKnifeBlunt","_hasHarvested","_qty","_text","_string","_type"];
|
||||||
_item = _this select 3;
|
_item = _this select 3;
|
||||||
_hasKnife = "ItemKnife" in items player;
|
_hasKnife = "ItemKnife" in items player;
|
||||||
|
_hasKnifeBlunt = "ItemKnifeBlunt" in items player;
|
||||||
_type = typeOf _item;
|
_type = typeOf _item;
|
||||||
_hasHarvested = _item getVariable["meatHarvested",false];
|
_hasHarvested = _item getVariable["meatHarvested",false];
|
||||||
_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
|
_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
|
||||||
|
|
||||||
player removeAction s_player_butcher;
|
player removeAction s_player_butcher;
|
||||||
s_player_butcher = -1;
|
s_player_butcher = -1;
|
||||||
|
_hasChance = 9 > random 100;
|
||||||
|
|
||||||
if (_hasKnife and !_hasHarvested) then {
|
if (_hasKnife) then {
|
||||||
|
if (_hasChance) then {
|
||||||
|
player removeWeapon "ItemKnife";
|
||||||
|
player addWeapon "ItemKnifeBlunt";
|
||||||
|
cutText [localize "STR_EQUIP_CODE_DESC_4", "PLAIN DOWN"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
||||||
//Get Animal Type
|
//Get Animal Type
|
||||||
_loop = true;
|
|
||||||
_isListed = isClass (_config);
|
_isListed = isClass (_config);
|
||||||
_text = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
|
_text = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
|
||||||
|
|
||||||
player playActionNow "Medic";
|
player playActionNow "Medic";
|
||||||
[player,"gut",0,false] call dayz_zombieSpeak;
|
[player,"gut",0,false] call dayz_zombieSpeak;
|
||||||
_item setVariable["meatHarvested",true,true];
|
_item setVariable["meatHarvested",true,true];
|
||||||
|
_item setVariable ["timerawmeatHarvested",time,false];
|
||||||
|
|
||||||
_qty = 1;
|
_qty = 2;
|
||||||
if (_isListed) then {
|
if (_isListed) then {
|
||||||
_qty = getNumber (_config >> "yield");
|
_qty = getNumber (_config >> "yield");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (_hasKnifeBlunt) then { _qty = round(_qty / 2); };
|
||||||
|
|
||||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||||
|
|
||||||
_array = [_item,_qty];
|
["dayzGutBody",[_item,_qty]] call callRpcProcedure;
|
||||||
|
|
||||||
if (local _item) then {
|
|
||||||
_array spawn local_gutObject;
|
|
||||||
} else {
|
|
||||||
dayzGutBody = _array;
|
|
||||||
publicVariable "dayzGutBody";
|
|
||||||
};
|
|
||||||
|
|
||||||
sleep 6;
|
sleep 6;
|
||||||
_string = format[localize "str_success_gutted_animal",_text,_qty];
|
_string = format[localize "str_success_gutted_animal",_text,_qty];
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
private["_hasKnife","_qty","_item","_text","_string","_type","_loop","_meat","_timer"];
|
private["_hasKnife","_qty","_item","_text","_string","_type","_loop","_meat","_timer"];
|
||||||
_item = _this select 3;
|
_item = _this select 3;
|
||||||
_hasKnife = "ItemKnife" in items player;
|
_hasKnife = "ItemKnife" in items player;
|
||||||
|
_hasKnifeBlunt = "ItemKnifeBlunt" in items player;
|
||||||
_type = typeOf _item;
|
_type = typeOf _item;
|
||||||
_hasHarvested = _item getVariable["meatHarvested",false];
|
_hasHarvested = _item getVariable["meatHarvested",false];
|
||||||
_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
|
_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
|
||||||
@@ -8,7 +9,7 @@ _config = configFile >> "CfgSurvival" >> "Meat" >> _type;
|
|||||||
player removeAction s_player_butcher;
|
player removeAction s_player_butcher;
|
||||||
s_player_butcher = -1;
|
s_player_butcher = -1;
|
||||||
|
|
||||||
if (_hasKnife and !_hasHarvested) then {
|
if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
|
||||||
//Get Animal Type
|
//Get Animal Type
|
||||||
_loop = true;
|
_loop = true;
|
||||||
_isListed = isClass (_config);
|
_isListed = isClass (_config);
|
||||||
@@ -18,21 +19,13 @@ if (_hasKnife and !_hasHarvested) then {
|
|||||||
[player,"gut",0,false] call dayz_zombieSpeak;
|
[player,"gut",0,false] call dayz_zombieSpeak;
|
||||||
_item setVariable["meatHarvested",true,true];
|
_item setVariable["meatHarvested",true,true];
|
||||||
|
|
||||||
_qty = 1;
|
_qty = 1;
|
||||||
if (_isListed) then {
|
|
||||||
_qty = getNumber (_config >> "yield");
|
|
||||||
};
|
|
||||||
|
|
||||||
_id = [player,100,true,(getPosATL player)] spawn player_alertZombies;
|
_id = [player,100,true,(getPosATL player)] spawn player_alertZombies;
|
||||||
|
|
||||||
_array = [_item,_qty];
|
_array = [_item,_qty];
|
||||||
|
|
||||||
if (local _item) then {
|
["dayzGutBodyZ",[_item,_qty]] call callRpcProcedure;
|
||||||
_array spawn local_gutObjectZ;
|
|
||||||
} else {
|
|
||||||
dayzGutBodyZ = _array;
|
|
||||||
publicVariable "dayzGutBodyZ";
|
|
||||||
};
|
|
||||||
|
|
||||||
sleep 6;
|
sleep 6;
|
||||||
_string = format["Successfully Gutted Zombie",_text,_qty];
|
_string = format["Successfully Gutted Zombie",_text,_qty];
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ _location = player modeltoworld [0,1,0];
|
|||||||
_location set [2,0];
|
_location set [2,0];
|
||||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||||
_isWater = (surfaceIsWater _location) or dayz_isSwimming;
|
_isWater = (surfaceIsWater _location) or dayz_isSwimming;
|
||||||
|
_bypass = false;
|
||||||
|
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
|
||||||
@@ -11,33 +12,36 @@ if(_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"];};
|
|||||||
|
|
||||||
_item = _this;
|
_item = _this;
|
||||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||||
|
_require = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "require");
|
||||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||||
|
|
||||||
_hasbuilditem = _this in magazines player;
|
_hasbuilditem = _this in magazines player;
|
||||||
|
_hasrequireditem = _require in items player;
|
||||||
|
|
||||||
if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]};
|
if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]};
|
||||||
|
if (_text == "TrapBear") then { _bypass = true; };
|
||||||
|
|
||||||
_dir = getDir player;
|
if (_hasrequireditem or _bypass) then {
|
||||||
player removeMagazine _item;
|
_dir = getDir player;
|
||||||
|
player removeMagazine _item;
|
||||||
|
|
||||||
player playActionNow "Medic";
|
player playActionNow "Medic";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||||
sleep 5;
|
sleep 5;
|
||||||
|
|
||||||
player allowDamage false;
|
player allowDamage false;
|
||||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||||
_object setDir _dir;
|
_object setDir _dir;
|
||||||
player reveal _object;
|
player reveal _object;
|
||||||
|
|
||||||
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
||||||
|
|
||||||
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
|
["dayzPublishObj",[dayz_characterID,_object,[_dir,_location],_classname]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzPublishObj";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzPublishObj call server_publishObj;
|
|
||||||
};
|
|
||||||
|
|
||||||
sleep 2;
|
sleep 2;
|
||||||
player allowDamage true;
|
player allowDamage true;
|
||||||
|
} else {
|
||||||
|
cutText [format[localize "str_build_failed_01",_text], "PLAIN DOWN"];
|
||||||
|
};
|
||||||
@@ -2,14 +2,21 @@ private["_location","_isOk","_dir","_classname"];
|
|||||||
private["_item"];
|
private["_item"];
|
||||||
_item = _this;
|
_item = _this;
|
||||||
call gear_ui_init;
|
call gear_ui_init;
|
||||||
|
_hasChance = 9 > random 100;
|
||||||
|
|
||||||
if (["forest",dayz_surfaceType] call fnc_inString) then {
|
if (["forest",dayz_surfaceType] call fnc_inString) then {
|
||||||
|
if (!_hasChance) then {
|
||||||
_result = [player,"PartWoodPile"] call BIS_fnc_invAdd;
|
_result = [player,"PartWoodPile"] call BIS_fnc_invAdd;
|
||||||
if (_result) then {
|
if (_result) then {
|
||||||
cutText [localize "str_player_25", "PLAIN DOWN"];
|
cutText [localize "str_player_25", "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
cutText [localize "str_player_24", "PLAIN DOWN"];
|
cutText [localize "str_player_24", "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
|
player removeWeapon "ItemHatchet";
|
||||||
|
player addWeapon "ItemBrokeHatchet";
|
||||||
|
cutText [localize "str_player_23", "PLAIN DOWN"];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
cutText [localize "str_player_23", "PLAIN DOWN"];
|
cutText [localize "str_player_23", "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
@@ -6,11 +6,15 @@ if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
|
|||||||
|
|
||||||
if (vehicle player != player) exitWith {cutText ["You may not drink while in a vehicle", "PLAIN DOWN"]};
|
if (vehicle player != player) exitWith {cutText ["You may not drink while in a vehicle", "PLAIN DOWN"]};
|
||||||
|
|
||||||
if (dayz_thirst == 0) exitWith {cutText ["I am not thirsty", "PLAIN DOWN"]};
|
//Force players to wait 3 mins to drink again
|
||||||
|
if (dayz_lastDrink < 180) exitWith {cutText ["You may not drink, your not thirsty", "PLAIN DOWN"]};
|
||||||
|
|
||||||
_item = _this;
|
_item = _this;
|
||||||
_hasdrinkitem = _this in magazines player;
|
_hasdrinkitem = _this in magazines player;
|
||||||
|
|
||||||
|
_rndInfection = (random 15);
|
||||||
|
_DrinkInfection = (_rndInfection < 1);
|
||||||
|
|
||||||
_config = configFile >> "CfgMagazines" >> _item;
|
_config = configFile >> "CfgMagazines" >> _item;
|
||||||
_text = getText (_config >> "displayName");
|
_text = getText (_config >> "displayName");
|
||||||
_sfx = getText (_config >> "sfx");
|
_sfx = getText (_config >> "sfx");
|
||||||
@@ -25,7 +29,13 @@ sleep 1;
|
|||||||
|
|
||||||
if (_item == "ItemWaterbottle") then {
|
if (_item == "ItemWaterbottle") then {
|
||||||
player addMagazine "ItemWaterbottleUnfilled";
|
player addMagazine "ItemWaterbottleUnfilled";
|
||||||
|
if (_DrinkInfection) then {
|
||||||
|
r_player_infected = true;
|
||||||
|
player setVariable["USEC_infected",true];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
player setVariable ["messing",[dayz_hunger,dayz_thirst],true];
|
player setVariable ["messing",[dayz_hunger,dayz_thirst],true];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -5,17 +5,30 @@ _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animati
|
|||||||
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
|
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"]};
|
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_hunger == 0) exitWith {cutText ["I am not hungry", "PLAIN DOWN"]};
|
if (dayz_lastMeal < 180) exitWith {cutText ["You may not eat, you're already full", "PLAIN DOWN"]};
|
||||||
|
|
||||||
_item = _this;
|
_item = _this;
|
||||||
_hasfoodmag = _this in magazines player;
|
_hasfooditem = _this in magazines player;
|
||||||
|
|
||||||
|
_rndInfection = (random 15);
|
||||||
|
_EatInfection = (_rndInfection < 1);
|
||||||
|
|
||||||
_config = configFile >> "CfgMagazines" >> _item;
|
_config = configFile >> "CfgMagazines" >> _item;
|
||||||
_text = getText (_config >> "displayName");
|
_text = getText (_config >> "displayName");
|
||||||
_regen = getNumber (_config >> "bloodRegen");
|
_regen = getNumber (_config >> "bloodRegen");
|
||||||
|
|
||||||
if (!_hasfoodmag) exitWith {cutText [format[(localize "str_player_31"),_text,"consume"] , "PLAIN DOWN"]};
|
if (!_hasfooditem) exitWith {cutText [format[(localize "str_player_31"),_text,"consume"] , "PLAIN DOWN"]};
|
||||||
|
|
||||||
|
if (_EatInfection) then {
|
||||||
|
if (_item == "FoodSteakCooked" ) then {
|
||||||
|
r_player_infected = true;
|
||||||
|
player setVariable["USEC_infected",true];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
//Rawtime = getVarable _item
|
||||||
|
//_Cookedtime = _item getVariable ["timemeatCooked", time];
|
||||||
|
|
||||||
player playActionNow "PutDown";
|
player playActionNow "PutDown";
|
||||||
player removeMagazine _item;
|
player removeMagazine _item;
|
||||||
@@ -38,11 +51,7 @@ _update = player getVariable["updatePlayer",[false,false,false,false,false]];
|
|||||||
_update set [3,true];
|
_update set [3,true];
|
||||||
player setVariable["updatePlayer",_update,true];
|
player setVariable["updatePlayer",_update,true];
|
||||||
*/
|
*/
|
||||||
dayzPlayerSave = player;
|
["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzPlayerSave";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzPlayerSave call server_updatePlayer;
|
|
||||||
};
|
|
||||||
|
|
||||||
dayz_lastMeal = time;
|
dayz_lastMeal = time;
|
||||||
dayz_hunger = 0;
|
dayz_hunger = 0;
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ if ((_location select 2) < 0) then {
|
|||||||
//_location set [2,0];
|
//_location set [2,0];
|
||||||
_isOk = true; //count (_location isFlatEmpty [0.3,0,0,4,0,false,player]) > 0;
|
_isOk = true; //count (_location isFlatEmpty [0.3,0,0,4,0,false,player]) > 0;
|
||||||
_hasWood = "PartWoodPile" in magazines player;
|
_hasWood = "PartWoodPile" in magazines player;
|
||||||
|
_hasChance = 9 > random 100;
|
||||||
|
|
||||||
if (_hasWood) then {
|
if (_hasWood) then {
|
||||||
if (_isOk) then {
|
if (_isOk) then {
|
||||||
|
if (!_hasChance) then {
|
||||||
player removeMagazine "PartWoodPile";
|
player removeMagazine "PartWoodPile";
|
||||||
_dir = getDir player;
|
_dir = getDir player;
|
||||||
_classname = "Land_Fire_DZ";
|
_classname = "Land_Fire_DZ";
|
||||||
@@ -21,6 +23,11 @@ if (_hasWood) then {
|
|||||||
_id = _fire spawn player_fireMonitor;
|
_id = _fire spawn player_fireMonitor;
|
||||||
|
|
||||||
cutText [localize "str_fireplace_01", "PLAIN DOWN"];
|
cutText [localize "str_fireplace_01", "PLAIN DOWN"];
|
||||||
|
} else {
|
||||||
|
player removeWeapon "ItemMatchbox";
|
||||||
|
player addWeapon "ItemMatchboxEmpty";
|
||||||
|
cutText [localize "Your box of matches appear to be empty", "PLAIN DOWN"];
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
cutText [localize "str_fireplace_02", "PLAIN DOWN"];
|
cutText [localize "str_fireplace_02", "PLAIN DOWN"];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,18 +5,21 @@ _action = _this select 2;
|
|||||||
|
|
||||||
_caller removeAction _action;
|
_caller removeAction _action;
|
||||||
|
|
||||||
_callerID = _caller getVariable "characterID";
|
_callerID = _caller getVariable ["characterID", "0"];
|
||||||
_targetID = _target getVariable "characterID";
|
_targetID = _target getVariable ["characterID", "0"];
|
||||||
|
|
||||||
_friendlies = _caller getVariable ["friendlies", []];
|
if (_callerID != 0 && _targetID != 0) then {
|
||||||
_friendlies set [count _friendlies, _targetID];
|
|
||||||
_caller setVariable ["friendlies", _friendlies, true];
|
|
||||||
|
|
||||||
_rfriendlies = _target getVariable ["friendlies", []];
|
_friendlies = _caller getVariable ["friendlies", []];
|
||||||
|
_friendlies set [count _friendlies, _targetID];
|
||||||
|
_caller setVariable ["friendlies", _friendlies, true];
|
||||||
|
|
||||||
if ((isNull _rfriendlies) or !(_callerID in _rfriendlies)) then {
|
_rfriendlies = _target getVariable ["friendlies", []];
|
||||||
// caller
|
|
||||||
titleText [format["You have tagged %1 as friendly. Waiting for %1 to accept that.",(name _target)]];
|
if ((isNil "_rfriendlies") or !(_callerID in _rfriendlies)) then {
|
||||||
// target
|
// caller
|
||||||
[_caller,_target,"loc",rTITLETEXT,format["%1 wants to tag you as friendly. To accept, tag %1 as friendly.", (name _caller)],"PLAIN DOWN"] call RE;
|
titleText [format["You have tagged %1 as friendly. Waiting for %1 to accept that.",(name _target)]];
|
||||||
};
|
// target
|
||||||
|
[_caller,_target,"loc",rTITLETEXT,format["%1 wants to tag you as friendly. To accept, tag %1 as friendly.", (name _caller)],"PLAIN DOWN"] call RE;
|
||||||
|
};
|
||||||
|
};
|
||||||
38
dayz_code/actions/playerstats.sqf
Normal file
38
dayz_code/actions/playerstats.sqf
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
//Remove action menu
|
||||||
|
player removeAction s_player_stats;
|
||||||
|
s_player_stats = -1;
|
||||||
|
|
||||||
|
//set stats enabled later use
|
||||||
|
player setVariable ["StatsEnabled",true,false];
|
||||||
|
|
||||||
|
//Let Zeds know
|
||||||
|
_id = [player,4,true,(getPosATL player)] spawn player_alertZombies;
|
||||||
|
|
||||||
|
//display gui (temp hint)
|
||||||
|
|
||||||
|
hintSilent parseText format ["
|
||||||
|
<t size='1.20' font='Bitstream' color='#5882FA'>%1</t><br/><br/>
|
||||||
|
<t size='1.15' font='Bitstream' align='left'>Zombies Killed: </t><t size='1.15' font='Bitstream' align='right'>%2</t><br/>
|
||||||
|
<t size='1.15' font='Bitstream' align='left'>Headshots: </t><t size='1.15' font='Bitstream' align='right'>%3</t><br/>
|
||||||
|
<t size='1.15' font='Bitstream' align='left'>Murders: </t><t size='1.15' font='Bitstream' align='right'>%4</t><br/>
|
||||||
|
<t size='1.15' font='Bitstream' align='left'>Bandits Killed: </t><t size='1.15' font='Bitstream' align='right'>%5</t><br/><br/>
|
||||||
|
<t size='1.15' font='Bitstream' align='left'>Humanity: </t><t size='1.15' font='Bitstream' align='right'>%6</t><br/><br/>",
|
||||||
|
(name player),
|
||||||
|
(player getVariable['zombieKills', 0]),
|
||||||
|
(player getVariable['headShots', 0]),
|
||||||
|
(player getVariable['humanKills', 0]),
|
||||||
|
(player getVariable['banditKills', 0]),
|
||||||
|
(player getVariable['humanity', 0])
|
||||||
|
];
|
||||||
|
|
||||||
|
/*
|
||||||
|
player createDiarySubject ["MyDiary","My Diary"];
|
||||||
|
player createDiaryRecord ["MyDiary",["Stats", "Zombies Killed: <execute expression='player getVariable['zombieKills', 0]'</execute>"]];
|
||||||
|
player createDiaryRecord ["MyDiary",["Stats", "Headshots: <execute expression='player getVariable['headShots', 0]'</execute>"]];
|
||||||
|
player createDiaryRecord ["MyDiary",["Stats", "Murders: <execute expression='player getVariable['humanKills', 0]'</execute>"]];
|
||||||
|
player createDiaryRecord ["MyDiary",["Stats", "Bandits Killed: <execute expression='player getVariable['banditKills', 0]'</execute>"]];
|
||||||
|
player createDiaryRecord ["MyDiary",["Stats", "Humanity: <execute expression='player getVariable['humanity', 0]'</execute>"]];
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Remove variable
|
||||||
|
player setVariable ["StatsEnabled",false,false];
|
||||||
@@ -58,11 +58,7 @@ dayz_thirst = 0;
|
|||||||
dayz_lastMeal = time;
|
dayz_lastMeal = time;
|
||||||
dayz_hunger = 0;
|
dayz_hunger = 0;
|
||||||
|
|
||||||
dayzPlayerSave = player;
|
["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzPlayerSave";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzPlayerSave call server_updatePlayer;
|
|
||||||
};
|
|
||||||
|
|
||||||
[player,"eat",0,false] call dayz_zombieSpeak;
|
[player,"eat",0,false] call dayz_zombieSpeak;
|
||||||
|
|
||||||
@@ -83,10 +79,9 @@ _display = uiNamespace getVariable 'DAYZ_GUI_display';
|
|||||||
_control = _display displayCtrl 1302;
|
_control = _display displayCtrl 1302;
|
||||||
_control ctrlShow true;
|
_control ctrlShow true;
|
||||||
|
|
||||||
// Remove body
|
// Remove body
|
||||||
dayzHideBody = _item;
|
["dayzHideBody",_item] call broadcastRpcCallAll;
|
||||||
publicVariable "dayzHideBody";
|
|
||||||
hideBody _item;
|
|
||||||
|
|
||||||
cutText [format[(localize "str_player_consumed"),_item, "PLAIN DOWN"];
|
cutText [format[(localize "str_player_consumed"),_item, "PLAIN DOWN"];
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ _id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
|
|||||||
|
|
||||||
sleep 6;
|
sleep 6;
|
||||||
|
|
||||||
dayzSetFuel = [_vehicle,_newFuel];
|
//apply newFuel to vehicle on every peer
|
||||||
dayzSetFuel spawn local_sefFuel;
|
["dayzSetFuel",[_vehicle,_newFuel]] call broadcastRpcCallAll;
|
||||||
publicVariable "dayzSetFuel";
|
|
||||||
cutText [format[localize "str_player_05",_nameType,_canSize], "PLAIN DOWN"];
|
cutText [format[localize "str_player_05",_nameType,_canSize], "PLAIN DOWN"];
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,5 @@ sleep 1;
|
|||||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||||
sleep 5;
|
sleep 5;
|
||||||
|
|
||||||
dayzDeleteObj = [_objectID,_objectUID];
|
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzDeleteObj";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzDeleteObj call local_deleteObj;
|
|
||||||
};
|
|
||||||
|
|
||||||
deleteVehicle _obj;
|
deleteVehicle _obj;
|
||||||
@@ -26,11 +26,8 @@ if (_section and _hasToolbox) then {
|
|||||||
|
|
||||||
//Fix the part
|
//Fix the part
|
||||||
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
|
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
|
||||||
dayzSetFix = [_vehicle,_selection,0];
|
//vehicle is owned by whoever is in it, so we have to have each client try and fix it
|
||||||
publicVariable "dayzSetFix";
|
["dayzSetFix",[_vehicle,_selection,0],_vehicle] call broadcastRpcCallIfLocal;
|
||||||
if (local _vehicle) then {
|
|
||||||
dayzSetFix call object_setFixServer;
|
|
||||||
};
|
|
||||||
|
|
||||||
player playActionNow "Medic";
|
player playActionNow "Medic";
|
||||||
sleep 1;
|
sleep 1;
|
||||||
@@ -64,12 +61,5 @@ _allFixed = true;
|
|||||||
//update if repaired
|
//update if repaired
|
||||||
if (_allFixed) then {
|
if (_allFixed) then {
|
||||||
_vehicle setDamage 0;
|
_vehicle setDamage 0;
|
||||||
dayzUpdateVehicle = [_vehicle,"repair"];
|
["dayzUpdateVehicle",[_vehicle,"repair"]] call callRpcProcedure;
|
||||||
if (isServer) then {
|
|
||||||
if (allowConnection) then {
|
|
||||||
dayzUpdateVehicle call server_updateObject;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
publicVariable "dayzUpdateVehicle";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
@@ -10,11 +10,7 @@ _category = (_this select 3) select 1;
|
|||||||
|
|
||||||
diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
|
diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
|
||||||
|
|
||||||
dayzTraderMenu = [_activatingPlayer,_trader_id,_category,_action];
|
["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzTraderMenu";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzTraderMenu call server_traders;
|
|
||||||
};
|
|
||||||
|
|
||||||
waitUntil {!isNil "dayzTraderMenuResult"};
|
waitUntil {!isNil "dayzTraderMenuResult"};
|
||||||
|
|
||||||
|
|||||||
@@ -57,11 +57,7 @@ if (!_isOk) then {
|
|||||||
|
|
||||||
//player setVariable ["tentUpdate",["Land_A_tent",_dir,_location,[dayz_tentWeapons,dayz_tentMagazines,dayz_tentBackpacks]],true];
|
//player setVariable ["tentUpdate",["Land_A_tent",_dir,_location,[dayz_tentWeapons,dayz_tentMagazines,dayz_tentBackpacks]],true];
|
||||||
|
|
||||||
dayzPublishObj = [dayz_characterID,_tent,[_dir,_location],"TentStorage"];
|
["dayzPublishObj",[dayz_characterID,_tent,[_dir,_location],"TentStorage"]] call callRpcProcedure;
|
||||||
publicVariable "dayzPublishObj";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzPublishObj call server_publishObj;
|
|
||||||
};
|
|
||||||
|
|
||||||
cutText [localize "str_success_tent_pitch", "PLAIN DOWN"];
|
cutText [localize "str_success_tent_pitch", "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -25,13 +25,7 @@ if(_buy_o_sell == "buy") then {
|
|||||||
|
|
||||||
if (_qty >= _qty_in) then {
|
if (_qty >= _qty_in) then {
|
||||||
|
|
||||||
// server_tradeObject [_activatingPlayer,_traderID,_bos]
|
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
|
||||||
publicVariableServer "dayzTradeObject";
|
|
||||||
|
|
||||||
if (isServer) then {
|
|
||||||
dayzTradeObject call server_tradeObject;
|
|
||||||
};
|
|
||||||
|
|
||||||
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||||
|
|
||||||
@@ -63,13 +57,7 @@ if (_qty >= _qty_in) then {
|
|||||||
|
|
||||||
_veh setVariable ["characterID",dayz_playerUID,true];
|
_veh setVariable ["characterID",dayz_playerUID,true];
|
||||||
|
|
||||||
// server_publishVeh [_veh,[_dir,_objPosition],_vehicle,true,dayz_characterID]
|
["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;
|
||||||
dayzPublishVeh = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
|
|
||||||
|
|
||||||
publicVariableServer "dayzPublishVeh";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzPublishVeh call server_publishVeh;
|
|
||||||
};
|
|
||||||
|
|
||||||
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
@@ -82,11 +70,7 @@ if (_qty >= _qty_in) then {
|
|||||||
_objectID = _obj getVariable ["ObjectID","0"];
|
_objectID = _obj getVariable ["ObjectID","0"];
|
||||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||||
|
|
||||||
dayzDeleteObj = [_objectID,_objectUID];
|
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzDeleteObj";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzDeleteObj call local_deleteObj;
|
|
||||||
};
|
|
||||||
|
|
||||||
deleteVehicle _obj;
|
deleteVehicle _obj;
|
||||||
|
|
||||||
|
|||||||
@@ -25,13 +25,7 @@ if(_buy_o_sell == "buy") then {
|
|||||||
|
|
||||||
if (_qty >= _qty_in) then {
|
if (_qty >= _qty_in) then {
|
||||||
|
|
||||||
// server_tradeObject [_activatingPlayer,_traderID,_bos]
|
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
|
||||||
publicVariableServer "dayzTradeObject";
|
|
||||||
|
|
||||||
if (isServer) then {
|
|
||||||
dayzTradeObject call server_tradeObject;
|
|
||||||
};
|
|
||||||
|
|
||||||
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||||
|
|
||||||
@@ -63,14 +57,8 @@ if (_qty >= _qty_in) then {
|
|||||||
|
|
||||||
_veh setVariable ["characterID",dayz_playerUID,true];
|
_veh setVariable ["characterID",dayz_playerUID,true];
|
||||||
|
|
||||||
// server_publishVeh [_veh,[_dir,_objPosition],_vehicle,true,dayz_characterID]
|
["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;
|
||||||
dayzPublishVeh = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
|
|
||||||
|
|
||||||
publicVariableServer "dayzPublishVeh";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzPublishVeh call server_publishVeh;
|
|
||||||
};
|
|
||||||
|
|
||||||
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
// Sell Vehicle
|
// Sell Vehicle
|
||||||
@@ -82,11 +70,7 @@ if (_qty >= _qty_in) then {
|
|||||||
_objectID = _obj getVariable ["ObjectID","0"];
|
_objectID = _obj getVariable ["ObjectID","0"];
|
||||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||||
|
|
||||||
dayzDeleteObj = [_objectID,_objectUID];
|
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzDeleteObj";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzDeleteObj call local_deleteObj;
|
|
||||||
};
|
|
||||||
|
|
||||||
deleteVehicle _obj;
|
deleteVehicle _obj;
|
||||||
|
|
||||||
|
|||||||
@@ -27,13 +27,7 @@ if(_buy_o_sell == "buy") then {
|
|||||||
|
|
||||||
if (_qty >= _qty_in) then {
|
if (_qty >= _qty_in) then {
|
||||||
|
|
||||||
// server_tradeObject [_activatingPlayer,_traderID,_bos]
|
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
|
||||||
publicVariableServer "dayzTradeObject";
|
|
||||||
|
|
||||||
if (isServer) then {
|
|
||||||
dayzTradeObject call server_tradeObject;
|
|
||||||
};
|
|
||||||
|
|
||||||
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||||
|
|
||||||
|
|||||||
@@ -21,13 +21,7 @@ if (_qty >= _qty_in) then {
|
|||||||
_bos = 1;
|
_bos = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
// server_tradeObject [_activatingPlayer,_traderID,_bos]
|
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
|
||||||
publicVariableServer "dayzTradeObject";
|
|
||||||
|
|
||||||
if (isServer) then {
|
|
||||||
dayzTradeObject call server_tradeObject;
|
|
||||||
};
|
|
||||||
|
|
||||||
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,7 @@ if(_buy_o_sell == "buy") then {
|
|||||||
|
|
||||||
if (_qty >= _qty_in) then {
|
if (_qty >= _qty_in) then {
|
||||||
|
|
||||||
|
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
|
||||||
// server_tradeObject [_activatingPlayer,_traderID,_bos]
|
|
||||||
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
|
|
||||||
publicVariableServer "dayzTradeObject";
|
|
||||||
|
|
||||||
if (isServer) then {
|
|
||||||
dayzTradeObject call server_tradeObject;
|
|
||||||
};
|
|
||||||
|
|
||||||
waitUntil {!isNil "dayzTradeResult"};
|
waitUntil {!isNil "dayzTradeResult"};
|
||||||
|
|
||||||
|
|||||||
@@ -57,13 +57,7 @@ if (!_isOk) then {
|
|||||||
_tent setVariable ["characterID",dayz_playerUID,true];
|
_tent setVariable ["characterID",dayz_playerUID,true];
|
||||||
_tent setVariable ["OEMPos",_location,true];
|
_tent setVariable ["OEMPos",_location,true];
|
||||||
|
|
||||||
//player setVariable ["tentUpdate",["Land_A_tent",_dir,_location,[dayz_tentWeapons,dayz_tentMagazines,dayz_tentBackpacks]],true];
|
["dayzPublishObj",[dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
|
||||||
|
|
||||||
dayzPublishObj = [dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"];
|
|
||||||
publicVariable "dayzPublishObj";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzPublishObj call server_publishObj;
|
|
||||||
};
|
|
||||||
|
|
||||||
cutText ["You have setup your vault", "PLAIN DOWN"];
|
cutText ["You have setup your vault", "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -548,14 +548,14 @@ class Citizen1; // External class reference
|
|||||||
|
|
||||||
class DZ_Czech_Vest_Puch: Bag_Base_EP1
|
class DZ_Czech_Vest_Puch: Bag_Base_EP1
|
||||||
{
|
{
|
||||||
scope = 2;
|
displayname = "Czech Vest Pouch";
|
||||||
displayName = "Czech Vest Pouch";
|
|
||||||
picture = "\ca\weapons_e\data\icons\backpack_ACR_small_CA.paa";
|
|
||||||
icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa";
|
icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa";
|
||||||
mapsize = 2;
|
mapsize = 2;
|
||||||
model = "\ca\weapons_e\AmmoBoxes\backpack_acr_small.p3d";
|
model = "\ca\weapons_e\AmmoBoxes\backpack_acr_small.p3d";
|
||||||
transportMaxWeapons = 0;
|
picture = "\ca\weapons_e\data\icons\backpack_ACR_small_CA.paa";
|
||||||
transportMaxMagazines = 12;
|
scope = 2;
|
||||||
|
transportmaxmagazines = 12;
|
||||||
|
transportmaxweapons = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DZ_ALICE_Pack_EP1: Bag_Base_EP1
|
class DZ_ALICE_Pack_EP1: Bag_Base_EP1
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ _originalPos = getPosATL _obj;
|
|||||||
if (_canLoot) then {
|
if (_canLoot) then {
|
||||||
//Get zombie class
|
//Get zombie class
|
||||||
_unitTypes = getArray (_config >> "zombieClass");
|
_unitTypes = getArray (_config >> "zombieClass");
|
||||||
_min = getNumber (_config >> "maxRoaming");
|
_min = getNumber (_config >> "minRoaming");
|
||||||
_max = getNumber (_config >> "minRoaming");
|
_max = getNumber (_config >> "maxRoaming");
|
||||||
//Walking Zombies
|
//Walking Zombies
|
||||||
_num = round(random _max) max _min;
|
_num = round(random _max) min _min;
|
||||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||||
//Get zombie class
|
//Get zombie class
|
||||||
_zombieChance = getNumber (_config >> "zombieChance");
|
_zombieChance = getNumber (_config >> "zombieChance");
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
|
|||||||
|
|
||||||
if ((isPlayer _unit) and !(_charID in _friendlies)) then {
|
if ((isPlayer _unit) and !(_charID in _friendlies)) then {
|
||||||
r_action = true;
|
r_action = true;
|
||||||
_action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", "_target != player"];
|
_action = _unit addAction ["Tag as friendly", "\z\addons\dayz_code\actions\player_tagFriendly.sqf", [], 0, false, true, "", "vehicle _unit == _unit"];
|
||||||
r_player_actions set [count r_player_actions,_action];
|
r_player_actions set [count r_player_actions,_action];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ _sourceZombie = _source isKindOf "zZombie_base";
|
|||||||
if (_isPlayer) then {
|
if (_isPlayer) then {
|
||||||
if (_damage > 0.1) then {
|
if (_damage > 0.1) then {
|
||||||
dayz_canDisconnect = false;
|
dayz_canDisconnect = false;
|
||||||
dayzDiscoAdd = getPlayerUID player;
|
["dayzDiscoAdd",getPlayerUID player] call callRpcProcedure;
|
||||||
publicVariable "dayzDiscoAdd";
|
|
||||||
dayz_damageCounter = time;
|
dayz_damageCounter = time;
|
||||||
|
|
||||||
//Ensure Control is visible
|
//Ensure Control is visible
|
||||||
@@ -56,10 +56,7 @@ if (_unit == player) then {
|
|||||||
_myKills = 200 - (((player getVariable ["humanKills",0]) / 30) * 100);
|
_myKills = 200 - (((player getVariable ["humanKills",0]) / 30) * 100);
|
||||||
//Process Morality Hit
|
//Process Morality Hit
|
||||||
_humanityHit = -(_myKills * _damage);
|
_humanityHit = -(_myKills * _damage);
|
||||||
_id = [_source,_humanityHit] spawn {
|
["dayzHumanity",[_source,_humanityHit,30]] call broadcastRpcCallAll;
|
||||||
dayzHumanity = [_this select 0,_this select 1,30];
|
|
||||||
publicVariable "dayzHumanity";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -169,9 +166,7 @@ if (_damage > 0.4) then { //0.25
|
|||||||
if(!_isPZombie) then {
|
if(!_isPZombie) then {
|
||||||
//Create Wound
|
//Create Wound
|
||||||
_unit setVariable[_wound,true,true];
|
_unit setVariable[_wound,true,true];
|
||||||
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
|
["usecBleed",[_unit,_wound,_hit]] call broadcastRpcCallAll;
|
||||||
usecBleed = [_unit,_wound,_hit];
|
|
||||||
publicVariable "usecBleed";
|
|
||||||
|
|
||||||
//Set Injured if not already
|
//Set Injured if not already
|
||||||
_isInjured = _unit getVariable["USEC_injured",false];
|
_isInjured = _unit getVariable["USEC_injured",false];
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ _hasFuelE = "ItemJerrycanEmpty" in magazines player;
|
|||||||
_hasRawMeat = "FoodSteakRaw" in magazines player;
|
_hasRawMeat = "FoodSteakRaw" in magazines player;
|
||||||
_hasKnife = "ItemKnife" in items player;
|
_hasKnife = "ItemKnife" in items player;
|
||||||
_hasToolbox = "ItemToolbox" in items player;
|
_hasToolbox = "ItemToolbox" in items player;
|
||||||
|
_hasstatsenabled = player getVariable ["StatsEnabled",false];
|
||||||
//_hasTent = "ItemTent" in items player;
|
//_hasTent = "ItemTent" in items player;
|
||||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||||
_nearLight = nearestObject [player,"LitObject"];
|
_nearLight = nearestObject [player,"LitObject"];
|
||||||
@@ -28,6 +29,14 @@ if (!isNull _nearLight) then {
|
|||||||
};
|
};
|
||||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||||
|
|
||||||
|
if (!_hasstatsenabled) then {
|
||||||
|
if (s_player_stats < 0) then {
|
||||||
|
// s_player_stats = player addAction [format[localize "str_actions_stats",_text], "\z\addons\dayz_code\actions\playerstats.sqf"];
|
||||||
|
(findDisplay 46) displayAddEventHandler ["keyDown", "_this call fnc_onKeyDown"];
|
||||||
|
s_player_stats = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
//Grab Flare
|
//Grab Flare
|
||||||
if (_canPickLight and !dayz_hasLight) then {
|
if (_canPickLight and !dayz_hasLight) then {
|
||||||
if (s_player_grabflare < 0) then {
|
if (s_player_grabflare < 0) then {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private["_unit","_selection","_strH","_dam","_total"];
|
private["_unit","_selection","_strH","_damage","_total"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_selection = _this select 1;
|
_selection = _this select 1;
|
||||||
_damage = _this select 2;
|
_damage = _this select 2;
|
||||||
@@ -9,15 +9,8 @@ if (_selection != "" and local _unit) then {
|
|||||||
//player sidechat str _damage;
|
//player sidechat str _damage;
|
||||||
_unit setVariable [_strH,_damage,true];
|
_unit setVariable [_strH,_damage,true];
|
||||||
if (_damage == 0) then {
|
if (_damage == 0) then {
|
||||||
dayzUpdateVehicle = [_unit,"repair"];
|
["dayzUpdateVehicle",[_unit,"repair"]] call callRpcProcedure;
|
||||||
} else {
|
} else {
|
||||||
dayzUpdateVehicle = [_unit,"damage"];
|
["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
|
||||||
};
|
|
||||||
if (isServer) then {
|
|
||||||
if (allowConnection) then {
|
|
||||||
dayzUpdateVehicle call server_updateObject;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
publicVariable "dayzUpdateVehicle";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
private["_unit","_selection","_strH","_dam","_total"];
|
private["_unit","_selection","_damage","_strH","_dam","_total"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_selection = _this select 1;
|
_selection = _this select 1;
|
||||||
_damage = _this select 2;
|
_damage = _this select 2;
|
||||||
@@ -12,14 +12,7 @@ if ((_selection != "") and local _unit) then {
|
|||||||
_unit setVariable [_strH,_total,true];
|
_unit setVariable [_strH,_total,true];
|
||||||
|
|
||||||
if (_damage >= 1) then {
|
if (_damage >= 1) then {
|
||||||
dayzUpdateVehicle = [_unit,"damage"];
|
["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
|
||||||
if (isServer) then {
|
|
||||||
if (allowConnection) then {
|
|
||||||
dayzUpdateVehicle call server_updateObject;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
publicVariable "dayzUpdateVehicle";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private["_unit","_selection","_strH","_dam","_total"];
|
private["_unit","_killer","_type","_pos","_dir"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_killer = _this select 1;
|
_killer = _this select 1;
|
||||||
_type = typeOf _unit;
|
_type = typeOf _unit;
|
||||||
@@ -6,5 +6,4 @@ _pos = getposATL _unit;
|
|||||||
_dir = direction _unit;
|
_dir = direction _unit;
|
||||||
if (local _unit) then {
|
if (local _unit) then {
|
||||||
deleteVehicle _unit;
|
deleteVehicle _unit;
|
||||||
// [_type,_pos,_dir] spawn object_spawnDamVehicle;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,11 +13,7 @@ if (r_player_infected) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Send Death Notice
|
//Send Death Notice
|
||||||
dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName,_infected];
|
["dayzDeath",[dayz_characterID,0,_body,_playerID,dayz_playerName,_infected]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzDeath";
|
|
||||||
if (isServer) then {
|
|
||||||
_id = dayzDeath spawn server_playerDied;
|
|
||||||
};
|
|
||||||
|
|
||||||
_id = [player,50,true,getPosATL player] spawn player_alertZombies;
|
_id = [player,50,true,getPosATL player] spawn player_alertZombies;
|
||||||
|
|
||||||
@@ -66,8 +62,7 @@ if (count _array > 0) then {
|
|||||||
_wait = 0;
|
_wait = 0;
|
||||||
};
|
};
|
||||||
if (!_canHitFree and !_isBandit) then {
|
if (!_canHitFree and !_isBandit) then {
|
||||||
dayzHumanity = [_source,_humanity,_wait];
|
["dayzHumanity",[_source,_humanity,_wait]] call broadcastRpcCallAll;
|
||||||
publicVariable "dayzHumanity";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -124,10 +119,7 @@ if (count _array > 0) then {
|
|||||||
|
|
||||||
_body setVariable["combattimeout", 0, true];
|
_body setVariable["combattimeout", 0, true];
|
||||||
|
|
||||||
/*
|
//["dayzFlies",player] call broadcastRpcCallAll;
|
||||||
dayzFlies = player;
|
|
||||||
publicVariable "dayzFlies";
|
|
||||||
*/
|
|
||||||
sleep 2;
|
sleep 2;
|
||||||
|
|
||||||
1 cutRsc ["DeathScreen","BLACK OUT",3];
|
1 cutRsc ["DeathScreen","BLACK OUT",3];
|
||||||
|
|||||||
@@ -60,16 +60,14 @@ if (_ammo isKindOf "SmokeShell") then {
|
|||||||
if (_ammo isKindOf "RoadFlare") then {
|
if (_ammo isKindOf "RoadFlare") then {
|
||||||
//hint str(_ammo);
|
//hint str(_ammo);
|
||||||
_projectile = nearestObject [_unit, "RoadFlare"];
|
_projectile = nearestObject [_unit, "RoadFlare"];
|
||||||
_id = [_projectile,0] spawn object_roadFlare;
|
["dayzRoadFlare",[_projectile,0]] call broadcastRpcCallAll;
|
||||||
dayzRoadFlare = [_projectile,0];
|
|
||||||
publicVariable "dayzRoadFlare";
|
|
||||||
_id = _this spawn player_throwObject;
|
_id = _this spawn player_throwObject;
|
||||||
};
|
};
|
||||||
if (_ammo isKindOf "ChemLight") then {
|
if (_ammo isKindOf "ChemLight") then {
|
||||||
_projectile = nearestObject [_unit, "ChemLight"];
|
_projectile = nearestObject [_unit, "ChemLight"];
|
||||||
_id = [_projectile,1] spawn object_roadFlare;
|
["dayzRoadFlare",[_projectile,1]] call broadcastRpcCallAll;
|
||||||
dayzRoadFlare = [_projectile,1];
|
|
||||||
publicVariable "dayzRoadFlare";
|
|
||||||
_id = _this spawn player_throwObject;
|
_id = _this spawn player_throwObject;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
private ["_objects"];
|
private ["_objects"];
|
||||||
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage"], 10];
|
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage"], 10];
|
||||||
{
|
{
|
||||||
dayzUpdateVehicle = [_x,"gear"];
|
["dayzUpdateVehicle",[_x,"gear"]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzUpdateVehicle";
|
|
||||||
} foreach _objects;
|
} foreach _objects;
|
||||||
|
|
||||||
private["_dialog","_magazineArray","_control","_item","_val","_max"];
|
private["_dialog","_magazineArray","_control","_item","_val","_max"];
|
||||||
|
|||||||
@@ -46,9 +46,7 @@ if (count _medical > 0) then {
|
|||||||
//Add Wounds
|
//Add Wounds
|
||||||
{
|
{
|
||||||
player setVariable[_x,true,true];
|
player setVariable[_x,true,true];
|
||||||
[player,_x,_hit] spawn fnc_usec_damageBleed;
|
["usecBleed",[player,_x,_hit]] call broadcastRpcCallAll;
|
||||||
usecBleed = [player,_x,0];
|
|
||||||
publicVariable "usecBleed";
|
|
||||||
} forEach (_medical select 8);
|
} forEach (_medical select 8);
|
||||||
|
|
||||||
//Add fractures
|
//Add fractures
|
||||||
@@ -77,11 +75,8 @@ player setVariable["worldspace",_worldspace,true];
|
|||||||
player setVariable["friendlies",_friendlies,true];
|
player setVariable["friendlies",_friendlies,true];
|
||||||
player setVariable["tagList",_tagList,true];
|
player setVariable["tagList",_tagList,true];
|
||||||
|
|
||||||
dayzPlayerMorph = [_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity];
|
//code for this on the server is missing
|
||||||
publicVariable "dayzPlayerMorph";
|
//["dayzPlayerMorph",[_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity]] call callRpcProcedure;
|
||||||
if (isServer) then {
|
|
||||||
dayzPlayerMorph call server_playerMorph;
|
|
||||||
};
|
|
||||||
|
|
||||||
call dayz_resetSelfActions;
|
call dayz_resetSelfActions;
|
||||||
|
|
||||||
|
|||||||
@@ -34,12 +34,7 @@ if(_ownerID == dayz_characterID) then {
|
|||||||
_magazines = getMagazineCargo _obj;
|
_magazines = getMagazineCargo _obj;
|
||||||
_backpacks = getBackpackCargo _obj;
|
_backpacks = getBackpackCargo _obj;
|
||||||
|
|
||||||
dayzDeleteObj = [_objectID,_objectUID];
|
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzDeleteObj";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzDeleteObj call local_deleteObj;
|
|
||||||
};
|
|
||||||
|
|
||||||
deleteVehicle _obj;
|
deleteVehicle _obj;
|
||||||
|
|
||||||
//Add weapons
|
//Add weapons
|
||||||
|
|||||||
@@ -34,11 +34,7 @@ if(_ownerID == dayz_playerUID) then {
|
|||||||
_magazines = getMagazineCargo _obj;
|
_magazines = getMagazineCargo _obj;
|
||||||
_backpacks = getBackpackCargo _obj;
|
_backpacks = getBackpackCargo _obj;
|
||||||
|
|
||||||
dayzDeleteObj = [_objectID,_objectUID];
|
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzDeleteObj";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzDeleteObj call local_deleteObj;
|
|
||||||
};
|
|
||||||
|
|
||||||
deleteVehicle _obj;
|
deleteVehicle _obj;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ _dateNow = (DateToNumber date);
|
|||||||
_maxZombies = dayz_maxLocalZombies;
|
_maxZombies = dayz_maxLocalZombies;
|
||||||
_maxWildZombies = 3;
|
_maxWildZombies = 3;
|
||||||
_age = -1;
|
_age = -1;
|
||||||
|
|
||||||
_nearbyBuildings = [];
|
_nearbyBuildings = [];
|
||||||
_radius = 200;
|
_radius = 200;
|
||||||
_maxZombies = 10;
|
_maxZombies = 10;
|
||||||
@@ -23,20 +24,37 @@ diag_log ("Type: " +str(_type));
|
|||||||
|
|
||||||
switch (_nearbytype) do {
|
switch (_nearbytype) do {
|
||||||
case "NameVillage": {
|
case "NameVillage": {
|
||||||
_radius = 250;
|
//_radius = 250;
|
||||||
_maxZombies = 30;
|
_maxZombies = 30;
|
||||||
};
|
};
|
||||||
case "NameCity": {
|
case "NameCity": {
|
||||||
_radius = 300;
|
//_radius = 300;
|
||||||
_maxZombies = 40;
|
_maxZombies = 40;
|
||||||
};
|
};
|
||||||
case "NameCityCapital": {
|
case "NameCityCapital": {
|
||||||
_radius = 400;
|
//_radius = 400;
|
||||||
_maxZombies = 50;
|
_maxZombies = 50;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius]) < _maxZombies;
|
_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius+100]) < _maxZombies;
|
||||||
|
|
||||||
|
if ("ItemMap_Debug" in items player) then {
|
||||||
|
deleteMarkerLocal "MaxZeds";
|
||||||
|
deleteMarkerLocal "Counter";
|
||||||
|
_markerstr = createMarkerLocal ["MaxZeds", _position];
|
||||||
|
_markerstr setMarkerColorLocal "ColorRed";
|
||||||
|
_markerstr setMarkerShapeLocal "ELLIPSE";
|
||||||
|
_markerstr setMarkerBrushLocal "Border";
|
||||||
|
_markerstr setMarkerSizeLocal [_radius, _radius];
|
||||||
|
|
||||||
|
_markerstr1 = createMarkerLocal ["Counter", _position];
|
||||||
|
_markerstr1 setMarkerColorLocal "ColorYellow";
|
||||||
|
_markerstr1 setMarkerShapeLocal "ELLIPSE";
|
||||||
|
_markerstr1 setMarkerBrushLocal "Border";
|
||||||
|
_markerstr1 setMarkerSizeLocal [_radius+100, _radius+100];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
switch (_type) do {
|
switch (_type) do {
|
||||||
case "Zeds": {
|
case "Zeds": {
|
||||||
@@ -49,8 +67,16 @@ switch (_type) do {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
case "Wild": {
|
case "both": {
|
||||||
//[_position, _maxZombies] call wild_spawnZombies;
|
//[_position, _maxZombies] call wild_spawnZombies;
|
||||||
|
_nearbyBuildings = nearestObjects [_position, dayz_ZombieBuildings, _radius];
|
||||||
|
_nearbyCount = count _nearbyBuildings;
|
||||||
|
if (_nearbyCount > 0) then {
|
||||||
|
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _nearbyBuildings] call player_spawnlootCheck;
|
||||||
|
if (_spawnZombies) then {
|
||||||
|
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies, _nearbyBuildings] call player_spawnzedCheck;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
case "Loot": {
|
case "Loot": {
|
||||||
//_nearbyBuildings = nearestObjects [_position, ["building"], _radius];
|
//_nearbyBuildings = nearestObjects [_position, ["building"], _radius];
|
||||||
|
|||||||
@@ -189,5 +189,5 @@ private ["_newBackpackType","_backpackWpn","_backpackMag"];
|
|||||||
|
|
||||||
_playerUID=getPlayerUID player;
|
_playerUID=getPlayerUID player;
|
||||||
_playerObjName = format["player%1",_playerUID];
|
_playerObjName = format["player%1",_playerUID];
|
||||||
call compile format["player%1 = player;",_playerUID];
|
call compile format["%1 = player;",_playerObjName];
|
||||||
publicVariable _playerObjName;
|
publicVariable _playerObjName;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
private["_unit","_targets","_move","_damage","_wound","_index","_cnt","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_result","_vehicle","_tPos","_zPos","_cantSee","_inAngle"];
|
private["_unit","_targets","_move","_damage","_wound","_index","_cnt","_sound","_local","_dir","_hpList","_hp","_strH","_dam","_total","_vehicle","_tPos","_zPos","_cantSee","_inAngle"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_type = _this select 1;
|
_type = _this select 1;
|
||||||
_vehicle = (vehicle player);
|
_vehicle = (vehicle player);
|
||||||
@@ -40,9 +40,7 @@ if (_vehicle != player) then {
|
|||||||
|
|
||||||
//diag_log ("Hitpoints " +str(_wound) +str(_total));
|
//diag_log ("Hitpoints " +str(_wound) +str(_total));
|
||||||
|
|
||||||
//_result = [_vehicle, _wound,_total, _unit,"zombie"] call fnc_usec_damageVehicle;
|
//["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
|
||||||
//dayzHitV = [_vehicle,_wound,_total, _unit,"zombie"];
|
|
||||||
//publicVariable "dayzHitV";
|
|
||||||
if (_total >= 1) then {
|
if (_total >= 1) then {
|
||||||
if ((_chance % 4) == 0) then {
|
if ((_chance % 4) == 0) then {
|
||||||
if ((_vehicle isKindOf "ATV_Base_EP1") or (_vehicle isKindOf "Motorcycle")) then { player action ["eject", _vehicle] };
|
if ((_vehicle isKindOf "ATV_Base_EP1") or (_vehicle isKindOf "Motorcycle")) then { player action ["eject", _vehicle] };
|
||||||
@@ -65,9 +63,7 @@ if (_vehicle != player) then {
|
|||||||
//publicVariable "dayzHit";
|
//publicVariable "dayzHit";
|
||||||
[_unit,"hit",2,true] call dayz_zombieSpeak;
|
[_unit,"hit",2,true] call dayz_zombieSpeak;
|
||||||
} else {
|
} else {
|
||||||
_result = [_vehicle, _wound,_total, _unit,"zombie"] call fnc_usec_damageVehicle;
|
["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
|
||||||
dayzHitV = [_vehicle,_wound,_total, _unit,"zombie"];
|
|
||||||
publicVariable "dayzHitV";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ _multiplier = 1;
|
|||||||
_delta = _pHeight - _entHeight;
|
_delta = _pHeight - _entHeight;
|
||||||
if ( ((time - _last) > 1) and ((_delta < 1.5) and (_delta > -1.5)) ) then {
|
if ( ((time - _last) > 1) and ((_delta < 1.5) and (_delta > -1.5)) ) then {
|
||||||
zedattack = [_x, _type] spawn player_zombieAttack;
|
zedattack = [_x, _type] spawn player_zombieAttack;
|
||||||
waitUntil {scriptDone zedattack};
|
|
||||||
_x setVariable["lastAttack",time];
|
_x setVariable["lastAttack",time];
|
||||||
};
|
};
|
||||||
_attacked = true;
|
_attacked = true;
|
||||||
|
|||||||
@@ -23,14 +23,7 @@ if (_dam < 1 ) then {
|
|||||||
_unit setVariable [_strH,_total,true];
|
_unit setVariable [_strH,_total,true];
|
||||||
if ( !_needUpdate ) then {
|
if ( !_needUpdate ) then {
|
||||||
_unit setVariable ["needUpdate",true,true];
|
_unit setVariable ["needUpdate",true,true];
|
||||||
dayzUpdateVehicle = [_unit,"damage"];
|
["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
|
||||||
if (isServer) then {
|
|
||||||
if (allowConnection) then {
|
|
||||||
dayzUpdateVehicle call server_updateObject;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
publicVariableServer "dayzUpdateVehicle";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private["_unit","_selection","_killer"];
|
private["_unit","_hitPoints","_selection","_killer"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
_killer = _this select 1;
|
_killer = _this select 1;
|
||||||
@@ -9,15 +9,7 @@ _hitPoints = _unit call vehicle_getHitpoints;
|
|||||||
_unit setVariable [_selection, 1, true];
|
_unit setVariable [_selection, 1, true];
|
||||||
} forEach _hitPoints;
|
} forEach _hitPoints;
|
||||||
|
|
||||||
dayzUpdateVehicle = [_unit, "damage", true];
|
["dayzUpdateVehicle",[_unit, "damage", true]] call callRpcProcedure;
|
||||||
|
|
||||||
if (isServer) then {
|
|
||||||
if (allowConnection) then {
|
|
||||||
dayzUpdateVehicle call server_updateObject;
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
publicVariable "dayzUpdateVehicle";
|
|
||||||
};
|
|
||||||
|
|
||||||
_unit removeAllEventHandlers "HandleDamage";
|
_unit removeAllEventHandlers "HandleDamage";
|
||||||
_unit removeAllEventHandlers "Killed";
|
_unit removeAllEventHandlers "Killed";
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ if (_doLoiter) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (isNull _agent) exitWith {
|
if (isNull _agent) exitWith {
|
||||||
dayz_spawnZombies = dayz_spawnZombies - 1;
|
dayz_spawnZombies = dayz_spawnZombies - 1;
|
||||||
};
|
};
|
||||||
@@ -83,6 +82,7 @@ if (_rnd > 0.3) then {
|
|||||||
_array = []+ getArray (configFile >> "cfgLoot" >> getText(_lootType));
|
_array = []+ getArray (configFile >> "cfgLoot" >> getText(_lootType));
|
||||||
if (count _array > 0) then {
|
if (count _array > 0) then {
|
||||||
_loot = _array call BIS_fnc_selectRandomWeighted;
|
_loot = _array call BIS_fnc_selectRandomWeighted;
|
||||||
|
//diag_log ("Zed Loot: " +(_loot));
|
||||||
if(!isNil "_array") then {
|
if(!isNil "_array") then {
|
||||||
_agent addMagazine _loot;
|
_agent addMagazine _loot;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class CfgMods
|
|||||||
hidePicture = 0;
|
hidePicture = 0;
|
||||||
hideName = 0;
|
hideName = 0;
|
||||||
action = "http://www.dayzmod.com";
|
action = "http://www.dayzmod.com";
|
||||||
version = "1.7.5.M1D9";
|
version = "1.7.5.M1D15";
|
||||||
hiveVersion = 0.96; //0.93
|
hiveVersion = 0.96; //0.93
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -94,9 +94,11 @@ class RscStructuredTextGUI: RscStructuredText
|
|||||||
//#include "CfgWorlds.hpp"
|
//#include "CfgWorlds.hpp"
|
||||||
#include "cfgMoves.hpp"
|
#include "cfgMoves.hpp"
|
||||||
#include "rscTitles.hpp"
|
#include "rscTitles.hpp"
|
||||||
#include "cfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
//#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
|
#include "CfgMagazines.hpp"
|
||||||
#include "cfgLoot.hpp"
|
#include "cfgLoot.hpp"
|
||||||
|
#include "CfgMarkers.hpp"
|
||||||
|
|
||||||
class CfgSurvival {
|
class CfgSurvival {
|
||||||
class Inventory {
|
class Inventory {
|
||||||
@@ -110,10 +112,12 @@ class CfgSurvival {
|
|||||||
};
|
};
|
||||||
class Meat {
|
class Meat {
|
||||||
class Default {
|
class Default {
|
||||||
yield = 1;
|
yield = 2;
|
||||||
|
rawfoodtype = "FoodSteakRaw";
|
||||||
};
|
};
|
||||||
class Cow: Default {
|
class Cow: Default {
|
||||||
yield = 6;
|
yield = 8;
|
||||||
|
rawfoodtype = "FoodSteakRaw";
|
||||||
};
|
};
|
||||||
class Cow01: Cow{};
|
class Cow01: Cow{};
|
||||||
class Cow02: Cow{};
|
class Cow02: Cow{};
|
||||||
@@ -121,12 +125,27 @@ class CfgSurvival {
|
|||||||
class Cow04: Cow{};
|
class Cow04: Cow{};
|
||||||
class Goat: Default {
|
class Goat: Default {
|
||||||
yield = 4;
|
yield = 4;
|
||||||
|
rawfoodtype = "FoodSteakRaw";
|
||||||
};
|
};
|
||||||
class Sheep: Default {
|
class Sheep: Default {
|
||||||
yield = 3;
|
yield = 4;
|
||||||
|
rawfoodtype = "FoodmuttonRaw";
|
||||||
};
|
};
|
||||||
class WildBoar: Default {
|
class WildBoar: Default {
|
||||||
yield = 2;
|
yield = 4;
|
||||||
|
rawfoodtype = "FoodbaconRaw";
|
||||||
|
};
|
||||||
|
class Hen: Default {
|
||||||
|
yield = 4;
|
||||||
|
rawfoodtype = "FoodchickenRaw";
|
||||||
|
};
|
||||||
|
class Cock: Default {
|
||||||
|
yield = 4;
|
||||||
|
rawfoodtype = "FoodchickenRaw";
|
||||||
|
};
|
||||||
|
class Rabbit: Default {
|
||||||
|
yield = 4;
|
||||||
|
rawfoodtype = "FoodrabbitRaw";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -284,8 +284,18 @@ if (!isDedicated) then {
|
|||||||
dayz_spaceInterrupt = {
|
dayz_spaceInterrupt = {
|
||||||
private ["_dikCode", "_handled"];
|
private ["_dikCode", "_handled"];
|
||||||
_dikCode = _this select 1;
|
_dikCode = _this select 1;
|
||||||
_altState = _this select 4;
|
|
||||||
_handled = false;
|
_handled = false;
|
||||||
|
if (_dikCode in (actionKeys "GetOver")) then {
|
||||||
|
if (animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then {
|
||||||
|
null = [] spawn {
|
||||||
|
//Needed for sync with others
|
||||||
|
[nil, player, rSWITCHMOVE,"ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;
|
||||||
|
sleep 0.3;
|
||||||
|
player setVelocity [(velocity player select 0) + 1.5 * sin direction player, (velocity player select 1) + 1.5 * cos direction player, (velocity player select 2) + 4];
|
||||||
|
};
|
||||||
|
_handled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
//if (_dikCode == 57) then {_handled = true}; // space
|
//if (_dikCode == 57) then {_handled = true}; // space
|
||||||
//if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
|
//if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
|
||||||
if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
|
if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
|
||||||
@@ -384,6 +394,18 @@ if (!isDedicated) then {
|
|||||||
_vdir
|
_vdir
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fnc_onKeyDown =
|
||||||
|
{
|
||||||
|
private["_key"];
|
||||||
|
_key = _this select 1;
|
||||||
|
if (_key == 70) then //SCROLL LOCK
|
||||||
|
{
|
||||||
|
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
|
||||||
|
_shift = nil;
|
||||||
|
};
|
||||||
|
_return
|
||||||
|
};
|
||||||
|
|
||||||
dayz_lowHumanity = {
|
dayz_lowHumanity = {
|
||||||
private["_unit","_humanity","_delay"];
|
private["_unit","_humanity","_delay"];
|
||||||
_unit = _this;
|
_unit = _this;
|
||||||
@@ -417,21 +439,10 @@ if (!isDedicated) then {
|
|||||||
dayz_originalPlayer = player;
|
dayz_originalPlayer = player;
|
||||||
};
|
};
|
||||||
|
|
||||||
BIS_fnc_selectRandom = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selectRandom.sqf"; //Checks which actions for nearby casualty
|
|
||||||
|
|
||||||
//Server Only
|
|
||||||
if (isServer) then {
|
|
||||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\init\server_functions.sqf";
|
|
||||||
} else {
|
|
||||||
eh_localCleanup = {};
|
|
||||||
};
|
|
||||||
|
|
||||||
progressLoadingScreen 0.8;
|
progressLoadingScreen 0.8;
|
||||||
|
|
||||||
//Both
|
//Both
|
||||||
//Start Dynamic Weather
|
BIS_fnc_selectRandom = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_selectRandom.sqf"; //Checks which actions for nearby casualty
|
||||||
execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";
|
|
||||||
|
|
||||||
fnc_buildWeightedArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildWeightedArray.sqf"; //Checks which actions for nearby casualty
|
fnc_buildWeightedArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildWeightedArray.sqf"; //Checks which actions for nearby casualty
|
||||||
fnc_usec_damageVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerVehicle.sqf"; //Event handler run on damage
|
fnc_usec_damageVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerVehicle.sqf"; //Event handler run on damage
|
||||||
zombie_initialize = compile preprocessFileLineNumbers "\z\addons\dayz_code\init\zombie_init.sqf";
|
zombie_initialize = compile preprocessFileLineNumbers "\z\addons\dayz_code\init\zombie_init.sqf";
|
||||||
@@ -452,10 +463,8 @@ if (isServer) then {
|
|||||||
fnc_isInsideBuilding = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_isInsideBuilding.sqf"; //_isInside = [_unit,_building] call fnc_isInsideBuilding;
|
fnc_isInsideBuilding = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_isInsideBuilding.sqf"; //_isInside = [_unit,_building] call fnc_isInsideBuilding;
|
||||||
dayz_zombieSpeak = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_speak.sqf"; //Used to generate random speech for a unit
|
dayz_zombieSpeak = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_speak.sqf"; //Used to generate random speech for a unit
|
||||||
vehicle_getHitpoints = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getHitpoints.sqf";
|
vehicle_getHitpoints = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_getHitpoints.sqf";
|
||||||
local_gutObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObject.sqf"; //Generated on the server (or local to unit) when gutting an object
|
|
||||||
local_gutObjectZ = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObjectZ.sqf"; //Generated on the server (or local to unit) when gutting an object
|
|
||||||
local_zombieDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerZ.sqf"; //Generated by the client who created a zombie to track damage
|
local_zombieDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerZ.sqf"; //Generated by the client who created a zombie to track damage
|
||||||
local_sefFuel = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_setFuel.sqf"; //Generated when someone refuels a vehicle
|
local_setFuel = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_setFuel.sqf"; //Generated when someone refuels a vehicle
|
||||||
local_eventKill = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_eventKill.sqf"; //Generated when something is killed
|
local_eventKill = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_eventKill.sqf"; //Generated when something is killed
|
||||||
//player_weaponCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_weaponCheck.sqf"; //Run by the player or server to monitor whether they have picked up a new weapon
|
//player_weaponCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_weaponCheck.sqf"; //Run by the player or server to monitor whether they have picked up a new weapon
|
||||||
curTimeStr = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_curTimeStr.sqf";
|
curTimeStr = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_curTimeStr.sqf";
|
||||||
@@ -500,4 +509,15 @@ if (isServer) then {
|
|||||||
_medical
|
_medical
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//Server Only
|
||||||
|
if (isServer) then {
|
||||||
|
call compile preprocessFileLineNumbers "\z\addons\dayz_server\init\server_functions.sqf";
|
||||||
|
} else {
|
||||||
|
eh_localCleanup = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//Start Dynamic Weather
|
||||||
|
execVM "\z\addons\dayz_code\external\DynamicWeatherEffects.sqf";
|
||||||
initialized = true;
|
initialized = true;
|
||||||
@@ -1,46 +1,82 @@
|
|||||||
"dayzSetFuel" addPublicVariableEventHandler {(_this select 1) call local_sefFuel};
|
rpcCodeVarName = { format["%1_code",_this] };
|
||||||
|
rpcDirectCall = { call compile format["[%1,%2] call %3;",str(_this),_this,_this call rpcCodeVarName]; };
|
||||||
|
|
||||||
if (isServer) then {
|
//run on all clients
|
||||||
"dayzDeath" addPublicVariableEventHandler {(_this select 1) call server_playerDied};
|
broadcastRpcCallAll = {
|
||||||
"dayzDiscoAdd" addPublicVariableEventHandler {dayz_disco set [count dayz_disco,(_this select 1)];};
|
private["_name","_val"];
|
||||||
"dayzDiscoRem" addPublicVariableEventHandler {dayz_disco = dayz_disco - [(_this select 1)];};
|
_name = _this select 0;
|
||||||
"dayzPlayerSave" addPublicVariableEventHandler {(_this select 1) call server_playerSync;};
|
_val = _this select 1;
|
||||||
"dayzPublishObj" addPublicVariableEventHandler {(_this select 1) call server_publishObj};
|
call compile format["%1 = _val;",_name]; //set the value locally
|
||||||
"dayzUpdateVehicle" addPublicVariableEventHandler {(_this select 1) call server_updateObject};
|
_name call rpcDirectCall; //call on this client
|
||||||
"dayzDeleteObj" addPublicVariableEventHandler {(_this select 1) call local_deleteObj};
|
publicVariable _name; //call on other clients
|
||||||
"dayzPublishVeh" addPublicVariableEventHandler {(_this select 1) call server_publishVeh}; // for vehicle traders
|
|
||||||
"dayzTradeObject" addPublicVariableEventHandler {(_this select 1) call server_tradeObj}; // for vehicle traders
|
|
||||||
"dayzTraderMenu" addPublicVariableEventHandler {(_this select 1) call server_traders}; // for all traders
|
|
||||||
"dayzLogin" addPublicVariableEventHandler {(_this select 1) call server_playerLogin};
|
|
||||||
"dayzLogin2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
|
|
||||||
"dayzPlayerMorph" addPublicVariableEventHandler {(_this select 1) call server_playerMorph};
|
|
||||||
"dayzLoginRecord" addPublicVariableEventHandler {(_this select 1) call dayz_recordLogin};
|
|
||||||
"dayzCharDisco" addPublicVariableEventHandler {(_this select 1) call server_characterSync};
|
|
||||||
"dayzSetFix" addPublicVariableEventHandler {(_this select 1) call object_setFixServer};
|
|
||||||
"dayzGutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject};
|
|
||||||
|
|
||||||
"usecMorphine" addPublicVariableEventHandler {
|
|
||||||
(_this select 1) select 0 setVariable["hit_legs",0];
|
|
||||||
(_this select 1) select 0 setVariable["hit_hands",0];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!isDedicated) then {
|
//run on client which has the object ownership
|
||||||
"norrnRaLW" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\load_wounded.sqf"};
|
broadcastRpcCallIfLocal = {
|
||||||
"norrnRLact" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf"};
|
private["_name","_val","_reqObj"];
|
||||||
"usecMorphine" addPublicVariableEventHandler {(_this select 1) call player_medMorphine};
|
_name = _this select 0;
|
||||||
"usecBleed" addPublicVariableEventHandler {_id = (_this select 1) spawn fnc_usec_damageBleed};
|
_val = _this select 1;
|
||||||
"usecBandage" addPublicVariableEventHandler {(_this select 1) call player_medBandage};
|
_reqObj = _this select 2;
|
||||||
"usecEpi" addPublicVariableEventHandler {(_this select 1) call player_medEpi};
|
|
||||||
"usecTransfuse" addPublicVariableEventHandler {(_this select 1) call player_medTransfuse};
|
|
||||||
"usecPainK" addPublicVariableEventHandler {(_this select 1) call player_medPainkiller};
|
|
||||||
"dayzHideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
|
|
||||||
"dayzHumanity" addPublicVariableEventHandler {(_this select 1) spawn player_humanityChange};
|
|
||||||
"dayzHitV" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageVehicle};
|
|
||||||
|
|
||||||
"dayzSetDate" addPublicVariableEventHandler {setDate (_this select 1)};
|
call compile format["%1 = _val;",_name]; //set the value locally
|
||||||
"dayzFlies" addPublicVariableEventHandler {(_this select 1) call spawn_flies};
|
if (local _reqObj) then {
|
||||||
"dayzRoadFlare" addPublicVariableEventHandler {(_this select 1) spawn object_roadFlare};
|
_name call rpcDirectCall; //call on this client
|
||||||
"norrnRaDrag" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"};
|
} else {
|
||||||
"dayzFire" addPublicVariableEventHandler {nul=(_this select 1) spawn BIS_Effects_Burn};
|
publicVariable _name; //call on other clients
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//only run on server
|
||||||
|
callRpcProcedure = {
|
||||||
|
private["_name","_val"];
|
||||||
|
_name = _this select 0;
|
||||||
|
_val = _this select 1;
|
||||||
|
call compile format["%1 = _val;",_name]; //set the value locally
|
||||||
|
if (isServer) then {
|
||||||
|
_name call rpcDirectCall; //call here since we are the server
|
||||||
|
} else {
|
||||||
|
publicVariableServer _name; //call on the sever
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
//register client->client rpc
|
||||||
|
registerBroadcastRpc = {
|
||||||
|
private["_name","_code"];
|
||||||
|
_name = _this select 0;
|
||||||
|
_code = _this select 1;
|
||||||
|
|
||||||
|
call compile format["%1 = _code;",_name call rpcCodeVarName]; //set the global var containing the EH code
|
||||||
|
_name addPublicVariableEventHandler _code;
|
||||||
|
};
|
||||||
|
|
||||||
|
//both
|
||||||
|
["dayzSetFuel", { (_this select 1) call local_setFuel; } ] call registerBroadcastRpc;
|
||||||
|
["dayzSetFix", { (_this select 1) call object_setFixServer; } ] call registerBroadcastRpc;
|
||||||
|
["dayzSetDate", { setDate (_this select 1); } ] call registerBroadcastRpc;
|
||||||
|
//EHs that setVariable "medForceUpdate" need to run on the server too
|
||||||
|
["usecMorphine", { (_this select 1) call player_medMorphine; } ] call registerBroadcastRpc;
|
||||||
|
["usecBandage", { (_this select 1) call player_medBandage; } ] call registerBroadcastRpc;
|
||||||
|
["usecEpi", { (_this select 1) call player_medEpi; } ] call registerBroadcastRpc;
|
||||||
|
["usecTransfuse", { (_this select 1) call player_medTransfuse; } ] call registerBroadcastRpc;
|
||||||
|
["usecPainK", { (_this select 1) call player_medPainkiller; } ] call registerBroadcastRpc;
|
||||||
|
//BIS_Effects_Burn is empty on the server anyway, but this EH is called
|
||||||
|
["dayzFire", { (_this select 1) spawn BIS_Effects_Burn; } ] call registerBroadcastRpc;
|
||||||
|
|
||||||
|
//server only
|
||||||
|
if (isServer) then {
|
||||||
|
call compile preprocessFileLineNumbers "\z\addons\dayz_server\init\publicEH_server.sqf";
|
||||||
|
};
|
||||||
|
|
||||||
|
//clients only
|
||||||
|
if (!isDedicated) then {
|
||||||
|
["norrnRaLW", { [_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\load_wounded.sqf"; }] call registerBroadcastRpc;
|
||||||
|
["norrnRLact", { [_this select 1] execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf"; } ] call registerBroadcastRpc;
|
||||||
|
["usecBleed", { (_this select 1) spawn fnc_usec_damageBleed; } ] call registerBroadcastRpc;
|
||||||
|
["dayzHideBody", { hideBody (_this select 1); } ] call registerBroadcastRpc;
|
||||||
|
["dayzHumanity", { (_this select 1) spawn player_humanityChange; } ] call registerBroadcastRpc;
|
||||||
|
["dayzHitV", { (_this select 1) call fnc_usec_damageVehicle; } ] call registerBroadcastRpc;
|
||||||
|
|
||||||
|
["dayzFlies", { (_this select 1) call spawn_flies; } ] call registerBroadcastRpc;
|
||||||
|
["dayzRoadFlare", { (_this select 1) spawn object_roadFlare; } ] call registerBroadcastRpc;
|
||||||
|
["norrnRaDrag", { [_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"; } ] call registerBroadcastRpc;
|
||||||
};
|
};
|
||||||
@@ -51,9 +51,6 @@ SleepWater = 1440; //minutes (24 hours)
|
|||||||
SleepTemperatur = 90 / 100; //Firs Value = Minutes untill Player reaches the coldest Point at night (without other effects! night factor expected to be -1) //TeeChange
|
SleepTemperatur = 90 / 100; //Firs Value = Minutes untill Player reaches the coldest Point at night (without other effects! night factor expected to be -1) //TeeChange
|
||||||
|
|
||||||
//Server Variables
|
//Server Variables
|
||||||
dayZ_hivePipe1 = "\\.\pipe\dayz"; //The named pipe
|
|
||||||
dayZ_hivePipeAuth = "\\.\pipe\dayzAuth"; //The named pipe
|
|
||||||
hiveInUse = false;
|
|
||||||
allowConnection = false;
|
allowConnection = false;
|
||||||
isSinglePlayer = false;
|
isSinglePlayer = false;
|
||||||
dayz_serverObjectMonitor = [];
|
dayz_serverObjectMonitor = [];
|
||||||
@@ -93,6 +90,7 @@ dayz_resetSelfActions = {
|
|||||||
s_player_deleteBuild = -1;
|
s_player_deleteBuild = -1;
|
||||||
s_player_forceSave = -1;
|
s_player_forceSave = -1;
|
||||||
s_player_flipveh = -1;
|
s_player_flipveh = -1;
|
||||||
|
s_player_stats = -1;
|
||||||
s_player_sleep = -1;
|
s_player_sleep = -1;
|
||||||
s_player_movedog = -1;
|
s_player_movedog = -1;
|
||||||
s_player_speeddog = -1;
|
s_player_speeddog = -1;
|
||||||
|
|||||||
@@ -34,18 +34,14 @@ while {r_doLoop} do {
|
|||||||
r_doLoop = false;
|
r_doLoop = false;
|
||||||
|
|
||||||
if (_finished) then {
|
if (_finished) then {
|
||||||
|
["usecBandage",[_unit,player]] call broadcastRpcCallAll;
|
||||||
|
|
||||||
usecBandage = [_unit,player];
|
|
||||||
publicVariable "usecBandage";
|
|
||||||
|
|
||||||
if (_unit == player) then {
|
if (_unit == player) then {
|
||||||
//Self Healing
|
//Self Healing
|
||||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
|
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
|
||||||
dayz_sourceBleeding = objNull;
|
dayz_sourceBleeding = objNull;
|
||||||
} else {
|
} else {
|
||||||
dayzHumanity = [player,20];
|
["dayzHumanity",[player,20]] call dayzHumanity_code;
|
||||||
_id = dayzHumanity spawn player_humanityChange;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
{_unit setVariable[_x,false,true];} forEach USEC_woundHit;
|
{_unit setVariable[_x,false,true];} forEach USEC_woundHit;
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ sleep 2;
|
|||||||
|
|
||||||
//unconscious unit assumes dragging posture
|
//unconscious unit assumes dragging posture
|
||||||
//public EH
|
//public EH
|
||||||
norrnRaDrag = _dragee;
|
["norrnRaDrag",_dragee] call broadcastRpcCallAll;
|
||||||
publicVariable "norrnRaDrag";
|
|
||||||
_dragee switchmove "ainjppnemstpsnonwrfldb_still";
|
|
||||||
_dragee attachto [_unit,[0.1, 1.01, 0]];
|
_dragee attachto [_unit,[0.1, 1.01, 0]];
|
||||||
sleep 0.02;
|
sleep 0.02;
|
||||||
|
|
||||||
|
|||||||
@@ -12,9 +12,7 @@ if (!_isDead) then {
|
|||||||
_unit setVariable ["NORRN_unconscious", false, true];
|
_unit setVariable ["NORRN_unconscious", false, true];
|
||||||
_unit setVariable ["USEC_isCardiac",false,true];
|
_unit setVariable ["USEC_isCardiac",false,true];
|
||||||
sleep 5;
|
sleep 5;
|
||||||
usecEpi = [_unit,player,"ItemEpinephrine"];
|
["usecEpi",[_unit,player,"ItemEpinephrine"]] call broadcastRpcCallAll;
|
||||||
publicVariable "usecEpi";
|
|
||||||
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
r_action = false;
|
r_action = false;
|
||||||
@@ -20,9 +20,7 @@ if ((_vcl emptyPositions "cargo") > 0) then
|
|||||||
_dragger switchMove "";
|
_dragger switchMove "";
|
||||||
_wounded setVariable ["NORRN_LoadVcl", _vcl, true];
|
_wounded setVariable ["NORRN_LoadVcl", _vcl, true];
|
||||||
sleep 1;
|
sleep 1;
|
||||||
[_wounded] execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf";
|
["norrnRLact",_wounded] call broadcastRpcCallAll;
|
||||||
norrnRLact = _wounded;
|
|
||||||
publicVariable "norrnRLact";
|
|
||||||
player removeAction NORRN_dropAction;
|
player removeAction NORRN_dropAction;
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,7 @@ _wounded setVariable ["NORRN_unit_dragged", true, true];
|
|||||||
_wounded assignAsCargo _vcl;
|
_wounded assignAsCargo _vcl;
|
||||||
_wounded moveInCargo _vcl;
|
_wounded moveInCargo _vcl;
|
||||||
sleep 1;
|
sleep 1;
|
||||||
norrnRALW = _wounded;
|
["norrnRALW",_wounded] call broadcastRpcCallAll;
|
||||||
publicVariable "norrnRALW";
|
|
||||||
_wounded switchMove "kia_hmmwv_driver";
|
|
||||||
|
|
||||||
if (local _wounded) then
|
if (local _wounded) then
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ _wounded setVariable ["NORRN_unit_dragged", true, true];
|
|||||||
_wounded assignAsCargo _vcl;
|
_wounded assignAsCargo _vcl;
|
||||||
_wounded moveInCargo _vcl;
|
_wounded moveInCargo _vcl;
|
||||||
sleep 1;
|
sleep 1;
|
||||||
norrnRALW = _wounded;
|
["norrnRALW",_wounded] call broadcastRpcCallAll;
|
||||||
publicVariable "norrnRALW";
|
|
||||||
_wounded switchMove "kia_hmmwv_driver";
|
|
||||||
|
|
||||||
if (local _wounded) then
|
if (local _wounded) then
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,14 +38,12 @@ if (_finished) then {
|
|||||||
//Self Healing
|
//Self Healing
|
||||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
|
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
|
||||||
} else {
|
} else {
|
||||||
dayzHumanity = [player,50];
|
["dayzHumanity",[player,50]] call dayzHumanity_code;
|
||||||
_id = dayzHumanity spawn player_humanityChange;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
player removeMagazine "ItemMorphine";
|
player removeMagazine "ItemMorphine";
|
||||||
|
|
||||||
usecMorphine = [_unit,player];
|
["usecMorphine",[_unit,player]] call broadcastRpcCallAll;
|
||||||
publicVariable "usecMorphine";
|
|
||||||
} else {
|
} else {
|
||||||
r_interrupt = false;
|
r_interrupt = false;
|
||||||
[objNull, player, rSwitchMove,""] call RE;
|
[objNull, player, rSwitchMove,""] call RE;
|
||||||
|
|||||||
@@ -15,12 +15,11 @@ if (_unit == player) then {
|
|||||||
//Self Healing
|
//Self Healing
|
||||||
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
|
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
|
||||||
} else {
|
} else {
|
||||||
dayzHumanity = [player,20];
|
["dayzHumanity",[player,20]] call dayzHumanity_code;
|
||||||
_id = dayzHumanity spawn player_humanityChange;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
player removeMagazine "ItemPainkiller";
|
player removeMagazine "ItemPainkiller";
|
||||||
|
|
||||||
sleep 1;
|
sleep 1;
|
||||||
usecPainK = [_unit,player];
|
//clear the healed player's vision
|
||||||
publicVariable "usecPainK";
|
["usecPainK",[_unit,player]] call broadcastRpcCallAll;
|
||||||
|
|||||||
@@ -9,14 +9,16 @@ if (local _unit) then {_unit setCaptive false};
|
|||||||
|
|
||||||
if (!_isDead) then {
|
if (!_isDead) then {
|
||||||
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
|
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
|
||||||
_unit setVariable ["NORRN_unconscious", false, true];
|
//no need to public broadcast the variables since this runs on every peer
|
||||||
_unit setVariable ["USEC_isCardiac",false,true];
|
_unit setVariable ["NORRN_unconscious", false, false];
|
||||||
|
_unit setVariable ["USEC_isCardiac",false, false];
|
||||||
if (_unit == player) then {
|
if (_unit == player) then {
|
||||||
r_player_unconscious = false;
|
r_player_unconscious = false;
|
||||||
disableUserInput false;
|
disableUserInput false;
|
||||||
r_player_cardiac = false;
|
r_player_cardiac = false;
|
||||||
r_player_handler1 = false;
|
r_player_handler1 = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
_unit setVariable["medForceUpdate",true];
|
_unit setVariable["medForceUpdate",true];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ if (_unit == player) then {
|
|||||||
|
|
||||||
_id = false spawn dayz_disableRespawn;
|
_id = false spawn dayz_disableRespawn;
|
||||||
};
|
};
|
||||||
_unit setVariable ["hit_legs",0];
|
_unit setVariable ["hit_legs",0,false];
|
||||||
_unit setVariable ["hit_hands",0];
|
_unit setVariable ["hit_hands",0,false];
|
||||||
|
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
_unit setVariable["medForceUpdate",true];
|
_unit setVariable["medForceUpdate",true];
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ _array = _this; //_this select 0;
|
|||||||
_unit = _array select 0;
|
_unit = _array select 0;
|
||||||
_medic = _array select 1;
|
_medic = _array select 1;
|
||||||
|
|
||||||
|
_rndInfection = (random 15);
|
||||||
|
_TransfusionInfection = (_rndInfection < 1);
|
||||||
|
|
||||||
if (_unit == player) then {
|
if (_unit == player) then {
|
||||||
r_player_blood = r_player_bloodTotal;
|
r_player_blood = r_player_bloodTotal;
|
||||||
r_player_lowblood = false;
|
r_player_lowblood = false;
|
||||||
@@ -12,6 +15,11 @@ if (_unit == player) then {
|
|||||||
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
|
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
|
||||||
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;
|
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1], [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;
|
||||||
|
|
||||||
|
if (_TransfusionInfection) then {
|
||||||
|
r_player_infected = true;
|
||||||
|
player setVariable["USEC_infected",true];
|
||||||
|
};
|
||||||
|
|
||||||
//Ensure Control is visible
|
//Ensure Control is visible
|
||||||
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
||||||
_control = _display displayCtrl 1300;
|
_control = _display displayCtrl 1300;
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ fnc_usec_damageBleed = {
|
|||||||
/***********************************************************
|
/***********************************************************
|
||||||
PROCESS DAMAGE TO A UNIT
|
PROCESS DAMAGE TO A UNIT
|
||||||
- Function
|
- Function
|
||||||
- [_unit, _wound] call fnc_usec_damageBleed;
|
- [_unit, _wound, _injury] call fnc_usec_damageBleed;
|
||||||
************************************************************/
|
************************************************************/
|
||||||
private["_unit","_wound","_injury","_modelPos","_point","_source"];
|
private["_unit","_wound","_injury","_modelPos","_point","_source"];
|
||||||
_unit = _this select 0;
|
_unit = _this select 0;
|
||||||
@@ -229,6 +229,7 @@ fnc_usec_damageBleed = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
fnc_usec_recoverUncons = {
|
fnc_usec_recoverUncons = {
|
||||||
|
//same actions as in the EH, just timed differently
|
||||||
player setVariable ["NORRN_unconscious", false, true];
|
player setVariable ["NORRN_unconscious", false, true];
|
||||||
player setVariable ["unconsciousTime", 0, true];
|
player setVariable ["unconsciousTime", 0, true];
|
||||||
player setVariable ["USEC_isCardiac",false,true];
|
player setVariable ["USEC_isCardiac",false,true];
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ _unit = (_this select 3) select 0;
|
|||||||
_lowBlood = _unit getVariable ["USEC_lowBlood", false];
|
_lowBlood = _unit getVariable ["USEC_lowBlood", false];
|
||||||
_injured = _unit getVariable ["USEC_injured", false];
|
_injured = _unit getVariable ["USEC_injured", false];
|
||||||
_inPain = _unit getVariable ["USEC_inPain", false];
|
_inPain = _unit getVariable ["USEC_inPain", false];
|
||||||
|
_lastused = _unit getVariable ["LastTransfusion", time];
|
||||||
|
|
||||||
|
if (_lastused - time < 600) exitwith {cutText [format[(localize "str_actions_medical_18"),_text] , "PLAIN DOWN"]};
|
||||||
|
|
||||||
call fnc_usec_medic_removeActions;
|
call fnc_usec_medic_removeActions;
|
||||||
r_action = false;
|
r_action = false;
|
||||||
@@ -35,12 +38,12 @@ while {r_doLoop} do {
|
|||||||
r_doLoop = false;
|
r_doLoop = false;
|
||||||
|
|
||||||
if (_finished) then {
|
if (_finished) then {
|
||||||
|
_unit setVariable["LastTransfusion",time,true];
|
||||||
_unit setVariable["USEC_lowBlood",false,true];
|
_unit setVariable["USEC_lowBlood",false,true];
|
||||||
player removeMagazine "ItemBloodbag";
|
player removeMagazine "ItemBloodbag";
|
||||||
usecTransfuse = [_unit,player];
|
["usecTransfuse",[_unit,player]] call broadcastRpcCallAll;
|
||||||
publicVariable "usecTransfuse";
|
|
||||||
dayzHumanity = [player,250];
|
["dayzHumanity",[player,250]] call dayzHumanity_code;
|
||||||
_id = dayzHumanity spawn player_humanityChange;
|
|
||||||
} else {
|
} else {
|
||||||
r_interrupt = false;
|
r_interrupt = false;
|
||||||
player switchMove "";
|
player switchMove "";
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
|
|||||||
class DAYZ_Version : CA_Version
|
class DAYZ_Version : CA_Version
|
||||||
{
|
{
|
||||||
idc = -1;
|
idc = -1;
|
||||||
text = "DayZ 1.7.5.M1D9";
|
text = "DayZ 1.7.5.M1D15";
|
||||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||||
};
|
};
|
||||||
class CA_TitleMainMenu;
|
class CA_TitleMainMenu;
|
||||||
|
|||||||
@@ -167,6 +167,12 @@
|
|||||||
<German>Du hast eine(n) %1 gebaut</German>
|
<German>Du hast eine(n) %1 gebaut</German>
|
||||||
<Russian>Вы построили %1.</Russian>
|
<Russian>Вы построили %1.</Russian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="str_build_failed_01">
|
||||||
|
<Original>You have failed to build %1.</Original>
|
||||||
|
<English>You have failed to build %1.</English>
|
||||||
|
<German>You have failed to build %1.</German>
|
||||||
|
<Russian>You have failed to build %1.</Russian>
|
||||||
|
</Key>
|
||||||
<Key ID="str_fireplace_02">
|
<Key ID="str_fireplace_02">
|
||||||
<Original>You cannot make a fireplace here. The area must be flat, and free of other objects</Original>
|
<Original>You cannot make a fireplace here. The area must be flat, and free of other objects</Original>
|
||||||
<English>You cannot make a fireplace here. The area must be flat, and free of other objects</English>
|
<English>You cannot make a fireplace here. The area must be flat, and free of other objects</English>
|
||||||
@@ -609,6 +615,12 @@
|
|||||||
<German>%1 löschen</German>
|
<German>%1 löschen</German>
|
||||||
<Russian>Погасить %1</Russian>
|
<Russian>Погасить %1</Russian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="str_actions_medical_18">
|
||||||
|
<Original>You cannot perform another blood transfusion so fast</Original>
|
||||||
|
<English>You cannot perform another blood transfusion so fast</English>
|
||||||
|
<German>You cannot perform another blood transfusion so fast</German>
|
||||||
|
<Russian>You cannot perform another blood transfusion so fast</Russian>
|
||||||
|
</Key>
|
||||||
<Key ID="str_action_studybody">
|
<Key ID="str_action_studybody">
|
||||||
<Original>Study Body</Original>
|
<Original>Study Body</Original>
|
||||||
<English>Study Body</English>
|
<English>Study Body</English>
|
||||||
@@ -639,6 +651,12 @@
|
|||||||
<German>Turn Over %1</German>
|
<German>Turn Over %1</German>
|
||||||
<Russian>Turn Over %1</Russian>
|
<Russian>Turn Over %1</Russian>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="str_actions_stats">
|
||||||
|
<Original>Enable Stats</Original>
|
||||||
|
<English>Enable Stats</English>
|
||||||
|
<German>Enable Stats</German>
|
||||||
|
<Russian>Enable Stats</Russian>
|
||||||
|
</Key>
|
||||||
<Key ID="str_actions_self_sleep">
|
<Key ID="str_actions_self_sleep">
|
||||||
<Original>Sleep</Original>
|
<Original>Sleep</Original>
|
||||||
<English>Sleep</English>
|
<English>Sleep</English>
|
||||||
@@ -724,4 +742,150 @@
|
|||||||
<Russian>Позвать собаку</Russian>
|
<Russian>Позвать собаку</Russian>
|
||||||
</Key>
|
</Key>
|
||||||
</Package>
|
</Package>
|
||||||
|
<Package name="equipment_code">
|
||||||
|
<Key ID="STR_EQUIP_CODE_NAME_3">
|
||||||
|
<Original>Box of Wet Matches</Original>
|
||||||
|
<English>Box of Wet Matches</English>
|
||||||
|
<German>Box of Wet Matches</German>
|
||||||
|
<Russian>Box of Wet Matches</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_EQUIP_CODE_DESC_3">
|
||||||
|
<Original>Box of wet matches.</Original>
|
||||||
|
<English>Box of wet matches.</English>
|
||||||
|
<German>Box of wet matches.</German>
|
||||||
|
<Russian>Box of wet matches.</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_EQUIP_CODE_NAME_41">
|
||||||
|
<Original>Blunt Hatchet</Original>
|
||||||
|
<English>Blunt Hatchet</English>
|
||||||
|
<German>Blunt Hatchet</German>
|
||||||
|
<Russian>Blunt Hatchet</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_EQUIP_CODE_DESC_41">
|
||||||
|
<Original>Your Hatchet appears to be too bunt to be used.</Original>
|
||||||
|
<English>Your Hatchet appears to be too bunt to be used.</English>
|
||||||
|
<German>Your Hatchet appears to be too bunt to be used.</German>
|
||||||
|
<Russian>Your Hatchet appears to be too bunt to be used.</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_EQUIP_CODE_NAME_4">
|
||||||
|
<Original>Blunt Knife</Original>
|
||||||
|
<English>Blunt Knife</English>
|
||||||
|
<German>Blunt Knife</German>
|
||||||
|
<Russian>Blunt Knife</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_EQUIP_CODE_DESC_4">
|
||||||
|
<Original>Your Knife appears to be too bunt.</Original>
|
||||||
|
<English>Your Knife appears to be too bunt.</English>
|
||||||
|
<German>Your Knife appears to be too bunt.</German>
|
||||||
|
<Russian>Your Knife appears to be too bunt.</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOOD_EQIP_CODE_NAME_1">
|
||||||
|
<Original>Mutton Raw</Original>
|
||||||
|
<English>Mutton Raw</English>
|
||||||
|
<German>Mutton Raw</German>
|
||||||
|
<Russian>Mutton Raw</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOOD_EQUIP_CODE_DESC_1">
|
||||||
|
<Original>Goat Meat to be used for sustainment, must be cooked prior to eating.</Original>
|
||||||
|
<English>Goat Meat to be used for sustainment, must be cooked prior to eating.</English>
|
||||||
|
<German>Goat Meat to be used for sustainment, must be cooked prior to eating.</German>
|
||||||
|
<Russian>Goat Meat to be used for sustainment, must be cooked prior to eating.</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOOD_EQIP_CODE_NAME_2">
|
||||||
|
<Original>Raw Chicken Leg</Original>
|
||||||
|
<English>Raw Chicken Leg</English>
|
||||||
|
<German>Raw Chicken Leg</German>
|
||||||
|
<Russian>Raw Chicken Leg</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOOD_EQUIP_CODE_DESC_2">
|
||||||
|
<Original>Chicken Leg to be used for sustainment, must be cooked prior to eating.</Original>
|
||||||
|
<English>Chicken Leg to be used for sustainment, must be cooked prior to eating.</English>
|
||||||
|
<German>Chicken Leg to be used for sustainment, must be cooked prior to eating.</German>
|
||||||
|
<Russian>Chicken Leg to be used for sustainment, must be cooked prior to eating.</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOOD_EQIP_CODE_NAME_3">
|
||||||
|
<Original>Rabbit Raw</Original>
|
||||||
|
<English>Rabbit Raw</English>
|
||||||
|
<German>Rabbit Raw</German>
|
||||||
|
<Russian>Rabbit Raw</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOOD_EQUIP_CODE_DESC_3">
|
||||||
|
<Original>Rabbit to be used for sustainment, must be cooked prior to eating.</Original>
|
||||||
|
<English>Rabbit to be used for sustainment, must be cooked prior to eating.</English>
|
||||||
|
<German>Rabbit to be used for sustainment, must be cooked prior to eating.</German>
|
||||||
|
<Russian>Rabbit to be used for sustainment, must be cooked prior to eating.</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOOD_EQIP_CODE_NAME_4">
|
||||||
|
<Original>Raw Bacon</Original>
|
||||||
|
<English>Raw Bacon</English>
|
||||||
|
<German>Raw Bacon</German>
|
||||||
|
<Russian>Raw Bacon</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOOD_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>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOODCOOKED_EQIP_CODE_NAME_1">
|
||||||
|
<Original>Cooked Mutton</Original>
|
||||||
|
<English>Cooked Mutton</English>
|
||||||
|
<German>Cooked Mutton</German>
|
||||||
|
<Russian>Cooked Mutton</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOODCOOKED_EQUIP_CODE_DESC_1">
|
||||||
|
<Original>Goat Meat to be used for sustainment.</Original>
|
||||||
|
<English>Goat Meat to be used for sustainment.</English>
|
||||||
|
<German>Goat Meat to be used for sustainment.</German>
|
||||||
|
<Russian>Goat Meat to be used for sustainment.</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOODCOOKED_EQIP_CODE_NAME_2">
|
||||||
|
<Original>Chicken Leg</Original>
|
||||||
|
<English>Chicken Leg</English>
|
||||||
|
<German>Chicken Leg</German>
|
||||||
|
<Russian>Chicken Leg</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOODCOOKED_EQUIP_CODE_DESC_2">
|
||||||
|
<Original>Chicken Leg to be used for sustainment.</Original>
|
||||||
|
<English>Chicken Leg to be used for sustainment.</English>
|
||||||
|
<German>Chicken Leg to be used for sustainment.</German>
|
||||||
|
<Russian>Chicken Leg to be used for sustainment.</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOODCOOKED_EQIP_CODE_NAME_3">
|
||||||
|
<Original>Rabbit</Original>
|
||||||
|
<English>Rabbit</English>
|
||||||
|
<German>Rabbit</German>
|
||||||
|
<Russian>Rabbit</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOODCOOKED_EQUIP_CODE_DESC_3">
|
||||||
|
<Original>Rabbit to be used for sustainmen.</Original>
|
||||||
|
<English>Rabbit to be used for sustainment.</English>
|
||||||
|
<German>Rabbit to be used for sustainment.</German>
|
||||||
|
<Russian>Rabbit to be used for sustainment.</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOODCOOKED_EQIP_CODE_NAME_4">
|
||||||
|
<Original>Bacon</Original>
|
||||||
|
<English>Bacon</English>
|
||||||
|
<German>Bacon</German>
|
||||||
|
<Russian>Bacon</Russian>
|
||||||
|
</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>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOODCOOKED_EQIP_CODE_NAME_5">
|
||||||
|
<Original>Angel Cookies</Original>
|
||||||
|
<English>Angel Cookies</English>
|
||||||
|
<German>Angel Cookies</German>
|
||||||
|
<Russian>Angel Cookies</Russian>
|
||||||
|
</Key>
|
||||||
|
<Key ID="STR_FOODCOOKED_EQUIP_CODE_DESC_5">
|
||||||
|
<Original>Angel Cookies to boost your moral up!</Original>
|
||||||
|
<English>Angel Cookies to boost your moral up!</English>
|
||||||
|
<German>Angel Cookies to boost your moral up!</German>
|
||||||
|
<Russian>Angel Cookies to boost your moral up!</Russian>
|
||||||
|
</Key>
|
||||||
|
</Package>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -285,11 +285,9 @@ class FSM
|
|||||||
" _temp = round(player getVariable [""temperature"",100]);" \n
|
" _temp = round(player getVariable [""temperature"",100]);" \n
|
||||||
" _currentState = [_currentWpn,_currentAnim,_temp];" \n
|
" _currentState = [_currentWpn,_currentAnim,_temp];" \n
|
||||||
" " \n
|
" " \n
|
||||||
" //dayzCharDisco = [dayz_characterID,_playerPos,[weapons player,_magazineArray],[typeOf (unitbackpack player),getWeaponCargo (unitbackpack player),getMagazineCargo (unitbackpack player)],_medical,_currentState,_currentModel];" \n
|
" //[""dayzCharDisco"",[dayz_characterID,_playerPos,[weapons player,_magazineArray],[typeOf (unitbackpack player),getWeaponCargo (unitbackpack player),getMagazineCargo (unitbackpack player)],_medical,_currentState,_currentModel]] call callRpcProcedure;" \n
|
||||||
" //diag_log str(dayzCharDisco); " \n
|
" //diag_log str(dayzCharDisco); " \n
|
||||||
"" \n
|
"" \n
|
||||||
" //publicVariableServer ""dayzCharDisco"";" \n
|
|
||||||
" // remove isServer from player space" \n
|
|
||||||
" dayz_lastSave = time;" \n
|
" dayz_lastSave = time;" \n
|
||||||
" dayz_Magazines = [];" \n
|
" dayz_Magazines = [];" \n
|
||||||
"};"/*%FSM</ACTION""">*/;
|
"};"/*%FSM</ACTION""">*/;
|
||||||
@@ -425,12 +423,9 @@ class FSM
|
|||||||
"" \n
|
"" \n
|
||||||
"_msg = [];" \n
|
"_msg = [];" \n
|
||||||
"" \n
|
"" \n
|
||||||
"dayzLogin = [_playerUID,player];" \n
|
"[""dayzLogin"",[_playerUID,player]] call callRpcProcedure;" \n
|
||||||
"dayzPlayerLogin = [];" \n
|
"dayzPlayerLogin = [];" \n
|
||||||
"publicVariableServer ""dayzLogin"";" \n
|
""/*%FSM</STATEINIT""">*/;
|
||||||
"if (isServer) then {" \n
|
|
||||||
" dayzLogin call server_playerLogin;" \n
|
|
||||||
"};"/*%FSM</STATEINIT""">*/;
|
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
class Links
|
class Links
|
||||||
{
|
{
|
||||||
@@ -651,9 +646,7 @@ class FSM
|
|||||||
"};" \n
|
"};" \n
|
||||||
"" \n
|
"" \n
|
||||||
"dayzPlayerLogin2 = [];" \n
|
"dayzPlayerLogin2 = [];" \n
|
||||||
"dayzLogin2 = [_charID,player,_playerUID];" \n
|
"[""dayzLogin2"",[_charID,player,_playerUID]] call callRpcProcedure;" \n
|
||||||
"publicVariableServer ""dayzLogin2"";" \n
|
|
||||||
"// remove isServer from player space" \n
|
|
||||||
"" \n
|
"" \n
|
||||||
"dayz_loadScreenMsg = ""Requesting Character data from server"";" \n
|
"dayz_loadScreenMsg = ""Requesting Character data from server"";" \n
|
||||||
"progressLoadingScreen 0.8;" \n
|
"progressLoadingScreen 0.8;" \n
|
||||||
@@ -1096,15 +1089,9 @@ class FSM
|
|||||||
"" \n
|
"" \n
|
||||||
"dayz_animalCheck = [] spawn player_spawn_1;" \n
|
"dayz_animalCheck = [] spawn player_spawn_1;" \n
|
||||||
"" \n
|
"" \n
|
||||||
"dayz_lootCheck = [] spawn {" \n
|
"dayz_spawnCheck = [] spawn {" \n
|
||||||
" while {true} do {" \n
|
" while {true} do {" \n
|
||||||
" [""Loot""] call player_spawnCheck;" \n
|
" [""both""] call player_spawnCheck;" \n
|
||||||
" sleep 10;" \n
|
|
||||||
" };" \n
|
|
||||||
"};" \n
|
|
||||||
"dayz_zedCheck = [] spawn {" \n
|
|
||||||
" while {true} do {" \n
|
|
||||||
" [""Zeds""] call player_spawnCheck; " \n
|
|
||||||
" sleep 8;" \n
|
" sleep 8;" \n
|
||||||
" };" \n
|
" };" \n
|
||||||
"};" \n
|
"};" \n
|
||||||
@@ -1154,8 +1141,8 @@ class FSM
|
|||||||
init = /*%FSM<STATEINIT""">*/"dayzGearSave = true;" \n
|
init = /*%FSM<STATEINIT""">*/"dayzGearSave = true;" \n
|
||||||
"dayz_myPosition = getPosATL player;" \n
|
"dayz_myPosition = getPosATL player;" \n
|
||||||
"" \n
|
"" \n
|
||||||
"dayzLoginRecord = [_playerUID,_charID,0];" \n
|
"[""dayzLoginRecord"",[_playerUID,_charID,0]] call callRpcProcedure;" \n
|
||||||
"publicVariableServer ""dayzLoginRecord"";"/*%FSM</STATEINIT""">*/;
|
""/*%FSM</STATEINIT""">*/;
|
||||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
class Links
|
class Links
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ while {true} do {
|
|||||||
|
|
||||||
//Has infection?
|
//Has infection?
|
||||||
if (r_player_infected) then {
|
if (r_player_infected) then {
|
||||||
[player,"cough",8,false] call dayz_zombieSpeak;
|
[player,"cough",8,true] call dayz_zombieSpeak;
|
||||||
};
|
};
|
||||||
|
|
||||||
//Record Check
|
//Record Check
|
||||||
@@ -176,8 +176,9 @@ while {true} do {
|
|||||||
|
|
||||||
//If has infection reduce blood
|
//If has infection reduce blood
|
||||||
if (r_player_infected) then {
|
if (r_player_infected) then {
|
||||||
if (r_player_blood > 6000) then {
|
if (r_player_blood > 3000) then {
|
||||||
r_player_blood = r_player_blood - 3;
|
r_player_blood = r_player_blood - 3;
|
||||||
|
player setVariable["USEC_BloodQty",r_player_blood];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -219,8 +220,7 @@ while {true} do {
|
|||||||
if ((time - dayz_damageCounter) > 180) then {
|
if ((time - dayz_damageCounter) > 180) then {
|
||||||
if (!r_player_unconscious) then {
|
if (!r_player_unconscious) then {
|
||||||
dayz_canDisconnect = true;
|
dayz_canDisconnect = true;
|
||||||
dayzDiscoRem = getPlayerUID player;
|
["dayzDiscoRem",getPlayerUID player] call callRpcProcedure;
|
||||||
publicVariableServer "dayzDiscoRem";
|
|
||||||
|
|
||||||
//Ensure Control is hidden
|
//Ensure Control is hidden
|
||||||
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
_display = uiNamespace getVariable 'DAYZ_GUI_display';
|
||||||
@@ -233,11 +233,8 @@ while {true} do {
|
|||||||
//Save Checker
|
//Save Checker
|
||||||
if (dayz_unsaved) then {
|
if (dayz_unsaved) then {
|
||||||
if ((time - dayz_lastSave) > _saveTime) then {
|
if ((time - dayz_lastSave) > _saveTime) then {
|
||||||
dayzPlayerSave = [player,dayz_Magazines,false];
|
["dayzPlayerSave",[player,dayz_Magazines,false]] call callRpcProcedure;
|
||||||
publicVariableServer "dayzPlayerSave";
|
|
||||||
if (isServer) then {
|
|
||||||
dayzPlayerSave call server_playerSync;
|
|
||||||
};
|
|
||||||
dayz_lastSave = time;
|
dayz_lastSave = time;
|
||||||
dayz_Magazines = [];
|
dayz_Magazines = [];
|
||||||
};
|
};
|
||||||
|
|||||||
21
dayz_server/compile/server_deleteObj.sqf
Normal file
21
dayz_server/compile/server_deleteObj.sqf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
[_objectID,_objectUID] call server_deleteObj;
|
||||||
|
*/
|
||||||
|
private["_id","_uid","_key"];
|
||||||
|
_id = _this select 0;
|
||||||
|
_uid = _this select 1;
|
||||||
|
|
||||||
|
if (isServer) then {
|
||||||
|
//remove from database
|
||||||
|
if (parseNumber _id > 0) then {
|
||||||
|
//Send request
|
||||||
|
_key = format["CHILD:304:%1:",_id];
|
||||||
|
_key call server_hiveWrite;
|
||||||
|
diag_log format["DELETE: Deleted by ID: %1",_id];
|
||||||
|
} else {
|
||||||
|
//Send request
|
||||||
|
_key = format["CHILD:310:%1:",_uid];
|
||||||
|
_key call server_hiveWrite;
|
||||||
|
diag_log format["DELETE: Deleted by UID: %1",_uid];
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -1,11 +1,32 @@
|
|||||||
private ["_qty","_item","_meat","_loop","_timer"];
|
private["_item","_qty","_type","_meat","_loop"];
|
||||||
_item = _this select 0;
|
_item = _this select 0;
|
||||||
_qty = _this select 1;
|
_qty = _this select 1;
|
||||||
|
_type = typeOf _item;
|
||||||
_meat = 0;
|
_meat = 0;
|
||||||
_loop = true;
|
_loop = true;
|
||||||
if (local _item) then {
|
if (local _item) then {
|
||||||
for "_x" from 1 to _qty do {
|
for "_x" from 1 to _qty do {
|
||||||
_item addMagazine "FoodSteakRaw";
|
diag_log ("Item Type: " +str(_item));
|
||||||
|
switch (_type) do {
|
||||||
|
case "Cow": {
|
||||||
|
_item addMagazine "FoodSteakRaw";
|
||||||
|
};
|
||||||
|
case "Goat": {
|
||||||
|
_item addMagazine "FoodSteakRaw";
|
||||||
|
};
|
||||||
|
case "Sheep": {
|
||||||
|
_item addMagazine "FoodSteakRaw";
|
||||||
|
};
|
||||||
|
case "WildBoar": {
|
||||||
|
_item addMagazine "FoodboarRaw";
|
||||||
|
};
|
||||||
|
case "hen": {
|
||||||
|
_item addMagazine "FoodSteakRaw";
|
||||||
|
};
|
||||||
|
case "Rabbit": {
|
||||||
|
_item addMagazine "FoodSteakRaw";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
sleep 2;
|
sleep 2;
|
||||||
_timer = time;
|
_timer = time;
|
||||||
@@ -15,9 +36,11 @@ if (local _item) then {
|
|||||||
if ((time - _timer) > 300) then {_loop = false};
|
if ((time - _timer) > 300) then {_loop = false};
|
||||||
sleep 1;
|
sleep 1;
|
||||||
};
|
};
|
||||||
dayzHideBody = _item;
|
["dayzHideBody",_item] call broadcastRpcCallAll;
|
||||||
publicVariable "dayzHideBody";
|
|
||||||
hideBody _item;
|
|
||||||
sleep 10;
|
sleep 10;
|
||||||
deleteVehicle _item;
|
deleteVehicle _item;
|
||||||
|
} else {
|
||||||
|
_ehLoc = "client";
|
||||||
|
if (isServer) then { _ehLoc = "server"; };
|
||||||
|
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
|
||||||
};
|
};
|
||||||
24
dayz_server/compile/server_gutObjectZ.sqf
Normal file
24
dayz_server/compile/server_gutObjectZ.sqf
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
private["_item","_qty","_type","_meat","_loop"];
|
||||||
|
_item = _this select 0;
|
||||||
|
_qty = _this select 1;
|
||||||
|
_type = typeOf _item;
|
||||||
|
_meat = 0;
|
||||||
|
_loop = true;
|
||||||
|
if (local _item) then {
|
||||||
|
_item addMagazine "ItemZombieParts";
|
||||||
|
sleep 2;
|
||||||
|
_timer = time;
|
||||||
|
while {_loop} do {
|
||||||
|
_meat = count magazines _item;
|
||||||
|
if (_meat == 0) then {_loop = false};
|
||||||
|
if ((time - _timer) > 300) then {_loop = false};
|
||||||
|
sleep 1;
|
||||||
|
};
|
||||||
|
["dayzHideBody",_item] call broadcastRpcCallAll;
|
||||||
|
sleep 10;
|
||||||
|
deleteVehicle _item;
|
||||||
|
} else {
|
||||||
|
_ehLoc = "client";
|
||||||
|
if (isServer) then { _ehLoc = "server"; };
|
||||||
|
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
|
||||||
|
};
|
||||||
@@ -12,8 +12,6 @@ if (count _this > 2) then {
|
|||||||
dayz_players = dayz_players - [_this select 2];
|
dayz_players = dayz_players - [_this select 2];
|
||||||
};
|
};
|
||||||
|
|
||||||
//waitUntil{allowConnection};
|
|
||||||
|
|
||||||
//Variables
|
//Variables
|
||||||
_inventory = [];
|
_inventory = [];
|
||||||
_backpack = [];
|
_backpack = [];
|
||||||
@@ -45,7 +43,7 @@ diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
|
|||||||
_doLoop = 0;
|
_doLoop = 0;
|
||||||
while {_doLoop < 5} do {
|
while {_doLoop < 5} do {
|
||||||
_key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
|
_key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
|
||||||
_primary = [_key,false,dayZ_hivePipeAuth] call server_hiveReadWrite;
|
_primary = _key call server_hiveReadWrite;
|
||||||
if (count _primary > 0) then {
|
if (count _primary > 0) then {
|
||||||
if ((_primary select 0) != "ERROR") then {
|
if ((_primary select 0) != "ERROR") then {
|
||||||
_doLoop = 9;
|
_doLoop = 9;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ _state = [];
|
|||||||
_doLoop = 0;
|
_doLoop = 0;
|
||||||
while {_doLoop < 5} do {
|
while {_doLoop < 5} do {
|
||||||
_key = format["CHILD:102:%1:",_characterID];
|
_key = format["CHILD:102:%1:",_characterID];
|
||||||
_primary = [_key,false,dayZ_hivePipeAuth] call server_hiveReadWrite;
|
_primary = _key call server_hiveReadWrite;
|
||||||
if (count _primary > 0) then {
|
if (count _primary > 0) then {
|
||||||
if ((_primary select 0) != "ERROR") then {
|
if ((_primary select 0) != "ERROR") then {
|
||||||
_doLoop = 9;
|
_doLoop = 9;
|
||||||
@@ -116,9 +116,7 @@ if (count _medical > 0) then {
|
|||||||
//Add Wounds
|
//Add Wounds
|
||||||
{
|
{
|
||||||
_playerObj setVariable[_x,true,true];
|
_playerObj setVariable[_x,true,true];
|
||||||
[_playerObj,_x,_hit] spawn fnc_usec_damageBleed;
|
["usecBleed",[_playerObj,_x,_hit]] call broadcastRpcCallAll;
|
||||||
usecBleed = [_playerObj,_x,0];
|
|
||||||
publicVariable "usecBleed";
|
|
||||||
} forEach (_medical select 8);
|
} forEach (_medical select 8);
|
||||||
|
|
||||||
//Add fractures
|
//Add fractures
|
||||||
|
|||||||
@@ -4,10 +4,13 @@ private["_character","_magazines","_force","_characterID","_charPos","_isInVehic
|
|||||||
|
|
||||||
//waituntil {(typeName(_this) == "ARRAY");sleep 0.01;}; //seems to cause often infinite waits (but not for first n players)
|
//waituntil {(typeName(_this) == "ARRAY");sleep 0.01;}; //seems to cause often infinite waits (but not for first n players)
|
||||||
|
|
||||||
if ( typeName(_this) == "OBJECT" ) then {
|
//this only happens when we don't follow the correct parameter format...
|
||||||
|
//(like supplying just the player object instead of the array in player_eat.sqf)
|
||||||
|
//i've fixed this in player_eat so i can comment this part out
|
||||||
|
/*if ( typeName(_this) == "OBJECT" ) then {
|
||||||
_this = [_this,[],true];
|
_this = [_this,[],true];
|
||||||
//diag_log ("DW_DEBUG: #manual fix _this: " + str(_this));
|
//diag_log ("DW_DEBUG: #manual fix _this: " + str(_this));
|
||||||
};
|
};*/
|
||||||
|
|
||||||
//correct
|
//correct
|
||||||
//"UPDATE: [B 1-1-B:1 (THE BEAST) REMOTE,[],true]"
|
//"UPDATE: [B 1-1-B:1 (THE BEAST) REMOTE,[],true]"
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
private["_position","_num","_config","_itemType","_itemChance","_weights","_index","_iArray","_crashModel","_lootTable","_guaranteedLoot","_randomizedLoot","_frequency","_variance","_spawnChance","_spawnMarker","_spawnRadius","_spawnFire","_permanentFire","_crashName"];
|
private["_position","_num","_config","_itemType","_itemChance","_weights","_index","_iArray","_crashModel","_lootTable","_guaranteedLoot","_randomizedLoot","_frequency","_variance","_spawnChance","_spawnMarker","_spawnRadius","_spawnFire","_permanentFire","_crashName"];
|
||||||
|
|
||||||
waitUntil{!isNil "BIS_fnc_selectRandom"};
|
|
||||||
|
|
||||||
//_crashModel = _this select 0;
|
//_crashModel = _this select 0;
|
||||||
//_lootTable = _this select 1;
|
//_lootTable = _this select 1;
|
||||||
_guaranteedLoot = _this select 0;
|
_guaranteedLoot = _this select 0;
|
||||||
@@ -78,9 +76,7 @@ while {true} do {
|
|||||||
_crash setVariable ["ObjectID",1,true];
|
_crash setVariable ["ObjectID",1,true];
|
||||||
|
|
||||||
if (_spawnFire) then {
|
if (_spawnFire) then {
|
||||||
dayzFire = [_crash,2,time,false,_fadeFire];
|
["dayzFire",[_crash,2,time,false,_fadeFire]] call broadcastRpcCallAll;
|
||||||
publicVariable "dayzFire";
|
|
||||||
nul=dayzFire spawn BIS_Effects_Burn;
|
|
||||||
_crash setvariable ["fadeFire",_fadeFire,true];
|
_crash setvariable ["fadeFire",_fadeFire,true];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -92,8 +88,6 @@ while {true} do {
|
|||||||
_weights = dayz_CBLChances select _index;
|
_weights = dayz_CBLChances select _index;
|
||||||
_cntWeights = count _weights;
|
_cntWeights = count _weights;
|
||||||
|
|
||||||
waituntil {!isnil "fnc_buildWeightedArray"};
|
|
||||||
|
|
||||||
for "_x" from 1 to _num do {
|
for "_x" from 1 to _num do {
|
||||||
//create loot
|
//create loot
|
||||||
_index = floor(random _cntWeights);
|
_index = floor(random _cntWeights);
|
||||||
|
|||||||
8
dayz_server/config.cpp
Normal file
8
dayz_server/config.cpp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
class CfgPatches {
|
||||||
|
class dayz_server {
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredVersion = 0.1;
|
||||||
|
requiredAddons[] = {"dayz_code"};
|
||||||
|
};
|
||||||
|
};
|
||||||
27
dayz_server/init/publicEH_server.sqf
Normal file
27
dayz_server/init/publicEH_server.sqf
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
//register client->server rpc
|
||||||
|
registerServerRpc = {
|
||||||
|
if (isServer) then {
|
||||||
|
_this call registerBroadcastRpc;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
["dayzDeath", { (_this select 1) call server_playerDied; } ] call registerServerRpc;
|
||||||
|
["dayzDiscoAdd", { dayz_disco set [count dayz_disco,(_this select 1)]; } ] call registerServerRpc;
|
||||||
|
["dayzDiscoRem", { dayz_disco = dayz_disco - [(_this select 1)]; } ] call registerServerRpc;
|
||||||
|
["dayzPlayerSave", { (_this select 1) call server_playerSync; } ] call registerServerRpc;
|
||||||
|
["dayzPublishObj", { (_this select 1) call server_publishObj; } ] call registerServerRpc;
|
||||||
|
["dayzUpdateVehicle", { (_this select 1) call server_updateObject; } ] call registerServerRpc;
|
||||||
|
["dayzDeleteObj", { (_this select 1) call server_deleteObj; } ] call registerServerRpc;
|
||||||
|
["dayzLogin", { (_this select 1) call server_playerLogin; } ] call registerServerRpc;
|
||||||
|
["dayzLogin2", { (_this select 1) call server_playerSetup; } ] call registerServerRpc;
|
||||||
|
//missing sqf for server_playerMorph
|
||||||
|
//["dayzPlayerMorph", { (_this select 1) call server_playerMorph; } ] call registerServerRpc;
|
||||||
|
["dayzLoginRecord", { (_this select 1) call dayz_recordLogin; } ] call registerServerRpc;
|
||||||
|
["dayzCharDisco", { (_this select 1) call server_characterSync; } ] call registerServerRpc;
|
||||||
|
["dayzGutBody", { (_this select 1) spawn server_gutObject; } ] call registerServerRpc;
|
||||||
|
// DayZ Epoch Custom
|
||||||
|
["dayzGutBodyZ", { (_this select 1) spawn server_gutObjectZ; } ] call registerServerRpc;
|
||||||
|
["dayzPublishVeh", { (_this select 1) spawn server_publishVeh; } ] call registerServerRpc;
|
||||||
|
["dayzTradeObject", { (_this select 1) spawn server_tradeObj; } ] call registerServerRpc;
|
||||||
|
["dayzTraderMenu", { (_this select 1) spawn server_traders; } ] call registerServerRpc;
|
||||||
|
|
||||||
@@ -7,21 +7,18 @@ BIS_MPF_remoteExecutionServer = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
BIS_Effects_Burn = {};
|
BIS_Effects_Burn = {};
|
||||||
object_spawnDamVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_spawnDamVehicle.sqf";
|
|
||||||
server_playerLogin = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf";
|
server_playerLogin = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf";
|
||||||
server_playerSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf";
|
server_playerSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf";
|
||||||
server_onPlayerDisconnect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf";
|
server_onPlayerDisconnect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf";
|
||||||
server_updateObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateObject.sqf";
|
server_updateObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateObject.sqf";
|
||||||
server_playerDied = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDied.sqf";
|
server_playerDied = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDied.sqf";
|
||||||
server_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf";
|
server_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf"; //Creates the object in DB
|
||||||
|
server_deleteObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_deleteObj.sqf"; //Removes the object from the DB
|
||||||
|
server_gutObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_gutObject.sqf"; //Generated on the server when gutting an object
|
||||||
|
server_gutObjectZ = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_gutObjectZ.sqf"; //Generated on the server when gutting an object
|
||||||
server_publishVeh = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle.sqf"; // Custom to add vehicles
|
server_publishVeh = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle.sqf"; // Custom to add vehicles
|
||||||
|
server_tradeObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_tradeObject.sqf";
|
||||||
server_tradeObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_tradeObject.sqf";
|
|
||||||
|
|
||||||
server_traders = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_traders.sqf";
|
server_traders = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_traders.sqf";
|
||||||
local_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_publishObj.sqf"; //Creates the object in DB
|
|
||||||
local_deleteObj = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_deleteObj.sqf"; //Creates the object in DB
|
|
||||||
local_createObj = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_createObj.sqf"; //Creates the object in DB
|
|
||||||
server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";
|
server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";
|
||||||
zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";
|
zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";
|
||||||
server_updateNearbyObjects = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
|
server_updateNearbyObjects = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
|
||||||
@@ -63,7 +60,7 @@ check_publishobject = {
|
|||||||
_allowed = true;
|
_allowed = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
_allowed;
|
_allowed
|
||||||
};
|
};
|
||||||
|
|
||||||
//event Handlers
|
//event Handlers
|
||||||
@@ -95,6 +92,23 @@ eh_localCleanup = {
|
|||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
server_hiveWrite = {
|
||||||
|
private["_data"];
|
||||||
|
//diag_log ("ATTEMPT WRITE: " + _this);
|
||||||
|
_data = "HiveExt" callExtension _this;
|
||||||
|
diag_log ("WRITE: " + _data);
|
||||||
|
};
|
||||||
|
|
||||||
|
server_hiveReadWrite = {
|
||||||
|
private["_key","_resultArray","_data"];
|
||||||
|
_key = _this;
|
||||||
|
//diag_log ("ATTEMPT READ/WRITE: " + _key);
|
||||||
|
_data = "HiveExt" callExtension _key;
|
||||||
|
diag_log ("READ/WRITE: " + _data);
|
||||||
|
_resultArray = call compile format ["%1",_data];
|
||||||
|
_resultArray
|
||||||
|
};
|
||||||
|
|
||||||
server_characterSync = {
|
server_characterSync = {
|
||||||
private ["_characterID","_playerPos","_playerGear","_playerBackp","_medical","_currentState","_currentModel","_key"];
|
private ["_characterID","_playerPos","_playerGear","_playerBackp","_medical","_currentState","_currentModel","_key"];
|
||||||
_characterID = _this select 0;
|
_characterID = _this select 0;
|
||||||
@@ -110,28 +124,9 @@ server_characterSync = {
|
|||||||
_key call server_hiveWrite;
|
_key call server_hiveWrite;
|
||||||
};
|
};
|
||||||
|
|
||||||
//was missing for server
|
|
||||||
fnc_buildWeightedArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildWeightedArray.sqf"; //Checks which actions for nearby casualty
|
|
||||||
|
|
||||||
//onPlayerConnected "[_uid,_name] spawn server_onPlayerConnect;";
|
//onPlayerConnected "[_uid,_name] spawn server_onPlayerConnect;";
|
||||||
onPlayerDisconnected "[_uid,_name] call server_onPlayerDisconnect;";
|
onPlayerDisconnected "[_uid,_name] call server_onPlayerDisconnect;";
|
||||||
|
|
||||||
server_hiveWrite = {
|
|
||||||
private["_data"];
|
|
||||||
//diag_log ("ATTEMPT WRITE: " + _this);
|
|
||||||
_data = "HiveEXT" callExtension _this;
|
|
||||||
diag_log ("WRITE: " + _data);
|
|
||||||
};
|
|
||||||
|
|
||||||
server_hiveReadWrite = {
|
|
||||||
private["_key","_resultArray","_data"];
|
|
||||||
_key = _this select 0;
|
|
||||||
//diag_log ("ATTEMPT READ/WRITE: " + _key);
|
|
||||||
_data = "HiveEXT" callExtension _key;
|
|
||||||
diag_log ("READ/WRITE: " + _data);
|
|
||||||
_resultArray = call compile format ["%1;",_data];
|
|
||||||
_resultArray;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Setup globals allow overwrite from init.sqf
|
// Setup globals allow overwrite from init.sqf
|
||||||
if(isnil "dayz_MapArea") then {
|
if(isnil "dayz_MapArea") then {
|
||||||
@@ -144,38 +139,6 @@ if(isnil "HeliCrashArea") then {
|
|||||||
HeliCrashArea = dayz_MapArea / 2;
|
HeliCrashArea = dayz_MapArea / 2;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
spawn_heliCrash = {
|
|
||||||
private["_position","_veh","_config","_itemType","_itemTypes","_weights","_cntWeights","_index","_num","_i"];
|
|
||||||
|
|
||||||
_position = [getMarkerPos "center",0,HeliCrashArea,10,0,2000,0] call BIS_fnc_findSafePos;
|
|
||||||
_veh = createVehicle ["UH1Wreck_DZ",_position, [], 0, "CAN_COLLIDE"];
|
|
||||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_veh];
|
|
||||||
_veh setVariable ["ObjectID",1,true];
|
|
||||||
dayzFire = [_veh,2,time,false,false];
|
|
||||||
publicVariable "dayzFire";
|
|
||||||
|
|
||||||
_config = configFile >> "CfgBuildingLoot" >> "HeliCrash";
|
|
||||||
_itemTypes = [] + getArray (_config >> "itemType");
|
|
||||||
_index = dayz_CBLCounts find (count _itemTypes);
|
|
||||||
_weights = dayz_CBLChances select _index;
|
|
||||||
_cntWeights = count _weights;
|
|
||||||
_num = round(random 4) + 3;
|
|
||||||
for "_i" from 1 to _num do {
|
|
||||||
//create loot
|
|
||||||
_index = floor(random _cntWeights);
|
|
||||||
_index = _weights select _index;
|
|
||||||
_itemType = _itemTypes select _index;
|
|
||||||
[_itemType select 0, _itemType select 1, _position, 5] call spawn_loot;
|
|
||||||
_nearby = _position nearObjects ["WeaponHolder", 5];
|
|
||||||
{
|
|
||||||
_x setVariable ["permaLoot",true];
|
|
||||||
} forEach _nearBy;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Get all buildings and roads only once
|
// Get all buildings and roads only once
|
||||||
MarkerPosition = getMarkerPos "center";
|
MarkerPosition = getMarkerPos "center";
|
||||||
RoadList = MarkerPosition nearRoads DynamicVehicleArea;
|
RoadList = MarkerPosition nearRoads DynamicVehicleArea;
|
||||||
@@ -462,6 +425,5 @@ dayz_objectUID2 = {
|
|||||||
dayz_recordLogin = {
|
dayz_recordLogin = {
|
||||||
private["_key"];
|
private["_key"];
|
||||||
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
|
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
|
||||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
|
||||||
_key call server_hiveWrite;
|
_key call server_hiveWrite;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -251,16 +251,14 @@ class FSM
|
|||||||
name = "sync_the_time";
|
name = "sync_the_time";
|
||||||
init = /*%FSM<STATEINIT""">*/"//Send request" \n
|
init = /*%FSM<STATEINIT""">*/"//Send request" \n
|
||||||
"_key = ""CHILD:307:"";" \n
|
"_key = ""CHILD:307:"";" \n
|
||||||
"_result = [_key] call server_hiveReadWrite;" \n
|
"_result = _key call server_hiveReadWrite;" \n
|
||||||
"_outcome = _result select 0;" \n
|
"_outcome = _result select 0;" \n
|
||||||
"if(_outcome == ""PASS"") then {" \n
|
"if(_outcome == ""PASS"") then {" \n
|
||||||
" _date = _result select 1; " \n
|
" _date = _result select 1; " \n
|
||||||
" _dateNum = dateToNumber(_date); " \n
|
" _dateNum = dateToNumber(_date); " \n
|
||||||
" _diff = ( _dateNum - dateToNumber (date) )*365*24*60;" \n
|
" _diff = ( _dateNum - dateToNumber (date) )*365*24*60;" \n
|
||||||
" if ( abs(_diff)>5 ) then {" \n
|
" if ( abs(_diff)>5 ) then {" \n
|
||||||
" setDate _date;" \n
|
" [""dayzSetDate"",_date] call broadcastRpcCallAll;" \n
|
||||||
" dayzSetDate = _date;" \n
|
|
||||||
" publicVariable ""dayzSetDate"";" \n
|
|
||||||
" diag_log (""TIME SYNC: Local Time set to "" + str(_date));" \n
|
" diag_log (""TIME SYNC: Local Time set to "" + str(_date));" \n
|
||||||
" };" \n
|
" };" \n
|
||||||
"};" \n
|
"};" \n
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if ((count playableUnits == 0) and !isDedicated) then {
|
|||||||
isSinglePlayer = true;
|
isSinglePlayer = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
waitUntil{initialized};
|
waitUntil{initialized}; //means all the functions are now defined
|
||||||
|
|
||||||
diag_log "HIVE: Starting";
|
diag_log "HIVE: Starting";
|
||||||
|
|
||||||
@@ -17,12 +17,11 @@ diag_log "HIVE: Starting";
|
|||||||
/* STREAM OBJECTS */
|
/* STREAM OBJECTS */
|
||||||
//Send the key
|
//Send the key
|
||||||
_key = format["CHILD:302:%1:",dayZ_instance];
|
_key = format["CHILD:302:%1:",dayZ_instance];
|
||||||
_data = "HiveEXT" callExtension _key;
|
_result = _key call server_hiveReadWrite;
|
||||||
|
|
||||||
diag_log "HIVE: Request sent";
|
diag_log "HIVE: Request sent";
|
||||||
|
|
||||||
//Process result
|
//Process result
|
||||||
_result = call compile format ["%1",_data];
|
|
||||||
_status = _result select 0;
|
_status = _result select 0;
|
||||||
|
|
||||||
_myArray = [];
|
_myArray = [];
|
||||||
@@ -31,8 +30,7 @@ diag_log "HIVE: Starting";
|
|||||||
//Stream Objects
|
//Stream Objects
|
||||||
diag_log ("HIVE: Commence Object Streaming...");
|
diag_log ("HIVE: Commence Object Streaming...");
|
||||||
for "_i" from 1 to _val do {
|
for "_i" from 1 to _val do {
|
||||||
_data = "HiveEXT" callExtension _key;
|
_result = _key call server_hiveReadWrite;
|
||||||
_result = call compile format ["%1",_data];
|
|
||||||
|
|
||||||
_status = _result select 0;
|
_status = _result select 0;
|
||||||
_myArray set [count _myArray,_result];
|
_myArray set [count _myArray,_result];
|
||||||
@@ -184,14 +182,12 @@ diag_log "HIVE: Starting";
|
|||||||
//Set the Time
|
//Set the Time
|
||||||
//Send request
|
//Send request
|
||||||
_key = "CHILD:307:";
|
_key = "CHILD:307:";
|
||||||
_result = [_key] call server_hiveReadWrite;
|
_result = _key call server_hiveReadWrite;
|
||||||
_outcome = _result select 0;
|
_outcome = _result select 0;
|
||||||
if(_outcome == "PASS") then {
|
if(_outcome == "PASS") then {
|
||||||
_date = _result select 1;
|
_date = _result select 1;
|
||||||
if(isDedicated) then {
|
if(isDedicated) then {
|
||||||
setDate _date;
|
["dayzSetDate",_date] call broadcastRpcCallAll;
|
||||||
dayzSetDate = _date;
|
|
||||||
publicVariable "dayzSetDate";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
diag_log ("HIVE: Local Time set to " + str(_date));
|
diag_log ("HIVE: Local Time set to " + str(_date));
|
||||||
@@ -201,7 +197,6 @@ diag_log "HIVE: Starting";
|
|||||||
if (isDedicated) then {
|
if (isDedicated) then {
|
||||||
endLoadingScreen;
|
endLoadingScreen;
|
||||||
};
|
};
|
||||||
hiveInUse = false;
|
|
||||||
|
|
||||||
if (isDedicated) then {
|
if (isDedicated) then {
|
||||||
_id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
|
_id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
|
||||||
@@ -242,7 +237,6 @@ for "_x" from 1 to MaxDynamicDebris do {
|
|||||||
|
|
||||||
allowConnection = true;
|
allowConnection = true;
|
||||||
|
|
||||||
|
|
||||||
// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
|
// [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
|
||||||
nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite;
|
nul = [3, 4, (50 * 60), (15 * 60), 0.75, 'center', 4000, true, false] spawn server_spawnCrashSite;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user