mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 15:22:53 +03:00
rebase 1.0.1.13
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -78,7 +78,7 @@ class Land_DZE_WoodDoor_Base: DZE_Housebase {
|
||||
mapSize = 8; /* Size of the icon */
|
||||
icon = "\ca\data\data\Unknown_object.paa"; /* Path to the picture shown in the editor. */
|
||||
accuracy = 1000;
|
||||
armor = 150; /* "Lifepoints", if you like to call it that way.*/
|
||||
armor = 200; /* "Lifepoints", if you like to call it that way.*/
|
||||
destrType = "DestructBuilding"; /* type of destruction, when armor = 0 */
|
||||
scope = 2; /* Display it in the editor? 1 = No, 2 = Yes */
|
||||
offset[] = {0,1.5,0};
|
||||
@@ -98,6 +98,9 @@ class Land_DZE_WoodDoor_Base: DZE_Housebase {
|
||||
maintainBuilding[] = {{"PartWoodPlywood",1},{"PartWoodLumber",1}};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class Land_DZE_WoodDoorLocked_Base: DZE_Housebase {
|
||||
model = "\z\addons\dayz_epoch\models\small_wall_door_anim.p3d"; /* path to the object */
|
||||
displayName = "Wood Door Base"; /* entry in Stringtable.csv */
|
||||
@@ -105,7 +108,7 @@ class Land_DZE_WoodDoorLocked_Base: DZE_Housebase {
|
||||
mapSize = 8; /* Size of the icon */
|
||||
icon = "\ca\data\data\Unknown_object.paa"; /* Path to the picture shown in the editor. */
|
||||
accuracy = 1000;
|
||||
armor = 150; /* "Lifepoints", if you like to call it that way.*/
|
||||
armor = 200; /* "Lifepoints", if you like to call it that way.*/
|
||||
destrType = "DestructBuilding"; /* type of destruction, when armor = 0 */
|
||||
scope = 2; /* Display it in the editor? 1 = No, 2 = Yes */
|
||||
offset[] = {0,1.5,0};
|
||||
@@ -126,6 +129,35 @@ class Land_DZE_WoodDoorLocked_Base: DZE_Housebase {
|
||||
lockable = 3;
|
||||
};
|
||||
|
||||
class CinderWallDoor_DZ_Base: DZE_Housebase {
|
||||
model = "\z\addons\dayz_epoch\models\steel_garage_door.p3d"; /* path to the object */
|
||||
displayName = "Block Garage Door Base"; /* entry in Stringtable.csv */
|
||||
nameSound = "";
|
||||
mapSize = 8; /* Size of the icon */
|
||||
icon = "\ca\data\data\Unknown_object.paa"; /* Path to the picture shown in the editor. */
|
||||
accuracy = 1000;
|
||||
armor = 1600; /* "Lifepoints", if you like to call it that way.*/
|
||||
destrType = "DestructBuilding"; /* type of destruction, when armor = 0 */
|
||||
scope = 2; /* Display it in the editor? 1 = No, 2 = Yes */
|
||||
offset[] = {0,1.5,0};
|
||||
maintainBuilding[] = {{"MortarBucket",1}};
|
||||
};
|
||||
|
||||
class CinderWallDoorLocked_DZ_Base: DZE_Housebase {
|
||||
model = "\z\addons\dayz_epoch\models\steel_garage_door.p3d"; /* path to the object */
|
||||
displayName = "Block Garage Door Base"; /* entry in Stringtable.csv */
|
||||
nameSound = "";
|
||||
mapSize = 8; /* Size of the icon */
|
||||
icon = "\ca\data\data\Unknown_object.paa"; /* Path to the picture shown in the editor. */
|
||||
accuracy = 1000;
|
||||
armor = 1600; /* "Lifepoints", if you like to call it that way.*/
|
||||
destrType = "DestructBuilding"; /* type of destruction, when armor = 0 */
|
||||
scope = 2; /* Display it in the editor? 1 = No, 2 = Yes */
|
||||
offset[] = {0,1.5,0};
|
||||
maintainBuilding[] = {{"MortarBucket",1}};
|
||||
lockable = 3;
|
||||
};
|
||||
|
||||
/* Same name as stated in the Class DestructionEffects, but an "Land_" added infront*/
|
||||
class Land_rubble_wood_02 : ruins {
|
||||
scope = 1;
|
||||
@@ -430,3 +462,206 @@ class Land_DZE_GarageWoodDoorLocked: Land_DZE_WoodDoorLocked_Base {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class CinderWallDoorLocked_DZ: CinderWallDoorLocked_DZ_Base {
|
||||
model = "\z\addons\dayz_epoch\models\steel_garage_locked.p3d";
|
||||
displayName = "Block Garage Door Locked";
|
||||
GhostPreview = "CinderWallDoorway_Preview_DZ";
|
||||
/* Arma needs to know, how the animation trigger is triggered*/
|
||||
class AnimationSources {
|
||||
/* name must be identical to the one given by the model.cfg ("Open_Door")" */
|
||||
class Open_door {
|
||||
source = "user";
|
||||
animPeriod = 4; /* duration in seconds */
|
||||
initPhase = 0;
|
||||
};
|
||||
class Open_latch {
|
||||
source = "user";
|
||||
animPeriod = 1; /* duration in seconds */
|
||||
initPhase = 0;
|
||||
};
|
||||
};
|
||||
|
||||
/* The entry to the actionmenu */
|
||||
class UserActions
|
||||
{
|
||||
class Open_Door
|
||||
{
|
||||
displayName="Open Door";
|
||||
onlyforplayer = true;
|
||||
position="Door_knopf";
|
||||
radius=3; /* visibility distance of the entry */
|
||||
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
|
||||
condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 1)";
|
||||
statement="this animate [""Open_door"", 1]";
|
||||
};
|
||||
class Close_Door : Open_Door
|
||||
{
|
||||
displayName="Close Door";
|
||||
//condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
|
||||
condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_latch"" == 1)";
|
||||
statement="this animate [""Open_door"", 0]";
|
||||
};
|
||||
class Lock_Door : Open_Door
|
||||
{
|
||||
displayName="Lock Door";
|
||||
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
|
||||
condition="(DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 1)";
|
||||
statement="this animate [""Open_latch"", 0]";
|
||||
};
|
||||
class Unlock_Door : Open_Door
|
||||
{
|
||||
displayName="Unlock Door";
|
||||
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
|
||||
condition="(DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 0)";
|
||||
statement="this animate [""Open_latch"", 1]";
|
||||
};
|
||||
class Unlock_Door_Dialog : Open_Door
|
||||
{
|
||||
displayName="Unlock Door";
|
||||
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
|
||||
condition="DZE_Lock_Door != (this getvariable['CharacterID','0'])";
|
||||
statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;createdialog ""ComboLockUI""";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class CinderWallDoor_DZ: CinderWallDoor_DZ_Base {
|
||||
model = "\z\addons\dayz_epoch\models\steel_garage_door.p3d";
|
||||
displayName = "Block Garage Door";
|
||||
GhostPreview = "CinderWallDoorway_Preview_DZ";
|
||||
upgradeBuilding[] = {"CinderWallDoorLocked_DZ",{{"ItemComboLock",1}}};
|
||||
/* Arma needs to know, how the animation trigger is triggered*/
|
||||
class AnimationSources {
|
||||
/* name must be identical to the one given by the model.cfg ("Open_Door")" */
|
||||
class Open_door {
|
||||
source = "user";
|
||||
animPeriod = 4; /* duration in seconds */
|
||||
initPhase = 0;
|
||||
};
|
||||
};
|
||||
|
||||
/* The entry to the actionmenu */
|
||||
class UserActions
|
||||
{
|
||||
class Open_Door
|
||||
{
|
||||
displayName="Open Door";
|
||||
onlyforplayer = true;
|
||||
position="Door_knopf";
|
||||
radius=3; /* visibility distance of the entry */
|
||||
condition="this animationPhase ""Open_door"" < 0.5";
|
||||
statement="this animate [""Open_door"", 1]";
|
||||
};
|
||||
class Close_Door : Open_Door
|
||||
{
|
||||
displayName="Close Door";
|
||||
condition="this animationPhase ""Open_door"" >= 0.5";
|
||||
statement="this animate [""Open_door"", 0]";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
class CinderWallDoorSmallLocked_DZ: CinderWallDoorLocked_DZ_Base {
|
||||
model = "\z\addons\dayz_epoch\models\Steel_door_locked.p3d";
|
||||
displayName = "Block Door Locked";
|
||||
GhostPreview = "CinderWallSmallDoorway_Preview_DZ";
|
||||
/* Arma needs to know, how the animation trigger is triggered*/
|
||||
class AnimationSources {
|
||||
/* name must be identical to the one given by the model.cfg ("Open_Door")" */
|
||||
class Open_door {
|
||||
source = "user";
|
||||
animPeriod = 4; /* duration in seconds */
|
||||
initPhase = 0;
|
||||
};
|
||||
class Open_latch {
|
||||
source = "user";
|
||||
animPeriod = 1; /* duration in seconds */
|
||||
initPhase = 0;
|
||||
};
|
||||
};
|
||||
|
||||
/* The entry to the actionmenu */
|
||||
class UserActions
|
||||
{
|
||||
class Open_Door
|
||||
{
|
||||
displayName="Open Door";
|
||||
onlyforplayer = true;
|
||||
position="Door_knopf";
|
||||
radius=3; /* visibility distance of the entry */
|
||||
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
|
||||
condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 1)";
|
||||
statement="this animate [""Open_door"", 1]";
|
||||
};
|
||||
class Close_Door : Open_Door
|
||||
{
|
||||
displayName="Close Door";
|
||||
//condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_hinge"" == 1)";
|
||||
condition="(this animationPhase ""Open_door"" == 1) and (this animationPhase ""Open_latch"" == 1)";
|
||||
statement="this animate [""Open_door"", 0]";
|
||||
};
|
||||
class Lock_Door : Open_Door
|
||||
{
|
||||
displayName="Lock Door";
|
||||
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 1)";
|
||||
condition="(DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 1)";
|
||||
statement="this animate [""Open_latch"", 0]";
|
||||
};
|
||||
class Unlock_Door : Open_Door
|
||||
{
|
||||
displayName="Unlock Door";
|
||||
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
|
||||
condition="(DZE_Lock_Door == (this getvariable['CharacterID','0'])) and (this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_latch"" == 0)";
|
||||
statement="this animate [""Open_latch"", 1]";
|
||||
};
|
||||
class Unlock_Door_Dialog : Open_Door
|
||||
{
|
||||
displayName="Unlock Door";
|
||||
//condition="(this animationPhase ""Open_door"" == 0) and (this animationPhase ""Open_hinge"" == 0)";
|
||||
condition="DZE_Lock_Door != (this getvariable['CharacterID','0'])";
|
||||
statement="dayz_selectedDoor = this;DZE_topCombo = 0;DZE_midCombo = 0;DZE_botCombo = 0;createdialog ""ComboLockUI""";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class CinderWallDoorSmall_DZ: CinderWallDoor_DZ_Base {
|
||||
model = "\z\addons\dayz_epoch\models\Steel_door.p3d";
|
||||
displayName = "Block Door";
|
||||
GhostPreview = "CinderWallSmallDoorway_Preview_DZ";
|
||||
upgradeBuilding[] = {"CinderWallDoorSmallLocked_DZ",{{"ItemComboLock",1}}};
|
||||
/* Arma needs to know, how the animation trigger is triggered*/
|
||||
class AnimationSources {
|
||||
/* name must be identical to the one given by the model.cfg ("Open_Door")" */
|
||||
class Open_door {
|
||||
source = "user";
|
||||
animPeriod = 4; /* duration in seconds */
|
||||
initPhase = 0;
|
||||
};
|
||||
};
|
||||
|
||||
/* The entry to the actionmenu */
|
||||
class UserActions
|
||||
{
|
||||
class Open_Door
|
||||
{
|
||||
displayName="Open Door";
|
||||
onlyforplayer = true;
|
||||
position="Door_knopf";
|
||||
radius=3; /* visibility distance of the entry */
|
||||
condition="this animationPhase ""Open_door"" < 0.5";
|
||||
statement="this animate [""Open_door"", 1]";
|
||||
};
|
||||
class Close_Door : Open_Door
|
||||
{
|
||||
displayName="Close Door";
|
||||
condition="this animationPhase ""Open_door"" >= 0.5";
|
||||
statement="this animate [""Open_door"", 0]";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -49,6 +49,7 @@ class CfgWeapons {
|
||||
#include "CfgWeapons\Melee\Crossbow.hpp"
|
||||
#include "CfgWeapons\Melee\MeleeBaseBallBat.hpp"
|
||||
#include "CfgWeapons\Melee\MeleeFishingPole.hpp"
|
||||
#include "CfgWeapons\Melee\MeleeSledgehammer.hpp"
|
||||
// #include "CfgWeapons\Melee\MeleeBaseBallBatBarbed.hpp"
|
||||
// #include "CfgWeapons\Melee\MeleeBaseBallBatNails.hpp"
|
||||
|
||||
@@ -61,6 +62,7 @@ class CfgWeapons {
|
||||
#include "CfgWeapons\Item\ItemEtool.hpp"
|
||||
#include "CfgWeapons\Item\ItemShovel.hpp"
|
||||
#include "CfgWeapons\Item\ItemFishingPole.hpp"
|
||||
#include "CfgWeapons\Item\ItemSledge.hpp"
|
||||
#include "CfgWeapons\Item\ItemKeyKit.hpp"
|
||||
#include "CfgWeapons\Item\ItemKeys.hpp"
|
||||
|
||||
|
||||
24
SQF/dayz_code/Configs/CfgWeapons/Item/ItemSledge.hpp
Normal file
24
SQF/dayz_code/Configs/CfgWeapons/Item/ItemSledge.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
class ItemSledge: ItemCore
|
||||
{
|
||||
scope=2;
|
||||
displayName="Sledgehammer";
|
||||
model="\z\addons\dayz_epoch\models\sledge_mag.p3d";
|
||||
picture="\z\addons\dayz_epoch\pictures\equip_sledge_CA.paa";
|
||||
descriptionShort="A tool with a large, flat head attached to a handle. The head is typically made of metal. The sledgehammer can apply more force than other hammers.";
|
||||
class ItemActions
|
||||
{
|
||||
class Toolbelt
|
||||
{
|
||||
text="Remove from Toolbelt";
|
||||
script="spawn player_addToolbelt;";
|
||||
use[]=
|
||||
{
|
||||
"ItemSledge"
|
||||
};
|
||||
output[]=
|
||||
{
|
||||
"MeleeSledge"
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
41
SQF/dayz_code/Configs/CfgWeapons/Melee/MeleeSledgehammer.hpp
Normal file
41
SQF/dayz_code/Configs/CfgWeapons/Melee/MeleeSledgehammer.hpp
Normal file
@@ -0,0 +1,41 @@
|
||||
class MeleeSledge: MeleeWeapon
|
||||
{
|
||||
scope=2;
|
||||
melee= "true";
|
||||
autoreload=1;
|
||||
magazineReloadTime=0;
|
||||
model="\z\addons\dayz_epoch\models\sledge_weaponized";
|
||||
picture="\z\addons\dayz_epoch\pictures\equip_sledge_CA.paa"; // todo icon
|
||||
displayName="Sledgehammer";
|
||||
droppeditem= "ItemSledge";
|
||||
magazines[]=
|
||||
{
|
||||
"sledge_swing"
|
||||
};
|
||||
handAnim[]=
|
||||
{
|
||||
"OFP2_ManSkeleton",
|
||||
"\dayz_weapons\anim\melee_hatchet_holding.rtm"
|
||||
};
|
||||
class ItemActions
|
||||
{
|
||||
class Toolbelt
|
||||
{
|
||||
text="Add to Toolbelt";
|
||||
script="spawn player_addToolbelt;";
|
||||
use[]=
|
||||
{
|
||||
"MeleeSledge"
|
||||
};
|
||||
output[]=
|
||||
{
|
||||
"ItemSledge"
|
||||
};
|
||||
};
|
||||
};
|
||||
class Library
|
||||
{
|
||||
libTextDesc="A tool with a large, flat head attached to a handle. The head is typically made of metal. The sledgehammer can apply more force than other hammers.";
|
||||
};
|
||||
descriptionShort="A tool with a large, flat head attached to a handle. The head is typically made of metal. The sledgehammer can apply more force than other hammers.";
|
||||
};
|
||||
@@ -14,6 +14,10 @@ class CfgAmmo {
|
||||
hit = 7;
|
||||
simulation = "shotBullet";
|
||||
};
|
||||
class Sledge_Swing_Ammo : Melee {
|
||||
hit = 11;
|
||||
simulation = "shotBullet";
|
||||
};
|
||||
class Dummy_Swing_Ammo : Melee {
|
||||
hit = 0;
|
||||
simulation = "shotBullet";
|
||||
|
||||
@@ -174,7 +174,7 @@ class CfgLoot {
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.11,
|
||||
0.08,
|
||||
0.03,
|
||||
0.01,
|
||||
0.04,
|
||||
@@ -190,7 +190,7 @@ class CfgLoot {
|
||||
0.03,
|
||||
0.03,
|
||||
0.03,
|
||||
0.01
|
||||
0.04
|
||||
}
|
||||
};
|
||||
generic[] = {
|
||||
@@ -381,18 +381,24 @@ class CfgLoot {
|
||||
"7Rnd_45ACP_1911",
|
||||
"6Rnd_45ACP",
|
||||
"15Rnd_W1866_Slug",
|
||||
"8Rnd_B_Beneli_74Slug",
|
||||
"8Rnd_B_Beneli_Pellets",
|
||||
"HandRoadFlare",
|
||||
"8Rnd_9x18_MakarovSD"
|
||||
"8Rnd_9x18_MakarovSD",
|
||||
"ItemComboLock",
|
||||
"SmokeShell",
|
||||
"FoodMRE"
|
||||
},
|
||||
{
|
||||
0.3,
|
||||
0.2,
|
||||
0.1,
|
||||
0.08,
|
||||
0.08,
|
||||
0.14,
|
||||
0.15,
|
||||
0.1,
|
||||
0.01
|
||||
0.08,
|
||||
0.01,
|
||||
0.07,
|
||||
0.05,
|
||||
0.04
|
||||
}
|
||||
};
|
||||
hunter[] = {
|
||||
@@ -435,23 +441,25 @@ class CfgLoot {
|
||||
"ItemPainkiller",
|
||||
"ItemWire",
|
||||
"ItemTankTrap",
|
||||
"ItemComboLock"
|
||||
"ItemComboLock",
|
||||
"ItemSledgeHead"
|
||||
},
|
||||
{
|
||||
0.14,
|
||||
0.12,
|
||||
0.09,
|
||||
0.10,
|
||||
0.10,
|
||||
0.11,
|
||||
0.09,
|
||||
0.06,
|
||||
0.06,
|
||||
0.06,
|
||||
0.06,
|
||||
0.12,
|
||||
0.1,
|
||||
0.06,
|
||||
0.01,
|
||||
0.01,
|
||||
0.01
|
||||
0.03,
|
||||
0.05,
|
||||
0.02
|
||||
}
|
||||
};
|
||||
|
||||
@@ -555,4 +563,16 @@ class CfgLoot {
|
||||
0.04
|
||||
}
|
||||
};
|
||||
tents[] = {
|
||||
{
|
||||
"ItemTentOld",
|
||||
"ItemTentDomed",
|
||||
"ItemTentDomed2",
|
||||
},
|
||||
{
|
||||
0.34,
|
||||
0.33,
|
||||
0.33,
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -1411,14 +1411,14 @@ class CfgVehicles {
|
||||
scope = 2;
|
||||
destrType = "DestructNo";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0.5};
|
||||
offset[] = {0,1.5,0};
|
||||
model = "\ca\misc\jezek_kov";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 400;
|
||||
displayName = "Hedgehog (Steel)";
|
||||
vehicleClass = "Fortifications";
|
||||
constructioncount = 3;
|
||||
constructioncount = 1;
|
||||
removeoutput[] = {{"ItemTankTrap",1}};
|
||||
};
|
||||
// WorkBench_DZ
|
||||
@@ -1603,17 +1603,31 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
// modular
|
||||
class CinderWallHalf_DZ: ModularItems
|
||||
class MetalFloor_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,4,0};
|
||||
model="\z\addons\dayz_epoch\models\Cinder_Wall_Half.p3d";
|
||||
model="\z\addons\dayz_epoch\models\metal_floor.p3d";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 800;
|
||||
displayName = "Cinder Block Wall 1/2";
|
||||
armor = 1600;
|
||||
displayName = "Metal Floor";
|
||||
vehicleClass = "Fortifications";
|
||||
GhostPreview = "MetalFloor_Preview_DZ";
|
||||
};
|
||||
class CinderWallHalf_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\cinder_wall_half.p3d";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 1600;
|
||||
displayName = "Half Cinder Block Wall";
|
||||
vehicleClass = "Fortifications";
|
||||
upgradeBuilding[] = {"CinderWall_DZ",{{"CinderBlocks",4},{"MortarBucket",1}}};
|
||||
maintainBuilding[] = {{"MortarBucket",1}};
|
||||
@@ -1624,17 +1638,51 @@ class CfgVehicles {
|
||||
scope = 2;
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,4,0};
|
||||
model="\z\addons\dayz_epoch\models\Cinder_Wall.p3d";
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\cinder_wall_full.p3d";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 800;
|
||||
armor = 1600;
|
||||
displayName = "Cinder Block Wall";
|
||||
vehicleClass = "Fortifications";
|
||||
maintainBuilding[] = {{"MortarBucket",1}};
|
||||
GhostPreview = "CinderWall_Preview_DZ";
|
||||
};
|
||||
|
||||
class CinderWallDoorway_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,2,0};
|
||||
model="\z\addons\dayz_epoch\models\steel_garage_frame.p3d";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 1600;
|
||||
displayName = "Block Garage Doorway";
|
||||
vehicleClass = "Fortifications";
|
||||
maintainBuilding[] = {{"MortarBucket",1}};
|
||||
upgradeBuilding[] = {"CinderWallDoor_DZ",{{"ItemPole",3},{"ItemTankTrap",3}}};
|
||||
GhostPreview = "CinderWallDoorway_Preview_DZ";
|
||||
};
|
||||
|
||||
class CinderWallSmallDoorway_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,2,0};
|
||||
model="\z\addons\dayz_epoch\models\Steel_door_frame.p3d";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 1600;
|
||||
displayName = "Block Doorway";
|
||||
vehicleClass = "Fortifications";
|
||||
maintainBuilding[] = {{"MortarBucket",1}};
|
||||
upgradeBuilding[] = {"CinderWallDoorSmall_DZ",{{"ItemPole",1},{"ItemTankTrap",1}}};
|
||||
GhostPreview = "CinderWallSmallDoorway_Preview_DZ"; // todo change this
|
||||
};
|
||||
|
||||
class WoodFloor_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
@@ -1686,7 +1734,7 @@ class CfgVehicles {
|
||||
class WoodLargeWall_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructTree";
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\large_wall.p3d";
|
||||
@@ -1695,6 +1743,7 @@ class CfgVehicles {
|
||||
armor = 200;
|
||||
displayName = "Large Wall";
|
||||
vehicleClass = "Fortifications";
|
||||
upgradeBuilding[] = {"WoodLargeWallWin_DZ",{{"PartGlass",1}}};
|
||||
maintainBuilding[] = {{"PartWoodPlywood",1},{"PartWoodLumber",1}};
|
||||
GhostPreview = "WoodLargeWall_Preview_DZ";
|
||||
};
|
||||
@@ -1702,7 +1751,7 @@ class CfgVehicles {
|
||||
class WoodLargeWallDoor_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructTree";
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\large_wall_door.p3d";
|
||||
@@ -1718,7 +1767,7 @@ class CfgVehicles {
|
||||
class WoodLargeWallWin_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructTree";
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\large_wall_win.p3d";
|
||||
@@ -1734,7 +1783,7 @@ class CfgVehicles {
|
||||
class WoodSmallWall_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructTree";
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\small_wall.p3d";
|
||||
@@ -1744,12 +1793,13 @@ class CfgVehicles {
|
||||
displayName = "Small Wall";
|
||||
vehicleClass = "Fortifications";
|
||||
maintainBuilding[] = {{"PartWoodPlywood",1},{"PartWoodLumber",1}};
|
||||
upgradeBuilding[] = {"WoodSmallWallWin_DZ",{{"PartGlass",1}}};
|
||||
GhostPreview = "WoodSmallWall_Preview_DZ";
|
||||
};
|
||||
class WoodSmallWallThird_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructTree";
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\third_wall.p3d";
|
||||
@@ -1766,7 +1816,7 @@ class CfgVehicles {
|
||||
class WoodSmallWallWin_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructTree";
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\small_wall_win.p3d";
|
||||
@@ -1781,7 +1831,7 @@ class CfgVehicles {
|
||||
class WoodSmallWallDoor_DZ: ModularItems
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructTree";
|
||||
destrType = "DestructBuilding";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\small_wall_door.p3d";
|
||||
@@ -1844,13 +1894,52 @@ class CfgVehicles {
|
||||
};
|
||||
|
||||
// ghost models
|
||||
class CinderWallSmallDoorway_Preview_DZ: NonStrategic
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructNo";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\steel_garage_frame_ghost.p3d"; // todo change this
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 1000;
|
||||
displayName = "Block Garage Doorway";
|
||||
vehicleClass = "Fortifications";
|
||||
};
|
||||
class CinderWallDoorway_Preview_DZ: NonStrategic
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructNo";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\steel_garage_frame_ghost.p3d";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 1000;
|
||||
displayName = "Block Garage Doorway";
|
||||
vehicleClass = "Fortifications";
|
||||
};
|
||||
class MetalFloor_Preview_DZ: NonStrategic
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructNo";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\metal_floor_ghost.p3d";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 1000;
|
||||
displayName = "Metal Floor Preview";
|
||||
vehicleClass = "Fortifications";
|
||||
};
|
||||
class CinderWallHalf_Preview_DZ: NonStrategic
|
||||
{
|
||||
scope = 2;
|
||||
destrType = "DestructNo";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\Cinder_Wall_Half_ghost.p3d";
|
||||
model="\z\addons\dayz_epoch\models\cinder_wall_half_ghost.p3d";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 1000;
|
||||
@@ -1863,7 +1952,7 @@ class CfgVehicles {
|
||||
destrType = "DestructNo";
|
||||
cost = 100;
|
||||
offset[] = {0,1.5,0};
|
||||
model="\z\addons\dayz_epoch\models\Cinder_Wall_ghost.p3d";
|
||||
model="\z\addons\dayz_epoch\models\cinder_wall_full_ghost.p3d";
|
||||
icon = "\ca\data\data\Unknown_object.paa";
|
||||
mapSize = 2;
|
||||
armor = 1000;
|
||||
@@ -2377,7 +2466,7 @@ class CfgVehicles {
|
||||
displayName = "$STR_EQUIP_NAME_20";
|
||||
class transportmagazines
|
||||
{
|
||||
class _xx_ItemTentDomed2
|
||||
class _xx_ItemTentOld
|
||||
{
|
||||
magazine = "ItemTentOld";
|
||||
count = 1;
|
||||
@@ -2390,7 +2479,7 @@ class CfgVehicles {
|
||||
displayName = "Domed Desert Tent";
|
||||
class transportmagazines
|
||||
{
|
||||
class _xx_ItemTentDomed2
|
||||
class _xx_ItemTentDomed
|
||||
{
|
||||
magazine = "ItemTentDomed";
|
||||
count = 1;
|
||||
|
||||
@@ -149,7 +149,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ Epoch 1.0.2";
|
||||
text = "DayZ Epoch 1.0.2.13 DEV";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
delete CA_TitleMainMenu;
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
private ["_location","_isOk","_dir","_classname","_item","_cancel","_location3","_location4","_location1","_location2","_counter","_hasbuilditem","_dis","_sfx","_object","_onLadder","_isWater","_text","_offset_x","_offset_y","_offset_z","_offset_z_attach","_tmpbuilt","_built_location"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_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;
|
||||
|
||||
if(_isWater) exitWith {cutText [localize "str_player_26", "PLAIN DOWN"];};
|
||||
if(_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"];};
|
||||
|
||||
if (vehicle player != player) exitWith {cutText ["You may not build while in a vehicle", "PLAIN DOWN"]};
|
||||
|
||||
_item = _this;
|
||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||
|
||||
_hasbuilditem = _this in magazines player;
|
||||
|
||||
if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]};
|
||||
|
||||
_dir = getDir player;
|
||||
|
||||
_offset_x = 0;
|
||||
_offset_y = 1.5;
|
||||
_offset_z = 0;
|
||||
_offset_z_attach = 0.5;
|
||||
|
||||
// Start Preview loop
|
||||
_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_tmpbuilt setdir _dir;
|
||||
_tmpbuilt attachTo [player,[_offset_x,_offset_y,_offset_z_attach]];
|
||||
|
||||
_cancel = false;
|
||||
_counter = 0;
|
||||
_isOk = true;
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
if(_counter == 0) then {
|
||||
cutText ["Planning construction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
sleep 5;
|
||||
_location1 = getPosATL player;
|
||||
sleep 5;
|
||||
_location2 = getPosATL player;
|
||||
|
||||
if(_location1 distance _location2 < 0.1) exitWith {
|
||||
|
||||
cutText ["Started construction move within 5 seconds to cancel.", "PLAIN DOWN"];
|
||||
_location3 = getPosATL player;
|
||||
sleep 5;
|
||||
_location4 = getPosATL player;
|
||||
|
||||
if(_location3 distance _location4 > 0.1) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
};
|
||||
|
||||
_isOk = false;
|
||||
};
|
||||
};
|
||||
if(_counter >= 1) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
};
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
detach _tmpbuilt;
|
||||
|
||||
// Get location of detached tmp built
|
||||
_built_location = (getPosATL _tmpbuilt);
|
||||
|
||||
// force to ground
|
||||
_built_location set [2,0];
|
||||
|
||||
if(!_cancel) then {
|
||||
|
||||
_hasbuilditem = _this in magazines player;
|
||||
if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]};
|
||||
|
||||
_dir = getDir player;
|
||||
|
||||
player removeMagazine _item;
|
||||
|
||||
//disableSerialization;
|
||||
//call dayz_forceSave;
|
||||
|
||||
|
||||
player playActionNow "Medic";
|
||||
sleep 1;
|
||||
|
||||
_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;
|
||||
_object = createVehicle [_classname, _built_location, [], 0, "CAN_COLLIDE"];
|
||||
_object setDir _dir;
|
||||
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];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
|
||||
sleep 2;
|
||||
player allowDamage true;
|
||||
|
||||
} else {
|
||||
cutText [format["Canceled construction of %1.",_text], "PLAIN DOWN"];
|
||||
};
|
||||
TradeInprogress = false;
|
||||
@@ -81,7 +81,6 @@ if (_finished) then {
|
||||
|
||||
_vehicle setVariable ["GeneratorSound", _soundSource,true];
|
||||
|
||||
// TODO: Add running sounds to generator
|
||||
cutText ["Generator has been started.", "PLAIN DOWN"];
|
||||
|
||||
};
|
||||
|
||||
@@ -33,21 +33,6 @@ if(_classname isKindOf "TrapBear") exitwith {DZE_CanPickup = true; deleteVehicle
|
||||
|
||||
player playActionNow "PutDown";
|
||||
|
||||
if (_classname == "MeleeCrowbar") then {
|
||||
player addMagazine 'crowbar_swing';
|
||||
};
|
||||
if (_classname == "MeleeHatchet") then {
|
||||
player addMagazine 'hatchet_swing';
|
||||
};
|
||||
if (_classname == "MeleeMachete") then {
|
||||
player addMagazine 'Machete_swing';
|
||||
};
|
||||
if (_classname == "MeleeFishingPole") then {
|
||||
player addMagazine 'Fishing_Swing';
|
||||
};
|
||||
|
||||
sleep 1;
|
||||
|
||||
_claimedBy = _holder getVariable["claimed","0"];
|
||||
|
||||
if (_claimedBy != _playerID) exitWith {sleep 1; DZE_CanPickup = true; cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]};
|
||||
@@ -64,12 +49,15 @@ _qty = count _obj;
|
||||
|
||||
if(_qty >= 1) then {
|
||||
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix) (add new melee ammo to array if needed)
|
||||
{player removeMagazines _x} forEach ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Fishing_Swing","sledge_swing"];
|
||||
|
||||
_config = (configFile >> _type >> _classname);
|
||||
_isOk = [player,_config] call BIS_fnc_invAdd;
|
||||
if (_isOk) then {
|
||||
|
||||
deleteVehicle _holder;
|
||||
if (_classname in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole"]) then {
|
||||
if (_classname in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
|
||||
if (_type == "cfgWeapons") then {
|
||||
_muzzles = getArray(configFile >> "cfgWeapons" >> _classname >> "muzzles");
|
||||
@@ -81,20 +69,16 @@ if(_qty >= 1) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_holder setVariable["claimed","0",true];
|
||||
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
|
||||
if (_classname == "MeleeCrowbar") then {
|
||||
player removeMagazine 'crowbar_swing';
|
||||
};
|
||||
if (_classname == "MeleeHatchet") then {
|
||||
player removeMagazine 'hatchet_swing';
|
||||
};
|
||||
if (_classname == "MeleeMachete") then {
|
||||
player removeMagazine 'Machete_swing';
|
||||
};
|
||||
if (_classname == "MeleeFishingPole") then {
|
||||
player removeMagazine 'Fishing_Swing';
|
||||
|
||||
//adding melee mags back if needed
|
||||
switch (primaryWeapon player) do
|
||||
{
|
||||
case "MeleeHatchet": {player addMagazine 'Hatchet_Swing';};
|
||||
case "MeleeCrowbar": {player addMagazine 'Crowbar_Swing';};
|
||||
case "MeleeMachete": {player addMagazine 'Machete_Swing';};
|
||||
case "MeleeFishingPole": {player addMagazine 'Fishing_Swing';};
|
||||
case "MeleeSledge": {player addMagazine 'sledge_swing';};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ _create = getArray (_config >> "ItemActions" >> "Toolbelt" >> "output") select
|
||||
_config2 = configFile >> "cfgWeapons" >> _create;
|
||||
|
||||
//Remove magazines if needed
|
||||
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole"]) then {
|
||||
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
_magType = ([] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines")) select 0;
|
||||
_meleeNum = ({_x == _magType} count magazines player);
|
||||
for "_i" from 1 to _meleeNum do {
|
||||
@@ -28,12 +28,14 @@ if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole"])
|
||||
};
|
||||
};
|
||||
|
||||
if (_item in ["ItemHatchet","ItemCrowbar","ItemMachete"]) then {
|
||||
if (_item in ["ItemHatchet","ItemCrowbar","ItemMachete","ItemFishingPole","ItemSledge"]) then {
|
||||
switch (primaryWeapon player) do
|
||||
{
|
||||
case "MeleeHatchet": { "MeleeHatchet" call player_addToolbelt };
|
||||
case "MeleeCrowbar": { "MeleeCrowbar" call player_addToolbelt };
|
||||
case "MeleeMachete": { "MeleeMachete" call player_addToolbelt };
|
||||
case "MeleeFishingPole": { "MeleeFishingPole" call player_addToolbelt };
|
||||
case "MeleeSledge": { "MeleeSledge" call player_addToolbelt };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -44,10 +46,13 @@ if (_isOk) then {
|
||||
player removeWeapon _item;
|
||||
|
||||
//Add magazines if needed
|
||||
if (_create in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole"]) then {
|
||||
if (_create in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
if (_create == "MeleeCrowbar") then {
|
||||
player addMagazine 'crowbar_swing';
|
||||
};
|
||||
if (_create == "MeleeSledge") then {
|
||||
player addMagazine 'sledge_swing';
|
||||
};
|
||||
if (_create == "MeleeHatchet") then {
|
||||
player addMagazine 'hatchet_swing';
|
||||
};
|
||||
@@ -71,10 +76,13 @@ if (_isOk) then {
|
||||
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
|
||||
|
||||
//Add magazines back
|
||||
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole"]) then {
|
||||
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
if (_item == "MeleeCrowbar") then {
|
||||
player addMagazine 'crowbar_swing';
|
||||
};
|
||||
if (_item == "MeleeSledge") then {
|
||||
player addMagazine 'sledge_swing';
|
||||
};
|
||||
if (_item == "MeleeHatchet") then {
|
||||
player addMagazine 'hatchet_swing';
|
||||
};
|
||||
|
||||
@@ -4,9 +4,12 @@
|
||||
*/
|
||||
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nBuilding already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// disallow building if too many objects are found within 30m
|
||||
if((count ((position player) nearObjects ["All",30])) >= DZE_BuildingLimit) exitWith {TradeInprogress = false; cutText ["\n\nCannot build, too many objects witin 30m.", "PLAIN DOWN"];};
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
||||
_cancel = false;
|
||||
@@ -22,7 +25,7 @@ call gear_ui_init;
|
||||
|
||||
if(_isWater) exitWith {TradeInprogress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
|
||||
if(_onLadder) exitWith {TradeInprogress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
|
||||
if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["Cannot build while in combat.", "PLAIN DOWN"];};
|
||||
if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["\n\nCannot build while in combat.", "PLAIN DOWN"];};
|
||||
|
||||
_item = _this;
|
||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||
@@ -60,7 +63,7 @@ _findNearestPole = [];
|
||||
_IsNearPlot = count (_findNearestPole);
|
||||
|
||||
// If item is plot pole and another one exists within 45m
|
||||
if(_isPole and _IsNearPlot > 0) exitWith { TradeInprogress = false; cutText ["Cannot build plot pole within 45m of an existing plot." , "PLAIN DOWN"]; };
|
||||
if(_isPole and _IsNearPlot > 0) exitWith { TradeInprogress = false; cutText ["\n\nCannot build plot pole within 45m of an existing plot." , "PLAIN DOWN"]; };
|
||||
|
||||
if(_IsNearPlot == 0) then {
|
||||
_canBuildOnPlot = true;
|
||||
@@ -87,7 +90,7 @@ if(_IsNearPlot == 0) then {
|
||||
};
|
||||
|
||||
// _message
|
||||
if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText [format["Unable to build %1 nearby.",_needText,_distance] , "PLAIN DOWN"]; };
|
||||
if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText [format["\n\nUnable to build %1 nearby.",_needText,_distance] , "PLAIN DOWN"]; };
|
||||
|
||||
_missing = "";
|
||||
_hasrequireditem = true;
|
||||
@@ -99,7 +102,7 @@ _hasrequireditem = true;
|
||||
_hasbuilditem = _this in magazines player;
|
||||
if (!_hasbuilditem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; };
|
||||
|
||||
if (!_hasrequireditem) exitWith {TradeInprogress = false; cutText [format["Missing tool %1",_missing] , "PLAIN DOWN"]; };
|
||||
if (!_hasrequireditem) exitWith {TradeInprogress = false; cutText [format["\n\nMissing tool %1",_missing] , "PLAIN DOWN"]; };
|
||||
if (_hasrequireditem) then {
|
||||
|
||||
_location = [0,0,0];
|
||||
@@ -174,7 +177,7 @@ if (_hasrequireditem) then {
|
||||
_object attachTo [player];
|
||||
};
|
||||
|
||||
cutText ["Planning construction numpad 8 = up, numpad 2 = down, and numpad 5 to start building.", "PLAIN DOWN"];
|
||||
cutText ["\n\nPlanning construction: PgUp = raise, PgDn = lower, Q or E = flip 180, and Space-Bar to start building.", "PLAIN DOWN"];
|
||||
|
||||
sleep 1;
|
||||
|
||||
@@ -249,7 +252,7 @@ if (_hasrequireditem) then {
|
||||
|
||||
if(!_cancel) then {
|
||||
|
||||
cutText [format["Placing %1, move to cancel.",_text], "PLAIN DOWN"];
|
||||
cutText [format["\n\nPlacing %1, move to cancel.",_text], "PLAIN DOWN"];
|
||||
|
||||
_limit = 3;
|
||||
|
||||
@@ -289,6 +292,9 @@ if (_hasrequireditem) then {
|
||||
if (r_interrupt or (player getVariable["combattimeout", 0] >= time)) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
if (DZE_cancelBuilding) exitWith {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
@@ -303,7 +309,7 @@ if (_hasrequireditem) then {
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
cutText [format["Constructing %1 stage %2 of %3, move to cancel.",_text, _counter,_limit], "PLAIN DOWN"];
|
||||
cutText [format["\n\nConstructing %1 stage %2 of %3, move to cancel.",_text, _counter,_limit], "PLAIN DOWN"];
|
||||
|
||||
if(_counter == _limit) exitWith {
|
||||
_isOk = false;
|
||||
@@ -369,7 +375,7 @@ if (_hasrequireditem) then {
|
||||
dayzPublishObj = [_combination,_tmpbuilt,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
|
||||
cutText [format["You have setup your %2. Combination is %1",_combinationDisplay,_text], "PLAIN DOWN", 5];
|
||||
cutText [format["\n\nYou have setup your %2. Combination is %1",_combinationDisplay,_text], "PLAIN DOWN", 5];
|
||||
|
||||
|
||||
} else {
|
||||
@@ -382,7 +388,7 @@ if (_hasrequireditem) then {
|
||||
|
||||
} else {
|
||||
deleteVehicle _tmpbuilt;
|
||||
cutText ["Canceled building." , "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled building." , "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
@@ -394,12 +400,12 @@ if (_hasrequireditem) then {
|
||||
|
||||
deleteVehicle _tmpbuilt;
|
||||
|
||||
cutText ["Canceled building." , "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled building." , "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
deleteVehicle _tmpbuilt;
|
||||
cutText [format["Canceled construction of %1 %2.",_text,_reason], "PLAIN DOWN"];
|
||||
cutText [format["\n\nCanceled construction of %1 %2.",_text,_reason], "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,14 @@ s_player_maint_build = 1;
|
||||
// get cursortarget from addaction
|
||||
_obj = _this select 3;
|
||||
|
||||
// Find objectID
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
|
||||
// Find objectUID
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_maint_build = -1; cutText ["Not setup yet.", "PLAIN DOWN"];};
|
||||
|
||||
// Get classname
|
||||
_classname = typeOf _obj;
|
||||
|
||||
@@ -75,12 +83,6 @@ if (_proceed) then {
|
||||
// Get direction
|
||||
_dir = getDir _obj;
|
||||
|
||||
// Find objectID
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
|
||||
// Find objectUID
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
// Find CharacterID
|
||||
_objectCharacterID = _obj getVariable ["CharacterID","0"];
|
||||
|
||||
@@ -100,10 +102,13 @@ if (_proceed) then {
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
|
||||
// sleep a bit to make sure delete happens before create
|
||||
sleep 1;
|
||||
|
||||
// Publish variables
|
||||
_object setVariable ["CharacterID",_objectCharacterID,true];
|
||||
_object setVariable ["ObjectID",_objectID,true];
|
||||
_object setVariable ["ObjectUID",_objectUID,true];
|
||||
|
||||
//_object setVariable ["ObjectUID",_objectUID,true];
|
||||
_object setVariable ["OEMPos",_location,true];
|
||||
|
||||
dayzPublishObj = [_objectCharacterID,_object,[_dir,_location],_classname];
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
private ["_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_animState","_isMedic","_proceed","_counter","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Harvest wood already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nHarvest wood already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// allowed trees list move this later
|
||||
@@ -90,7 +90,7 @@ if (count(_findNearestTree) >= 1) then {
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
cutText [format["Chopping down tree, walk away at anytime to cancel. (%1/%2)", _counter, _countOut], "PLAIN DOWN"];
|
||||
cutText [format["\n\nChopping down tree, walk away at anytime to cancel. (%1/%2)", _counter, _countOut], "PLAIN DOWN"];
|
||||
|
||||
if(_counter == _countOut) exitWith {
|
||||
_isOk = false;
|
||||
@@ -115,7 +115,7 @@ if (count(_findNearestTree) >= 1) then {
|
||||
};
|
||||
//diag_log format["DEBUG TREE DAMAGE: %1", _tree];
|
||||
|
||||
cutText [format["%1 piles of wood has been successfully added in front of you.", _countOut], "PLAIN DOWN"];
|
||||
cutText [format["\n\n%1 piles of wood has been successfully added in front of you.", _countOut], "PLAIN DOWN"];
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
@@ -123,7 +123,7 @@ if (count(_findNearestTree) >= 1) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["Canceled Harvesting Wood.", "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled Harvesting Wood.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_item","_config","_onLadder","_create","_started","_finished","_animState","_isMedic","_qty","_box","_num_removed","_text","_haskey","_hastoolweapon","_isNear","_hasTinBar"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Copy key already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nCopy key already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_item = _this;
|
||||
@@ -14,16 +14,16 @@ _haskey = _this in weapons player;
|
||||
if (!_haskey) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_30"),_text] , "PLAIN DOWN"]};
|
||||
|
||||
_hastoolweapon = "ItemKeyKit" in weapons player;
|
||||
if (!_hastoolweapon) exitWith {TradeInprogress = false; cutText ["Need Keymakers kit to make a copy of a key." , "PLAIN DOWN"]};
|
||||
if (!_hastoolweapon) exitWith {TradeInprogress = false; cutText ["\n\nNeed Keymakers kit to make a copy of a key." , "PLAIN DOWN"]};
|
||||
|
||||
_isNear = {inflamed _x} count (position player nearObjects 2);
|
||||
if(_isNear == 0) exitWith {TradeInprogress = false; cutText ["Key crafting needs a fire within 2 meters." , "PLAIN DOWN"]};
|
||||
_isNear = {inflamed _x} count (position player nearObjects 3);
|
||||
if(_isNear == 0) exitWith {TradeInprogress = false; cutText ["\n\nKey crafting needs a fire within 3 meters." , "PLAIN DOWN"]};
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
// require one tin bar per key
|
||||
_hasTinBar = "ItemTinBar" in magazines player;
|
||||
if(!_hasTinBar) exitWith {TradeInprogress = false; cutText ["Key crafting requires a 1oz Tin Bar." , "PLAIN DOWN"]};
|
||||
if(!_hasTinBar) exitWith {TradeInprogress = false; cutText ["\n\nKey crafting requires a 1oz Tin Bar." , "PLAIN DOWN"]};
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
@@ -63,9 +63,9 @@ if(_finished) then {
|
||||
_qty = 1;
|
||||
_box = unitBackpack player;
|
||||
_box addWeaponCargoGlobal [_create,_qty];
|
||||
cutText ["Copied key has been added to your backpack." , "PLAIN DOWN"];
|
||||
cutText ["\n\nCopied key has been added to your backpack." , "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText ["Canceled Key Crafting." , "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled Key Crafting." , "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
@@ -73,6 +73,6 @@ if(_finished) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["Canceled Key Crafting." , "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled Key Crafting." , "PLAIN DOWN"];
|
||||
};
|
||||
TradeInprogress = false;
|
||||
|
||||
@@ -1,15 +1,37 @@
|
||||
/*
|
||||
DayZ Crafting
|
||||
Usage: spawn player_goFishing;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"];
|
||||
DayZ Epoch Crafting 0.3
|
||||
Made for DayZ Unleashed by [VB]AWOL please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
Thanks to thevisad for help with the spawn call fixes.
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
USAGE EXAMPLE:
|
||||
class ItemActions
|
||||
{
|
||||
class Crafting
|
||||
{
|
||||
text = "Craft Tent";
|
||||
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // [Class of itemaction,CfgMagazines or CfgWeapons, item]
|
||||
neednearby[] = {"workshop","fire"};
|
||||
requiretools[] = {"ItemToolbox","ItemKnife"}; // (cfgweapons only)
|
||||
output[] = {{"ItemTent",1}}; // (CfgMagazines, qty)
|
||||
input[] = {{"ItemCanvas",2},{"ItemPole",2}}; // (CfgMagazines, qty)
|
||||
inputweapons[] = {"ItemToolbox"}; // consume toolbox (cfgweapons only)
|
||||
outputweapons[] = {"ItemToolbox"}; // return toolbox (cfgweapons only)
|
||||
};
|
||||
};
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
// This is used to find correct recipe based what itemaction was click allows multiple recipes per item.
|
||||
_crafting = _this select 0;
|
||||
|
||||
// This tells the script what type of item we are clicking on
|
||||
_baseClass = _this select 1;
|
||||
|
||||
_item = _this select 2;
|
||||
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
@@ -17,12 +39,8 @@ _reason = "";
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_item = _this;
|
||||
_crafting = "Crafting";
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
// Need Near Requirements
|
||||
_needNear = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "neednearby");
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
@@ -30,17 +48,15 @@ if("fire" in _needNear) then {
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if("workshop" in _needNear) then {
|
||||
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], 5]);
|
||||
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]); // Needs changed to your workbench class
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "workshop";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
cutText [format["\n\nCrafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
@@ -48,158 +64,157 @@ if(_abort) exitWith {
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools");
|
||||
_consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons");
|
||||
_selectedRecipeTools = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "requiretools");
|
||||
_selectedRecipeOutput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "input");
|
||||
_outputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "outputweapons");
|
||||
_inputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputweapons");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
_craft_doLoop = true;
|
||||
|
||||
if(!_missingTools) then {
|
||||
while {_craft_doLoop} do {
|
||||
|
||||
//diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
//diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
_temp_removed_array = [];
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
//diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _craft_doLoop = false; _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
if(!_missingTools) then {
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
//diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
// consumeweapons
|
||||
{
|
||||
player removeWeapon _x;
|
||||
} forEach _consumeweapons;
|
||||
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
//diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["\n\nCrafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
//diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
_num_removed_weapons = 0;
|
||||
{
|
||||
_num_removed_weapons = _num_removed_weapons + ([player,_x] call BIS_fnc_invRemove);
|
||||
} forEach _inputWeapons;
|
||||
if (_num_removed_weapons == (count _inputWeapons)) then {
|
||||
{
|
||||
player addWeapon _x;
|
||||
} forEach _outputWeapons;
|
||||
{
|
||||
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["\n\nCrafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
};
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["\n\nMissing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["\n\nCanceled crafting.", "PLAIN DOWN"];
|
||||
_craft_doLoop = false;
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["\n\nMissing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
_craft_doLoop = false;
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["\n\nMissing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
_craft_doLoop = false;
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
DayZ Crafting
|
||||
Usage: spawn player_goFishing;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_item = _this;
|
||||
_crafting = "Crafting1";
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if("workshop" in _needNear) then {
|
||||
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], 5]);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "workshop";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools");
|
||||
_consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
//diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
//diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
//diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
//diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
// consumeweapons
|
||||
{
|
||||
player removeWeapon _x;
|
||||
} forEach _consumeweapons;
|
||||
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
//diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
DayZ Crafting
|
||||
Usage: spawn player_goFishing;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_item = _this;
|
||||
_crafting = "Crafting2";
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if("workshop" in _needNear) then {
|
||||
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], 5]);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "workshop";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools");
|
||||
_consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
//diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
//diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
//diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
//diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
// consumeweapons
|
||||
{
|
||||
player removeWeapon _x;
|
||||
} forEach _consumeweapons;
|
||||
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
//diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
DayZ Crafting
|
||||
Usage: spawn player_goFishing;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_item = _this;
|
||||
_crafting = "Crafting3";
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if("workshop" in _needNear) then {
|
||||
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], 5]);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "workshop";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools");
|
||||
_consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
//diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
//diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
//diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
//diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
// consumeweapons
|
||||
{
|
||||
player removeWeapon _x;
|
||||
} forEach _consumeweapons;
|
||||
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
//diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -1,205 +0,0 @@
|
||||
/*
|
||||
DayZ Crafting
|
||||
Usage: spawn player_goFishing;
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_item = _this;
|
||||
_crafting = "Crafting4";
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if("workshop" in _needNear) then {
|
||||
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], 5]);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "workshop";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools");
|
||||
_consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
//diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
//diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
//diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
[player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
//diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
// consumeweapons
|
||||
{
|
||||
player removeWeapon _x;
|
||||
} forEach _consumeweapons;
|
||||
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
//diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
if (vehicle player == player) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -6,7 +6,7 @@ call gear_ui_init;
|
||||
_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"]};
|
||||
if (vehicle player != player) exitWith {cutText ["\n\nYou may not drink while in a vehicle", "PLAIN DOWN"]};
|
||||
|
||||
//Force players to wait 3 mins to drink again
|
||||
//if (dayz_lastDrink < 180) exitWith {cutText ["You may not drink, your not thirsty", "PLAIN DOWN"]};
|
||||
|
||||
@@ -18,7 +18,9 @@ player removeWeapon _item;
|
||||
if (_item == "MeleeHatchet") then {_item = "ItemHatchet";};
|
||||
if (_item == "MeleeCrowbar") then {_item = "MeleeCrowbar";};
|
||||
if (_item == "MeleeMachete") then {_item = "ItemMachete";};
|
||||
if (_item == "MeleeFishingPole") then {_item = "MeleeFishingPole";};
|
||||
|
||||
//if (_item == "MeleeFishingPole") then {_item = "MeleeFishingPole";};
|
||||
//if (_item == "MeleeSledge") then {_item = "MeleeSledge";};
|
||||
|
||||
_bag = createVehicle [format["WeaponHolder_%1",_item],getPosATL player,[], 0, "CAN_COLLIDE"];
|
||||
_bag setdir (getDir player);
|
||||
|
||||
@@ -4,7 +4,7 @@ call gear_ui_init;
|
||||
_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 eat while in a vehicle", "PLAIN DOWN"]};
|
||||
if (vehicle player != player) exitWith {cutText ["\n\nYou may not eat while in a vehicle", "PLAIN DOWN"]};
|
||||
|
||||
//Force players to wait 3 mins to eat again
|
||||
//if (dayz_lastMeal < 180) exitWith {cutText ["You may not eat, you're already full", "PLAIN DOWN"]};
|
||||
|
||||
@@ -5,17 +5,17 @@
|
||||
*/
|
||||
private ["_itemOut","_position","_isOk","_counter","_rnd","_item","_itemtodrop","_vehicle","_inVehicle"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Fishing already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nFishing already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
call gear_ui_init;
|
||||
|
||||
// find position 5m in front of player
|
||||
_position = player modeltoworld [0,5,0];
|
||||
if(!(surfaceIsWater _position)) exitWith {TradeInprogress = false; cutText ["Must be near a shore or on a boat to fish." , "PLAIN DOWN"]; };
|
||||
if(!(surfaceIsWater _position)) exitWith {TradeInprogress = false; cutText ["\n\nMust be near a shore or on a boat to fish." , "PLAIN DOWN"]; };
|
||||
|
||||
if(dayz_isSwimming) exitWith {TradeInprogress = false; cutText [localize "str_player_26", "PLAIN DOWN"]; };
|
||||
if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["Canceled Fishing.", "PLAIN DOWN"];};
|
||||
if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["\n\nCanceled Fishing.", "PLAIN DOWN"];};
|
||||
|
||||
_isOk = true;
|
||||
_counter = 0;
|
||||
@@ -31,7 +31,7 @@ while {_isOk} do {
|
||||
|
||||
if (r_interrupt or (player getVariable["combattimeout", 0] >= time)) then {
|
||||
_isOk = false;
|
||||
cutText ["Canceled Fishing.", "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled Fishing.", "PLAIN DOWN"];
|
||||
} else {
|
||||
|
||||
sleep 2;
|
||||
@@ -60,15 +60,15 @@ while {_isOk} do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
cutText ["You caught a fish.", "PLAIN DOWN"];
|
||||
cutText ["\n\nYou caught a fish.", "PLAIN DOWN"];
|
||||
_isOk = false;
|
||||
} else {
|
||||
cutText ["Nibble... Nibble...", "PLAIN DOWN"];
|
||||
cutText ["\n\nNibble... Nibble...", "PLAIN DOWN"];
|
||||
_counter = _counter + 1;
|
||||
if(_counter == 5) then {
|
||||
_isOk = false;
|
||||
sleep 2;
|
||||
cutText ["You didn't catch anything.", "PLAIN DOWN"];
|
||||
cutText ["\n\nYou didn't catch anything.", "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
private ["_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_animState","_isMedic","_proceed","_counter","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Harvest already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nHarvest already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
// allowed trees list move this later
|
||||
@@ -103,7 +103,7 @@ if (count(_findNearestTree) >= 1) then {
|
||||
};
|
||||
//diag_log format["DEBUG TREE DAMAGE: %1", _tree];
|
||||
|
||||
cutText [format["%1 of %2 has been successfully added to your inventory.", _countOut,_itemOut], "PLAIN DOWN"];
|
||||
cutText [format["\n\n%1 of %2 has been successfully added to your inventory.", _countOut,_itemOut], "PLAIN DOWN"];
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
@@ -111,12 +111,12 @@ if (count(_findNearestTree) >= 1) then {
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
cutText ["Canceled Harvesting.", "PLAIN DOWN"];
|
||||
cutText ["\n\nCanceled Harvesting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
cutText [localize "str_player_23", "PLAIN DOWN"];
|
||||
cutText ["\n\nYou must be close to a plant to harvest.", "PLAIN DOWN"];
|
||||
};
|
||||
TradeInprogress = false;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
private ["_dir","_classname","_box","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Open Crate already in progress." , "PLAIN DOWN"]; };
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nOpen Crate already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_hasTool = "ItemCrowbar" in items player;
|
||||
if(!_hasTool) exitWith {
|
||||
cutText ["You need a crowbar to open this.", "PLAIN DOWN"];
|
||||
cutText ["\n\nYou need a crowbar to open this.", "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
_item = _this;
|
||||
_hasCrate = _item in magazines player;
|
||||
if (!_hasCrate) then {
|
||||
cutText ["Missing supply crate.", "PLAIN DOWN"];
|
||||
cutText ["\n\nMissing supply crate.", "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
@@ -51,6 +51,6 @@ if(_type == "backpack") then {
|
||||
|
||||
player reveal _box;
|
||||
|
||||
cutText ["Opened supply crate.", "PLAIN DOWN"];
|
||||
cutText ["\n\nOpened supply crate.", "PLAIN DOWN"];
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -2,7 +2,7 @@
|
||||
DayZ Base Building Upgrades
|
||||
Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1_Display","_combination_1","_combination_2","_combination_3","_combination","_combinationDisplay","_objectCharacterID"];
|
||||
private ["_location","_dir","_classname","_missing","_text","_proceed","_num_removed","_object","_missingQty","_itemIn","_countIn","_qty","_removed","_removed_total","_tobe_removed_total","_objectID","_objectUID","_temp_removed_array","_textMissing","_newclassname","_requirements","_obj","_upgrade","_lockable","_combination_1","_combination_2","_combination_3","_combination","_objectCharacterID","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_distance","_needText","_findNearestPoles","_findNearestPole","_IsNearPlot"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Upgrade already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -10,9 +10,60 @@ TradeInprogress = true;
|
||||
player removeAction s_player_upgrade_build;
|
||||
s_player_upgrade_build = 1;
|
||||
|
||||
|
||||
_distance = 30;
|
||||
_needText = "Plot Pole";
|
||||
|
||||
// check for near plot
|
||||
_findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
|
||||
_findNearestPole = [];
|
||||
|
||||
{
|
||||
if (alive _x) then {
|
||||
_findNearestPole set [(count _findNearestPole),_x];
|
||||
};
|
||||
} foreach _findNearestPoles;
|
||||
|
||||
_IsNearPlot = count (_findNearestPole);
|
||||
|
||||
if(_IsNearPlot == 0) then {
|
||||
_canBuildOnPlot = true;
|
||||
} else {
|
||||
|
||||
// check nearby plots ownership and then for friend status
|
||||
_nearestPole = _findNearestPole select 0;
|
||||
|
||||
// Find owner
|
||||
_ownerID = _nearestPole getVariable["CharacterID","0"];
|
||||
|
||||
// diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];
|
||||
|
||||
// check if friendly to owner
|
||||
if(dayz_characterID == _ownerID) then {
|
||||
_canBuildOnPlot = true;
|
||||
} else {
|
||||
_friendlies = player getVariable ["friendlyTo",[]];
|
||||
// check if friendly to owner
|
||||
if(_ownerID in _friendlies) then {
|
||||
_canBuildOnPlot = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// exit if not allowed due to plot pole
|
||||
if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText [format["Unable to upgrade %1 nearby.",_needText,_distance] , "PLAIN DOWN"]; };
|
||||
|
||||
// get cursortarget from addaction
|
||||
_obj = _this select 3;
|
||||
|
||||
// Find objectID
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
|
||||
// Find objectUID
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_upgrade_build = -1; cutText ["Not setup yet.", "PLAIN DOWN"];};
|
||||
|
||||
// Get classname
|
||||
_classname = typeOf _obj;
|
||||
|
||||
@@ -80,12 +131,6 @@ if ((count _upgrade) > 0) then {
|
||||
// Get direction
|
||||
_dir = getDir _obj;
|
||||
|
||||
// Find objectID
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
|
||||
// Find objectUID
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
|
||||
// Current charID
|
||||
_objectCharacterID = _obj getVariable ["CharacterID","0"];
|
||||
|
||||
@@ -107,6 +152,9 @@ if ((count _upgrade) > 0) then {
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
|
||||
// sleep a bit to make sure delete happens before create
|
||||
sleep 1;
|
||||
|
||||
if (_lockable == 3) then {
|
||||
|
||||
_combination_1 = floor(random 10);
|
||||
@@ -123,8 +171,8 @@ if ((count _upgrade) > 0) then {
|
||||
|
||||
// Publish variables
|
||||
_object setVariable ["CharacterID",_objectCharacterID,true];
|
||||
_object setVariable ["ObjectID",_objectID,true];
|
||||
_object setVariable ["ObjectUID",_objectUID,true];
|
||||
|
||||
//_object setVariable ["ObjectUID",_objectUID,true];
|
||||
_object setVariable ["OEMPos",_location,true];
|
||||
|
||||
dayzPublishObj = [_objectCharacterID,_object,[_dir,_location],_classname];
|
||||
|
||||
@@ -4,7 +4,7 @@ Added Female skin changes - DayZ Epoch - vbawol
|
||||
*/
|
||||
private ["_item","_onLadder","_hasclothesitem","_config","_text","_myModel","_itemNew","_currentSex","_newSex","_model"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Changing clothes already in progress." , "PLAIN DOWN"] };
|
||||
if(TradeInprogress) exitWith { cutText ["\n\nChanging clothes already in progress." , "PLAIN DOWN"] };
|
||||
TradeInprogress = true;
|
||||
|
||||
_item = _this;
|
||||
@@ -19,7 +19,7 @@ _text = getText (_config >> _item >> "displayName");
|
||||
|
||||
if (!_hasclothesitem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_text,"wear"] , "PLAIN DOWN"]};
|
||||
|
||||
if (vehicle player != player) exitWith {TradeInprogress = false; cutText ["You may not change clothes while in a vehicle", "PLAIN DOWN"]};
|
||||
if (vehicle player != player) exitWith {TradeInprogress = false; cutText ["\n\nYou may not change clothes while in a vehicle", "PLAIN DOWN"]};
|
||||
|
||||
_myModel = (typeOf player);
|
||||
_itemNew = "Skin_" + _myModel;
|
||||
@@ -46,7 +46,7 @@ if ( (isClass(_config >> _itemNew)) ) then {
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText ["You cannot wear a skin of the opposite sex.", "PLAIN DOWN"];
|
||||
cutText ["\n\nYou cannot wear a skin of the opposite sex.", "PLAIN DOWN"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
delete object from db with extra waiting by [VB]AWOL
|
||||
parameters: _obj
|
||||
*/
|
||||
private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj"];
|
||||
private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_objType","_sfx","_dis","_itemOut","_countOut","_selectedRemoveOutput","_friendlies","_nearestPole","_ownerID","_refundpart","_isWreck","_findNearestPoles","_findNearestPole","_IsNearPlot","_brokenTool","_removeTool","_isDestructable","_isRemovable","_objOwnerID","_isOwnerOfObj","_preventRefund"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Remove already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -159,6 +159,8 @@ if (_proceed) then {
|
||||
|
||||
cutText [format["De-constructing %1.",_objType], "PLAIN DOWN"];
|
||||
|
||||
_preventRefund = false;
|
||||
|
||||
_selectedRemoveOutput = [];
|
||||
if(_isWreck) then {
|
||||
// Find one random part to give back
|
||||
@@ -166,10 +168,12 @@ if (_proceed) then {
|
||||
_selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]];
|
||||
} else {
|
||||
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
|
||||
_preventRefund = (_objectID == "0" && _objectUID == "0");
|
||||
|
||||
};
|
||||
|
||||
// give refund items
|
||||
if((count _selectedRemoveOutput) > 0) then {
|
||||
if((count _selectedRemoveOutput) > 0 and !_preventRefund) then {
|
||||
// Put itemsg
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
|
||||
@@ -127,7 +127,6 @@ for "_x" from 1 to _total_trades do {
|
||||
} else {
|
||||
|
||||
// Return items from botched trade.
|
||||
// TODO: this may never happen if so remove
|
||||
for "_x" from 1 to _removed do {
|
||||
player addMagazine _part_in;
|
||||
};
|
||||
|
||||
@@ -88,3 +88,14 @@ _nrTLs= position _twr nearObjects ["#lightpoint",30];
|
||||
};
|
||||
};
|
||||
};
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
axe_TestMoveHC={
|
||||
private ["_startPos","_currPos"];
|
||||
_currPos = _this select 0;
|
||||
_startPos = [_currPos,50,180,20,0,800,0] call BIS_fnc_findSafePos;
|
||||
player setPosATL _startPos;
|
||||
};
|
||||
|
||||
>>>>>>> origin/master
|
||||
|
||||
@@ -467,7 +467,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
|
||||
|
||||
if ((_cursorTarget isKindOf "ModularItems") or (_cursorTarget isKindOf "Land_DZE_WoodDoor_Base")) then {
|
||||
if ((_cursorTarget isKindOf "ModularItems") or (_cursorTarget isKindOf "Land_DZE_WoodDoor_Base") or (_cursorTarget isKindOf "CinderWallDoor_DZ_Base")) then {
|
||||
if ((s_player_lastTarget select 0) != _cursorTarget) then {
|
||||
if (s_player_upgrade_build > 0) then {
|
||||
player removeAction s_player_upgrade_build;
|
||||
|
||||
@@ -6,14 +6,17 @@ private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_object","_ho
|
||||
if(TradeInprogress) exitWith { cutText ["Pack tent already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
player removeAction s_player_packtent;
|
||||
s_player_packtent = 1;
|
||||
|
||||
_obj = _this;
|
||||
_ownerID = _obj getVariable["CharacterID","0"];
|
||||
_objectID = _obj getVariable["ObjectID","0"];
|
||||
_objectUID = _obj getVariable["ObjectUID","0"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
player removeAction s_player_packtent;
|
||||
s_player_packtent = 1;
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_packtent = -1; cutText ["Tent not setup yet.", "PLAIN DOWN"];};
|
||||
|
||||
if(_ownerID != dayz_characterID) exitWith {TradeInprogress = false; s_player_packtent = -1; cutText [localize "str_fail_tent_pack", "PLAIN DOWN"];};
|
||||
|
||||
@@ -36,56 +39,59 @@ sleep 3;
|
||||
|
||||
_classname = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "create");
|
||||
|
||||
_location = _pos;
|
||||
if(!isNull _obj and alive _obj) then {
|
||||
|
||||
//place tent (local)
|
||||
//_bag = createVehicle ["WeaponHolder_ItemTent",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_object setdir _dir;
|
||||
player reveal _object;
|
||||
_location = _pos;
|
||||
|
||||
//place tent (local)
|
||||
//_bag = createVehicle ["WeaponHolder_ItemTent",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_object setdir _dir;
|
||||
_object setpos _pos;
|
||||
player reveal _object;
|
||||
|
||||
_holder = _object;
|
||||
_holder = _object;
|
||||
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
deleteVehicle _obj;
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call server_deleteObj;
|
||||
};
|
||||
|
||||
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
if (isServer) then {
|
||||
dayzDeleteObj call server_deleteObj;
|
||||
//Add weapons
|
||||
_objWpnTypes = _weapons select 0;
|
||||
_objWpnQty = _weapons select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
//Add Magazines
|
||||
_objWpnTypes = _magazines select 0;
|
||||
_objWpnQty = _magazines select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
//Add Backpacks
|
||||
_objWpnTypes = _backpacks select 0;
|
||||
_objWpnQty = _backpacks select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
cutText [localize "str_success_tent_pack", "PLAIN DOWN"];
|
||||
};
|
||||
deleteVehicle _obj;
|
||||
|
||||
//Add weapons
|
||||
_objWpnTypes = _weapons select 0;
|
||||
_objWpnQty = _weapons select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
//Add Magazines
|
||||
_objWpnTypes = _magazines select 0;
|
||||
_objWpnQty = _magazines select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
//Add Backpacks
|
||||
_objWpnTypes = _backpacks select 0;
|
||||
_objWpnQty = _backpacks select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
cutText [localize "str_success_tent_pack", "PLAIN DOWN"];
|
||||
|
||||
s_player_packtent = -1;
|
||||
TradeInprogress = false;
|
||||
@@ -25,6 +25,8 @@ _objectUID = _obj getVariable["ObjectUID","0"];
|
||||
player removeAction s_player_packvault;
|
||||
s_player_packvault = 1;
|
||||
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_packvault = -1; cutText [format["%1 not setup yet.",_text], "PLAIN DOWN"];};
|
||||
|
||||
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith { TradeInprogress = false; s_player_packvault = -1; cutText [format["You cannot pack this %1, you do not know the combination.",_text], "PLAIN DOWN"];};
|
||||
|
||||
_alreadyPacking = _obj getVariable["packing",0];
|
||||
@@ -102,7 +104,6 @@ if(!isNull _obj and alive _obj) then {
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
cutText [format["Your %1 has been packed",_text], "PLAIN DOWN"];
|
||||
|
||||
s_player_packvault = -1;
|
||||
};
|
||||
s_player_packvault = -1;
|
||||
TradeInprogress = false;
|
||||
@@ -124,6 +124,9 @@ diag_log (str(_backpackMag));
|
||||
if (_primweapon == "MeleeCrowbar") then {
|
||||
_newUnit addMagazine 'crowbar_swing';
|
||||
};
|
||||
if (_primweapon == "MeleeSledge") then {
|
||||
_newUnit addMagazine 'sledge_swing';
|
||||
};
|
||||
if (_primweapon == "MeleeHatchet") then {
|
||||
_newUnit addMagazine 'hatchet_swing';
|
||||
};
|
||||
|
||||
@@ -27,6 +27,10 @@ if(!isNull dayz_selectedDoor) then {
|
||||
_obj animate ["Open_hinge", 1];
|
||||
};
|
||||
|
||||
if(_obj animationPhase "Open_latch" == 0) then {
|
||||
_obj animate ["Open_latch", 1];
|
||||
};
|
||||
|
||||
} else {
|
||||
DZE_Lock_Door = "";
|
||||
[player,"combo_locked",0,false] call dayz_zombieSpeak;
|
||||
|
||||
@@ -41,7 +41,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzepoch.com";
|
||||
version = "1.0.2";
|
||||
version = "1.0.2.13";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
@@ -540,9 +540,7 @@ class CfgBuildingLoot {
|
||||
{"DZ_TK_Assault_Pack_EP1","object"}, // 16
|
||||
{"DZ_British_ACU","object"}, // 18
|
||||
{ "Winchester1866","weapon" },
|
||||
{ "ItemTentOld","magazine" },
|
||||
{ "ItemTentDomed2","magazine" },
|
||||
{ "ItemTentDomed","magazine" },
|
||||
{ "tents","single" },
|
||||
{ "","military" },
|
||||
{ "","trash" },
|
||||
{ "Crossbow_DZ","weapon" },
|
||||
@@ -576,10 +574,8 @@ class CfgBuildingLoot {
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.02,
|
||||
0.12,
|
||||
0.14,
|
||||
0.01,
|
||||
0.02,
|
||||
0.02,
|
||||
@@ -617,9 +613,7 @@ class CfgBuildingLoot {
|
||||
{"DZ_TK_Assault_Pack_EP1","object"}, // 16
|
||||
{"DZ_British_ACU","object"}, // 18
|
||||
{ "Winchester1866","weapon" },
|
||||
{ "ItemTentOld","magazine" },
|
||||
{ "ItemTentDomed2","magazine" },
|
||||
{ "ItemTentDomed","magazine" },
|
||||
{ "tents","single" },
|
||||
{ "","military" },
|
||||
{ "","trash" },
|
||||
{"Crossbow_DZ","weapon"},
|
||||
@@ -653,10 +647,8 @@ class CfgBuildingLoot {
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.02,
|
||||
0.12,
|
||||
0.14,
|
||||
0.01,
|
||||
0.02,
|
||||
0.02,
|
||||
@@ -786,7 +778,9 @@ class CfgBuildingLoot {
|
||||
{ "ItemFuelBarrel","magazine"},
|
||||
{ "WeaponHolder_ItemMachete", "object"},
|
||||
{ "ItemFishingPole","weapon" },
|
||||
{ "ItemLightBulb","magazine"}
|
||||
{ "ItemLightBulb","magazine"},
|
||||
{ "ItemSledgeHandle","magazine"}
|
||||
|
||||
};
|
||||
itemChance[] = {
|
||||
0.05,
|
||||
@@ -794,7 +788,7 @@ class CfgBuildingLoot {
|
||||
0.02,
|
||||
0.04,
|
||||
0.03,
|
||||
0.27,
|
||||
0.26,
|
||||
0.03,
|
||||
0.08,
|
||||
0.05,
|
||||
@@ -802,7 +796,8 @@ class CfgBuildingLoot {
|
||||
0.01,
|
||||
0.03,
|
||||
0.01,
|
||||
0.02
|
||||
0.02,
|
||||
0.01
|
||||
};
|
||||
};
|
||||
class Supermarket: Default {
|
||||
@@ -834,9 +829,7 @@ class CfgBuildingLoot {
|
||||
{"DZ_CompactPack_EP1","object"}, //
|
||||
{"DZ_TerminalPack_EP1","object"}, //
|
||||
{ "Winchester1866","weapon" },
|
||||
{ "ItemTentOld","magazine" },
|
||||
{ "ItemTentDomed2","magazine" },
|
||||
{ "ItemTentDomed","magazine" },
|
||||
{ "tents","single" },
|
||||
{ "","food" },
|
||||
{ "","trash" },
|
||||
{"Crossbow_DZ","weapon"},
|
||||
@@ -868,10 +861,8 @@ class CfgBuildingLoot {
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.01,
|
||||
0.29,
|
||||
0.12,
|
||||
0.30,
|
||||
0.13,
|
||||
0.01,
|
||||
0.05,
|
||||
0.02,
|
||||
|
||||
@@ -82,10 +82,6 @@ if (!isDedicated) then {
|
||||
player_reloadMag = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_reloadMags.sqf";
|
||||
player_loadCrate = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_loadCrate.sqf";
|
||||
player_craftItem = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem.sqf";
|
||||
player_craftItem1 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem1.sqf";
|
||||
player_craftItem2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem2.sqf";
|
||||
player_craftItem3 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem3.sqf";
|
||||
player_craftItem4 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem4.sqf";
|
||||
player_tentPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\tent_pitch.sqf";
|
||||
player_vaultPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\vault_pitch.sqf";
|
||||
player_drink = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_drink.sqf";
|
||||
@@ -269,14 +265,6 @@ if (!isDedicated) then {
|
||||
if (player isKindOf "PZombie_VB") exitWith {
|
||||
player switchAction "walkf";
|
||||
};
|
||||
if (!r_fracture_legs and (time - dayz_lastCheckBit > 4)) then {
|
||||
_inBuilding = [player] call fnc_isInsideBuilding;
|
||||
_nearbyObjects = nearestObjects[getPosATL player, dayz_disallowedVault, 8];
|
||||
if (!_inBuilding and (count _nearbyObjects == 0)) then {
|
||||
dayz_lastCheckBit = time;
|
||||
call player_CombatRoll;
|
||||
};
|
||||
};
|
||||
};
|
||||
//if (_dikCode == 57) then {_handled = true}; // space
|
||||
//if (_dikCode in actionKeys 'MoveForward' or _dikCode in actionKeys 'MoveBack') then {r_interrupt = true};
|
||||
@@ -312,24 +300,28 @@ if (!isDedicated) then {
|
||||
dayz_lastCheckBit = time;
|
||||
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
|
||||
};
|
||||
//
|
||||
if (_dikCode == 0x48) then {
|
||||
// numpad 8 0x48 now pgup 0xC9
|
||||
if (_dikCode == 0xC9 or (_dikCode in actionKeys "User15")) then {
|
||||
DZE_Q = true;
|
||||
};
|
||||
if (_dikCode == 0x50) then {
|
||||
// numpad 2 0x50 now pgdn 0xD1
|
||||
if (_dikCode == 0xD1 or (_dikCode in actionKeys "User16")) then {
|
||||
DZE_Z = true;
|
||||
};
|
||||
if (_dikCode == 0x4B) then {
|
||||
// numpad 4 0x4B now Q 0x10
|
||||
if (_dikCode == 0x10 or (_dikCode in actionKeys "User17")) then {
|
||||
DZE_4 = true;
|
||||
};
|
||||
if (_dikCode == 0x4D) then {
|
||||
// numpad 6 0x4D now E 0x12
|
||||
if (_dikCode == 0x12 or (_dikCode in actionKeys "User18")) then {
|
||||
DZE_6 = true;
|
||||
};
|
||||
|
||||
if (_dikCode == 0x4C) then {
|
||||
// numpad 5 0x4C now space 0x39
|
||||
if (_dikCode == 0x39 or (_dikCode in actionKeys "User19")) then {
|
||||
DZE_5 = true;
|
||||
};
|
||||
|
||||
// esc
|
||||
if (_dikCode == 0x01) then {
|
||||
DZE_cancelBuilding = true;
|
||||
};
|
||||
|
||||
@@ -429,6 +429,10 @@ if(isNil "dayz_maxpos") then {
|
||||
if(isNil "DZE_teleport") then {
|
||||
DZE_teleport = [1000,2000,500,200,800];
|
||||
};
|
||||
if(isNil "DZE_BuildingLimit") then {
|
||||
DZE_BuildingLimit = 150;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
if(isNil "dayz_canBuildInCity") then {
|
||||
@@ -450,7 +454,7 @@ if(isNil "dayz_zedsAttackVehicles") then {
|
||||
dayz_updateObjects = ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage","LockboxStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"];
|
||||
dayz_disallowedVault = ["TentStorage", "BuiltItems"];
|
||||
dayz_reveal = ["AllVehicles","WeaponHolder","Land_A_tent","BuiltItems","ModularItems"];
|
||||
dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ"];
|
||||
dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ"];
|
||||
|
||||
DZE_LockableStorage = ["VaultStorage","VaultStorageLocked","LockboxStorageLocked","LockboxStorage"];
|
||||
DZE_LockedStorage = ["VaultStorageLocked","LockboxStorageLocked"];
|
||||
|
||||
@@ -247,14 +247,14 @@
|
||||
<Czech>Stan zde nelze postavit. Plocha musí být rovná a být dostatečně velká.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_consumed">
|
||||
<Original>You have consumed a %1</Original>
|
||||
<English>You have consumed a %1</English>
|
||||
<German>Sie haben ein(e) %1 verbraucht</German>
|
||||
<Russian>Вы употребили: %1</Russian>
|
||||
<Spanish>Consumiste: %1</Spanish>
|
||||
<Dutch>Je hebt %1 genuttigd</Dutch>
|
||||
<French>Vous avez consommé un(e) %1</French>
|
||||
<Czech>Snědl jsi %1</Czech>
|
||||
<Original>\n\nYou have consumed a %1</Original>
|
||||
<English>\n\nYou have consumed a %1</English>
|
||||
<German>\n\nSie haben ein(e) %1 verbraucht</German>
|
||||
<Russian>\n\nВы употребили: %1</Russian>
|
||||
<Spanish>\n\nConsumiste: %1</Spanish>
|
||||
<Dutch>\n\nJe hebt %1 genuttigd</Dutch>
|
||||
<French>\n\nVous avez consommé un(e) %1</French>
|
||||
<Czech>\n\nSnědl jsi %1</Czech>
|
||||
</Key>
|
||||
<Key ID="str_fireplace_01">
|
||||
<Original>You have created a fireplace</Original>
|
||||
@@ -327,24 +327,24 @@
|
||||
<Czech>Jste uzdravováni.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_01">
|
||||
<Original>You have filled %1 bottles with water</Original>
|
||||
<English>You have filled %1 bottles with water</English>
|
||||
<German>Sie haben %1 Flasche(n) mit Wasser gefüllt</German>
|
||||
<Russian>Наполнено фляжек с водой: %1</Russian>
|
||||
<Spanish>Llenaste %1 cantimplora(s) con agua</Spanish>
|
||||
<Dutch>Je hebt %1 flessen gevuld met water</Dutch>
|
||||
<French>Vous avez rempli %1 bouteille(s) avec de l'eau.</French>
|
||||
<Czech>Naplnil jsi %1 lahví vodou.</Czech>
|
||||
<Original>\n\nYou have filled %1 bottles with water</Original>
|
||||
<English>\n\nYou have filled %1 bottles with water</English>
|
||||
<German>\n\nSie haben %1 Flasche(n) mit Wasser gefüllt</German>
|
||||
<Russian>\n\nНаполнено фляжек с водой: %1</Russian>
|
||||
<Spanish>\n\nLlenaste %1 cantimplora(s) con agua</Spanish>
|
||||
<Dutch>\n\nJe hebt %1 flessen gevuld met water</Dutch>
|
||||
<French>\n\nVous avez rempli %1 bouteille(s) avec de l'eau.</French>
|
||||
<Czech>\n\nNaplnil jsi %1 lahví vodou.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_02">
|
||||
<Original>You have no empty water bottles</Original>
|
||||
<English>You have no empty water bottles</English>
|
||||
<German>Sie haben keine leeren Wasserflaschen</German>
|
||||
<Russian>У вас нет пустых фляжек.</Russian>
|
||||
<Spanish>No tienes cantimploras vacías</Spanish>
|
||||
<Dutch>Je hebt geen lege waterflessen</Dutch>
|
||||
<French>Vous n'avez aucune bouteille vide.</French>
|
||||
<Czech>Nemáš žádné prázdné láhve na vodu.</Czech>
|
||||
<Original>\n\nYou have no empty water bottles</Original>
|
||||
<English>\n\nYou have no empty water bottles</English>
|
||||
<German>\n\nSie haben keine leeren Wasserflaschen</German>
|
||||
<Russian>\n\nУ вас нет пустых фляжек.</Russian>
|
||||
<Spanish>\n\nNo tienes cantimploras vacías</Spanish>
|
||||
<Dutch>\n\nJe hebt geen lege waterflessen</Dutch>
|
||||
<French>\n\nVous n'avez aucune bouteille vide.</French>
|
||||
<Czech>\n\nNemáš žádné prázdné láhve na vodu.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_03">
|
||||
<Original>You need a %1 to repair this</Original>
|
||||
@@ -507,24 +507,24 @@
|
||||
<Czech>Máte nesprávnou verzi DAYZ_CODE, stáhněte si prosím aktuální soubor z dayzepoch.com (Vaše verze je %1 a na serveru běží verze %2)</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_20">
|
||||
<Original>You must be near a water-source such as a pond or well to refill your water bottles</Original>
|
||||
<English>You must be near a water-source such as a pond or well to refill your water bottles</English>
|
||||
<German>Sie müssen in der nähe einer Wasserquelle wie einem Teich oder Brunnen sein um Wasserflaschen zu füllen</German>
|
||||
<Russian>Вы должны находиться возле водоема или источника воды, чтобы наполнить свои фляги.</Russian>
|
||||
<Spanish>Necesitas estar cerca de una fuente de agua como un pozo para rellenar tu cantimplora</Spanish>
|
||||
<Dutch>Je moet in de buurt van een waterbron zijn, zoals een meer of pomp, om je waterflessen bij te vullen</Dutch>
|
||||
<French>Vous devez être à côté d'une source d'eau comme un bassin ou un puits pour remplir vos bouteilles d'eau.</French>
|
||||
<Czech>Pro plnění láhve na vodu je nutné být poblíž studny nebo rybníka.</Czech>
|
||||
<Original>\n\nYou must be near a water-source such as a pond or well to refill your water bottles</Original>
|
||||
<English>\n\nYou must be near a water-source such as a pond or well to refill your water bottles</English>
|
||||
<German>\n\nSie müssen in der nähe einer Wasserquelle wie einem Teich oder Brunnen sein um Wasserflaschen zu füllen</German>
|
||||
<Russian>\n\nВы должны находиться возле водоема или источника воды, чтобы наполнить свои фляги.</Russian>
|
||||
<Spanish>\n\nNecesitas estar cerca de una fuente de agua como un pozo para rellenar tu cantimplora</Spanish>
|
||||
<Dutch>\n\nJe moet in de buurt van een waterbron zijn, zoals een meer of pomp, om je waterflessen bij te vullen</Dutch>
|
||||
<French>\n\nVous devez être à côté d'une source d'eau comme un bassin ou un puits pour remplir vos bouteilles d'eau.</French>
|
||||
<Czech>\n\nPro plnění láhve na vodu je nutné být poblíž studny nebo rybníka.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_21">
|
||||
<Original>You cannot do this while you are on a ladder</Original>
|
||||
<English>You cannot do this while you are on a ladder</English>
|
||||
<German>Sie können dies nicht tun, während Sie an einer Leiter sind</German>
|
||||
<Russian>Вы не можете этого делать, пока поднимаетесь по лестнице.</Russian>
|
||||
<Spanish>No puedes hacer esto mientras estás en una escalera</Spanish>
|
||||
<Dutch>Je kunt deze actie op een ladder niet uitvoeren</Dutch>
|
||||
<French>Vous ne pouvez pas faire cela en étant sur une échelle.</French>
|
||||
<Czech>Akci nelze provést, jelikož jste na žebříku.</Czech>
|
||||
<Original>\n\nYou cannot do this while you are on a ladder</Original>
|
||||
<English>\n\nYou cannot do this while you are on a ladder</English>
|
||||
<German>\n\nSie können dies nicht tun, während Sie an einer Leiter sind</German>
|
||||
<Russian>\n\nВы не можете этого делать, пока поднимаетесь по лестнице.</Russian>
|
||||
<Spanish>\n\nNo puedes hacer esto mientras estás en una escalera</Spanish>
|
||||
<Dutch>\n\nJe kunt deze actie op een ladder niet uitvoeren</Dutch>
|
||||
<French>\n\nVous ne pouvez pas faire cela en étant sur une échelle.</French>
|
||||
<Czech>\n\nAkci nelze provést, jelikož jste na žebříku.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_22">
|
||||
<Original>You must have wood in your inventory in order to create a fireplace</Original>
|
||||
@@ -537,14 +537,14 @@
|
||||
<Czech>Pro vytvoření ohniště je nutné mít v inventáři dřevo.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_23">
|
||||
<Original>You must be close to a tree to harvest wood.</Original>
|
||||
<English>You must be close to a tree to harvest wood.</English>
|
||||
<German>Sie müssen Nähe eines Baums sein, um Holz zu sammeln.</German>
|
||||
<Russian>Вы должны находится в лесу и подойти к дереву, чтобы нарубить дров.</Russian>
|
||||
<Spanish>Debes estar en el bosque y cerca de un árbol para recoger leña.</Spanish>
|
||||
<Dutch>Je moet in een bos en in de buurt van een boom zijn om hout te hakken.</Dutch>
|
||||
<French>Vous devez être en forêt et proche d'un arbre pour couper du bois.</French>
|
||||
<Czech>Pro získání dřeva musíš být v lese blízko stromu.</Czech>
|
||||
<Original>\n\nYou must be close to a tree to harvest wood.</Original>
|
||||
<English>\n\nYou must be close to a tree to harvest wood.</English>
|
||||
<German>\n\nSie müssen Nähe eines Baums sein, um Holz zu sammeln.</German>
|
||||
<Russian>\n\nВы должны находится в лесу и подойти к дереву, чтобы нарубить дров.</Russian>
|
||||
<Spanish>\n\nDebes estar en el bosque y cerca de un árbol para recoger leña.</Spanish>
|
||||
<Dutch>\n\nJe moet in een bos en in de buurt van een boom zijn om hout te hakken.</Dutch>
|
||||
<French>\n\nVous devez être en forêt et proche d'un arbre pour couper du bois.</French>
|
||||
<Czech>\n\nPro získání dřeva musíš být v lese blízko stromu.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_24">
|
||||
<Original>You do not have enough room in your inventory to do that.</Original>
|
||||
@@ -567,14 +567,14 @@
|
||||
<Czech>Hromádka dřeva byla úspěšně přidána do tvého inventáře.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_26">
|
||||
<Original>You cannot do this while you are in the water.</Original>
|
||||
<English>You cannot do this while you are in the water.</English>
|
||||
<German>Sie können dies nicht tun, während Sie sich im Wasser befinden..</German>
|
||||
<Russian>Это действие невозможно пока вы в воде.</Russian>
|
||||
<Spanish>No puedes hacer esto mientras estás en el agua.</Spanish>
|
||||
<Dutch>Je kunt deze actie niet in het water uitvoeren</Dutch>
|
||||
<French>Vous ne pouvez pas faire cela lorsque vous êtes dans l'eau.</French>
|
||||
<Czech>Tuto akci nelze provést pokud jste ve vodě.</Czech>
|
||||
<Original>\n\nYou cannot do this while you are in the water.</Original>
|
||||
<English>\n\nYou cannot do this while you are in the water.</English>
|
||||
<German>\n\nSie können dies nicht tun, während Sie sich im Wasser befinden..</German>
|
||||
<Russian>\n\nЭто действие невозможно пока вы в воде.</Russian>
|
||||
<Spanish>\n\nNo puedes hacer esto mientras estás en el agua.</Spanish>
|
||||
<Dutch>\n\nJe kunt deze actie niet in het water uitvoeren</Dutch>
|
||||
<French>\n\nVous ne pouvez pas faire cela lorsque vous êtes dans l'eau.</French>
|
||||
<Czech>\n\nTuto akci nelze provést pokud jste ve vodě.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_27">
|
||||
<Original>You have applied a heatpack to your body successfully.</Original>
|
||||
@@ -607,24 +607,24 @@
|
||||
<Czech>Úspěšně jsi nabil zásobníky %1 %2. </Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_30">
|
||||
<Original>%1 must be on your person to move it to/from your toolbelt.</Original>
|
||||
<English>%1 must be on your person to move it to/from your toolbelt.</English>
|
||||
<German>%1 muss in ihrem Inventar sein um es aus/in ihren Werkzeuggürtel zu packen.</German>
|
||||
<Russian>Для перемещения с/на пояс, предмет %1 должен быть у вас.</Russian>
|
||||
<Spanish>%1 debe estar en tu persona para moverlo hacia/desde el cinturon.</Spanish>
|
||||
<Dutch>Je moet %1 op je persoon hebben om het van/naar je gereedschapsriem te verplaatsen</Dutch>
|
||||
<French>%1 doit être sur vous pour pouvoir le déplacer de/vers votre ceinture à outils.</French>
|
||||
<Czech>TO DECIDE</Czech>
|
||||
<Original>\n\n%1 must be on your person to move it to/from your toolbelt.</Original>
|
||||
<English>\n\n%1 must be on your person to move it to/from your toolbelt.</English>
|
||||
<German>\n\n%1 muss in ihrem Inventar sein um es aus/in ihren Werkzeuggürtel zu packen.</German>
|
||||
<Russian>\n\nДля перемещения с/на пояс, предмет %1 должен быть у вас.</Russian>
|
||||
<Spanish>\n\n%1 debe estar en tu persona para moverlo hacia/desde el cinturon.</Spanish>
|
||||
<Dutch>\n\nJe moet %1 op je persoon hebben om het van/naar je gereedschapsriem te verplaatsen</Dutch>
|
||||
<French>\n\n%1 doit être sur vous pour pouvoir le déplacer de/vers votre ceinture à outils.</French>
|
||||
<Czech>\n\n%1 must be on your person to move it to/from your toolbelt.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_31">
|
||||
<Original>%1 must be in your main inventory to %2 it.</Original>
|
||||
<English>%1 must be in your main inventory to %2 it.</English>
|
||||
<German>%1 muss sich in Ihrem Inventar befinden um es zu %2.</German>
|
||||
<Russian>Предмет %1 должен находиться в основном инвентаре чтобы %2 его.</Russian>
|
||||
<Spanish>%1 debe estar en tu inventario principal para: %2</Spanish>
|
||||
<Dutch>%1 moet zich in je hoofdinventaris bevinden om het te %2.</Dutch>
|
||||
<French>%1 doit être dans votre inventaire principal pour pouvoir le %2</French>
|
||||
<Czech>%1 musí být ve tvém hlavním inventáři pro %2.</Czech>
|
||||
<Original>\n\n%1 must be in your main inventory to %2 it.</Original>
|
||||
<English>\n\n%1 must be in your main inventory to %2 it.</English>
|
||||
<German>\n\n%1 muss sich in Ihrem Inventar befinden um es zu %2.</German>
|
||||
<Russian>\n\nПредмет %1 должен находиться в основном инвентаре чтобы %2 его.</Russian>
|
||||
<Spanish>\n\n%1 debe estar en tu inventario principal para: %2</Spanish>
|
||||
<Dutch>\n\n%1 moet zich in je hoofdinventaris bevinden om het te %2.</Dutch>
|
||||
<French>\n\n%1 doit être dans votre inventaire principal pour pouvoir le %2</French>
|
||||
<Czech>\n\n%1 musí být ve tvém hlavním inventáři pro %2.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_beinglooted">
|
||||
<Original>%1 is already being looted by someone else.</Original>
|
||||
|
||||
@@ -1084,6 +1084,9 @@ class FSM
|
||||
"" \n
|
||||
"if (player hasWeapon ""MeleeCrowbar"") then {" \n
|
||||
" player addMagazine 'crowbar_swing';" \n
|
||||
"};" \n
|
||||
"if (player hasWeapon ""MeleeSledge"") then {" \n
|
||||
" player addMagazine 'sledge_swing';" \n
|
||||
"};" \n
|
||||
"if (player hasWeapon ""MeleeHatchet"") then {" \n
|
||||
" player addMagazine 'hatchet_swing';" \n
|
||||
|
||||
@@ -30,7 +30,7 @@ while {true} do {
|
||||
_bloodChanged = false;
|
||||
|
||||
_size = (sizeOf typeOf _refObj) * _factor;
|
||||
_vel = velocity _refObj;
|
||||
_vel = velocity player;
|
||||
_speed = round((_vel distance [0,0,0]) * 3.5);
|
||||
|
||||
//reset position
|
||||
|
||||
Reference in New Issue
Block a user