1.0.0.5 Developer Build

+ [ADDED] Added 4 more new military skins as rare drops on
militaryclothes:
(FR_OHara_DZ,FR_Rodriguez_DZ,CZ_Soldier_Sniper_EP1_DZ,Graves_Light_DZ)
Picture. Left to right. http://i.imgur.com/HlE4o2R.jpg
+ [CHANGED] You can now only sell vehicles to the trader if they are
between 75% and 100% health.
+ [ADDED] Added generator as build-able and now can be started with one
20 liter Jerrycan and runs until server restart.
+ [CHANGED] Lowered building preview time from 50 seconds to 15.
+ [ADDED] First release of PHP tool to help config traders.
+ [ADDED] Player Zombie vision.
+ [CHANGED] You must now be the owner of a plot or a friend of an owner
to build.
+ [CHANGED] When removing base building elements and not the owner or
friend removal counter is doubled.
+ [FIXED] Potential fix for shifting position of mg nest.
+ [ADDED] New sniper rifle SCAR_H_LNG_Sniper_SD (ammo:
20Rnd_762x51_SB_SCAR) added to MassGrave loot tables.
+ [ADDED] New Machine Gun Pecheneg_DZ to MilitarySpecial loot tables and
to traders. (ammo:100Rnd_762x54_PK)
+ [ADDED] New SMG: Sa61_EP1 (ammo: 20Rnd_B_765x17_Ball), UZI_SD_EP1
(ammo: 30Rnd_9x19_UZI_SD) added to traders and Military loot tables.
+ [ADDED] New Pistol added to traders and loot tables
MassGrave,DynamicDebrisMilitary, and Residential : MakarovSD (ammo:
8Rnd_9x18_MakarovSD)
+ [ADDED] Bikeys Added for playwith versions of taviana, namalsk, celle,
lingor.
+ [INFO] Attention server owners should change @tavi_DayZ_Epoch folder
on the server to @taviana and your players can then connect and install
automatically with play.withsix.com with the above mentioned bikeys.
This commit is contained in:
vbawol
2013-04-23 15:59:55 -05:00
parent d4c65ad07b
commit 9e4ea22120
23 changed files with 571 additions and 135 deletions

View File

