1.0.0.9 Developer Build

+ [FIXED] Player position was saved to [] in certain areas of Taviana
forcing random spawn. Override variables added dayz_minpos (default:
-20000) and dayz_maxpos (default: 20000). To better support Taviana use
dayz_minpos = -26000; dayz_maxpos = 26000;  Thanks to dayzforever.com
admin for the heads up.
+ [ADDED] Small Desert Camo Net - desert_net_kit - Recipe: 4 x tent + 4
x metal pole
+ [ADDED] Large Desert Camo Net - desert_large_net_kit - Recipe: 3 x
desert_net_kit
+ [ADDED] Small Forest Camo Net - forest_net_kit - Recipe: 4 x tent + 4
x metal pole
+ [ADDED] Large Forest Camo Net - forest_large_net_kit - Recipe: 3 x
forest_net_kit
+ [CHANGED] changed out ItemSodaRbull with ItemSodaR4z0r due to
glitching with rbull model.
+ [ADDED] New Heavy Duty SUV with camo skin (Armor: 50) +25 increase in
armor and holds 100 magazines, 10 weapons, 5 backpacks. Camo skin from
here:
http://www.404games.co.uk/forum/index.php?/topic/1243-camo-suv-skin-code-here/
+ [ADDED] Sandbag Nest (sandbag_nest_kit) Required Tools: ItemEtool,
ItemToolbox. Recipe: ItemSandbag x 4, PartWoodPlywood x 2,
PartWoodLumber x 4.
+ [CHANGED] When selling multiple magazine items traders should now
always give highest denomination back.
+ [CHANGED] workshop is now required for most crafting. Currently a Nice
Wood Shed or a Wooden Shack will work.
+ [CHANGED] Updated camo female texture thanks to
http://www.twitch.tv/miss_alejandria
+ [ADDED] New vehicle ownership is now tied to vehicle keys. When you
purchase a new vehicle you will get a key added to your toolbelt.  Do
not drop on the ground as they are easy to loose.
+ [ADDED] Server admins can now change default fresh spawn loadout
within mission init.sqf. DefaultMagazines =
["ItemBandage","ItemPainkiller"]; DefaultWeapons = ["ItemFlashlight"];
DefaultBackpack = ""; DefaultBackpackWeapon = "";
+ [ADDED] added override variable for to change the distance for selling
vehicles. dayz_sellDistance = 20; in the missions init.sqf
+ [REVERT] Re-enabled old refuel sources and added (TODO: ability to
fill 55 gallon barrels off them).
+ [ADDED] More internal code locks and addaction locks to prevent bugged
menus.
+ [CHANGED] Can no longer drop
"MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole" from
primary slot, you must add it to your toolbelt first.
+ [ADDED]  Fishing now requires casting and waiting to catch a fish
(currently only trout).
+ [FIXED] Incorrect TradeInprogress message for Open Crate code.
+ [FIXED] Boat dealers can now use ["HeliHCivil","HeliHempty"] as
alternate spawn locations for new vehicles.
+ [FIXED] Fixed spawning of Skin_TK_INS_Warlord_EP1 needed to be
Skin_TK_INS_Warlord_EP1_DZ in loot table instead.
+ [ADDED] Gain 1 humanity for each zed you gut. only after body is
cleared and the body disappears.
+ [REMOVED] Removed m240 nest crafting for now too many problems still.
+ [ADDED] You now get a key when purchasing a vehicle,
+ [ADDED] Have your pen and paper handy for this one... When placing a
personal safe you will now get a 4 digit pin code that you will need to
use gain access to your safe.
+ [FIXED] Issues with Arma 2 free and ArmA 2 X users when purchasing
vehicles and placing vaults have now been resolved.
+ [CHANGED] Namalsk Plane vendor moved inside building, Medical vendor
moved to adjacent building.
This commit is contained in:
vbawol
2013-05-22 07:34:26 -05:00
parent f32d87b748
commit 480c2a3bc9
289 changed files with 41572 additions and 2055 deletions

View File

