diff --git a/SQF/dayz_code/Configs/CfgMagazines.hpp b/SQF/dayz_code/Configs/CfgMagazines.hpp index 3f7fc91af..4ca32e0cc 100644 --- a/SQF/dayz_code/Configs/CfgMagazines.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines.hpp @@ -2368,12 +2368,12 @@ class CfgMagazines { class ItemActions { class Crafting { - text = "Craft Cinder Block Wall"; + text = "Craft Half Wall"; script = "spawn player_craftItem;"; neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"cinder_wall_kit",1}}; - input[] = {{"CinderBlocks",3}}; + input[] = {{"CinderBlocks",3},{"MortarBucket",1}}; }; }; @@ -2395,7 +2395,7 @@ class CfgMagazines { count = 1; type = 256; displayName = "Plywood Pack"; - model = "\dayz_equip\models\plywood_pack.p3d"; + model = "\z\addons\dayz_epoch\models\plywood_pack.p3d"; picture = "\z\addons\dayz_epoch\pictures\equip_plywood_pack_CA.paa"; descriptionShort = "Plywood in a stack"; weight = 12; @@ -2547,9 +2547,6 @@ class CfgMagazines { descriptionShort = "$STR_EQUIP_DESC_30"; }; - - - // Skins class SkinBase: CA_Magazine { diff --git a/SQF/dayz_code/Configs/cfgLoot.hpp b/SQF/dayz_code/Configs/cfgLoot.hpp index 9a2ebfb24..1be46a1b1 100644 --- a/SQF/dayz_code/Configs/cfgLoot.hpp +++ b/SQF/dayz_code/Configs/cfgLoot.hpp @@ -438,8 +438,8 @@ class CfgLoot { "ItemComboLock" }, { - 0.14, - 0.12, + 0.1, + 0.1, 0.09, 0.11, 0.09, @@ -447,11 +447,11 @@ class CfgLoot { 0.06, 0.06, 0.06, - 0.12, + 0.1, 0.06, 0.01, - 0.01, - 0.01 + 0.03, + 0.07 } }; diff --git a/SQF/dayz_code/Configs/cfgVehicles.hpp b/SQF/dayz_code/Configs/cfgVehicles.hpp index 536eee08d..45aaec9c7 100644 --- a/SQF/dayz_code/Configs/cfgVehicles.hpp +++ b/SQF/dayz_code/Configs/cfgVehicles.hpp @@ -1608,12 +1608,12 @@ class CfgVehicles { scope = 2; destrType = "DestructBuilding"; cost = 100; - offset[] = {0,4,0}; - model="\z\addons\dayz_epoch\models\Cinder_Wall_Half.p3d"; + offset[] = {0,1.5,0}; + model="\z\addons\dayz_epoch\models\cinder_wall_half.p3d"; icon = "\ca\data\data\Unknown_object.paa"; mapSize = 2; - armor = 800; - displayName = "Cinder Block Wall 1/2"; + armor = 1600; + displayName = "Half Cinder Block Wall"; vehicleClass = "Fortifications"; upgradeBuilding[] = {"CinderWall_DZ",{{"CinderBlocks",4},{"MortarBucket",1}}}; maintainBuilding[] = {{"MortarBucket",1}}; @@ -1624,11 +1624,11 @@ class CfgVehicles { scope = 2; destrType = "DestructBuilding"; cost = 100; - offset[] = {0,4,0}; - model="\z\addons\dayz_epoch\models\Cinder_Wall.p3d"; + offset[] = {0,1.5,0}; + model="\z\addons\dayz_epoch\models\cinder_wall_full.p3d"; icon = "\ca\data\data\Unknown_object.paa"; mapSize = 2; - armor = 800; + armor = 1600; displayName = "Cinder Block Wall"; vehicleClass = "Fortifications"; maintainBuilding[] = {{"MortarBucket",1}}; @@ -1850,7 +1850,7 @@ class CfgVehicles { destrType = "DestructNo"; cost = 100; offset[] = {0,1.5,0}; - model="\z\addons\dayz_epoch\models\Cinder_Wall_Half_ghost.p3d"; + model="\z\addons\dayz_epoch\models\cinder_wall_half_ghost.p3d"; icon = "\ca\data\data\Unknown_object.paa"; mapSize = 2; armor = 1000; @@ -1863,7 +1863,7 @@ class CfgVehicles { destrType = "DestructNo"; cost = 100; offset[] = {0,1.5,0}; - model="\z\addons\dayz_epoch\models\Cinder_Wall_ghost.p3d"; + model="\z\addons\dayz_epoch\models\cinder_wall_full_ghost.p3d"; icon = "\ca\data\data\Unknown_object.paa"; mapSize = 2; armor = 1000; diff --git a/SQF/dayz_code/Configs/rscTitles.hpp b/SQF/dayz_code/Configs/rscTitles.hpp index 500ee912f..c87c9b5d1 100644 --- a/SQF/dayz_code/Configs/rscTitles.hpp +++ b/SQF/dayz_code/Configs/rscTitles.hpp @@ -149,7 +149,7 @@ class RscDisplayMain : RscStandardDisplay class DAYZ_Version : CA_Version { idc = -1; - text = "DayZ Epoch 1.0.2"; + text = "DayZ Epoch 1.0.2.1"; y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)"; }; delete CA_TitleMainMenu; diff --git a/SQF/dayz_code/actions/build.sqf b/SQF/dayz_code/actions/build.sqf deleted file mode 100644 index 887e34238..000000000 --- a/SQF/dayz_code/actions/build.sqf +++ /dev/null @@ -1,119 +0,0 @@ -private ["_location","_isOk","_dir","_classname","_item","_cancel","_location3","_location4","_location1","_location2","_counter","_hasbuilditem","_dis","_sfx","_object","_onLadder","_isWater","_text","_offset_x","_offset_y","_offset_z","_offset_z_attach","_tmpbuilt","_built_location"]; - -if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; }; -TradeInprogress = true; - -_location = player modeltoworld [0,1,0]; -_location set [2,0]; -_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; -_isWater = (surfaceIsWater _location) or dayz_isSwimming; - -if(_isWater) exitWith {cutText [localize "str_player_26", "PLAIN DOWN"];}; -if(_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"];}; - -if (vehicle player != player) exitWith {cutText ["You may not build while in a vehicle", "PLAIN DOWN"]}; - -_item = _this; -_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create"); -_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); - -_hasbuilditem = _this in magazines player; - -if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]}; - -_dir = getDir player; - -_offset_x = 0; -_offset_y = 1.5; -_offset_z = 0; -_offset_z_attach = 0.5; - -// Start Preview loop -_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; -_tmpbuilt setdir _dir; -_tmpbuilt attachTo [player,[_offset_x,_offset_y,_offset_z_attach]]; - -_cancel = false; -_counter = 0; -_isOk = true; - -while {_isOk} do { - - if(_counter == 0) then { - cutText ["Planning construction stand still 5 seconds to build.", "PLAIN DOWN"]; - sleep 5; - _location1 = getPosATL player; - sleep 5; - _location2 = getPosATL player; - - if(_location1 distance _location2 < 0.1) exitWith { - - cutText ["Started construction move within 5 seconds to cancel.", "PLAIN DOWN"]; - _location3 = getPosATL player; - sleep 5; - _location4 = getPosATL player; - - if(_location3 distance _location4 > 0.1) exitWith { - _isOk = false; - _cancel = true; - }; - - _isOk = false; - }; - }; - if(_counter >= 1) exitWith { - _isOk = false; - _cancel = true; - }; - _counter = _counter + 1; -}; - -detach _tmpbuilt; - -// Get location of detached tmp built -_built_location = (getPosATL _tmpbuilt); - -// force to ground -_built_location set [2,0]; - -if(!_cancel) then { - - _hasbuilditem = _this in magazines player; - if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]}; - - _dir = getDir player; - - player removeMagazine _item; - - //disableSerialization; - //call dayz_forceSave; - - - player playActionNow "Medic"; - sleep 1; - - _dis=20; - _sfx = "repair"; - [player,_sfx,0,false,_dis] call dayz_zombieSpeak; - [player,_dis,true,(getPosATL player)] spawn player_alertZombies; - - sleep 5; - - player allowDamage false; - _object = createVehicle [_classname, _built_location, [], 0, "CAN_COLLIDE"]; - _object setDir _dir; - player reveal _object; - - cutText [format[localize "str_build_01",_text], "PLAIN DOWN"]; - - //["dayzPublishObj",[dayz_characterID,_object,[_dir,_location],_classname]] call callRpcProcedure; - dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname]; - publicVariableServer "dayzPublishObj"; - - sleep 2; - player allowDamage true; - -} else { - cutText [format["Canceled construction of %1.",_text], "PLAIN DOWN"]; -}; -TradeInprogress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 858d72be3..149a8f57f 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -174,7 +174,7 @@ if (_hasrequireditem) then { _object attachTo [player]; }; - cutText ["Planning construction numpad 8 = up, numpad 2 = down, and numpad 5 to start building.", "PLAIN DOWN"]; + cutText ["Planning construction: PgUp = raise, PgDn = lower, Q or E = flip 180, and Space-Bar to start building.", "PLAIN DOWN"]; sleep 1; @@ -289,6 +289,9 @@ if (_hasrequireditem) then { if (r_interrupt or (player getVariable["combattimeout", 0] >= time)) then { r_doLoop = false; }; + if (DZE_cancelBuilding) exitWith { + r_doLoop = false; + }; sleep 0.1; }; r_doLoop = false; diff --git a/SQF/dayz_code/actions/player_chopWood.sqf b/SQF/dayz_code/actions/player_chopWood.sqf index f98b5870f..6aa5acfe1 100644 --- a/SQF/dayz_code/actions/player_chopWood.sqf +++ b/SQF/dayz_code/actions/player_chopWood.sqf @@ -5,7 +5,7 @@ */ private ["_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_animState","_isMedic","_proceed","_counter","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree"]; -if(TradeInprogress) exitWith { cutText ["Harvest wood already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nHarvest wood already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; // allowed trees list move this later @@ -90,7 +90,7 @@ if (count(_findNearestTree) >= 1) then { _counter = _counter + 1; }; - cutText [format["Chopping down tree, walk away at anytime to cancel. (%1/%2)", _counter, _countOut], "PLAIN DOWN"]; + cutText [format["\n\nChopping down tree, walk away at anytime to cancel. (%1/%2)", _counter, _countOut], "PLAIN DOWN"]; if(_counter == _countOut) exitWith { _isOk = false; @@ -115,7 +115,7 @@ if (count(_findNearestTree) >= 1) then { }; //diag_log format["DEBUG TREE DAMAGE: %1", _tree]; - cutText [format["%1 piles of wood has been successfully added in front of you.", _countOut], "PLAIN DOWN"]; + cutText [format["\n\n%1 piles of wood has been successfully added in front of you.", _countOut], "PLAIN DOWN"]; } else { r_interrupt = false; @@ -123,7 +123,7 @@ if (count(_findNearestTree) >= 1) then { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; }; - cutText ["Canceled Harvesting Wood.", "PLAIN DOWN"]; + cutText ["\n\nCanceled Harvesting Wood.", "PLAIN DOWN"]; }; } else { diff --git a/SQF/dayz_code/actions/player_copyKey.sqf b/SQF/dayz_code/actions/player_copyKey.sqf index 2a4050add..9fbdc1209 100644 --- a/SQF/dayz_code/actions/player_copyKey.sqf +++ b/SQF/dayz_code/actions/player_copyKey.sqf @@ -1,6 +1,6 @@ private ["_item","_config","_onLadder","_create","_started","_finished","_animState","_isMedic","_qty","_box","_num_removed","_text","_haskey","_hastoolweapon","_isNear","_hasTinBar"]; -if(TradeInprogress) exitWith { cutText ["Copy key already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nCopy key already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; _item = _this; @@ -14,16 +14,16 @@ _haskey = _this in weapons player; if (!_haskey) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_30"),_text] , "PLAIN DOWN"]}; _hastoolweapon = "ItemKeyKit" in weapons player; -if (!_hastoolweapon) exitWith {TradeInprogress = false; cutText ["Need Keymakers kit to make a copy of a key." , "PLAIN DOWN"]}; +if (!_hastoolweapon) exitWith {TradeInprogress = false; cutText ["\n\nNeed Keymakers kit to make a copy of a key." , "PLAIN DOWN"]}; -_isNear = {inflamed _x} count (position player nearObjects 2); -if(_isNear == 0) exitWith {TradeInprogress = false; cutText ["Key crafting needs a fire within 2 meters." , "PLAIN DOWN"]}; +_isNear = {inflamed _x} count (position player nearObjects 3); +if(_isNear == 0) exitWith {TradeInprogress = false; cutText ["\n\nKey crafting needs a fire within 3 meters." , "PLAIN DOWN"]}; call gear_ui_init; // require one tin bar per key _hasTinBar = "ItemTinBar" in magazines player; -if(!_hasTinBar) exitWith {TradeInprogress = false; cutText ["Key crafting requires a 1oz Tin Bar." , "PLAIN DOWN"]}; +if(!_hasTinBar) exitWith {TradeInprogress = false; cutText ["\n\nKey crafting requires a 1oz Tin Bar." , "PLAIN DOWN"]}; player playActionNow "Medic"; @@ -63,9 +63,9 @@ if(_finished) then { _qty = 1; _box = unitBackpack player; _box addWeaponCargoGlobal [_create,_qty]; - cutText ["Copied key has been added to your backpack." , "PLAIN DOWN"]; + cutText ["\n\nCopied key has been added to your backpack." , "PLAIN DOWN"]; } else { - cutText ["Canceled Key Crafting." , "PLAIN DOWN"]; + cutText ["\n\nCanceled Key Crafting." , "PLAIN DOWN"]; }; } else { r_interrupt = false; @@ -73,6 +73,6 @@ if(_finished) then { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; }; - cutText ["Canceled Key Crafting." , "PLAIN DOWN"]; + cutText ["\n\nCanceled Key Crafting." , "PLAIN DOWN"]; }; TradeInprogress = false; diff --git a/SQF/dayz_code/actions/player_craftItem.sqf b/SQF/dayz_code/actions/player_craftItem.sqf index 269941fda..fa29b3e63 100644 --- a/SQF/dayz_code/actions/player_craftItem.sqf +++ b/SQF/dayz_code/actions/player_craftItem.sqf @@ -3,9 +3,9 @@ Usage: spawn player_goFishing; Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. */ -private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"]; +private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item","_craft_doLoop"]; -if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; // temp array of removed parts @@ -40,7 +40,7 @@ if("workshop" in _needNear) then { }; if(_abort) exitWith { - cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; + cutText [format["\n\nCrafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; TradeInprogress = false; }; @@ -55,151 +55,159 @@ if (_canDo) then { _selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools"); _consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons"); - _missing = ""; - _missingTools = false; - { - _hastoolweapon = _x in weapons player; - if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; }; - } forEach _selectedRecipeTools; + _craft_doLoop = true; - if(!_missingTools) then { + while {_craft_doLoop} do { - //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; - //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; - - // Dry run to see if all parts are available. - _proceed = true; + _missing = ""; + _missingTools = false; { - _itemIn = _x select 0; - _countIn = _x select 1; + _hastoolweapon = _x in weapons player; + if(!_hastoolweapon) exitWith { _craft_doLoop = false; _missingTools = true; _missing = _x; }; + } forEach _selectedRecipeTools; + + if(!_missingTools) then { + + //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; + //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; + + // Dry run to see if all parts are available. + _proceed = true; + { + _itemIn = _x select 0; + _countIn = _x select 1; - //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; + //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; - // not neccessary - //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; + // not neccessary + //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; - // match against class and parentClass - _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; + // match against class and parentClass + _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; - if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; + if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } forEach _selectedRecipeInput; + } forEach _selectedRecipeInput; - // If all parts proceed - if (_proceed) then { + // If all parts proceed + if (_proceed) then { - cutText ["Crafting started", "PLAIN DOWN"]; + cutText ["\n\nCrafting started", "PLAIN DOWN"]; - player playActionNow "Medic"; + player playActionNow "Medic"; - [player,"repair",0,false] call dayz_zombieSpeak; - [player,50,true,(getPosATL player)] spawn player_alertZombies; + [player,"repair",0,false] call dayz_zombieSpeak; + [player,50,true,(getPosATL player)] spawn player_alertZombies; - r_interrupt = false; - _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { + r_interrupt = false; _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; + 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; }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; - }; - r_doLoop = false; + r_doLoop = false; - if (_finished) then { + if (_finished) then { - _removed_total = 0; // count total of removed items - _tobe_removed_total = 0; // count total of all to be removed items - // Take items - { - _removed = 0; - _itemIn = _x select 0; - _countIn = _x select 1; - // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; - _tobe_removed_total = _tobe_removed_total + _countIn; - - { - if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { - _num_removed = ([player,_x] call BIS_fnc_invRemove); - _removed = _removed + _num_removed; - _removed_total = _removed_total + _num_removed; - if(_num_removed >= 1) then { - _temp_removed_array set [count _temp_removed_array,_x]; - }; - }; - - } forEach magazines player; - - } forEach _selectedRecipeInput; - - //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; - - // Only proceed if all parts were removed successfully - if(_removed_total == _tobe_removed_total) then { - - // Put items + _removed_total = 0; // count total of removed items + _tobe_removed_total = 0; // count total of all to be removed items + // Take items { - // consumeweapons - { - player removeWeapon _x; - } forEach _consumeweapons; - - _itemOut = _x select 0; - _countOut = _x select 1; - //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + _removed = 0; + _itemIn = _x select 0; + _countIn = _x select 1; + // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; + _tobe_removed_total = _tobe_removed_total + _countIn; + + { + if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { + _num_removed = ([player,_x] call BIS_fnc_invRemove); + _removed = _removed + _num_removed; + _removed_total = _removed_total + _num_removed; + if(_num_removed >= 1) then { + _temp_removed_array set [count _temp_removed_array,_x]; + }; + }; + + } forEach magazines player; + + } forEach _selectedRecipeInput; - for "_x" from 1 to _countOut do { - player addMagazine _itemOut; - }; + //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; + + // Only proceed if all parts were removed successfully + if(_removed_total == _tobe_removed_total) then { + + // Put items + { + // consumeweapons + { + player removeWeapon _x; + } forEach _consumeweapons; + + _itemOut = _x select 0; + _countOut = _x select 1; + //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + + for "_x" from 1 to _countOut do { + player addMagazine _itemOut; + }; - // get display name - _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); + // get display name + _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); - // Add crafted item - cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; + // Add crafted item + cutText [format["\n\nCrafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; - } forEach _selectedRecipeOutput; + } forEach _selectedRecipeOutput; + + } else { + // Refund parts since we failed + {player addMagazine _x;} forEach _temp_removed_array; + + cutText [format["\n\nMissing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + }; } else { - // Refund parts since we failed - {player addMagazine _x;} forEach _temp_removed_array; - - cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + cutText ["\n\nCanceled crafting.", "PLAIN DOWN"]; + _craft_doLoop = false; }; - - } else { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; - }; - cutText ["Canceled crafting.", "PLAIN DOWN"]; - }; + } else { + _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); + cutText [format["\n\nMissing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; + }; } else { - _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); - cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); + cutText [format["\n\nMissing Tool: %1",_textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; }; - } else { - _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); - cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"]; }; } else { - cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"]; + cutText ["\n\nCrafting needs a fire within 3 meters.", "PLAIN DOWN"]; }; TradeInprogress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_craftItem1.sqf b/SQF/dayz_code/actions/player_craftItem1.sqf index 68878f0ff..2f6c9f0d4 100644 --- a/SQF/dayz_code/actions/player_craftItem1.sqf +++ b/SQF/dayz_code/actions/player_craftItem1.sqf @@ -3,9 +3,9 @@ Usage: spawn player_goFishing; Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. */ -private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"]; +private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item","_craft_doLoop"]; -if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; // temp array of removed parts @@ -14,7 +14,7 @@ _abort = false; _distance = 3; _reason = ""; -_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; +_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder); _item = _this; @@ -40,7 +40,7 @@ if("workshop" in _needNear) then { }; if(_abort) exitWith { - cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; + cutText [format["\n\nCrafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; TradeInprogress = false; }; @@ -55,151 +55,159 @@ if (_canDo) then { _selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools"); _consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons"); - _missing = ""; - _missingTools = false; - { - _hastoolweapon = _x in weapons player; - if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; }; - } forEach _selectedRecipeTools; + _craft_doLoop = true; - if(!_missingTools) then { + while {_craft_doLoop} do { - //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; - //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; - - // Dry run to see if all parts are available. - _proceed = true; + _missing = ""; + _missingTools = false; { - _itemIn = _x select 0; - _countIn = _x select 1; + _hastoolweapon = _x in weapons player; + if(!_hastoolweapon) exitWith { _craft_doLoop = false; _missingTools = true; _missing = _x; }; + } forEach _selectedRecipeTools; + + if(!_missingTools) then { + + //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; + //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; + + // Dry run to see if all parts are available. + _proceed = true; + { + _itemIn = _x select 0; + _countIn = _x select 1; - //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; + //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; - // not neccessary - //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; + // not neccessary + //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; - // match against class and parentClass - _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; + // match against class and parentClass + _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; - if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; + if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } forEach _selectedRecipeInput; + } forEach _selectedRecipeInput; - // If all parts proceed - if (_proceed) then { + // If all parts proceed + if (_proceed) then { - cutText ["Crafting started", "PLAIN DOWN"]; + cutText ["\n\nCrafting started", "PLAIN DOWN"]; - player playActionNow "Medic"; + player playActionNow "Medic"; - [player,"repair",0,false] call dayz_zombieSpeak; - [player,50,true,(getPosATL player)] spawn player_alertZombies; + [player,"repair",0,false] call dayz_zombieSpeak; + [player,50,true,(getPosATL player)] spawn player_alertZombies; - r_interrupt = false; - _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { + r_interrupt = false; _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; + 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; }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; - }; - r_doLoop = false; + r_doLoop = false; - if (_finished) then { + if (_finished) then { - _removed_total = 0; // count total of removed items - _tobe_removed_total = 0; // count total of all to be removed items - // Take items - { - _removed = 0; - _itemIn = _x select 0; - _countIn = _x select 1; - // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; - _tobe_removed_total = _tobe_removed_total + _countIn; - - { - if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { - _num_removed = ([player,_x] call BIS_fnc_invRemove); - _removed = _removed + _num_removed; - _removed_total = _removed_total + _num_removed; - if(_num_removed >= 1) then { - _temp_removed_array set [count _temp_removed_array,_x]; - }; - }; - - } forEach magazines player; - - } forEach _selectedRecipeInput; - - //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; - - // Only proceed if all parts were removed successfully - if(_removed_total == _tobe_removed_total) then { - - // Put items + _removed_total = 0; // count total of removed items + _tobe_removed_total = 0; // count total of all to be removed items + // Take items { - // consumeweapons - { - player removeWeapon _x; - } forEach _consumeweapons; - - _itemOut = _x select 0; - _countOut = _x select 1; - //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + _removed = 0; + _itemIn = _x select 0; + _countIn = _x select 1; + // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; + _tobe_removed_total = _tobe_removed_total + _countIn; + + { + if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { + _num_removed = ([player,_x] call BIS_fnc_invRemove); + _removed = _removed + _num_removed; + _removed_total = _removed_total + _num_removed; + if(_num_removed >= 1) then { + _temp_removed_array set [count _temp_removed_array,_x]; + }; + }; + + } forEach magazines player; + + } forEach _selectedRecipeInput; - for "_x" from 1 to _countOut do { - player addMagazine _itemOut; - }; + //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; + + // Only proceed if all parts were removed successfully + if(_removed_total == _tobe_removed_total) then { + + // Put items + { + // consumeweapons + { + player removeWeapon _x; + } forEach _consumeweapons; + + _itemOut = _x select 0; + _countOut = _x select 1; + //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + + for "_x" from 1 to _countOut do { + player addMagazine _itemOut; + }; - // get display name - _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); + // get display name + _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); - // Add crafted item - cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; + // Add crafted item + cutText [format["\n\nCrafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; - } forEach _selectedRecipeOutput; + } forEach _selectedRecipeOutput; + + } else { + // Refund parts since we failed + {player addMagazine _x;} forEach _temp_removed_array; + + cutText [format["\n\nMissing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + }; } else { - // Refund parts since we failed - {player addMagazine _x;} forEach _temp_removed_array; - - cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + cutText ["\n\nCanceled crafting.", "PLAIN DOWN"]; + _craft_doLoop = false; }; - - } else { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; - }; - cutText ["Canceled crafting.", "PLAIN DOWN"]; - }; + } else { + _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); + cutText [format["\n\nMissing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; + }; } else { - _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); - cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); + cutText [format["\n\nMissing Tool: %1",_textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; }; - } else { - _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); - cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"]; }; } else { - cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"]; + cutText ["\n\nCrafting needs a fire within 3 meters.", "PLAIN DOWN"]; }; TradeInprogress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_craftItem2.sqf b/SQF/dayz_code/actions/player_craftItem2.sqf index e0159cbfd..b649748fd 100644 --- a/SQF/dayz_code/actions/player_craftItem2.sqf +++ b/SQF/dayz_code/actions/player_craftItem2.sqf @@ -3,9 +3,9 @@ Usage: spawn player_goFishing; Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. */ -private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"]; +private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item","_craft_doLoop"]; -if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; // temp array of removed parts @@ -14,7 +14,7 @@ _abort = false; _distance = 3; _reason = ""; -_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; +_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder); _item = _this; @@ -40,7 +40,7 @@ if("workshop" in _needNear) then { }; if(_abort) exitWith { - cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; + cutText [format["\n\nCrafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; TradeInprogress = false; }; @@ -55,151 +55,159 @@ if (_canDo) then { _selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools"); _consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons"); - _missing = ""; - _missingTools = false; - { - _hastoolweapon = _x in weapons player; - if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; }; - } forEach _selectedRecipeTools; + _craft_doLoop = true; - if(!_missingTools) then { + while {_craft_doLoop} do { - //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; - //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; - - // Dry run to see if all parts are available. - _proceed = true; + _missing = ""; + _missingTools = false; { - _itemIn = _x select 0; - _countIn = _x select 1; + _hastoolweapon = _x in weapons player; + if(!_hastoolweapon) exitWith { _craft_doLoop = false; _missingTools = true; _missing = _x; }; + } forEach _selectedRecipeTools; + + if(!_missingTools) then { + + //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; + //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; + + // Dry run to see if all parts are available. + _proceed = true; + { + _itemIn = _x select 0; + _countIn = _x select 1; - //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; + //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; - // not neccessary - //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; + // not neccessary + //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; - // match against class and parentClass - _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; + // match against class and parentClass + _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; - if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; + if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } forEach _selectedRecipeInput; + } forEach _selectedRecipeInput; - // If all parts proceed - if (_proceed) then { + // If all parts proceed + if (_proceed) then { - cutText ["Crafting started", "PLAIN DOWN"]; + cutText ["\n\nCrafting started", "PLAIN DOWN"]; - player playActionNow "Medic"; + player playActionNow "Medic"; - [player,"repair",0,false] call dayz_zombieSpeak; - [player,50,true,(getPosATL player)] spawn player_alertZombies; + [player,"repair",0,false] call dayz_zombieSpeak; + [player,50,true,(getPosATL player)] spawn player_alertZombies; - r_interrupt = false; - _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { + r_interrupt = false; _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; + 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; }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; - }; - r_doLoop = false; + r_doLoop = false; - if (_finished) then { + if (_finished) then { - _removed_total = 0; // count total of removed items - _tobe_removed_total = 0; // count total of all to be removed items - // Take items - { - _removed = 0; - _itemIn = _x select 0; - _countIn = _x select 1; - // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; - _tobe_removed_total = _tobe_removed_total + _countIn; - - { - if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { - _num_removed = ([player,_x] call BIS_fnc_invRemove); - _removed = _removed + _num_removed; - _removed_total = _removed_total + _num_removed; - if(_num_removed >= 1) then { - _temp_removed_array set [count _temp_removed_array,_x]; - }; - }; - - } forEach magazines player; - - } forEach _selectedRecipeInput; - - //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; - - // Only proceed if all parts were removed successfully - if(_removed_total == _tobe_removed_total) then { - - // Put items + _removed_total = 0; // count total of removed items + _tobe_removed_total = 0; // count total of all to be removed items + // Take items { - // consumeweapons - { - player removeWeapon _x; - } forEach _consumeweapons; - - _itemOut = _x select 0; - _countOut = _x select 1; - //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + _removed = 0; + _itemIn = _x select 0; + _countIn = _x select 1; + // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; + _tobe_removed_total = _tobe_removed_total + _countIn; + + { + if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { + _num_removed = ([player,_x] call BIS_fnc_invRemove); + _removed = _removed + _num_removed; + _removed_total = _removed_total + _num_removed; + if(_num_removed >= 1) then { + _temp_removed_array set [count _temp_removed_array,_x]; + }; + }; + + } forEach magazines player; + + } forEach _selectedRecipeInput; - for "_x" from 1 to _countOut do { - player addMagazine _itemOut; - }; + //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; + + // Only proceed if all parts were removed successfully + if(_removed_total == _tobe_removed_total) then { + + // Put items + { + // consumeweapons + { + player removeWeapon _x; + } forEach _consumeweapons; + + _itemOut = _x select 0; + _countOut = _x select 1; + //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + + for "_x" from 1 to _countOut do { + player addMagazine _itemOut; + }; - // get display name - _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); + // get display name + _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); - // Add crafted item - cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; + // Add crafted item + cutText [format["\n\nCrafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; - } forEach _selectedRecipeOutput; + } forEach _selectedRecipeOutput; + + } else { + // Refund parts since we failed + {player addMagazine _x;} forEach _temp_removed_array; + + cutText [format["\n\nMissing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + }; } else { - // Refund parts since we failed - {player addMagazine _x;} forEach _temp_removed_array; - - cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + cutText ["\n\nCanceled crafting.", "PLAIN DOWN"]; + _craft_doLoop = false; }; - - } else { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; - }; - cutText ["Canceled crafting.", "PLAIN DOWN"]; - }; + } else { + _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); + cutText [format["\n\nMissing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; + }; } else { - _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); - cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); + cutText [format["\n\nMissing Tool: %1",_textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; }; - } else { - _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); - cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"]; }; } else { - cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"]; + cutText ["\n\nCrafting needs a fire within 3 meters.", "PLAIN DOWN"]; }; TradeInprogress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_craftItem3.sqf b/SQF/dayz_code/actions/player_craftItem3.sqf index 756e5f243..77d14614a 100644 --- a/SQF/dayz_code/actions/player_craftItem3.sqf +++ b/SQF/dayz_code/actions/player_craftItem3.sqf @@ -3,9 +3,9 @@ Usage: spawn player_goFishing; Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. */ -private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"]; +private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item","_craft_doLoop"]; -if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; // temp array of removed parts @@ -14,7 +14,7 @@ _abort = false; _distance = 3; _reason = ""; -_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; +_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder); _item = _this; @@ -40,7 +40,7 @@ if("workshop" in _needNear) then { }; if(_abort) exitWith { - cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; + cutText [format["\n\nCrafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; TradeInprogress = false; }; @@ -55,151 +55,159 @@ if (_canDo) then { _selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools"); _consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons"); - _missing = ""; - _missingTools = false; - { - _hastoolweapon = _x in weapons player; - if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; }; - } forEach _selectedRecipeTools; + _craft_doLoop = true; - if(!_missingTools) then { + while {_craft_doLoop} do { - //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; - //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; - - // Dry run to see if all parts are available. - _proceed = true; + _missing = ""; + _missingTools = false; { - _itemIn = _x select 0; - _countIn = _x select 1; + _hastoolweapon = _x in weapons player; + if(!_hastoolweapon) exitWith { _craft_doLoop = false; _missingTools = true; _missing = _x; }; + } forEach _selectedRecipeTools; + + if(!_missingTools) then { + + //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; + //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; + + // Dry run to see if all parts are available. + _proceed = true; + { + _itemIn = _x select 0; + _countIn = _x select 1; - //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; + //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; - // not neccessary - //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; + // not neccessary + //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; - // match against class and parentClass - _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; + // match against class and parentClass + _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; - if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; + if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } forEach _selectedRecipeInput; + } forEach _selectedRecipeInput; - // If all parts proceed - if (_proceed) then { + // If all parts proceed + if (_proceed) then { - cutText ["Crafting started", "PLAIN DOWN"]; + cutText ["\n\nCrafting started", "PLAIN DOWN"]; - player playActionNow "Medic"; + player playActionNow "Medic"; - [player,"repair",0,false] call dayz_zombieSpeak; - [player,50,true,(getPosATL player)] spawn player_alertZombies; + [player,"repair",0,false] call dayz_zombieSpeak; + [player,50,true,(getPosATL player)] spawn player_alertZombies; - r_interrupt = false; - _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { + r_interrupt = false; _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; + 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; }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; - }; - r_doLoop = false; + r_doLoop = false; - if (_finished) then { + if (_finished) then { - _removed_total = 0; // count total of removed items - _tobe_removed_total = 0; // count total of all to be removed items - // Take items - { - _removed = 0; - _itemIn = _x select 0; - _countIn = _x select 1; - // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; - _tobe_removed_total = _tobe_removed_total + _countIn; - - { - if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { - _num_removed = ([player,_x] call BIS_fnc_invRemove); - _removed = _removed + _num_removed; - _removed_total = _removed_total + _num_removed; - if(_num_removed >= 1) then { - _temp_removed_array set [count _temp_removed_array,_x]; - }; - }; - - } forEach magazines player; - - } forEach _selectedRecipeInput; - - //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; - - // Only proceed if all parts were removed successfully - if(_removed_total == _tobe_removed_total) then { - - // Put items + _removed_total = 0; // count total of removed items + _tobe_removed_total = 0; // count total of all to be removed items + // Take items { - // consumeweapons - { - player removeWeapon _x; - } forEach _consumeweapons; - - _itemOut = _x select 0; - _countOut = _x select 1; - //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + _removed = 0; + _itemIn = _x select 0; + _countIn = _x select 1; + // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; + _tobe_removed_total = _tobe_removed_total + _countIn; + + { + if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { + _num_removed = ([player,_x] call BIS_fnc_invRemove); + _removed = _removed + _num_removed; + _removed_total = _removed_total + _num_removed; + if(_num_removed >= 1) then { + _temp_removed_array set [count _temp_removed_array,_x]; + }; + }; + + } forEach magazines player; + + } forEach _selectedRecipeInput; - for "_x" from 1 to _countOut do { - player addMagazine _itemOut; - }; + //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; + + // Only proceed if all parts were removed successfully + if(_removed_total == _tobe_removed_total) then { + + // Put items + { + // consumeweapons + { + player removeWeapon _x; + } forEach _consumeweapons; + + _itemOut = _x select 0; + _countOut = _x select 1; + //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + + for "_x" from 1 to _countOut do { + player addMagazine _itemOut; + }; - // get display name - _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); + // get display name + _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); - // Add crafted item - cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; + // Add crafted item + cutText [format["\n\nCrafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; - } forEach _selectedRecipeOutput; + } forEach _selectedRecipeOutput; + + } else { + // Refund parts since we failed + {player addMagazine _x;} forEach _temp_removed_array; + + cutText [format["\n\nMissing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + }; } else { - // Refund parts since we failed - {player addMagazine _x;} forEach _temp_removed_array; - - cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + cutText ["\n\nCanceled crafting.", "PLAIN DOWN"]; + _craft_doLoop = false; }; - - } else { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; - }; - cutText ["Canceled crafting.", "PLAIN DOWN"]; - }; + } else { + _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); + cutText [format["\n\nMissing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; + }; } else { - _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); - cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); + cutText [format["\n\nMissing Tool: %1",_textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; }; - } else { - _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); - cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"]; }; } else { - cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"]; + cutText ["\n\nCrafting needs a fire within 3 meters.", "PLAIN DOWN"]; }; TradeInprogress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_craftItem4.sqf b/SQF/dayz_code/actions/player_craftItem4.sqf index 8d6a0e24a..c4e5fd44e 100644 --- a/SQF/dayz_code/actions/player_craftItem4.sqf +++ b/SQF/dayz_code/actions/player_craftItem4.sqf @@ -3,9 +3,9 @@ Usage: spawn player_goFishing; Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. */ -private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item"]; +private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear","_consumeweapons","_item","_craft_doLoop"]; -if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; // temp array of removed parts @@ -14,7 +14,7 @@ _abort = false; _distance = 3; _reason = ""; -_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; +_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder); _item = _this; @@ -40,7 +40,7 @@ if("workshop" in _needNear) then { }; if(_abort) exitWith { - cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; + cutText [format["\n\nCrafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"]; TradeInprogress = false; }; @@ -55,151 +55,159 @@ if (_canDo) then { _selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools"); _consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons"); - _missing = ""; - _missingTools = false; - { - _hastoolweapon = _x in weapons player; - if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; }; - } forEach _selectedRecipeTools; + _craft_doLoop = true; - if(!_missingTools) then { + while {_craft_doLoop} do { - //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; - //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; - - // Dry run to see if all parts are available. - _proceed = true; + _missing = ""; + _missingTools = false; { - _itemIn = _x select 0; - _countIn = _x select 1; + _hastoolweapon = _x in weapons player; + if(!_hastoolweapon) exitWith { _craft_doLoop = false; _missingTools = true; _missing = _x; }; + } forEach _selectedRecipeTools; + + if(!_missingTools) then { + + //diag_log format["Selected Recipe Input: %1", _selectedRecipeInput]; + //diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput]; + + // Dry run to see if all parts are available. + _proceed = true; + { + _itemIn = _x select 0; + _countIn = _x select 1; - //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; + //diag_log format["Recipe Check: %1 %2", _itemIn,_countIn]; - // not neccessary - //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; + // not neccessary + //if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; }; - // match against class and parentClass - _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; + // match against class and parentClass + _qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; - if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; + if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } forEach _selectedRecipeInput; + } forEach _selectedRecipeInput; - // If all parts proceed - if (_proceed) then { + // If all parts proceed + if (_proceed) then { - cutText ["Crafting started", "PLAIN DOWN"]; + cutText ["\n\nCrafting started", "PLAIN DOWN"]; - player playActionNow "Medic"; + player playActionNow "Medic"; - [player,"repair",0,false] call dayz_zombieSpeak; - [player,50,true,(getPosATL player)] spawn player_alertZombies; + [player,"repair",0,false] call dayz_zombieSpeak; + [player,50,true,(getPosATL player)] spawn player_alertZombies; - r_interrupt = false; - _animState = animationState player; - r_doLoop = true; - _started = false; - _finished = false; - - while {r_doLoop} do { + r_interrupt = false; _animState = animationState player; - _isMedic = ["medic",_animState] call fnc_inString; - if (_isMedic) then { - _started = true; + 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; }; - if (_started and !_isMedic) then { - r_doLoop = false; - _finished = true; - }; - if (r_interrupt) then { - r_doLoop = false; - }; - sleep 0.1; - }; - r_doLoop = false; + r_doLoop = false; - if (_finished) then { + if (_finished) then { - _removed_total = 0; // count total of removed items - _tobe_removed_total = 0; // count total of all to be removed items - // Take items - { - _removed = 0; - _itemIn = _x select 0; - _countIn = _x select 1; - // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; - _tobe_removed_total = _tobe_removed_total + _countIn; - - { - if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { - _num_removed = ([player,_x] call BIS_fnc_invRemove); - _removed = _removed + _num_removed; - _removed_total = _removed_total + _num_removed; - if(_num_removed >= 1) then { - _temp_removed_array set [count _temp_removed_array,_x]; - }; - }; - - } forEach magazines player; - - } forEach _selectedRecipeInput; - - //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; - - // Only proceed if all parts were removed successfully - if(_removed_total == _tobe_removed_total) then { - - // Put items + _removed_total = 0; // count total of removed items + _tobe_removed_total = 0; // count total of all to be removed items + // Take items { - // consumeweapons - { - player removeWeapon _x; - } forEach _consumeweapons; - - _itemOut = _x select 0; - _countOut = _x select 1; - //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + _removed = 0; + _itemIn = _x select 0; + _countIn = _x select 1; + // diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn]; + _tobe_removed_total = _tobe_removed_total + _countIn; + + { + if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then { + _num_removed = ([player,_x] call BIS_fnc_invRemove); + _removed = _removed + _num_removed; + _removed_total = _removed_total + _num_removed; + if(_num_removed >= 1) then { + _temp_removed_array set [count _temp_removed_array,_x]; + }; + }; + + } forEach magazines player; + + } forEach _selectedRecipeInput; - for "_x" from 1 to _countOut do { - player addMagazine _itemOut; - }; + //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; + + // Only proceed if all parts were removed successfully + if(_removed_total == _tobe_removed_total) then { + + // Put items + { + // consumeweapons + { + player removeWeapon _x; + } forEach _consumeweapons; + + _itemOut = _x select 0; + _countOut = _x select 1; + //diag_log format["Recipe Output: %1 %2", _itemOut,_countOut]; + + for "_x" from 1 to _countOut do { + player addMagazine _itemOut; + }; - // get display name - _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); + // get display name + _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); - // Add crafted item - cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; + // Add crafted item + cutText [format["\n\nCrafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"]; - } forEach _selectedRecipeOutput; + } forEach _selectedRecipeOutput; + + } else { + // Refund parts since we failed + {player addMagazine _x;} forEach _temp_removed_array; + + cutText [format["\n\nMissing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + }; } else { - // Refund parts since we failed - {player addMagazine _x;} forEach _temp_removed_array; - - cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"]; + r_interrupt = false; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; + cutText ["\n\nCanceled crafting.", "PLAIN DOWN"]; + _craft_doLoop = false; }; - - } else { - r_interrupt = false; - if (vehicle player == player) then { - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; - }; - cutText ["Canceled crafting.", "PLAIN DOWN"]; - }; + } else { + _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); + cutText [format["\n\nMissing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; + }; } else { - _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); - cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"]; + _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); + cutText [format["\n\nMissing Tool: %1",_textMissing], "PLAIN DOWN"]; + _craft_doLoop = false; }; - } else { - _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); - cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"]; }; } else { - cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"]; + cutText ["\n\nCrafting needs a fire within 3 meters.", "PLAIN DOWN"]; }; TradeInprogress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_drink.sqf b/SQF/dayz_code/actions/player_drink.sqf index b7905d071..cf3fbd93f 100644 --- a/SQF/dayz_code/actions/player_drink.sqf +++ b/SQF/dayz_code/actions/player_drink.sqf @@ -6,7 +6,7 @@ call gear_ui_init; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]}; -if (vehicle player != player) exitWith {cutText ["You may not drink while in a vehicle", "PLAIN DOWN"]}; +if (vehicle player != player) exitWith {cutText ["\n\nYou may not drink while in a vehicle", "PLAIN DOWN"]}; //Force players to wait 3 mins to drink again //if (dayz_lastDrink < 180) exitWith {cutText ["You may not drink, your not thirsty", "PLAIN DOWN"]}; diff --git a/SQF/dayz_code/actions/player_eat.sqf b/SQF/dayz_code/actions/player_eat.sqf index b90a7bf90..f300fd9f5 100644 --- a/SQF/dayz_code/actions/player_eat.sqf +++ b/SQF/dayz_code/actions/player_eat.sqf @@ -4,7 +4,7 @@ call gear_ui_init; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]}; -if (vehicle player != player) exitWith {cutText ["You may not eat while in a vehicle", "PLAIN DOWN"]}; +if (vehicle player != player) exitWith {cutText ["\n\nYou may not eat while in a vehicle", "PLAIN DOWN"]}; //Force players to wait 3 mins to eat again //if (dayz_lastMeal < 180) exitWith {cutText ["You may not eat, you're already full", "PLAIN DOWN"]}; diff --git a/SQF/dayz_code/actions/player_goFishing.sqf b/SQF/dayz_code/actions/player_goFishing.sqf index 30984f9f1..dbaa01add 100644 --- a/SQF/dayz_code/actions/player_goFishing.sqf +++ b/SQF/dayz_code/actions/player_goFishing.sqf @@ -5,17 +5,17 @@ */ private ["_itemOut","_position","_isOk","_counter","_rnd","_item","_itemtodrop","_vehicle","_inVehicle"]; -if(TradeInprogress) exitWith { cutText ["Fishing already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nFishing already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; call gear_ui_init; // find position 5m in front of player _position = player modeltoworld [0,5,0]; -if(!(surfaceIsWater _position)) exitWith {TradeInprogress = false; cutText ["Must be near a shore or on a boat to fish." , "PLAIN DOWN"]; }; +if(!(surfaceIsWater _position)) exitWith {TradeInprogress = false; cutText ["\n\nMust be near a shore or on a boat to fish." , "PLAIN DOWN"]; }; if(dayz_isSwimming) exitWith {TradeInprogress = false; cutText [localize "str_player_26", "PLAIN DOWN"]; }; -if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["Canceled Fishing.", "PLAIN DOWN"];}; +if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["\n\nCanceled Fishing.", "PLAIN DOWN"];}; _isOk = true; _counter = 0; @@ -31,7 +31,7 @@ while {_isOk} do { if (r_interrupt or (player getVariable["combattimeout", 0] >= time)) then { _isOk = false; - cutText ["Canceled Fishing.", "PLAIN DOWN"]; + cutText ["\n\nCanceled Fishing.", "PLAIN DOWN"]; } else { sleep 2; @@ -60,15 +60,15 @@ while {_isOk} do { player addMagazine _itemOut; }; - cutText ["You caught a fish.", "PLAIN DOWN"]; + cutText ["\n\nYou caught a fish.", "PLAIN DOWN"]; _isOk = false; } else { - cutText ["Nibble... Nibble...", "PLAIN DOWN"]; + cutText ["\n\nNibble... Nibble...", "PLAIN DOWN"]; _counter = _counter + 1; if(_counter == 5) then { _isOk = false; sleep 2; - cutText ["You didn't catch anything.", "PLAIN DOWN"]; + cutText ["\n\nYou didn't catch anything.", "PLAIN DOWN"]; }; }; }; diff --git a/SQF/dayz_code/actions/player_harvestPlant.sqf b/SQF/dayz_code/actions/player_harvestPlant.sqf index d6a278122..7a5a468ea 100644 --- a/SQF/dayz_code/actions/player_harvestPlant.sqf +++ b/SQF/dayz_code/actions/player_harvestPlant.sqf @@ -5,7 +5,7 @@ */ private ["_isOk","_i","_objName","_objInfo","_lenInfo","_started","_finished","_animState","_isMedic","_proceed","_counter","_itemOut","_countOut","_tree","_distance2d","_distance3d","_trees","_findNearestTree"]; -if(TradeInprogress) exitWith { cutText ["Harvest already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nHarvest already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; // allowed trees list move this later @@ -103,7 +103,7 @@ if (count(_findNearestTree) >= 1) then { }; //diag_log format["DEBUG TREE DAMAGE: %1", _tree]; - cutText [format["%1 of %2 has been successfully added to your inventory.", _countOut,_itemOut], "PLAIN DOWN"]; + cutText [format["\n\n%1 of %2 has been successfully added to your inventory.", _countOut,_itemOut], "PLAIN DOWN"]; } else { r_interrupt = false; @@ -111,12 +111,12 @@ if (count(_findNearestTree) >= 1) then { [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; }; - cutText ["Canceled Harvesting.", "PLAIN DOWN"]; + cutText ["\n\nCanceled Harvesting.", "PLAIN DOWN"]; }; } else { - cutText [localize "str_player_23", "PLAIN DOWN"]; + cutText ["\n\nYou must be close to a plant to harvest.", "PLAIN DOWN"]; }; TradeInprogress = false; diff --git a/SQF/dayz_code/actions/player_loadCrate.sqf b/SQF/dayz_code/actions/player_loadCrate.sqf index 32122370c..990da45fe 100644 --- a/SQF/dayz_code/actions/player_loadCrate.sqf +++ b/SQF/dayz_code/actions/player_loadCrate.sqf @@ -1,18 +1,18 @@ private ["_dir","_classname","_box","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool"]; -if(TradeInprogress) exitWith { cutText ["Open Crate already in progress." , "PLAIN DOWN"]; }; +if(TradeInprogress) exitWith { cutText ["\n\nOpen Crate already in progress." , "PLAIN DOWN"]; }; TradeInprogress = true; _hasTool = "ItemCrowbar" in items player; if(!_hasTool) exitWith { - cutText ["You need a crowbar to open this.", "PLAIN DOWN"]; + cutText ["\n\nYou need a crowbar to open this.", "PLAIN DOWN"]; TradeInprogress = false; }; _item = _this; _hasCrate = _item in magazines player; if (!_hasCrate) then { - cutText ["Missing supply crate.", "PLAIN DOWN"]; + cutText ["\n\nMissing supply crate.", "PLAIN DOWN"]; TradeInprogress = false; }; @@ -51,6 +51,6 @@ if(_type == "backpack") then { player reveal _box; -cutText ["Opened supply crate.", "PLAIN DOWN"]; +cutText ["\n\nOpened supply crate.", "PLAIN DOWN"]; TradeInprogress = false; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_wearClothes.sqf b/SQF/dayz_code/actions/player_wearClothes.sqf index 6d1668e24..b475d7192 100644 --- a/SQF/dayz_code/actions/player_wearClothes.sqf +++ b/SQF/dayz_code/actions/player_wearClothes.sqf @@ -4,7 +4,7 @@ Added Female skin changes - DayZ Epoch - vbawol */ private ["_item","_onLadder","_hasclothesitem","_config","_text","_myModel","_itemNew","_currentSex","_newSex","_model"]; -if(TradeInprogress) exitWith { cutText ["Changing clothes already in progress." , "PLAIN DOWN"] }; +if(TradeInprogress) exitWith { cutText ["\n\nChanging clothes already in progress." , "PLAIN DOWN"] }; TradeInprogress = true; _item = _this; @@ -19,7 +19,7 @@ _text = getText (_config >> _item >> "displayName"); if (!_hasclothesitem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_text,"wear"] , "PLAIN DOWN"]}; -if (vehicle player != player) exitWith {TradeInprogress = false; cutText ["You may not change clothes while in a vehicle", "PLAIN DOWN"]}; +if (vehicle player != player) exitWith {TradeInprogress = false; cutText ["\n\nYou may not change clothes while in a vehicle", "PLAIN DOWN"]}; _myModel = (typeOf player); _itemNew = "Skin_" + _myModel; @@ -46,7 +46,7 @@ if ( (isClass(_config >> _itemNew)) ) then { }; } else { - cutText ["You cannot wear a skin of the opposite sex.", "PLAIN DOWN"]; + cutText ["\n\nYou cannot wear a skin of the opposite sex.", "PLAIN DOWN"]; }; }; }; diff --git a/SQF/dayz_code/config.cpp b/SQF/dayz_code/config.cpp index 14d0299f6..852483aa3 100644 --- a/SQF/dayz_code/config.cpp +++ b/SQF/dayz_code/config.cpp @@ -41,7 +41,7 @@ class CfgMods hidePicture = 0; hideName = 0; action = "http://www.dayzepoch.com"; - version = "1.0.2"; + version = "1.0.2.1"; hiveVersion = 0.96; //0.93 }; }; diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index c793fc1f4..fa1d92c00 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -312,24 +312,28 @@ if (!isDedicated) then { dayz_lastCheckBit = time; _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf"; }; - // - if (_dikCode == 0x48) then { + // numpad 8 0x48 now pgup 0xC9 + if (_dikCode == 0xC9 or (_dikCode in actionKeys "User15")) then { DZE_Q = true; }; - if (_dikCode == 0x50) then { + // numpad 2 0x50 now pgdn 0xD1 + if (_dikCode == 0xD1 or (_dikCode in actionKeys "User16")) then { DZE_Z = true; }; - if (_dikCode == 0x4B) then { + // numpad 4 0x4B now Q 0x10 + if (_dikCode == 0x10 or (_dikCode in actionKeys "User17")) then { DZE_4 = true; }; - if (_dikCode == 0x4D) then { + // numpad 6 0x4D now E 0x12 + if (_dikCode == 0x12 or (_dikCode in actionKeys "User18")) then { DZE_6 = true; }; - - if (_dikCode == 0x4C) then { + // numpad 5 0x4C now space 0x39 + if (_dikCode == 0x39 or (_dikCode in actionKeys "User19")) then { DZE_5 = true; }; + // esc if (_dikCode == 0x01) then { DZE_cancelBuilding = true; }; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 4e13157bf..812c7e4d5 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -247,14 +247,14 @@ Stan zde nelze postavit. Plocha musí být rovná a být dostatečně velká. - You have consumed a %1 - You have consumed a %1 - Sie haben ein(e) %1 verbraucht - Вы употребили: %1 - Consumiste: %1 - Je hebt %1 genuttigd - Vous avez consommé un(e) %1 - Snědl jsi %1 + \n\nYou have consumed a %1 + \n\nYou have consumed a %1 + \n\nSie haben ein(e) %1 verbraucht + \n\nВы употребили: %1 + \n\nConsumiste: %1 + \n\nJe hebt %1 genuttigd + \n\nVous avez consommé un(e) %1 + \n\nSnědl jsi %1 You have created a fireplace @@ -327,24 +327,24 @@ Jste uzdravováni. - You have filled %1 bottles with water - You have filled %1 bottles with water - Sie haben %1 Flasche(n) mit Wasser gefüllt - Наполнено фляжек с водой: %1 - Llenaste %1 cantimplora(s) con agua - Je hebt %1 flessen gevuld met water - Vous avez rempli %1 bouteille(s) avec de l'eau. - Naplnil jsi %1 lahví vodou. + \n\nYou have filled %1 bottles with water + \n\nYou have filled %1 bottles with water + \n\nSie haben %1 Flasche(n) mit Wasser gefüllt + \n\nНаполнено фляжек с водой: %1 + \n\nLlenaste %1 cantimplora(s) con agua + \n\nJe hebt %1 flessen gevuld met water + \n\nVous avez rempli %1 bouteille(s) avec de l'eau. + \n\nNaplnil jsi %1 lahví vodou. - You have no empty water bottles - You have no empty water bottles - Sie haben keine leeren Wasserflaschen - У вас нет пустых фляжек. - No tienes cantimploras vacías - Je hebt geen lege waterflessen - Vous n'avez aucune bouteille vide. - Nemáš žádné prázdné láhve na vodu. + \n\nYou have no empty water bottles + \n\nYou have no empty water bottles + \n\nSie haben keine leeren Wasserflaschen + \n\nУ вас нет пустых фляжек. + \n\nNo tienes cantimploras vacías + \n\nJe hebt geen lege waterflessen + \n\nVous n'avez aucune bouteille vide. + \n\nNemáš žádné prázdné láhve na vodu. You need a %1 to repair this @@ -507,24 +507,24 @@ Máte nesprávnou verzi DAYZ_CODE, stáhněte si prosím aktuální soubor z dayzepoch.com (Vaše verze je %1 a na serveru běží verze %2) - You must be near a water-source such as a pond or well to refill your water bottles - You must be near a water-source such as a pond or well to refill your water bottles - Sie müssen in der nähe einer Wasserquelle wie einem Teich oder Brunnen sein um Wasserflaschen zu füllen - Вы должны находиться возле водоема или источника воды, чтобы наполнить свои фляги. - Necesitas estar cerca de una fuente de agua como un pozo para rellenar tu cantimplora - Je moet in de buurt van een waterbron zijn, zoals een meer of pomp, om je waterflessen bij te vullen - Vous devez être à côté d'une source d'eau comme un bassin ou un puits pour remplir vos bouteilles d'eau. - Pro plnění láhve na vodu je nutné být poblíž studny nebo rybníka. + \n\nYou must be near a water-source such as a pond or well to refill your water bottles + \n\nYou must be near a water-source such as a pond or well to refill your water bottles + \n\nSie müssen in der nähe einer Wasserquelle wie einem Teich oder Brunnen sein um Wasserflaschen zu füllen + \n\nВы должны находиться возле водоема или источника воды, чтобы наполнить свои фляги. + \n\nNecesitas estar cerca de una fuente de agua como un pozo para rellenar tu cantimplora + \n\nJe moet in de buurt van een waterbron zijn, zoals een meer of pomp, om je waterflessen bij te vullen + \n\nVous devez être à côté d'une source d'eau comme un bassin ou un puits pour remplir vos bouteilles d'eau. + \n\nPro plnění láhve na vodu je nutné být poblíž studny nebo rybníka. - You cannot do this while you are on a ladder - You cannot do this while you are on a ladder - Sie können dies nicht tun, während Sie an einer Leiter sind - Вы не можете этого делать, пока поднимаетесь по лестнице. - No puedes hacer esto mientras estás en una escalera - Je kunt deze actie op een ladder niet uitvoeren - Vous ne pouvez pas faire cela en étant sur une échelle. - Akci nelze provést, jelikož jste na žebříku. + \n\nYou cannot do this while you are on a ladder + \n\nYou cannot do this while you are on a ladder + \n\nSie können dies nicht tun, während Sie an einer Leiter sind + \n\nВы не можете этого делать, пока поднимаетесь по лестнице. + \n\nNo puedes hacer esto mientras estás en una escalera + \n\nJe kunt deze actie op een ladder niet uitvoeren + \n\nVous ne pouvez pas faire cela en étant sur une échelle. + \n\nAkci nelze provést, jelikož jste na žebříku. You must have wood in your inventory in order to create a fireplace @@ -537,14 +537,14 @@ Pro vytvoření ohniště je nutné mít v inventáři dřevo. - You must be close to a tree to harvest wood. - You must be close to a tree to harvest wood. - Sie müssen Nähe eines Baums sein, um Holz zu sammeln. - Вы должны находится в лесу и подойти к дереву, чтобы нарубить дров. - Debes estar en el bosque y cerca de un árbol para recoger leña. - Je moet in een bos en in de buurt van een boom zijn om hout te hakken. - Vous devez être en forêt et proche d'un arbre pour couper du bois. - Pro získání dřeva musíš být v lese blízko stromu. + \n\nYou must be close to a tree to harvest wood. + \n\nYou must be close to a tree to harvest wood. + \n\nSie müssen Nähe eines Baums sein, um Holz zu sammeln. + \n\nВы должны находится в лесу и подойти к дереву, чтобы нарубить дров. + \n\nDebes estar en el bosque y cerca de un árbol para recoger leña. + \n\nJe moet in een bos en in de buurt van een boom zijn om hout te hakken. + \n\nVous devez être en forêt et proche d'un arbre pour couper du bois. + \n\nPro získání dřeva musíš být v lese blízko stromu. You do not have enough room in your inventory to do that. @@ -567,14 +567,14 @@ Hromádka dřeva byla úspěšně přidána do tvého inventáře. - You cannot do this while you are in the water. - You cannot do this while you are in the water. - Sie können dies nicht tun, während Sie sich im Wasser befinden.. - Это действие невозможно пока вы в воде. - No puedes hacer esto mientras estás en el agua. - Je kunt deze actie niet in het water uitvoeren - Vous ne pouvez pas faire cela lorsque vous êtes dans l'eau. - Tuto akci nelze provést pokud jste ve vodě. + \n\nYou cannot do this while you are in the water. + \n\nYou cannot do this while you are in the water. + \n\nSie können dies nicht tun, während Sie sich im Wasser befinden.. + \n\nЭто действие невозможно пока вы в воде. + \n\nNo puedes hacer esto mientras estás en el agua. + \n\nJe kunt deze actie niet in het water uitvoeren + \n\nVous ne pouvez pas faire cela lorsque vous êtes dans l'eau. + \n\nTuto akci nelze provést pokud jste ve vodě. You have applied a heatpack to your body successfully. @@ -607,24 +607,24 @@ Úspěšně jsi nabil zásobníky %1 %2. - %1 must be on your person to move it to/from your toolbelt. - %1 must be on your person to move it to/from your toolbelt. - %1 muss in ihrem Inventar sein um es aus/in ihren Werkzeuggürtel zu packen. - Для перемещения с/на пояс, предмет %1 должен быть у вас. - %1 debe estar en tu persona para moverlo hacia/desde el cinturon. - Je moet %1 op je persoon hebben om het van/naar je gereedschapsriem te verplaatsen - %1 doit être sur vous pour pouvoir le déplacer de/vers votre ceinture à outils. - TO DECIDE + \n\n%1 must be on your person to move it to/from your toolbelt. + \n\n%1 must be on your person to move it to/from your toolbelt. + \n\n%1 muss in ihrem Inventar sein um es aus/in ihren Werkzeuggürtel zu packen. + \n\nДля перемещения с/на пояс, предмет %1 должен быть у вас. + \n\n%1 debe estar en tu persona para moverlo hacia/desde el cinturon. + \n\nJe moet %1 op je persoon hebben om het van/naar je gereedschapsriem te verplaatsen + \n\n%1 doit être sur vous pour pouvoir le déplacer de/vers votre ceinture à outils. + \n\n%1 must be on your person to move it to/from your toolbelt. - %1 must be in your main inventory to %2 it. - %1 must be in your main inventory to %2 it. - %1 muss sich in Ihrem Inventar befinden um es zu %2. - Предмет %1 должен находиться в основном инвентаре чтобы %2 его. - %1 debe estar en tu inventario principal para: %2 - %1 moet zich in je hoofdinventaris bevinden om het te %2. - %1 doit être dans votre inventaire principal pour pouvoir le %2 - %1 musí být ve tvém hlavním inventáři pro %2. + \n\n%1 must be in your main inventory to %2 it. + \n\n%1 must be in your main inventory to %2 it. + \n\n%1 muss sich in Ihrem Inventar befinden um es zu %2. + \n\nПредмет %1 должен находиться в основном инвентаре чтобы %2 его. + \n\n%1 debe estar en tu inventario principal para: %2 + \n\n%1 moet zich in je hoofdinventaris bevinden om het te %2. + \n\n%1 doit être dans votre inventaire principal pour pouvoir le %2 + \n\n%1 musí být ve tvém hlavním inventáři pro %2. %1 is already being looted by someone else. diff --git a/SQF/dayz_code/system/player_spawn_2.sqf b/SQF/dayz_code/system/player_spawn_2.sqf index f3e0e3d10..3d686068a 100644 --- a/SQF/dayz_code/system/player_spawn_2.sqf +++ b/SQF/dayz_code/system/player_spawn_2.sqf @@ -30,7 +30,7 @@ while {true} do { _bloodChanged = false; _size = (sizeOf typeOf _refObj) * _factor; - _vel = velocity _refObj; + _vel = velocity player; _speed = round((_vel distance [0,0,0]) * 3.5); //reset position diff --git a/SQF/dayz_epoch/models/Wood_Floor.p3d b/SQF/dayz_epoch/models/Wood_Floor.p3d index e85688c9a..f507ea4bb 100644 Binary files a/SQF/dayz_epoch/models/Wood_Floor.p3d and b/SQF/dayz_epoch/models/Wood_Floor.p3d differ diff --git a/SQF/dayz_epoch/models/cinder_stack.p3d b/SQF/dayz_epoch/models/cinder_stack.p3d index 376368fab..2c27595de 100644 Binary files a/SQF/dayz_epoch/models/cinder_stack.p3d and b/SQF/dayz_epoch/models/cinder_stack.p3d differ diff --git a/SQF/dayz_epoch/models/cinder_wall_full.p3d b/SQF/dayz_epoch/models/cinder_wall_full.p3d new file mode 100644 index 000000000..2abbbe9fc Binary files /dev/null and b/SQF/dayz_epoch/models/cinder_wall_full.p3d differ diff --git a/SQF/dayz_epoch/models/cinder_wall_full_ghost.p3d b/SQF/dayz_epoch/models/cinder_wall_full_ghost.p3d new file mode 100644 index 000000000..d1540aed5 Binary files /dev/null and b/SQF/dayz_epoch/models/cinder_wall_full_ghost.p3d differ diff --git a/SQF/dayz_epoch/models/cinder_wall_half.p3d b/SQF/dayz_epoch/models/cinder_wall_half.p3d new file mode 100644 index 000000000..9ce97c350 Binary files /dev/null and b/SQF/dayz_epoch/models/cinder_wall_half.p3d differ diff --git a/SQF/dayz_epoch/models/cinder_wall_half_ghost.p3d b/SQF/dayz_epoch/models/cinder_wall_half_ghost.p3d new file mode 100644 index 000000000..555419619 Binary files /dev/null and b/SQF/dayz_epoch/models/cinder_wall_half_ghost.p3d differ diff --git a/SQF/dayz_epoch/models/mortar.p3d b/SQF/dayz_epoch/models/mortar.p3d new file mode 100644 index 000000000..e72472a89 Binary files /dev/null and b/SQF/dayz_epoch/models/mortar.p3d differ diff --git a/SQF/dayz_epoch/models/plank_pack.p3d b/SQF/dayz_epoch/models/plank_pack.p3d index 247da3ba5..4257eb522 100644 Binary files a/SQF/dayz_epoch/models/plank_pack.p3d and b/SQF/dayz_epoch/models/plank_pack.p3d differ diff --git a/SQF/dayz_epoch/models/plywood_pack.p3d b/SQF/dayz_epoch/models/plywood_pack.p3d index 3fd540145..5caccf78e 100644 Binary files a/SQF/dayz_epoch/models/plywood_pack.p3d and b/SQF/dayz_epoch/models/plywood_pack.p3d differ diff --git a/SQF/dayz_epoch/pictures/equip_mortar_CA.paa b/SQF/dayz_epoch/pictures/equip_mortar_CA.paa new file mode 100644 index 000000000..78ebdcc86 Binary files /dev/null and b/SQF/dayz_epoch/pictures/equip_mortar_CA.paa differ diff --git a/SQF/dayz_epoch/textures/cinder.rvmat b/SQF/dayz_epoch/textures/cinder.rvmat index 7946aead8..4e7c4ef67 100644 --- a/SQF/dayz_epoch/textures/cinder.rvmat +++ b/SQF/dayz_epoch/textures/cinder.rvmat @@ -1,8 +1,8 @@ -ambient[]={1,1,1,0.5}; -diffuse[]={1,1,1,0.5}; +ambient[]={0.48627451,0.48627451,0.48627451,0.63999999}; +diffuse[]={0.48627451,0.48627451,0.48627451,0.63999999}; forcedDiffuse[]={0,0,0,0}; emmisive[]={0,0,0,1}; -specular[]={0.24313726,0.24313726,0.24313726,1}; +specular[]={0.34117648,0.34117648,0.34117648,1}; specularPower=100; PixelShaderID="Super"; VertexShaderID="Super"; diff --git a/SQF/dayz_epoch/textures/cinder_ghost_ca.paa b/SQF/dayz_epoch/textures/cinder_ghost_ca.paa new file mode 100644 index 000000000..d172b26ee Binary files /dev/null and b/SQF/dayz_epoch/textures/cinder_ghost_ca.paa differ diff --git a/SQF/dayz_epoch/textures/mortar.rvmat b/SQF/dayz_epoch/textures/mortar.rvmat new file mode 100644 index 000000000..cf6cc29d3 --- /dev/null +++ b/SQF/dayz_epoch/textures/mortar.rvmat @@ -0,0 +1,68 @@ +ambient[]={1,1,1,0.5}; +diffuse[]={1,1,1,0.5}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.24313726,0.24313726,0.24313726,1}; +specularPower=100; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 +{ + texture="z\addons\dayz_epoch\textures\mortar_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture="CA\data\detail_maps\concrete1_512_dt.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 +{ + texture="#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage4 +{ + texture="#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage5 +{ + texture="CA\data\detail_maps\concrete1_512_dtsmdi.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; diff --git a/SQF/dayz_epoch/textures/mortar_co.paa b/SQF/dayz_epoch/textures/mortar_co.paa new file mode 100644 index 000000000..f28af08c4 Binary files /dev/null and b/SQF/dayz_epoch/textures/mortar_co.paa differ diff --git a/SQF/dayz_epoch/textures/mortar_ghost_ca.paa b/SQF/dayz_epoch/textures/mortar_ghost_ca.paa new file mode 100644 index 000000000..f274da495 Binary files /dev/null and b/SQF/dayz_epoch/textures/mortar_ghost_ca.paa differ diff --git a/SQF/dayz_epoch/textures/mortar_nohq.paa b/SQF/dayz_epoch/textures/mortar_nohq.paa new file mode 100644 index 000000000..e93e2f991 Binary files /dev/null and b/SQF/dayz_epoch/textures/mortar_nohq.paa differ diff --git a/SQF/dayz_epoch/textures/mortar_pail.rvmat b/SQF/dayz_epoch/textures/mortar_pail.rvmat new file mode 100644 index 000000000..13e078bc2 --- /dev/null +++ b/SQF/dayz_epoch/textures/mortar_pail.rvmat @@ -0,0 +1,92 @@ +ambient[]={0.51372552,0.51372552,0.51372552,0.83999997}; +diffuse[]={0.51372552,0.51372552,0.51372552,0.83999997}; +forcedDiffuse[]={0,0,0,0}; +emmisive[]={0,0,0,1}; +specular[]={0.05882353,0.05882353,0.05882353,0.73699999}; +specularPower=100; +PixelShaderID="Super"; +VertexShaderID="Super"; +class Stage1 +{ + texture="z\addons\dayz_epoch\textures\mortar_pail_nohq.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage2 +{ + texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage3 +{ + texture="#(argb,8,8,3)color(0,0,0,0,MC)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage4 +{ + texture="#(argb,8,8,3)color(1,1,1,1,AS)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage5 +{ + texture="z\addons\dayz_epoch\textures\mortar_pail_smdi.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage6 +{ + texture="#(ai,32,128,1)fresnel(0.3,0.35)"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; +class Stage7 +{ + texture="ca\data\env_land_co.paa"; + uvSource="tex"; + class uvTransform + { + aside[]={1,0,0}; + up[]={0,1,0}; + dir[]={0,0,0}; + pos[]={0,0,0}; + }; +}; diff --git a/SQF/dayz_epoch/textures/mortar_pail_co.paa b/SQF/dayz_epoch/textures/mortar_pail_co.paa new file mode 100644 index 000000000..62fdce245 Binary files /dev/null and b/SQF/dayz_epoch/textures/mortar_pail_co.paa differ diff --git a/SQF/dayz_epoch/textures/mortar_pail_nohq.paa b/SQF/dayz_epoch/textures/mortar_pail_nohq.paa new file mode 100644 index 000000000..491982d1d Binary files /dev/null and b/SQF/dayz_epoch/textures/mortar_pail_nohq.paa differ diff --git a/SQF/dayz_epoch/textures/mortar_pail_smdi.paa b/SQF/dayz_epoch/textures/mortar_pail_smdi.paa new file mode 100644 index 000000000..3adf2fbf4 Binary files /dev/null and b/SQF/dayz_epoch/textures/mortar_pail_smdi.paa differ diff --git a/SQF/dayz_epoch/textures/mortar_smdi.paa b/SQF/dayz_epoch/textures/mortar_smdi.paa new file mode 100644 index 000000000..8bcd65f74 Binary files /dev/null and b/SQF/dayz_epoch/textures/mortar_smdi.paa differ diff --git a/Server Files/mysql/epoch.sql b/Server Files/mysql/epoch.sql index 8c11fb980..f9c529d4e 100644 --- a/Server Files/mysql/epoch.sql +++ b/Server Files/mysql/epoch.sql @@ -1,5 +1,5 @@ /* -DayZ Epoch 1.0.2 +DayZ Epoch 1.0.2.1 */ SET FOREIGN_KEY_CHECKS=0;