diff --git a/CHANGE LOG 1.0.4.txt b/CHANGE LOG 1.0.4.txt index 0881f0aec..8214ea134 100644 --- a/CHANGE LOG 1.0.4.txt +++ b/CHANGE LOG 1.0.4.txt @@ -1,12 +1,12 @@ -[NEW] Napf Island with permission from #momo# now included by default. http://forums.bistudio.com/showthread.php?136469-Napf-Island-beta\ -[NEW] WIP Sauerland Map v1.7.00.2 with permission from falconsan now included by default. http://www.s6computer.de/ +[NEW] Napf Island v0.99 with permission from #momo# now included by default. http://forums.bistudio.com/showthread.php?136469-Napf-Island-beta\ +[NEW-WIP] Sauerland Map v1.7.00.2 with permission from falconsan now included by default. https://github.com/falconsan/DayZ_Sauerland/blob/master/changelog.txt - http://www.s6computer.de/ [NEW] Optimized Server/Client Communication with PVS+PVC methods from DayZ Mod 1.8. @Skaronator [NEW] Modular building spawning now ahead on server start, vehicles spawning after it. @Skaronator @zabn [NEW] Maintain Area should work now much better. The Server update the Object itself and doesnt remove and rebuild it anymore. @Skaronator [NEW] Updated Hive Dll to latest from rajkosto and added custom child 396 and 397 call to update the datestamp of base objects. *See notes below! @Tansien @vbawol +[NEW] Trading now makes change and auto combines into the highest denomination. @vbawol -[ADDED] Trading now makes change and auto combines into the highest denomination. @vbawol [ADDED] Cars, small Trucks, and Boats now able to be lifting with Chinooks only. Lifted vehicle must be unlocked and unmanned. Enabled by default use DZE_HeliLift = false; in init.sqf to disable. @Zabn @vbawol [ADDED] 40% chance to payout a single gem on removal of mine ruins. @vbawol [ADDED] M107_DZ to Military, MilitarySpecial, IndustrialMilitary and Helicrash loottable. @Sequisha @@ -14,25 +14,24 @@ [ADDED] New enterable building added for Chernarus and other maps. @Sequisha [ADDED] Allow Admins To Customize Loot Spawn Timer using DZE_LootSpawnTimer via init.sqf. Default: 10 @SGanthony [ADDED] Provide option to have loot tables loaded from mission file. DZE_MissionLootTable = true; will look for loot configs via missionConfigFile. @vbawol -[ADDED] Added Craftable/Buildable Wood Crate Storage. Recipe 6 x PartWoodLumber = ItemWoodCrateKit. @Mochnant +[ADDED] Added Craftable/Buildable Wood Crate Storage. Recipe 6 x PartWoodLumber = ItemWoodCrateKit. @Mochnant [ADDED] BAF_Merlin_DZE - transportMaxWeapons 15, transportMaxMagazines 150, transportmaxbackpacks 5. @Skaronator [ADDED] Added back BAF_AS50_scoped_DZ configs, still not on traders or loot tables. @vbawol -[ADDED] Placing a plot pole now creates a preview of the "safe" build area protected by the plot pole. This is only viewable +[ADDED] Placing a plot pole now creates a preview of the "safe" build area protected by the plot pole. This is only viewable by the plot owner, will disappear upon logout, and is only re-creatable by re-placing the plot pole. @dayz10k @vos -[ADDED] Global variabsle to allow building on roads with DZE_BuildOnRoads = true; (Default: DZE_BuildOnRoads = false;) @dayz10k -[ADDED] Global variable to set plot pole radius and exclusion zone, enabled via mission file. DZE_PlotPole = [x,y] in the mission file controls the [Radius, Exclusion zone]. +[ADDED] Global variable to allow building on roads with DZE_BuildOnRoads = true; (Default: DZE_BuildOnRoads = false;) @dayz10k +[ADDED] Global variable to set plot pole radius and exclusion zone, enabled via mission file. DZE_PlotPole = [x,y] in the mission file controls the [Radius, Exclusion zone]. Default: DZE_PlotPole = [30,45]. @dayz10k @Skaronator [ADDED] Global variable to disable Player Zombies with DZE_PlayerZed = false; (Default: DZE_PlayerZed = true;) @Skaronator - [FIXED] Anti-Teleport Log System. @Skaronator -[FIXED] Wrong german translation "Holzkiste geƶffnet.". @Fank @vbawol +[FIXED] Wrong German translations. @Fank [FIXED] Fix medical actions in vehicles. @icomrade [FIXED] Wrong KSVK class spawning on mass graves. @Skaronator via MGT [FIXED] Armor value for RBWheel on SUV was lower than it should have been. @SGanthony [FIXED] Fixed issues with losing weapons when on graves @vbawol - http://epochmod.com/forum/index.php?/topic/5092-player-grave/?p=33281 [FIXED] More Localization (translations). @dayz10k, @VeryBigBro (Russian), @JoSchaap (Dutch), @Geodar (Czech), @krazey (German) -[FIXED] Fixed incorect spelling of chainsaw name was horlite needed to be hermlite. @vbawol +[FIXED] Fixed incorrect spelling of chainsaw name was horlite needed to be hermlite. @vbawol [FIXED] Remove nearest tranktrap via toolbox not working properly. @dayz10k [FIXED] Lingor trader spawn. @dayz10k @sekra [FIXED] Disappearing of Vault while unlocking. (Need Feedback!) @Skaronator @@ -41,19 +40,20 @@ [FIXED] You will no longer get a 3 by 3H - barrier cube if you remove a 5H - barrier cube @Skaronator [FIXED] BattlEye kicks for some players on death. @Skaronator -[CHANGED] Drastically increased base wood and cinder building armor levels. Doors now have higher armor than walls. @vbawol +[CHANGED] Changed currency conversion rates to multiples of 10. @vbawol +[CHANGED] Drastically increased base building armor levels. Doors now have much higher armor than walls. @vbawol [CHANGED] Extended Trader logging and fix for sold itemnames @ctc.Sebi -[CHANGED] Balance Loottable. @Sequisha -[CHANGED] Lowered Safe weapon storage count to 25, to address reports of more safe inventory issues after it was rasied to 50. @vbawol +[CHANGED] Balance Loot table. @Sequisha +[CHANGED] Lowered Safe weapon storage count to 25, to address reports of more safe inventory issues after it was raised to 50. @vbawol [CHANGED] Prices were reviewed and modified for many of the higher tiered weapons/ammo/vehicles/food. @dayz10k [CHANGED] All copper prices have been changed to 2 silver to buy, 1 silver to sell. @dayz10k [CHANGED] Radius check for Remove Nearest Camo Net (from 10m to 3m). @dayz10k -[CHANGED] Loot Improvments (Based on the Feedback of the Skaronator.com Server) @Skaronator +[CHANGED] Loot Improvements (Based on the Feedback of the Skaronator.com Server) @Skaronator [REMOVED] Copper is no longer a usable currency. Existing copper will remain in game, but has no current use. @dayz10k [SERVER INFO] Updated Hive dll requires DatabaseMySql.dll in arma 2 oa root and visual studio 2013 redistributable x86 installed: http://www.microsoft.com/en-us/download/details.aspx?id=40784 -[SERVER INFO] Removed dayz_vb.bikey and dayz.bikey keys and added new versioned dayz_epoch104.bikey key. Thanks to @Tansien for the suggestion. @vbawol +[SERVER INFO] Removed dayz_vb.bikey and dayz.bikey keys and added new version ed dayz_epoch104.bikey key. Thanks to @Tansien for the suggestion. @vbawol [SERVER INFO] Also moved external bikeys to sub folder, for best security use only the bikeys for the map your running. [SERVER INFO] pook_H13_amphib, GNT_C185F and GNT_C185E causes Server FPS issues and should not be used. https://github.com/vbawol/DayZ-Epoch/issues/969 diff --git a/SQF/dayz_code/actions/trade_any_bicycle.sqf b/SQF/dayz_code/actions/trade_any_bicycle.sqf index 8fc8a0916..5028b3c8b 100644 --- a/SQF/dayz_code/actions/trade_any_bicycle.sqf +++ b/SQF/dayz_code/actions/trade_any_bicycle.sqf @@ -1,4 +1,4 @@ -private ["_veh","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"]; +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","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; }; DZE_ActionInProgress = true; @@ -21,79 +21,96 @@ _textPartOut = (_this select 3) select 6; _traderID = (_this select 3) select 7; _bos = 0; -if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; -} else { - _obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_vehicle]; - _qty = count _obj; +if(_buy_o_sell == "sell") then { _bos = 1; }; -if (_qty >= _qty_in) then { - - cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; +cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; - [1,1] call dayz_HungerThirst; - // force animation - player playActionNow "Medic"; +[1,1] call dayz_HungerThirst; +// force animation +player playActionNow "Medic"; - r_interrupt = false; +r_interrupt = false; +_animState = animationState player; +r_doLoop = true; +_started = false; +_finished = false; + +while {r_doLoop} do { _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { - _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; - }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; + _isMedic = ["medic",_animState] call fnc_inString; + if (_isMedic) then { + _started = true; }; - r_doLoop = false; + 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) exitWith { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; +if (!_finished) exitWith { + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; + DZE_ActionInProgress = false; +}; + +if (_finished) then { + + _canAfford = false; + if(_bos == 1) then { + + _distance = dayz_sellDistance_vehicle; + if (_part_in isKindOf "Air") then { + _distance = dayz_sellDistance_air; + }; + if (_part_in isKindOf "Ship") then { + _distance = dayz_sellDistance_boat; + }; + _count = {(typeOf _x) == _part_in} count (nearestObjects [(getPosATL player), [_part_in], _distance]); + if (_count >= _qty_in) then { + _canAfford = true; + }; + diag_log format["DEBUG vehicle sell count: %1", _count]; + + } else { + + //buy + _trade_total = [[_part_in,_qty_in]] call epoch_itemCost; + _total_currency = call epoch_totalCurrency; + _return_change = _total_currency - _trade_total; + if (_return_change >= 0) then { + _canAfford = true; }; - cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; }; - if (_finished) then { - // Double check for items - if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; + if (_canAfford) then { + + //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; + // if (isNil "_obj") then { _obj = "Unknown Vehicle" }; + if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; } else { - _obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_vehicle]; - _qty = count _obj; + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; }; - - if (_qty >= _qty_in) then { - - //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; - if (isNil "_obj") then { _obj = "Unknown Vehicle" }; - if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - if(_bos == 1) then { - // Selling - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; - } else { - // Buying - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; - }; - publicVariableServer "PVDZE_obj_Trade"; + publicVariableServer "PVDZE_obj_Trade"; - //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; + //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; + + if(_buy_o_sell == "buy") then { waitUntil {!isNil "dayzTradeResult"}; @@ -101,107 +118,123 @@ if (_qty >= _qty_in) then { if(dayzTradeResult == "PASS") then { - if(_buy_o_sell == "buy") then { + _done = [[[_part_in,_qty_in]],0] call epoch_returnChange; + if (_done) then { - _removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove); - if(_removed == _qty_in) then { - _dir = round(random 360); + // spawn vehicle + _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; - }; - - //place vehicle spawn marker (local) - _veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"]; - - _location = (getPosATL _veh); - - //["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure; - PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,dayz_characterID,_activatingPlayer]; - publicVariableServer "PVDZE_veh_Publish2"; - - player reveal _veh; - - cutText [format[(localize "str_epoch_player_180"),_qty_in,_textPartIn,_textPartOut], "PLAIN DOWN"]; - }; - - } else { - - _obj = _obj select 0; - - //check to make sure vehicle has no more than 75% average tire damage - _hitpoints = _obj call vehicle_getHitpoints; - _okToSell = true; - - // count parts - _tires = 0; - - // total damage - _tireDmg = 0; - - _damage = 0; - { - if(["Wheel",_x,false] call fnc_inString) then { - _damage = [_obj,_x] call object_getHit; - _tireDmg = _tireDmg + _damage; - _tires = _tires + 1; - }; - } forEach _hitpoints; - - // find average tire damage - if(_tireDmg > 0 and _tires > 0) then { - if((_tireDmg / _tires) > 0.75) then { - _okToSell = false; - }; - }; - if(local _obj) then { - - if(_okToSell) then { - - if(!isNull _obj and alive _obj) then { - - for "_x" from 1 to _qty_out do { - player addMagazine _part_out; - }; - - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; - - PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer]; - publicVariableServer "PVDZE_obj_Delete"; - - deleteVehicle _obj; - - cutText [format[(localize "str_epoch_player_181"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; - }; - } else { - cutText [format[(localize "str_epoch_player_182"),_textPartIn] , "PLAIN DOWN"]; - }; + _helipad = nearestObjects [player, ["HeliHCivil","HeliHempty"], 100]; + if(count _helipad > 0) then { + _location = (getPosATL (_helipad select 0)); } else { - cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"]; + _location = [(position player),0,20,1,0,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); + + //["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure; + PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,dayz_characterID,_activatingPlayer]; + publicVariableServer "PVDZE_veh_Publish2"; + + cutText [format[(localize "STR_EPOCH_PLAYER_180"),_qty_in,_textPartIn,_textPartOut], "PLAIN DOWN"]; }; - - {player removeAction _x} forEach s_player_parts;s_player_parts = []; - s_player_parts_crtl = -1; } else { cutText [format[(localize "str_epoch_player_183"),_textPartOut] , "PLAIN DOWN"]; }; - dayzTradeResult = nil; + } else { + + //sell + _distance = dayz_sellDistance_vehicle; + if (_part_in isKindOf "Air") then { + _distance = dayz_sellDistance_air; + }; + if (_part_in isKindOf "Ship") then { + _distance = dayz_sellDistance_boat; + }; + + _objects = nearestObjects [(getPosATL player), [_part_in], _distance]; + + diag_log format["DEBUG vehicle sell objects: %1", _objects]; + + _qty = ({(typeOf _x) == _part_in} count _objects); + + if (_qty >= _qty_in) then { + + _obj = (_objects select 0); + + //check to make sure vehicle has no more than 75% average tire damage + _hitpoints = _obj call vehicle_getHitpoints; + _okToSell = true; + + // count parts + _tires = 0; + + // total damage + _tireDmg = 0; + + _damage = 0; + { + if(["Wheel",_x,false] call fnc_inString) then { + _damage = [_obj,_x] call object_getHit; + _tireDmg = _tireDmg + _damage; + _tires = _tires + 1; + }; + } forEach _hitpoints; + + // find average tire damage + if(_tireDmg > 0 and _tires > 0) then { + if((_tireDmg / _tires) > 0.75) then { + _okToSell = false; + }; + }; + + _objectID = _obj getVariable ["ObjectID","0"]; + _objectUID = _obj getVariable ["ObjectUID","0"]; + + _notSetup = (_objectID == "0" && _objectUID == "0"); + + if(local _obj and !isNull _obj and alive _obj and !_notSetup) then { + + if(_okToSell) then { + + + + //if(_objectID != "0" && _objectUID != "0") then { + + PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer]; + publicVariableServer "PVDZE_obj_Delete"; + + deleteVehicle _obj; + + // payout + _canAfford = [[[_part_out,_qty_out]],1] call epoch_returnChange; + + cutText [format[(localize "str_epoch_player_181"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; + + + } else { + cutText [format[(localize "str_epoch_player_182"),_textPartIn] , "PLAIN DOWN"]; + }; + } else { + cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"]; + }; + }; }; - }; - -} else { - _needed = _qty_in - _qty; - if(_buy_o_sell == "buy") then { - cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; + dayzTradeResult = nil; } else { - cutText [format[(localize "str_epoch_player_185"),_textPartIn] , "PLAIN DOWN"]; - }; + + if(_buy_o_sell == "buy") then { + _qty = {_x == _part_in} count magazines player; + _needed = _qty_in - _qty; + cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; + } else { + cutText [format[(localize "str_epoch_player_185"),_textPartIn] , "PLAIN DOWN"]; + }; + }; }; - -DZE_ActionInProgress = false; +DZE_ActionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_any_boat.sqf b/SQF/dayz_code/actions/trade_any_boat.sqf index ccc7570f5..d4cde2d50 100644 --- a/SQF/dayz_code/actions/trade_any_boat.sqf +++ b/SQF/dayz_code/actions/trade_any_boat.sqf @@ -1,4 +1,4 @@ -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","_playerNear"]; +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","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; }; DZE_ActionInProgress = true; @@ -21,80 +21,96 @@ _textPartOut = (_this select 3) select 6; _traderID = (_this select 3) select 7; _bos = 0; -if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; -} else { - _obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_boat]; - _qty = count _obj; +if(_buy_o_sell == "sell") then { _bos = 1; }; - -if (_qty >= _qty_in) then { - - cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; +cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; - [1,1] call dayz_HungerThirst; - // force animation - player playActionNow "Medic"; +[1,1] call dayz_HungerThirst; +// force animation +player playActionNow "Medic"; - r_interrupt = false; +r_interrupt = false; +_animState = animationState player; +r_doLoop = true; +_started = false; +_finished = false; + +while {r_doLoop} do { _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { - _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; - }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; + _isMedic = ["medic",_animState] call fnc_inString; + if (_isMedic) then { + _started = true; }; - r_doLoop = false; + 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) exitWith { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; +if (!_finished) exitWith { + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; + DZE_ActionInProgress = false; +}; + +if (_finished) then { + + _canAfford = false; + if(_bos == 1) then { + + _distance = dayz_sellDistance_vehicle; + if (_part_in isKindOf "Air") then { + _distance = dayz_sellDistance_air; + }; + if (_part_in isKindOf "Ship") then { + _distance = dayz_sellDistance_boat; + }; + _count = {(typeOf _x) == _part_in} count (nearestObjects [(getPosATL player), [_part_in], _distance]); + if (_count >= _qty_in) then { + _canAfford = true; + }; + diag_log format["DEBUG vehicle sell count: %1", _count]; + + } else { + + //buy + _trade_total = [[_part_in,_qty_in]] call epoch_itemCost; + _total_currency = call epoch_totalCurrency; + _return_change = _total_currency - _trade_total; + if (_return_change >= 0) then { + _canAfford = true; }; - cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; }; - if (_finished) then { - // Double check for items - if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; + if (_canAfford) then { + + //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; + // if (isNil "_obj") then { _obj = "Unknown Vehicle" }; + if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; } else { - _obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_boat]; - _qty = count _obj; + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; }; - - if (_qty >= _qty_in) then { - - //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; - if (isNil "_obj") then { _obj = "Unknown Vehicle" }; - if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - if(_bos == 1) then { - // Selling - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; - } else { - // Buying - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; - }; - publicVariableServer "PVDZE_obj_Trade"; + publicVariableServer "PVDZE_obj_Trade"; - //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; + //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; + + if(_buy_o_sell == "buy") then { waitUntil {!isNil "dayzTradeResult"}; @@ -102,99 +118,108 @@ 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; - // 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; - // then select number from 1 - 2500 - _keyNumber = (floor(random 2500)) + 1; + // Combine to key (eg.ItemKeyYellow2494) classname + _keySelected = format[("ItemKey%1%2"),_keyColor,_keyNumber]; - // Combine to key (eg.ItemKeyYellow2494) classname - _keySelected = format[("ItemKey%1%2"),_keyColor,_keyNumber]; - - _isKeyOK = isClass(configFile >> "CfgWeapons" >> _keySelected); + _isKeyOK = isClass(configFile >> "CfgWeapons" >> _keySelected); - _config = _keySelected; - _isOk = [player,_config] call BIS_fnc_invAdd; - waitUntil {!isNil "_isOk"}; - if (_isOk and _isKeyOK) then { + _config = _keySelected; + _isOk = [player,_config] call BIS_fnc_invAdd; - _removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove); - if(_removed == _qty_in) then { - _dir = round(random 360); + waitUntil {!isNil "_isOk"}; - _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"]; + if (_isOk and _isKeyOK) then { - _location = (getPosATL _veh); - - //["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure; - PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer]; - publicVariableServer "PVDZE_veh_Publish2"; + _done = [[[_part_in,_qty_in]],0] call epoch_returnChange; + if (_done) then { - player reveal _veh; + // spawn vehicle + _dir = round(random 360); - cutText [format[(localize "STR_EPOCH_ACTIONS_11"),_qty_in,_textPartIn,_textPartOut], "PLAIN DOWN"]; + _helipad = nearestObjects [player, ["HeliHCivil","HeliHempty"], 100]; + if(count _helipad > 0) then { + _location = (getPosATL (_helipad select 0)); } else { - player removeMagazine _keySelected; + _location = [(position player),0,20,1,2,2000,0] call BIS_fnc_findSafePos; }; - } else { - cutText [(localize "str_epoch_player_107"), "PLAIN DOWN"]; + + //place vehicle spawn marker (local) + _veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"]; + + _location = (getPosATL _veh); + + //["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure; + PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer]; + publicVariableServer "PVDZE_veh_Publish2"; + + cutText [format[(localize "STR_EPOCH_ACTIONS_11"),_qty_in,_textPartIn,_textPartOut], "PLAIN DOWN"]; }; } else { - - _obj = _obj select 0; - - _okToSell = true; - if(!local _obj) then { - _okToSell = false; - }; - - if(_okToSell and !isNull _obj and alive _obj) then { - - for "_x" from 1 to _qty_out do { - player addMagazine _part_out; - }; - - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; - - PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer]; - publicVariableServer "PVDZE_obj_Delete"; - - deleteVehicle _obj; - - cutText [format[(localize "str_epoch_player_181"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; - } else { - cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"]; - }; + cutText [(localize "str_epoch_player_107"), "PLAIN DOWN"]; }; - - {player removeAction _x} forEach s_player_parts;s_player_parts = []; - s_player_parts_crtl = -1; } else { cutText [format[(localize "str_epoch_player_183"),_textPartOut] , "PLAIN DOWN"]; }; - dayzTradeResult = nil; - }; - }; + } else { + + //sell + _distance = dayz_sellDistance_vehicle; + if (_part_in isKindOf "Air") then { + _distance = dayz_sellDistance_air; + }; + if (_part_in isKindOf "Ship") then { + _distance = dayz_sellDistance_boat; + }; + + _objects = nearestObjects [(getPosATL player), [_part_in], _distance]; -} else { - _needed = _qty_in - _qty; - if(_buy_o_sell == "buy") then { - cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; + diag_log format["DEBUG vehicle sell objects: %1", _objects]; + + _qty = ({(typeOf _x) == _part_in} count _objects); + + if (_qty >= _qty_in) then { + + _obj = (_objects select 0); + + _objectID = _obj getVariable ["ObjectID","0"]; + _objectUID = _obj getVariable ["ObjectUID","0"]; + + _notSetup = (_objectID == "0" && _objectUID == "0"); + + if(local _obj and !isNull _obj and alive _obj and !_notSetup) then { + + PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer]; + publicVariableServer "PVDZE_obj_Delete"; + + deleteVehicle _obj; + + // payout + _canAfford = [[[_part_out,_qty_out]],1] call epoch_returnChange; + + cutText [format[(localize "str_epoch_player_181"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; + + } else { + cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"]; + }; + }; + }; + dayzTradeResult = nil; } else { - cutText [format[(localize "str_epoch_player_185"),_textPartIn] , "PLAIN DOWN"]; + + if(_buy_o_sell == "buy") then { + _qty = {_x == _part_in} count magazines player; + _needed = _qty_in - _qty; + cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; + } else { + cutText [format[(localize "str_epoch_player_185"),_textPartIn] , "PLAIN DOWN"]; + }; }; }; - -DZE_ActionInProgress = false; +DZE_ActionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_any_vehicle.sqf b/SQF/dayz_code/actions/trade_any_vehicle.sqf index 9842c51e2..ad8c88b59 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle.sqf @@ -1,4 +1,4 @@ -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","_playerNear"]; +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","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"]; if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; }; DZE_ActionInProgress = true; @@ -21,88 +21,96 @@ _textPartOut = (_this select 3) select 6; _traderID = (_this select 3) select 7; _bos = 0; -if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; -} else { - - if (_part_in isKindOf "Air") then { - _obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_air]; - } else { - _obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_vehicle]; - }; - _qty = count _obj; +if(_buy_o_sell == "sell") then { _bos = 1; }; -if (_qty >= _qty_in) then { - - cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; +cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; - [1,1] call dayz_HungerThirst; - // force animation - player playActionNow "Medic"; +[1,1] call dayz_HungerThirst; +// force animation +player playActionNow "Medic"; - r_interrupt = false; +r_interrupt = false; +_animState = animationState player; +r_doLoop = true; +_started = false; +_finished = false; + +while {r_doLoop} do { _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { - _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; - }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; + _isMedic = ["medic",_animState] call fnc_inString; + if (_isMedic) then { + _started = true; }; - r_doLoop = false; + 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) exitWith { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; +if (!_finished) exitWith { + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; + DZE_ActionInProgress = false; +}; + +if (_finished) then { + + _canAfford = false; + if(_bos == 1) then { + + _distance = dayz_sellDistance_vehicle; + if (_part_in isKindOf "Air") then { + _distance = dayz_sellDistance_air; + }; + if (_part_in isKindOf "Ship") then { + _distance = dayz_sellDistance_boat; + }; + _count = {(typeOf _x) == _part_in} count (nearestObjects [(getPosATL player), [_part_in], _distance]); + if (_count >= _qty_in) then { + _canAfford = true; + }; + diag_log format["DEBUG vehicle sell count: %1", _count]; + + } else { + + //buy + _trade_total = [[_part_in,_qty_in]] call epoch_itemCost; + _total_currency = call epoch_totalCurrency; + _return_change = _total_currency - _trade_total; + if (_return_change >= 0) then { + _canAfford = true; }; - cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; }; - if (_finished) then { - // Double check for items - if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; + if (_canAfford) then { + + //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; + // if (isNil "_obj") then { _obj = "Unknown Vehicle" }; + if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; } else { - if (_part_in isKindOf "AIR") then { - _obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_air]; - } else { - _obj = nearestObjects [(getPosATL player), [_part_in], dayz_sellDistance_vehicle]; - }; - _qty = count _obj; + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; }; - - if (_qty >= _qty_in) then { - - //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; - if (isNil "_obj") then { _obj = "Unknown Vehicle" }; - if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - if(_bos == 1) then { - // Selling - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; - } else { - // Buying - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; - }; - publicVariableServer "PVDZE_obj_Trade"; + publicVariableServer "PVDZE_obj_Trade"; - //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; + //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; + + if(_buy_o_sell == "buy") then { waitUntil {!isNil "dayzTradeResult"}; @@ -110,125 +118,143 @@ 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; - // 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; - // then select number from 1 - 2500 - _keyNumber = (floor(random 2500)) + 1; + // Combine to key (eg.ItemKeyYellow2494) classname + _keySelected = format[("ItemKey%1%2"),_keyColor,_keyNumber]; - // Combine to key (eg.ItemKeyYellow2494) classname - _keySelected = format[("ItemKey%1%2"),_keyColor,_keyNumber]; - - _isKeyOK = isClass(configFile >> "CfgWeapons" >> _keySelected); + _isKeyOK = isClass(configFile >> "CfgWeapons" >> _keySelected); - _config = _keySelected; - _isOk = [player,_config] call BIS_fnc_invAdd; - waitUntil {!isNil "_isOk"}; - if (_isOk and _isKeyOK) then { + _config = _keySelected; + _isOk = [player,_config] call BIS_fnc_invAdd; - _removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove); - if(_removed == _qty_in) then { - _dir = round(random 360); + waitUntil {!isNil "_isOk"}; - _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; - }; - - //place vehicle spawn marker (local) - _veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"]; + if (_isOk and _isKeyOK) then { - _location = (getPosATL _veh); + _done = [[[_part_in,_qty_in]],0] call epoch_returnChange; + if (_done) then { - //["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure; - PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer]; - publicVariableServer "PVDZE_veh_Publish2"; - - cutText [format[(localize "STR_EPOCH_ACTIONS_11"),_qty_in,_textPartIn,_textPartOut], "PLAIN DOWN"]; + // spawn vehicle + _dir = round(random 360); + + _helipad = nearestObjects [player, ["HeliHCivil","HeliHempty"], 100]; + if(count _helipad > 0) then { + _location = (getPosATL (_helipad select 0)); } else { - player removeMagazine _keySelected; + _location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos; }; - } else { - cutText [(localize "str_epoch_player_107"), "PLAIN DOWN"]; + + //place vehicle spawn marker (local) + _veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"]; + + _location = (getPosATL _veh); + + //["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure; + PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer]; + publicVariableServer "PVDZE_veh_Publish2"; + + cutText [format[(localize "STR_EPOCH_ACTIONS_11"),_qty_in,_textPartIn,_textPartOut], "PLAIN DOWN"]; }; } else { - - _obj = _obj select 0; - - //check to make sure vehicle has no more than 75% average tire damage - _hitpoints = _obj call vehicle_getHitpoints; - _okToSell = true; - - // count parts - _tires = 0; - - // total damage - _tireDmg = 0; - - _damage = 0; - { - if(["Wheel",_x,false] call fnc_inString) then { - _damage = [_obj,_x] call object_getHit; - _tireDmg = _tireDmg + _damage; - _tires = _tires + 1; - }; - } forEach _hitpoints; - - // find average tire damage - if(_tireDmg > 0 and _tires > 0) then { - if((_tireDmg / _tires) > 0.75) then { - _okToSell = false; - }; - }; - - if(local _obj and !isNull _obj and alive _obj) then { - - if(_okToSell) then { - - for "_x" from 1 to _qty_out do { - player addMagazine _part_out; - }; - - _objectID = _obj getVariable ["ObjectID","0"]; - _objectUID = _obj getVariable ["ObjectUID","0"]; - - PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer]; - publicVariableServer "PVDZE_obj_Delete"; - - deleteVehicle _obj; - - cutText [format[(localize "str_epoch_player_181"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; - - } else { - cutText [format[(localize "str_epoch_player_182"),_textPartIn] , "PLAIN DOWN"]; - }; - } else { - cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"]; - }; - + cutText [(localize "str_epoch_player_107"), "PLAIN DOWN"]; }; - - {player removeAction _x} forEach s_player_parts;s_player_parts = []; - s_player_parts_crtl = -1; } else { cutText [format[(localize "str_epoch_player_183"),_textPartOut] , "PLAIN DOWN"]; }; - dayzTradeResult = nil; + } else { + + //sell + _distance = dayz_sellDistance_vehicle; + if (_part_in isKindOf "Air") then { + _distance = dayz_sellDistance_air; + }; + if (_part_in isKindOf "Ship") then { + _distance = dayz_sellDistance_boat; + }; + + _objects = nearestObjects [(getPosATL player), [_part_in], _distance]; + + diag_log format["DEBUG vehicle sell objects: %1", _objects]; + + _qty = ({(typeOf _x) == _part_in} count _objects); + + if (_qty >= _qty_in) then { + + _obj = (_objects select 0); + + //check to make sure vehicle has no more than 75% average tire damage + _hitpoints = _obj call vehicle_getHitpoints; + _okToSell = true; + + // count parts + _tires = 0; + + // total damage + _tireDmg = 0; + + _damage = 0; + { + if(["Wheel",_x,false] call fnc_inString) then { + _damage = [_obj,_x] call object_getHit; + _tireDmg = _tireDmg + _damage; + _tires = _tires + 1; + }; + } forEach _hitpoints; + + // find average tire damage + if(_tireDmg > 0 and _tires > 0) then { + if((_tireDmg / _tires) > 0.75) then { + _okToSell = false; + }; + }; + + _objectID = _obj getVariable ["ObjectID","0"]; + _objectUID = _obj getVariable ["ObjectUID","0"]; + + _notSetup = (_objectID == "0" && _objectUID == "0"); + + if(local _obj and !isNull _obj and alive _obj and !_notSetup) then { + + if(_okToSell) then { + + + + //if(_objectID != "0" && _objectUID != "0") then { + + PVDZE_obj_Delete = [_objectID,_objectUID,_activatingPlayer]; + publicVariableServer "PVDZE_obj_Delete"; + + deleteVehicle _obj; + + // payout + _canAfford = [[[_part_out,_qty_out]],1] call epoch_returnChange; + + cutText [format[(localize "str_epoch_player_181"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; + + + } else { + cutText [format[(localize "str_epoch_player_182"),_textPartIn] , "PLAIN DOWN"]; + }; + } else { + cutText [(localize "str_epoch_player_245"), "PLAIN DOWN"]; + }; + }; }; - }; - -} else { - _needed = _qty_in - _qty; - if(_buy_o_sell == "buy") then { - cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; + dayzTradeResult = nil; } else { - cutText [format[(localize "str_epoch_player_185"),_textPartIn] , "PLAIN DOWN"]; - }; + if(_buy_o_sell == "buy") then { + _qty = {_x == _part_in} count magazines player; + _needed = _qty_in - _qty; + cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; + } else { + cutText [format[(localize "str_epoch_player_185"),_textPartIn] , "PLAIN DOWN"]; + }; + }; }; - -DZE_ActionInProgress = false; +DZE_ActionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_backpacks.sqf b/SQF/dayz_code/actions/trade_backpacks.sqf index 5d1252ac2..939b3f319 100644 --- a/SQF/dayz_code/actions/trade_backpacks.sqf +++ b/SQF/dayz_code/actions/trade_backpacks.sqf @@ -6,6 +6,8 @@ DZE_ActionInProgress = true; _activatingPlayer = player; +diag_log format["DEBUG BACKPACK: %1", _this]; + _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; _qty_out = (_this select 3) select 2; @@ -14,89 +16,96 @@ _buy_o_sell = (_this select 3) select 4; _textPartIn = (_this select 3) select 5; _textPartOut = (_this select 3) select 6; _traderID = (_this select 3) select 7; -_bos = 0; -if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; -} else { +_bos = 0; +if(_buy_o_sell == "sell") then { _bos = 1; - _qty = 0; - _bag = unitBackpack player; - _class = typeOf _bag; - if(_class == _part_in) then { - _qty = 1; - }; }; -if (_qty >= _qty_in) then { - - cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; +cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; - [1,1] call dayz_HungerThirst; - // force animation - player playActionNow "Medic"; +// force animation +player playActionNow "Medic"; +[1,1] call dayz_HungerThirst; + +r_interrupt = false; +_animState = animationState player; +r_doLoop = true; +_started = false; +_finished = false; - r_interrupt = false; +while {r_doLoop} do { _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { - _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; - }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; + _isMedic = ["medic",_animState] call fnc_inString; + if (_isMedic) then { + _started = true; }; - r_doLoop = false; - - if (!_finished) exitWith { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; - }; - cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; + 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 { +if (!_finished) exitWith { + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + DZE_ActionInProgress = false; + cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; +}; - // Double check we still have parts - if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; - } else { - _qty = 0; - _bag = unitBackpack player; - _class = typeOf _bag; - if(_class == _part_in) then { - _qty = 1; - }; +if (_finished) then { + + _canAfford = false; + if(_bos == 1) then { + + //sell + _qty = 0; + _bag = unitBackpack player; + _class = typeOf _bag; + if(_class == _part_in) then { + _qty = 1; }; - if (_qty >= _qty_in) then { - - //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; - if (isNil "_bag") then { _bag = "Unknown Backpack" }; - if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - if(_bos == 1) then { - // Selling - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; - } else { - // Buying - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + if((typeOf (unitBackpack player)) == _part_in) then { + removeBackpack player; + _canAfford = [[[_part_out,_qty_out]],1] call epoch_returnChange; }; - publicVariableServer "PVDZE_obj_Trade"; + }; + + } else { + + //buy + _trade_total = [[_part_in,_qty_in]] call epoch_itemCost; + _total_currency = call epoch_totalCurrency; + _return_change = _total_currency - _trade_total; + if (_return_change >= 0) then { + _canAfford = true; + }; + }; + + if (_canAfford) then { + + //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; + if (isNil "_bag") then { _bag = "Unknown Backpack" }; + if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; + } else { + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + }; + publicVariableServer "PVDZE_obj_Trade"; - //diag_log format["DEBUG Starting to wait for answer: %1", PVDZE_obj_Trade]; + if(_bos == 0) then { waitUntil {!isNil "dayzTradeResult"}; @@ -104,38 +113,25 @@ if (_qty >= _qty_in) then { if(dayzTradeResult == "PASS") then { - if(_buy_o_sell == "buy") then { - - _num_removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove); - if(_num_removed == _qty_in) then { - removeBackpack player; - player addBackpack _part_out; - }; - } else { - // Sell - if((typeOf (unitBackpack player)) == _part_in) then { - removeBackpack player; - for "_x" from 1 to _qty_out do { - player addMagazine _part_out; - }; - }; + _done = [[[_part_in,_qty_in]],0] call epoch_returnChange; + if (_done) then { + removeBackpack player; + player addBackpack _part_out; + cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; }; - cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; - - {player removeAction _x} forEach s_player_parts;s_player_parts = []; - s_player_parts_crtl = -1; - } else { cutText [format[(localize "str_epoch_player_183"),_textPartOut] , "PLAIN DOWN"]; }; - dayzTradeResult = nil; + + } else { + cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; }; + dayzTradeResult = nil; + } else { + _needed = _qty_in - _qty; + cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; }; - -} else { - _needed = _qty_in - _qty; - cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; }; -DZE_ActionInProgress = false; +DZE_ActionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/trade_items.sqf b/SQF/dayz_code/actions/trade_items.sqf index 15908e38f..6e2dd417f 100644 --- a/SQF/dayz_code/actions/trade_items.sqf +++ b/SQF/dayz_code/actions/trade_items.sqf @@ -15,8 +15,6 @@ _textPartIn = (_this select 3) select 5; _textPartOut = (_this select 3) select 6; _traderID = (_this select 3) select 7; -_removed = 0; - _bos = 0; if(_buy_o_sell == "sell") then { _bos = 1; @@ -29,6 +27,7 @@ r_autoTrade = true; while {r_autoTrade} do { _removed = 0; + cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; [1,1] call dayz_HungerThirst; player playActionNow "Medic"; @@ -113,19 +112,16 @@ while {r_autoTrade} do { publicVariableServer "PVDZE_obj_Trade"; if(_bos == 0) then { - // only wait for result when buying waitUntil {!isNil "dayzTradeResult"}; - if(dayzTradeResult == "PASS") then { - _done = [[[_part_in,_qty_in]],0] call epoch_returnChange; if (_done) then { for "_x" from 1 to _qty_out do { player addMagazine _part_out; }; + cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; }; - cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; }; } else { cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; diff --git a/SQF/dayz_code/actions/trade_weapons.sqf b/SQF/dayz_code/actions/trade_weapons.sqf index b165646fe..86fa282b1 100644 --- a/SQF/dayz_code/actions/trade_weapons.sqf +++ b/SQF/dayz_code/actions/trade_weapons.sqf @@ -6,6 +6,8 @@ DZE_ActionInProgress = true; _activatingPlayer = player; +diag_log format["DEBUG WEAPONS: %1", _this]; + _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; _qty_out = (_this select 3) select 2; @@ -14,118 +16,170 @@ _buy_o_sell = (_this select 3) select 4; _textPartIn = (_this select 3) select 5; _textPartOut = (_this select 3) select 6; _traderID = (_this select 3) select 7; -_bos = 0; -if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; +_bos = 0; +_abort = false; +_msg = ""; +if(_buy_o_sell == "sell") then { + _bos = 1; + + _msg = "Need the weapon in your hands before you can sell it."; + _config = (configFile >> "CfgWeapons" >> _part_in); + _configName = configName(_config); + + _abort = (!(_configName in (weapons player))); + + if(_isToolBelt or _isBinocs) then { + _msg = "Need the item on your toolbelt before you can sell it."; + }; } else { - _qty = {_x == _part_in} count weapons player; - _bos = 1; + + // buying item type must NOT exist if rifle or pistol + _msg = "Drop or sell your current weapon before you can buy a new one."; + _config = (configFile >> "CfgWeapons" >> _part_out); + _configName = configName(_config); + _wepType = getNumber(_config >> "Type"); + + _isPistol = (_wepType == 2); + _isRifle = (_wepType == 1); + _isToolBelt = (_wepType == 131072); + _isBinocs = (_wepType == 4096); + + if (_isRifle) then { + _abort = ((primaryWeapon player) != ""); + }; + if (_isPistol) then { + _secondaryWeapon = ""; + { + if ((getNumber (configFile >> "CfgWeapons" >> _x >> "Type")) == 2) exitWith { + _secondaryWeapon = _x; + }; + } forEach (weapons player); + _abort = (_secondaryWeapon != ""); + }; + if(_isToolBelt or _isBinocs) then { + _abort = (_configName in (weapons player)); + _msg = "Drop or sell your current toolbelt item before you can buy a new one."; + }; }; -if (_qty >= _qty_in) then { +if (_abort) exitWith { + cutText [_msg, "PLAIN DOWN"]; + DZE_ActionInProgress = false; +}; - cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; +cutText [(localize "str_epoch_player_105"), "PLAIN DOWN"]; - [1,1] call dayz_HungerThirst; - // force animation - player playActionNow "Medic"; +// force animation +player playActionNow "Medic"; +[1,1] call dayz_HungerThirst; - //_dis=20; - //_sfx = "repair"; - //[player,_sfx,0,false,_dis] call dayz_zombieSpeak; - //[player,_dis,true,(getPosATL player)] spawn player_alertZombies; - - r_interrupt = false; +r_interrupt = false; +_animState = animationState player; +r_doLoop = true; +_started = false; +_finished = false; + +while {r_doLoop} do { _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { - _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; - }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; + _isMedic = ["medic",_animState] call fnc_inString; + if (_isMedic) then { + _started = true; }; - r_doLoop = false; - - if (!_finished) exitWith { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; - }; - cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; + 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 { +if (!_finished) exitWith { + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + DZE_ActionInProgress = false; + cutText [(localize "str_epoch_player_106") , "PLAIN DOWN"]; +}; - // double check for all parts - if(_buy_o_sell == "buy") then { - _qty = {_x == _part_in} count magazines player; - } else { - _qty = {_x == _part_in} count weapons player; - }; +if (_finished) then { + _canAfford = false; + if(_bos == 1) then { + + //sell + _qty = {_x == _part_in} count weapons player; if (_qty >= _qty_in) then { - - //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; - if (isNil "_part_out") then { _part_out = "Unknown Weapon/Magazine" }; - if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; - if(_bos == 1) then { - // Selling - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; - } else { - // Buying - PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + _part_inClass = configFile >> "CfgWeapons" >> _part_in; + _removed = ([player,_part_inClass,_qty_in] call BIS_fnc_invRemove); + if (_removed == _qty_in) then { + _canAfford = [[[_part_out,_qty_out]],1] call epoch_returnChange; }; - publicVariableServer "PVDZE_obj_Trade"; + }; + + } else { + + //buy + _trade_total = [[_part_in,_qty_in]] call epoch_itemCost; + _total_currency = call epoch_totalCurrency; + _return_change = _total_currency - _trade_total; + if (_return_change >= 0) then { + _canAfford = true; + }; + }; + + if (_canAfford) then { + + //["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure; + if (isNil "_part_out") then { _part_out = "Unknown Weapon/Magazine" }; + if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" }; + if(_bos == 1) then { + // Selling + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_in,inTraderCity,_part_out,_qty_out]; + } else { + // Buying + PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity,_part_in,_qty_in]; + }; + publicVariableServer "PVDZE_obj_Trade"; + if(_bos == 0) then { + waitUntil {!isNil "dayzTradeResult"}; //diag_log format["DEBUG Complete Trade: %1", dayzTradeResult]; - + if(dayzTradeResult == "PASS") then { - - _removed = ([player,_part_in,_qty_in] call BIS_fnc_invRemove); - - if(_removed == _qty_in) then { - for "_x" from 1 to _qty_out do { - if(_buy_o_sell == "buy") then { - player addWeapon _part_out; - } else { - player addMagazine _part_out; - }; - }; + + _done = [[[_part_in,_qty_in]],0] call epoch_returnChange; + if (_done) then { + player addWeapon _part_out; cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; }; - - - - {player removeAction _x} forEach s_player_parts;s_player_parts = []; - s_player_parts_crtl = -1; } else { cutText [format[(localize "str_epoch_player_183"),_textPartOut] , "PLAIN DOWN"]; }; - dayzTradeResult = nil; + } else { + // selling + cutText [format[(localize "str_epoch_player_186"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"]; }; - }; -} else { - _needed = _qty_in - _qty; - cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; + dayzTradeResult = nil; + } else { + if(_bos == 0) then { + _qty = {_x == _part_in} count magazines player; + } else { + _qty = {_x == _part_in} count weapons player; + }; + _needed = _qty_in - _qty; + cutText [format[(localize "str_epoch_player_184"),_needed,_textPartIn] , "PLAIN DOWN"]; + }; }; DZE_ActionInProgress = false; diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index 1b34cebfa..5cc9a519a 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -111,7 +111,7 @@ _allowedDistance = 4; _isAir = cursorTarget isKindOf "Air"; _isShip = cursorTarget isKindOf "Ship"; if(_isAir or _isShip) then { - _allowedDistance = 6; + _allowedDistance = 8; }; if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cursorTarget < _allowedDistance) and _canDo) then { //Has some kind of target diff --git a/SQF/dayz_code/compile/player_traderMenu.sqf b/SQF/dayz_code/compile/player_traderMenu.sqf index d3f481cb0..53e327942 100644 --- a/SQF/dayz_code/compile/player_traderMenu.sqf +++ b/SQF/dayz_code/compile/player_traderMenu.sqf @@ -123,7 +123,7 @@ TraderDialogLoadItemList = { if (_name isKindOf "Ship") then { _distance = dayz_sellDistance_boat; }; - _count = {(typeOf _x) == _name} count (nearestObjects [player, [_name], _distance]); + _count = {(typeOf _x) == _name} count (nearestObjects [(getPosATL player), [_name], _distance]); }; }; }; diff --git a/Server Files/Battleye/createvehicle.txt b/Server Files/Battleye/createvehicle.txt index af56e6348..7ee420adc 100644 --- a/Server Files/Battleye/createvehicle.txt +++ b/Server Files/Battleye/createvehicle.txt @@ -27,7 +27,6 @@ 5 "_30" 5 "_ied" 5 "_CRV7" -5 "_MEEWS" 5 "_SMAW" 5 "_GRAD" 5 "_SABOT" diff --git a/Server Files/Binaries/Readme.txt b/Server Files/Binaries/Readme.txt index ac09f34d2..2185c1875 100644 --- a/Server Files/Binaries/Readme.txt +++ b/Server Files/Binaries/Readme.txt @@ -1 +1 @@ -move these to arma 2 oa root. \ No newline at end of file +Move these to arma 2 oa root. \ No newline at end of file diff --git a/Server Files/Configs/DayZ_Epoch_instance_24_Napf.bat b/Server Files/Configs/DayZ_Epoch_instance_24_Napf.bat new file mode 100644 index 000000000..ea70ef0f6 --- /dev/null +++ b/Server Files/Configs/DayZ_Epoch_instance_24_Napf.bat @@ -0,0 +1,2 @@ +@echo off +start "arma2" /min "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_24_Napf\config.cfg" "-cfg=instance_24_Napf\basic.cfg" "-profiles=instance_24_Napf" -name=instance_24_Napf "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" diff --git a/Server Files/Configs/DayZ_Epoch_instance_25_sauerland.bat b/Server Files/Configs/DayZ_Epoch_instance_25_sauerland.bat new file mode 100644 index 000000000..b9cd02457 --- /dev/null +++ b/Server Files/Configs/DayZ_Epoch_instance_25_sauerland.bat @@ -0,0 +1,2 @@ +@echo off +start "arma2" /min "Expansion\beta\arma2oaserver.exe" -port=2302 "-config=instance_25_sauerland\config.cfg" "-cfg=instance_25_sauerland\basic.cfg" "-profiles=instance_25_sauerland" -name=instance_25_sauerland "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" diff --git a/Server Files/Configs/instance_24_Napf/HiveExt.ini b/Server Files/Configs/instance_24_Napf/HiveExt.ini new file mode 100644 index 000000000..3d72c42e4 --- /dev/null +++ b/Server Files/Configs/instance_24_Napf/HiveExt.ini @@ -0,0 +1,79 @@ +;This is a comment +;Comments above a certain setting will provide it's description + +;The format for a setting is +;Variable = Value + +;If you see a commented line of that form, it means that the setting is optional, and the Value shows the default +;To change from the default, simply uncomment the line and change the Value + +;This configuration file should be placed inside your server instance's configuration directory (like cfgdayz) + +[Time] +;Possible values: Local, Custom, Static +;You cannot use Static on OFFICIAL Hive, it will just revert to Local +Type = Static +;If using Custom type, offset from UTC in hours (can be negative as well) +;Offset = -8 +;If using Static type (Hour value always the same on every server start), the value (0-24) to set the Hour to +Hour = 13 + +[Database] +;Hostname or IP of the server to connect to +;If you leave this line commented or blank, HiveExt will connect to the OFFICIAL Hive, which requires registration +;See support.dayzmod.com for more information on what OFFICIAL Hive means, what are the rules, etc. +;If using OFFICIAL hive, the rest of the settings in this section have no effect +Host = localhost + +;Currently, only MySQL is supported +Type = MySQL + +;Port to connect to. The default is the default listening port of a server of the selected Type +;Instead of specifying Port, you can specify Socket and set Value to the socket name +Port = 3306 + +;Database name to connect to. +Database = dayz_epoch + +;Username to connect with +Username = dayz +;Password to authenticate with (default is blank) +Password = 123456 + +;If using OFFICIAL hive, the settings in this section have no effect, appropriate layout will be used +[Characters] +;The field name that Player's IDs are stored in (unique per game license) +;Some table layouts have this as PlayerID, and some as PlayerUID, that's why this is configurable +;IDField = PlayerUID +;The field name that Player's World Position and rotation is stored in +;Enables you to run multiple different maps (different instances) off the same character table +;WSField = Worldspace + +;If using OFFICIAL hive, the settings in this section have no effect, as it will clean up by itself +[Objects] +;Which table should the objects be stored and fetched from ? +;Table = Object_DATA + +;Negative values will disable this feature +;0 means that ALL empty placed items will be deleted every server restart +;A positive number is how old (in days) a placed empty item must be, in order for it to be deleted +;CleanupPlacedAfterDays = 6 + +;Flag indicating whether hiveext should detect vehicles out of map boundaries (X < 0, or Y > 15360) and reset their position to [] +;Note: YOU MUST have a proper dayz_server.pbo that supports this feature, otherwise you will get script errors +;You can find that file under the SQF directory for your server version +;ResetOOBVehicles = false + +;If using OFFICIAL hive, the settings in this section have no effect, it will manage objects on its own +[ObjectDB] +;Setting this to true separates the Object fetches from the Character fetches +;That means that the Object Table must be on this other database +;Use = false + +;The settings here have the same meaning as in [Database], and are only used if the setting above is set to true +;Type = MySQL +;Host = localhost +;Port = 3306 +;Database = dayz +;Username = root +;Password = \ No newline at end of file diff --git a/Server Files/Configs/instance_24_Napf/config.cfg b/Server Files/Configs/instance_24_Napf/config.cfg new file mode 100644 index 000000000..6fd03b2cb --- /dev/null +++ b/Server Files/Configs/instance_24_Napf/config.cfg @@ -0,0 +1,35 @@ +hostName = "DayZ Epoch Napf Server (1.0.4/103718)"; +password = ""; +passwordAdmin = "changeme"; +maxPlayers = 50; +logFile = "server_log.txt"; +voteThreshold = 2; +voteMissionPlayers = 3; +reportingIP = "arma2oapc.master.gamespy.com"; +timeStampFormat = "short"; +motd[] = {"DayZ Epoch","Have fun!"}; +motdInterval = 0; +vonCodecQuality = 11; +disableVoN = 0; +kickduplicate = 1; +verifySignatures = 2; +persistent = 1; +BattlEye = 1; +doubleIdDetected = ""; +onUserConnected = ""; +onUserDisconnected = ""; +onUnsignedData = "kick (_this select 0)"; +onHackedData = "kick (_this select 0)"; +onDifferentData = ""; +regularCheck = ""; +requiredBuild = 103718; + +class Missions +{ + class Mission1 + { + template = "DayZ_Epoch_24.Napf"; + difficulty="veteran"; + }; + +}; \ No newline at end of file diff --git a/Server Files/Configs/instance_25_sauerland/HiveExt.ini b/Server Files/Configs/instance_25_sauerland/HiveExt.ini new file mode 100644 index 000000000..3d72c42e4 --- /dev/null +++ b/Server Files/Configs/instance_25_sauerland/HiveExt.ini @@ -0,0 +1,79 @@ +;This is a comment +;Comments above a certain setting will provide it's description + +;The format for a setting is +;Variable = Value + +;If you see a commented line of that form, it means that the setting is optional, and the Value shows the default +;To change from the default, simply uncomment the line and change the Value + +;This configuration file should be placed inside your server instance's configuration directory (like cfgdayz) + +[Time] +;Possible values: Local, Custom, Static +;You cannot use Static on OFFICIAL Hive, it will just revert to Local +Type = Static +;If using Custom type, offset from UTC in hours (can be negative as well) +;Offset = -8 +;If using Static type (Hour value always the same on every server start), the value (0-24) to set the Hour to +Hour = 13 + +[Database] +;Hostname or IP of the server to connect to +;If you leave this line commented or blank, HiveExt will connect to the OFFICIAL Hive, which requires registration +;See support.dayzmod.com for more information on what OFFICIAL Hive means, what are the rules, etc. +;If using OFFICIAL hive, the rest of the settings in this section have no effect +Host = localhost + +;Currently, only MySQL is supported +Type = MySQL + +;Port to connect to. The default is the default listening port of a server of the selected Type +;Instead of specifying Port, you can specify Socket and set Value to the socket name +Port = 3306 + +;Database name to connect to. +Database = dayz_epoch + +;Username to connect with +Username = dayz +;Password to authenticate with (default is blank) +Password = 123456 + +;If using OFFICIAL hive, the settings in this section have no effect, appropriate layout will be used +[Characters] +;The field name that Player's IDs are stored in (unique per game license) +;Some table layouts have this as PlayerID, and some as PlayerUID, that's why this is configurable +;IDField = PlayerUID +;The field name that Player's World Position and rotation is stored in +;Enables you to run multiple different maps (different instances) off the same character table +;WSField = Worldspace + +;If using OFFICIAL hive, the settings in this section have no effect, as it will clean up by itself +[Objects] +;Which table should the objects be stored and fetched from ? +;Table = Object_DATA + +;Negative values will disable this feature +;0 means that ALL empty placed items will be deleted every server restart +;A positive number is how old (in days) a placed empty item must be, in order for it to be deleted +;CleanupPlacedAfterDays = 6 + +;Flag indicating whether hiveext should detect vehicles out of map boundaries (X < 0, or Y > 15360) and reset their position to [] +;Note: YOU MUST have a proper dayz_server.pbo that supports this feature, otherwise you will get script errors +;You can find that file under the SQF directory for your server version +;ResetOOBVehicles = false + +;If using OFFICIAL hive, the settings in this section have no effect, it will manage objects on its own +[ObjectDB] +;Setting this to true separates the Object fetches from the Character fetches +;That means that the Object Table must be on this other database +;Use = false + +;The settings here have the same meaning as in [Database], and are only used if the setting above is set to true +;Type = MySQL +;Host = localhost +;Port = 3306 +;Database = dayz +;Username = root +;Password = \ No newline at end of file diff --git a/Server Files/Configs/instance_25_sauerland/config.cfg b/Server Files/Configs/instance_25_sauerland/config.cfg new file mode 100644 index 000000000..ffc324bdb --- /dev/null +++ b/Server Files/Configs/instance_25_sauerland/config.cfg @@ -0,0 +1,35 @@ +hostName = "DayZ Epoch Sauerland Server (1.0.4/103718)"; +password = ""; +passwordAdmin = "changeme"; +maxPlayers = 50; +logFile = "server_log.txt"; +voteThreshold = 2; +voteMissionPlayers = 3; +reportingIP = "arma2oapc.master.gamespy.com"; +timeStampFormat = "short"; +motd[] = {"DayZ Epoch","Have fun!"}; +motdInterval = 0; +vonCodecQuality = 11; +disableVoN = 0; +kickduplicate = 1; +verifySignatures = 2; +persistent = 1; +BattlEye = 1; +doubleIdDetected = ""; +onUserConnected = ""; +onUserDisconnected = ""; +onUnsignedData = "kick (_this select 0)"; +onHackedData = "kick (_this select 0)"; +onDifferentData = ""; +regularCheck = ""; +requiredBuild = 103718; + +class Missions +{ + class Mission1 + { + template = "DayZ_Epoch_25.sauerland"; + difficulty="veteran"; + }; + +}; \ No newline at end of file diff --git a/Server Files/SQL/1_0_4_updates.sql b/Server Files/SQL/1_0_4_updates.sql index e741efcce..0893e7706 100644 --- a/Server Files/SQL/1_0_4_updates.sql +++ b/Server Files/SQL/1_0_4_updates.sql @@ -1,88 +1,33 @@ -- ---------------------------- -- Set any buy value of copper to 2 silver -- ---------------------------- -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[2,"ItemCopperBar10oz",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[1,"ItemCopperBar10oz",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[9,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[8,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[7,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[6,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[5,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[4,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[3,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `buy`= '[4,"ItemSilverBar10oz",1]' WHERE `buy`='[2,"ItemCopperBar10oz",1]'; +UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar10oz",1]' WHERE `buy`='[1,"ItemCopperBar10oz",1]'; +UPDATE `Traders_DATA` SET `buy`= '[9,"ItemSilverBar",1]' WHERE `buy`='[9,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `buy`= '[8,"ItemSilverBar",1]' WHERE `buy`='[8,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `buy`= '[7,"ItemSilverBar",1]' WHERE `buy`='[7,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `buy`= '[6,"ItemSilverBar",1]' WHERE `buy`='[6,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `buy`= '[5,"ItemSilverBar",1]' WHERE `buy`='[5,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `buy`= '[4,"ItemSilverBar",1]' WHERE `buy`='[4,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `buy`= '[3,"ItemSilverBar",1]' WHERE `buy`='[3,"ItemCopperBar",1]'; UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[2,"ItemCopperBar",1]'; UPDATE `Traders_DATA` SET `buy`= '[2,"ItemSilverBar",1]' WHERE `buy`='[1,"ItemCopperBar",1]'; - -- ---------------------------- --- Set any sell value of copper to 1 silver +-- Set any sell value of copper to 1 silver only run if not updating -- ---------------------------- -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[2,"ItemCopperBar10oz",1]'; -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[1,"ItemCopperBar10oz",1]'; -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[9,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[8,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[7,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[6,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[5,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[4,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[3,"ItemCopperBar",1]'; -UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[2,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `sell`= '[2,"ItemSilverBar10oz",1]' WHERE `sell`='[2,"ItemCopperBar10oz",1]'; +UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar10oz",1]' WHERE `sell`='[1,"ItemCopperBar10oz",1]'; +UPDATE `Traders_DATA` SET `sell`= '[9,"ItemSilverBar",1]' WHERE `sell`='[9,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `sell`= '[8,"ItemSilverBar",1]' WHERE `sell`='[8,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `sell`= '[7,"ItemSilverBar",1]' WHERE `sell`='[7,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `sell`= '[6,"ItemSilverBar",1]' WHERE `sell`='[6,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `sell`= '[5,"ItemSilverBar",1]' WHERE `sell`='[5,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `sell`= '[4,"ItemSilverBar",1]' WHERE `sell`='[4,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `sell`= '[3,"ItemSilverBar",1]' WHERE `sell`='[3,"ItemCopperBar",1]'; +UPDATE `Traders_DATA` SET `sell`= '[2,"ItemSilverBar",1]' WHERE `sell`='[2,"ItemCopperBar",1]'; UPDATE `Traders_DATA` SET `sell`= '[1,"ItemSilverBar",1]' WHERE `sell`='[1,"ItemCopperBar",1]'; --- ---------------------------- --- Set any buy value of 30 silver to 1 gold --- ---------------------------- -UPDATE `Traders_DATA` SET `buy`= '[1,"ItemGoldBar",1]' WHERE `buy`='[3,"ItemSilverBar10oz",1]]'; - --- ---------------------------- - --- ---------------------------- --- PRICE REVIEW --- ---------------------------- - -UPDATE `Traders_DATA` SET `buy`= '[4,"ItemGoldBar10oz",1]' WHERE `item`='["BAF_LRR_scoped",3]'; -UPDATE `Traders_DATA` SET `buy`= '[5,"ItemGoldBar",1]' WHERE `item`='["5Rnd_86x70_L115A1",1]'; -UPDATE `Traders_DATA` SET `buy`= '[3,"ItemGoldBar10oz",1]' WHERE `item`='["VSS_vintorez",3]'; -UPDATE `Traders_DATA` SET `buy`= '[3,"ItemGoldBar",1]' WHERE `item`='["20Rnd_9x39_SP5_VSS",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["MK_48_DZ",3]'; -UPDATE `Traders_DATA` SET `buy`= '[3,"ItemGoldBar",1]' WHERE `item`='["100Rnd_762x51_M240",1]'; -UPDATE `Traders_DATA` SET `buy`= '[3,"ItemGoldBar",1]' WHERE `item`='["100Rnd_762x54_PK",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["m240_scoped_EP1_DZE",3]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["M249_m145_EP1_DZE",3]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar",1]' WHERE `item`='["200Rnd_556x45_M249",1]'; - -UPDATE `Traders_DATA` SET `buy`= '[6,"ItemBriefcase100oz",1]' WHERE `item`='["HMMWV_M1151_M2_CZ_DES_EP1_DZE",2]'; -UPDATE `Traders_DATA` SET `buy`= '[7,"ItemGoldBar10oz",1]' WHERE `item`='["GAZ_Vodnik_DZE",2]' and `buy`='[6,"ItemGoldBar10oz",1]'; -UPDATE `Traders_DATA` SET `sell`= '[5,"ItemGoldBar10oz",1]' WHERE `item`='["GAZ_Vodnik_DZE",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_TK_CIV_EP1",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_Blue",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_Charcoal",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_Green",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_Orange",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_Pink",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_Red",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_Silver",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_White",2]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar10oz",1]' WHERE `item`='["SUV_Yellow",2]'; - - -UPDATE `Traders_DATA` SET `buy`= '[5,"ItemGoldBar",1]' WHERE `item`='["PartEngine",1]'; -UPDATE `Traders_DATA` SET `buy`= '[5,"ItemGoldBar",1]' WHERE `item`='["PartVRotor",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar",1]' WHERE `item`='["PartWheel",1]'; -UPDATE `Traders_DATA` SET `buy`= '[1,"ItemGoldBar",1]' WHERE `item`='["PartGlass",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar",1]' WHERE `item`='["PartGeneric",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar",1]' WHERE `item`='["PartFueltank",1]'; - - -UPDATE `Traders_DATA` SET `buy`= '[4,"ItemGoldBar",1]' WHERE `item`='["Binocular_Vector",3]'; -UPDATE `Traders_DATA` SET `buy`= '[4,"ItemGoldBar",1]' WHERE `item`='["NVGoggles",3]'; - -UPDATE `Traders_DATA` SET `buy`= '[1,"ItemGoldBar",1]' WHERE `item`='["FoodrabbitCooked",1]'; -UPDATE `Traders_DATA` SET `buy`= '[2,"ItemGoldBar",1]' WHERE `item`='["ItemTroutCooked",1]'; -UPDATE `Traders_DATA` SET `buy`= '[3,"ItemGoldBar",1]' WHERE `item`='["ItemSeaBassCooked",1]'; -UPDATE `Traders_DATA` SET `buy`= '[4,"ItemGoldBar",1]' WHERE `item`='["ItemTunaCooked",1]'; -UPDATE `Traders_DATA` SET `buy`= '[1,"ItemSilverBar10oz",1]' WHERE `item`='["FoodMRE",1]'; - -- ---------------------------- -- WEAPON UPDATE -- ---------------------------- diff --git a/Server Files/Server Files.7z b/Server Files/Server Files.7z new file mode 100644 index 000000000..208a8e0d2 Binary files /dev/null and b/Server Files/Server Files.7z differ