@@ -1,7 +1,44 @@
class CfgMagazines {
class CA_Magazine; // External class reference
class ItemTentDomed : CA_Magazine {
class ItemTent: CA_Magazine
{
scope = 2;
count = 1;
type = 256;
displayName = $STR_EQUIP_NAME_20;
model = "\dayz_equip\models\tentbag_gear.p3d";
picture = "\dayz_equip\textures\equip_tentbag_ca.paa";
descriptionShort = $STR_EQUIP_DESC_20;
class ItemActions
{
class Pitch
{
text = $STR_PITCH_TENT;
script = "spawn player_tentPitch;";
create = "TentStorage";
};
class Crafting
{
text = "Craft Desert Net";
script = "spawn player_craftItem;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {{"desert_net_kit",1}};
input[] = {{"ItemTent",4},{"ItemPole",4}};
};
class Crafting1
{
text = "Craft Forest Net";
script = "spawn player_craftItem1;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {{"forest_net_kit",1}};
input[] = {{"ItemTent",4},{"ItemPole",4}};
};
};
};
class ItemTentDomed : ItemTent {
scope = public;
count = 1;
type = 256;
@@ -16,9 +53,27 @@ class CfgMagazines {
script = "spawn player_tentPitch;";
create = "TentStorageDomed";
};
class Crafting
{
text = "Craft Desert Net";
script = "spawn player_craftItem;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {{"desert_net_kit",1}};
input[] = {{"ItemTent",4},{"ItemPole",4}};
};
class Crafting1
{
text = "Craft Forest Net";
script = "spawn player_craftItem1;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {{"forest_net_kit",1}};
input[] = {{"ItemTent",4},{"ItemPole",4}};
};
};
};
class ItemTentDomed2 : CA_Magazine {
class ItemTentDomed2 : ItemTent {
scope = public;
count = 1;
type = 256;
@@ -26,13 +81,30 @@ class CfgMagazines {
model = "\dayz_equip\models\tentbag_gear.p3d";
picture = "\dayz_equip\textures\equip_tentbag_ca.paa";
descriptionShort = $STR_EQUIP_DESC_20;
class ItemActions {
class Pitch {
text = $STR_PITCH_TENT;
script = "spawn player_tentPitch;";
create = "TentStorageDomed2";
};
class Crafting
{
text = "Craft Desert Net";
script = "spawn player_craftItem;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {{"desert_net_kit",1}};
input[] = {{"ItemTent",4},{"ItemPole",4}};
};
class Crafting1
{
text = "Craft Desert Net";
script = "spawn player_craftItem1;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemToolbox","ItemKnife"};
output[] = {{"forest_net_kit",1}};
input[] = {{"ItemTent",4},{"ItemPole",4}};
};
};
};
@@ -56,22 +128,33 @@ class CfgMagazines {
{
text = "Craft Large Sandbag";
script = "spawn player_craftItem;";
neednearby[] = {"workshop"};
neednearby[] = {};
requiretools[] = {"ItemEtool","ItemToolbox"};
output[] = {{"ItemSandbagLarge",1}};
input[] = {{"ItemSandbag",3},{"ItemWire",1},{"ItemTankTrap",1}};
};
class Crafting1
{
text = "Craft M240 Nest";
text = "Craft Sandbag Nest";
script = "spawn player_craftItem1;";
neednearby[] = {};
requiretools[] = {"ItemEtool","ItemToolbox"};
output[] = {{"sandbag_nest_kit",1}};
input[] = {{"ItemSandbag",4},{"PartWoodPlywood",2},{"PartWoodLumber",4}};
};
/*
class Crafting2
{
text = "Craft M240 Nest";
script = "spawn player_craftItem2;";
neednearby[] = {"workshop"};
requiretools[] = {"ItemEtool","ItemToolbox","M240_DZ"};
output[] = {{"m240_nest_kit",1}};
input[] = {{"ItemSandbag",4},{"ItemCanvas",1},{"PartWoodPlywood",4},{"PartWoodLumber",3}};
// TODO add consume weapon
consumeweapons[] = {"M240_DZ"};
};
*/
};
};
@@ -706,6 +789,12 @@ class CfgMagazines {
shortNameMagazine = "Machete";
ammo = "Machete_Swing_Ammo";
};
class Fishing_Swing : Hatchet_Swing {
displayName = "Fishing";
displayNameMagazine = "Fishing";
shortNameMagazine = "Fishing";
ammo = "Fishing_Swing_Ammo";
};
// Inventory Placeholder
class DummyItem : Hatchet_Swing {
displayName = "Dummy";
@@ -713,7 +802,6 @@ class CfgMagazines {
shortNameMagazine = "Dummy";
ammo = "Dummy_Swing_Ammo";
};
class ItemTrashToiletpaper : CA_Magazine {
scope = public;
count = 1;
@@ -723,6 +811,24 @@ class CfgMagazines {
picture = "\z\addons\dayz_communityassets\pictures\equip_toiletpaper_CA.paa";
type = 256;
};
class ItemTrout : CA_Magazine {
scope = public;
count = 1;
displayName = "Rainbow Trout";
descriptionShort = "Rainbow Trout";
model = "\dayz_equip\models\trout.p3d";
picture = "\dayz_equip\textures\equip_rainbowtrout_CA.paa";
type = 256;
};
class ItemTuna : CA_Magazine {
scope = public;
count = 1;
displayName = "Blue Fin Tuna";
descriptionShort = "Blue Fin Tuna";
model = "\dayz_equip\models\tuna.p3d";
picture = "\dayz_equip\textures\equip_tuna_CA.paa";
type = 256;
};
class ItemTrashRazor : CA_Magazine {
scope = public;
count = 1;

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@ if(TradeInprogress) exitWith { cutText ["Boil already in progress." , "PLAIN DOW
TradeInprogress = true;
player removeAction s_player_boil;
s_player_boil = -1;
s_player_boil = 1;
_hasbottleitem = "ItemWaterbottle" in magazines player;
_hastinitem = false;
@@ -51,4 +51,6 @@ if (_hasbottleitem and _hastinitem) then {
};
};
s_player_boil = -1;
TradeInprogress = false;

View File

@@ -1,4 +1,6 @@
private["_activatingPlayer","_trader_id","_category","_action","_id","_type","_loc","_name","_qty","_cost","_qty","_sell","_cur","_order","_tid","_currency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart"];
private ["_activatingPlayer","_trader_id","_category","_action","_type","_name","_qty","_sell","_order","_tid","_out","_part","_cancel","_Display","_File","_textCurrency","_textPart","_btype","_stype","_header","_item","_buy","_bqty","_bname","_sqty","_sname","_textCurrencySell","_afile"];
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
@@ -115,6 +117,6 @@ s_player_parts set [count s_player_parts,_cancel];
// Cache data in client side global variable
call compile format["tcacheBuy_%1 = %2;",_tid,dayzTraderMenuResult];
// Clear Data maybe consider cacheing results
// Clear Data
dayzTraderMenuResult = nil;
s_player_parts_crtl = 1;

View File

@@ -1,5 +1,7 @@
private["_trader_id","_category","_buy","_sell","_cancel"];
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
_trader_id = (_this select 3) select 0;

View File

@@ -12,7 +12,7 @@ s_player_callzombies = 1;
[player,"spotted",0,false] call dayz_zombieSpeak;
_id = [player,100,true,(getPosATL player)] spawn player_alertZombies;
[player,100,true,(getPosATL player)] spawn player_alertZombies;
// wait a bit
sleep 3;

View File

@@ -5,7 +5,7 @@ TradeInprogress = true;
// diag_log ("Cook Enabled");
player removeAction s_player_cook;
s_player_cook = -1;
s_player_cook = 1;
_rawmeat = meatraw;
_cookedmeat = meatcooked;
@@ -77,4 +77,5 @@ _cookedmeat = meatcooked;
};
} forEach _rawmeat;
s_player_cook = -1;
TradeInprogress = false;

View File

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

View File

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

View File

@@ -1,4 +1,8 @@
private["_item","_hasKnife","_hasKnifeBlunt","_hasHarvested","_qty","_text","_string","_type"];
if(TradeInprogress) exitWith { cutText ["Gutting animal already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
_item = _this select 3;
_hasKnife = "ItemKnife" in items player;
_hasKnifeBlunt = "ItemKnifeBlunt" in items player;
@@ -7,7 +11,7 @@ _hasHarvested = _item getVariable["meatHarvested",false];
_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
player removeAction s_player_butcher;
s_player_butcher = -1;
s_player_butcher = 1;
if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
//Get Animal Type
@@ -79,4 +83,6 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
_string = format[localize "str_success_gutted_animal",_text,_qty];
cutText [_string, "PLAIN DOWN"];
};
};
};
s_player_butcher = -1;
TradeInprogress = false;

View File

@@ -1,4 +1,8 @@
private["_hasKnife","_qty","_item","_text","_string","_type","_loop","_meat","_timer"];
if(TradeInprogress) exitWith { cutText ["Gutting zombie already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
_item = _this select 3;
_hasKnife = "ItemKnife" in items player;
_hasKnifeBlunt = "ItemKnifeBlunt" in items player;
@@ -7,7 +11,7 @@ _hasHarvested = _item getVariable["meatHarvested",false];
_config = configFile >> "CfgSurvival" >> "Meat" >> _type;
player removeAction s_player_butcher;
s_player_butcher = -1;
s_player_butcher = 1;
if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
//Get Animal Type
@@ -75,4 +79,6 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then {
_string = format["Successfully Gutted Zombie",_text,_qty];
cutText [_string, "PLAIN DOWN"];
};
};
};
s_player_butcher = -1;
TradeInprogress = false;

View File

@@ -1,7 +1,10 @@
private["_hasFood","_item","_text","_qty"];
if(TradeInprogress) exitWith { cutText ["Fill Jerry already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
player removeAction s_player_fillfuel;
s_player_fillfuel = -1;
s_player_fillfuel = 1;
_fillCounter = 0;
_abort = false;
@@ -74,4 +77,7 @@ for "_x" from 1 to _qty do {
sleep 1;
if(_abort) exitWith {};
};
};
s_player_fillfuel = -1;
TradeInprogress = false;

View File

@@ -1,6 +1,9 @@
private["_vehicle"];
_vehicle = _this select 3;
if(TradeInprogress) exitWith { cutText ["Lock vehicle already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = -1;
@@ -10,3 +13,5 @@ processInitCommands;
//_vehicle lock true;
//dayzLockVehicle = [_vehicle,true];
//publicVariable "dayzLockVehicle";
TradeInprogress = false;

View File

@@ -37,6 +37,9 @@ if (_classname == "MeleeHatchet") then {
if (_classname == "MeleeMachete") then {
player addMagazine 'Machete_swing';
};
if (_classname == "MeleeFishingPole") then {
player addMagazine 'Fishing_Swing';
};
_broken = false;
if(_classname == "WoodenArrow") then {
@@ -69,7 +72,7 @@ if(_qty >= 1) then {
if (_isOk) then {
deleteVehicle _holder;
if (_classname in ["MeleeHatchet","MeleeCrowbar","MeleeMachete"]) then {
if (_classname in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole"]) then {
if (_type == "cfgWeapons") then {
_muzzles = getArray(configFile >> "cfgWeapons" >> _classname >> "muzzles");
@@ -93,6 +96,9 @@ if(_qty >= 1) then {
if (_classname == "MeleeMachete") then {
player removeMagazine 'Machete_swing';
};
if (_classname == "MeleeFishingPole") then {
player removeMagazine 'Fishing_Swing';
};
};
};
TradeInprogress = false;

View File

@@ -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"]) then {
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole"]) then {
_magType = ([] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines")) select 0;
_meleeNum = ({_x == _magType} count magazines player);
for "_i" from 1 to _meleeNum do {
@@ -44,7 +44,7 @@ if (_isOk) then {
player removeWeapon _item;
//Add magazines if needed
if (_create in ["MeleeHatchet","MeleeCrowbar","MeleeMachete"]) then {
if (_create in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole"]) then {
if (_create == "MeleeCrowbar") then {
player addMagazine 'crowbar_swing';
};
@@ -54,6 +54,9 @@ if (_isOk) then {
if (_create == "MeleeMachete") then {
player addMagazine 'Machete_swing';
};
if (_create == "MeleeFishingPole") then {
player addMagazine 'Fishing_Swing';
};
if (_type == "cfgWeapons") then {
_muzzles = getArray(configFile >> "cfgWeapons" >> _create >> "muzzles");
_wtype = ((weapons player) select 0);
@@ -68,7 +71,7 @@ if (_isOk) then {
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
//Add magazines back
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete"]) then {
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole"]) then {
if (_item == "MeleeCrowbar") then {
player addMagazine 'crowbar_swing';
};
@@ -78,6 +81,9 @@ if (_isOk) then {
if (_item == "MeleeMachete") then {
player addMagazine 'Machete_swing';
};
if (_item == "MeleeFishingPole") then {
player addMagazine 'Fishing_Swing';
};
};
};
TradeInprogress = false;

View File

@@ -2,69 +2,11 @@
* Crafting by [VB]AWOL
* usage: spawn player_craftitem;
*/
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear"];
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;
/*
== Canned Foods
"FoodCanBakedBeans",
"FoodCanSardines",
"FoodCanFrankBeans",
"FoodCanPasta",
"FoodBioMeat"
== Drinks
"ItemSodaCoke",
"ItemSodaPepsi",
== Trash
"TrashTinCan",
"TrashJackDaniels",
"ItemSodaEmpty",
"ItemSodaCokeEmpty",
"ItemSodaPepsiEmpty",
== community stuff Trash
"ItemSodaMdewEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaClaysEmpty",
"ItemSodaSmashtEmpty",.
"ItemSodaDrwasteEmpty",.
"ItemSodaLemonadeEmpty",.
"ItemSodaLvgEmpty",.
"ItemSodaMzlyEmpty",.
"ItemSodaRabbitEmpty"
== Raw Meats
"FoodSteakRaw",
"FoodmeatRaw",
"FoodbeefRaw",
"FoodmuttonRaw",
"FoodchickenRaw",
"FoodrabbitRaw",
"FoodbaconRaw"
== Cooked Meats
"FoodSteakCooked",
"FoodmeatCooked",
"FoodbeefCooked",
"FoodmuttonCooked",
"FoodchickenCooked",
"FoodrabbitCooked",
"FoodbaconCooked"
*/
// Removed metals:
// _recipe_ItemBronzeBar = [[["ItemBronzeBar",1] ],[["ItemCopperBar",3],["ItemTinBar",3]]];
// New item ideas:
// _recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
// _recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
// ItemSalt
// temp array of removed parts
_temp_removed_array = [];
_abort = false;
@@ -88,6 +30,14 @@ if("fire" in _needNear) then {
};
};
if("workshop" in _needNear) then {
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_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;
@@ -142,7 +92,7 @@ if (_canDo) then {
player playActionNow "Medic";
[player,"repair",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
[player,50,true,(getPosATL player)] spawn player_alertZombies;
r_interrupt = false;
_animState = animationState player;

View File

@@ -2,69 +2,11 @@
* Crafting by [VB]AWOL
* usage: spawn player_craftitem;
*/
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear"];
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;
/*
== Canned Foods
"FoodCanBakedBeans",
"FoodCanSardines",
"FoodCanFrankBeans",
"FoodCanPasta",
"FoodBioMeat"
== Drinks
"ItemSodaCoke",
"ItemSodaPepsi",
== Trash
"TrashTinCan",
"TrashJackDaniels",
"ItemSodaEmpty",
"ItemSodaCokeEmpty",
"ItemSodaPepsiEmpty",
== community stuff Trash
"ItemSodaMdewEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaClaysEmpty",
"ItemSodaSmashtEmpty",.
"ItemSodaDrwasteEmpty",.
"ItemSodaLemonadeEmpty",.
"ItemSodaLvgEmpty",.
"ItemSodaMzlyEmpty",.
"ItemSodaRabbitEmpty"
== Raw Meats
"FoodSteakRaw",
"FoodmeatRaw",
"FoodbeefRaw",
"FoodmuttonRaw",
"FoodchickenRaw",
"FoodrabbitRaw",
"FoodbaconRaw"
== Cooked Meats
"FoodSteakCooked",
"FoodmeatCooked",
"FoodbeefCooked",
"FoodmuttonCooked",
"FoodchickenCooked",
"FoodrabbitCooked",
"FoodbaconCooked"
*/
// Removed metals:
// _recipe_ItemBronzeBar = [[["ItemBronzeBar",1] ],[["ItemCopperBar",3],["ItemTinBar",3]]];
// New item ideas:
// _recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
// _recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
// ItemSalt
// temp array of removed parts
_temp_removed_array = [];
_abort = false;
@@ -88,6 +30,14 @@ if("fire" in _needNear) then {
};
};
if("workshop" in _needNear) then {
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_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;
@@ -142,7 +92,7 @@ if (_canDo) then {
player playActionNow "Medic";
[player,"repair",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
[player,50,true,(getPosATL player)] spawn player_alertZombies;
r_interrupt = false;
_animState = animationState player;

View File

@@ -2,69 +2,11 @@
* Crafting by [VB]AWOL
* usage: spawn player_craftitem;
*/
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear"];
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;
/*
== Canned Foods
"FoodCanBakedBeans",
"FoodCanSardines",
"FoodCanFrankBeans",
"FoodCanPasta",
"FoodBioMeat"
== Drinks
"ItemSodaCoke",
"ItemSodaPepsi",
== Trash
"TrashTinCan",
"TrashJackDaniels",
"ItemSodaEmpty",
"ItemSodaCokeEmpty",
"ItemSodaPepsiEmpty",
== community stuff Trash
"ItemSodaMdewEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaClaysEmpty",
"ItemSodaSmashtEmpty",.
"ItemSodaDrwasteEmpty",.
"ItemSodaLemonadeEmpty",.
"ItemSodaLvgEmpty",.
"ItemSodaMzlyEmpty",.
"ItemSodaRabbitEmpty"
== Raw Meats
"FoodSteakRaw",
"FoodmeatRaw",
"FoodbeefRaw",
"FoodmuttonRaw",
"FoodchickenRaw",
"FoodrabbitRaw",
"FoodbaconRaw"
== Cooked Meats
"FoodSteakCooked",
"FoodmeatCooked",
"FoodbeefCooked",
"FoodmuttonCooked",
"FoodchickenCooked",
"FoodrabbitCooked",
"FoodbaconCooked"
*/
// Removed metals:
// _recipe_ItemBronzeBar = [[["ItemBronzeBar",1] ],[["ItemCopperBar",3],["ItemTinBar",3]]];
// New item ideas:
// _recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
// _recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
// ItemSalt
// temp array of removed parts
_temp_removed_array = [];
_abort = false;
@@ -88,6 +30,14 @@ if("fire" in _needNear) then {
};
};
if("workshop" in _needNear) then {
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_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;
@@ -142,7 +92,7 @@ if (_canDo) then {
player playActionNow "Medic";
[player,"repair",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
[player,50,true,(getPosATL player)] spawn player_alertZombies;
r_interrupt = false;
_animState = animationState player;

View File

@@ -2,69 +2,11 @@
* Crafting by [VB]AWOL
* usage: spawn player_craftitem;
*/
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear"];
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;
/*
== Canned Foods
"FoodCanBakedBeans",
"FoodCanSardines",
"FoodCanFrankBeans",
"FoodCanPasta",
"FoodBioMeat"
== Drinks
"ItemSodaCoke",
"ItemSodaPepsi",
== Trash
"TrashTinCan",
"TrashJackDaniels",
"ItemSodaEmpty",
"ItemSodaCokeEmpty",
"ItemSodaPepsiEmpty",
== community stuff Trash
"ItemSodaMdewEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaClaysEmpty",
"ItemSodaSmashtEmpty",.
"ItemSodaDrwasteEmpty",.
"ItemSodaLemonadeEmpty",.
"ItemSodaLvgEmpty",.
"ItemSodaMzlyEmpty",.
"ItemSodaRabbitEmpty"
== Raw Meats
"FoodSteakRaw",
"FoodmeatRaw",
"FoodbeefRaw",
"FoodmuttonRaw",
"FoodchickenRaw",
"FoodrabbitRaw",
"FoodbaconRaw"
== Cooked Meats
"FoodSteakCooked",
"FoodmeatCooked",
"FoodbeefCooked",
"FoodmuttonCooked",
"FoodchickenCooked",
"FoodrabbitCooked",
"FoodbaconCooked"
*/
// Removed metals:
// _recipe_ItemBronzeBar = [[["ItemBronzeBar",1] ],[["ItemCopperBar",3],["ItemTinBar",3]]];
// New item ideas:
// _recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
// _recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
// ItemSalt
// temp array of removed parts
_temp_removed_array = [];
_abort = false;
@@ -88,6 +30,14 @@ if("fire" in _needNear) then {
};
};
if("workshop" in _needNear) then {
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_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;
@@ -142,7 +92,7 @@ if (_canDo) then {
player playActionNow "Medic";
[player,"repair",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
[player,50,true,(getPosATL player)] spawn player_alertZombies;
r_interrupt = false;
_animState = animationState player;

View File

@@ -2,69 +2,11 @@
* Crafting by [VB]AWOL
* usage: spawn player_craftitem;
*/
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear"];
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;
/*
== Canned Foods
"FoodCanBakedBeans",
"FoodCanSardines",
"FoodCanFrankBeans",
"FoodCanPasta",
"FoodBioMeat"
== Drinks
"ItemSodaCoke",
"ItemSodaPepsi",
== Trash
"TrashTinCan",
"TrashJackDaniels",
"ItemSodaEmpty",
"ItemSodaCokeEmpty",
"ItemSodaPepsiEmpty",
== community stuff Trash
"ItemSodaMdewEmpty",
"ItemSodaMtngreenEmpty",
"ItemSodaR4z0rEmpty",
"ItemSodaClaysEmpty",
"ItemSodaSmashtEmpty",.
"ItemSodaDrwasteEmpty",.
"ItemSodaLemonadeEmpty",.
"ItemSodaLvgEmpty",.
"ItemSodaMzlyEmpty",.
"ItemSodaRabbitEmpty"
== Raw Meats
"FoodSteakRaw",
"FoodmeatRaw",
"FoodbeefRaw",
"FoodmuttonRaw",
"FoodchickenRaw",
"FoodrabbitRaw",
"FoodbaconRaw"
== Cooked Meats
"FoodSteakCooked",
"FoodmeatCooked",
"FoodbeefCooked",
"FoodmuttonCooked",
"FoodchickenCooked",
"FoodrabbitCooked",
"FoodbaconCooked"
*/
// Removed metals:
// _recipe_ItemBronzeBar = [[["ItemBronzeBar",1] ],[["ItemCopperBar",3],["ItemTinBar",3]]];
// New item ideas:
// _recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
// _recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
// ItemSalt
// temp array of removed parts
_temp_removed_array = [];
_abort = false;
@@ -88,6 +30,14 @@ if("fire" in _needNear) then {
};
};
if("workshop" in _needNear) then {
_isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_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;
@@ -142,7 +92,7 @@ if (_canDo) then {
player playActionNow "Medic";
[player,"repair",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
[player,50,true,(getPosATL player)] spawn player_alertZombies;
r_interrupt = false;
_animState = animationState player;

View File

@@ -38,7 +38,7 @@ if (["ItemSoda",_itemorignal] call fnc_inString) then {
//higher alert and sound radius
_dis=10;
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
_id = [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
};
if (_hasoutput) then{

View File

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

View File

@@ -1,56 +1,58 @@
private ["_item","_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_sfx","_dis","_animState","_isMedic","_proceed","_counter","_objType","_limit","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree"];
/*
Fishing 1.0
spawn player_goFishing;
DayZ Epoch - By: [VB]AWOL
*/
private ["_itemOut","_position","_isOk","_counter"];
if(TradeInprogress) exitWith { cutText ["Fishing already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
_item = _this;
call gear_ui_init;
// find position in front of player
// 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 ["Must 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"];};
_isOk = true;
_counter = 0;
// swing fishingpole
player playActionNow "GestureSwing";
// Alert zeds
[player,10,true,(getPosATL player)] spawn player_alertZombies;
player playActionNow "Medic";
[player,20,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;
[player,"fillwater",0,false] call dayz_zombieSpeak;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
while {_isOk} do {
if (_finished) then {
if (r_interrupt or (player getVariable["combattimeout", 0] >= time)) then {
_isOk = false;
cutText ["Canceled Fishing.", "PLAIN DOWN"];
} else {
sleep 2;
_itemOut = "FoodCanSardines"; // TODO replace with random raw fishes
_countOut = round(random 4);
for "_x" from 1 to _countOut do {
player addMagazine _itemOut;
// TODO: increase chance the deaper the water.
// 1% chance to catch anything
if((random 100) <= 1) then {
// Just the one fish for now
_itemOut = ["ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTuna"] call BIS_fnc_selectRandom;
player addMagazine _itemOut;
cutText ["You caught a fish.", "PLAIN DOWN"];
_isOk = false;
} else {
cutText ["Nibble... Nibble...", "PLAIN DOWN"];
_counter = _counter + 1;
if(_counter == 5) then {
_isOk = false;
};
};
};
cutText [format["You caught %1 fish.", _countOut], "PLAIN DOWN"];
} else {
r_interrupt = false;
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
cutText ["Canceled Fishing.", "PLAIN DOWN"];
};
TradeInprogress = false;

View File

@@ -1,6 +1,6 @@
private ["_dir","_classname","_box","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool"];
if(TradeInprogress) exitWith { cutText ["Repair already in progress." , "PLAIN DOWN"]; };
if(TradeInprogress) exitWith { cutText ["Open Crate already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
_hasTool = "ItemCrowbar" in items player;

View File

@@ -1,22 +1,25 @@
/*
_item spawn player_wearClothes;
Added Female skin changes - vbawol
Added Female skin changes - DayZ Epoch - vbawol
*/
private["_item","_onLadder","_hasclothesitem","_config","_text","_isFemale","_myModel","_itemNew","_currentSex","_newSex","_model"];
if(TradeInprogress) exitWith { cutText ["Changing clothes already in progress." , "PLAIN DOWN"] };
TradeInprogress = true;
_item = _this;
call gear_ui_init;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
if (_onLadder) exitWith {TradeInprogress = false; cutText [(localize "str_player_21") , "PLAIN DOWN"]};
_hasclothesitem = _this in magazines player;
_config = configFile >> "CfgMagazines";
_text = getText (_config >> _item >> "displayName");
if (!_hasclothesitem) exitWith {cutText [format[(localize "str_player_31"),_text,"wear"] , "PLAIN DOWN"]};
if (!_hasclothesitem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_text,"wear"] , "PLAIN DOWN"]};
if (vehicle player != player) exitWith {cutText ["You may not change clothes while in a vehicle", "PLAIN DOWN"]};
if (vehicle player != player) exitWith {TradeInprogress = false; cutText ["You may not change clothes while in a vehicle", "PLAIN DOWN"]};
_myModel = (typeOf player);
_itemNew = "Skin_" + _myModel;
@@ -45,4 +48,5 @@ if ( (isClass(_config >> _itemNew)) ) then {
cutText ["You cannot wear a skin of the opposite sex.", "PLAIN DOWN"];
};
};
};
};
TradeInprogress = false;

View File

@@ -16,7 +16,7 @@ if(!(alive _item)) then {
sleep 1;
// player playActionNow "PutDown";
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
[player,50,true,(getPosATL player)] spawn player_alertZombies;
[player,"gut",0,false] call dayz_zombieSpeak;

View File

@@ -1,5 +1,8 @@
private["_activatingPlayer","_trader_id","_category","_action","_id","_type","_loc","_name","_qty","_cost","_qty","_sell","_cur","_order","_tid","_currency","_actionFile","_in","_out","_part","_cat","_cancel","_Display","_File","_textCurrency","_textPart","_count"];
if(TradeInprogress) exitWith { cutText ["already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
// [ _trader_id, _category, _action ];
@@ -143,3 +146,4 @@ dayzTraderMenuResult = nil;
s_player_parts_crtl = 1;
TradeInprogress = false;

View File

@@ -1,4 +1,4 @@
private["_position","_veh","_location","_isOk","_backpack","_vehType","_trg","_key","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID"];
private ["_veh","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_okToSell","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID"];
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
@@ -20,7 +20,7 @@ _bos = 0;
if(_buy_o_sell == "buy") then {
_qty = {_x == _part_in} count magazines player;
} else {
_obj = nearestObjects [(getPosATL player), [_part_in], 20];
_obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance];
_qty = count _obj;
_bos = 1;
};
@@ -88,45 +88,74 @@ if (_qty >= _qty_in) then {
if(dayzTradeResult == "PASS") then {
if(_buy_o_sell == "buy") then {
for "_x" from 1 to _qty_in do {
player removeMagazine _part_in;
// First select key color
_keyColor = ["Green","Red","Blue","Yellow","Black"] call BIS_fnc_selectRandom;
// then select number from 1 - 2500
_keyNumber = (floor(random 2500)) + 1;
// Combine to key (eg.ItemKeyYellow2494) classname
_keySelected = format[("ItemKey%1%2"),_keyColor,_keyNumber];
_isKeyOK = isClass(configFile >> "CfgWeapons" >> _keySelected);
_config = _keySelected;
_isOk = [player,_config] call BIS_fnc_invAdd;
if (_isOk and _isKeyOK) then {
_removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove);
if(_removed == _qty_in) then {
_dir = round(random 360);
_helipad = nearestObjects [player, ["HeliHCivil","HeliHempty"], 100];
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
_location = [(position player),0,20,1,2,2000,0] call BIS_fnc_findSafePos;
};
//place vehicle spawn marker (local)
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
_location = (getPosATL _veh);
//["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,_keySelected];
publicVariableServer "dayzPublishVeh2";
player reveal _veh;
cutText [format[("Bought %3 for %1 %2, key added to toolbelt."),_qty_in,_textPartIn,_textPartOut], "PLAIN DOWN"];
} else {
player removeMagazine _keySelected;
};
} else {
cutText ["You do not have enough room on your toolbelt.", "PLAIN DOWN"];
};
_dir = round(random 360);
_location = [(position player),0,20,1,2,2000,0] call BIS_fnc_findSafePos;
//place vehicle spawn marker (local)
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
_location = (getPosATL _veh);
//["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;
dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
publicVariableServer "dayzPublishVeh2";
player reveal _veh;
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
} else {
// Sell Vehicle
for "_x" from 1 to _qty_out do {
player addMagazine _part_out;
};
_obj = _obj select 0;
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
_okToSell = true;
if(_okToSell and !isNull _obj and alive _obj) then {
// Sell Vehicle
for "_x" from 1 to _qty_out do {
player addMagazine _part_out;
};
deleteVehicle _obj;
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
cutText [format[("Sold %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
deleteVehicle _obj;
cutText [format[("Sold %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
};
};
{player removeAction _x} forEach s_player_parts;s_player_parts = [];

View File

@@ -1,4 +1,4 @@
private["_position","_veh","_location","_isOk","_backpack","_vehType","_trg","_key","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID"];
private ["_veh","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID"];
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
@@ -68,9 +68,8 @@ if (_qty >= _qty_in) then {
if(_buy_o_sell == "buy") then {
_qty = {_x == _part_in} count magazines player;
} else {
_obj = nearestObjects [(getPosATL player), [_part_in], 20];
_obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance];
_qty = count _obj;
_bos = 1;
};
if (_qty >= _qty_in) then {
@@ -88,39 +87,57 @@ if (_qty >= _qty_in) then {
if(dayzTradeResult == "PASS") then {
if(_buy_o_sell == "buy") then {
// First select key color
_keyColor = ["Green","Red","Blue","Yellow","Black"] call BIS_fnc_selectRandom;
// then select number from 1 - 2500
_keyNumber = (floor(random 2500)) + 1;
// Combine to key (eg.ItemKeyYellow2494) classname
_keySelected = format[("ItemKey%1%2"),_keyColor,_keyNumber];
_isKeyOK = isClass(configFile >> "CfgWeapons" >> _keySelected);
_config = _keySelected;
_isOk = [player,_config] call BIS_fnc_invAdd;
if (_isOk and _isKeyOK) then {
_removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove);
if(_removed == _qty_in) then {
_dir = round(random 360);
_helipad = nearestObjects [player, ["HeliHCivil","HeliHempty"], 100];
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
} else {
_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
};
for "_x" from 1 to _qty_in do {
player removeMagazine _part_in;
};
//place vehicle spawn marker (local)
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
_dir = round(random 360);
_location = (getPosATL _veh);
_helipad = nearestObjects [player, ["HeliHCivil","HeliHempty"], 100];
if(count _helipad > 0) then {
_location = (getPosATL (_helipad select 0));
//["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,_keySelected];
publicVariableServer "dayzPublishVeh2";
player reveal _veh;
cutText [format[("Bought %3 for %1 %2, key added to toolbelt."),_qty_in,_textPartIn,_textPartOut], "PLAIN DOWN"];
} else {
player removeMagazine _keySelected;
};
} else {
_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
cutText ["You do not have enough room on your toolbelt.", "PLAIN DOWN"];
};
//place vehicle spawn marker (local)
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
_location = (getPosATL _veh);
//["dayzPublishVeh",[_veh,[_dir,_location],_part_out,false,dayz_playerUID]] call callRpcProcedure;
dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
publicVariableServer "dayzPublishVeh2";
player reveal _veh;
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
} else {
_obj = _obj select 0;
//check make sure there are no fully damaged tires fully
//check to make sure vehicle has no more than 75% average tire damage
_hitpoints = _obj call vehicle_getHitpoints;
_okToSell = true;
@@ -146,7 +163,7 @@ if (_qty >= _qty_in) then {
};
};
if(_okToSell) then {
if(_okToSell and !isNull _obj and alive _obj) then {
// Sell Vehicle
for "_x" from 1 to _qty_out do {
@@ -182,8 +199,7 @@ if (_qty >= _qty_in) then {
cutText [format[("Need %1 More %2"),_needed,_textPartIn] , "PLAIN DOWN"];
} else {
cutText [format[("No %1 found within 20 meters."),_textPartIn] , "PLAIN DOWN"];
};
};
};
TradeInprogress = false;

View File

@@ -1,7 +1,3 @@
private["_none"];
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
//{player removeAction _x} forEach s_player_bank;s_player_bank = [];
s_player_parts_crtl = -1;
//s_player_bank_crtl = -1;
s_player_parts_crtl = -1;

View File

@@ -4,6 +4,8 @@ private["_iarray","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sel
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"] };
TradeInprogress = true;
_total_parts_out = 0;
_activatingPlayer = _this select 1;
_part_out = (_this select 3) select 0;
@@ -102,13 +104,10 @@ for "_x" from 1 to _total_trades do {
if(dayzTradeResult == "PASS") then {
for "_x" from 1 to _qty_out do {
player addMagazine _part_out;
};
// total of all parts
_total_parts_out = _total_parts_out + _qty_out;
cutText [format[("Traded %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
} else {
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
@@ -144,4 +143,125 @@ for "_x" from 1 to _total_trades do {
if(_abort) exitWith {};
};
// pay out
if(_total_parts_out >= 1) then {
diag_log format["DEBUG TRADE #: %1", _total_parts_out];
if(_bos == 1) then {
//convert currency trades into next bar
// 10 ItemCopperBar > ItemCopperBar10oz
// 3 ItemCopperBar10oz > ItemSilverBar
// 10 ItemSilverBar > ItemSilverBar10oz
// 3 ItemSilverBar10oz > ItemGoldBar
// 10 ItemGoldBar > ItemGoldBar10oz
_next_highest_bar = "NA";
_third_highest_bar = "NA";
_next_highest_conv = 10000;
_third_highest_conv = 10000;
switch(true)do{
case (_part_out == "ItemCopperBar"): {
_next_highest_bar = "ItemCopperBar10oz";
_third_highest_bar = "ItemSilverBar";
_next_highest_conv = 10;
_third_highest_conv = 3;
};
case (_part_out == "ItemCopperBar10oz"): {
_next_highest_bar = "ItemSilverBar";
_third_highest_bar = "ItemSilverBar10oz";
_next_highest_conv = 3;
_third_highest_conv = 10;
};
case (_part_out == "ItemSilverBar"): {
_next_highest_bar = "ItemSilverBar10oz";
_third_highest_bar = "ItemGoldBar";
_next_highest_conv = 10;
_third_highest_conv = 3;
};
case (_part_out == "ItemSilverBar10oz"): {
_next_highest_bar = "ItemGoldBar";
_third_highest_bar = "ItemGoldBar10oz";
_next_highest_conv = 3;
_third_highest_conv = 10;
};
case (_part_out == "ItemGoldBar"): {
_next_highest_bar = "ItemGoldBar10oz";
_third_highest_bar = "NA";
_next_highest_conv = 10;
_third_highest_conv = 10000;
};
};
diag_log format["DEBUG TRADE part: %1 next: %2", _part_out,_next_highest_bar];
if(_total_parts_out >= _next_highest_conv) then {
_next_parts_out_raw = _total_parts_out / _next_highest_conv;
// whole parts
_next_parts_out = floor(_next_parts_out_raw);
diag_log format["DEBUG TRADE next whole parts: %1 part: %2", _next_parts_out,_next_highest_bar];
// find any whole remains
_remainder = floor((_next_parts_out_raw - _next_parts_out) * _next_highest_conv);
diag_log format["DEBUG TRADE remainder parts: %1 part: %2", _remainder,_part_out];
for "_x" from 1 to _remainder do {
player addMagazine _part_out;
};
// Find if needs further conversion
if (_next_parts_out >= _third_highest_conv) then {
_third_parts_out_raw = _next_parts_out / _third_highest_conv;
// whole parts
_third_parts_out = floor(_third_parts_out_raw);
diag_log format["DEBUG TRADE third whole parts: %1 part: %2", _third_parts_out,_third_highest_bar];
for "_x" from 1 to _third_parts_out do {
player addMagazine _third_highest_bar;
};
// find any whole remains
_remainder = floor((_third_parts_out_raw - _third_parts_out) * _third_highest_conv);
diag_log format["DEBUG TRADE remainder parts: %1 part: %2", _remainder,_next_highest_bar];
for "_x" from 1 to _remainder do {
player addMagazine _next_highest_bar;
};
} else {
diag_log format["DEBUG TRADE next parts: %1 part: %2", _next_parts_out,_next_highest_bar];
for "_x" from 1 to _next_parts_out do {
player addMagazine _next_highest_bar;
};
};
} else {
diag_log "DEBUG TRADE SELLING NORMALLY";
for "_x" from 1 to _total_parts_out do {
player addMagazine _part_out;
};
};
} else {
diag_log "DEBUG TRADE BUYING";
for "_x" from 1 to _total_parts_out do {
player addMagazine _part_out;
};
};
};
TradeInprogress = false;

View File

@@ -1,5 +1,8 @@
private["_none"];
if(TradeInprogress) exitWith { cutText ["Trade already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
s_player_parts_crtl = 1;
@@ -30,3 +33,4 @@ _metals_conversion = [
_cancel = player addAction ["Cancel", "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
s_player_parts set [count s_player_parts,_cancel];
TradeInprogress = false;

View File

@@ -0,0 +1,12 @@
private ["_buy","_number"];
dayz_selectedVault = _this select 3;
dayz_combination = "";
_number = 0;
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
for "_x" from 1 to 10 do {
_buy = player addAction [str(_number), "\z\addons\dayz_code\actions\vault_combination_2.sqf",str(_number), 99, true, false, "",""];
s_player_combi set [count s_player_combi,_buy];
_number = _number + 1;
};

View File

@@ -0,0 +1,15 @@
private ["_buy","_number"];
// start combination string build
dayz_combination = _this select 3;
_number = 0;
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
for "_x" from 1 to 10 do {
_buy = player addAction [str(_number), "\z\addons\dayz_code\actions\vault_combination_3.sqf",str(_number), 99, true, false, "",""];
s_player_combi set [count s_player_combi,_buy];
_number = _number + 1;
};

View File

@@ -0,0 +1,15 @@
private ["_buy","_number"];
// combine previous selections with next
dayz_combination = format["%1%2",dayz_combination,(_this select 3)];
_number = 0;
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
for "_x" from 1 to 10 do {
_buy = player addAction [str(_number), "\z\addons\dayz_code\actions\vault_combination_4.sqf",str(_number), 99, true, false, "",""];
s_player_combi set [count s_player_combi,_buy];
_number = _number + 1;
};

View File

@@ -0,0 +1,15 @@
private ["_buy","_number"];
// combine previous selections with next
dayz_combination = format["%1%2",dayz_combination,(_this select 3)];
_number = 0;
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
for "_x" from 1 to 10 do {
_buy = player addAction [str(_number), "\z\addons\dayz_code\actions\vault_combination_final.sqf",str(_number), 99, true, false, "",""];
s_player_combi set [count s_player_combi,_buy];
_number = _number + 1;
};

View File

@@ -0,0 +1,10 @@
private [];
// set final combination to player
dayz_combination = format["%1%2",dayz_combination,(_this select 3)];
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
s_player_unlockvault = -1;
// Run unlock on vault
if(!isNull dayz_selectedVault and (typeOf dayz_selectedVault) == "VaultStorageLocked") then {
dayz_selectedVault spawn player_unlockVault;
dayz_selectedVault = objNull;
};

View File

@@ -1,3 +1,3 @@
private["_obj","_bag","_pos"];
private ["_obj"];
_obj = _this select 3;
_obj spawn player_unlockVault;

View File

@@ -1,3 +1,3 @@
private["_obj","_bag","_pos"];
private ["_obj"];
_obj = _this select 3;
_obj spawn player_lockVault;

View File

@@ -1,3 +1,3 @@
private["_obj","_bag","_pos"];
private ["_obj"];
_obj = _this select 3;
_obj spawn player_packVault;

View File

@@ -1,4 +1,4 @@
private ["_tent","_location","_isOk","_cancel","_location3","_location4","_location1","_location2","_counter","_pondPos","_isPond","_ppos","_hastentitem","_dir","_id","_building","_isBuilding","_playerPos","_item","_offset_x","_offset_y","_offset_z","_offset_z_attach","_config","_text","_tmpvault","_vault_location","_objectsPond"];
private ["_tent","_location","_isOk","_cancel","_location3","_location4","_location1","_location2","_counter","_pondPos","_isPond","_ppos","_hastentitem","_dir","_building","_isBuilding","_playerPos","_item","_offset_x","_offset_y","_offset_z","_offset_z_attach","_config","_text","_tmpvault","_vault_location","_objectsPond","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_removed"];
//check if can pitch here
if(TradeInprogress) exitWith { cutText ["Vault pitching already in progress." , "PLAIN DOWN"]; };
@@ -108,47 +108,60 @@ if(!_cancel) then {
_hastentitem = _this in magazines player;
if (!_hastentitem) exitWith {cutText [format[(localize "str_player_31"),_text,"pitch"] , "PLAIN DOWN"]};
player removeMagazine _item;
_removed = ([player,_item] call BIS_fnc_invRemove);
//call dayz_forceSave;
if(_removed == 1) then {
_dir = round(direction player);
//wait a bit
player playActionNow "Medic";
sleep 1;
[player,"tentunpack",0,false] call dayz_zombieSpeak;
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
_building = nearestObject [(vehicle player), "HouseBase"];
_isBuilding = [(vehicle player),_building] call fnc_isInsideBuilding;
player removeMagazine _item;
if(_isBuilding) then {
//call dayz_forceSave;
_dir = round(direction player);
//wait a bit
player playActionNow "Medic";
sleep 1;
[player,"tentunpack",0,false] call dayz_zombieSpeak;
[player,50,true,(getPosATL player)] spawn player_alertZombies;
_building = nearestObject [(vehicle player), "HouseBase"];
_isBuilding = [(vehicle player),_building] call fnc_isInsideBuilding;
if(_isBuilding) then {
_ppos = _building worldToModel _vault_location;
_location = _building modelToWorld _ppos;
_ppos = _building worldToModel _vault_location;
_location = _building modelToWorld _ppos;
} else {
_location = player modelToWorld [_offset_x,_offset_y,_offset_z];
} else {
_location = player modelToWorld [_offset_x,_offset_y,_offset_z];
};
sleep 5;
//place tent (local)
_tent = createVehicle ["VaultStorageLocked", _location, [], 0, "CAN_COLLIDE"];
_tent setdir _dir;
_tent setpos _location;
player reveal _tent;
// Generate Combination
_combination_1 = floor(random 10);
_combination_2 = floor(random 10);
_combination_3 = floor(random 10);
_combination_4 = floor(random 10);
// Format Combination
_combination = format["%1%2%3%4",_combination_1,_combination_2,_combination_3,_combination_4];
_tent setVariable ["characterID",_combination,true];
_tent setVariable ["OEMPos",_location,true];
//["dayzPublishObj",[_combination,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
dayzPublishObj = [_combination,_tent,[_dir,_location],"VaultStorageLocked"];
publicVariableServer "dayzPublishObj";
cutText [format["You have setup your Safe. Combination is %1",_combination], "PLAIN DOWN", 5];
};
sleep 5;
//place tent (local)
_tent = createVehicle ["VaultStorageLocked", _location, [], 0, "CAN_COLLIDE"];
_tent setdir _dir;
_tent setpos _location;
player reveal _tent;
_tent setVariable ["characterID",dayz_playerUID,true];
_tent setVariable ["OEMPos",_location,true];
//["dayzPublishObj",[dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
dayzPublishObj = [dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"];
publicVariableServer "dayzPublishObj";
cutText ["You have setup your Safe", "PLAIN DOWN"];
} else {
cutText ["You cannot place a Safe here. The area must be flat, and free of other objects", "PLAIN DOWN"];

View File

@@ -1,3 +1,3 @@
private["_obj","_bag","_pos"];
private ["_obj"];
_obj = _this select 3;
_obj spawn player_unlockVault;

View File

@@ -10,6 +10,10 @@ class CfgAmmo {
hit = 9;
simulation = "shotBullet";
};
class Fishing_Swing_Ammo : Melee {
hit = 7;
simulation = "shotBullet";
};
class Dummy_Swing_Ammo : Melee {
hit = 0;
simulation = "shotBullet";

View File

@@ -413,7 +413,7 @@ class CfgLoot {
"Skin_BanditW1_DZ",
"Skin_BanditW2_DZ",
"Skin_TK_INS_Soldier_EP1_DZ",
"Skin_TK_INS_Warlord_EP1",
"Skin_TK_INS_Warlord_EP1_DZ",
"Skin_SurvivorWcombat_DZ",
"Skin_SurvivorWdesert_DZ",
"Skin_GUE_Soldier_MG_DZ",

View File

@@ -360,6 +360,16 @@ class Citizen1; // External class reference
transportMaxMagazines = 400;
transportmaxbackpacks = 10;
};
class SUV_TK_CIV_EP1;
class SUV_Camo: SUV_TK_CIV_EP1
{
displayName = "SUV Camo";
hiddenSelectionsTextures[] = {"\z\addons\dayz_communityassets\textures\camo10.paa"};
transportMaxWeapons = 10;
transportMaxMagazines = 100;
transportmaxbackpacks = 5;
armor = 50;
};
class HMMWV_Base;
class HMMWV_DZ: HMMWV_Base {
accuracy = 0.32;
@@ -376,7 +386,7 @@ class Citizen1; // External class reference
crew = "";
typicalCargo[] = {};
transportMaxWeapons = 4;
transportMaxMagazines = 12;
transportMaxMagazines = 120;
transportmaxbackpacks = 4;
class Turrets {};
class Damage {

View File

@@ -5,7 +5,7 @@ _obj = _this select 0;
// lower case to prevent issues with differing case for buildings from map to map.
_type = toLower(typeOf _obj);
diag_log format["Spawning loot for: %1", _type];
//diag_log format["Spawning loot for: %1", _type];
_config = configFile >> "CfgBuildingLoot" >> _type;
_positions = [] + getArray (_config >> "lootPos");
_itemTypes = [] + getArray (_config >> "itemType");
@@ -16,7 +16,7 @@ _lootChance = getNumber (_config >> "lootChance");
_nearBy = nearestObjects [_iPos, ["WeaponHolder","WeaponHolderBase"], 1];
if (count _nearBy == 0) then {
_index = dayz_CBLBase find _type;
diag_log format["Found %2 at index: %1", _index,_type];
//diag_log format["Found %2 at index: %1", _index,_type];
_weights = dayz_CBLChances select _index;
_cntWeights = count _weights;
_index = floor(random _cntWeights);

View File

@@ -3,7 +3,7 @@ private["_position","_unitTypes","_group","_unit","_target","_bodies","_targetPo
_agent = _this select 0;
//Add handlers
//_id = _agent addeventhandler ["HandleDamage",{_this call local_zombieDamage}];
//_id = _agent addeventhandler ["HandleDamage",{_this call local_zombieDamage}];
//Loop behaviour
_list = (getposATL _agent) nearEntities ["Man",200];
@@ -30,7 +30,7 @@ while {_isAlive and _isSomeone} do {
sleep 1;
};
//CHASE TARGET
//CHASE TARGET
//Leader cries out
[_agent,"attack",0,false] call dayz_zombieSpeak;
@@ -45,7 +45,7 @@ while {_isAlive and _isSomeone} do {
_agent forceSpeed 8;
sleep 1;
};
//LOOP
//LOOP
_agent setVariable ["targets",[],true];
_isAlive = alive _agent;
sleep 1;

View File

@@ -4,8 +4,10 @@ scriptName "Functions\misc\fn_damageActions.sqf";
- Function
- [] call fnc_usec_damageActions;
************************************************************/
private ["_weaponName","_action","_turret","_weapons","_assignedRole","_action1","_action2","_x","_vehicle","_unit","_vehType","_displayName","_ammoQty","_ammoSerial","_weapon","_magTypes","_type","_typeVeh","_index","_inventory","_unitTo","_isEngineer","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_charID","_friendlies","_playerMagazines","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_hasToolbox","_hasJerry","_hasJerryE","_hasEtool","_hasWire","_hasPainkillers","_unconscious_crew","_patients","_crew","_menClose","_hasPatient","_inVehicle","_isClose","_bag","_classbag","_isDisallowRefuel","_hasBarrel","_hasBarrelE"];
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
_menClose = cursorTarget;
_hasPatient = alive _menClose;
_vehicle = vehicle player;

View File

@@ -4,38 +4,24 @@ scriptName "Functions\misc\fn_selfActions.sqf";
- Function
- [] call fnc_usec_selfActions;
************************************************************/
private ["_isPZombie","_vehicle","_inVehicle","_bag","_classbag","_isWater","_hasAntiB","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip"];
private ["_temp_keys","_magazinesPlayer","_isPZombie","_vehicle","_inVehicle","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip","_playersNear","_findNearestGens","_findNearestGen","_IsNearRunningGen","_cursorTarget","_isnewstorage","_itemsPlayer","_ownerKeyId","_typeOfCursorTarget","_hasKey","_oldOwner","_combi","_key_colors"];
if (TradeInprogress) exitWith {}; // Do not allow if any script is running.
_vehicle = vehicle player;
_isPZombie = player isKindOf "PZombie_VB";
_inVehicle = (_vehicle != player);
_bag = unitBackpack player;
_classbag = typeOf _bag;
_isWater = (surfaceIsWater (position player)) or dayz_isSwimming;
_hasAntiB = "ItemAntibiotic" in magazines player;
_hasFuelE = "ItemJerrycanEmpty" in magazines player;
//boiled Water
_hasbottleitem = "ItemWaterbottle" in magazines player;
_hastinitem = false;
{
if (_x in magazines player) then {
_hastinitem = true;
};
} forEach boil_tin_cans;
_hasKnife = "ItemKnife" in items player;
_hasToolbox = "ItemToolbox" in items player;
//_hasTent = "ItemTent" in items player;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
_nearLight = nearestObject [player,"LitObject"];
_canPickLight = false;
if (!isNull _nearLight) then {
if (_nearLight distance player < 4) then {
_canPickLight = isNull (_nearLight getVariable ["owner",objNull]);
};
};
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
//Grab Flare
if (_canPickLight and !dayz_hasLight and !_isPZombie) then {
@@ -53,35 +39,28 @@ if (_canPickLight and !dayz_hasLight and !_isPZombie) then {
if(DZEdebug) then {
hint str(typeOf cursorTarget);
if (s_player_debuglootpos < 0) then {
s_player_debuglootpos = player addAction ["Save to arma2.rpt", "\z\addons\dayz_code\actions\debug\Make_lootPos.sqf", ["save"], 99, false, true, "",""];
};
};
if(_isPZombie) then {
//_state = animationState player;
//hint str(_state);
if (s_player_callzombies < 0) then {
s_player_callzombies = player addAction ["Raise Horde", "\z\addons\dayz_code\actions\call_zombies.sqf",player, 5, true, false, "",""];
};
if (s_player_pzombiesattack < 0) then {
s_player_pzombiesattack = player addAction ["Attack", "\z\addons\dayz_code\actions\pzombie\pz_attack.sqf",cursorTarget, 6, true, false, "",""];
};
if (s_player_pzombiesvision < 0) then {
s_player_pzombiesvision = player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 4, false, true, "nightVision", "_this == _target"];
s_player_pzombiesvision = player addAction ["Night Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 4, false, true, "nightVision", "_this == _target"];
};
if (!isNull cursorTarget and (player distance cursorTarget < 3)) then { //Has some kind of target
_isAnimal = cursorTarget isKindOf "Animal";
_isZombie = cursorTarget isKindOf "zZombie_base";
_isHarvested = cursorTarget getVariable["meatHarvested",false];
_isMan = cursorTarget isKindOf "Man";
// Pzombie Gut human corpse or animal
if (!alive cursorTarget and (_isAnimal or _isMan) and !_isZombie and !_isHarvested and _canDo) then {
if (!alive cursorTarget and (_isAnimal or _isMan) and !_isZombie and !_isHarvested) then {
if (s_player_pzombiesfeed < 0) then {
s_player_pzombiesfeed = player addAction ["Feed", "\z\addons\dayz_code\actions\pzombie\pz_feed.sqf",cursorTarget, 3, true, false, "",""];
};
@@ -103,78 +82,110 @@ if(_isAir or _isShip) then {
_allowedDistance = 6;
};
if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cursorTarget < _allowedDistance)) then { //Has some kind of target
_isHarvested = cursorTarget getVariable["meatHarvested",false];
_isVehicle = cursorTarget isKindOf "AllVehicles";
_isVehicletype = typeOf cursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"];
_isnewstorage = typeOf cursorTarget in ["OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"];
if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cursorTarget < _allowedDistance) and _canDo) then { //Has some kind of target
_isMan = cursorTarget isKindOf "Man";
_traderType = typeOf cursorTarget;
_ownerID = cursorTarget getVariable ["characterID","0"];
_isAnimal = cursorTarget isKindOf "Animal";
_isDog = (cursorTarget isKindOf "DZ_Pastor" || cursorTarget isKindOf "DZ_Fin");
_isZombie = cursorTarget isKindOf "zZombie_base";
_isDestructable = cursorTarget isKindOf "BuiltItems";
_isWreck = typeOf cursorTarget in ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
_isRemovable = typeOf cursorTarget in ["Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ"];
_isDisallowRepair = typeOf cursorTarget in ["M240Nest_DZ"];
// set cursortarget to variable
_cursorTarget = cursorTarget;
// get typeof cursortarget once
_typeOfCursorTarget = typeOf _cursorTarget;
_isTent = cursorTarget isKindOf "TentStorage";
_isFuel = false;
_isAlive = alive cursorTarget;
_canmove = canmove cursorTarget;
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
_isVehicle = _cursorTarget isKindOf "AllVehicles";
_isVehicletype = _typeOfCursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"];
_isnewstorage = _typeOfCursorTarget in ["VaultStorage","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"];
// get items and magazines only once
_magazinesPlayer = magazines player;
//boiled Water
_hasbottleitem = "ItemWaterbottle" in _magazinesPlayer;
_hastinitem = false;
{
if (_x in _magazinesPlayer) then {
_hastinitem = true;
};
} forEach boil_tin_cans;
_hasFuelE = "ItemJerrycanEmpty" in _magazinesPlayer;
_itemsPlayer = items player;
_temp_keys = [];
// find available keys
_key_colors = ["ItemKeyYellow","ItemKeyBlue","ItemKeyRed","ItemKeyGreen","ItemKeyBlack"];
{
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) in _key_colors) then {
_ownerKeyId = getNumber(configFile >> "CfgWeapons" >> _x >> "keyid");
_temp_keys set [count _temp_keys,str(_ownerKeyId)];
};
} forEach _itemsPlayer;
_hasKnife = "ItemKnife" in _itemsPlayer;
_hasToolbox = "ItemToolbox" in _itemsPlayer;
_isMan = _cursorTarget isKindOf "Man";
_traderType = _typeOfCursorTarget;
_ownerID = _cursorTarget getVariable ["characterID","0"];
_isAnimal = _cursorTarget isKindOf "Animal";
_isDog = (_cursorTarget isKindOf "DZ_Pastor" || _cursorTarget isKindOf "DZ_Fin");
_isZombie = _cursorTarget isKindOf "zZombie_base";
_isDestructable = _cursorTarget isKindOf "BuiltItems";
_isWreck = _typeOfCursorTarget in ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
_isRemovable = _typeOfCursorTarget in ["Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","SandNest_DZ"];
_isDisallowRepair = _typeOfCursorTarget in ["M240Nest_DZ"];
_isTent = _cursorTarget isKindOf "TentStorage";
_isAlive = alive _cursorTarget;
_canmove = canmove _cursorTarget;
_text = getText (configFile >> "CfgVehicles" >> _typeOfCursorTarget >> "displayName");
_rawmeat = meatraw;
_hasRawMeat = false;
{
if (_x in magazines player) then {
if (_x in _magazinesPlayer) then {
_hasRawMeat = true;
};
} forEach _rawmeat;
if (_hasFuelE and dayz_oldrefuel) then {
_isFuel = ((typeOf cursorTarget) in dayz_fuelsources);
_isFuel = false;
if (_hasFuelE) then {
_isFuel = (_typeOfCursorTarget in dayz_fuelsources);
};
// diag_log ("OWNERID = " + _ownerID + " CHARID = " + dayz_characterID + " " + str(_ownerID == dayz_characterID));
//Allow player to delete objects
if((_isDestructable or _isWreck or (_isRemovable and ("ItemCrowbar" in items player))) and _hasToolbox and _canDo) then {
if((_isDestructable or _isWreck or (_isRemovable and ("ItemCrowbar" in _itemsPlayer))) and _hasToolbox) then {
if (s_player_deleteBuild < 0) then {
s_player_deleteBuild = player addAction [format[localize "str_actions_delete",_text], "\z\addons\dayz_code\actions\remove.sqf",cursorTarget, 1, true, true, "", ""];
s_player_deleteBuild = player addAction [format[localize "str_actions_delete",_text], "\z\addons\dayz_code\actions\remove.sqf",_cursorTarget, 1, true, true, "", ""];
};
} else {
player removeAction s_player_deleteBuild;
s_player_deleteBuild = -1;
};
// Allow Owner to lock and unlock vehicle
if(_isVehicle and !_isMan and _canDo and _ownerID != "0") then {
if(_isVehicle and !_isMan and _ownerID != "0") then {
if (s_player_lockUnlock_crtl < 0) then {
if(locked cursorTarget) then {
if(_ownerID == dayz_playerUID) then {
_Unlock = player addAction [format["Unlock %1",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",cursorTarget, 2, true, true, "", ""];
_hasKey = _ownerID in _temp_keys;
_oldOwner = (_ownerID == dayz_playerUID);
if(locked _cursorTarget) then {
if(_hasKey or _oldOwner) then {
_Unlock = player addAction [format["Unlock %1",_text], "\z\addons\dayz_code\actions\unlock_veh.sqf",_cursorTarget, 2, true, true, "", ""];
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1;
} else {
_Unlock = player addAction ["<t color='#ff0000'>Vehicle Locked</t>", "",cursorTarget, 2, true, true, "", ""];
_Unlock = player addAction ["<t color='#ff0000'>Vehicle Locked</t>", "",_cursorTarget, 2, true, true, "", ""];
s_player_lockunlock set [count s_player_lockunlock,_Unlock];
s_player_lockUnlock_crtl = 1;
};
} else {
if(_ownerID == dayz_playerUID) then {
_lock = player addAction [format["Lock %1",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",cursorTarget, 1, true, true, "", ""];
if(_hasKey or _oldOwner) then {
_lock = player addAction [format["Lock %1",_text], "\z\addons\dayz_code\actions\lock_veh.sqf",_cursorTarget, 1, true, true, "", ""];
s_player_lockunlock set [count s_player_lockunlock,_lock];
s_player_lockUnlock_crtl = 1;
};
};
};
} else {
@@ -184,9 +195,9 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
/*
//Allow player to force save
if((_isVehicle or _isTent) and _canDo and !_isMan) then {
if((_isVehicle or _isTent) and !_isMan) then {
if (s_player_forceSave < 0) then {
s_player_forceSave = player addAction [format[localize "str_actions_save",_text], "\z\addons\dayz_code\actions\forcesave.sqf",cursorTarget, 1, true, true, "", ""];
s_player_forceSave = player addAction [format[localize "str_actions_save",_text], "\z\addons\dayz_code\actions\forcesave.sqf",_cursorTarget, 1, true, true, "", ""];
};
} else {
player removeAction s_player_forceSave;
@@ -194,72 +205,75 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
};
*/
if((_isVehicle or _isTent or (cursorTarget isKindOf "VaultStorage") or _isnewstorage) and _isAlive and _canDo and !_isMan) then {
if((_isVehicle or _isTent or _isnewstorage) and _isAlive and !_isMan) then {
if (s_player_checkGear < 0) then {
s_player_checkGear = player addAction ["Cargo Check", "\z\addons\dayz_code\actions\cargocheck.sqf",cursorTarget, 1, true, true, "", ""];
s_player_checkGear = player addAction ["Cargo Check", "\z\addons\dayz_code\actions\cargocheck.sqf",_cursorTarget, 1, true, true, "", ""];
};
} else {
player removeAction s_player_checkGear;
s_player_checkGear = -1;
};
//flip vehicle
if ((_isVehicletype) and !_canmove and _isAlive and (player distance cursorTarget >= 2) and (count (crew cursorTarget))== 0 and ((vectorUp cursorTarget) select 2) < 0.5) then {
if (s_player_flipveh < 0) then {
s_player_flipveh = player addAction [format[localize "str_actions_flipveh",_text], "\z\addons\dayz_code\actions\player_flipvehicle.sqf",cursorTarget, 1, true, true, "", ""];
};
//flip vehicle small vehicles by your self and all other vehicles with help nearby
if (_isVehicle and !_canmove and _isAlive and (player distance _cursorTarget >= 2) and (count (crew _cursorTarget))== 0 and ((vectorUp _cursorTarget) select 2) < 0.5) then {
_playersNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]);
if(_isVehicletype or (_playersNear >= 2)) then {
if (s_player_flipveh < 0) then {
s_player_flipveh = player addAction [format[localize "str_actions_flipveh",_text], "\z\addons\dayz_code\actions\player_flipvehicle.sqf",_cursorTarget, 1, true, true, "", ""];
};
};
} else {
player removeAction s_player_flipveh;
s_player_flipveh = -1;
};
//Allow player to fill jerrycan
if(dayz_oldrefuel) then {
if(_hasFuelE and _isFuel and _canDo) then {
if (s_player_fillfuel < 0) then {
s_player_fillfuel = player addAction [localize "str_actions_self_10", "\z\addons\dayz_code\actions\jerry_fill.sqf",[], 1, false, true, "", ""];
};
} else {
player removeAction s_player_fillfuel;
s_player_fillfuel = -1;
if(_hasFuelE and _isFuel) then {
if (s_player_fillfuel < 0) then {
s_player_fillfuel = player addAction [localize "str_actions_self_10", "\z\addons\dayz_code\actions\jerry_fill.sqf",[], 1, false, true, "", ""];
};
} else {
player removeAction s_player_fillfuel;
s_player_fillfuel = -1;
};
// Human Gut animal or zombie
if (!alive cursorTarget and (_isAnimal or _isZombie) and _hasKnife and !_isHarvested and _canDo) then {
if (s_player_butcher < 0) then {
if (!alive _cursorTarget and (_isAnimal or _isZombie) and _hasKnife) then {
_isHarvested = _cursorTarget getVariable["meatHarvested",false];
if (s_player_butcher < 0 and !_isHarvested) then {
if(_isZombie) then {
s_player_butcher = player addAction ["Gut Zombie", "\z\addons\dayz_code\actions\gather_zparts.sqf",cursorTarget, 3, true, true, "", ""];
s_player_butcher = player addAction ["Gut Zombie", "\z\addons\dayz_code\actions\gather_zparts.sqf",_cursorTarget, 3, true, true, "", ""];
} else {
s_player_butcher = player addAction [localize "str_actions_self_04", "\z\addons\dayz_code\actions\gather_meat.sqf",cursorTarget, 3, true, true, "", ""];
s_player_butcher = player addAction [localize "str_actions_self_04", "\z\addons\dayz_code\actions\gather_meat.sqf",_cursorTarget, 3, true, true, "", ""];
};
};
} else {
player removeAction s_player_butcher;
s_player_butcher = -1;
};
//Fireplace Actions check
if (inflamed cursorTarget and _hasRawMeat and _canDo) then {
if (inflamed _cursorTarget and _hasRawMeat) then {
if (s_player_cook < 0) then {
s_player_cook = player addAction [localize "str_actions_self_05", "\z\addons\dayz_code\actions\cook.sqf",cursorTarget, 3, true, true, "", ""];
s_player_cook = player addAction [localize "str_actions_self_05", "\z\addons\dayz_code\actions\cook.sqf",_cursorTarget, 3, true, true, "", ""];
};
} else {
player removeAction s_player_cook;
s_player_cook = -1;
};
if (inflamed cursorTarget and (_hasbottleitem and _hastinitem) and _canDo) then {
if (inflamed _cursorTarget and (_hasbottleitem and _hastinitem)) then {
if (s_player_boil < 0) then {
s_player_boil = player addAction [localize "str_actions_boilwater", "\z\addons\dayz_code\actions\boil.sqf",cursorTarget, 3, true, true, "", ""];
s_player_boil = player addAction [localize "str_actions_boilwater", "\z\addons\dayz_code\actions\boil.sqf",_cursorTarget, 3, true, true, "", ""];
};
} else {
player removeAction s_player_boil;
s_player_boil = -1;
};
if(cursorTarget == dayz_hasFire and _canDo) then {
if ((s_player_fireout < 0) and !(inflamed cursorTarget) and (player distance cursorTarget < 3)) then {
s_player_fireout = player addAction [localize "str_actions_self_06", "\z\addons\dayz_code\actions\fire_pack.sqf",cursorTarget, 0, false, true, "",""];
if(_cursorTarget == dayz_hasFire) then {
if ((s_player_fireout < 0) and !(inflamed _cursorTarget) and (player distance _cursorTarget < 3)) then {
s_player_fireout = player addAction [localize "str_actions_self_06", "\z\addons\dayz_code\actions\fire_pack.sqf",_cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_fireout;
@@ -267,9 +281,9 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
};
//Packing my tent
if(cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
if ((s_player_packtent < 0) and (player distance cursorTarget < 3)) then {
s_player_packtent = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",cursorTarget, 0, false, true, "",""];
if(_cursorTarget isKindOf "TentStorage" and _ownerID == dayz_characterID) then {
if ((s_player_packtent < 0) and (player distance _cursorTarget < 3)) then {
s_player_packtent = player addAction [localize "str_actions_self_07", "\z\addons\dayz_code\actions\tent_pack.sqf",_cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_packtent;
@@ -277,23 +291,39 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
};
//Allow owner to unlock vault
if(cursorTarget isKindOf "VaultStorageLocked" and _canDo and _ownerID != "0" and _ownerID == dayz_playerUID and !UnlockInprogress) then {
if (s_player_unlockvault < 0 and (player distance cursorTarget < 3)) then {
s_player_unlockvault = player addAction ["Unlock Safe", "\z\addons\dayz_code\actions\vault_unlock.sqf",cursorTarget, 0, false, true, "",""];
if((_typeOfCursorTarget == "VaultStorageLocked" or _typeOfCursorTarget == "VaultStorage") and _ownerID != "0" and (player distance _cursorTarget < 3)) then {
if (s_player_unlockvault < 0) then {
if(_typeOfCursorTarget == "VaultStorageLocked") then {
if(_ownerID == dayz_combination or _ownerID == dayz_playerUID) then {
_combi = player addAction ["Open Safe", "\z\addons\dayz_code\actions\vault_unlock.sqf",_cursorTarget, 0, false, true, "",""];
} else {
_combi = player addAction ["Unlock Safe", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
};
s_player_combi set [count s_player_combi,_combi];
s_player_unlockvault = 1;
} else {
if(_ownerID != dayz_combination and _ownerID != dayz_playerUID) then {
_combi = player addAction ["Enter Combo", "\z\addons\dayz_code\actions\vault_combination_1.sqf",_cursorTarget, 0, false, true, "",""];
s_player_combi set [count s_player_combi,_combi];
s_player_unlockvault = 1;
};
};
};
} else {
player removeAction s_player_unlockvault;
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
s_player_unlockvault = -1;
};
//Allow owner to pack vault
if(cursorTarget isKindOf "VaultStorage" and _canDo and _ownerID != "0" and _ownerID == dayz_playerUID and (player distance cursorTarget < 3)) then {
if(_typeOfCursorTarget == "VaultStorage" and _ownerID != "0" and (player distance _cursorTarget < 3)) then {
if (s_player_lockvault < 0) then {
s_player_lockvault = player addAction ["Lock Safe", "\z\addons\dayz_code\actions\vault_lock.sqf",cursorTarget, 0, false, true, "",""];
if(_ownerID == dayz_combination or _ownerID == dayz_playerUID) then {
s_player_lockvault = player addAction ["Lock Safe", "\z\addons\dayz_code\actions\vault_lock.sqf",_cursorTarget, 0, false, true, "",""];
};
};
if (s_player_packvault < 0) then {
s_player_packvault = player addAction ["<t color='#ff0000'>Pack Safe</t>", "\z\addons\dayz_code\actions\vault_pack.sqf",cursorTarget, 0, false, true, "",""];
if (s_player_packvault < 0 and (_ownerID == dayz_combination or _ownerID == dayz_playerUID)) then {
s_player_packvault = player addAction ["<t color='#ff0000'>Pack Safe</t>", "\z\addons\dayz_code\actions\vault_pack.sqf",_cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_packvault;
@@ -305,8 +335,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
//Player Deaths
if(cursorTarget isKindOf "Info_Board_EP1" and _canDo) then {
if ((s_player_information < 0) and (player distance cursorTarget < 3)) then {
if(_typeOfCursorTarget == "Info_Board_EP1") then {
if ((s_player_information < 0) and (player distance _cursorTarget < 3)) then {
s_player_information = player addAction ["Recent Deaths", "\z\addons\dayz_code\actions\list_playerDeaths.sqf",[], 0, false, true, "",""];
};
} else {
@@ -315,8 +345,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
};
//Fuel Pump
if((typeOf cursorTarget) in dayz_fuelpumparray and _canDo) then {
if ((s_player_fuelauto < 0) and (player distance cursorTarget < 3)) then {
if(_typeOfCursorTarget in dayz_fuelpumparray) then {
if ((s_player_fuelauto < 0) and (player distance _cursorTarget < 3)) then {
// check if Generator_DZ is running within 30 meters
_findNearestGens = nearestObjects [player, ["Generator_DZ"], 30];
@@ -341,19 +371,19 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
};
//Start Generator
if(cursorTarget isKindOf "Generator_DZ" and _canDo) then {
if ((s_player_fillgen < 0) and (player distance cursorTarget < 3)) then {
if(_cursorTarget isKindOf "Generator_DZ") then {
if ((s_player_fillgen < 0) and (player distance _cursorTarget < 3)) then {
// check if not running
if((cursorTarget getVariable ["GeneratorRunning", false])) then {
s_player_fillgen = player addAction ["Stop Generator", "\z\addons\dayz_code\actions\stopGenerator.sqf",cursorTarget, 0, false, true, "",""];
if((_cursorTarget getVariable ["GeneratorRunning", false])) then {
s_player_fillgen = player addAction ["Stop Generator", "\z\addons\dayz_code\actions\stopGenerator.sqf",_cursorTarget, 0, false, true, "",""];
} else {
// check if not filled and player has jerry.
if((cursorTarget getVariable ["GeneratorFilled", false])) then {
s_player_fillgen = player addAction ["Start Generator", "\z\addons\dayz_code\actions\fill_startGenerator.sqf",cursorTarget, 0, false, true, "",""];
if((_cursorTarget getVariable ["GeneratorFilled", false])) then {
s_player_fillgen = player addAction ["Start Generator", "\z\addons\dayz_code\actions\fill_startGenerator.sqf",_cursorTarget, 0, false, true, "",""];
} else {
if("ItemJerrycan" in magazines player) then {
s_player_fillgen = player addAction ["Fill and Start Generator", "\z\addons\dayz_code\actions\fill_startGenerator.sqf",cursorTarget, 0, false, true, "",""];
if("ItemJerrycan" in _magazinesPlayer) then {
s_player_fillgen = player addAction ["Fill and Start Generator", "\z\addons\dayz_code\actions\fill_startGenerator.sqf",_cursorTarget, 0, false, true, "",""];
};
};
};
@@ -371,82 +401,52 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
// Allow auto fill
//Sleep
if(cursorTarget isKindOf "TentStorage" and _canDo and _ownerID == dayz_characterID) then {
if ((s_player_sleep < 0) and (player distance cursorTarget < 3)) then {
s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",cursorTarget, 0, false, true, "",""];
if(_cursorTarget isKindOf "TentStorage" and _ownerID == dayz_characterID) then {
if ((s_player_sleep < 0) and (player distance _cursorTarget < 3)) then {
s_player_sleep = player addAction [localize "str_actions_self_sleep", "\z\addons\dayz_code\actions\player_sleep.sqf",_cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_sleep;
s_player_sleep = -1;
};
//Repairing Vehicles
if ((dayz_myCursorTarget != cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage cursorTarget < 1) and !_isDisallowRepair) then {
if ((dayz_myCursorTarget != _cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage _cursorTarget < 1) and !_isDisallowRepair) then {
if (s_player_repair_crtl < 0) then {
_vehicle = cursorTarget;
dayz_myCursorTarget = _vehicle;
_menu = dayz_myCursorTarget addAction ["Repair Vehicle", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_vehicle, 0, true, false, "",""];
_menu1 = dayz_myCursorTarget addAction ["Salvage Vehicle", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_vehicle, 0, true, false, "",""];
dayz_myCursorTarget = _cursorTarget;
_menu = dayz_myCursorTarget addAction ["Repair Vehicle", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false, "",""];
_menu1 = dayz_myCursorTarget addAction ["Salvage Vehicle", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false, "",""];
s_player_repairActions set [count s_player_repairActions,_menu];
s_player_repairActions set [count s_player_repairActions,_menu1];
s_player_repair_crtl = 1;
} else {
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
s_player_repair_crtl = -1;
};
};
_humanity = player getVariable ["humanity",0];
// All Traders
if (_isMan and !_isPZombie and _traderType in serverTraders) then {
if (s_player_parts_crtl < 0) then {
//diag_log ("TRADER = " + str(serverTraders));
// get humanity
_humanity = player getVariable ["humanity",0];
_traderMenu = call compile format["menu_%1;",_traderType];
diag_log ("TRADER = " + str(_traderMenu));
// diag_log ("TRADER = " + str(_traderMenu));
_low_high = "low";
_humanity_logic = false;
if((_traderMenu select 2) == "friendly") then {
//_low_high = "low";
if (_humanity < -2000) then {
_humanity_logic = true;
};
_humanity_logic = (_humanity < -2000);
};
if((_traderMenu select 2) == "hostile") then {
_low_high = "high";
if (_humanity > -2000) then {
_humanity_logic = true;
};
_humanity_logic = (_humanity > -2000);
};
if((_traderMenu select 2) == "hero") then {
//_low_high = "low";
if (_humanity < 5000) then {
_humanity_logic = true;
};
_humanity_logic = (_humanity < 5000);
};
if(_humanity_logic) then {
_cancel = player addAction [format["Your humanity is too %1 this trader refuses to talk to you.",_low_high], "\z\addons\dayz_code\actions\trade_cancel.sqf",["na"], 0, true, false, "",""];
@@ -471,9 +471,6 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
s_player_parts set [count s_player_parts,_metals_trader];
};
s_player_parts_crtl = 1;
};
@@ -482,13 +479,9 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
s_player_parts_crtl = -1;
};
if (_isMan and !_isAlive and !_isZombie) then {
if (s_player_studybody < 0) then {
s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",cursorTarget, 0, false, true, "",""];
s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",_cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_studybody;
@@ -496,79 +489,79 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
};
if(dayz_tameDogs) then {
//Dog
if (_isDog and _isAlive and (_hasRawMeat) and _canDo and _ownerID == "0" and player getVariable ["dogID", 0] == 0) then {
if (_isDog and _isAlive and (_hasRawMeat) and _ownerID == "0" and player getVariable ["dogID", 0] == 0) then {
if (s_player_tamedog < 0) then {
s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\tame_dog.sqf", cursorTarget, 1, false, true, "", ""];
s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\tame_dog.sqf", _cursorTarget, 1, false, true, "", ""];
};
} else {
player removeAction s_player_tamedog;
s_player_tamedog = -1;
};
if (_isDog and _ownerID == dayz_characterID and _isAlive) then {
_dogHandle = player getVariable ["dogID", 0];
if (s_player_feeddog < 0 and _hasRawMeat) then {
s_player_feeddog = player addAction [localize "str_actions_feeddog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,0], 0, false, true,"",""];
};
if (s_player_waterdog < 0 and "ItemWaterbottle" in _magazinesPlayer) then {
s_player_waterdog = player addAction [localize "str_actions_waterdog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,1], 0, false, true,"",""];
};
if (s_player_staydog < 0) then {
_lieDown = _dogHandle getFSMVariable "_actionLieDown";
if (_lieDown) then { _text = "str_actions_liedog"; } else { _text = "str_actions_sitdog"; };
s_player_staydog = player addAction [localize _text,"\z\addons\dayz_code\actions\dog\stay.sqf", _dogHandle, 5, false, true,"",""];
};
if (s_player_trackdog < 0) then {
s_player_trackdog = player addAction [localize "str_actions_trackdog","\z\addons\dayz_code\actions\dog\track.sqf", _dogHandle, 4, false, true,"",""];
};
if (s_player_barkdog < 0) then {
s_player_barkdog = player addAction [localize "str_actions_barkdog","\z\addons\dayz_code\actions\dog\speak.sqf", _cursorTarget, 3, false, true,"",""];
};
if (s_player_warndog < 0) then {
_warn = _dogHandle getFSMVariable "_watchDog";
if (_warn) then { _text = "Quiet"; _warn = false; } else { _text = "Alert"; _warn = true; };
s_player_warndog = player addAction [format[localize "str_actions_warndog",_text],"\z\addons\dayz_code\actions\dog\warn.sqf",[_dogHandle, _warn], 2, false, true,"",""];
};
if (s_player_followdog < 0) then {
s_player_followdog = player addAction [localize "str_actions_followdog","\z\addons\dayz_code\actions\dog\follow.sqf",[_dogHandle,true], 6, false, true,"",""];
};
} else {
player removeAction s_player_feeddog;
s_player_feeddog = -1;
player removeAction s_player_waterdog;
s_player_waterdog = -1;
player removeAction s_player_staydog;
s_player_staydog = -1;
player removeAction s_player_trackdog;
s_player_trackdog = -1;
player removeAction s_player_barkdog;
s_player_barkdog = -1;
player removeAction s_player_warndog;
s_player_warndog = -1;
player removeAction s_player_followdog;
s_player_followdog = -1;
};
};
if (_isDog and _ownerID == dayz_characterID and _isAlive and _canDo) then {
_dogHandle = player getVariable ["dogID", 0];
if (s_player_feeddog < 0 and _hasRawMeat) then {
s_player_feeddog = player addAction [localize "str_actions_feeddog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,0], 0, false, true,"",""];
};
if (s_player_waterdog < 0 and "ItemWaterbottle" in magazines player) then {
s_player_waterdog = player addAction [localize "str_actions_waterdog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,1], 0, false, true,"",""];
};
if (s_player_staydog < 0) then {
_lieDown = _dogHandle getFSMVariable "_actionLieDown";
if (_lieDown) then { _text = "str_actions_liedog"; } else { _text = "str_actions_sitdog"; };
s_player_staydog = player addAction [localize _text,"\z\addons\dayz_code\actions\dog\stay.sqf", _dogHandle, 5, false, true,"",""];
};
if (s_player_trackdog < 0) then {
s_player_trackdog = player addAction [localize "str_actions_trackdog","\z\addons\dayz_code\actions\dog\track.sqf", _dogHandle, 4, false, true,"",""];
};
if (s_player_barkdog < 0) then {
s_player_barkdog = player addAction [localize "str_actions_barkdog","\z\addons\dayz_code\actions\dog\speak.sqf", cursorTarget, 3, false, true,"",""];
};
if (s_player_warndog < 0) then {
_warn = _dogHandle getFSMVariable "_watchDog";
if (_warn) then { _text = "Quiet"; _warn = false; } else { _text = "Alert"; _warn = true; };
s_player_warndog = player addAction [format[localize "str_actions_warndog",_text],"\z\addons\dayz_code\actions\dog\warn.sqf",[_dogHandle, _warn], 2, false, true,"",""];
};
if (s_player_followdog < 0) then {
s_player_followdog = player addAction [localize "str_actions_followdog","\z\addons\dayz_code\actions\dog\follow.sqf",[_dogHandle,true], 6, false, true,"",""];
};
} else {
player removeAction s_player_feeddog;
s_player_feeddog = -1;
player removeAction s_player_waterdog;
s_player_waterdog = -1;
player removeAction s_player_staydog;
s_player_staydog = -1;
player removeAction s_player_trackdog;
s_player_trackdog = -1;
player removeAction s_player_barkdog;
s_player_barkdog = -1;
player removeAction s_player_warndog;
s_player_warndog = -1;
player removeAction s_player_followdog;
s_player_followdog = -1;
};
} else {
//Engineering
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;s_player_repairActions = [];
s_player_repair_crtl = -1;
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
dayz_myCursorTarget = objNull;
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
s_player_parts_crtl = -1;
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = -1;
player removeAction s_player_checkGear;
s_player_checkGear = -1;
s_player_parts_crtl = -1;
// lock unlock vehicles
s_player_lockUnlock_crtl = -1;
//Others
player removeAction s_player_forceSave;
s_player_forceSave = -1;
@@ -610,7 +603,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
player removeAction s_player_followdog;
s_player_followdog = -1;
// vault
// vault
player removeAction s_player_unlockvault;
s_player_unlockvault = -1;
player removeAction s_player_packvault;
@@ -622,6 +615,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
s_player_information = -1;
player removeAction s_player_fillgen;
s_player_fillgen = -1;
player removeAction s_player_fuelauto;
s_player_fuelauto = -1;
};

View File

@@ -18,6 +18,8 @@ if (local _zombiebody) then {
publicVariable "dayzHideBody"; // remote player
sleep 5;
deleteVehicle _body;
// Give small humanity increase after body is removed
[player,1] call player_humanityChange;
true;
};

View File

@@ -39,7 +39,7 @@ if (_ammo isKindOf "SmokeShell") then {
_i = _i + 1;
} forEach _listTalk;
} else {
_id = [_unit,_distance,true,(getPosATL player)] spawn player_alertZombies;
[_unit,_distance,true,(getPosATL player)] spawn player_alertZombies;
//Check if need to place arrow
if (_ammo isKindOf "Bolt") then {
_id = _this spawn player_crossbowBolt;

View File

@@ -1,32 +1,44 @@
/*
[_obj] spawn player_unlockVault;
Lock Safe - DayZ Epoch - [VB]AWOL
*/
private["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_bag","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"];
private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_alreadyPacking"];
if(TradeInprogress) exitWith { cutText ["Lock already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
_obj = _this;
// Silently exit if object no longer exists
if(isNull _obj) exitWith { TradeInprogress = false; };
_ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
player playActionNow "Medic";
player removeAction s_player_lockvault;
s_player_lockvault = -1;
s_player_lockvault = 1;
if(_ownerID == dayz_playerUID) then {
_alreadyPacking = _obj getVariable["packing",0];
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText ["You cannot lock this Safe, you do not know the combination", "PLAIN DOWN"]; };
if (_alreadyPacking == 1) exitWith {cutText ["That Safe is already being locked." , "PLAIN DOWN"]};
_alreadyPacking = _obj getVariable["packing",0];
_obj setVariable["packing",1];
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_lockvault = -1; cutText ["That Safe is already being locked." , "PLAIN DOWN"]};
_dir = direction _obj;
// _pos = getposATL _obj;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
[player,"tentpack",0,false] call dayz_zombieSpeak;
sleep 3;
_obj setVariable["packing",1];
_dir = direction _obj;
// _pos = getposATL _obj;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
[player,"tentpack",0,false] call dayz_zombieSpeak;
sleep 3;
if(!isNull _obj) then {
// force vault save just before locking
dayzUpdateVehicle = [_obj,"gear"];
publicVariableServer "dayzUpdateVehicle";
//place tent (local)
_holder = createVehicle ["VaultStorageLocked",_pos,[], 0, "CAN_COLLIDE"];
@@ -58,7 +70,7 @@ if(_ownerID == dayz_playerUID) then {
};
cutText ["Your Safe has been locked", "PLAIN DOWN"];
} else {
cutText ["You cannot lock this Safe, it is not yours", "PLAIN DOWN"];
s_player_lockvault = -1;
};
TradeInprogress = false;

View File

@@ -2,6 +2,10 @@
[_obj] spawn player_packTent;
*/
private["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_object","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr"];
if(TradeInprogress) exitWith { cutText ["Pack tent already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
_obj = _this;
_ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","0"];
@@ -9,77 +13,78 @@ _objectUID = _obj getVariable["ObjectUID","0"];
player playActionNow "Medic";
player removeAction s_player_packtent;
s_player_packtent = 1;
if(_ownerID != dayz_characterID) exitWith {TradeInprogress = false; s_player_packtent = -1; cutText [localize "str_fail_tent_pack", "PLAIN DOWN"];};
_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_packtent = -1; cutText [format[(localize "str_player_beingpacked")] , "PLAIN DOWN"]};
_obj setVariable["packing",1];
_dir = direction _obj;
_pos = getposATL _obj;
_dis=20;
_sfx = "tentpack";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 3;
_classname = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "create");
_location = _pos;
//place tent (local)
//_bag = createVehicle ["WeaponHolder_ItemTent",_pos,[], 0, "CAN_COLLIDE"];
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
_object setdir _dir;
player reveal _object;
_holder = "WeaponHolder" createVehicle _pos;
_weapons = getWeaponCargo _obj;
_magazines = getMagazineCargo _obj;
_backpacks = getBackpackCargo _obj;
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
if (isServer) then {
dayzDeleteObj call server_deleteObj;
};
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;
if(_ownerID == dayz_characterID) then {
_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {cutText [format[(localize "str_player_beingpacked")] , "PLAIN DOWN"]};
_obj setVariable["packing",1];
_dir = direction _obj;
_pos = getposATL _obj;
_dis=20;
_sfx = "tentpack";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 3;
_classname = getText (configFile >> "CfgVehicles" >> (typeOf _obj) >> "create");
_location = _pos;
//place tent (local)
//_bag = createVehicle ["WeaponHolder_ItemTent",_pos,[], 0, "CAN_COLLIDE"];
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
_object setdir _dir;
player reveal _object;
_holder = "WeaponHolder" createVehicle _pos;
_weapons = getWeaponCargo _obj;
_magazines = getMagazineCargo _obj;
_backpacks = getBackpackCargo _obj;
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
if (isServer) then {
dayzDeleteObj call server_deleteObj;
};
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"];
} else {
cutText [localize "str_fail_tent_pack", "PLAIN DOWN"];
};
TradeInprogress = false;

View File

@@ -7,6 +7,10 @@ if(TradeInprogress) exitWith { cutText ["That Safe is already being packed." , "
TradeInprogress = true;
_obj = _this;
// Silently exit if object no longer exists
if(isNull _obj) exitWith { TradeInprogress = false; };
_ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
@@ -14,30 +18,34 @@ _objectUID = _obj getVariable["ObjectUID","0"];
player removeAction s_player_packvault;
s_player_packvault = 1;
if(_ownerID == dayz_playerUID) then {
_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {cutText ["That Safe is already being packed." , "PLAIN DOWN"]};
_obj setVariable["packing",1];
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith { TradeInprogress = false; s_player_packvault = -1; cutText ["You cannot pack this Safe, you do not know the combination.", "PLAIN DOWN"];};
cutText ["Packing Safe move from this position to cancel within 5 seconds.", "PLAIN DOWN"];
sleep 1;
_location1 = getPosATL player;
sleep 5;
_location2 = getPosATL player;
if(_location1 distance _location2 > 0.1) exitWith {
cutText ["Packing Safe canceled." , "PLAIN DOWN"];
_obj setVariable["packing",0];
};
_alreadyPacking = _obj getVariable["packing",0];
player playActionNow "Medic";
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_packvault = -1; cutText ["That Safe is already being packed." , "PLAIN DOWN"]};
_obj setVariable["packing",1];
_dir = direction _obj;
cutText ["Packing Safe move from this position to cancel within 5 seconds.", "PLAIN DOWN"];
sleep 1;
_location1 = getPosATL player;
sleep 5;
_location2 = getPosATL player;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
if(_location1 distance _location2 > 0.1) exitWith {
cutText ["Packing Safe canceled." , "PLAIN DOWN"];
_obj setVariable["packing",0];
};
player playActionNow "Medic";
_dir = direction _obj;
[player,"tentpack",0,false] call dayz_zombieSpeak;
sleep 3;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
[player,"tentpack",0,false] call dayz_zombieSpeak;
sleep 3;
if(!isNull _obj) then {
//place tent (local)
_bag = createVehicle ["WeaponHolder_ItemVault",_pos,[], 0, "CAN_COLLIDE"];
@@ -89,10 +97,7 @@ if(_ownerID == dayz_playerUID) then {
cutText ["Your Safe has been packed", "PLAIN DOWN"];
} else {
cutText ["You cannot pack this Safe, it is not yours", "PLAIN DOWN"];
s_player_packvault = -1;
};
s_player_packvault = -1;
TradeInprogress = false;

View File

@@ -30,4 +30,4 @@ if (_ammo isKindOf "RoadFlare") then {
};
};
_id = [_unit,_distance,false,_endPos] spawn player_alertZombies;
[_unit,_distance,false,_endPos] spawn player_alertZombies;

View File

@@ -1,85 +1,98 @@
/*
[_obj] spawn player_unlockVault;
*/
private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_allowunlock","_alreadyPacking"];
private ["_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_alreadyPacking"];
if(TradeInprogress) exitWith { cutText ["Unlock already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
{player removeAction _x} forEach s_player_combi;s_player_combi = [];
s_player_unlockvault = 1;
_obj = _this;
// Silently exit if object no longer exists
if(isNull _obj) exitWith { TradeInprogress = false; };
_ownerID = _obj getVariable["CharacterID","0"];
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
player playActionNow "Medic";
player removeAction s_player_unlockvault;
s_player_unlockvault = 1;
_alreadyPacking = _obj getVariable["packing",0];
UnlockInprogress = true;
if (_alreadyPacking == 1) exitWith {TradeInprogress = false; s_player_unlockvault = -1; cutText ["That Safe is already being unlocked." , "PLAIN DOWN"]};
if (_ownerID == dayz_playerUID) then {
_alreadyPacking = _obj getVariable["packing",0];
if (_alreadyPacking == 1) exitWith {cutText ["That Safe is already being unlocked." , "PLAIN DOWN"]};
// Promt user for password if _ownerID != dayz_playerUID
if ((_ownerID == dayz_combination) or (_ownerID == dayz_playerUID)) then {
_obj setVariable["packing",1];
_dir = direction _obj;
// _pos = getposATL _obj;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
player playActionNow "Medic";
//player playActionNow "Medic";
sleep 1;
[player,"tentpack",0,false] call dayz_zombieSpeak;
sleep 5;
//place tent (local)
_holder = createVehicle ["VaultStorage",_pos,[], 0, "CAN_COLLIDE"];
_holder setdir _dir;
_holder setpos _pos;
player reveal _holder;
_holder setVariable["CharacterID",_ownerID,true];
_holder setVariable["ObjectID",_objectID,true];
_holder setVariable["ObjectUID",_objectUID,true];
_holder setVariable ["OEMPos", _pos, true];
if(!isNull _obj) then {
_weapons = _obj getVariable["WeaponCargo",[]];
_magazines = _obj getVariable["MagazineCargo",[]];
_backpacks = _obj getVariable["BackpackCargo",[]];
//place tent (local)
_holder = createVehicle ["VaultStorage",_pos,[], 0, "CAN_COLLIDE"];
_holder setdir _dir;
_holder setpos _pos;
player reveal _holder;
// Remove locked vault
deleteVehicle _obj;
_holder setVariable["CharacterID",_ownerID,true];
_holder setVariable["ObjectID",_objectID,true];
_holder setVariable["ObjectUID",_objectUID,true];
_holder setVariable ["OEMPos", _pos, true];
if (count _weapons > 0) then {
//Add weapons
_objWpnTypes = _weapons select 0;
_objWpnQty = _weapons select 1;
_countr = 0;
{
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
};
_weapons = _obj getVariable["WeaponCargo",[]];
_magazines = _obj getVariable["MagazineCargo",[]];
_backpacks = _obj getVariable["BackpackCargo",[]];
if (count _magazines > 0) then {
//Add Magazines
_objWpnTypes = _magazines select 0;
_objWpnQty = _magazines select 1;
_countr = 0;
{
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
};
// Remove locked vault
deleteVehicle _obj;
if (count _backpacks > 0) then {
//Add Backpacks
_objWpnTypes = _backpacks select 0;
_objWpnQty = _backpacks select 1;
_countr = 0;
{
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
};
if (count _weapons > 0) then {
//Add weapons
_objWpnTypes = _weapons select 0;
_objWpnQty = _weapons select 1;
_countr = 0;
{
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
};
cutText ["Safe has been unlocked.", "PLAIN DOWN"];
if (count _magazines > 0) then {
//Add Magazines
_objWpnTypes = _magazines select 0;
_objWpnQty = _magazines select 1;
_countr = 0;
{
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
};
if (count _backpacks > 0) then {
//Add Backpacks
_objWpnTypes = _backpacks select 0;
_objWpnQty = _backpacks select 1;
_countr = 0;
{
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} forEach _objWpnTypes;
};
cutText ["Safe has been unlocked.", "PLAIN DOWN"];
};
} else {
player playActionNow "Medic";
sleep 3;
@@ -88,6 +101,5 @@ if (_ownerID == dayz_playerUID) then {
sleep 5;
cutText ["Combination incorrect, Safe is still locked.", "PLAIN DOWN"];
};
s_player_unlockvault = -1;
UnlockInprogress = false;
TradeInprogress = false;

View File

@@ -156,7 +156,7 @@ if ((count _updates > 0 or _isNewMed) and _characterID != "0") then {
if (count _playerPos > 0) then {
_array = [];
{
if (_x > -20000 and _x < 20000) then {
if (_x > dayz_minpos and _x < dayz_maxpos) then {
_array set [count _array,_x];
};
} forEach (_playerPos select 1);

View File

@@ -40,7 +40,7 @@ class CfgMods
hidePicture = 0;
hideName = 0;
action = "http://www.dayzepoch.com";
version = "1.0.0.8";
version = "1.0.0.9";
hiveVersion = 0.96; //0.93
};
};
@@ -487,7 +487,7 @@ class CfgBuildingLoot {
lootPos[] = {};
itemType[] = {
{ "ItemSodaMdew","magazine" },
{ "ItemSodaRbull","magazine" },
{ "ItemSodaR4z0r","magazine" },
{ "ItemWatch","generic" },
{ "ItemCompass","generic" },
{ "ItemMap","weapon" },
@@ -554,7 +554,7 @@ class CfgBuildingLoot {
0.03,
0.01,
0.08,
0.03,
0.03
};
};
class Office: Residential {
@@ -624,7 +624,8 @@ class CfgBuildingLoot {
{ "WeaponHolder_ItemHatchet","object" },
{ "MR43","weapon" },
{ "WeaponHolder_ItemFuelBarrel","object" },
{"WeaponHolder_ItemMachete", "object"}
{ "WeaponHolder_ItemMachete", "object"},
{ "ItemFishingPole","weapon" }
};
itemChance[] = {
0.06,
@@ -638,7 +639,8 @@ class CfgBuildingLoot {
0.17,
0.06,
0.005,
0.03
0.03,
0.01
};
};
class Supermarket: Default {
@@ -2983,5 +2985,11 @@ class HeliCrash_No50s: Default {
class land_cihlovej_dum_mini: Residential {
lootPos[] = {{-2.4646,-0.78418,-2.86942},{-1.75586,2.88525,-2.86942},{2.76587,2.08154,-2.86942},{1.96265,-1.98877,-2.86942},{0.0109863,0.876465,-2.86942},{0.116455,3.05762,-2.86942}};
};
class Land_hruzdum: Residential {
lootPos[] = {{-0.108887,3.56494,1.59321},{-1.80371,0.838867,1.5932},{2.34106,3.8335,-1.16265},{0.032959,-1.2998,-1.16266},{-0.655273,2.18311,-1.16266},{-2.53687,-1.29932,-4.73357},{-1.63599,3.06152,-4.73357},{1.83984,2.125,-4.73357}};
};
class Land_cihlovej_dum_in: Residential {
lootPos[] = {{-0.0117188,0.0441895,-1.81473},{-1.76758,2.24805,-1.8147},{-2.88965,-1.64795,-1.8147},{1.84277,-2.07983,-1.81471},{1.58691,-1.3374,-5.27588},{1.22852,2.57324,-5.27588}};
};
};

View File

@@ -21,25 +21,25 @@ if (!isDedicated) then {
player_animalCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_animalCheck.sqf";
player_spawnCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnCheck.sqf";
player_dumpBackpack = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_dumpBackpack.sqf";
player_spawnLootCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnlootCheck.sqf";
player_spawnZedCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnzedCheck.sqf";
// player_spawnLootCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnlootCheck.sqf";
// player_spawnZedCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_spawnzedCheck.sqf";
building_spawnLoot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnLoot.sqf";
player_taskHint = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_taskHint.sqf";
// player_taskHint = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_taskHint.sqf";
building_spawnZombies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\building_spawnZombies.sqf";
//animal_monitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\animal_monitor.sqf";
building_monitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\building_monitor.sqf";
// building_monitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\building_monitor.sqf";
player_fired = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_fired.sqf"; //Runs when player fires. Alerts nearby Zeds depending on calibre and audial rating
player_packTent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packTent.sqf";
player_packVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_packVault.sqf";
player_unlockVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_unlockVault.sqf";
player_lockVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_lockVault.sqf";
control_zombieAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\control_zombieAgent.sqf";
// control_zombieAgent = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\control_zombieAgent.sqf";
player_updateGui = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.sqf";
player_crossbowBolt = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_crossbowBolt.sqf";
spawn_flies = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_flies.sqf";
stream_locationFill = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationFill.sqf";
stream_locationDel = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationDel.sqf";
stream_locationCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationCheck.sqf";
// stream_locationFill = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationFill.sqf";
// stream_locationDel = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationDel.sqf";
// stream_locationCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\stream_locationCheck.sqf";
player_music = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_music.sqf"; //Used to generate ambient music
player_login = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_login.sqf"; //Used to generate ambient music
player_death = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_death.sqf";
@@ -121,7 +121,7 @@ if (!isDedicated) then {
_display = uiNameSpace getVariable "BIS_loadingScreen";
_control1 = _display displayctrl 8400;
_control2 = _display displayctrl 102;
// 40 sec timeout
// 40 sec timeout
while { _timeOut < 400 && !dayz_clientPreload } do {
if ( isNull _display ) then {
waitUntil { !dialog; };
@@ -418,14 +418,14 @@ if (!isDedicated) then {
fnc_buildWeightedArray = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_buildWeightedArray.sqf"; //Checks which actions for nearby casualty
fnc_usec_damageVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandlerVehicle.sqf"; //Event handler run on damage
zombie_initialize = compile preprocessFileLineNumbers "\z\addons\dayz_code\init\zombie_init.sqf";
object_vehicleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_vehicleKilled.sqf"; //Event handler run on damage
// object_vehicleKilled = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_vehicleKilled.sqf"; //Event handler run on damage
object_setHitServer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setHitServer.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
object_setFixServer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setFixServer.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
object_getHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_getHit.sqf"; //gets the hit value for a HitPoint (i.e. HitLegs) against the selection (i.e. "legs"), returns the value
object_setHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_setHit.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
object_processHit = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_processHit.sqf"; //process the hit in the REVO damage system (records and sets hit)
object_delLocal = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_delLocal.sqf";
object_cargoCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_cargoCheck.sqf"; //Run by the player or server to monitor changes in cargo contents
// object_cargoCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\object_cargoCheck.sqf"; //Run by the player or server to monitor changes in cargo contents
fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf"; //Event handler run on damage
// Vehicle damage fix
vehicle_handleDamage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\vehicle_handleDamage.sqf";
@@ -453,7 +453,7 @@ if (!isDedicated) then {
world_isDay = {if ((daytime < (24 - dayz_sunRise)) and (daytime > dayz_sunRise)) then {true} else {false}};
player_humanityChange = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_humanityChange.sqf";
spawn_loot = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\spawn_loot.sqf";
player_projectileNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
// player_projectileNear = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_projectileNear.sqf";
player_sumMedical = {
private["_character","_wounds","_legs","_arms","_medical"];

View File

@@ -140,6 +140,7 @@ boil_tin_cans = [
"ItemSodaRabbitEmpty"
];
dayz_combination = "";
dayz_combatLog = "";
canRoll = true;
@@ -234,6 +235,7 @@ s_player_repairActions = [];
// Custom
s_player_madsci = [];
s_player_parts = [];
s_player_combi = [];
//Initialize Medical Variables
r_interrupt = false;
@@ -343,6 +345,7 @@ dayz_zombieTargetList = [
dayzHit = [];
dayzPublishObj = []; //used for eventhandler to spawn a mirror of players tent
dayzHideBody = objNull;
dayz_selectedVault = objNull;
dayzPublishVeh = []; // for vehicle traders
dayzTradeObject = []; // For all traders increment qty
@@ -377,18 +380,24 @@ if(isNil "DZEdebug") then {
if(isNil "dayz_tameDogs") then {
dayz_tameDogs = false;
};
if(isNil "dayz_sellDistance") then {
dayz_sellDistance = 20;
};
if(isNil "dayz_paraSpawn") then {
dayz_paraSpawn = false;
};
if(isNil "dayz_oldrefuel") then {
dayz_oldrefuel = false;
if(isNil "dayz_minpos") then {
dayz_minpos = -20000;
};
if(isNil "dayz_maxpos") then {
dayz_maxpos = 20000;
};
// update objects
dayz_updateObjects = ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage","M240Nest_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"];
dayz_disallowedVault = ["TentStorage", "BuiltItems"];
dayz_reveal = ["AllVehicles","WeaponHolder","TentStorage","VaultStorage","VaultStorageLocked","BuiltItems"];
dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_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"];
dayz_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_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"];
// These work with just a running generator
dayz_fuelpumparray = ["FuelPump_DZ","Land_A_FuelStation_Feed","Land_Ind_FuelStation_Feed_EP1","Land_FuelStation_Feed_PMC","FuelStation","Land_ibr_FuelStation_Feed","Land_fuelstation_army","Land_fuelstation","land_fuelstation_w","Land_benzina_schnell"];
@@ -490,7 +499,6 @@ if(!isDedicated) then {
dayz_Magazines = [];
dayzGearSave = false;
dayz_unsaved = false;
UnlockInprogress = false;
TradeInprogress = false;
dayz_scaleLight = 0;
dayzDebug = false;

View File

@@ -15,6 +15,14 @@ class RscProgress;
class RscProgressNotFreeze;
class RscButtonTextOnly;
class RscIGUIListBox;
class CA_Black_Back;
class RscMapControl;
class IGUIBack;
class RscHTML;
class RscObject;
class RscDisplayGetReady;
class RscListBox;
class RscDisplayLoading
{
class Variants
@@ -137,7 +145,7 @@ class RscDisplayMain : RscStandardDisplay
class DAYZ_Version : CA_Version
{
idc = -1;
text = "DayZ Epoch 1.0.0.8 dev (1.7.6.1)";
text = "DayZ Epoch 1.0.0.9 dev (1.7.6.1)";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
};
delete CA_TitleMainMenu;
@@ -183,6 +191,489 @@ class RscDisplayMain : RscStandardDisplay
};
};
};
class RscDisplayMainMap {
saveParams = 1;
class controlsBackground {
class Map {};
class CA_Black : CA_Black_Back {};
class CA_Map : RscMapControl {
x = "SafeZoneXAbs";
y = "SafeZoneY";
w = "SafeZoneWAbs";
h = "SafeZoneH";
};
};
class controls {
class DiaryIndex {};
class DiaryAdd {};
class DiarySort {};
class DiaryFilter {};
class Diary {};
class CA_MainBackground : IGUIBack {
idc = 1020;
x = "SafeZoneX + 0.010 * SafeZoneW";
y = "SafeZoneY + 0.031";
w = "0.98*SafeZoneW";
h = 0.082;
colorbackground[] = {0.1961, 0.1451, 0.0941, 0.85};
};
class CA_TopicsBackground : IGUIBack {
idc = 1021;
x = "0.010*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.117";
w = "0.146*SafeZoneW";
h = 0.53;
colorbackground[] = {0.1961, 0.1451, 0.0941, 0.85};
};
class CA_SubTopicsBackground : IGUIBack {
idc = 1022;
x = "0.16*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.117";
w = "0.283*SafeZoneW";
h = 0.53;
colorbackground[] = {0.1961, 0.1451, 0.0941, 0.85};
};
class CA_ContentBackground : IGUIBack {
idc = 1023;
x = "0.446*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.117";
w = "SafeZoneW * 0.544";
h = 0.832;
colorbackground[] = {0.1961, 0.1451, 0.0941, 0.85};
};
delete CA_PlayerName;
delete CA_PlayerRank;
class CA_MissionName : RscText {
idc = 112;
style = 1;
x = "0.02*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.033";
w = "0.96 * SafeZoneW";
h = 0.041;
sizeEx = 0.034;
colorText[] = {0.95, 0.95, 0.95, 1};
text = $STR_DIARY_MISSION_NAME;
};
delete CA_CurrentTaskLabel;
delete CA_CurrentTask;
class DiaryList : RscIGUIListBox {
idc = 1001;
onLBSelChanged = "[_this select 0, _this select 1, 'List'] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts\Client\GUI\GUI_logEH.sqf'; private ['_dummy']; _dummy = [_this,'onLBSelChanged'] call compile preprocessfile '\ca\ui\scripts\server_interface.sqf';";
default = 1;
x = "0.010*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.137";
w = "0.146*SafeZoneW";
h = 0.6;
};
class CA_DiaryIndex : RscIGUIListBox {
idc = 1002;
onLBSelChanged = "[_this select 0, _this select 1, 'Index'] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts\Client\GUI\GUI_logEH.sqf';";
default = 0;
x = "0.16*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.137";
w = "0.283*SafeZoneW";
h = 0.6;
sizeEx = 0.034;
};
class CA_DiaryGroup : RscControlsGroup {
idc = 1013;
x = "0.446*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.137";
w = "0.534*SafeZoneW";
h = 0.718;
class VScrollbar {
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
color[] = {1, 1, 1, 1};
width = 0.01;
};
class HScrollbar {
color[] = {1, 1, 1, 0};
height = 0.001;
};
class Controls {
class CA_Diary : RscHTML {
idc = 1003;
cycleLinks = 0;
cycleAllLinks = 0;
default = 0;
x = "0.01*SafeZoneW";
y = 0.0;
w = "0.514*SafeZoneW";
h = 1.807;
colorText[] = {0.95, 0.95, 0.95, 1};
class H1 {
font = "Zeppelin32";
fontBold = "Zeppelin32";
sizeEx = 0.034;
};
class P {
font = "Zeppelin32";
fontBold = "Zeppelin32";
sizeEx = 0.034;
};
};
};
};
class HC_tooltip_back : IGUIBack {
idc = 1124;
x = 0.0;
y = 0.0;
w = 0.0;
h = 0.0;
colorBackground[] = {0.2, 0.15, 0.1, 0.8};
};
class HC_tooltip_text : RscStructuredText {
idc = 1125;
x = 0.0;
y = 0.0;
w = 0.0;
h = 0.0;
size = 0.035;
class Attributes {
font = "Zeppelin32";
color = "#B6F862";
align = "left";
shadow = true;
};
};
};
class objects {
class Watch : RscObject {
model = "\ca\ui\Watch.p3d";
x = 0.08;
xBack = 0.4;
y = 0.925;
yBack = 0.5;
z = 0.21;
zBack = 0.11;
enableZoom = 1;
direction[] = {0, 1, 7.2};
up[] = {0, 0, -1};
scale = 0.4;
};
class Compass : RscObject {
model = "\ca\ui\Compass.p3d";
selectionArrow = "";
x = 0.16;
xBack = 0.6;
y = 0.925;
yBack = 0.5;
z = 0.2;
zBack = 0.1;
enableZoom = 1;
direction[] = {1, 0, 0};
up[] = {0, 1, 0};
scale = 0.35;
};
class GPS : RscObject {
model = "\ca\ui\gps.p3d";
x = 0.36;
xBack = 0.7;
y = 0.925;
yBack = 0.5;
z = 0.22;
zBack = 0.12;
scale = 0.3;
class Areas {
class Display {
class controls {
class GPSSquare : RscText {
idc = 75;
x = 0;
y = 0.56;
w = 1;
h = 0.5;
colorText[] = {0.2314, 0.2588, 0.1373, 1.0};
sizeEx = 0.4;
};
class GPS_ALT : RscText {
idc = 77;
x = 0.25;
y = 0.31;
w = 1;
h = 0.3;
colorText[] = {0.2314, 0.2588, 0.1373, 1.0};
sizeEx = 0.23;
};
class GPS_Heading : RscText {
idc = 78;
x = 0.25;
y = 0.073;
w = 1;
h = 0.3;
colorText[] = {0.2314, 0.2588, 0.1373, 1.0};
sizeEx = 0.23;
};
};
};
};
};
class WalkieTalkie : RscObject {
model = "\ca\ui\radio.p3d";
x = 0.56;
xBack = 0.8;
y = 0.925;
yBack = 0.5;
z = 0.22;
zBack = 0.12;
scale = 0.15;
class Areas {
class Papir {
class controls {
class RscRadioText : RscActiveText {
sizeEx = 0.17;
x = 0.005;
y = 0.02;
h = 0.1;
};
class RadioAlpha : RscRadioText {
y = 0.05;
};
class RadioBravo : RscRadioText {
y = 0.17;
};
class RadioCharlie : RscRadioText {
y = 0.29;
};
class RadioDelta : RscRadioText {
y = 0.41;
};
class RadioEcho : RscRadioText {
y = 0.53;
};
class RadioFoxtrot : RscRadioText {
y = 0.65;
};
class RadioGolf : RscRadioText {
y = 0.77;
};
class RadioHotel : RscRadioText {
y = 0.89;
};
class RadioIndia : RscRadioText {
y = 1.01;
};
class RadioJuliet : RscRadioText {
y = 1.13;
};
};
};
};
};
};
};
class RscDisplayClientGetReady : RscDisplayGetReady {
onload = "private ['_dummy']; _dummy = [_this,'onload'] call compile preprocessfile '\ca\ui\scripts\server_interface.sqf';";
color0[] = {0.4, 0.4, 0.4, 1};
color1[] = {1, 0.6, 0, 1};
color2[] = {0.1961, 0.1451, 0.0941, 1.0};
class controls {
class B_Cancel {};
class B_Continue {};
class PlayersTitle : RscText {
x = -2;
y = -2;
};
class Players : RscListBox {
x = -2;
y = -2;
};
class CA_MainBackground : IGUIBack {
idc = 1020;
x = "SafeZoneX + 0.010 * SafeZoneW";
y = "SafeZoneY + 0.031";
w = "0.98*SafeZoneW";
h = 0.082;
colorbackground[] = {0.1961, 0.1451, 0.0941, 0.85};
};
class CA_TopicsBackground : IGUIBack {
idc = 1021;
x = "0.010*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.117";
w = "0.146*SafeZoneW";
h = 0.53;
colorbackground[] = {0.1961, 0.1451, 0.0941, 0.85};
};
class CA_SubTopicsBackground : IGUIBack {
idc = 1022;
x = "0.16*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.117";
w = "0.283*SafeZoneW";
h = 0.53;
colorbackground[] = {0.1961, 0.1451, 0.0941, 0.85};
};
class CA_ContentBackground : IGUIBack {
idc = 1023;
x = "0.446*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.117";
w = "SafeZoneW * 0.544";
h = 0.832;
colorbackground[] = {0.1961, 0.1451, 0.0941, 0.85};
};
delete CA_PlayerName;
delete CA_PlayerRank;
class CA_MissionName : RscText {
idc = 112;
style = 1;
x = "0.02*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.033";
w = "0.96 * SafeZoneW";
h = 0.041;
sizeEx = 0.034;
colorText[] = {0.95, 0.95, 0.95, 1};
text = $STR_DIARY_MISSION_NAME;
};
delete CA_CurrentTaskLabel;
delete CA_CurrentTask;
class DiaryList : RscIGUIListBox {
idc = 1001;
onLBSelChanged = "[_this select 0, _this select 1, 'List'] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts\Client\GUI\GUI_logEH.sqf'; private ['_dummy']; _dummy = [_this,'onLBSelChanged'] call compile preprocessfile '\ca\ui\scripts\server_interface.sqf';";
default = 1;
x = "0.010*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.137";
w = "0.146*SafeZoneW";
h = 0.6;
};
class CA_DiaryIndex : RscIGUIListBox {
idc = 1002;
onLBSelChanged = "[_this select 0, _this select 1, 'Index'] call compile preprocessFileLineNumbers 'ca\Warfare2\Scripts\Client\GUI\GUI_logEH.sqf';";
default = 0;
x = "0.16*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.137";
w = "0.283*SafeZoneW";
h = 0.6;
sizeEx = 0.034;
};
class CA_DiaryGroup : RscControlsGroup {
idc = 1013;
x = "0.446*SafeZoneW + SafeZoneX";
y = "SafeZoneY + 0.137";
w = "0.534*SafeZoneW";
h = 0.718;
class VScrollbar {
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
color[] = {1, 1, 1, 1};
width = 0.01;
};
class HScrollbar {
color[] = {1, 1, 1, 0};
height = 0.001;
};
class Controls {
class CA_Diary : RscHTML {
idc = 1003;
cycleLinks = 0;
cycleAllLinks = 0;
default = 0;
x = "0.01*SafeZoneW";
y = 0.0;
w = "0.514*SafeZoneW";
h = 1.807;
colorText[] = {0.95, 0.95, 0.95, 1};
class H1 {
font = "Zeppelin32";
fontBold = "Zeppelin32";
sizeEx = 0.034;
};
class P {
font = "Zeppelin32";
fontBold = "Zeppelin32";
sizeEx = 0.034;
};
};
};
};
class CA_ButtonsBackground : IGUIBack {
idc = 1026;
x = "0.010*SafeZoneW + SafeZoneX";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.887)";
w = "SafeZoneW * 0.98";
h = 0.082;
colorbackground[] = {0.1961, 0.1451, 0.0941, 0.85};
};
class ButtonCancel : RscIGUIShortcutButton {
idc = 2;
shortcuts[] = {0x00050000 + 1};
x = "0.031 + SafeZoneX";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.908)";
text = $STR_DISP_CANCEL;
};
class ButtonContinue : ButtonCancel {
idc = 1;
shortcuts[] = {0x00050000 + 8};
x = "((SafeZoneW + SafeZoneX) - (1 - 0.788))";
text = $STR_DISP_CONTINUE;
};
};
};
//Remove Diary
class RscDisplayDiary {
idd = 129;
@@ -196,6 +687,9 @@ class RscDisplayDiary {
delete DiaryPage;
delete DiaryTitle;
delete DiaryBackground;
delete CA_PlayerName;
delete CA_CurrentTaskLabel;
delete CA_CurrentTask;
};
};
@@ -358,14 +852,16 @@ class RscDisplayGear
y = -0.00102941;
text = "Gear";
};
class Unit_Title: RscText
{
class Unit_Title : RscText {
idc = 101;
style = 2;
x = 0.502419;
y = 0.0492156;
w = 0.456;
x = 0;
y = 0;
w = 0;
text = "";
};
class Available_items_Text: RscText
{
idc = 156;

View File

@@ -24,7 +24,7 @@ item19[] = {"ERROR__Wrong_HIVE",2,250,175.000000,350.000000,275.000000,400.00000
item20[] = {"Hive_Ok",4,218,-175.000000,400.000000,-75.000000,450.000000,0.000000,"Hive" \n "Ok"};
item21[] = {"Phase_One",2,250,-75.000000,450.000000,25.000000,500.000000,0.000000,"Phase One"};
item22[] = {"Response",4,218,-175.000000,500.000000,-75.000000,550.000000,0.000000,"Response"};
item23[] = {"Phase_Two",2,250,-75.000000,550.000000,25.000000,600.000000,0.000000,"Phase Two"};
item23[] = {"Phase_Two",2,4346,-75.000000,550.000000,25.000000,600.000000,0.000000,"Phase Two"};
item24[] = {"Dead_Player",4,218,50.000000,550.000000,150.000000,600.000000,0.000000,"Dead" \n "Player"};
item25[] = {"ERROR__Player_Already",2,250,175.000000,550.000000,275.000000,600.000000,0.000000,"ERROR:" \n "Player Already" \n "Dead"};
item26[] = {"Alive",4,218,-175.000000,600.000000,-75.000000,650.000000,0.000000,"Alive"};
@@ -36,7 +36,7 @@ item31[] = {"ERROR__Bad_Versi",2,250,175.000000,650.000000,275.000000,700.000000
item32[] = {"Display_Ready",4,218,-175.000000,900.000000,-75.000000,950.000000,0.000000,"Display" \n "Ready"};
item33[] = {"Preload_Display",2,250,-75.000000,950.000000,25.000000,1000.000000,0.000000,"Preload" \n "Display"};
item34[] = {"Preload_Done",4,218,-175.000000,1000.000000,-75.000000,1050.000000,0.000000,"Preload" \n "Done"};
item35[] = {"Initialize",2,4346,-75.000000,1050.000000,25.000000,1100.000000,0.000000,"Initialize"};
item35[] = {"Initialize",2,250,-75.000000,1050.000000,25.000000,1100.000000,0.000000,"Initialize"};
item36[] = {"Finish",1,250,-75.000000,1150.000000,25.000000,1200.000000,0.000000,"Finish"};
item37[] = {"True",8,218,25.000000,1100.000000,125.000000,1150.000000,0.000000,"True"};
item38[] = {"Too_Long",4,218,300.000000,150.000000,400.000000,200.000000,0.000000,"Too" \n "Long"};
@@ -119,8 +119,8 @@ link59[] = {51,52};
link60[] = {52,29};
link61[] = {53,54};
link62[] = {54,20};
globals[] = {25.000000,1,0,0,0,640,480,1,85,6316128,1,-390.091248,277.974548,1208.543457,428.837982,567,630,1};
window[] = {2,-1,-1,-1,-1,760,22,993,0,3,585};
globals[] = {25.000000,1,0,0,0,640,480,1,85,6316128,1,-452.194977,340.078094,1506.747437,277.117401,566,880,1};
window[] = {2,-1,-1,-1,-1,760,28,999,0,3,584};
*//*%FSM</HEAD>*/
class FSM
{
@@ -723,10 +723,21 @@ class FSM
" //player is new, add initial loadout" \n
" _config = (configFile >> ""CfgSurvival"" >> ""Inventory"" >> ""Default"");" \n
" _mags = getArray (_config >> ""magazines"");" \n
" _wpns = getArray (_config >> ""weapons"");" \n
" _wpns = getArray (_config >> ""weapons""); " \n
" _bcpk = getText (_config >> ""backpack"");" \n
" _bcpkWpn = getText (_config >> ""backpackWeapon"");" \n
" " \n
" if(!isNil ""DefaultMagazines"") then {" \n
" _mags = DefaultMagazines;" \n
" };" \n
" if(!isNil ""DefaultWeapons"") then {" \n
" _wpns = DefaultWeapons;" \n
" };" \n
" if(!isNil ""DefaultBackpack"") then {" \n
" _bcpk = DefaultBackpack;" \n
" };" \n
" if(!isNil ""DefaultBackpackWeapon"") then {" \n
" _bcpkWpn = DefaultBackpackWeapon;" \n
" };" \n
" //Add inventory" \n
" {" \n
" _isOK = isClass(configFile >> ""CfgMagazines"" >> _x);" \n
@@ -988,6 +999,9 @@ class FSM
"if (player hasWeapon ""MeleeMachete"") then {" \n
" player addMagazine 'machete_swing';" \n
"};" \n
"if (player hasWeapon ""MeleeFishingPole"") then {" \n
" player addMagazine 'Fishing_Swing';" \n
"};" \n
"" \n
"reload player;" \n
"" \n