0.981 + 1.7.6.1 CE

+ Increased raise horde distance to 65m.
+ decreased raise horde action timer to 7 seconds.
+ sync with 1.7.6.1 CE
This commit is contained in:
vbawol
2013-02-26 20:05:35 -06:00
parent 52461f4a52
commit 3c9df28ead
319 changed files with 5267 additions and 1695 deletions

View File

@@ -119,6 +119,211 @@ class CfgMagazines {
};
};
class Quiver : CA_Magazine
{
scope = public;
ammo = "WoodenArrow";
count = 6;
descriptionshort = "Small Quiver used with the Crossbow, Max arrows 6.";
displayname = "Quiver";
initSpeed = 150;
model = "\z\addons\dayz_communityassets\models\quiver";
picture = "\z\addons\dayz_communityassets\pictures\equip_quiver_ca.paa";
};
class WoodenArrow : CA_Magazine {
scope = public;
displayName = "Arrow"; //$STR_MAG_NAME_3;
model = "\dayz_weapons\models\bolt_gear";
picture = "\z\addons\dayz_communityassets\pictures\equip_warrow_ca.paa";
ammo = "WoodenArrow";
count = 1;
initSpeed = 150;
descriptionShort = "Arrow made out of wood, used with the Crossbow."; //$STR_MAG_DESC_3;
class ItemActions {
class ReloadMag {
text = "Combine into Quiver";
script = "spawn player_reloadMag;";
use[] = {"WoodenArrow","WoodenArrow","WoodenArrow","WoodenArrow","WoodenArrow","WoodenArrow"};
output[] = {"Quiver"};
};
};
};
class ItemSodaEmpty;//External class reference
class ItemSodaCoke; //External class reference
class ItemSodaCokeEmpty : ItemSodaEmpty{
model = "\dayz_equip\models\soda_coke_e.p3d";
picture = "\dayz_equip\textures\equip_soda_empty_ca.paa";
};
class ItemSodaPepsiEmpty : ItemSodaEmpty{
model = "\dayz_equip\models\soda_pepsi_e.p3d";
picture = "\dayz_equip\textures\equip_soda_empty_ca.paa";
};
class ItemSodaMdewEmpty : ItemSodaEmpty{
model = "\dayz_equip\models\soda_mdew_e.p3d";
picture = "\dayz_equip\textures\equip_soda_empty_ca.paa";
};
class ItemSodaMtngreen : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_0;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_0;
model = "z\addons\dayz_communityassets\models\soda_mtngreen_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_mtngreen_clean_full_ca.paa";
};
class ItemSodaMtngreenEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_mtngreen_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_mtngreen_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
class ItemSodaR4z0r : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_1;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_1;
model = "z\addons\dayz_communityassets\models\soda_r4z0r_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_r4z0r_clean_full_ca.paa";
};
class ItemSodaR4z0rEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_r4z0r_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_r4z0r_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
class ItemSodaClays : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_2;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_2;
model = "z\addons\dayz_communityassets\models\soda_clays_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_clays_clean_full_ca.paa";
};
class ItemSodaClaysEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_clays_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_clays_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
class ItemSodaSmasht : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_3;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_3;
model = "z\addons\dayz_communityassets\models\soda_smasht_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_smasht_clean_full_ca.paa";
};
class ItemSodaSmashtEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_smasht_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_smasht_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
class ItemSodaDrwaste : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_4;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_4;
model = "z\addons\dayz_communityassets\models\soda_drwaste_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_drwaste_clean_full_ca.paa";
};
class ItemSodaDrwasteEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_drwaste_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_drwaste_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
/*
class ItemSodaFranka : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_5;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_5;
model = "z\addons\dayz_communityassets\models\soda_franka_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_franka_clean_full_ca.paa";
};
class ItemSodaFrankaEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_franka_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_franka_clean_empty_ca";
//ammo = "SodaCanMtngreen";
};
*/
class ItemSodaLemonade : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_6;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_6;
model = "z\addons\dayz_communityassets\models\soda_lemonade_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_lemonade_clean_full_ca.paa";
};
class ItemSodaLemonadeEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_lemonade_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_lemonade_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
/*
class ItemSodaLirik : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_7;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_7;
model = "z\addons\dayz_communityassets\models\soda_lirik_clean_full.p3d";
//picture = "\z\addons\dayz_communityassets\pictures\equip_soda_lirik_clean_full_ca.paa";
};
class ItemSodaLirikEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_lirik_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_lirik_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
*/
class ItemSodaLvg : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_8;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_8;
model = "z\addons\dayz_communityassets\models\soda_lvg_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_lvg_clean_full_ca.paa";
};
class ItemSodaLvgEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_lvg_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_lvg_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
class ItemSodaMzly : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_9;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_9;
model = "z\addons\dayz_communityassets\models\soda_mzly_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_mzly_clean_full_ca.paa";
};
class ItemSodaMzlyEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_mzly_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_mzly_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
/*
class ItemSodaPeppsy : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_10;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_10;
model = "z\addons\dayz_communityassets\models\soda_peppsy_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_peppsy_clean_full_ca.paa";
};
class ItemSodaPeppsyEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_peppsy_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_peppsy_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
*/
class ItemSodaRabbit : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_11;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_11;
model = "z\addons\dayz_communityassets\models\soda_rabbit_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_rabbit_clean_full_ca.paa";
};
class ItemSodaRabbitEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_rabbit_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_rabbit_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
/*
class ItemSodaSacrite : ItemSodaCoke {
displayName = $STR_ITEMSODA_FULL_CLEAN_CODE_NAME_12;
descriptionShort = $STR_ITEMSODA_FULL_CLEAN_CODE_DESC_12;
model = "z\addons\dayz_communityassets\models\soda_sacrite_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_sacrite_clean_full_ca.paa";
};
class ItemSodaSacriteEmpty : ItemSodaEmpty{
model = "z\addons\dayz_communityassets\models\soda_sacrite_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_soda_sacrite_clean_empty_ca.paa";
//ammo = "SodaCanMtngreen";
};
*/
class FoodEdible;
class FoodmeatRaw : FoodEdible {
scope = public;
@@ -150,6 +355,8 @@ class CfgMagazines {
class FoodbaconRaw : FoodmeatRaw {
displayName = $STR_FOOD_EQIP_CODE_NAME_4;
model = "z\addons\dayz_communityassets\models\bacon_raw.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_bacon_raw_CA.paa";
descriptionShort = $STR_FOOD_EQUIP_CODE_DESC_4;
bloodRegen = 150;
};
@@ -182,6 +389,8 @@ class CfgMagazines {
class FoodbaconCooked : FoodmeatCooked {
displayName = $STR_FOODCOOKED_EQIP_CODE_NAME_4;
model = "z\addons\dayz_communityassets\models\bacon_fried.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_bacon_fried_CA.paa";
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_4;
bloodRegen = 400;
};
@@ -195,18 +404,351 @@ class CfgMagazines {
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_6;
bloodRegen = 600;
};
class AngelCookies : 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_ca.paa";
model = "z\addons\dayz_communityassets\models\buiscits_box.p3d";
picture = "z\addons\dayz_communityassets\pictures\i_buiscit_ca.paa";
descriptionShort = $STR_FOODCOOKED_EQUIP_CODE_DESC_5;
bloodRegen = 100;
};
class FoodMRE : FoodEdible {
scope = public;
count = 1;
bloodRegen = 800;
displayName = $STR_FOOD_NAME_MRE;
descriptionShort = $STR_FOOD_DESC_MRE;
model = "z\addons\dayz_communityassets\models\mre.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_mre_CA.paa";
};
class FoodPistachio : FoodEdible {
scope = public;
count = 1;
bloodRegen = 100;
displayName = $STR_FOOD_NAME_PISTACHIO;
descriptionShort = $STR_FOOD_DESC_PISTACHIO;
model = "z\addons\dayz_communityassets\models\pistachio.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_pistachios_CA.paa";
};
class FoodNutmix : FoodEdible {
scope = public;
count = 1;
bloodRegen = 100;
displayName = $STR_FOOD_NAME_NUTMIX;
descriptionShort = $STR_FOOD_DESC_NUTMIX;
model = "z\addons\dayz_communityassets\models\nutmix.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_nutmix_CA.paa";
};
class FoodCanGriff : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_GRIFF;
descriptionShort = $STR_FOOD_DESC_CAN_GRIFF;
model = "z\addons\dayz_communityassets\models\can_griff_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_griff_clean_full_ca.paa";
};
class FoodCanBadguy : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_BADGUY;
descriptionShort = $STR_FOOD_DESC_CAN_BADGUY;
model = "z\addons\dayz_communityassets\models\can_badguy_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_badguy_clean_full_ca.paa";
};
class FoodCanBoneboy : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_BONEBOY;
descriptionShort = $STR_FOOD_DESC_CAN_BONEBOY;
model = "z\addons\dayz_communityassets\models\can_boneboy_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_boneboy_clean_full_ca.paa";
};
class FoodCanCorn : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_CORN;
descriptionShort = $STR_FOOD_DESC_CAN_CORN;
model = "z\addons\dayz_communityassets\models\can_corn_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_corn_clean_full_ca.paa";
};
class FoodCanCurgon : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_CURGON;
descriptionShort = $STR_FOOD_DESC_CAN_CURGON;
model = "z\addons\dayz_communityassets\models\can_curgon_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_curgon_clean_full_ca.paa";
};
class FoodCanDemon : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_DEMON;
descriptionShort = $STR_FOOD_DESC_CAN_DEMON;
model = "z\addons\dayz_communityassets\models\can_demon_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_demon_clean_full_ca.paa";
};
class FoodCanFraggleos : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_FRAGGLEOS;
descriptionShort = $STR_FOOD_DESC_CAN_FRAGGLEOS;
model = "z\addons\dayz_communityassets\models\can_fraggleos_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_fraggleos_clean_full_ca.paa";
};
class FoodCanHerpy : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_HERPY;
descriptionShort = $STR_FOOD_DESC_CAN_HERPY;
model = "z\addons\dayz_communityassets\models\can_herpy_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_herpy_clean_full_ca.paa";
};
class FoodCanOrlok : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_ORLOK;
descriptionShort = $STR_FOOD_DESC_CAN_ORLOK;
model = "z\addons\dayz_communityassets\models\can_orlok_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_orlok_clean_full_ca.paa";
};
class FoodCanPowell : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_POWELL;
descriptionShort = $STR_FOOD_DESC_CAN_POWELL;
model = "z\addons\dayz_communityassets\models\can_powell_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_powell_clean_full_ca.paa";
};
class FoodCanTylers : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_TYLERS;
descriptionShort = $STR_FOOD_DESC_CAN_TYLERS;
model = "z\addons\dayz_communityassets\models\can_tylers_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_tylers_clean_full_ca.paa";
};
class FoodCanUnlabeled : FoodEdible {
scope = public;
count = 1;
bloodRegen = 200;
displayName = $STR_FOOD_NAME_CAN_UNLABELED;
descriptionShort = $STR_FOOD_DESC_CAN_UNLABELED;
model = "z\addons\dayz_communityassets\models\can_unlabeled_clean_full.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_unlabeled_clean_full_ca.paa";
};
class TrashTinCan;
class FoodCanGriffEmpty : TrashTinCan {
scope = public;
count = 1;
model = "z\addons\dayz_communityassets\models\can_griff_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_griff_clean_empty_ca.paa";
displayName = $STR_FOOD_NAME_CAN_GRIFF_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_GRIFF_EMPTY;
ammo = "TinCan";
};
class FoodCanBadguyEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_BADGUY_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_BADGUY_EMPTY;
model = "z\addons\dayz_communityassets\models\can_badguy_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_badguy_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanBoneboyEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_BONEBOY_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_BONEBOY_EMPTY;
model = "z\addons\dayz_communityassets\models\can_boneboy_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_boneboy_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanCornEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_CORN_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_CORN_EMPTY;
model = "z\addons\dayz_communityassets\models\can_corn_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_corn_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanCurgonEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_CURGON_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_CURGON_EMPTY;
model = "z\addons\dayz_communityassets\models\can_curgon_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_curgon_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanDemonEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_DEMON_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_DEMON_EMPTY;
model = "z\addons\dayz_communityassets\models\can_demon_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_demon_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanFraggleosEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_FRAGGLEOS_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_FRAGGLEOS_EMPTY;
model = "z\addons\dayz_communityassets\models\can_fraggleos_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_fraggleos_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanHerpyEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_HERPY_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_HERPY_EMPTY;
model = "z\addons\dayz_communityassets\models\can_herpy_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_herpy_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanOrlokEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_ORLOK_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_ORLOK_EMPTY;
model = "z\addons\dayz_communityassets\models\can_orlok_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_orlok_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanPowellEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_POWELL_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_POWELL_EMPTY;
model = "z\addons\dayz_communityassets\models\can_powell_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_powell_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanTylersEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_TYLERS_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_TYLERS_EMPTY;
model = "z\addons\dayz_communityassets\models\can_tylers_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_tylers_clean_empty_ca.paa";
ammo = "TinCan";
};
class FoodCanUnlabeledEmpty : TrashTinCan {
scope = public;
count = 1;
displayName = $STR_FOOD_NAME_CAN_UNLABELED_EMPTY;
descriptionShort = $STR_FOOD_DESC_CAN_UNLABELED_EMPTY;
model = "z\addons\dayz_communityassets\models\can_unlabeled_clean_empty.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_can_unlabeled_clean_empty_ca.paa";
ammo = "TinCan";
};
class ItemWaterbottle;
class ItemWaterbottleBoiled : ItemWaterbottle {
displayName = $STR_ITEMWATERBOTTLEBOILED_CODE_NAME;
descriptionShort = $STR_ITEMWATERBOTTLEBOILED_CODE_DESC;
};
class Hatchet_Swing;
class Machete_Swing : Hatchet_Swing {
displayName = "Machete";
displayNameMagazine = "Machete";
shortNameMagazine = "Machete";
ammo = "Machete_Swing_Ammo";
};
class ItemTrashToiletpaper : CA_Magazine {
scope = public;
count = 1;
displayName = $STR_JUNK_NAME_TOILETPAPER;
descriptionShort = $STR_JUNK_DESC_TOILETPAPER;
model = "z\addons\dayz_communityassets\models\toiletpaper.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_toiletpaper_CA.paa";
type = 256;
};
class ItemTrashRazor : CA_Magazine {
scope = public;
count = 1;
displayName = $STR_JUNK_NAME_RAZOR;
descriptionShort = $STR_JUNK_DESC_RAZOR;
model = "z\addons\dayz_communityassets\models\razor.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_razor_CA.paa";
type = 256;
};
class 8Rnd_B_Beneli_74Slug;
class 8Rnd_B_Beneli_Pellets;
class 2Rnd_shotgun_74Slug: 8Rnd_B_Beneli_74Slug
{
displayName="2Rnd. Slug";
count=2;
descriptionShort="Caliber: 12 gauge <br/>Rounds: 2 <br/>Used in: M1014";
model = "\z\addons\dayz_communityassets\models\2shells_slugshot.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_2shells_slugshot_CA.paa";
class ItemActions
{
class ReloadMag
{
text="Combine to 8 rounds";
script="spawn player_reloadMag;";
use[]=
{
"2Rnd_shotgun_74Slug",
"2Rnd_shotgun_74Slug",
"2Rnd_shotgun_74Slug",
"2Rnd_shotgun_74Slug"
};
output[]=
{
"8Rnd_B_Beneli_74Slug"
};
};
};
};
class 2Rnd_shotgun_74Pellets: 8Rnd_B_Beneli_Pellets
{
displayName="2Rnd. Pellets";
count=2;
descriptionShort="Caliber: 12 gauge <br/>Rounds: 2 Pellets<br/>Used in: M1014";
model = "\z\addons\dayz_communityassets\models\2shells_pellet.p3d";
picture = "\z\addons\dayz_communityassets\pictures\equip_2shells_pellet_CA.paa";
class ItemActions
{
class ReloadMag
{
text="Combine to 8 rounds";
script="spawn player_reloadMag;";
use[]=
{
"2Rnd_shotgun_74Pellets",
"2Rnd_shotgun_74Pellets",
"2Rnd_shotgun_74Pellets",
"2Rnd_shotgun_74Pellets"
};
output[]=
{
"8Rnd_B_Beneli_Pellets"
};
};
};
};
};

View File

@@ -10,4 +10,242 @@ class CfgWeapons {
libtextdesc = "Debug Map - Admin use only";
};
};
class ItemCompass: ItemCore {
model="z\addons\dayz_communityassets\models\compass.p3d";
};
class Crossbow;
class Crossbow_DZ : Crossbow {
magazines[] =
{
"Quiver",
"WoodenArrow"
};
};
class MeleeWeapon;
class MeleeHatchet: MeleeWeapon
{
scope=2;
autoreload=1;
magazineReloadTime=0;
model="\dayz_weapons\models\Hatchet_weaponized";
picture="\dayz_equip\textures\equip_hatchet_CA.paa";
displayName="$STR_EQUIP_NAME_41";
magazines[]=
{
"Hatchet_Swing"
};
handAnim[]=
{
"OFP2_ManSkeleton",
"\dayz_weapons\anim\melee_hatchet_holding.rtm"
};
class ItemActions
{
class Use
{
text="$STR_ACTIONS_CHOPWOOD";
script="spawn player_chopWood;";
};
class Toolbelt
{
text="Add to Toolbelt";
script="spawn player_addToolbelt;";
use[]=
{
"MeleeHatchet"
};
output[]=
{
"ItemHatchet"
};
};
class Drop
{
text="Drop Hatchet";
script="spawn player_dropWeapon;";
use[]=
{
"Hatchet_Swing"
};
};
};
class Library
{
libTextDesc="$STR_EQUIP_DESC_41";
};
descriptionShort="$STR_EQUIP_DESC_41";
};
class MeleeCrowbar: MeleeHatchet
{
scope=2;
autoreload=1;
magazineReloadTime=0;
model="\dayz_weapons\models\crowbar_weaponized";
picture="\dayz_weapons\textures\equip_crowbar_CA.paa";
displayName="Crowbar";
magazines[]=
{
"Crowbar_Swing"
};
class ItemActions
{
class Toolbelt
{
text="Add to Toolbelt";
script="spawn player_addToolbelt;";
use[]=
{
"MeleeCrowbar"
};
output[]=
{
"ItemCrowbar"
};
};
class Drop
{
text="Drop Crowbar";
script="spawn player_dropWeapon;";
use[]=
{
"Crowbar_Swing"
};
};
};
class Library
{
libTextDesc="A tool consisting of a metal bar with a single curved end and flattened points, often with a small fissure on one or both ends for removing nails.";
};
descriptionShort="A tool consisting of a metal bar with a single curved end and flattened points, often with a small fissure on one or both ends for removing nails.";
};
class ItemCrowbar: ItemCore
{
scope=2;
displayName="Crowbar";
model="\dayz_equip\models\crowbar.p3d";
picture="\dayz_weapons\textures\equip_crowbar_CA.paa";
descriptionShort="A tool consisting of a metal bar with a single curved end and flattened points, often with a small fissure on one or both ends for removing nails.";
class ItemActions
{
class Toolbelt
{
text="Remove from Toolbelt";
script="spawn player_addToolbelt;";
use[]=
{
"ItemCrowbar"
};
output[]=
{
"MeleeCrowbar"
};
};
};
};
class MeleeMachete: MeleeHatchet
{
scope=2;
autoreload=1;
magazineReloadTime=0;
model="\z\addons\dayz_communityassets\models\machete_weaponized.p3d";
picture="\z\addons\dayz_communityassets\pictures\equip_machete_CA.paa";
displayName="Machete";
magazines[]=
{
"Machete_Swing"
};
class ItemActions
{
class Toolbelt
{
text="Add to Toolbelt";
script="spawn player_addToolbelt;";
use[]=
{
"MeleeMachete"
};
output[]=
{
"ItemMachete"
};
};
class Drop
{
text="Drop Machete";
script="spawn player_dropWeapon;";
use[]=
{
"Machete_Swing"
};
};
};
class Library
{
libTextDesc="";
};
descriptionShort="An agricultural tool turned into a weapon, the Machete may be less versatile than the common hatchet, but it packs a punch.";
};
class ItemMachete: ItemCore
{
scope=2;
displayName="Machete";
model="\z\addons\dayz_communityassets\models\machete.p3d";
picture="\z\addons\dayz_communityassets\pictures\equip_machete_CA.paa";
descriptionShort="An agricultural tool turned into a weapon, the Machete may be less versatile than the common hatchet, but it packs a punch.";
class ItemActions
{
class Toolbelt
{
text="Remove from Toolbelt";
script="spawn player_addToolbelt;";
use[]=
{
"ItemMachete"
};
output[]=
{
"MeleeMachete"
};
};
};
};
class GrenadeLauncher; // External class reference
class Flare : GrenadeLauncher {
class ThrowMuzzle;
class MolotovCocktailMuzzle : ThrowMuzzle {
displayName = "$STR_ACTION_THROW";
magazines[] = {
"TrashJackDaniels",
"ItemSodaEmpty",
"TrashTinCan",
"FoodCanGriffEmpty",
"FoodCanBadguyEmpty",
"FoodCanBoneboyEmpty",
"FoodCanCornEmpty",
"FoodCanCurgonEmpty",
"FoodCanDemonEmpty",
"FoodCanFraggleosEmpty",
"FoodCanHerpyEmpty",
"FoodCanOrlokEmpty",
"FoodCanPowellEmpty",
"FoodCanTylersEmpty",
"FoodCanUnlabeledEmpty",
"ItemSodaCokeEmpty",
"ItemSodaPepsiEmpty",
"ItemSodaMdewEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaClaysEmpty",
"ItemSodaSmashtEmpty",
"ItemSodaDrwasteEmpty",
"ItemSodaLemonadeEmpty",
"ItemSodaLvgEmpty",
"ItemSodaMzlyEmpty",
"ItemSodaRabbitEmpty"
};
};
};
};

View File

@@ -1,4 +1,4 @@
private["_ammoType","_vehicle","_ammo","_weapon","_turret","_text","_array","type"];
private["_ammoType","_vehicle","_ammo","_weapon","_turret","_text","_array"];
_array = _this select 3;
_vehicle = _array select 0;
_weapon = _array select 1;

View File

