0.981 + 1.7.6.1 CE

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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