@@ -0,0 +1,66 @@
private ["_vehicle","_started","_finished","_animState","_isMedic"];
if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN DOWN"] };
TradeInprogress = true;
// Use target from addaction
_vehicle = _this select 3;
// force animation
player playActionNow "Medic";
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;
_finished = false;
cutText ["Preparing to fuel and start generator, move to cancel.", "PLAIN DOWN"];
[player,50,true,(getPosATL player)] spawn player_alertZombies;
while {r_doLoop} do {
_animState = animationState player;
_isMedic = ["medic",_animState] call fnc_inString;
if (_isMedic) then {
_started = true;
};
if (_started and !_isMedic) then {
r_doLoop = false;
_finished = true;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;
if(!_finished) then {
r_interrupt = false;
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
cutText ["Canceled refuel." , "PLAIN DOWN"]
};
if (_finished) then {
// take jerry can and replace with empty
if(([player,"ItemJerrycan"] call BIS_fnc_invRemove) == 1) then {
player addMagazine "ItemJerrycanEmpty";
// Start generator
_vehicle setVariable ["GeneratorRunning", true,true];
// Sound_Generator1
// Looks like this was the entended way of making the sound, lets test
_classname = "Sound_Generator1";
_location = (getPosATL _vehicle);
_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
// TODO: Add running sounds to generator
cutText ["Generator has been started.", "PLAIN DOWN"];
};
};
TradeInprogress = false;

View File

@@ -7,6 +7,7 @@ _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animati
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
_cancel = false;
_reason = "";
_canBuildOnPlot = false;
call gear_ui_init;
@@ -14,9 +15,6 @@ if(_isWater) exitWith {TradeInprogress = false; cutText [localize "str_player_26
if(_onLadder) exitWith {TradeInprogress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["Cannot build while in combat.", "PLAIN DOWN"];};
_item = _this;
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
_require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
@@ -24,13 +22,56 @@ _require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >>
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
// Allow building of plot
if(_classname == "Plastic_Pole_EP1_DZ") then {
_IsNearPlot = 1;
// check for near plot
_findNearestPole = [player, ["Plastic_Pole_EP1_DZ"], 30];
_IsNearPlot = count (_findNearestPole);
if(_IsNearPlot == 0) then {
// Allow building of plot
if(_classname == "Plastic_Pole_EP1_DZ") then {
if(count ([player, ["Plastic_Pole_EP1_DZ"], 60]) == 0) then {
_canBuildOnPlot = true;
};
};
} else {
_IsNearPlot = count (position player nearObjects ["Plastic_Pole_EP1_DZ",30]);
// Since there are plots nearby we check for ownership and then for friend status
// select closest pole
_nearestPole = _findNearestPole select 0;
// Find owner
_ownerID = _nearestPole getVariable["CharacterID","0"];
// check if friendly to owner
if(dayz_characterID == _ownerID) then {
// owner can build anything within his plot
if(_classname == "Plastic_Pole_EP1_DZ") then {
if(count ([player, ["Plastic_Pole_EP1_DZ"], 30]) == 0) then {
_canBuildOnPlot = true;
};
} else {
_canBuildOnPlot = true;
};
} else {
// not the owner so check if user is friendly to owner.
_friendlies = player getVariable ["friendlies",[]];
// check if friendly to owner
if(_ownerID in _friendlies) then {
if(_classname != "Plastic_Pole_EP1_DZ") then {
_canBuildOnPlot = true;
};
};
};
};
if(_IsNearPlot == 0) exitWith { TradeInprogress = false; cutText ["Building requires plot within 30m" , "PLAIN DOWN"]; };
if(!_canBuildOnPlot) exitWith { TradeInprogress = false; cutText ["Building requires plot within 30m" , "PLAIN DOWN"]; };
_missing = "";
_hasrequireditem = true;

View File

@@ -6,7 +6,12 @@ _id = _this select 2;
_gen removeAction _id;
_NV = player getvariable "NV";
// get first rbg + m
_NV1 = player getvariable ["NV1",[1.8,-1.5,-0.5,0]];
_NV2 = player getvariable ["NV2",[2.4,0.6,0.3,-0.3]];
_NV3 = player getvariable ["NV3",[-0.6,0.8,0.3,0.6]];
_NV = player getvariable ["NV", ["OFF", 0.1]];
_NVOn = (_NV select 0);
_OldAperture = (_NV select 1);
@@ -17,22 +22,34 @@ exitwith
ppEffectDestroy ppColor;
ppEffectDestroy ppBlur;
player setvariable ["NV",["OFF",_oldAperture]];
player addAction ["Night Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"];
player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"];
};
ppEffectDestroy ppColor;
ppEffectDestroy ppBlur;
ppColor = ppEffectCreate ["ColorCorrections", 1999];
ppColor ppEffectEnable true;
ppColor ppEffectAdjust [1, 1, 0, [0.4, 1, 0.4, 0], [0.4, 1, 0.4, 0.0], [0.4, 1, 0.4, 1.0]];
ppColor ppEffectAdjust [1, 1, 0, _NV1, _NV2, _NV3];
ppColor ppEffectCommit 0;
/*
ppInversion = ppEffectCreate ['colorInversion', 2555];
ppInversion ppEffectEnable false;
ppInversion ppEffectAdjust [1,1,1];
ppInversion ppEffectCommit 0;
*/
diag_log format ["DEBUG: Aperture : %1 First %2 Second %3 Third %4", _OldAperture, _NV1,_NV2,_NV3];
ppBlur = ppEffectCreate ["dynamicBlur", 505];
ppBlur ppEffectEnable true;
ppBlur ppEffectAdjust [.2];
ppBlur ppEffectCommit 0;
aperture = 0.0001;
while { aperture < _oldAperture } do
{
@@ -42,7 +59,12 @@ while { aperture < _oldAperture } do
};
player setVariable ["NV", ["ON", _oldAperture]];
player setVariable ["NV1",_NV1];
player setVariable ["NV2",_NV2];
player setVariable ["NV3",_NV3];
player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"];
exit;

View File

@@ -0,0 +1,28 @@
private ["_gen","_caller","_id","_NV","_NVOn","_OldAperture"];
_gen = _this select 0;
_caller = _this select 1;
_id = _this select 2;
// _gen removeAction _id;
// array from tweaking settings
_new = _this select 3;
_inc = _new select 0;
// get Aperture
_NV = player getvariable ["NV",["OFF", 0.1]];
_newap = (_NV select 1)+_inc;
_NVOn = (_NV select 0);
if(_NVOn == "ON") then {
setAperture _newap;
player setVariable ["NV", ["OFF", _newap]];
} else {
player setVariable ["NV", ["ON", _newap]];
};
cutText [format["%1 %2","NV",_newap], "PLAIN DOWN"];

View File

@@ -0,0 +1,55 @@
private ["_gen","_caller","_id","_NV","_NVOn","_OldAperture"];
_gen = _this select 0;
_caller = _this select 1;
_id = _this select 2;
// _gen removeAction _id;
// array from tweaking settings
_new = _this select 3;
_NVx = _new select 0;
// get first rbg + m
_NV = player getvariable [_NVx,[0.0, 0.0, 0.0, 0.0]];
_increase = (_new select 1);
_index = 0;
{
_NV set [_index,(_NV select _index) + _x];
_index =_index + 1;
} forEach _increase;
// set rgb + m
player setVariable [_NVx, _NV];
cutText [format["%1 %2",_NVx,_NV], "PLAIN DOWN"];
_NV = player getvariable ["NV",["OFF", 0.1]];
_NVOn = (_NV select 0);
_newap = (_NV select 1);
if(_NVOn == "ON") then {
_NV1 = player getvariable ["NV1",[0,0,0,0]];
_NV2 = player getvariable ["NV2",[0,0,0,0]];
_NV3 = player getvariable ["NV3",[0,0,0,0]];
ppEffectDestroy ppColor;
ppEffectDestroy ppBlur;
ppColor = ppEffectCreate ["ColorCorrections", 1999];
ppColor ppEffectEnable true;
ppColor ppEffectAdjust [1, 1, 0, _NV1, _NV2, _NV3];
ppColor ppEffectCommit 0;
diag_log format ["DEBUG: Aperture : %1 First %2 Second %3 Third %4", _newap, _NV1,_NV2,_NV3];
player setVariable ["NV", ["OFF", _newap]];
} else {
player setVariable ["NV", ["ON", _newap]];
};
exit;

View File

@@ -12,20 +12,48 @@ _proceed = false;
_objType = typeOf _obj;
_limit = 5;
if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then {
_limit = getNumber(configFile >> "CfgVehicles" >> _objType >> "constructioncount");
};
_findNearestPole = [player, ["Plastic_Pole_EP1_DZ"], 30];
_IsNearPlot = count (_findNearestPole);
if(_IsNearPlot >= 1) then {
_nearestPole = _findNearestPole select 0;
// Find owner
_ownerID = _nearestPole getVariable["CharacterID","0"];
// check if friendly to owner
if(dayz_characterID != _ownerID) then {
_friendlies = player getVariable ["friendlies",[]];
// check if friendly to owner
if(!(_ownerID in _friendlies)) then {
_limit = round(_limit*2);
};
};
};
cutText [format["Starting de-construction of %1.",_objType], "PLAIN DOWN"];
// Alert zombies once.
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
[player,50,true,(getPosATL player)] spawn player_alertZombies;
// Start de-construction loop
_counter = 0;
while {_isOk} do {
// if object no longer exits this should return true.
if(isNull(_obj)) exitWith {
_isOk = false;
_proceed = false;
};
player playActionNow "Medic";
_dis=20;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
@@ -51,6 +79,7 @@ while {_isOk} do {
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
@@ -75,29 +104,35 @@ 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];
publicVariableServer "dayzDeleteObj";
// Double check that object is not null
if(!isNull(_obj)) then {
cutText [format["De-constructing %1.",_objType], "PLAIN DOWN"];
//["dayzDeleteObj",[_objectID,_objectUID]] call callRpcProcedure;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
deleteVehicle _obj;
deleteVehicle _obj;
// give refund items
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
if((count _selectedRemoveOutput) > 0) then {
// Put items
{
_itemOut = _x select 0;
_countOut = _x select 1;
diag_log format["Removal Output: %1 %2", _itemOut,_countOut];
// give refund items
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
if((count _selectedRemoveOutput) > 0) then {
// Put items
{
_itemOut = _x select 0;
_countOut = _x select 1;
diag_log format["Removal Output: %1 %2", _itemOut,_countOut];
for "_x" from 1 to _countOut do {
player addMagazine _itemOut;
};
for "_x" from 1 to _countOut do {
player addMagazine _itemOut;
};
} forEach _selectedRemoveOutput;
cutText ["De-constructed parts are now in your inventory.", "PLAIN DOWN"];
} forEach _selectedRemoveOutput;
cutText ["De-constructed parts are now in your inventory.", "PLAIN DOWN"];
};
} else {
cutText ["Failed object not longer exists.", "PLAIN DOWN"];
};
} else {

View File

@@ -116,23 +116,29 @@ if (_qty >= _qty_in) then {
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;
if((damage _obj) >= 0.75) then {
// 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";
deleteVehicle _obj;
cutText [format[("Sold %1 %2 for %3 %4"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
} else {
_dampercent = (damage _obj) * 100;
cutText [format[("Cannot sell %1 it is %2% damaged and cannot be sold under 75%."),_textPartIn,_dampercent], "PLAIN DOWN"];
};
_obj = _obj select 0;
_objectID = _obj getVariable ["ObjectID","0"];
_objectUID = _obj getVariable ["ObjectUID","0"];
//["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 = [];