@@ -1,10 +1,16 @@
private["_hasbottleitem","_hastinitem","_bottletext","_tin1text","_tin2text","_tintext","_qty","_id"];
private["_hasbottleitem","_hastinitem","_bottletext","_tin1text","_tin2text","_tintext","_qty","_dis","_sfx"];
player removeAction s_player_boil;
s_player_boil = -1;
_hasbottleitem = "ItemWaterbottle" in magazines player;
_hastinitem = ("TrashTinCan" in magazines player) or ("ItemSodaEmpty" in magazines player);
_hastinitem = false;
{
if (_x in magazines player) then {
_hastinitem = true;
};
} forEach boil_tin_cans;
_bottletext = getText (configFile >> "CfgMagazines" >> "ItemWaterbottle" >> "displayName");
_tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName");
@@ -17,9 +23,14 @@ if (_hasbottleitem and _hastinitem) then {
_qty = {_x == "ItemWaterbottle"} count magazines player;
if ("ItemWaterbottle" in magazines player) then {
player playActionNow "Medic";
[player,"fillwater",0,false] call dayz_zombieSpeak;
_id = [player,10,true,(getPosATL player)] spawn player_alertZombies;
sleep _qty;
sleep 1;
_dis=10;
_sfx = "cook";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 5;
for "_x" from 1 to _qty do {
player removeMagazine "ItemWaterbottle";
player addMagazine "ItemWaterbottleBoiled";

View File

@@ -1,8 +1,6 @@
private["_location","_isOk","_dir","_classname","_item"];
_location = player modeltoworld [0,1,0];
_location set [2,0];
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_isWater = (surfaceIsWater _location) or dayz_isSwimming;
@@ -19,7 +17,6 @@ _hasbuilditem = _this in magazines player;
if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]};
// Get inital direction of player
_dir = getDir player;
_offset_x = 0;
@@ -83,8 +80,12 @@ if(!_cancel) then {
player playActionNow "Medic";
sleep 1;
[player,"repair",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
_dis=20;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 5;
player allowDamage false;
@@ -94,7 +95,9 @@ if(!_cancel) then {
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
["dayzPublishObj",[dayz_characterID,_object,[_dir,_location],_classname]] call callRpcProcedure;
//["dayzPublishObj",[dayz_characterID,_object,[_dir,_location],_classname]] call callRpcProcedure;
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
publicVariable "dayzPublishObj";
sleep 2;
player allowDamage true;

View File

@@ -10,7 +10,9 @@ _category = (_this select 3) select 1;
diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
//["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
dayzTraderMenu = [_activatingPlayer,_trader_id,_category,_action];
publicVariableServer "dayzTraderMenu";
waitUntil {!isNil "dayzTraderMenuResult"};

View File

@@ -12,10 +12,10 @@ s_player_callzombies = 1;
[player,"spotted",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
_id = [player,65,true,(getPosATL player)] spawn player_alertZombies;
// wait a bit
sleep 15;
sleep 7;
// allow menu again
s_player_callzombies = -1;

View File

@@ -14,8 +14,12 @@ _cookedmeat = meatcooked;
_text = getText (configFile >> "CfgMagazines" >> _meatcooked >> "displayName");
_qty = {_x == _meat} count magazines player;
player playActionNow "Medic";
[player,"cook",0,false] call dayz_zombieSpeak;
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
_dis=6;
_sfx = "cook";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep _qty;
for "_x" from 1 to _qty do {
player removeMagazine _meat;

View File

@@ -1,3 +1,5 @@
private["_object"];
["dayzUpdateVehicle",[_this select 3,"all"]] call callRpcProcedure;
//["dayzUpdateVehicle",[_this select 3,"all"]] call callRpcProcedure;
dayzUpdateVehicle = [_this select 3,"all"];
publicVariable "dayzUpdateVehicle";

View File

@@ -16,7 +16,12 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
_text = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
player playActionNow "Medic";
[player,"gut",0,false] call dayz_zombieSpeak;
_dis=10;
_sfx = "gut";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
_item setVariable["meatHarvested",true,true];
_qty = 2;
@@ -26,8 +31,6 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
if (_hasKnifeBlunt) then { _qty = round(_qty / 2); };
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
_array = [_item,_qty];
if (local _item) then {

View File

@@ -10,7 +10,13 @@ if ("ItemJerrycanEmpty" in magazines player) then {
player removeMagazine "ItemJerrycanEmpty";
player addMagazine "ItemJerrycan";
};
[player,"refuel",0,false] call dayz_zombieSpeak;
player playActionNow "Medic";
_dis=10;
_sfx = "refuel";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
cutText [format[(localize "str_player_09"),_qty], "PLAIN DOWN"];
} else {
cutText [(localize "str_player_10") , "PLAIN DOWN"];

View File

@@ -5,7 +5,9 @@ _activatingPlayer = _this select 1;
diag_log format["DEBUG DEATH OBJ: %1", _this select 0];
["dayzPlayerDeaths",[_activatingPlayer]] call callRpcProcedure;
//["dayzPlayerDeaths",[_activatingPlayer]] call callRpcProcedure;
dayzPlayerDeaths = [_activatingPlayer];
publicVariableServer "dayzPlayerDeaths";
waitUntil {!isNil "dayzPlayerDeathsResult"};

View File

@@ -1,4 +1,4 @@
private["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_playerID","_claimedBy","_text"];
private["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_playerID","_claimedBy","_text","_control","_dialog","_item","_val","_max","_bolts","_quivers","_quiver","_broken"];
_array = _this select 3;
_type = _array select 0;
_classname = _array select 1;
@@ -9,14 +9,27 @@ _text = getText (configFile >> _type >> _classname >> "displayName");
_holder setVariable["claimed",_playerID,true];
if(_classname isKindOf "TrapBear") exitwith {deleteVehicle _holder;};
player playActionNow "PutDown";
if (_classname == "MeleeCrowbar") then {
player addMagazine 'crowbar_swing';
} else {
if (_classname == "MeleeHatchet") then {
player addMagazine 'hatchet_swing';
};
if (_classname == "MeleeHatchet") then {
player addMagazine 'hatchet_swing';
};
if (_classname == "MeleeMachete") then {
player addMagazine 'Machete_swing';
};
_broken = false;
if(_classname == "WoodenArrow") then {
if (20 > random 100) then {
_broken = true;
};
};
if (_broken) exitWith { deleteVehicle _holder; cutText [localize "str_broken_arrow", "PLAIN DOWN"] };
sleep 0.25;
@@ -32,7 +45,7 @@ _config = (configFile >> _type >> _classname);
_isOk = [player,_config] call BIS_fnc_invAdd;
if (_isOk) then {
deleteVehicle _holder;
if (_classname in ["MeleeHatchet","MeleeCrowbar"]) then {
if (_classname in ["MeleeHatchet","MeleeCrowbar","MeleeMachete"]) then {
if (_type == "cfgWeapons") then {
_muzzles = getArray(configFile >> "cfgWeapons" >> _classname >> "muzzles");
@@ -49,10 +62,12 @@ if (_isOk) then {
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
if (_classname == "MeleeCrowbar") then {
player removeMagazine 'crowbar_swing';
} else {
if (_classname == "MeleeHatchet") then {
player removeMagazine 'hatchet_swing';
};
};
if (_classname == "MeleeHatchet") then {
player removeMagazine 'hatchet_swing';
};
if (_classname == "MeleeMachete") then {
player removeMagazine 'Machete_swing';
};
};

View File

@@ -16,7 +16,7 @@ _create = getArray (_config >> "ItemActions" >> "Toolbelt" >> "output") select
_config2 = configFile >> "cfgWeapons" >> _create;
//Remove magazines if needed
if (_item in ["MeleeHatchet","MeleeCrowbar"]) then {
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete"]) then {
_magType = ([] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines")) select 0;
_meleeNum = ({_x == _magType} count magazines player);
for "_i" from 1 to _meleeNum do {
@@ -24,18 +24,32 @@ if (_item in ["MeleeHatchet","MeleeCrowbar"]) then {
};
};
if (_item in ["ItemHatchet","ItemCrowbar","ItemMachete"]) then {
switch (primaryWeapon player) do
{
case "MeleeHatchet": { "MeleeHatchet" call player_addToolbelt };
case "MeleeCrowbar": { "MeleeCrowbar" call player_addToolbelt };
case "MeleeMachete": { "MeleeMachete" call player_addToolbelt };
};
};
_isOk = [player,_config2] call BIS_fnc_invAdd;
if (_isOk) then {
//Remove item
player removeWeapon _item;
//Add magazines if needed
if (_create in ["MeleeHatchet","MeleeCrowbar"]) then {
if (_create in ["MeleeHatchet","MeleeCrowbar","MeleeMachete"]) then {
if (_create == "MeleeCrowbar") then {
player addMagazine 'crowbar_swing';
} else {
};
if (_create == "MeleeHatchet") then {
player addMagazine 'hatchet_swing';
};
if (_create == "MeleeMachete") then {
player addMagazine 'Machete_swing';
};
if (_type == "cfgWeapons") then {
_muzzles = getArray(configFile >> "cfgWeapons" >> _create >> "muzzles");
_wtype = ((weapons player) select 0);
@@ -50,11 +64,15 @@ if (_isOk) then {
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
//Add magazines back
if (_item in ["MeleeHatchet","MeleeCrowbar"]) then {
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete"]) then {
if (_item == "MeleeCrowbar") then {
player addMagazine 'crowbar_swing';
} else {
};
if (_item == "MeleeHatchet") then {
player addMagazine 'hatchet_swing';
};
if (_item == "MeleeMachete") then {
player addMagazine 'Machete_swing';
};
};
};

View File

@@ -86,8 +86,12 @@ if (_hasrequireditem or _bypass) then {
player playActionNow "Medic";
sleep 1;
[player,"repair",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
_dis=20;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 5;
player allowDamage false;
@@ -97,8 +101,10 @@ if (_hasrequireditem or _bypass) then {
player reveal _object;
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
["dayzPublishObj",[dayz_characterID,_object,[_dir,_location],_classname]] call callRpcProcedure;
//["dayzPublishObj",[dayz_characterID,_object,[_dir,_location],_classname]] call callRpcProcedure;
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
publicVariable "dayzPublishObj";
sleep 2;
player allowDamage true;

View File

@@ -4,13 +4,16 @@ _item = _this;
call gear_ui_init;
if (["forest",dayz_surfaceType] call fnc_inString) then {
_result = [player,"PartWoodPile"] call BIS_fnc_invAdd;
if (_result) then {
cutText [localize "str_player_25", "PLAIN DOWN"];
} else {
cutText [localize "str_player_24", "PLAIN DOWN"];
};
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
_result = [player,"PartWoodPile"] call BIS_fnc_invAdd;
[player,"chopwood",0,false] call dayz_zombieSpeak;
if (_result) then {
cutText [localize "str_player_25", "PLAIN DOWN"];
} else {
cutText [localize "str_player_24", "PLAIN DOWN"];
};
[player,20,false,(getPosATL player)] spawn player_alertZombies;
player playActionNow "Medic";
sleep 3;
} else {
cutText [localize "str_player_23", "PLAIN DOWN"];
};

View File

@@ -1,7 +1,9 @@
private["_onLadder","_item","_hasdrinkitem","_config","_text","_sfx","_id","_display"];
private["_onLadder","_itemorignal","_hasdrinkitem","_hasoutput","_config","_text","_sfx","_dis","_id","_itemtodrop","_nearByPile","_item","_display"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
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"]};
@@ -9,31 +11,60 @@ if (vehicle player != player) exitWith {cutText ["You may not drink while in a v
//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;
_hasdrinkitem = _item in magazines player;
_itemorignal = _this;
_hasdrinkitem = _itemorignal in magazines player;
_hasoutput = _itemorignal in drink_with_output;
_config = configFile >> "CfgMagazines" >> _item;
_config = configFile >> "CfgMagazines" >> _itemorignal;
_text = getText (_config >> "displayName");
_sfx = getText (_config >> "sfx");
//getting type of sfx (now just drink od soda open and drink)
_sfx = getText (_config >> "sfx");
if (!_hasdrinkitem) exitWith {cutText [format[(localize "str_player_31"),_text,"drink"] , "PLAIN DOWN"]};
player playActionNow "PutDown";
player removeMagazine _item;
player removeMagazine _itemorignal;
sleep 1;
[player,_sfx,0,false] call dayz_zombieSpeak;
if (_item == "ItemWaterbottle" or _item == "ItemWaterbottleBoiled") then {
player addMagazine "ItemWaterbottleUnfilled";
if ((random 15 < 1) and (_item == "ItemWaterbottle")) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
};
//_id = [player,5,true,(getPosATL player)] spawn player_alertZombies;
} else {
player addMagazine "ItemSodaEmpty";
_id = [player,10,true,(getPosATL player)] spawn player_alertZombies;
if (["ItemWaterbottle",_itemorignal] call fnc_inString) then {
//low alert and sound radius
_dis=5;
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
player addMagazine "ItemWaterbottleUnfilled";
};
if (["ItemSoda",_itemorignal] call fnc_inString) then {
//higher alert and sound radius
_dis=10;
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
_id = [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
};
if (_hasoutput) then{
// Selecting output
_itemtodrop = drink_output select (drink_with_output find _itemorignal);
sleep 3;
_nearByPile= nearestObjects [(position player), ["WeaponHolder","WeaponHolderBase"],2];
if (count _nearByPile ==0) then {
_item = createVehicle ["WeaponHolder", position player, [], 0.0, "CAN_COLLIDE"];
} else {
_item = _nearByPile select 0;
};
_item addMagazineCargoGlobal [_itemtodrop,1];
};
//add infection chance for "ItemWaterbottle",
if ((random 15 < 1) and (_itemorignal == "ItemWaterbottle")) then {
r_player_infected = true;
player setVariable["USEC_infected",true,true];
};
player setVariable ["messing",[dayz_hunger,dayz_thirst],true];
dayz_lastDrink = time;

View File

@@ -16,6 +16,8 @@ for "_i" from 1 to _meleeNum do {
player removeWeapon _item;
if (_item == "MeleeHatchet") then {_item = "ItemHatchet";};
if (_item == "MeleeCrowbar") then {_item = "ItemCrowbar";};
if (_item == "MeleeMachete") then {_item = "ItemMachete";};
_bag = createVehicle [format["WeaponHolder_%1",_item],getPosATL player,[], 0, "CAN_COLLIDE"];
_bag setdir (getDir player);
player reveal _bag;

View File

@@ -1,4 +1,4 @@
private["_onLadder","_item","_hasfooditem","_rawfood","_cookedfood","_config","_text","_regen","_id","_display"];
private["_onLadder","_itemorignal","_hasfooditem","_rawfood","_cookedfood","_hasoutput","_config","_text","_regen","_dis","_sfx","_Cookedtime","_itemtodrop","_nearByPile","_item","_display"];
disableserialization;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
@@ -9,46 +9,60 @@ if (vehicle player != player) exitWith {cutText ["You may not eat while in a veh
//Force players to wait 3 mins to eat again
//if (dayz_lastMeal < 180) exitWith {cutText ["You may not eat, you're already full", "PLAIN DOWN"]};
_item = _this;
_hasfooditem = _item in magazines player;
_itemorignal = _this;
_hasfooditem = _itemorignal in magazines player;
//_rawfood = _item in ["FoodSteakRaw","FoodmeatRaw","FoodbeefRaw","FoodmuttonRaw","FoodchickenRaw","FoodrabbitRaw","FoodbaconRaw"];
//_cookedfood = _item in ["FoodSteakCooked","FoodmeatCooked","FoodbeefCooked","FoodmuttonCooked","FoodchickenCooked","FoodrabbitCooked","FoodbaconCooked"];
_rawfood = _itemorignal in meatraw;
_cookedfood = _itemorignal in meatcooked;
_hasoutput = _itemorignal in food_with_output;
_badfood = _item in badfood;
_rawfood = _item in meatraw;
_cookedfood = _item in meatcooked;
_config = configFile >> "CfgMagazines" >> _item;
_config = configFile >> "CfgMagazines" >> _itemorignal;
_text = getText (_config >> "displayName");
_regen = getNumber (_config >> "bloodRegen");
if (!_hasfooditem) exitWith {cutText [format[(localize "str_player_31"),_text,"consume"] , "PLAIN DOWN"]};
player playActionNow "PutDown";
player removeMagazine _item;
player removeMagazine _itemorignal;
sleep 1;
_dis=6;
_sfx = "eat";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
if (dayz_lastMeal < 3600) then {
if (_item == "FoodSteakCooked") then {
if (_itemorignal == "FoodSteakCooked") then {
//_regen = _regen * (10 - (10 max ((time - _Cookedtime) / 3600)));
};
};
if (_hasoutput) then{
// Selecting output
_itemtodrop = food_output select (food_with_output find _itemorignal);
sleep 3;
_nearByPile= nearestObjects [(position player), ["WeaponHolder","WeaponHolderBase"],2];
if (count _nearByPile ==0) then {
_item = createVehicle ["WeaponHolder", position player, [], 0.0, "CAN_COLLIDE"];
} else {
_item = _nearByPile select 0;
};
_item addMagazineCargoGlobal [_itemtodrop,1];
};
if ( _rawfood and (random 15 < 1)) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
player setVariable["USEC_infected",true,true];
};
if ( _badfood and (random 7 < 1)) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
};
[player,"eat",0,false] call dayz_zombieSpeak;
if (!_rawfood and !_cookedfood) then{
player addMagazine "TrashTinCan";
player setVariable["USEC_infected",true,true];
};
r_player_blood = r_player_blood + _regen;
@@ -60,13 +74,13 @@ player setVariable ["messing",[dayz_hunger,dayz_thirst],true];
player setVariable["USEC_BloodQty",r_player_blood,true];
player setVariable["medForceUpdate",true];
["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
//["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
dayzPlayerSave = [player,[],true];
publicVariable "dayzPlayerSave";
dayz_lastMeal = time;
dayz_hunger = 0;
_id = [player,5,true,(getPosATL player)] spawn player_alertZombies;
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
(_display displayCtrl 1301) ctrlShow true;

View File

@@ -14,7 +14,8 @@ waitUntil { animationState player != "amovpknlmstpslowwrfldnon_amovpercmstpsrasw
sleep 2;
//_object setpos _position;
_object setvectorup [0,0,1];
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
[player,"scream",0,true] call dayz_zombieSpeak;
[player,20,true,(getPosATL player)] spawn player_alertZombies;
sleep 3;

View File

@@ -1,44 +1,109 @@
private["_item"];
private["_item","_config","_consume","_create","_item_ammo","_consume_magsize","_create_magsize","_consume_type","_slotstart","_slotend","_dialog","_qty_total_ammo","_qty_consume_ammo","_qty_create_ammo","_qty_consume_mags","_qty_create_mags","_qty_free_slots","_control","_i","_mag","_qtynew_create_ammo","_qtynew_consume_ammo","_qtynew_create_mags","_qtynew_consume_mags","_qtynew_consume_mags_full","_qtynew_create_mags_full","_qtynew_consume_ammo_rest","_qtynew_create_ammo_rest","_avaliable_slots"];
disableSerialization;
_item = _this;
_config = configFile >> "CfgMagazines" >> _item;
call gear_ui_init;
_consume = getArray (_config >> "ItemActions" >> "ReloadMag" >> "use");
_create = getArray (_config >> "ItemActions" >> "ReloadMag" >> "output");
_textConsume = getText(configFile >> "CfgMagazines" >> (_consume select 0) >> "displayName");
_textCreate = getText(configFile >> "CfgMagazines" >> (_create select 0) >> "displayName");
//_qtyConsume = getText(configFile >> "CfgMagazines" >> (_consume select 0) >> "count");
//_qtyCreate = getText(configFile >> "CfgMagazines" >> (_create select 0) >> "count");
//note - one slot ammo can be used!
_amountNeed = count _consume;
_amountHas = {_x == (_consume select 0)} count magazines player;
_amountMake = count _create;
_item = _this;
_qty = 0;
if (_amountNeed == 1 and _amountMake == 1) then {
_control = uiNamespace getVariable 'uiControl';
_qty = gearSlotAmmoCount _control;
_config = configFile >> "CfgMagazines" >> _item;
_consume = getArray (_config >> "ItemActions" >> "ReloadMag" >> "use") select 0;
_create = getArray (_config >> "ItemActions" >> "ReloadMag" >> "output") select 0;
_item_ammo = gearSlotAmmoCount (uiNamespace getVariable 'uiControl');
//add check if weapon can use create (if not - show message)
player playActionNow "PutDown";
_consume_magsize = getNumber(configFile >> "CfgMagazines" >> _consume >> "count");
_create_magsize = getNumber(configFile >> "CfgMagazines" >> _create >> "count");
_consume_type = getNumber(configFile >> "CfgMagazines" >> _consume >> "type");
//primary/secondary mags?
_slotstart = 0;
_slotend = 0;
if (_consume_type == 256) then {
_slotstart = 109;
_slotend = 120;
};
if ( _consume_type == 16) then {
_slotstart = 122;
_slotend = 129;
};
_hasInput = (_amountNeed <= _amountHas);
player playActionNow "PutDown";
if (_hasInput) then {
//Take Items
{
player removeMagazine _x;
} forEach _consume;
sleep 1;
//Give Items
{
if (_qty > 0) then {
player addMagazine [_x,_qty];
} else {
player addMagazine _x;
};
} forEach _create;
cutText [format[(localize "str_player_29"),_amountMake,_textCreate], "PLAIN DOWN"];
_dialog = findDisplay 106;
_qty_total_ammo = 0;
_qty_consume_ammo = 0;
_qty_create_ammo = 0;
_qty_consume_mags = 0;
_qty_create_mags = 0;
_qty_free_slots = 0;
for "_i" from _slotstart to _slotend do {
_control =_dialog displayCtrl _i;
_mag = gearSlotData _control;
if (_mag == _consume) then {
_qty_total_ammo = _qty_total_ammo + gearSlotAmmoCount _control;
_qty_consume_ammo = _qty_consume_ammo + gearSlotAmmoCount _control;
_qty_consume_mags = _qty_consume_mags+1;
};
if (_mag == _create) then {
_qty_total_ammo = _qty_total_ammo + gearSlotAmmoCount _control;
_qty_create_ammo = _qty_create_ammo + gearSlotAmmoCount _control;
_qty_create_mags = _qty_create_mags+1;
};
if (_mag == "") then {
_qty_free_slots = _qty_free_slots + 1;
};
};
_qtynew_create_ammo = 0;
_qtynew_consume_ammo = 0;
_qtynew_create_mags = 0;
_qtynew_consume_mags = 0;
_qtynew_consume_mags_full = 0;
_qtynew_create_mags_full = 0;
_qtynew_consume_ammo_rest = 0;
_qtynew_create_ammo_rest = 0;
if ( _consume_magsize > _create_magsize) then {
_qtynew_create_ammo = _qty_create_ammo + _item_ammo;
_qtynew_consume_ammo = _qty_consume_ammo - _item_ammo;
_qtynew_create_mags = ceil(_qtynew_create_ammo/_create_magsize);
_qtynew_consume_mags = ceil(_qtynew_consume_ammo/_consume_magsize);
} else {
cutText [format[(localize "str_player_28"),_amountNeed,_textConsume], "PLAIN DOWN"];
_qtynew_create_ammo = _qty_total_ammo;
_qtynew_consume_ammo = 0;
};
if ((_qtynew_create_mags + _qtynew_consume_mags) > _avaliable_slots) exitWith {
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
};
_qtynew_consume_mags_full = floor(_qtynew_consume_ammo/_consume_magsize);
_qtynew_create_mags_full = floor(_qtynew_create_ammo/_create_magsize);
_qtynew_consume_ammo_rest = _qtynew_consume_ammo - (_qtynew_consume_mags_full*_consume_magsize);
_qtynew_create_ammo_rest = _qtynew_create_ammo - (_qtynew_create_mags_full*_create_magsize);
//remove all _consume and _create mags (we already have total ammo count)
player removeMagazines _consume;
player removeMagazines _create;
for "_i" from 1 to _qtynew_consume_mags_full do {
player addMagazine _consume;
};
if (_qtynew_consume_ammo_rest != 0) then {
player addMagazine [_consume,_qtynew_consume_ammo_rest];
};
for "_i" from 1 to _qtynew_create_mags_full do {
player addMagazine _create;
};
if (_qtynew_create_ammo_rest != 0) then {
player addMagazine [_create,_qtynew_create_ammo_rest];
};

View File

@@ -1,5 +1,5 @@
//Let Zeds know
_id = [player,4,true,(getPosATL player)] spawn player_alertZombies;
[player,4,true,(getPosATL player)] spawn player_alertZombies;
//display gui (temp hint)

View File

@@ -19,14 +19,12 @@ _isZombie = _ent isKindOf "zZombie_base";
if (_ent isKindOf "Animal" or _isZombie) then {
_ent setDamage 1;
} else {
["usecBreakLegs",[_unit,player]] call broadcastRpcCallAll;
//["usecBreakLegs",[_unit,player]] call broadcastRpcCallAll;
usecBreakLegs = [_unit,player];
publicVariable "usecBreakLegs";
};
[player,"hit",0,false] call dayz_zombieSpeak;
player switchmove "";

View File

@@ -63,7 +63,9 @@ if(!(alive _item)) then {
dayz_lastMeal = time;
dayz_hunger = 0;
["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
//["dayzPlayerSave",[player,[],true]] call callRpcProcedure;
dayzPlayerSave = [player,[],true];
publicVariable "dayzPlayerSave";
[player,"eat",0,false] call dayz_zombieSpeak;
@@ -89,6 +91,4 @@ if(!(alive _item)) then {
player switchmove "";
};
s_player_butcher = -1;

View File

@@ -15,14 +15,16 @@ player removeMagazine "ItemJerrycan";
player addMagazine "ItemJerrycanEmpty";
player playActionNow "Medic";
[player,"refuel",0,false] call dayz_zombieSpeak;
_id = [player,20,true,(getPosATL player)] spawn player_alertZombies;
_dis=10;
_sfx = "refuel";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 6;
//apply newFuel to vehicle on every peer
["dayzSetFuel",[_vehicle,_newFuel]] call broadcastRpcCallAll;
dayzSetFuel = [_vehicle,_newFuel];
dayzSetFuel spawn local_setFuel;
publicVariable "dayzSetFuel";
cutText [format[localize "str_player_05",_nameType,_canSize], "PLAIN DOWN"];
sleep 1;

View File

@@ -38,6 +38,8 @@ _counter = 0;
while {_isOk} do {
player playActionNow "Medic";
_dis=20;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
r_interrupt = false;
_animState = animationState player;
@@ -54,7 +56,8 @@ while {_isOk} do {
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
[player,"repair",0,false] call dayz_zombieSpeak;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
};
if (r_interrupt) then {
r_doLoop = false;
@@ -84,7 +87,11 @@ while {_isOk} do {
// Remove only if player waited
if (_proceed) then {
cutText [format["De-constructing %1.",_objType], "PLAIN DOWN"];
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
deleteVehicle _obj;
} else {
r_interrupt = false;

View File

@@ -14,7 +14,6 @@ _section = _part in magazines player;
_nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
_namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName");
{_vehicle removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
s_player_repair_crtl = 1;
if (_section and _hasToolbox) then {
@@ -30,13 +29,22 @@ if (_section and _hasToolbox) then {
//Fix the part
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
//vehicle is owned by whoever is in it, so we have to have each client try and fix it
["dayzSetFix",[_vehicle,_selection,0],_vehicle] call broadcastRpcCallIfLocal;
//["dayzSetFix",[_vehicle,_selection,0],_vehicle] call broadcastRpcCallIfLocal;
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
//if (local _vehicle) then {
dayzSetFix call object_setFixServer;
//};
player playActionNow "Medic";
sleep 1;
[player,"repair",0,false] call dayz_zombieSpeak;
null = [player,50,true,(getPosATL player)] spawn player_alertZombies;
_dis=20;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 5;
_vehicle setvelocity [0,0,1];
@@ -48,6 +56,8 @@ if (_section and _hasToolbox) then {
cutText [format["You need %1 to repair this",_namePart], "PLAIN DOWN"];
};
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
dayz_myCursorTarget = objNull;
//check if repaired fully
_hitpoints = _vehicle call vehicle_getHitpoints;
@@ -62,8 +72,12 @@ _allFixed = true;
//update if repaired
if (_allFixed) then {
_vehicle setDamage 0;
["dayzUpdateVehicle",[_vehicle,"repair"]] call callRpcProcedure;
//["dayzUpdateVehicle",[_vehicle,"repair"]] call callRpcProcedure;
dayzSetFix = [_vehicle,_selection,0];
publicVariable "dayzSetFix";
if (local _vehicle) then {
dayzSetFix call object_setFixServer;
};
};
dayz_myCursorTarget = objNull;
s_player_repair_crtl = -1;

View File

@@ -44,7 +44,13 @@ if (_hasToolbox) then {
_selection = getText(configFile >> "cfgVehicles" >> _type >> "HitPoints" >> _hitpoint >> "name");
//vehicle is owned by whoever is in it, so we have to have each client try and fix it
["dayzSetFix",[_vehicle,_selection,1],_vehicle] call broadcastRpcCallIfLocal;
//["dayzSetFix",[_vehicle,_selection,1],_vehicle] call broadcastRpcCallIfLocal;
dayzSetFix = [_vehicle,_selection,1];
publicVariable "dayzSetFix";
//if (local _vehicle) then {
dayzSetFix call object_setFixServer;
//}
player playActionNow "Medic";
sleep 1;

View File

@@ -10,7 +10,9 @@ _category = (_this select 3) select 1;
diag_log format["DEBUG TRADER OBJ: %1", _trader_id];
["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
//["dayzTraderMenu",[_activatingPlayer,_trader_id,_category,_action]] call callRpcProcedure;
dayzTraderMenu = [_activatingPlayer,_trader_id,_category,_action];
publicVariableServer "dayzTraderMenu";
waitUntil {!isNil "dayzTraderMenuResult"};

View File

@@ -24,7 +24,11 @@ if (_newFuel > 0) then {
sleep 6;
//apply newFuel to vehicle on every peer
["dayzSetFuel",[_vehicle,_newFuel]] call broadcastRpcCallAll;
//["dayzSetFuel",[_vehicle,_newFuel]] call broadcastRpcCallAll;
dayzSetFuel = [_vehicle,_newFuel];
dayzSetFuel spawn local_setFuel;
publicVariable "dayzSetFuel";
cutText [format["%1 has been drained for %2 litres of Fuel",_nameType,_canSize], "PLAIN DOWN"];
sleep 1;

View File

@@ -41,9 +41,11 @@ if (!_isOk) then {
//wait a bit
player playActionNow "Medic";
sleep 1;
[player,"tentunpack",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
_dis=20;
_sfx = "tentunpack";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 5;
//place tent (local)
@@ -57,7 +59,9 @@ if (!_isOk) then {
//player setVariable ["tentUpdate",["Land_A_tent",_dir,_location,[dayz_tentWeapons,dayz_tentMagazines,dayz_tentBackpacks]],true];
["dayzPublishObj",[dayz_characterID,_tent,[_dir,_location],"TentStorage"]] call callRpcProcedure;
//["dayzPublishObj",[dayz_characterID,_tent,[_dir,_location],"TentStorage"]] call callRpcProcedure;
dayzPublishObj = [dayz_characterID,_tent,[_dir,_location],"TentStorage"];
publicVariable "dayzPublishObj";
cutText [localize "str_success_tent_pitch", "PLAIN DOWN"];
} else {

View File

@@ -28,8 +28,10 @@ if(_buy_o_sell == "buy") then {
if (_qty >= _qty_in) then {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject";
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
waitUntil {!isNil "dayzTradeResult"};
@@ -63,7 +65,10 @@ if (_qty >= _qty_in) then {
clearWeaponCargoGlobal _veh;
clearMagazineCargoGlobal _veh;
["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;
//["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;
dayzPublishVeh = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
publicVariableServer "dayzPublishVeh";
_veh call fnc_vehicleEventHandler;
@@ -78,7 +83,10 @@ if (_qty >= _qty_in) then {
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
deleteVehicle _obj;

View File

@@ -28,7 +28,10 @@ if(_buy_o_sell == "buy") then {
if (_qty >= _qty_in) then {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject";
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];
@@ -69,7 +72,9 @@ if (_qty >= _qty_in) then {
clearWeaponCargoGlobal _veh;
clearMagazineCargoGlobal _veh;
["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;
//["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;
dayzPublishVeh = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
publicVariableServer "dayzPublishVeh";
// check if this will add the needed event handlers to correctly track damage client side
_veh call fnc_vehicleEventHandler;
@@ -85,7 +90,10 @@ if (_qty >= _qty_in) then {
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
deleteVehicle _obj;

View File

@@ -47,8 +47,10 @@ if (_bulkqty >= 1) then {
// increment trader for each
for "_x" from 1 to 12 do {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject";
waitUntil {!isNil "dayzTradeResult"};
if(dayzTradeResult == "PASS") then {
@@ -108,7 +110,10 @@ if (_bulkqty >= 1) then {
if (_qty >= _qty_in) then {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject";
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];

View File

@@ -40,8 +40,11 @@ if (_bulkqty >= 1) then {
// increment trader for each
for "_x" from 1 to 12 do {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject";
waitUntil {!isNil "dayzTradeResult"};
if(dayzTradeResult == "PASS") then {
@@ -113,7 +116,10 @@ if (_bulkqty >= 1) then {
// trade all items
for "_x" from 1 to _qty do {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject";
diag_log format["DEBUG Starting to wait for answer: %1", dayzTradeObject];

View File

@@ -43,7 +43,9 @@ if (_bulkqty >= 1) then {
// increment trader for each
for "_x" from 1 to 12 do {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject";
waitUntil {!isNil "dayzTradeResult"};
@@ -104,7 +106,10 @@ if (_bulkqty >= 1) then {
if (_qty >= _qty_in) then {
["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
//["dayzTradeObject",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
dayzTradeObject = [_activatingPlayer,_traderID,_bos];
publicVariableServer "dayzTradeObject";
waitUntil {!isNil "dayzTradeResult"};

View File

@@ -133,7 +133,10 @@ if(!_cancel) then {
_tent setVariable ["characterID",dayz_playerUID,true];
_tent setVariable ["OEMPos",_location,true];
["dayzPublishObj",[dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
//["dayzPublishObj",[dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
dayzPublishObj = [dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"];
publicVariableServer "dayzPublishObj";
cutText ["You have setup your Safe", "PLAIN DOWN"];

View File

@@ -54,8 +54,12 @@ if (_canFill) then {
player removeMagazine "ItemWaterbottleUnfilled";
player addMagazine "ItemWaterbottle";
};
[player,"fillwater",0,false] call dayz_zombieSpeak;
_id = [player,10,true,(getPosATL player)] spawn player_alertZombies;
_dis=5;
_sfx = "fillwater";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
cutText [format[(localize "str_player_01"),_qty], "PLAIN DOWN"];
} else {
cutText [(localize "str_player_02") , "PLAIN DOWN"];

View File

@@ -1,263 +1,13 @@
class CfgAmmo {
delete MissileCore;
delete BombCore;
delete LaserBombCore;
delete RocketCore;
delete ArtilleryRocketCore;
//delete BulletCore;
//delete ShotgunCore;
delete ShellCore;
/*
delete GrenadeCore;
delete TimeBombCore;
delete PipeBombCore;
delete MineCore;
delete FlareCore;
delete SmokeShellCore;
delete FakeAmmo;
delete BulletBase;
delete FlareBase;
delete B_9x18_Ball;
delete B_9x18_SD;
delete B_9x19_Ball;
delete B_9x19_SD;
delete B_45ACP_Ball;
delete B_545x39_Ball;
delete B_545x39_SD;
delete B_556x45_Ball;
delete B_556x45_SD;
delete B_9x39_SP5;
delete B_12Gauge_74Slug;
delete B_762x39_Ball;
delete B_762x51_Ball;
delete B_762x51_3RndBurst;
delete B_762x51_noTracer;
delete B_762x54_Ball;
delete B_762x54_noTracer;
delete B_77x56_Ball;
delete B_127x99_Ball;
delete B_127x99_Ball_noTracer;
delete B_127x107_Ball;
delete B_127x108_Ball;
delete B_127x108_APHE;
delete B_145x115_AP;
*/
delete B_20mm_AP;
delete B_20mm_AA;
delete B_23mm_AA;
delete B_23mm_HE;
delete B_23mm_AP;
delete B_23mm_APHE;
delete B_25mm_HE;
delete B_25mm_HEI;
delete B_25mm_APDS;
delete B_30mm_AP;
delete B_30mmA10_AP;
delete B_30mm_HE;
delete B_30mm_AA;
/*
delete GrenadeBase;
delete G_30mm_HE;
delete G_40mm_HE;
delete F_40mm_White;
delete F_40mm_Green;
delete F_40mm_Red;
delete F_40mm_Yellow;
*/
delete ShellBase;
delete Sh_105_HE;
delete Sh_100_HE;
delete Sh_120_HE;
delete Sh_120_SABOT;
delete Sh_122_HE;
delete Sh_125_HE;
delete Sh_125_SABOT;
delete Sh_85_HE;
delete Sh_85_AP;
//delete RocketBase;
delete G_Camel_HE;
delete R_Hydra_HE;
delete R_57mm_HE;
delete R_80mm_HE;
delete R_S8T_AT;
//delete R_M136_AT;
delete R_RPG18_AT;
delete R_PG7V_AT;
delete R_PG7VL_AT;
delete R_PG7VR_AT;
delete R_OG7_AT;
delete R_PG9_AT;
delete R_OG9_HE;
delete R_SMAW_HEDP;
delete R_SMAW_HEAA;
delete R_GRAD;
delete R_MLRS;
delete MissileBase;
delete M_Javelin_AT;
delete M_Stinger_AA;
delete M_Sidewinder_AA;
delete M_Sidewinder_AA_F35;
delete M_Strela_AA;
delete M_Igla_AA;
delete M_AT5_AT;
delete M_AT13_AT;
delete M_TOW_AT;
delete M_TOW2_AT;
delete M_AT10_AT;
delete M_AT11_AT;
delete M_Hellfire_AT;
delete M_Vikhr_AT;
delete M_Maverick_AT;
delete M_R73_AA;
delete M_Ch29_AT;
delete M_AT2_AT;
delete M_AT6_AT;
delete M_AT9_AT;
delete M_9M311_AA;
delete Bo_GBU12_LGB;
delete Bo_GBU12_LGB_F35;
delete Bo_FAB_250;
delete Bo_Mk82;
/*
delete Grenade;
delete GrenadeHand;
delete GrenadeHandTimedWest;
delete GrenadeHandTimedEast;
delete GrenadeHand_stone;
delete SmokeShell;
delete G_40mm_Smoke;
delete G_40mm_SmokeRed;
delete G_40mm_SmokeGreen;
delete G_40mm_SmokeYellow;
delete SmokeShellRed;
delete SmokeShellGreen;
delete SmokeShellYellow;
delete SmokeShellPurple;
delete SmokeShellBlue;
delete SmokeShellOrange;
delete SmokeShellVehicle;
delete FlareCountermeasure;
delete TimeBomb;
delete PipeBomb;
delete Mine;
delete MineE;
delete FuelExplosion;
delete Laserbeam;
delete HelicopterExploSmall;
delete HelicopterExploBig;
delete SmallSecondary;
delete SmokeLauncherAmmo;
delete FlareLauncherAmmo;
delete ThrownObjects;
delete Melee;
delete Hatchet_Swing_Ammo;
delete Crowbar_Swing_Ammo;
delete SodaCan;
delete TinCan;
delete JackDaniels;
delete LitObject;
delete RoadFlare;
delete ChemLight;
delete ChemGreen;
delete ChemRed;
delete ChemBlue;
delete Bolt;
delete BoltSteel;
delete B_1866_Slug;
*/
delete B_30x113mm_M789_HEDP;
delete ARTY_Sh_Base;
delete ARTY_Flare_Small;
delete ARTY_Flare_Medium;
delete ARTY_Sh_Base_NET;
delete ARTY_Sh_105_NET;
delete ARTY_Sh_105_NET_NOFX;
delete ARTY_Sh_105_LASNET;
delete ARTY_Sh_122_NET;
delete ARTY_Sh_122_NET_NOFX;
delete ARTY_Sh_122_LASNET;
delete ARTY_Sh_81_NET;
delete ARTY_Sh_82_NET;
delete ARTY_Sh_120_NET;
delete ARTY_Sh_227_NET;
delete ARTY_Sh_105_HE;
delete ARTY_Sh_105_WP;
delete ARTY_Sh_105_SADARM;
delete ARTY_Sh_105_LASER;
delete ARTY_Sh_105_ILLUM;
delete ARTY_Sh_105_SMOKE;
delete ARTY_Sh_81_HE;
delete ARTY_Sh_81_WP;
delete ARTY_Sh_81_ILLUM;
delete ARTY_R_227mm_HE_Rocket;
delete ARTY_R_227mm_HE;
delete ARTY_Sh_122_HE;
delete ARTY_Sh_122_WP;
delete ARTY_Sh_122_SADARM;
delete ARTY_Sh_122_LASER;
delete ARTY_Sh_122_ILLUM;
delete ARTY_Sh_122_SMOKE;
delete ARTY_SADARM_PROJO;
delete ARTY_SADARM_NET;
delete ARTY_SADARM_BURST;
delete ARTY_SmokeShellWhite;
delete ARTY_Sh_82_HE;
delete ARTY_Sh_82_WP;
delete ARTY_Sh_82_ILLUM;
delete ARTY_R_120mm_HE_Rocket;
delete ARTY_R_120mm_HE;
delete Warfare82mmMortar;
delete B_86x70_Ball_noTracer;
delete B_127x99_Ball_noTracer_BAF;
delete M_NLAW_AT;
delete Sh_40_HE;
delete Sh_40_SABOT;
delete M_CRV7_AT;
delete M_CRV7_HEPD;
delete M_CRV7_FAT;
delete BAF_ied_v1;
delete BAF_ied_v2;
delete BAF_ied_v3;
delete BAF_ied_v4;
delete B_765x17_Ball;
delete B_762x51_SB_SCAR;
delete Sh_100_HEAT;
delete Sh_105_HESH;
delete Sh_105_APDS;
delete R_MEEWS_HEDP;
delete R_MEEWS_HEAT;
//delete IRStrobeBase;
//delete IRStrobe;
//delete IR_Strobe_Marker;
//delete B_45ACP_noCartridge_Ball;
delete CMflareAmmo;
delete CMflare_Chaff_Ammo;
delete ARTY_Sh_120_HE;
delete Sh_81_HE;
delete Sh_81_WP;
delete Sh_81_ILLUM;
delete Sh_82_HE;
delete Sh_82_WP;
delete Sh_82_ILLUM;
delete Sh_122_WP;
delete Sh_122_SADARM;
delete Sh_122_LASER;
delete Sh_122_ILLUM;
delete Sh_122_SMOKE;
delete Sh_105_WP;
delete Sh_105_SADARM;
delete Sh_105_LASER;
delete Sh_105_ILLUM;
delete Sh_105_SMOKE;
delete 120mmHE_M120;
//delete B_303_Ball;
delete M_47_AT_EP1;
delete PMC_ied_v1;
delete PMC_ied_v2;
delete PMC_ied_v3;
delete PMC_ied_v4;
//delete B_12Gauge_Pellets;
delete G_30mm_HE_heli;
delete B_19mm_HE;
delete B_556x45_Ball_airLock;
class Bolt;
class WoodenArrow : Bolt {
model = "\dayz_weapons\models\bolt";
hit = 8;
caliber = 0.33;
};
class Melee;
class Machete_Swing_Ammo : Melee {
hit = 9;
simulation = "shotBullet";
};
};

View File

@@ -4,11 +4,15 @@ class CfgLoot {
"TrashTinCan",
"TrashJackDaniels",
"ItemSodaEmpty",
"ItemTrashToiletpaper",
"ItemTrashRazor"
},
{
1,
0.1,
0.5
0.5,
0.4,
0.2
}
};
civilian[] = {
@@ -51,6 +55,7 @@ class CfgLoot {
};
food[] = {
{
//trash
"TrashTinCan",
"TrashJackDaniels",
"ItemSodaEmpty",
@@ -60,9 +65,13 @@ class CfgLoot {
"FoodCanSardines",
"FoodCanFrankBeans",
"FoodCanPasta",
"ItemBandage"
"FoodCanUnlabeled",
//Bags
"FoodPistachio",
"FoodNutmix"
},
{
//trash
0.13,
0.13,
0.13,
@@ -72,6 +81,9 @@ class CfgLoot {
0.09,
0.09,
0.09,
0.06,
//Bags
0.05,
0.04
}
};
@@ -97,7 +109,7 @@ class CfgLoot {
"2Rnd_shotgun_74Pellets",
"8Rnd_9x18_Makarov",
"15Rnd_W1866_Slug",
"BoltSteel",
"WoodenArrow",
"HandRoadFlare",
"ItemPainkiller",
"HandChemGreen",
@@ -208,7 +220,8 @@ class CfgLoot {
"HandChemGreen",
"HandChemBlue",
"HandChemRed",
"ItemHeatPack"
"ItemHeatPack",
"FoodMRE"
},
{
0.18,
@@ -246,7 +259,8 @@ class CfgLoot {
0.02,
0.02,
0.02,
0.04
0.04,
0.03
}
};
policeman[] = {
@@ -274,9 +288,10 @@ class CfgLoot {
"7Rnd_45ACP_1911",
"10x_303",
"ItemWaterbottleUnfilled",
"BoltSteel",
"WoodenArrow",
"ItemHeatPack",
"TrapBear"
"FoodMRE",
"FoodNutmix"
},
{
1,
@@ -286,9 +301,12 @@ class CfgLoot {
0.2,
1,
0.2,
0.01
0.04,
0.1
}
};
worker[] = {
{
"TrashTinCan",

View File

@@ -299,90 +299,242 @@ class Citizen1; // External class reference
transportMaxMagazines = 12;
transportmaxbackpacks = 4;
class Turrets {};
class HitPoints {
class HitEngine {
armor = 2.4;
material = -1;
name = "motor";
passthrough = 0.2;
visual = "";
};
class HitBody {
armor = 1;
material = -1;
name = "karoserie";
passthrough = 1;
visual = "";
};
class HitFuel {
armor = 1.3;
material = -1;
name = "palivo";
passthrough = 0.5;
visual = "";
};
class HitLFWheel {
armor = 0.30;
material = -1;
name = "wheel_1_1_steering";
passthrough = 0.3;
visual = "";
};
class HitRFWheel {
armor = 0.30;
material = -1;
name = "wheel_2_1_steering";
passthrough = 0.3;
visual = "";
};
class HitLBWheel {
armor = 0.30;
material = -1;
name = "wheel_1_2_steering";
passthrough = 0.3;
visual = "";
};
class HitRBWheel {
armor = 0.30;
material = -1;
name = "wheel_2_2_steering";
passthrough = 0.3;
visual = "";
};
class HitGlass1 {
armor = 0.4;
material = -1;
name = "glass1";
passthrough = 0;
visual = "glass1";
};
class HitGlass2 {
armor = 0.4;
material = -1;
name = "glass2";
passthrough = 0;
visual = "glass2";
};
class HitGlass3 {
armor = 0.2;
material = -1;
name = "glass3";
passthrough = 0;
visual = "glass3";
};
class HitGlass4 {
armor = 0.2;
material = -1;
name = "glass4";
passthrough = 0;
visual = "glass4";
};
};
class Damage {
mat[] = {"ca\wheeled\hmmwv\data\hmmwv_details.rvmat", "Ca\wheeled\HMMWV\data\hmmwv_details_damage.rvmat", "Ca\wheeled\HMMWV\data\hmmwv_details_destruct.rvmat", "ca\wheeled\hmmwv\data\hmmwv_body.rvmat", "Ca\wheeled\HMMWV\data\hmmwv_body_damage.rvmat", "Ca\wheeled\HMMWV\data\hmmwv_body_destruct.rvmat", "ca\wheeled\hmmwv\data\hmmwv_clocks.rvmat", "ca\wheeled\hmmwv\data\hmmwv_clocks.rvmat", "ca\wheeled\data\hmmwv_clocks_destruct.rvmat", "ca\wheeled\HMMWV\data\hmmwv_glass.rvmat", "ca\wheeled\HMMWV\data\hmmwv_glass_Half_D.rvmat", "ca\wheeled\HMMWV\data\hmmwv_glass_Half_D.rvmat", "ca\wheeled\HMMWV\data\hmmwv_glass_in.rvmat", "ca\wheeled\HMMWV\data\hmmwv_glass_in_Half_D.rvmat", "ca\wheeled\HMMWV\data\hmmwv_glass_in_Half_D.rvmat"};
tex[] = {};
};
};
class RubberBoat;
class PBX: RubberBoat {
cargoaction[] = {"PBX_Cargo01", "PBX_Cargo02", "PBX_Cargo03"};
crew = "";
displayname = "PBX";
driveraction = "PBX_Driver";
extcameraposition[] = {0, 4, -14};
faction = "RU";
icon = "\Ca\water\Data\map_ico\icomap_rubber_CA.paa";
mapsize = 6;
maxspeed = 65;
model = "\ca\water\PBX";
picture = "\ca\water\data\ico\pbx_CA.paa";
scope = 2;
side = 0;
transportsoldier = 3;
typicalcargo[] = {};
class TransportMagazines {};
class Library {
libtextdesc = "The PBX is a Combat Rubber Craft very similar to the CRRC in design. It is intended to be used for maritime raids and infiltration, as well as riverine operations.";
};
class Damage {
mat[] = {"ca\water\data\pbx_engine.rvmat", "ca\water\data\pbx_engine.rvmat", "ca\water\data\pbx_engine_destruct.rvmat", "ca\water\data\pbx_01.rvmat", "ca\water\data\pbx_01.rvmat", "ca\water\data\pbx_01_destruct.rvmat", "ca\water\data\pbx_02.rvmat", "ca\water\data\pbx_02.rvmat", "ca\water\data\pbx_02_destruct.rvmat"};
tex[] = {};
};
transportMaxMagazines = 50;
transportMaxWeapons = 5;
transportMaxBackpacks = 1;
};
class TT650_Base;
class TT650_Ins: TT650_Base {
crew = "";
faction = "INS";
hiddenselectionstextures[] = {"\ca\wheeled3\tt650\data\Yam650_skin1_CO.paa"};
scope = 2;
side = 0;
typicalcargo[] = {};
};
class V3S_Base;
class V3S_Civ: V3S_Base {
crew = "";
faction = "CIV";
rarityurban = 0.3;
scope = 2;
side = 3;
typicalcargo[] = {};
class Library {
libtextdesc = "The V3S is a Czech-made military 6x6 cargo truck capable of carrying cargo up to 5 tons, or up to 3 tons in rough terrain.<br/>This one is a harmless civilian vehicle.";
};
};
class SkodaBase;
class car_hatchback: SkodaBase {
armorcrash0[] = {"Ca\sounds\Vehicles\Crash\crash_vehicle_01", 0.707946, 1, 200};
armorcrash1[] = {"Ca\sounds\Vehicles\Crash\crash_vehicle_02", 0.707946, 1, 200};
armorcrash2[] = {"Ca\sounds\Vehicles\Crash\crash_vehicle_03", 0.707946, 1, 200};
armorcrash3[] = {"Ca\sounds\Vehicles\Crash\crash_vehicle_04", 0.707946, 1, 200};
brakedistance = 10;
buildcrash0[] = {"Ca\sounds\Vehicles\Crash\crash_building_01", 0.707946, 1, 200};
buildcrash1[] = {"Ca\sounds\Vehicles\Crash\crash_building_02", 0.707946, 1, 200};
buildcrash2[] = {"Ca\sounds\Vehicles\Crash\crash_building_03", 0.707946, 1, 200};
buildcrash3[] = {"Ca\sounds\Vehicles\Crash\crash_building_04", 0.707946, 1, 200};
cargoaction[] = {"Hatchback_Cargo01"};
cargoiscodriver[] = {1, 0};
crew = "";
displayname = "Old hatchback";
driveraction = "Hatchback_Driver";
faction = "CIV";
hiddenselections[] = {"Camo1"};
hiddenselectionstextures[] = {"\ca\wheeled\data\hatchback_co.paa"};
icon = "\Ca\wheeled\data\map_ico\icomap_skoda_CA.paa";
mapsize = 6;
maxspeed = 125;
model = "\ca\Wheeled\car_hatchback";
picture = "\Ca\wheeled\data\ico\car_hatchback_CA.paa";
rarityurban = 0.6;
scope = 2;
soundarmorcrash[] = {"ArmorCrash0", 0.25, "ArmorCrash1", 0.25, "ArmorCrash2", 0.25, "ArmorCrash3", 0.25};
soundbuildingcrash[] = {"buildCrash0", 0.25, "buildCrash1", 0.25, "buildCrash2", 0.25, "buildCrash3", 0.25};
soundengineoffext[] = {"ca\sounds\vehicles\Wheeled\sedan\ext\ext-sedan-stop-1", 0.398107, 1, 250};
soundengineoffint[] = {"ca\sounds\vehicles\Wheeled\sedan\int\int-sedan-stop-1", 0.398107, 1};
soundengineonext[] = {"ca\sounds\vehicles\Wheeled\sedan\ext\ext-sedan-start-1", 0.398107, 1, 250};
soundengineonint[] = {"ca\sounds\vehicles\Wheeled\sedan\int\int-sedan-start-1", 0.398107, 1};
soundgear[] = {"", "5.62341e-005", 1};
soundgetin[] = {"ca\sounds\vehicles\Wheeled\sedan\ext\ext-sedan-getout-1", 0.316228, 1};
soundgetout[] = {"ca\sounds\vehicles\Wheeled\sedan\ext\ext-sedan-getout-1", 0.316228, 1, 30};
soundwoodcrash[] = {"woodCrash0", 0.166, "woodCrash1", 0.166, "woodCrash2", 0.166, "woodCrash3", 0.166, "woodCrash4", 0.166, "woodCrash5", 0.166};
typicalcargo[] = {};
wheelcircumference = 2.148;
woodcrash0[] = {"Ca\sounds\Vehicles\Crash\crash_mix_wood_01", 0.707946, 1, 200};
woodcrash1[] = {"Ca\sounds\Vehicles\Crash\crash_mix_wood_02", 0.707946, 1, 200};
woodcrash2[] = {"Ca\sounds\Vehicles\Crash\crash_mix_wood_03", 0.707946, 1, 200};
woodcrash3[] = {"Ca\sounds\Vehicles\Crash\crash_mix_wood_04", 0.707946, 1, 200};
woodcrash4[] = {"Ca\sounds\Vehicles\Crash\crash_mix_wood_05", 0.707946, 1, 200};
woodcrash5[] = {"Ca\sounds\Vehicles\Crash\crash_mix_wood_06", 0.707946, 1, 200};
class SoundEvents {
class AccelerationIn {
expression = "(engineOn*(1-camPos))*gmeterZ";
limit = 0.5;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\sedan\int\int-sedan-acce-1", 0.398107, 1};
};
class AccelerationOut {
expression = "(engineOn*camPos)*gmeterZ";
limit = 0.5;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\sedan\ext\ext-sedan-acce-1", 0.398107, 1, 250};
};
};
class Sounds {
class Engine {
frequency = "(randomizer*0.05+0.95)*rpm";
sound[] = {"\ca\sounds\Vehicles\Wheeled\sedan\ext\ext-sedan-low-1", 0.398107, 0.9, 300};
volume = "engineOn*camPos*(rpm factor[0.6, 0.2])";
};
class EngineHighOut {
frequency = "(randomizer*0.05+0.95)*rpm";
sound[] = {"\ca\sounds\Vehicles\Wheeled\sedan\ext\ext-sedan-high-1", 0.398107, 0.8, 380};
volume = "engineOn*camPos*(rpm factor[0.45, 0.9])";
};
class IdleOut {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\sedan\ext\ext-sedan-idle-1", 0.281838, 1, 200};
volume = "engineOn*camPos*(rpm factor[0.3, 0])";
};
class TiresRockOut {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\ext\ext-tires-rock2", 0.316228, 1, 30};
volume = "camPos*rock*(speed factor[2, 20])";
};
class TiresSandOut {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\ext\ext-tires-sand2", 0.316228, 1, 30};
volume = "camPos*sand*(speed factor[2, 20])";
};
class TiresGrassOut {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\ext\ext-tires-grass3", 0.316228, 1, 30};
volume = "camPos*grass*(speed factor[2, 20])";
};
class TiresMudOut {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\ext\ext-tires-mud2", 0.316228, 1, 30};
volume = "camPos*mud*(speed factor[2, 20])";
};
class TiresGravelOut {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\ext\ext-tires-gravel2", 0.316228, 1, 30};
volume = "camPos*gravel*(speed factor[2, 20])";
};
class TiresAsphaltOut {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\ext\ext-tires-asphalt3", 0.316228, 1, 30};
volume = "camPos*asphalt*(speed factor[2, 20])";
};
class NoiseOut {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Noises\ext\int-noise3", 0.316228, 1, 30};
volume = "camPos*(damper0 max 0.04)*(speed factor[0, 8])";
};
class EngineLowIn {
frequency = "(randomizer*0.05+0.95)*rpm";
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\sedan\int\int-sedan-low-1", 0.562341, 0.8};
volume = "((engineOn*thrust) factor[0.65, 0.2])*(1-camPos)";
};
class EngineHighIn {
frequency = "(randomizer*0.05+0.95)*rpm";
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\sedan\int\int-sedan-high-1", 0.562341, 0.8};
volume = "((engineOn*thrust) factor[0.55, 0.95])*(1-camPos)";
};
class IdleIn {
frequency = 1;
sound[] = {"\ca\sounds\Vehicles\Wheeled\sedan\int\int-sedan-idle-1", 0.316228, 1};
volume = "engineOn*(rpm factor[0.3, 0])*(1-camPos)";
};
class TiresRockIn {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\int\int-tires-rock2", 0.177828, 1};
volume = "(1-camPos)*rock*(speed factor[2, 20])";
};
class TiresSandIn {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\int\int-tires-sand2", 0.177828, 1};
volume = "(1-camPos)*sand*(speed factor[2, 20])";
};
class TiresGrassIn {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\int\int-tires-grass3", 0.177828, 1};
volume = "(1-camPos)*grass*(speed factor[2, 20])";
};
class TiresMudIn {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\int\int-tires-mud2", 0.177828, 1};
volume = "(1-camPos)*mud*(speed factor[2, 20])";
};
class TiresGravelIn {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\int\int-tires-gravel2", 0.177828, 1};
volume = "(1-camPos)*gravel*(speed factor[2, 20])";
};
class TiresAsphaltIn {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\Tires\int\int-tires-asphalt3", 0.177828, 1};
volume = "(1-camPos)*asphalt*(speed factor[2, 20])";
};
class NoiseIn {
frequency = 1;
sound[] = {"\ca\SOUNDS\Vehicles\Wheeled\BUS\int\noise3", 0.177828, 1};
volume = "(damper0 max 0.04)*(speed factor[0, 8])*(1-camPos)";
};
class Movement {
frequency = 1;
sound = "soundEnviron";
volume = 0;
};
};
class Damage {
mat[] = {"ca\wheeled\data\hatchback.rvmat", "ca\wheeled\data\hatchback.rvmat", "ca\wheeled\data\hatchback_destruct.rvmat", "ca\wheeled\data\hatchback.rvmat", "ca\wheeled\data\hatchback.rvmat", "ca\wheeled\data\hatchback_destruct.rvmat", "ca\wheeled\data\detailmapy\auta_skla.rvmat", "ca\wheeled\data\detailmapy\auta_skla_damage.rvmat", "ca\wheeled\data\detailmapy\auta_skla_damage.rvmat", "ca\wheeled\data\detailmapy\auta_skla_in.rvmat", "ca\wheeled\data\detailmapy\auta_skla_in_damage.rvmat", "ca\wheeled\data\detailmapy\auta_skla_in_damage.rvmat"};
tex[] = {};
};
class Library {
libtextdesc = "Civilian Car";
};
};
class UAZ_Unarmed_Base;
class UAZ_CDF: UAZ_Unarmed_Base {
accuracy = 0.3;
crew = "";
faction = "CDF";
hiddenselectionstextures[] = {"\ca\wheeled\data\Uaz_main_002_CO.paa"};
scope = 2;
side = 1;
typicalcargo[] = {};
};
class MH6J_DZ: AH6_Base_EP1
{
scope = 2;
@@ -954,27 +1106,6 @@ class Citizen1; // External class reference
{
displayName = "RHIB (Mk19)";
};
class RubberBoat: Boat
{
transportMaxMagazines = 50;
transportMaxWeapons = 5;
transportMaxBackpacks = 1;
};
class Zodiac: RubberBoat
{
displayName = "CRRC";
};
class PBX: RubberBoat
{
displayName = "PBX";
};
class PBX_ACR: Ship
{
displayName = "PBX";
transportMaxMagazines = 50;
transportMaxWeapons = 5;
transportMaxBackpacks = 1;
};
class M113Ambul_UN_EP1;
class M113Ambul_UN_EP1_DZ: M113Ambul_UN_EP1
{

View File

@@ -0,0 +1,26 @@
titleCut ["","BLACK FADED",10e10];
setViewDistance 3000;
setTerrainGrid 3.125;
0 fadeMusic 0;
playMusic ["dayz_track_death_1",16];
5 fadeMusic 0.5;
_target = [7377,2738,4];
_position = [8323,2483,33];
_camera = "camera" camCreate position player;
_camera cameraEffect ["internal","back"];
_camera camPrepareTarget _target;
_camera camPreparePos _position;
_camera camPrepareFov 0.5;
_camera camCommitPrepared 0;
sleep 0.01;
showCinemaBorder false;
waitUntil {preloadCamera _position};
titleCut ["","BLACK IN",3];

View File

@@ -1,4 +1,5 @@
private["_obj","_type","_config","_positions","_iPos","_nearBy","_itemType","_itemTypes","_itemChances","_lootChance","_weights","_cntWeights","_index"];
_obj = _this select 0;
_type = typeOf _obj;
_config = configFile >> "CfgBuildingLoot" >> _type;
@@ -17,6 +18,7 @@ _lootChance = getNumber (_config >> "lootChance");
_index = _weights select _index;
_itemType = _itemTypes select _index;
[_itemType select 0, _itemType select 1 , _iPos, 0.0] call spawn_loot;
_obj setVariable ["created",(DateToNumber date),true];
};
};
} forEach _positions;

View File

@@ -1,43 +1,47 @@
private["_obj","_type","_config","_canLoot","_originalPos","_unitTypes","_min","_max","_num","_clean","_positions","_zombieChance","_rnd","_iPos","_nearBy","_nearByPlayer"];_obj = _this select 0;
private["_obj","_type","_config","_canLoot","_unitTypes","_min","_max","_num","_zombieChance","_rnd","_noPlayerNear","_position","_clean","_positions","_iPos","_nearBy","_nearByPlayer"];
_obj = _this select 0;
_type = typeOf _obj;
_config = configFile >> "CfgBuildingLoot" >> _type;
_canLoot = isClass (_config);
_originalPos = getPosATL _obj;
if (_canLoot and placevault) then {
if (dayz_maxCurrentZeds > dayz_maxZeds) exitwith {};
if (dayz_CurrentZombies > dayz_maxGlobalZombies) exitwith {};
if (dayz_spawnZombies > dayz_maxLocalZombies) exitwith {};
if (_canLoot) then {
//Get zombie class
_unitTypes = getArray (_config >> "zombieClass");
_min = getNumber (_config >> "minRoaming");
_max = getNumber (_config >> "maxRoaming");
//Walking Zombies
_num = round(random _max) min _min;
//Walking Zombies
//_num = round(random _max) min _min;
_num = round(random _max) max _min;
_config = configFile >> "CfgBuildingLoot" >> _type;
//Get zombie class
//Get zombie class
_zombieChance = getNumber (_config >> "zombieChance");
_rnd = random 0.5;
_chance = round(random 20);
_rnd = random 1;
//if (_rnd < _zombieChance) then {
if ((_chance % 2) == 0) then {
_noPlayerNear = (count ((getPosATL _obj) nearEntities ["CAManBase",30])) == 0;
if (_noPlayerNear) then {
_position = _obj buildingExit 0;
if ((_position select 0) == 0) then {
//_position = _obj buildingExit 0;
//if ((_position select 0) == 0) then {
_position = getPosATL _obj;
};
//diag_log ("Class: " + _type + " / Zombies: " + str(_unitTypes) + " / Walking: " + str(_num));
//};
//diag_log ("Class: " + _type + " / Zombies: " + str(_unitTypes) + " / Walking: " + str(_num));
for "_i" from 1 to _num do
{
[_position,_unitTypes] call zombie_generate;
[_position,true,_unitTypes] call zombie_generate;
};
};
};
//};
//Add Internal Zombies
_clean = {alive _x} count ((getPosATL _obj) nearEntities ["zZombie_Base",(sizeOf _type)]) == 0;
if (_clean) then {
@@ -48,13 +52,11 @@ if (_canLoot and placevault) then {
_rnd = random 1;
if (_rnd < _zombieChance) then {
_iPos = _obj modelToWorld _x;
_nearBy = {alive _x} count nearestObjects [_iPos , ["zZombie_Base"],3] > 0;
_nearByPlayer = ({isPlayer _x} count (_iPos nearEntities ["CAManBase",30])) > 0;
_nearBy = {alive _x} count nearestObjects [_iPos, ["zZombie_Base"],1] > 0;
_nearByPlayer = ({isPlayer _x} count (_iPos nearEntities ["CAManBase",30])) > 0;
//diag_log ("BUILDING: " + _type + " / " + str(_nearBy) + " / " + str(_nearByPlayer));
if (!_nearByPlayer and !_nearBy) then {
[_iPos,_unitTypes] call zombie_generate;
[_iPos,true,_unitTypes] call zombie_generate;
};
};
} forEach _positions;

View File

@@ -42,7 +42,7 @@ while {_isAlive and _isSomeone} do {
_targetPos = getPosATL _target;
//Move to target
_agent moveTo _targetPos;
_agent forceSpeed 6;
_agent forceSpeed 8;
sleep 1;
};
//LOOP

View File

@@ -249,7 +249,7 @@ if ((!_isClose or !_hasPatient) and r_action) then {
};
//Pain Effects
if (r_player_inpain and !r_player_unconscious) then {
playSound "breath_1";
addCamShake [2, 1, 25];
};
//if (r_player_inpain and !r_player_unconscious) then {
// playSound "breath_1";
// addCamShake [2, 1, 25];
//};

View File

@@ -30,7 +30,9 @@ _unitIsPlayer = _unit == player;
if (_isPlayer) then {
if (_damage > 0.1) then {
dayz_canDisconnect = false;
["dayzDiscoAdd",getPlayerUID player] call callRpcProcedure;
//["dayzDiscoAdd",getPlayerUID player] call callRpcProcedure;
dayzDiscoAdd = getPlayerUID player;
publicVariable "dayzDiscoAdd";
dayz_damageCounter = time;
@@ -55,7 +57,9 @@ if (_unitIsPlayer) then {
_myKills = 200 - (((player getVariable ["humanKills",0]) / 30) * 100);
//Process Morality Hit
_humanityHit = -(_myKills * _damage);
["dayzHumanity",[_source,_humanityHit,30]] call broadcastRpcCallAll;
//["dayzHumanity",[_source,_humanityHit,30]] call broadcastRpcCallAll;
dayzHumanity = [_this select 0,_this select 1,30];
publicVariable "dayzHumanity";
};
};
};
@@ -96,7 +100,7 @@ if (_hit in USEC_MinorWounds) then {
} else {
[_unit,_hit,(_damage / 4)] call object_processHit;
};
} else {;
} else {
[_unit,_hit,(_damage / 2)] call object_processHit;
};
if (_ammo == "") then {
@@ -165,7 +169,9 @@ if (_damage > 0.4) then { //0.25
if(!_isPZombie) then {
//Create Wound
_unit setVariable[_wound,true,true];
["usecBleed",[_unit,_wound,_hit]] call broadcastRpcCallAll;
[_unit,_wound,_hit] spawn fnc_usec_damageBleed;
usecBleed = [_unit,_wound,_hit];
publicVariable "usecBleed";
//Set Injured if not already
_isInjured = _unit getVariable["USEC_injured",false];
@@ -180,7 +186,7 @@ if (_damage > 0.4) then { //0.25
if (!_lowBlood) then {
_unit setVariable["USEC_lowBlood",true,true];
};
if (_unitIsPlayer) then {
if (_unitIsPlayer) then {
r_player_injured = true;
};
};

View File

@@ -7,6 +7,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
private["_isPZombie","_vehicle","_inVehicle","_bag","_classbag","_isWater","_hasAntiB","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_hasTent","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_Unlock","_lock","_allFixed","_hitpoints","_damage","_part","_cmpt","_color","_string","_handle","_trader_id","_category","_buy","_buy2","_buy3","_buy1","_buy4","_buy5","_cantrader","_cantrader1","_buy6","_zparts1","_zparts2","_zparts3","_zparts4","_metals1","_metals2","_metals4","_metals3","_metals5","_dogHandle","_lieDown","_warn"];
_vehicle = vehicle player;
_isPZombie = player isKindOf "PZombie_VB";
_inVehicle = (_vehicle != player);
_bag = unitBackpack player;
_classbag = typeOf _bag;
@@ -15,7 +16,13 @@ _hasAntiB = "ItemAntibiotic" in magazines player;
_hasFuelE = "ItemJerrycanEmpty" in magazines player;
//boiled Water
_hasbottleitem = "ItemWaterbottle" in magazines player;
_hastinitem = ("TrashTinCan" in magazines player) or ("ItemSodaEmpty" in magazines player);
_hastinitem = false;
{
if (_x in magazines player) then {
_hastinitem = true;
};
} forEach boil_tin_cans;
_hasKnife = "ItemKnife" in items player;
@@ -33,7 +40,7 @@ if (!isNull _nearLight) then {
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
//Grab Flare
if (_canPickLight and !dayz_hasLight) then {
if (_canPickLight and !dayz_hasLight and !_isPZombie) then {
if (s_player_grabflare < 0) then {
_text = getText (configFile >> "CfgAmmo" >> (typeOf _nearLight) >> "displayName");
s_player_grabflare = player addAction [format[localize "str_actions_medical_15",_text], "\z\addons\dayz_code\actions\flare_pickup.sqf",_nearLight, 1, false, true, "", ""];
@@ -46,7 +53,7 @@ if (_canPickLight and !dayz_hasLight) then {
s_player_removeflare = -1;
};
_isPZombie = player isKindOf "PZombie_VB";
if(_isPZombie) then {
//_state = animationState player;
//hint str(_state);
@@ -59,7 +66,7 @@ if(_isPZombie) then {
};
if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6)) then { //Has some kind of target
if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cursorTarget < 6)) then { //Has some kind of target
_isHarvested = cursorTarget getVariable["meatHarvested",false];
_isVehicle = cursorTarget isKindOf "AllVehicles";
_isVehicletype = typeOf cursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"];
@@ -76,6 +83,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
_canmove = canmove cursorTarget;
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
_rawmeat = meatraw;
_hasRawMeat = false;
{
@@ -84,6 +92,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
};
} forEach _rawmeat;
if (_hasFuelE) then {
_isFuel = (cursorTarget isKindOf "Land_Ind_TankSmall") or (cursorTarget isKindOf "Land_fuel_tank_big") or (cursorTarget isKindOf "Land_fuel_tank_stairs") or (cursorTarget isKindOf "Land_fuel_tank_stairs_ep1") or (cursorTarget isKindOf "Land_wagon_tanker") or (cursorTarget isKindOf "Land_fuelstation") or (cursorTarget isKindOf "Land_fuelstation_army");
};
@@ -288,7 +297,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 6))
//Repairing Vehicles
if (_isVehicle and (dayz_myCursorTarget != cursorTarget) and !_isMan and _hasToolbox and (damage cursorTarget < 1)) then {
if ((dayz_myCursorTarget != cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage cursorTarget < 1)) then {
if (s_player_repair_crtl < 0) then {

View File

@@ -8,8 +8,6 @@ if (local _animalbody) then {
_animalbody addMagazine _rawfoodtype;
};
sleep 1;
[time, _animalbody] spawn {
private ["_timer", "_body"];
_timer = _this select 0;
@@ -17,7 +15,10 @@ if (local _animalbody) then {
while {(count magazines _body >0) and (time - _timer < 300) } do {
sleep 5;
};
["dayzHideBody",_body] call broadcastRpcCallAll;
//["dayzHideBody",_body] call broadcastRpcCallAll;
dayzHideBody = _body;
hideBody _body; // local player
publicVariable "dayzHideBody"; // remote player
sleep 5;
deleteVehicle _body;
true;

View File

@@ -1,20 +1,30 @@
private["_item","_qty","_type","_meat","_loop"];
_item = _this select 0;
_qty = _this select 1;
_item = _zombiebody select 0;
_qty = _zombiebody 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;
[time, _zombiebody] spawn {
private ["_timer", "_body"];
_timer = _zombiebody select 0;
_body = _zombiebody select 1;
while {(count magazines _body >0) and (time - _timer < 300) } do {
sleep 5;
};
//["dayzHideBody",_body] call broadcastRpcCallAll;
dayzHideBody = _body;
hideBody _body; // local player
publicVariable "dayzHideBody"; // remote player
sleep 5;
deleteVehicle _body;
true;
};
["dayzHideBodyZ",_item] call broadcastRpcCallAll;
sleep 10;
deleteVehicle _item;
} else {

View File

@@ -9,8 +9,18 @@ if (_selection != "" and local _unit) then {
//player sidechat str _damage;
_unit setVariable [_strH,_damage,true];
if (_damage == 0) then {
["dayzUpdateVehicle",[_unit,"repair"]] call callRpcProcedure;
if (isServer) then {
[_unit,"repair"] call server_updateObject
} else {
dayzUpdateVehicle = [_unit,"repair"];
publicVariable "dayzUpdateVehicle";
};
} else {
["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
if (isServer) then {
[_unit,"damage"] call server_updateObject
} else {
dayzUpdateVehicle = [_unit,"damage"];
publicVariable "dayzUpdateVehicle";
};
};
};

View File

@@ -12,7 +12,9 @@ if ((_selection != "") and local _unit) then {
_unit setVariable [_strH,_total,true];
if (_damage >= 1) then {
["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
//["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
dayzUpdateVehicle = [_unit,"damage"];
publicVariable "dayzUpdateVehicle";
};
} else {

View File

@@ -2,8 +2,6 @@ private["_unit","_type","_chance","_rnd","_sound","_local","_dis"];
_unit = _this select 0;
_type = _this select 1;
_chance = _this select 2;
_local = _this select 3;
_dis = 40;
_num = switch (_type) do {
default {0};
@@ -23,8 +21,17 @@ _num = switch (_type) do {
case "dog_qq": {2};
};
if (_type in ["shout","hit","attack","scream","breath","spotted"]) then {
_dis = 100;
if (count _this > 4) then {
_dis = _this select 4;
_local = ({isPlayer _x} count (_unit nearEntities ["AllVehicles",_dis]) < 2);
} else {
_local = _this select 3;
if (_type in ["shout","hit","attack","scream","breath","spotted"]) then {
_dis = 100;
} else {
_dis = 40;
};
};
_isWoman = getText(configFile >> "cfgVehicles" >> (typeOf _unit) >> "TextPlural") == "Women";

View File

@@ -4,7 +4,15 @@ _unit = _this select 0;
_distance = _this select 1;
_doRun = _this select 2;
_pos = _this select 3;
_listTalk = _pos nearEntities ["zZombie_Base",_distance * 2];
_listTalk = _pos nearEntities ["zZombie_Base",_distance/2];
if ("ItemMap_Debug" in items player) then {
diag_log ("alertzeds Unit: " +str(_unit));
diag_log ("alertzeds Distance: " +str(_distance/2));
diag_log ("alertzeds DoRun: " +str(_doRun));
diag_log ("alertzeds Pos: " +str(_pos));
diag_log ("alertzeds ListTalk: " +str(_listTalk));
};
//hint str(_listTalk);

View File

@@ -2,6 +2,7 @@ private["_unit","_ammo","_audible","_distance","_listTalk","_weapon","_projectil
_unit = _this select 0;
_weapon = _this select 1;
_ammo = _this select 4;
_magazine = _this select 5;
_projectile = _this select 6;
_projectile = nearestObject [_unit, _ammo];
@@ -9,6 +10,14 @@ _vUp = vectorUp _projectile;
_endPos = getPosATL _projectile;
_dir = 0;
if (_magazine == "Quiver") then {
_ammo = player ammo "Crossbow_DZ";
if (_ammo > 0) then {
player removeMagazines "Quiver";
player addMagazine ["Quiver", _ammo];
};
};
while {alive _projectile} do {
_endPos = getPosATL _projectile;
_vUp = vectorUp _projectile;
@@ -21,7 +30,7 @@ _doLoop = true;
_countr = 0;
if (_height < 100) then {
_bolt = createVehicle ["BoltSteelF", _endPos, [], 0, "CAN_COLLIDE"];
_bolt = createVehicle ["WoodenArrowF", _endPos, [], 0, "CAN_COLLIDE"];
_bolt setPosATL _endPos;
_bolt setDir (getDir _unit);
_bolt setVectorUp _vUp;
@@ -35,7 +44,6 @@ if (_height < 100) then {
sleep 0.1;
};
if (count _hitArray > 0) then {
_hitObject = _hitArray select 0;
_hitSelection = _hitArray select 1;

View File

@@ -13,9 +13,11 @@ if (r_player_infected) then {
};
//Send Death Notice
["dayzDeath",[dayz_characterID,0,_body,_playerID,dayz_playerName,_infected]] call callRpcProcedure;
//["dayzDeath",[dayz_characterID,0,_body,_playerID,dayz_playerName,_infected]] call callRpcProcedure;
dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName,_infected];
publicVariableServer "dayzDeath";
_id = [player,50,true,getPosATL player] spawn player_alertZombies;
_id = [player,20,true,getPosATL player] spawn player_alertZombies;
sleep 0.5;
@@ -62,7 +64,9 @@ if (count _array > 0) then {
_wait = 0;
};
if (!_canHitFree and !_isBandit) then {
["dayzHumanity",[_source,_humanity,_wait]] call broadcastRpcCallAll;
//["dayzHumanity",[_source,_humanity,_wait]] call broadcastRpcCallAll;
dayzHumanity = [_source,_humanity,_wait];
publicVariable "dayzHumanity";
};
};
};

View File

@@ -43,14 +43,6 @@ if (_ammo isKindOf "SmokeShell") then {
//Check if need to place arrow
if (_ammo isKindOf "Bolt") then {
_id = _this spawn player_crossbowBolt;
// Reload animation if more that 1 in mag/pack
_count = player ammo _weapon;
if(_count >= 1) then {
_unit playActionNow "reloadMagazine";
};
};
if (_ammo isKindOf "GrenadeHand") then {
@@ -60,14 +52,16 @@ if (_ammo isKindOf "SmokeShell") then {
if (_ammo isKindOf "RoadFlare") then {
//hint str(_ammo);
_projectile = nearestObject [_unit, "RoadFlare"];
["dayzRoadFlare",[_projectile,0]] call broadcastRpcCallAll;
_id = [_projectile,0] spawn object_roadFlare;
dayzRoadFlare = [_projectile,0];
publicVariable "dayzRoadFlare";
_id = _this spawn player_throwObject;
};
if (_ammo isKindOf "ChemLight") then {
_projectile = nearestObject [_unit, "ChemLight"];
["dayzRoadFlare",[_projectile,1]] call broadcastRpcCallAll;
_id = [_projectile,1] spawn object_roadFlare;
dayzRoadFlare = [_projectile,1];
publicVariable "dayzRoadFlare";
_id = _this spawn player_throwObject;
};
};

View File

@@ -16,6 +16,9 @@ if (count _inventory > 0) then {
_item = _x;
_val = -1;
};
if (_item == "BoltSteel") then { _item = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
//Is item legal?
_isOK = isClass(configFile >> "CfgMagazines" >> _item);
if (_isOK) then {
@@ -30,6 +33,8 @@ if (count _inventory > 0) then {
//Add weapons
{
if (_x == "Crossbow") then { _x = "Crossbow_DZ" }; // Convert Crossbow to Crossbow_DZ
//Is item legal?
_isOK = isClass(configFile >> "CfgWeapons" >> _x);
if (_isOK) then {

View File

@@ -1,7 +1,10 @@
private ["_objects"];
_objects = nearestObjects [getPosATL player, ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage","VaultStorage"], 10];
{
["dayzUpdateVehicle",[_x,"gear"]] call callRpcProcedure;
//["dayzUpdateVehicle",[_x,"gear"]] call callRpcProcedure;
dayzUpdateVehicle = [_x,"gear"];
publicVariable "dayzUpdateVehicle";
} foreach _objects;
private["_dialog","_magazineArray","_control","_item","_val","_max"];
@@ -18,6 +21,7 @@ for "_i" from 109 to 120 do
_val = gearSlotAmmoCount _control;
_max = getNumber (configFile >> "CfgMagazines" >> _item >> "count");
if (_item != "") then {
if (_item == "BoltSteel") then { _item = "WoodenArrow" };
if (_val != _max) then {
_magazineArray set [count _magazineArray,[_item,_val]];
} else {

View File

@@ -46,7 +46,9 @@ if (count _medical > 0) then {
//Add Wounds
{
player setVariable[_x,true,true];
["usecBleed",[player,_x,_hit]] call broadcastRpcCallAll;
//["usecBleed",[player,_x,_hit]] call broadcastRpcCallAll;
usecBleed = [player,_x,0];
publicVariable "usecBleed";
} forEach (_medical select 8);
//Add fractures

View File

@@ -10,31 +10,38 @@ private["_display","_btnRespawn","_btnAbort","_timeOut","_timeMax","_isDead"];
_btnAbort ctrlEnable false;
_timeOut = 0;
_timeMax = 30;
dayz_lastCheckBit = time;
if(r_player_dead) exitWith {_btnAbort ctrlEnable true;};
if(r_fracture_legs) exitWith {_btnRespawn ctrlEnable true;};
if(r_fracture_legs) exitWith {_btnRespawn ctrlEnable true; _btnAbort ctrlEnable true;};
//force gear save
if (time - dayz_lastCheckBit > 10) then {
call dayz_forceSave;
};
while {!isNull _display} do {
switch true do {
case ({isPlayer _x} count (player nearEntities ["AllVehicles", 6]) > 1) : {
_btnAbort ctrlEnable false;
cutText ["Cannot Abort near another player!", "PLAIN DOWN"];
cutText [format[localize "str_abort_playerclose",_text], "PLAIN DOWN"];
};
case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 25]) > 0) : {
case (_timeOut < _timeMax && count (player nearEntities ["zZombie_Base", 35]) > 0) : {
_btnAbort ctrlEnable false;
cutText [format ["Can Abort in %1", (_timeMax - _timeOut)], "PLAIN DOWN"];
_timeOut = _timeOut + 1;
//cutText [format[localize "str_abort_zedsclose",_text, "PLAIN DOWN"];
};
case (player getVariable["combattimeout", 0] >= time) : {
_btnAbort ctrlEnable false;
cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
//cutText ["Cannot Abort while in combat!", "PLAIN DOWN"];
cutText [format[localize "str_abort_playerincombat",_text], "PLAIN DOWN"];
};
default {
_btnAbort ctrlEnable true;
cutText ["", "PLAIN DOWN"];
cutText ["", "PLAIN DOWN"];
};
};
sleep 1;
_timeOut = _timeOut + 1;
};
cutText ["", "PLAIN DOWN"];

View File

@@ -20,7 +20,12 @@ if(_ownerID == dayz_characterID) then {
_dir = direction _obj;
_pos = getposATL _obj;
[player,"tentpack",0,false] call dayz_zombieSpeak;
_dis=20;
_sfx = "tentpack";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 3;
//place tent (local)
@@ -34,7 +39,12 @@ if(_ownerID == dayz_characterID) then {
_magazines = getMagazineCargo _obj;
_backpacks = getBackpackCargo _obj;
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariable "dayzDeleteObj";
if (isServer) then {
dayzDeleteObj call server_deleteObj;
};
deleteVehicle _obj;
//Add weapons

View File

@@ -50,7 +50,10 @@ if(_ownerID == dayz_playerUID) then {
_backpacks = getBackpackCargo _obj;
*/
["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
deleteVehicle _obj;

View File

@@ -8,13 +8,18 @@ _maxZombies = dayz_maxLocalZombies;
_maxWildZombies = 3;
_age = -1;
_nearbyBuildings = [];
_radius = 300;
_radius = 200;
_position = getPosATL player;
//_maxZombies = 10;
if (_inVehicle) then {
_maxZombies = _maxZombies / 2;
};
if (_isAir) then {
_maxZombies = 5
};
//diag_log ("Type: " +str(_type));
@@ -23,7 +28,7 @@ _position = getPosATL player;
//_nearestCity = nearestLocations [getPos player, _locationstypes, _radius/2];
//_townname = text (_nearestCity select 0);
//_nearbytype = type (_nearestCity select 0);
/*
/*
switch (_nearbytype) do {
case "NameVillage": {
//_radius = 250;
@@ -35,19 +40,36 @@ switch (_nearbytype) do {
};
case "NameCityCapital": {
//_radius = 400;
_maxZombies = 50;
_maxZombies = 40;
};
};
*/
_spawnZombies = count (_position nearEntities ["zZombie_Base",_radius+100]) < _maxZombies;
_players = _position nearEntities ["AllPlayers",_radius+200];
dayz_maxGlobalZombies = 40;
{
dayz_maxGlobalZombies = dayz_maxGlobalZombies + 10;
} foreach _players;
_spawnZombies = _position nearEntities ["zZombie_Base",_radius+100];
dayz_spawnZombies = 0;
{
if (local _x) then
{
//diag_log ("Local");
dayz_spawnZombies = dayz_spawnZombies + 1;
};
} foreach _spawnZombies;
dayz_CurrentZombies = count (_position nearEntities ["zZombie_Base",_radius+200]);
if ("ItemMap_Debug" in items player) then {
deleteMarkerLocal "MaxZeds";
deleteMarkerLocal "Counter";
deleteMarkerLocal "Loot30";
deleteMarkerLocal "Loot120";
deleteMarkerLocal "Agro80";
_markerstr = createMarkerLocal ["MaxZeds", _position];
_markerstr setMarkerColorLocal "ColorYellow";
_markerstr setMarkerShapeLocal "ELLIPSE";
@@ -58,8 +80,14 @@ if ("ItemMap_Debug" in items player) then {
_markerstr1 setMarkerColorLocal "ColorRed";
_markerstr1 setMarkerShapeLocal "ELLIPSE";
_markerstr1 setMarkerBrushLocal "Border";
_markerstr1 setMarkerSizeLocal [_radius+100, _radius+100];
_markerstr1 setMarkerSizeLocal [_radius+100, _radius+100];
_markerstr2 = createMarkerLocal ["Agro80", _position];
_markerstr2 setMarkerColorLocal "ColorRed";
_markerstr2 setMarkerShapeLocal "ELLIPSE";
_markerstr2 setMarkerBrushLocal "Border";
_markerstr2 setMarkerSizeLocal [80, 80];
_markerstr2 = createMarkerLocal ["Loot30", _position];
_markerstr2 setMarkerColorLocal "ColorRed";
_markerstr2 setMarkerShapeLocal "ELLIPSE";
@@ -70,45 +98,68 @@ if ("ItemMap_Debug" in items player) then {
_markerstr3 setMarkerColorLocal "ColorBlue";
_markerstr3 setMarkerShapeLocal "ELLIPSE";
_markerstr3 setMarkerBrushLocal "Border";
_markerstr3 setMarkerSizeLocal [120, 120];
_markerstr3 setMarkerSizeLocal [120, 120];
diag_log ("SpawnWait: " +str(time - dayz_spawnWait));
diag_log ("LocalZombies: " +str(dayz_spawnZombies) + "/" +str(dayz_maxLocalZombies));
diag_log ("GlobalZombies: " +str(dayz_CurrentZombies) + "/" +str(dayz_maxGlobalZombies));
diag_log ("dayz_maxCurrentZeds: " +str(dayz_maxCurrentZeds) + "/" +str(dayz_maxZeds));
};
/*
switch (_type) do {
case "Zeds": {
_nearby = nearestObjects [_position, dayz_ZombieBuildings, _radius];
};
case "both": {
_nearby = nearestObjects [_position, ["building"], _radius];
};
case "Loot": {
_nearby = nearestObjects [_position, dayz_LootBuildings, _radius];
};
};
*/
_nearby = nearestObjects [_position, ["building"], _radius];
_nearby = _position nearObjects ["building",_radius];
_nearbyCount = count _nearby;
if (_nearbyCount < 1) exitwith {};
if (_nearbyCount < 1) exitwith
{
if ((dayz_spawnZombies < _maxWildZombies) and !_inVehicle) then {
[_position] call wild_spawnZombies;
};
};
{
_type = typeOf _x;
_config = configFile >> "CfgBuildingLoot" >> _type;
_canLoot = isClass (_config);
_dis = _x distance player;
//Loot
if ((_dis < 120) and (_dis > 30) and _canLoot and !_inVehicle) then {
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity] call player_spawnlootCheck;
_looted = (_x getVariable ["looted",-0.1]);
_cleared = (_x getVariable ["cleared",true]);
_dateNow = (DateToNumber date);
_age = (_dateNow - _looted) * 525948;
//diag_log ("SPAWN LOOT: " + _type + " Building is " + str(_age) + " old" );
if ((_age > 10) and (!_cleared)) then {
_nearByObj = nearestObjects [(getPosATL _x), ["WeaponHolder","WeaponHolderBase"],((sizeOf _type)+5)];
{deleteVehicle _x} forEach _nearByObj;
_x setVariable ["cleared",true,true];
_x setVariable ["looted",_dateNow,true];
};
if ((_age > 10) and (_cleared)) then {
//Register
_x setVariable ["looted",_dateNow,true];
//cleanup
_handle = [_x] spawn building_spawnLoot;
waitUntil{scriptDone _handle};
};
};
//Zeds
if ((time - dayz_spawnWait) > dayz_spawnDelay) then {
if (dayz_spawnZombies < _maxZombies) then {
if (_spawnZombies) then {
//hintSilent format["Spawning %1 / %2 <br /> total: %3 ",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
if (dayz_maxCurrentZeds < dayz_maxZeds) then {
if (dayz_CurrentZombies < dayz_maxGlobalZombies) then {
if (dayz_spawnZombies < dayz_maxLocalZombies) then {
//[_radius, _position, _inVehicle, _dateNow, _age, _locationstypes, _nearestCity, _maxZombies] call player_spawnzedCheck;
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
_dateNow = (DateToNumber date);
_age = (_dateNow - _zombied) * 525948;
if (_age > 3) then {
_x setVariable ["zombieSpawn",_dateNow,true];
[_x] call building_spawnZombies;
};
} else {
dayz_spawnWait = time;
};
};
} else {
//hintSilent format["Waiting %1 / %2 <br /> total: %3",dayz_spawnZombies,_maxZombies,count (_position nearEntities ["zZombie_Base",_radius+100])];
dayz_spawnWait = time;
dayz_spawnZombies = 0;
};
};
} forEach _nearby;

View File

@@ -9,11 +9,6 @@ _locationstypes = _this select 5;
_nearestCity = _this select 6;
_maxZombies = _this select 7;
/*
if (_inVehicle) then {
_maxZombies = _maxZombies / 2;
};
*/
_zombied = (_x getVariable ["zombieSpawn",-0.1]);
_dateNow = (DateToNumber date);

View File

@@ -128,6 +128,8 @@ if (_foodVal < 0.2) then {
if (_tempVal > 0.8) then { //TeeChange
_ctrlTemp call player_guiControlFlash;
} else {
_ctrlTemp ctrlShow true;
};
if (r_player_injured) then {

View File

@@ -32,8 +32,17 @@ if (_vehicle != player) then {
_damage = random 0.08;
_chance = round(random 12);
if ((_chance % 4) == 0) then {
_openVehicles = ["ATV_Base_EP1", "Motorcycle", "Bicycle"];
{
if (_vehicle isKindOf _x) exitWith {
player action ["eject", _vehicle];
};
} forEach _openVehicles;
};
if ((_wound == "Glass1") or (_wound == "Glass2") or (_wound == "Glass3") or (_wound == "Glass4") or (_wound == "Glass5") or (_wound == "Glass6")) then {
[_unit,"hit",2,true] call dayz_zombieSpeak;
[_unit,"hit",4,false] call dayz_zombieSpeak;
_strH = "hit_" + (_wound);
_dam = _vehicle getVariable [_strH,0];
_total = (_dam + _damage);
@@ -42,9 +51,6 @@ if (_vehicle != player) then {
//["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
if (_total >= 1) then {
if ((_chance % 4) == 0) then {
if ((_vehicle isKindOf "ATV_Base_EP1") or (_vehicle isKindOf "Motorcycle")) then { player action ["eject", _vehicle] };
};
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
_cnt = count (DAYZ_woundHit select 1);
_index = floor (random _cnt);
@@ -61,14 +67,20 @@ if (_vehicle != player) then {
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit";
[_unit,"hit",2,true] call dayz_zombieSpeak;
[_unit,"hit",2,false] call dayz_zombieSpeak;
} else {
["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
//["dayzHitV",[_vehicle, _wound, _total, _unit,"zombie"]] call broadcastRpcCallAll;
dayzHitV = [_vehicle, _wound, _total, _unit,"zombie"];
publicVariable "dayzHitV";
};
};
} else {
//Did he hit?
if ((_unit distance player) <= 3) then {
//_currentAnim = animationState _unit;
//diag_log ("Animation state: " +(_currentAnim));
//"amovpercmstpsnonwnondnon",
_attackanimations = ["zombiestandingattack1","zombiestandingattack2","zombiestandingattack3","zombiestandingattack4","zombiestandingattack5","zombiestandingattack6","zombiestandingattack7","zombiestandingattack8","zombiestandingattack9","zombiestandingattack10","zombiefeed1","zombiefeed2","zombiefeed3","zombiefeed4","zombiefeed5"];
if (((_unit distance player) <= 3) and ((animationState _unit) in _attackanimations)) then {
//check LOS
private[];
_tPos = (getPosASL _vehicle);
@@ -78,32 +90,24 @@ if (_vehicle != player) then {
//LOS check
_cantSee = [_unit,_vehicle] call dayz_losCheck;
if (!_cantSee) then {
if (_type == "dog") then {
_cnt = count (DAYZ_woundHit_dog select 1);
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
_cnt = count (DAYZ_woundHit select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit_dog select 1) select _index;
_wound = (DAYZ_woundHit_dog select 0) select _index;
_damage = 0.3 + random (1.0);
_index = (DAYZ_woundHit select 1) select _index;
_wound = (DAYZ_woundHit select 0) select _index;
} else {
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
_cnt = count (DAYZ_woundHit select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit select 1) select _index;
_wound = (DAYZ_woundHit select 0) select _index;
} else {
_cnt = count (DAYZ_woundHit_ok select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit_ok select 1) select _index;
_wound = (DAYZ_woundHit_ok select 0) select _index;
};
_damage = 0.1 + random (1.2);
_cnt = count (DAYZ_woundHit_ok select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit_ok select 1) select _index;
_wound = (DAYZ_woundHit_ok select 0) select _index;
};
_damage = 0.1 + random (1.2);
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit";
[_unit,"hit",2,true] call dayz_zombieSpeak;
[_unit,"hit",2,false] call dayz_zombieSpeak;
} else {
/*
_isZombieInside = [_unit,_building] call fnc_isInsideBuilding;
@@ -113,7 +117,7 @@ if (_vehicle != player) then {
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit";
[_unit,"hit",2,true] call dayz_zombieSpeak;
[_unit,"hit",2,false] call dayz_zombieSpeak;
};
*/
};

View File

@@ -1,28 +1,23 @@
private["_listTalk","_isZombie","_group","_eyeDir","_attacked","_continue","_type","_chance","_last","_audial","_distance","_refObj","_list","_scaleMvmt","_scalePose","_scaleLight","_anim","_activators","_nearFire","_nearFlare","_scaleAlert","_inAngle","_scaler","_initial","_tPos","_zPos","_cantSee"];
_refObj = vehicle player;
_listTalk = (position _refObj) nearEntities ["zZombie_Base",200];
_listTalk = (getPos _refObj) nearEntities ["zZombie_Base",80];
_pHeight = (getPosATL _refObj) select 2;
_attacked = false;
_multiplier = 1;
//_multiplier = 1;
//Old System
{
_continue = true;
if (typeOf _x == "DZ_Fin" || typeOf _x == "DZ_Pastor") then { _type = "dog"; } else { _type = "zombie"; };
//check if untamed dog;
if (_type == "dog") then {
_multiplier = 2;
if ((_x getVariable ["characterID", "0"] == "0") || (_x getVariable ["state", "passive"] == "passive") || (_x getVariable ["characterID", "0"] == dayz_characterID)) then {
_continue = false;
};
};
_type = "zombie";
_targets = _group getVariable ["targets",[]];
if (alive _x && _continue) then {
private["_dist"];
_dist = (_x distance _refObj);
_group = _x;
_chance = 1;
_chance = 1;
if ((_x distance player < dayz_areaAffect) and !(animationState _x == "ZombieFeed")) then {
if (_type == "zombie") then { [_x,"attack",(_chance),true] call dayz_zombieSpeak; };
//perform an attack
@@ -31,50 +26,43 @@ _multiplier = 1;
_delta = _pHeight - _entHeight;
if ( ((time - _last) > 1) and ((_delta < 1.5) and (_delta > -1.5)) ) then {
zedattack = [_x, _type] spawn player_zombieAttack;
_x setVariable["lastAttack",time];
_x setVariable["lastAttack",time];
};
_attacked = true;
} else {
if (_type == "zombie") then {
if (speed _x < 4) then {
[_x,"idle",(_chance + 4),true] call dayz_zombieSpeak;
} else {
[_x,"chase",(_chance + 3),true] call dayz_zombieSpeak;
if (speed _x < 4) then {
[_x,"idle",(_chance + 4),true] call dayz_zombieSpeak;
} else {
[_x,"chase",(_chance + 3),true] call dayz_zombieSpeak;
};
};
};
//Noise Activation
_targets = _group getVariable ["targets",[]];
if (!(_refObj in _targets)) then {
if (_dist < DAYZ_disAudial) then {
if (DAYZ_disAudial > 80) then {
_targets set [count _targets, driver _refObj];
_group setVariable ["targets",_targets,true];
if (!(_refObj in _targets)) then {
_targets set [count _targets, driver _refObj];
_group setVariable ["targets",_targets,true];
};
} else {
_chance = [_x,_dist,DAYZ_disAudial] call dayz_losChance;
//diag_log ("Visual Detection: " + str([_x,_dist]) + " " + str(_chance));
if ((random 1) < _chance) then {
_cantSee = [_x,_refObj] call dayz_losCheck;
if (!_cantSee) then {
if (_dist < (DAYZ_disAudial / 2)) then {
if (!(_refObj in _targets)) then {
_targets set [count _targets, driver _refObj];
_group setVariable ["targets",_targets,true];
} else {
if (_dist < (DAYZ_disAudial / 2)) then {
_targets set [count _targets, driver _refObj];
_group setVariable ["targets",_targets,true];
};
};
};
};
};
};
//Sight Activation
_targets = _group getVariable ["targets",[]];
if (!(_refObj in _targets)) then {
if (_dist < DAYZ_disVisual) then {
_chance = [_x,_dist,DAYZ_disVisual] call dayz_losChance;
//diag_log ("Visual Detection: " + str([_x,_dist]) + " " + str(_chance));
if ((random 1) < _chance) then {
//_chance = [_x,_dist,DAYZ_disVisual] call dayz_losChance;
//diag_log ("Visual Detection: m" + str([_x,_dist]) + " " + str(_chance));
//if ((random 1) < _chance) then {
//diag_log ("Chance Detection");
_tPos = (getPosASL _refObj);
_zPos = (getPosASL _x);
@@ -82,21 +70,236 @@ _multiplier = 1;
_eyeDir = direction _x;
_inAngle = [_zPos,_eyeDir,30,_tPos] call fnc_inAngleSector;
if (_inAngle) then {
//diag_log ("In Angle");
//LOS check
_cantSee = [_x,_refObj] call dayz_losCheck;
//diag_log ("LOS Check: " + str(_cantSee));
if (!_cantSee) then {
//diag_log ("Within LOS! Target");
_targets set [count _targets, driver _refObj];
_group setVariable ["targets",_targets,true];
if (!(_refObj in _targets)) then {
_targets set [count _targets, driver _refObj];
_group setVariable ["targets",_targets,true];
};
};
};
//};
};
};
};
//diag_log ("Targets Array: " +str(_targets));
} forEach _listTalk;
// New Systems
/*
{
_continue = true;
_type = "zombie";
_targets = _group getVariable ["targets",[]];
if (alive _x and _continue) then
{
if (local _x) then
{
private["_dist"];
_dist = (_x distance _refObj);
_chance = 1;
if ((_dist < dayz_areaAffect) and !(animationState _x == "ZombieFeed")) then
{
if (_type == "zombie") then { [_x,"attack",(_chance),true] call dayz_zombieSpeak; };
//perform an attack
_last = _x getVariable["lastAttack",0];
_entHeight = (getPosATL _x) select 2;
_delta = _pHeight - _entHeight;
if ( ((time - _last) > 1) and ((_delta < 1.5) and (_delta > -1.5)) ) then
{
[_x, _type] spawn player_zombieAttack;
_x setVariable["lastAttack",time];
};
_attacked = true;
}
else
{
if (_type == "zombie") then
{
if (speed _x < 4) then
{
[_x,"idle",(_chance + 4),true] call dayz_zombieSpeak;
}
else
{
[_x,"chase",(_chance + 3),true] call dayz_zombieSpeak;
};
};
};
//Noise Activation
_target = _x getVariable ["target",[]];
if (!(_refObj in _target)) then
{
if (_dist < DAYZ_disAudial) then
{
if (DAYZ_disAudial > 80) then
{
_target set [count _target,(driver _refObj)];
_x setVariable ["target",_target];
}
else
{
// _chance = [_x,_dist,DAYZ_disAudial] call dayz_losChance;
//diag_log ("Visual Detection: " + str([_x,_dist]) + " " + str(_chance));
// if ((random 1) < _chance) then {
_cantSee = [_x,_refObj] call dayz_losCheck;
if (!_cantSee) then
{
_target set [count _target,(driver _refObj)];
_x setVariable ["target",_target];
}
else
{
if (_dist < (DAYZ_disAudial / 2)) then
{
_target set [count _target,(driver _refObj)];
_x setVariable ["target",_target];
};
};
//};
};
};
};
//Sight Activation
_target = _x getVariable ["target",[]];
if (!(_refObj in _target)) then
{
if (_dist < DAYZ_disVisual) then
{
_chance = [_x,_dist,DAYZ_disVisual] call dayz_losChance;
//diag_log ("Visual Detection: " + str([_x,_dist]) + " " + str(_chance));
//if ((random 1) < _chance) then {
//diag_log ("Chance Detection");
_tPos = (getPosASL _refObj);
_zPos = (getPosASL _x);
//_eyeDir = _x call dayz_eyeDir;
_eyeDir = direction _x;
_inAngle = [_zPos,_eyeDir,30,_tPos] call fnc_inAngleSector;
if (_inAngle) then
{
//diag_log ("In Angle");
//LOS check
_cantSee = [_x,_refObj] call dayz_losCheck;
//diag_log ("LOS Check: " + str(_cantSee));
if (!_cantSee) then
{
_target set [count _target,(driver _refObj)];
_x setVariable ["target",_target];
};
};
//};
};
};
}
else
{
private["_dist"];
_dist = (_x distance _refObj);
_chance = 1;
if ((_x distance player < dayz_areaAffect) and !(animationState _x == "ZombieFeed")) then
{
if (_type == "zombie") then { [_x,"attack",(_chance),true] call dayz_zombieSpeak; };
//perform an attack
_last = _x getVariable["lastAttack",0];
_entHeight = (getPosATL _x) select 2;
_delta = _pHeight - _entHeight;
if ( ((time - _last) > 1) and ((_delta < 1.5) and (_delta > -1.5)) ) then
{
[_x, _type] spawn player_zombieAttack;
_x setVariable["lastAttack",time];
};
_attacked = true;
}
else
{
if (_type == "zombie") then
{
if (speed _x < 4) then
{
[_x,"idle",(_chance + 4),true] call dayz_zombieSpeak;
}
else
{
[_x,"chase",(_chance + 3),true] call dayz_zombieSpeak;
};
};
};
//Noise Activation
_targets = _x getVariable ["targets",[]];
if (!(_refObj in _targets)) then
{
if (_dist < DAYZ_disAudial) then
{
if (DAYZ_disAudial > 80) then
{
_targets set [count _targets,(driver _refObj)];
_x setVariable ["targets",_targets,true];
}
else
{
//_chance = [_x,_dist,DAYZ_disAudial] call dayz_losChance;
//diag_log ("Visual Detection: " + str([_x,_dist]) + " " + str(_chance));
//if ((random 1) < _chance) then {
_cantSee = [_x,_refObj] call dayz_losCheck;
if (!_cantSee) then
{
_targets set [count _targets,(driver _refObj)];
_x setVariable ["targets",_targets,true];
}
else
{
if (_dist < (DAYZ_disAudial / 2)) then
{
_targets set [count _targets,(driver _refObj)];
_x setVariable ["targets",_targets,true];
};
};
//};
};
};
};
//Sight Activation
_targets = _x getVariable ["targets",[]];
if (!(_refObj in _targets)) then
{
if (_dist < DAYZ_disVisual) then
{
//_chance = [_x,_dist,DAYZ_disVisual] call dayz_losChance;
//diag_log ("Visual Detection: " + str([_x,_dist]) + " " + str(_chance));
//if ((random 1) < _chance) then {
//diag_log ("Chance Detection");
_tPos = (getPosASL _refObj);
_zPos = (getPosASL _x);
//_eyeDir = _x call dayz_eyeDir;
_eyeDir = direction _x;
_inAngle = [_zPos,_eyeDir,30,_tPos] call fnc_inAngleSector;
if (_inAngle) then
{
//diag_log ("In Angle");
//LOS check
_cantSee = [_x,_refObj] call dayz_losCheck;
//diag_log ("LOS Check: " + str(_cantSee));
if (!_cantSee) then
{
//diag_log ("Within LOS! Target");
_targets set [count _targets,(driver _refObj)];
_x setVariable ["targets",_targets,true];
};
};
//};
};
};
};
};
} forEach _listTalk;
*/
if (_attacked) then {
if (r_player_unconscious) then {

View File

@@ -1,8 +1,9 @@
+private["_iItem","_iClass","_iPos","_radius","_itemTypes","_index","_item","_qty","_max","_tQty","_canType","_weights","_cntWeights","_dateNow"];
private["_iItem","_iClass","_iPos","_radius","_itemTypes","_index","_item","_qty","_max","_tQty","_canType","_weights","_cntWeights","_dateNow"];
_iItem = _this select 0;
_iClass = _this select 1;
_iPos = _this select 2;
_radius = _this select 3;
switch (_iClass) do {
default {
//Item is food, add random quantity of cans along with an item (if exists)
@@ -32,6 +33,7 @@ switch (_iClass) do {
_item addWeaponCargoGlobal [_iItem,1];
_mags = [] + getArray (configFile >> "cfgWeapons" >> _iItem >> "magazines");
if ((count _mags) > 0) then {
if (_mags select 0 == "Quiver") then { _mags set [0, "WoodenArrow"] }; // Prevent spawning a Quiver
_item addMagazineCargoGlobal [(_mags select 0), (round(random 2))];
};
};

View File

@@ -23,7 +23,13 @@ if (_dam < 1 ) then {
_unit setVariable [_strH,_total,true];
if ( !_needUpdate ) then {
_unit setVariable ["needUpdate",true,true];
["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
//["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
if (isServer) then {
[_unit, "damage"] call server_updateObject;
} else {
dayzUpdateVehicle = [_unit,"damage"];
publicVariable "dayzUpdateVehicle";
};
};
};
};

View File

@@ -9,7 +9,13 @@ _hitPoints = _unit call vehicle_getHitpoints;
_unit setVariable [_selection, 1, true];
} forEach _hitPoints;
["dayzUpdateVehicle",[_unit, "damage", true]] call callRpcProcedure;
//["dayzUpdateVehicle",[_unit, "damage"]] call callRpcProcedure;
if (isServer) then {
[_unit, "killed"] call server_updateObject;
} else {
dayzUpdateVehicle = [_unit, "killed"];
publicVariable "dayzUpdateVehicle";
};
_unit removeAllEventHandlers "HandleDamage";
_unit removeAllEventHandlers "Killed";

View File

@@ -1,10 +1,5 @@
private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"];
_position = _this select 0;
_maxZombies = _this select 1;
_totalzeds = dayz_spawnZombies;
diag_log ("totalzeds" +str"_totalzeds");
_player = _this select 0;
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
_doLoiter = true;
@@ -14,18 +9,13 @@ _agent = objNull;
_type = _unitTypes call BIS_fnc_selectRandom;
diag_log ("Wild Loaded");
//Create the Group and populate it
//diag_log ("Spawned: " + _type);
_radius = 40;
_method = "NONE";
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
_position = [_player,120,200,10,0,0,0] call BIS_fnc_findSafePos;
if (_nearByPlayer) then {
_position = [_position,55,100,10,0,0,0] call BIS_fnc_findSafePos;
};
_agent = createAgent [_type, _position, [], _radius, _method];
if (_doLoiter) then {
@@ -41,9 +31,6 @@ if (random 1 > 0.7) then {
_agent setUnitPos "Middle";
};
//diag_log ("CREATED: " + str(_agent));
if (isNull _agent) exitWith {
dayz_spawnZombies = dayz_spawnZombies - 1;
};
@@ -71,6 +58,4 @@ if (_rnd > 0.3) then {
};
//Start behavior
_id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";
diag_log ("Wild Ended");
_id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";

View File

@@ -1,35 +1,45 @@
private["_agent","_target","_targets","_targetDis","_c","_man","_manDis","_targets","_agent","_agentheight","_nearEnts","_rnd","_assigned","_range","_objects"];
_agent = _this;
_target = objNull;
/*
_local = [];
_remote = [];
*/
_targets = [];
_targetDis = [];
_range = 300;
_range = 120;
_manDis = 0;
_refobj = vehicle player;
_targets = _agent getVariable ["targets",[]];
/*
//Search for fires
if (count _targets == 0) then {
_fires = nearestObjects [_agent,["Land_Fire"],_range];
{
private["_dis"];
_dis = _x distance _agent;
_rnd = random 1;
if ((_dis < _range) and (inflamed _x) and !(_x in _targets) and (_rnd < 0.5)) then {
_targets set [count _targets,_x];
_targetDis set [count _targetDis,_dis];
};
} forEach _fires;
_local = _agent getVariable ["target",[]];
//diag_log ("Local is: " + str(_local));
_remote = _agent getVariable ["targets",[]];
//diag_log ("Remote is: " + str(_remote));
if (count _remote == 0) then
{
_targets = _local;
//diag_log ("Targets is: " + str(_targets));
}
else
{
_targets = _local + _remote;
//diag_log ("Local + Remote targets is: " + str(_targets));
};
*/
_targets = _agent getVariable ["targets",[]];
if (isNil "_targets") exitWith {};
//Search for objects
if (count _targets == 0) then {
_objects = nearestObjects [_agent,["ThrownObjects","GrenadeHandTimedWest","SmokeShell"],_range];
if (count _targets == 0) then
{
_objects = nearestObjects [_agent,["ThrownObjects","GrenadeHandTimedWest","SmokeShell"],50];
{
private["_dis"];
if (!(_x in _targets)) then {
if (!(_x in _targets)) then
{
_targets set [count _targets,_x];
_targetDis set [count _targetDis,_dis];
};
@@ -37,28 +47,37 @@ if (count _targets == 0) then {
};
//Find best target
if (count _targets > 0) then {
if (count _targets > 0) then
{
_man = _targets select 0;
_manDis = _man distance _agent;
//diag_log (str(_man) + str(_manDis));
{
private["_dis"];
_dis = _x distance _agent;
if (_dis < _manDis) then {
if (_dis < _manDis) then
{
_man = _x;
_manDis = _dis;
};
if (_x isKindOf "SmokeShell") then {
if (_dis > _range) then
{
_targets = _targets - [_x];
};
if (_x isKindOf "SmokeShell") then
{
_man = _x;
_manDis = _dis;
};
} forEach _targets;
_target = _man;
};
//Check if too far
if (_manDis > _range) then {
if (_manDis > _range) then
{
_targets = _targets - [_target];
_target = objNull;
};
_target;
_target

View File

@@ -1,9 +1,13 @@
private["_position","_doLoiter","_unitTypes","_isNoone","_loot","_array","_agent","_type","_radius","_method","_nearByPlayer","_attempt","_myDest","_newDest","_lootType"];
_position = _this select 0;
_unitTypes = _this select 1;
_doLoiter = true;
_doLoiter = _this select 1;
_unitTypes = _this select 2;
_isNoone = {isPlayer _x} count (_position nearEntities ["CAManBase",30]) == 0;
if (dayz_maxCurrentZeds > dayz_maxZeds) exitwith {};
if (dayz_CurrentZombies > dayz_maxGlobalZombies) exitwith {};
if (dayz_spawnZombies > dayz_maxLocalZombies) exitwith {};
_isNoone = {isPlayer _x} count (_position nearEntities [["AllVehicles","CAManBase"],30]) == 0;
_loot = "";
_array = [];
_agent = objNull;
@@ -27,13 +31,6 @@ if (_doLoiter) then {
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
_agent = createAgent [_type, _position, [], _radius, _method];
/*
if(!(_agent == objNull)) then {
dayzSpawnZed = [_agent];
publicVariableServer "dayzSpawnZed";
};
*/
if (_doLoiter) then {
_agent setPosATL _position;
//_agent setVariable ["doLoiter",true,true];
@@ -45,31 +42,38 @@ dayz_spawnZombies = dayz_spawnZombies + 1;
//diag_log ("CREATE INFECTED: " + str(_this));
_position = getPosATL _agent;
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
_nearByPlayer = ({isPlayer _x} count (_position nearEntities [["AllVehicles","CAManBase"],30]) > 0);
if (random 1 > 0.7) then {
_agent setUnitPos "Middle";
};
//diag_log ("CREATED: " + str(_agent));
if (_nearByPlayer) then {
deleteVehicle _agent;
};
/*
//_agent setVariable["host",player,true];
if (_doLoiter) then {
if (!_doLoiter) then {
_agent setPosATL _position;
_agent setDir round(random 180);
if (_nearByPlayer) then {
deleteVehicle _agent;
};
} else {
if (_nearByPlayer) then {
_attempt = 0;
while {_nearByPlayer} do {
_position = [_position,0,20,10,0,20,0] call BIS_fnc_findSafePos;
_agent setPos _position;
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30])) > 0;
_nearByPlayer = ({isPlayer _x} count (_position nearEntities ["CAManBase",30]) > 0);
_attempt = _attempt + 1;
if (_attempt > 10) exitWith {};
};
_agent setPos _position;
};
};
*/
if (isNull _agent) exitWith {
dayz_spawnZombies = dayz_spawnZombies - 1;
};
@@ -89,7 +93,6 @@ if (_rnd > 0.3) then {
_array = []+ getArray (configFile >> "cfgLoot" >> getText(_lootType));
if (count _array > 0) then {
_loot = _array call BIS_fnc_selectRandomWeighted;
//diag_log ("Zed Loot: " +(_loot));
if(!isNil "_array") then {
_agent addMagazine _loot;
};

View File

@@ -2,13 +2,26 @@ private["_unit","_originalPos","_pos"];
_unit = _this select 0;
_originalPos = _this select 1;
_pos = getPosATL _unit;
_playerpos = getPos player;
if (count _this > 2) then {
_pos = _this select 2;
} else {
//_unit enableAI "MOVE";
//_unit enableAI "ANIM";
_chance = round(random 12);
if ((_chance % 4) == 0) then {
//_Offset = [0,0,0];
//_playerworldPos = _playerpos modelToWorld _Offset;
_pos = [_playerpos,30,120,4,0,5,0] call BIS_fnc_findSafePos;
} else {
_pos = [_originalPos,10,90,4,0,5,0] call BIS_fnc_findSafePos;
};
if (_unit distance player > 250) then {
_pos = [_playerpos,120,200,4,0,5,0] call BIS_fnc_findSafePos;
};
};
if(isNull group _unit) then {

View File

@@ -22,6 +22,13 @@ class CfgPatches {
requiredVersion = 0.1;
requiredAddons[] = {"dayz_equip","dayz_weapons","CAMisc3","CABuildingParts","CABuildingParts_Signs","CAStructuresHouse","CAStructuresLand_Ind_Stack_Big","CAStructures_Misc_Powerlines","CAStructures","CABuildings","CABuildings2","Ind_MalyKomin","CAStructures_A_CraneCon","CAStructures_Mil","CAStructures_Nav","CAStructures_Rail","A_Crane_02","A_TVTower","CAStructures_Railway","CAStructuresHouse","CAStructuresHouse_HouseBT"};
};
class DZ_DebriefingRemoved
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"CAUI"};
};
};
class CfgMods
{
@@ -33,10 +40,36 @@ class CfgMods
hidePicture = 0;
hideName = 0;
action = "http://www.dayzepoch.com";
version = "0.98";
version = "0.981";
hiveVersion = 0.96; //0.93
};
class DZ_InitWorld
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"Chernarus"};
};
};
class CfgMissions
{
class Cutscenes
{
class ChernarusIntro1
{
directory = "z\addons\dayz_code\cfgworlds\intro.Chernarus";
};
};
};
class CfgWorlds
{
initWorld = "Chernarus";
demoWorld = "Chernarus";
};
class CfgAddons
{
access = 1;
@@ -57,11 +90,11 @@ class CfgAISkill {
aimingshake[] = {0, 0, 1, 1};
aimingspeed[] = {0, 0, 1, 1};
commanding[] = {0, 0, 1, 1};
courage[] = {0, 0, 1, 1};
courage[] = {0, 1, 1, 1};
endurance[] = {0, 0, 1, 1};
general[] = {0, 0, 1, 1};
reloadspeed[] = {0, 0, 1, 1};
spotdistance[] = {0, 0, 1, 1};
spotdistance[] = {0, 0, 1, 0.6};
spottime[] = {0, 0, 1, 1};
};
@@ -72,6 +105,7 @@ class CfgInGameUI
cueColor[] = {0,0,0,0};
};
class MPTable
{
color[] = {0,0,0,0}; //{0.7,0.7,0.7,1};
@@ -183,6 +217,7 @@ class RscStructuredTextGUI: RscStructuredText
#include "CfgMagazines.hpp"
#include "cfgLoot.hpp"
#include "CfgMarkers.hpp"
#include "CfgAmmo.hpp"
class CfgSurvival {
class Inventory {
@@ -399,15 +434,17 @@ class CfgBuildingLoot {
{ "LeeEnfield","weapon" },
{ "revolver_EP1","weapon" },
{"DZ_Patrol_Pack_EP1","object"}, //8
{"DZ_Assault_Pack_EP1","object"}, // 12
{"DZ_Czech_Vest_Puch","object"}, // 12-0
{"DZ_ALICE_Pack_EP1","object"}, // 16
{"DZ_TK_Assault_Pack_EP1","object"}, // 16
{"DZ_British_ACU","object"}, // 18
{ "Winchester1866","weapon" },
{ "WeaponHolder_ItemTent","object" },
{ "","military" },
{ "","trash" },
{ "Crossbow","weapon" },
{"Crossbow_DZ","weapon"},
{ "Binocular","weapon" },
{ "PartWoodPile","magazine" },
{ "Skin_Camo1_DZ","magazine" },
@@ -435,9 +472,11 @@ class CfgBuildingLoot {
2,
0.06,
0.04,
0.04, //8
0.01, //12
0.03, //12-0
0.05, //12
0.04, // 12-0
0.02, //16
0.02, //16
0.01, //18
0.01,
0.01,
0.03,
@@ -450,10 +489,10 @@ class CfgBuildingLoot {
0.08,
0.03,
0.01,
0.01,
0.01,
0.01,
0.01,
0.02,
0.03,
0.02,
0.02,
0.05,
};
};
@@ -517,11 +556,12 @@ class CfgBuildingLoot {
{ "LeeEnfield","weapon" },
{ "Winchester1866","weapon" },
{ "","trash" },
{ "Crossbow","weapon" },
{"Crossbow_DZ","weapon"},
{ "PartWoodPile","magazine" },
{ "WeaponHolder_ItemHatchet","object" },
{ "MR43","weapon" },
{"TrapBear","magazine"}
{"TrapBear","magazine"},
{"WeaponHolder_ItemMachete"}
};
itemChance[] = {
0.06,
@@ -534,7 +574,8 @@ class CfgBuildingLoot {
0.11,
0.17,
0.06,
0.01
0.01,
0.03
};
};
class Supermarket: Default {
@@ -556,15 +597,17 @@ class CfgBuildingLoot {
{ "LeeEnfield","weapon" },
{ "revolver_EP1","weapon" },
{"DZ_Patrol_Pack_EP1","object"}, //8
{"DZ_Assault_Pack_EP1","object"}, // 12
{"DZ_Czech_Vest_Puch","object"}, // 12-0
{"DZ_ALICE_Pack_EP1","object"}, // 16
{"DZ_TK_Assault_Pack_EP1","object"}, // 16
{"DZ_British_ACU","object"}, // 18
{ "Winchester1866","weapon" },
{ "WeaponHolder_ItemTent","object" },
{ "","food" },
{ "","trash" },
{ "Crossbow","weapon" },
{"Crossbow_DZ","weapon"},
{ "Binocular","weapon" },
{ "PartWoodPile","magazine" },
{"MR43","weapon"}
@@ -581,9 +624,11 @@ class CfgBuildingLoot {
0.05,
0.01,
0.01,
0.04, //8
0.01, //12
0.03, // 12-0
0.05, //12
0.04, // 12-0
0.02, //16
0.02, //16
0.01, //18
0.01,
0.01,
0.3,
@@ -609,8 +654,7 @@ class CfgBuildingLoot {
{ "BAF_AS50_scoped","weapon" },
{ "Mk_48_DZ","weapon" },
{ "M249_DZ","weapon" },
//{"BAF_L85A2_RIS_CWS","weapon"},
{"BAF_L85A2_RIS_Holo","weapon"},
{"BAF_L85A2_RIS_SUSAT","weapon"},
{ "DMR","weapon" },
{ "","military" },
{ "","medical" },
@@ -641,7 +685,7 @@ class CfgBuildingLoot {
0.01, //{"BAF_AS50_scoped","weapon"},
0.03, //{"Mk_48_DZ","weapon"},
0.05, //{"M249_DZ","weapon"},
0.01, //{"BAF_L85A2_RIS_CWS","weapon"}, BAF_L85A2_RIS_Holo
0.01, //{"BAF_L85A2_RIS_SUSAT","weapon"},
0.06, //{"DMR","weapon"},
1, //{"","military"},
0.5, //{"","medical"},
@@ -675,12 +719,9 @@ class HeliCrash_No50s: Default {
{"bizon_silenced","weapon"},
{"M14_EP1","weapon"},
{"FN_FAL_ANPVS4","weapon"},
// {"M107_DZ","weapon"},
// {"BAF_AS50_scoped","weapon"},
{"Mk_48_DZ","weapon"},
{"M249_DZ","weapon"},
//{"BAF_L85A2_RIS_CWS","weapon"},
{"BAF_L85A2_RIS_Holo","weapon"},
{"BAF_L85A2_RIS_SUSAT","weapon"},
{"DMR","weapon"},
{"","military"},
{"","medical"},
@@ -702,11 +743,9 @@ class HeliCrash_No50s: Default {
0.05, //{"bizon_silenced","weapon"},
0.05, //{"M14_EP1","weapon"},
0.02, //{"FN_FAL_ANPVS4","weapon"},
// 0.02, //{"m107","weapon"},
// 0.01, //{"BAF_AS50_scoped","weapon"},
0.03, //{"Mk_48_DZ","weapon"},
0.05, //{"M249_DZ","weapon"},
0.01, //{"BAF_L85A2_RIS_CWS","weapon"}, BAF_L85A2_RIS_Holo
0.01, //{"BAF_L85A2_RIS_SUSAT","weapon"},
0.06, //{"DMR","weapon"},
1, //{"","military"},
0.5, //{"","medical"},
@@ -789,7 +828,8 @@ class HeliCrash_No50s: Default {
{ "ItemEtool","weapon" },
{"ItemSandbag","magazine"},
{"Sa58P_EP1","weapon"},
{"Sa58V_EP1","weapon"}
{"Sa58V_EP1","weapon"},
{"BAF_L85A2_RIS_Holo","weapon"}
};
itemChance[] = {
0.05,
@@ -830,7 +870,8 @@ class HeliCrash_No50s: Default {
0.05,
0.02,
0.03,
0.03
0.03,
0.01
};
};
class MilitarySpecial: Default {
@@ -970,6 +1011,36 @@ class HeliCrash_No50s: Default {
0.01,
};
};
class Hunting: Default {
zombieChance = 0.4;
minRoaming = 1;
maxRoaming = 3;
zombieClass[] = {"z_hunter","z_hunter","z_hunter"};
lootChance = 1;
lootPos[] = {};
itemType[] = {
{"ItemMap","weapon"},
{"ItemFlashlight","generic"},
{"ItemKnife","generic"},
{"ItemMatchbox","generic"},
{"Crossbow_DZ","weapon"},
{"","military"},
{"WeaponHolder_ItemMachete", "object"},
{"huntingrifle","weapon"},
{"","hunter"}
};
itemChance[] = {
0.08,
0.05,
0.04,
0.06,
0.03,
2.00,
0.03,
0.04,
3.00
};
};
class Church: Residential {
minRoaming = 1;
maxRoaming = 3;
@@ -1224,7 +1295,7 @@ class HeliCrash_No50s: Default {
maxRoaming = 3;
lootPos[] = {};
}; // Qty: 83
class Land_Misc_deerstand: Military {
class Land_Misc_deerstand: Hunting {
zombieChance = 0.3;
lootChance = 0.5;
maxRoaming = 3;

View File

@@ -60,7 +60,7 @@ if (!isDedicated) then {
zombie_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_findTargetAgent.sqf";
zombie_loiter = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_loiter.sqf"; //Server compile, used for loiter behaviour
zombie_generate = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_generate.sqf"; //Server compile, used for loiter behaviour
wild_spawnZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\wild_spawnZombies.sqf"; //Server compile, used for loiter behaviour
//
dog_findTargetAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\dog_findTargetAgent.sqf";
@@ -234,7 +234,7 @@ if (!isDedicated) then {
_dikCode = _this select 1;
_handled = false;
if (_dikCode in (actionKeys "GetOver")) then {
if (player isKindOf "PZombie_VB") exitWith {
//player action ["sitDown", player];
player switchAction "sitDown";
@@ -242,37 +242,21 @@ if (!isDedicated) then {
//player switchMove "AmovPercMstpSnonWnonDnon";
diag_log "Saved player zombie from animation lockup?";
};
DoRE = ({isPlayer _x} count (player nearEntities ["AllVehicles",500]) > 1);
if (canRoll && animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then {
canRoll = false;
null = [] spawn {
if (DoRE) then {
[nil, player, rSWITCHMOVE,"ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;
} else {
player switchMove "ActsPercMrunSlowWrflDf_FlipFlopPara";
};
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];
sleep 1;
canRoll = true;
if (!r_fracture_legs and (time - dayz_lastCheckBit > 4)) then {
_inBuilding = [player] call fnc_isInsideBuilding;
_nearbyObjects = nearestObjects[getPosATL player, ["TentStorage", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Wire_cat1"], 8];
if (!_inBuilding and (count _nearbyObjects == 0)) then {
dayz_lastCheckBit = time;
call player_CombatRoll;
};
_handled = true;
};
};
//if (_dikCode == 57) then {_handled = true}; // space
//if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
if ("ItemMap_Debug" in items player) then {
if (_dikCode == 88) then //SCROLL LOCK
if (_dikCode == 210) then //SCROLL LOCK
{
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
};
} else {
if (_dikCode == 70) then //SCROLL LOCK
{
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
};
};
if (_dikCode in actionKeys "MoveLeft") then {r_interrupt = true};
if (_dikCode in actionKeys "MoveRight") then {r_interrupt = true};
if (_dikCode in actionKeys "MoveForward") then {r_interrupt = true};
@@ -294,9 +278,11 @@ if (!isDedicated) then {
dayz_lastCheckBit = time;
[player,15,false,(getPosATL player)] spawn player_alertZombies;
};
if ((_dikCode == 0x38 or _dikCode == 0xB8) and (time - dayz_lastCheckBit > 10)) then {
if (_dikCode in actionKeys "User20" and (time - dayz_lastCheckBit > 5)) then {
dayz_lastCheckBit = time;
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
};
if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (time - dayz_lastCheckBit > 10)) then {
dayz_lastCheckBit = time;
call dayz_forceSave;
};
@@ -308,6 +294,25 @@ if (!isDedicated) then {
_handled
};
player_CombatRoll = {
DoRE = ({isPlayer _x} count (player nearEntities ["AllVehicles",100]) > 1);
if (canRoll && animationState player in ["amovpercmrunslowwrfldf","amovpercmrunsraswrfldf","amovpercmevaslowwrfldf","amovpercmevasraswrfldf"]) then {
canRoll = false;
null = [] spawn {
if (DoRE) then {
[nil, player, rSWITCHMOVE, "ActsPercMrunSlowWrflDf_FlipFlopPara"] call RE;
} else {
player switchMove "ActsPercMrunSlowWrflDf_FlipFlopPara";
};
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];
sleep 1;
canRoll = true;
};
_handled = true;
};
};
player_serverModelChange = {
private["_object","_model"];
_object = _this select 0;

View File

@@ -2,6 +2,58 @@ private["_holder","_type","_classname","_name"];
_holder = _this select 0;
_type = _this select 1;
_classname = _this select 2;
_name = getText (configFile >> _type >> _classname >> "displayName");
null = _holder addAction [format[(localize "STR_DAYZ_CODE_1"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
player reveal _holder;
actionMonitor = {
private["_holder","_type","_classname","_name","_action","_distance","_run","_timeout"];
_holder = _this select 0;
_type = _this select 1;
_classname = _this select 2;
_name = _this select 3;
_action = -1;
_distance = player distance _holder;
_run = true;
_timeout = 2;
while { _run } do {
if (alive _holder) then {
_distance = player distance _holder;
// Add action to player
if ((_distance < 1.75) and (_action == -1)) then {
_action = player addAction [format[(localize "STR_DAYZ_CODE_1"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
player reveal _holder;
_timeout = 0.3;
};
// Remove action from player
if ((_distance >= 1.75) and (_action != -1)) then {
player removeAction _action;
_action = -1;
_timeout = 2;
};
// Stop the loop and fall back to old code
if (_distance > 100) then {
null = _holder addAction [format[(localize "STR_DAYZ_CODE_1"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
player reveal _holder;
_run = false;
_timeout = 0;
};
} else {
if (_action != -1) then {
player removeAction _action;
_action = -1;
};
_timeout = 0;
_run = false;
};
sleep _timeout;
};
};
if (_classname == "WoodenArrow") then {
[_holder,_type,_classname,_name] spawn actionMonitor;
} else {
null = _holder addAction [format[(localize "STR_DAYZ_CODE_1"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
player reveal _holder;
};

View File

@@ -1,84 +1,62 @@
rpcCodeVarName = { format["%1_code",_this] };
rpcDirectCall = { call compile format["[%1,%2] call %3;",str(_this),_this,_this call rpcCodeVarName]; };
//Medical Event Handlers
"norrnRaLW" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\load_wounded.sqf"};
"norrnRLact" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\load\load_wounded.sqf"};
"norrnRDead" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\deadState.sqf"};
"usecBleed" addPublicVariableEventHandler {_id = (_this select 1) spawn fnc_usec_damageBleed};
"usecBandage" addPublicVariableEventHandler {(_this select 1) call player_medBandage};
"usecInject" addPublicVariableEventHandler {(_this select 1) call player_medInject};
"usecEpi" addPublicVariableEventHandler {(_this select 1) call player_medEpi};
"usecTransfuse" addPublicVariableEventHandler {(_this select 1) call player_medTransfuse};
"usecMorphine" addPublicVariableEventHandler {(_this select 1) call player_medMorphine};
"usecPainK" addPublicVariableEventHandler {(_this select 1) call player_medPainkiller};
"dayzHit" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageHandler};
"dayzHitV" addPublicVariableEventHandler {(_this select 1) call fnc_usec_damageVehicle};
"dayzHideBody" addPublicVariableEventHandler {hideBody (_this select 1)};
"dayzGutBody" addPublicVariableEventHandler {(_this select 1) spawn local_gutObject};
"dayzGutBodyZ" addPublicVariableEventHandler {(_this select 1) spawn local_gutObjectZ};
"dayzDelLocal" addPublicVariableEventHandler {(_this select 1) call object_delLocal};
"dayzVehicleInit" addPublicVariableEventHandler {(_this select 1) call fnc_vehicleEventHandler};
"dayzHumanity" addPublicVariableEventHandler {(_this select 1) spawn player_humanityChange};
"dayz_serverObjectMonitor" addPublicVariableEventHandler {dayz_serverObjectMonitor = dayz_safety};
"usecBreakLegs" addPublicVariableEventHandler {(_this select 1) call player_breaklegs};
//run on all clients
broadcastRpcCallAll = {
private["_name","_val"];
_name = _this select 0;
_val = _this select 1;
call compile format["%1 = _val;",_name]; //set the value locally
_name call rpcDirectCall; //call on this client
publicVariable _name; //call on other clients
};
//Both
//run on client which has the object ownership
broadcastRpcCallIfLocal = {
private["_name","_val","_reqObj"];
_name = _this select 0;
_val = _this select 1;
_reqObj = _this select 2;
call compile format["%1 = _val;",_name]; //set the value locally
if (local _reqObj) then {
_name call rpcDirectCall; //call on this client
} else {
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;
["dayzGutBody", { (_this select 1) call local_gutObject; } ] call registerBroadcastRpc;
["dayzGutBodyZ", { (_this select 1) call local_gutObjectZ; } ] 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;
["usecBreakLegs", { (_this select 1) call player_breaklegs; } ] call registerBroadcastRpc;
//server only
//Server only
if (isServer) then {
call compile preprocessFileLineNumbers "\z\addons\dayz_server\init\publicEH_server.sqf";
"dayzDeath" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerDied};
"dayzDiscoAdd" addPublicVariableEventHandler {dayz_disco set [count dayz_disco,(_this select 1)];};
"dayzDiscoRem" addPublicVariableEventHandler {dayz_disco = dayz_disco - [(_this select 1)];};
"dayzPlayerSave" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync;};
"dayzPublishObj" addPublicVariableEventHandler {(_this select 1) call server_publishObj};
"dayzUpdateVehicle" addPublicVariableEventHandler {_id = (_this select 1) spawn server_updateObject};
"dayzLogin" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerLogin};
"dayzLogin2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
"dayzPlayerMorph" addPublicVariableEventHandler {(_this select 1) call server_playerMorph};
"dayzUpdate" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_processUpdate};
"dayzLoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin};
"dayzCharSave" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerSync};
//Checking
"dayzSetFuel" addPublicVariableEventHandler {(_this select 1) spawn local_setFuel};
"dayzSetFix" addPublicVariableEventHandler {(_this select 1) call object_setFixServer};
"dayzDeleteObj" addPublicVariableEventHandler {(_this select 1) spawn server_deleteObj};
"atp" addPublicVariableEventHandler { _array = _this select 1; diag_log format["TELEPORT REVERT: %1 (%2) from %3 to %4 now at %5", _array select 0, _array select 1, _array select 2, _array select 3, _array select 4];};
// Dayz epoch custom
"dayzPublishVeh" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh};
"dayzTradeObject" addPublicVariableEventHandler {(_this select 1) spawn server_tradeObj};
"dayzTraderMenu" addPublicVariableEventHandler {(_this select 1) spawn server_traders};
"dayzPlayerDeaths" addPublicVariableEventHandler {(_this select 1) spawn server_deaths};
};
//clients only
//Client 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;
"dayzSetDate" addPublicVariableEventHandler {setDate (_this select 1)};
//"dayzFlies" addPublicVariableEventHandler {(_this select 1) call spawn_flies};
"dayzRoadFlare" addPublicVariableEventHandler {(_this select 1) spawn object_roadFlare};
"norrnRaDrag" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"};
"norrnRnoAnim" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\noAnim.sqf"};
"changeCharacter" addPublicVariableEventHandler {(_this select 1) call player_serverModelChange};
"dayzSwitch" addPublicVariableEventHandler {(_this select 1) call server_switchPlayer};
"dayzFire" addPublicVariableEventHandler {nul=(_this select 1) spawn BIS_Effects_Burn};
};

View File

@@ -49,10 +49,128 @@ pz_villager3 = "pz_villager3";
pz_priest = "pz_priest";
//Cooking
meatraw = ["FoodSteakRaw","FoodmeatRaw","FoodbeefRaw","FoodmuttonRaw","FoodchickenRaw","FoodrabbitRaw","FoodbaconRaw"];
meatcooked = ["FoodSteakCooked","FoodmeatCooked","FoodbeefCooked","FoodmuttonCooked","FoodchickenCooked","FoodrabbitCooked","FoodbaconCooked"];
meatraw = [
"FoodSteakRaw",
"FoodmeatRaw",
"FoodbeefRaw",
"FoodmuttonRaw",
"FoodchickenRaw",
"FoodrabbitRaw",
"FoodbaconRaw"
];
meatcooked = [
"FoodSteakCooked",
"FoodmeatCooked",
"FoodbeefCooked",
"FoodmuttonCooked",
"FoodchickenCooked",
"FoodrabbitCooked",
"FoodbaconCooked"
];
//Eating
no_output_food = ["FoodMRE", "FoodPistachio", "FoodNutmix","FoodBioMeat"]+meatcooked+meatraw;
badfood = ["FoodBioMeat"];
food_with_output=[
"FoodCanBakedBeans",
"FoodCanSardines",
"FoodCanFrankBeans",
"FoodCanPasta",
"FoodCanGriff",
"FoodCanBadguy",
"FoodCanBoneboy",
"FoodCanCorn",
"FoodCanCurgon",
"FoodCanDemon",
"FoodCanFraggleos",
"FoodCanHerpy",
"FoodCanOrlok",
"FoodCanPowell",
"FoodCanTylers",
"FoodCanUnlabeled"
];
food_output = [
"TrashTinCan",
"TrashTinCan",
"TrashTinCan",
"TrashTinCan",
"FoodCanGriffEmpty",
"FoodCanBadguyEmpty",
"FoodCanBoneboyEmpty",
"FoodCanCornEmpty",
"FoodCanCurgonEmpty",
"FoodCanDemonEmpty",
"FoodCanFraggleosEmpty",
"FoodCanHerpyEmpty",
"FoodCanOrlokEmpty",
"FoodCanPowellEmpty",
"FoodCanTylersEmpty",
"FoodCanUnlabeledEmpty"
];
//Drinking
no_output_drink = ["ItemWaterbottle", "ItemWaterbottleBoiled"];
drink_with_output = [
"ItemSoda", //just to define item for ItemSodaEmpty
"ItemSodaCoke",
"ItemSodaPepsi",
"ItemSodaMdew",
"ItemSodaMtngreen",
"ItemSodaR4z0r",
"ItemSodaClays",
"ItemSodaSmasht",
"ItemSodaDrwaste",
"ItemSodaLemonade",
"ItemSodaLvg",
"ItemSodaMzly",
"ItemSodaRabbit"
];
drink_output = [
"ItemSodaEmpty",
"ItemSodaCokeEmpty",
"ItemSodaPepsiEmpty",
"ItemSodaMdewEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaClaysEmpty",
"ItemSodaSmashtEmpty",
"ItemSodaDrwasteEmpty",
"ItemSodaLemonadeEmpty",
"ItemSodaLvgEmpty",
"ItemSodaMzlyEmpty",
"ItemSodaRabbitEmpty"
];
boil_tin_cans = [
"TrashTinCan",
"FoodCanGriffEmpty",
"FoodCanBadguyEmpty",
"FoodCanBoneboyEmpty",
"FoodCanCornEmpty",
"FoodCanCurgonEmpty",
"FoodCanDemonEmpty",
"FoodCanFraggleosEmpty",
"FoodCanHerpyEmpty",
"FoodCanOrlokEmpty",
"FoodCanPowellEmpty",
"FoodCanTylersEmpty",
"FoodCanUnlabeledEmpty",
"ItemSodaEmpty",
"ItemSodaCokeEmpty",
"ItemSodaPepsiEmpty",
"ItemSodaMdewEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaClaysEmpty",
"ItemSodaSmashtEmpty",
"ItemSodaDrwasteEmpty",
"ItemSodaLemonadeEmpty",
"ItemSodaLvgEmpty",
"ItemSodaMzlyEmpty",
"ItemSodaRabbitEmpty"
];
dayz_combatLog = "";
canRoll = true;
@@ -260,7 +378,9 @@ dayzPlayerDeaths = [];
//DayZ settings
dayz_dawn = 6;
dayz_dusk = 18;
dayz_maxAnimals = 5;
if(isNil "dayz_maxAnimals") then {
dayz_maxAnimals = 5;
};
DAYZ_agentnumber = 0;
dayz_animalDistance = 800;
dayz_zSpawnDistance = 1000;
@@ -269,6 +389,15 @@ if(isNil "dayz_maxLocalZombies") then {
dayz_maxLocalZombies = 40;
};
if(isNil "dayz_maxGlobalZombies") then {
dayz_maxGlobalZombies = 30;
};
if(isNil "dayz_maxZeds") then {
dayz_maxZeds = 500;
};
dayz_spawnPos = getPosATL player;
//init global arrays for Loot Chances
@@ -355,6 +484,10 @@ if(!isDedicated) then {
dayz_lootDelay = 3;
dayz_lootWait = -300;
dayz_spawnZombies = 0;
//used to count global zeds around players
dayz_CurrentZombies = 0;
//Used to limit overall zed counts
dayz_maxCurrentZeds = 0;
dayz_inVehicle = false;
dayz_Magazines = [];
dayzGearSave = false;

View File

@@ -34,14 +34,17 @@ while {r_doLoop} do {
r_doLoop = false;
if (_finished) then {
["usecBandage",[_unit,player]] call broadcastRpcCallAll;
//["usecBandage",[_unit,player]] call broadcastRpcCallAll;
usecBandage = [_unit,player];
publicVariable "usecBandage";
if (_unit == player) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medBandaged.sqf";
dayz_sourceBleeding = objNull;
} else {
["dayzHumanity",[player,20]] call dayzHumanity_code;
//dayzHumanity = [player,20];
[player,20] call player_humanityChange;
};
{_unit setVariable[_x,false,true];} forEach USEC_woundHit;

View File

@@ -24,7 +24,9 @@ sleep 2;
//unconscious unit assumes dragging posture
//public EH
["norrnRaDrag",_dragee] call broadcastRpcCallAll;
//["norrnRaDrag",_dragee] call broadcastRpcCallAll;
norrnRaDrag = [_dragee];
publicVariable "norrnRaDrag";
_dragee attachto [_unit,[0.1, 1.01, 0]];
sleep 0.02;

View File

@@ -12,7 +12,9 @@ if (!_isDead) then {
_unit setVariable ["NORRN_unconscious", false, true];
_unit setVariable ["USEC_isCardiac",false,true];
sleep 5;
["usecEpi",[_unit,player,"ItemEpinephrine"]] call broadcastRpcCallAll;
//["usecEpi",[_unit,player,"ItemEpinephrine"]] call broadcastRpcCallAll;
usecEpi = [_unit,player,"ItemEpinephrine"];
publicVariable "usecEpi";
};
r_action = false;

View File

@@ -51,6 +51,13 @@ while {true} do {
[] spawn fnc_usec_playerBleed; //publicizes the blood value at regular intervals
[] spawn fnc_med_publicBlood;
};
//Handle player infection
if ((r_player_infected) and (!r_player_handler)) then {
r_player_handler = true;
sleep 1;
[] spawn fnc_med_publicBlood;
};
//Add player actions
[] call fnc_usec_damageActions;

View File

@@ -20,7 +20,9 @@ if ((_vcl emptyPositions "cargo") > 0) then
_dragger switchMove "";
_wounded setVariable ["NORRN_LoadVcl", _vcl, true];
sleep 1;
["norrnRLact",_wounded] call broadcastRpcCallAll;
//["norrnRLact",_wounded] call broadcastRpcCallAll;
norrnRLact = [_wounded];
publicVariable "norrnRLact";
player removeAction NORRN_dropAction;
}else{

View File

@@ -14,7 +14,9 @@ _wounded setVariable ["NORRN_unit_dragged", true, true];
_wounded assignAsCargo _vcl;
_wounded moveInCargo _vcl;
sleep 1;
["norrnRALW",_wounded] call broadcastRpcCallAll;
//["norrnRALW",_wounded] call broadcastRpcCallAll;
norrnRALW = [_wounded];
publicVariable "norrnRALW";
if (local _wounded) then
{

View File

@@ -16,7 +16,9 @@ _wounded setVariable ["NORRN_unit_dragged", true, true];
_wounded assignAsCargo _vcl;
_wounded moveInCargo _vcl;
sleep 1;
["norrnRALW",_wounded] call broadcastRpcCallAll;
//["norrnRALW",_wounded] call broadcastRpcCallAll;
norrnRALW = [_wounded];
publicVariable "norrnRALW";
if (local _wounded) then
{

View File

@@ -38,12 +38,15 @@ if (_finished) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
} else {
["dayzHumanity",[player,50]] call dayzHumanity_code;
//dayzHumanity = [player,50];
[player,50] call player_humanityChange;
};
player removeMagazine "ItemMorphine";
["usecMorphine",[_unit,player]] call broadcastRpcCallAll;
//["usecMorphine",[_unit,player]] call broadcastRpcCallAll;
usecMorphine = [_unit,player];
publicVariable "usecMorphine";
} else {
r_interrupt = false;
[objNull, player, rSwitchMove,""] call RE;

View File

@@ -15,11 +15,14 @@ if (_unit == player) then {
//Self Healing
_id = [player,player] execVM "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
} else {
["dayzHumanity",[player,20]] call dayzHumanity_code;
//dayzHumanity = [player,20];
[player,20] call player_humanityChange;
};
player removeMagazine "ItemPainkiller";
sleep 1;
//clear the healed player's vision
["usecPainK",[_unit,player]] call broadcastRpcCallAll;
//["usecPainK",[_unit,player]] call broadcastRpcCallAll;
usecPainK = [_unit,player];
publicVariable "usecPainK";

View File

@@ -17,7 +17,7 @@ if (_unit == player) then {
if (_TransfusionInfection) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
player setVariable["USEC_infected",true,true];
};
//Ensure Control is visible

View File

@@ -119,7 +119,7 @@ fnc_usec_self_removeActions = {
};
fnc_med_publicBlood = {
while {r_player_injured and r_player_blood > 0} do {
while {(r_player_injured or r_player_infected) and r_player_blood > 0} do {
player setVariable["USEC_BloodQty",r_player_blood,true];
player setVariable["medForceUpdate",true];
sleep 5;

View File

@@ -41,9 +41,12 @@ if (_finished) then {
_unit setVariable["LastTransfusion",time,true];
_unit setVariable["USEC_lowBlood",false,true];
player removeMagazine "ItemBloodbag";
["usecTransfuse",[_unit,player]] call broadcastRpcCallAll;
//["usecTransfuse",[_unit,player]] call broadcastRpcCallAll;
usecTransfuse = [_unit,player];
publicVariable "usecTransfuse";
["dayzHumanity",[player,250]] call dayzHumanity_code;
//dayzHumanity = [player,250];
[player,250] call player_humanityChange;
} else {
r_interrupt = false;
player switchMove "";

View File

@@ -43,6 +43,49 @@ class RscDisplayStart
};
};
class RscDisplayDebriefing: RscStandardDisplay
{
class controls
{
delete Debriefing_MissionTitle;
delete CA_MissionTitle;
delete CA_TextVotingTimeLeft;
delete CA_MissionResult;
delete CA_DebriefingInfo;
delete CA_DebriefingTextGroup;
delete CA_DebriefingObjectivesGroup;
delete CA_DebriefingStatsGroup;
delete ButtonStatistics;
delete ButtonRetry;
//delete ButtonContinue;
};
class ControlsBackground
{
delete Mainback;
};
};
class RscDisplayMissionFail: RscStandardDisplay
{
class controls
{
delete Debriefing_MissionTitle;
delete CA_MissionTitle;
delete CA_TextVotingTimeLeft;
delete CA_MissionResult;
delete CA_DebriefingInfo;
delete CA_DebriefingTextGroup;
delete CA_DebriefingObjectivesGroup;
delete CA_DebriefingStatsGroup;
delete BRetry;
//delete BAbort;
};
class ControlsBackground
{
delete Mainback;
};
};
class CA_TextLanguage;
class RscXListBox;
@@ -68,35 +111,91 @@ class RscDisplayGameOptions
};
};
};
class RscShortcutButton;
class RscShortcutButtonMain;
class RscDisplayMain : RscStandardDisplay
{
class controlsBackground
{
class Mainback;
class Mainback : RscPicture {
idc = 1104;
x = "SafeZoneX + 0.04";
y = "SafeZoneY + 0.03";
w = 0.627451;
h = 1.000000;
text = "\ca\ui\data\ui_mainmenu_background_ca.paa";
};
class CA_ARMA2 : RscPicture
{
text = "z\addons\dayz_code\gui\dayz_logo_ca.paa";
};
};
onLoad = "((_this select 0) displayCtrl 138) ctrlEnable false;";
class controls
{
class CA_Version;
class DAYZ_Version : CA_Version
{
idc = -1;
text = "DayZ Epoch 0.98 (1.7.5.1)";
text = "DayZ Epoch 0.981 (1.7.6.1)";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
};
class CA_TitleMainMenu;
class CA_SinglePlayer;
class CA_MP;
class CA_Options;
class CA_PlayerProfile;
class CA_Expansions;
class CA_Exit;
delete CA_TitleMainMenu;
delete CA_SinglePlayer;
class CA_PlayerName : RscText {
idc = 109;
style = 256;
colorbackground[] = {0.1, 0.1, 0.1, 0};
x = "SafeZoneX + 0.15";
y = "SafeZoneY + 0.06";
w = 0.5;
h = 0.05;
};
class CA_MP : RscShortcutButtonMain {
idc = 105;
x = "SafeZoneX + 0.05";
y = "SafeZoneY + 0.15";
toolTip = $STR_TOOLTIP_MAIN_MULTIPLAYER;
text = $STR_CA_MAIN_MULTI;
class KeyHints {
class A {
key = 0x00050000 + 0;
hint = "";
};
};
};
class CA_Options : RscShortcutButtonMain {
x = "SafeZoneX + 0.05";
y = "SafeZoneY + 0.30";
};
class CA_PlayerProfile : RscShortcutButtonMain {
x = "SafeZoneX + 0.05";
y = "SafeZoneY + 0.45";
};
class CA_Expansions : RscShortcutButtonMain {
x = "SafeZoneX + 0.05";
y = "SafeZoneY + 0.60";
};
class CA_Exit : RscShortcutButtonMain {
x = "SafeZoneX + 0.05";
y = "SafeZoneY + 0.75";
};
};
};
//Remove Diary
class RscDisplayDiary {
idd = 129;
movingEnable = 0;
class Controls {
delete Diary;
delete DiaryIndex;
delete B_Quit;
delete B_Add;
delete DiaryPage;
delete DiaryTitle;
delete DiaryBackground;
};
};
@@ -171,7 +270,7 @@ class RscDisplayGear
{
idd = 106;
enableDisplay = 1;
onUnload = "call player_gearSync;";
onUnload = "call player_gearSync; call dayz_forceSave;";
class controls
{
class CA_Filter_Icon: RscPicture

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,47 @@
/*
Anti-Teleport
Created By Razor
Refactored By Alby
*/
private["_curpos","_lastpos","_curheight","_lastheight","_terrainHeight","_curtime","_lasttime","_distance","_difftime","_speed","_topSpeed"];
waitUntil {vehicle player == player};
_lastpos = getPosATL (vehicle player);
_lastheight = (ATLtoASL _lastpos) select 2;
_lasttime = time;
while {alive player} do
{
_curpos = getPosATL (vehicle player);
_curheight = (ATLtoASL _curpos) select 2;
_curtime = time;
_distance = _lastpos distance _curpos;
_difftime = (_curtime - _lasttime) max 0.001;
_speed = _distance / _difftime;
_topSpeed = 10;
if (vehicle player != player) then {
_topSpeed = getNumber (configFile >> "CfgVehicles" >> typeOf (vehicle player) >> "maxSpeed");
};
_terrainHeight = getTerrainHeightASL [_curpos select 0, _curpos select 1];
//diag_log format["DEBUG: terrain: %1 current: %2", _terrainHeight, _curheight];
//diag_log format["DEBUG: all: %1 player: %2 fall: %3 terrain: %4", !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1)), (vehicle player == player), (_curheight < _lastheight), (_curheight - _terrainHeight) > 1];
_debug = getMarkerPos "respawn_west";
if ((_speed > _topSpeed) && (alive player) && ((driver (vehicle player) == player) or (isNull (driver (vehicle player)))) && (_debug distance _lastpos > 3000) && !((vehicle player == player) && (_curheight < _lastheight) && ((_curheight - _terrainHeight) > 1))) then {
(vehicle player) setpos _lastpos;
atp = [name player, dayz_characterID, _lastpos, _curPos, getPosATL player];
publicVariableServer "atp";
} else {
_lastpos = _curpos;
_lastheight = _curheight;
};
_lasttime = _curtime;
sleep 0.5;
};

View File

@@ -285,8 +285,13 @@ class FSM
" _temp = round(player getVariable [""temperature"",100]);" \n
" _currentState = [_currentWpn,_currentAnim,_temp];" \n
" " \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
" dayz_Magazines = _magazineArray;" \n
" dayzPlayerSave = [player,dayz_Magazines,false];" \n
" publicVariableServer ""dayzPlayerSave"";" \n
" " \n
" if (isServer) then {" \n
" dayzPlayerSave call server_playerSync;" \n
" };" \n
"" \n
" dayz_lastSave = time;" \n
" dayz_Magazines = [];" \n
@@ -423,7 +428,11 @@ class FSM
"" \n
"_msg = [];" \n
"" \n
"[""dayzLogin"",[_playerUID,player]] call callRpcProcedure;" \n
"//[""dayzLogin"",[_playerUID,player]] call callRpcProcedure;" \n
"" \n
"dayzLogin = [_playerUID,player];" \n
"publicVariable ""dayzLogin"";" \n
"" \n
"dayzPlayerLogin = [];" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -484,7 +493,6 @@ class FSM
"" \n
"if (_model == ""Survivor1_DZ"") then {" \n
" _model = ""Survivor2_DZ"";" \n
" diag_log (""PLOGIN: Model was default, loading as survivor"");" \n
"};" \n
"" \n
"_isHack = false;" \n
@@ -616,6 +624,7 @@ class FSM
" };" \n
" _countr = 0;" \n
" {" \n
" if (_x == ""Crossbow"") then { _x = ""Crossbow_DZ"" };" \n
" dayz_myBackpack addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];" \n
" _countr = _countr + 1;" \n
" } forEach _backpackWpnTypes;" \n
@@ -623,6 +632,7 @@ class FSM
" //Magazines" \n
" _countr = 0;" \n
" {" \n
" if (_x == ""BoltSteel"") then { _x = ""WoodenArrow"" }; // Convert BoltSteel to WoodenArrow" \n
" dayz_myBackpack addMagazineCargoGlobal [_x,(_backpackMagQty select _countr)];" \n
" _countr = _countr + 1;" \n
" } forEach _backpackMagTypes;" \n
@@ -646,7 +656,10 @@ class FSM
"};" \n
"" \n
"dayzPlayerLogin2 = [];" \n
"[""dayzLogin2"",[_charID,player,_playerUID]] call callRpcProcedure;" \n
"//[""dayzLogin2"",[_charID,player,_playerUID]] call callRpcProcedure;" \n
"" \n
"dayzLogin2 = [_charID,player,_playerUID];" \n
"publicVariable ""dayzLogin2"";" \n
"" \n
"dayz_loadScreenMsg = ""Requesting Character data from server"";" \n
"progressLoadingScreen 0.8;" \n
@@ -963,12 +976,15 @@ class FSM
" };" \n
"};" \n
"" \n
"if (_currentWpn == ""MeleeCrowbar"") then {" \n
"if (player hasWeapon ""MeleeCrowbar"") then {" \n
" player addMagazine 'crowbar_swing';" \n
"};" \n
"if (_currentWpn == ""MeleeHatchet"") then {" \n
"if (player hasWeapon ""MeleeHatchet"") then {" \n
" player addMagazine 'hatchet_swing';" \n
"};" \n
"if (player hasWeapon ""MeleeMachete"") then {" \n
" player addMagazine 'machete_swing';" \n
"};" \n
"" \n
"reload player;" \n
"" \n
@@ -1097,6 +1113,7 @@ class FSM
" sleep 8;" \n
" };" \n
"};" \n
"" \n
"dayz_locationCheck = [] spawn {" \n
" while {true} do {" \n
" call stream_locationCheck;" \n
@@ -1109,6 +1126,16 @@ class FSM
" sleep 2;" \n
" };" \n
"};" \n
"" \n
"dayz_Totalzedscheck = [] spawn {" \n
" while {true} do {" \n
" dayz_maxCurrentZeds = {alive _x} count entities ""zZombie_Base"";" \n
" sleep 60;" \n
" };" \n
"};" \n
"//Removed for now" \n
"[] execVM ""\z\addons\dayz_code\system\antihack.sqf"";" \n
"" \n
"// TODO: questionably" \n
"{ _x call fnc_vehicleEventHandler; } forEach vehicles;" \n
"" \n
@@ -1143,7 +1170,10 @@ class FSM
init = /*%FSM<STATEINIT""">*/"dayzGearSave = true;" \n
"dayz_myPosition = getPosATL player;" \n
"" \n
"[""dayzLoginRecord"",[_playerUID,_charID,0]] call callRpcProcedure;" \n
"//[""dayzLoginRecord"",[_playerUID,_charID,0]] call callRpcProcedure;" \n
"" \n
"dayzLoginRecord = [_playerUID,_charID,0];" \n
"publicVariable ""dayzLoginRecord"";" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links

View File

@@ -105,9 +105,9 @@ while {true} do {
*/
//Has infection?
if (r_player_infected) then {
[player,"cough",8,true] call dayz_zombieSpeak;
};
//if (r_player_infected) then {
// [player,"cough",8,false] call dayz_zombieSpeak;
//};
//Record Check
_lastUpdate = time - dayZ_lastPlayerUpdate;
@@ -156,7 +156,7 @@ while {true} do {
_rnd = random 1;
if (_rnd > 0.7) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
//player setVariable["USEC_infected",true];
};
};
};
@@ -167,21 +167,37 @@ while {true} do {
_rnd = random 1;
if (_rnd > 0.95) then {
r_player_infected = true;
player setVariable["USEC_infected",true];
//player setVariable["USEC_infected",true];
};
};
};
};
};
//If has infection reduce blood
//If has infection reduce blood cough and add shake
if (r_player_infected) then {
if !(player getVariable["USEC_infected",false]) then {
player setVariable["USEC_infected",true,true];
};
_rnd = ceil (random 8);
[player,"cough",_rnd,false,9] call dayz_zombieSpeak;
if (_rnd < 3) then {
addCamShake [2, 1, 25];
};
if (r_player_blood > 3000) then {
r_player_blood = r_player_blood - 3;
player setVariable["USEC_BloodQty",r_player_blood];
};
};
//Pain Shake Effects
if (r_player_inpain and !r_player_unconscious) then {
playSound "breath_1";
addCamShake [2, 1, 25];
};
//Hunger Effect
_foodVal = dayz_statusArray select 0;
_thirstVal = dayz_statusArray select 1;
@@ -220,7 +236,9 @@ while {true} do {
if ((time - dayz_damageCounter) > 180) then {
if (!r_player_unconscious) then {
dayz_canDisconnect = true;
["dayzDiscoRem",getPlayerUID player] call callRpcProcedure;
//["dayzDiscoRem",getPlayerUID player] call callRpcProcedure;
dayzDiscoRem = getPlayerUID player;
publicVariable "dayzDiscoRem";
//Ensure Control is hidden
_display = uiNamespace getVariable 'DAYZ_GUI_display';
@@ -233,8 +251,15 @@ while {true} do {
//Save Checker
if (dayz_unsaved) then {
if ((time - dayz_lastSave) > _saveTime) then {
["dayzPlayerSave",[player,dayz_Magazines,false]] call callRpcProcedure;
//["dayzPlayerSave",[player,dayz_Magazines,false]] call callRpcProcedure;
dayzPlayerSave = [player,dayz_Magazines,false];
publicVariableServer "dayzPlayerSave";
if (isServer) then {
dayzPlayerSave call server_playerSync;
};
dayz_lastSave = time;
dayz_Magazines = [];
};
@@ -252,26 +277,6 @@ while {true} do {
//dayz_playerTrigger attachTo [_refObj,[0,0,0]];
//dayz_playerTrigger setTriggerArea [_size,_size,0,false];
if (dayzDebug) then {
//Debug Info
_headShots = player getVariable["headShots",0];
_kills = player getVariable["zombieKills",0];
_killsH = player getVariable["humanKills",0];
_killsB = player getVariable["banditKills",0];
_humanity = player getVariable["humanity",0];
_zombies = count entities "zZombie_Base";
_zombiesA = {alive _x} count entities "zZombie_Base";
//_groups = count allGroups;
//_dead = count allDead;
//dayz_zombiesLocal = {local _x} count entities "zZombie_Base";
//_loot = count allMissionObjects "WeaponHolder";
//_wrecks = count allMissionObjects "Wreck_Base";
//_lootL = {local _x} count allMissionObjects "WeaponHolder";
//_speed = (_vel distance [0,0,0]);
hintSilent format["DEBUG MONITOR: \n\nZombies Killed: %1\nHeadshots: %2\nMurders: %10\nBandits Killed: %12\nBlood: %4\nZombies (alive/total): %15/%8\nName: %14\nHumanity: %11",_kills,_headShots,_speed,r_player_blood,round(dayz_temperatur),r_player_infected,dayz_inside,_zombies,_lastSave,_killsH,round(_humanity),_killsB,_freeTarget,dayz_playerName,_zombiesA];
};
// If in combat, display counter and restrict logout
_startcombattimer = player getVariable["startcombattimer",0];
if (_startcombattimer == 1) then {

View File

@@ -1,108 +1,141 @@
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Zombie Agent">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,-300.000000,-250.000000,-200.000000,-200.000000,0.000000,"init"};
item1[] = {"End",1,250,50.000000,-250.000000,150.000000,-200.000000,0.000000,"End"};
item2[] = {"Not_Alive",4,218,0.000000,300.000000,100.000000,350.000000,5.000000,"Not" \n "Alive"};
item3[] = {"Nobody_Near",4,218,0.000000,375.000000,100.000000,425.000000,4.000000,"Nobody" \n "Near"};
item4[] = {"loiter",4,218,-300.000000,0.000000,-200.000000,50.000000,0.000000,"loiter"};
item5[] = {"Loiter",2,250,-300.000000,75.000000,-200.000000,125.000000,0.000000,"Loiter"};
item6[] = {"In_Position",4,218,-175.000000,75.000000,-75.000000,125.000000,1.000000,"In Position"};
item7[] = {"",7,210,-29.000042,321.000000,-20.999958,329.000000,0.000000,""};
item8[] = {"",7,210,-29.000042,395.999939,-20.999958,404.000061,0.000000,""};
item9[] = {"true",8,218,-300.000000,-175.000000,-200.000000,-125.000000,0.000000,"true"};
item10[] = {"Begin",2,250,-300.000000,-100.000000,-200.000000,-50.000000,0.000000,"Begin"};
item11[] = {"",7,210,-254.000046,-29.000004,-245.999954,-20.999996,0.000000,""};
item12[] = {"",7,210,-204.000046,146.000000,-195.999954,154.000000,0.000000,""};
item13[] = {"Has_Target",4,218,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
item14[] = {"Chase",2,250,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
item15[] = {"",7,210,-29.000006,146.000000,-20.999996,154.000000,0.000000,""};
item16[] = {"",7,210,-29.000006,196.000000,-20.999996,204.000000,0.000000,""};
item17[] = {"",7,210,-104.000000,196.000000,-95.999992,204.000000,0.000000,""};
item18[] = {"Time_Check",4,218,-425.000000,75.000000,-325.000000,125.000000,0.000000,"Time" \n "Check"};
item19[] = {"Time_Check",4,218,-275.000000,300.000000,-175.000000,350.000000,0.000000,"Time" \n "Check"};
item20[] = {"No_Target",4,218,-275.000000,375.000000,-175.000000,425.000000,3.000000,"No" \n "Target"};
item21[] = {"",7,210,-479.000000,396.000000,-471.000000,404.000000,0.000000,""};
item22[] = {"",7,210,-479.000000,146.000000,-471.000000,154.000000,0.000000,""};
item23[] = {"",7,210,133.499985,321.000000,141.500000,329.000000,0.000000,""};
item24[] = {"",7,210,133.500000,396.000000,141.500000,404.000000,0.000000,""};
item25[] = {"Cleanup_",2,250,-25.000000,50.000000,75.000000,100.000000,0.000000,"Cleanup?"};
item26[] = {"nobody_around",4,218,50.000000,-50.000000,150.000000,0.000000,0.000000,"nobody" \n "around"};
item27[] = {"",7,210,-104.000023,396.000000,-95.999992,404.000000,0.000000,""};
item28[] = {"cant_see",4,218,-275.000000,450.000000,-175.000000,500.000000,2.000000,"cant" \n "see"};
item29[] = {"Finish_Move",2,250,-275.000000,525.000000,-175.000000,575.000000,0.000000,"Finish" \n "Move"};
item30[] = {"finished",4,218,-425.000000,525.000000,-325.000000,575.000000,1.000000,"finished"};
item31[] = {"",7,210,-479.000000,546.000000,-471.000000,554.000000,0.000000,""};
item32[] = {"",7,210,-29.000002,546.000000,-20.999998,554.000000,0.000000,""};
item33[] = {"",7,210,-304.000000,146.000000,-296.000000,154.000000,0.000000,""};
item34[] = {"someone_here",4,218,-200.000000,-50.000000,-100.000000,0.000000,0.000000,"someone" \n "here"};
item35[] = {"too_long",4,218,-425.000000,600.000000,-325.000000,650.000000,0.000000,"too long"};
item36[] = {"",7,210,-229.000000,621.000000,-221.000000,629.000000,0.000000,""};
item37[] = {"",7,210,-479.000000,621.000000,-471.000000,629.000000,0.000000,""};
item38[] = {"Reset_Targeting",2,250,-525.000000,325.000000,-425.000000,375.000000,0.000000,"Reset" \n "Targeting"};
item39[] = {"No_target",4,218,-525.000000,250.000000,-425.000000,300.000000,0.000000,"No target"};
item40[] = {"",7,210,-104.000000,471.000000,-95.999992,479.000000,0.000000,""};
item41[] = {"player_check",4,218,-425.000000,0.000000,-325.000000,50.000000,0.000000,"player" \n "check"};
item42[] = {"is_Dedicated",4,218,-125.000000,-250.000000,-25.000000,-200.000000,5.000000,"is" \n "Dedicated"};
item43[] = {"Not_Alive",4,4314,-75.000000,-50.000000,25.000000,0.000000,0.000000,"Not" \n "Alive"};
link0[] = {0,9};
link1[] = {0,42};
link2[] = {2,23};
link3[] = {3,24};
link4[] = {4,5};
link5[] = {5,6};
link6[] = {5,12};
link7[] = {5,18};
link8[] = {5,41};
link9[] = {6,5};
link10[] = {7,2};
link11[] = {7,8};
link12[] = {8,3};
link13[] = {9,10};
link14[] = {10,11};
link15[] = {11,4};
link16[] = {12,15};
link17[] = {12,17};
link18[] = {13,14};
link19[] = {14,7};
link20[] = {14,19};
link21[] = {14,27};
link22[] = {15,16};
link23[] = {16,7};
link24[] = {17,13};
link25[] = {18,5};
link26[] = {19,14};
link27[] = {20,21};
link28[] = {21,38};
link29[] = {22,33};
link30[] = {23,25};
link31[] = {24,23};
link32[] = {25,26};
link33[] = {25,34};
link34[] = {25,43};
link35[] = {26,1};
link36[] = {27,20};
link37[] = {27,40};
link38[] = {28,29};
link39[] = {29,30};
link40[] = {29,32};
link41[] = {29,36};
link42[] = {30,31};
link43[] = {31,21};
link44[] = {32,8};
link45[] = {33,5};
link46[] = {34,5};
link47[] = {35,37};
link48[] = {36,35};
link49[] = {37,31};
link50[] = {38,39};
link51[] = {39,22};
link52[] = {40,28};
link53[] = {41,5};
link54[] = {42,1};
link55[] = {43,25};
globals[] = {25.000000,1,0,0,0,640,480,1,102,6316128,1,-650.021484,334.182983,700.299500,-373.567780,944,1030,1};
window[] = {2,-1,-1,-32000,-32000,841,130,1338,130,3,962};
item0[] = {"init",0,250,-75.000000,-250.000000,25.000000,-200.000000,0.000000,"init"};
item1[] = {"End",1,250,175.000000,-250.000000,275.000000,-200.000000,0.000000,"End"};
item2[] = {"wait",4,218,-75.000000,0.000000,25.000000,50.000000,0.000000,"wait"};
item3[] = {"Looking_for_Targ",2,250,-75.000000,75.000000,25.000000,125.000000,0.000000,"Looking for" \n "Target"};
item4[] = {"Not_Alive",4,218,0.000000,300.000000,100.000000,350.000000,5.000000,"Not" \n "Alive"};
item5[] = {"Nobody_Near",4,218,0.000000,375.000000,100.000000,425.000000,4.000000,"Nobody" \n "Near"};
item6[] = {"loiter",4,218,-325.000000,0.000000,-225.000000,50.000000,0.000000,"loiter"};
item7[] = {"Loiter",2,250,-325.000000,75.000000,-225.000000,125.000000,0.000000,"Loiter"};
item8[] = {"In_Position",4,218,-200.000000,75.000000,-100.000000,125.000000,1.000000,"In Position"};
item9[] = {"",7,210,-29.000042,321.000000,-20.999958,329.000000,0.000000,""};
item10[] = {"",7,210,-29.000042,395.999939,-20.999958,404.000061,0.000000,""};
item11[] = {"true",8,218,-75.000000,-175.000000,25.000000,-125.000000,0.000000,"true"};
item12[] = {"Begin",2,250,-75.000000,-100.000000,25.000000,-50.000000,0.000000,"Begin"};
item13[] = {"",7,210,-29.000006,-29.000004,-20.999996,-20.999996,0.000000,""};
item14[] = {"",7,210,-279.000061,-29.000004,-270.999969,-20.999996,0.000000,""};
item15[] = {"",7,210,-254.000046,146.000000,-245.999954,154.000000,0.000000,""};
item16[] = {"Has_Target",4,218,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
item17[] = {"Chase",2,4346,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
item18[] = {"Time_Check",4,218,50.000000,75.000000,150.000000,125.000000,0.000000,"Time" \n "Check"};
item19[] = {"",7,210,-29.000006,146.000000,-20.999996,154.000000,0.000000,""};
item20[] = {"",7,210,-29.000006,196.000000,-20.999996,204.000000,0.000000,""};
item21[] = {"",7,210,-104.000000,196.000000,-95.999992,204.000000,0.000000,""};
item22[] = {"Time_Check",4,218,-450.000000,75.000000,-350.000000,125.000000,0.000000,"Time" \n "Check"};
item23[] = {"Time_Check",4,218,-275.000000,300.000000,-175.000000,350.000000,0.000000,"Time" \n "Check"};
item24[] = {"No_Target",4,218,-275.000000,375.000000,-175.000000,425.000000,3.000000,"No" \n "Target"};
item25[] = {"",7,210,-479.000000,396.000000,-471.000000,404.000000,0.000000,""};
item26[] = {"",7,210,-479.000000,146.000000,-471.000000,154.000000,0.000000,""};
item27[] = {"",7,210,221.000000,321.000000,229.000000,329.000000,0.000000,""};
item28[] = {"",7,210,221.000000,396.000000,229.000000,404.000000,0.000000,""};
item29[] = {"Cleanup_",2,250,175.000000,200.000000,275.000000,250.000000,0.000000,"Cleanup?"};
item30[] = {"nobody_around",4,218,175.000000,-25.000000,275.000000,25.000000,0.000000,"nobody" \n "around"};
item31[] = {"",7,210,-104.000023,396.000000,-95.999992,404.000000,0.000000,""};
item32[] = {"cant_see",4,218,-275.000000,450.000000,-175.000000,500.000000,2.000000,"cant" \n "see"};
item33[] = {"Finish_Move",2,250,-275.000000,525.000000,-175.000000,575.000000,0.000000,"Finish" \n "Move"};
item34[] = {"finished",4,218,-425.000000,525.000000,-325.000000,575.000000,1.000000,"finished"};
item35[] = {"",7,210,-479.000000,546.000000,-471.000000,554.000000,0.000000,""};
item36[] = {"",7,210,-29.000002,546.000000,-20.999998,554.000000,0.000000,""};
item37[] = {"",7,210,-304.000000,146.000000,-296.000000,154.000000,0.000000,""};
item38[] = {"someone_here",4,218,300.000000,200.000000,400.000000,250.000000,0.000000,"someone" \n "here"};
item39[] = {"wait",2,250,300.000000,125.000000,400.000000,175.000000,0.000000,"wait"};
item40[] = {"time_up",4,218,300.000000,-25.000000,400.000000,25.000000,0.000000,"time" \n "up"};
item41[] = {"",7,210,346.000000,95.999992,354.000000,104.000000,0.000000,""};
item42[] = {"",7,210,221.000000,96.000008,229.000000,103.999977,0.000000,""};
item43[] = {"Time_Check",4,218,425.000000,125.000000,525.000000,175.000000,0.000000,"Time" \n "Check"};
item44[] = {"",7,210,346.000000,-79.000000,354.000000,-71.000000,0.000000,""};
item45[] = {"",7,210,221.000000,-79.000000,229.000000,-71.000000,0.000000,""};
item46[] = {"too_long",4,218,-425.000000,600.000000,-325.000000,650.000000,0.000000,"too long"};
item47[] = {"",7,210,-229.000000,621.000000,-221.000000,629.000000,0.000000,""};
item48[] = {"",7,210,-479.000000,621.000000,-471.000000,629.000000,0.000000,""};
item49[] = {"Reset_Targeting",2,250,-525.000000,325.000000,-425.000000,375.000000,0.000000,"Reset" \n "Targeting"};
item50[] = {"true",8,218,-525.000000,250.000000,-425.000000,300.000000,0.000000,"true"};
item51[] = {"deleted",4,218,425.000000,-25.000000,525.000000,25.000000,0.000000,"deleted"};
item52[] = {"",7,210,471.000000,-79.000000,479.000000,-71.000000,0.000000,""};
item53[] = {"",7,210,471.000000,95.999977,479.000000,104.000023,0.000000,""};
item54[] = {"",7,210,-104.000000,471.000000,-95.999992,479.000000,0.000000,""};
item55[] = {"player_check",4,218,-450.000000,0.000000,-350.000000,50.000000,0.000000,"player" \n "check"};
item56[] = {"player_check",4,218,50.000000,0.000000,150.000000,50.000000,0.000000,"player" \n "check"};
item57[] = {"is_Dedicated",4,218,50.000000,-250.000000,150.000000,-200.000000,5.000000,"is" \n "Dedicated"};
link0[] = {0,11};
link1[] = {0,57};
link2[] = {2,3};
link3[] = {3,18};
link4[] = {3,19};
link5[] = {3,56};
link6[] = {4,27};
link7[] = {5,28};
link8[] = {6,7};
link9[] = {7,8};
link10[] = {7,15};
link11[] = {7,22};
link12[] = {7,55};
link13[] = {8,7};
link14[] = {9,4};
link15[] = {9,10};
link16[] = {10,5};
link17[] = {11,12};
link18[] = {12,13};
link19[] = {13,2};
link20[] = {13,14};
link21[] = {14,6};
link22[] = {15,19};
link23[] = {16,17};
link24[] = {17,9};
link25[] = {17,23};
link26[] = {17,31};
link27[] = {18,3};
link28[] = {19,20};
link29[] = {20,9};
link30[] = {20,21};
link31[] = {21,16};
link32[] = {22,7};
link33[] = {23,17};
link34[] = {24,25};
link35[] = {25,49};
link36[] = {26,37};
link37[] = {27,29};
link38[] = {28,27};
link39[] = {29,38};
link40[] = {29,42};
link41[] = {30,45};
link42[] = {31,24};
link43[] = {31,54};
link44[] = {32,33};
link45[] = {33,34};
link46[] = {33,36};
link47[] = {33,47};
link48[] = {34,35};
link49[] = {35,25};
link50[] = {36,10};
link51[] = {37,7};
link52[] = {38,39};
link53[] = {39,41};
link54[] = {39,43};
link55[] = {40,44};
link56[] = {41,40};
link57[] = {41,42};
link58[] = {41,53};
link59[] = {42,30};
link60[] = {43,39};
link61[] = {44,45};
link62[] = {45,1};
link63[] = {46,48};
link64[] = {47,46};
link65[] = {48,35};
link66[] = {49,50};
link67[] = {50,26};
link68[] = {51,52};
link69[] = {52,44};
link70[] = {53,51};
link71[] = {54,32};
link72[] = {55,7};
link73[] = {56,3};
link74[] = {57,1};
globals[] = {25.000000,1,0,0,0,640,480,1,98,6316128,1,-816.896851,494.402466,582.355469,-218.549896,984,601,1};
window[] = {2,-1,-1,-32000,-32000,912,132,1340,132,3,1001};
*//*%FSM</HEAD>*/
class FSM
{
@@ -164,6 +197,92 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Looking_for_Targ">*/
class Looking_for_Targ
{
name = "Looking_for_Targ";
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_target = _agent call zombie_findTargetAgent;" \n
"_timeN = time;" \n
"" \n
"_newDest = _agent getVariable [""myDest"",getposATL _agent];" \n
"if (!isNil ""_newDest"") then {" \n
" if (_newDest distance _myDest > 0) then {" \n
" _myDest = _newDest;" \n
" _agent moveTo _myDest;" \n
" _agent forceSpeed 2;" \n
" };" \n
"};" \n
"" \n
"//diag_log (""Zombie "" + str(_agent) + "" Wait "");"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
priority = 5.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isAlive"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Nobody_Near">*/
class Nobody_Near
{
priority = 4.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Has_Target">*/
class Has_Target
{
priority = 1.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!(isNull _target)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"//Leader cries out" \n
"if (_isSomeone) then {" \n
" [_agent,""spotted"",0,false] call dayz_zombieSpeak;" \n
"};" \n
"if (!_hasMoved) then {" \n
" _agent setVariable[""doLoiter"",true,true];" \n
"};" \n
"_countr = 0;" \n
"_losCheck = 0;" \n
"_cantSee = false;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "player_check">*/
class player_check
{
priority = 0.000000;
to="Looking_for_Targ";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _entityTime) > 30"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_entityTime = time;" \n
"" \n
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
priority = 0.000000;
to="Looking_for_Targ";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Loiter">*/
class Loiter
{
@@ -171,17 +290,14 @@ class FSM
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_target = _agent call zombie_findTargetAgent;" \n
"" \n
"_agent setBehaviour ""SAFE"";" \n
"_agent setCombatMode ""BLUE"";" \n
"_agent forceSpeed 2;" \n
"_agent setSkill 0;" \n
"" \n
"_newDest = _agent getVariable [""myDest"",getposATL _agent];" \n
"if (!isNil ""_newDest"") then {" \n
" if (_newDest distance _myDest > 0) then {" \n
" _myDest = _newDest;" \n
" _agent moveTo _myDest;" \n
"// _agent forceSpeed 2;" \n
" _agent forceSpeed 2;" \n
" };" \n
"};" \n
"" \n
@@ -226,15 +342,11 @@ class FSM
condition=/*%FSM<CONDITION""">*/"!(isNull _target)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"//Leader cries out" \n
"if (_isSomeone) then {" \n
" [_agent,""spotted"",2,true] call dayz_zombieSpeak;" \n
" [_agent,""spotted"",0,false] call dayz_zombieSpeak;" \n
"};" \n
"if (!_hasMoved) then {" \n
" _agent setVariable[""doLoiter"",true,true];" \n
"};" \n
"" \n
"//Enable combat timer." \n
"//_target setVariable[""startcombattimer"", 1, true];" \n
"" \n
"_countr = 0;" \n
"_losCheck = 0;" \n
"_cantSee = false;"/*%FSM</ACTION""">*/;
@@ -246,7 +358,7 @@ class FSM
priority = 1.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance (_agent getVariable [""myDest"",getposATL _agent]) < 10"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance (_agent getVariable [""myDest"",getposATL _agent]) < 3"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"[_agent,_position] call zombie_loiter;" \n
"_myDest = _agent getVariable [""myDest"",getposATL _agent];" \n
""/*%FSM</ACTION""">*/;
@@ -292,8 +404,11 @@ class FSM
"" \n
"_hasMoved = _doLoiter;" \n
"" \n
"" \n
"_agent disableAI ""FSM"";" \n
"_agent setBehaviour ""CARELESS"";" \n
"_agent setCombatMode ""RED"";" \n
"_agent setSkill 0;" \n
"" \n
"_newDest = getPosATL _agent;" \n
"_timeN = time;" \n
"" \n
@@ -330,6 +445,16 @@ class FSM
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "wait">*/
class wait
{
priority = 0.000000;
to="Looking_for_Targ";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_hasMoved"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
@@ -338,7 +463,6 @@ class FSM
{
name = "Chase";
init = /*%FSM<STATEINIT""">*/"_timeN = time;" \n
"_vehicle = (getPosATL vehicle player);" \n
"" \n
"if (speed _agent < 0.1) then {_countr = _countr + 1} else {_countr = 0};" \n
"_target = _agent call zombie_findTargetAgent;" \n
@@ -347,21 +471,12 @@ class FSM
"" \n
"" \n
"//Move to target" \n
"" \n
"_agent setBehaviour ""CARELESS"";" \n
"_agent setCombatMode ""RED"";" \n
"_agent moveTo _targetPos;" \n
"_agent forceSpeed 6;" \n
"_agent forceSpeed 10;" \n
"" \n
"" \n
"//if (_agent distance player > 15) then {" \n
"// _cantSee = [_agent,_target] call dayz_losCheck;" \n
"//};" \n
"" \n
"//Check if LOS" \n
"if (_losCheck == 2) then {" \n
" _losCheck = 0;" \n
"_cantSee = [_agent,_target] call dayz_losCheck;" \n
" _cantSee = [_agent,_target] call dayz_losCheck;" \n
"};" \n
""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@@ -413,7 +528,7 @@ class FSM
priority = 0.000000;
to="Chase";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 2"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_losCheck = _losCheck + 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@@ -424,33 +539,13 @@ class FSM
class Cleanup_
{
name = "Cleanup_";
init = /*%FSM<STATEINIT""">*/"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],400];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;" \n
init = /*%FSM<STATEINIT""">*/"_waitStart = time;" \n
"" \n
"_waitStart = time;"/*%FSM</STATEINIT""">*/;
"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "someone_here">*/
class someone_here
{
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isSomeone && _isAlive"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Not_Alive">*/
class Not_Alive
{
priority = 0.000000;
to="Cleanup_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isSomeone && !_isAlive && (time - _waitStart) > 60"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "nobody_around">*/
class nobody_around
{
@@ -461,6 +556,16 @@ class FSM
action=/*%FSM<ACTION""">*/"dayz_spawnZombies = dayz_spawnZombies - 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "someone_here">*/
class someone_here
{
priority = 0.000000;
to="wait";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
@@ -491,7 +596,7 @@ class FSM
priority = 1.000000;
to="Reset_Targeting";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance _targetPos < 3"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"_agent distance _targetPos < 1"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
@@ -508,14 +613,65 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "wait">*/
class wait
{
name = "wait";
init = /*%FSM<STATEINIT""">*/"_list = (getposATL _agent) nearEntities [[""CAManBase"",""AllVehicles""],300];" \n
"_isSomeone = ({isPlayer _x} count _list) > 0;" \n
"" \n
"_timeN = time;"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "time_up">*/
class time_up
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _waitStart) > 300"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "nobody_around">*/
class nobody_around
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"!_isSomeone"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"dayz_spawnZombies = dayz_spawnZombies - 1;"/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "deleted">*/
class deleted
{
priority = 0.000000;
to="End";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"isNull _agent;"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Time_Check">*/
class Time_Check
{
priority = 0.000000;
to="wait";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(time - _timeN) > 30"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Reset_Targeting">*/
class Reset_Targeting
{
name = "Reset_Targeting";
init = /*%FSM<STATEINIT""">*/"_isAlive = alive _agent;" \n
"_target = _agent call zombie_findTargetAgent;" \n
"" \n
"if (!isNull _target) then {" \n
init = /*%FSM<STATEINIT""">*/"if (!isNull _target) then {" \n
" _targetPos = getPosATL _target;" \n
" _agent setVariable [""myDest"",_targetPos];" \n
" _agent moveTo _targetPos;" \n
@@ -527,13 +683,13 @@ class FSM
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
/*%FSM<LINK "No_target">*/
class No_target
/*%FSM<LINK "true">*/
class true
{
priority = 0.000000;
to="Loiter";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"(isNull _target)"/*%FSM</CONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/

View File

@@ -0,0 +1 @@
z\addons\dayz_communityassets

View File

@@ -0,0 +1,8 @@
class CfgPatches {
class dayz_communityassets {
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"dayz_code"};
};
};

Some files were not shown because too many files have changed in this diff Show More