Erzengelgames Posted October 15, 2017 Report Share Posted October 15, 2017 @theduke you were right. is was not commanded yout. thanks for the hint. but is still not safeing ^^ Link to comment Share on other sites More sharing options...
theduke Posted October 19, 2017 Author Report Share Posted October 19, 2017 On 10/15/2017 at 5:20 PM, Erzengelgames said: @theduke you were right. is was not commanded yout. thanks for the hint. but is still not safeing ^^ try this for your custom_builds.sqf Spoiler /* DayZ Custom Buildables Made for DayZ Epoch please ask permission to use/edit/distrubute email [email protected]. Edits by Mike of http://www.petuniaserver.com/ - Original file & all kudos to the EPOCH devs! http://www.dayzepoch.com Edits and re-writes by hogscraper: Added code to see if player has tools and materials required to build item Removed a lot of code referencing lockables, plot pole placement and construction multiplier since part of that code was already removed Cleaned up a lot of old code that wasn't needed any more for this custom crafting Removed irrelevant variables from private block This file is called with zero parameters */ private ["_AdminCraft","_HM_temp","_HT_temp","_IsNearPlot","_RM_temp","_RT_temp","_activatingPlayer","_buildcheck","_canBuild","_canBuildOnPlot","_canDo","_cancel","_charID","_classname","_counter","_dir","_distance","_exitWith","_found","_friendlies","_hasMaterials","_hasTools","_hasmaterials","_hastools","_helperColor","_inVehicle","_isAllowedUnderGround","_isOk","_isfriendly","_isowner","_lbIndex","_location","_location1","_location2","_mags","_message","_nearestPole","_needText","_objHDiff","_object","_objectHelper","_objectHelperDir","_objectHelperPos","_offset","_onLadder","_ownerID","_playerUID","_plotcheck","_position","_reason","_requiredmaterials","_requiredtools","_requireplot","_rotate","_text","_tmp_Pos","_tmpbuilt","_vehicle","_weaps","_zheightchanged","_zheightdirection"]; _AdminCraft=false; _lbIndex = lbCurSel 3901; _classname = lbText [3901,_lbIndex]; if(dayz_actionInProgress) exitWith { localize "str_epoch_player_40" call dayz_rollingMessages; }; dayz_actionInProgress = true; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _cancel = false; _reason = ""; _canBuildOnPlot = false; _playerUID = getPlayerUID player; if(_playerUID in Admin_Crafting) then { _AdminCraft=true; }; //create arrays for checking whether or not the player //has the correct tools and materials to make the desired item _requiredtools = getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requiredtools"); _requiredmaterials = getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requiredmaterials"); _RT_temp=getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requiredtools"); _RM_temp=getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requiredmaterials"); _hastools = false; _hasmaterials = false; _weaps=[]; _mags=[]; _weaps=weapons player; _mags=magazines player; _tmp_Pos=0; _counter=0; { _tmp_Pos= _weaps find _x; if (_tmp_Pos > -1) then { _requiredtools set [_counter,objNull]; _weaps set [_tmp_Pos,objNull]; }; _counter = _counter + 1; } forEach _RT_temp; _requiredtools=_requiredtools-[objNull]; _weaps=_weaps-[objNull]; _tmp_Pos=0; _counter=0; { _tmp_Pos= _mags find _x; if (_tmp_Pos > -1) then { _requiredmaterials set [_counter,objNull]; _mags set [_tmp_Pos,objNull]; }; _counter = _counter + 1; } forEach _RM_temp; _requiredmaterials=_requiredmaterials-[objNull]; _mags=_mags-[objNull]; if(((count _requiredmaterials) == 0) or (_AdminCraft)) then { _hasmaterials=true; }; if(((count _requiredtools) == 0) or (_AdminCraft)) then { _hastools=true; }; //Create the message to display if player is missing any of the required tools if (!_hasTools) then{ _HT_temp="You are missing the following tools:"; { _HT_temp=_HT_temp+" " + getText (configFile >> "CfgWeapons" >> _x >> "displayName"); }foreach _requiredtools; }; //Create the message to display if player is missing any of the required materials if (!_hasMaterials) then{ _HM_temp="You are missing the following materials:"; { if(getText (configFile >> "CfgMagazines" >> _x >> "displayName")=="Supply Crate") then{ _HM_temp=_HM_temp+" " + getText (configFile >> "CfgMagazines" >> _x >> "descriptionShort"); }else{ _HM_temp=_HM_temp+" " + getText (configFile >> "CfgMagazines" >> _x >> "displayName"); }; }foreach _requiredmaterials; }; _vehicle = vehicle player; _inVehicle = (_vehicle != player); helperDetach = false; _canDo = (!r_drag_sqf and !r_player_unconscious); DZE_Q = false; DZE_Z = false; DZE_Q_alt = false; DZE_Z_alt = false; DZE_Q_ctrl = false; DZE_Z_ctrl = false; DZE_5 = false; DZE_4 = false; DZE_6 = false; DZE_F = false; DZE_cancelBuilding = false; call gear_ui_init; closeDialog 1; if (dayz_isSwimming) exitWith {dayz_actionInProgress = false; localize "str_player_26" call dayz_rollingMessages;}; if (_inVehicle) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;}; if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;}; if (!_hasTools) exitWith {dayz_actionInProgress = false; format["%1",_HT_temp] call dayz_rollingMessages;}; if (!_hasMaterials) exitWith {dayz_actionInProgress = false; format["%1",_HM_temp] call dayz_rollingMessages;}; _text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); _requireplot = DZE_requireplot; if(isNumber (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requireplot")) then { _requireplot = getNumber(missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requireplot"); }; if(_AdminCraft) then { _requireplot=0; }; _offset = getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "offset"); if((count _offset) <= 0) then { _offset = [0,3,0]; }; _distance = DZE_PlotPole select 0; _needText = localize "str_epoch_player_246"; _canBuild = false; _nearestPole = objNull; _ownerID = 0; _friendlies = []; _plotcheck = [player, false] call FNC_find_plots; _distance = DZE_PlotPole select 0; _IsNearPlot = _plotcheck select 1; _nearestPole = _plotcheck select 2; if (_IsNearPlot == 0) then { if (_requireplot == 0) then { _canBuild = true; } else { _exitWith = localize "STR_EPOCH_PLAYER_135"; }; } else { _ownerID = _nearestPole getVariable["CharacterID","0"]; if (dayz_characterID == _ownerID) then { _canBuild = true; } else { if (DZE_permanentPlot) then { _buildcheck = [player, _nearestPole] call FNC_check_access; _isowner = _buildcheck select 0; _isfriendly = ((_buildcheck select 1) or (_buildcheck select 3)); if (_isowner || _isfriendly) then { _canBuild = true; } else { _exitWith = localize "STR_EPOCH_PLAYER_134"; }; } else { _friendlies = player getVariable ["friendlyTo",[]]; if (_ownerID in _friendlies) then { _canBuild = true; } else { _exitWith = localize "STR_EPOCH_PLAYER_134"; }; }; }; }; // _message if(!_canBuild) exitWith { dayz_actionInProgress = false; format[_exitWith,_needText,_distance] call dayz_rollingMessages; }; _location = [0,0,0]; _isOk = true; // get inital players position _location1 = getPosATL player; _dir = getDir player; _object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; //Build gizmo _objectHelper = "Sign_sphere10cm_EP1" createVehicle _location; _helperColor = "#(argb,8,8,3)color(0,0,0,0,ca)"; _objectHelper setobjecttexture [0,_helperColor]; _objectHelper attachTo [player,_offset]; _object attachTo [_objectHelper,[0,0,0]]; _position = getPosATL _objectHelper; if(_AdminCraft) then{ } else { { player removeMagazine _x; } foreach _RM_temp; }; _position = getPosATL _object; localize "str_epoch_player_45" call dayz_rollingMessages; _objHDiff = 0; while {_isOk} do { _zheightchanged = false; _zheightdirection = ""; _rotate = false; if (DZE_Q) then { DZE_Q = false; _zheightdirection = "up"; _zheightchanged = true; }; if (DZE_Z) then { DZE_Z = false; _zheightdirection = "down"; _zheightchanged = true; }; if (DZE_Q_alt) then { DZE_Q_alt = false; _zheightdirection = "up_alt"; _zheightchanged = true; }; if (DZE_Z_alt) then { DZE_Z_alt = false; _zheightdirection = "down_alt"; _zheightchanged = true; }; if (DZE_Q_ctrl) then { DZE_Q_ctrl = false; _zheightdirection = "up_ctrl"; _zheightchanged = true; }; if (DZE_Z_ctrl) then { DZE_Z_ctrl = false; _zheightdirection = "down_ctrl"; _zheightchanged = true; }; if (DZE_4) then { _rotate = true; DZE_4 = false; if (helperDetach) then { _dir = -45; } else { _dir = 180; }; }; if (DZE_6) then { _rotate = true; DZE_6 = false; if (helperDetach) then { _dir = 45; } else { _dir = 0; }; }; //Number keys above qwerty //1=turn clockwise 1/16th of a circle //2=detaches object from player - OBJECT MUST BE COMPLETELY ABOVE GROUND OR IT WILL DISAPPEAR!! //3=turn counter clockwise 1/16th of a circle if (AAC_1) then { _rotate = true; AAC_1 = false; if (helperDetach) then { _dir = -45; } else { _dir = _dir + 22.5;; }; }; if (AAC_3) then { _rotate = true; AAC_3 = false; if (helperDetach) then { _dir = -45; } else { _dir = _dir - 22.5; }; }; if (DZE_F and _canDo) then { if (helperDetach) then { _objectHelperDir = getDir _objectHelper; _objectHelper attachTo [player]; _objectHelper setDir _objectHelperDir-(getDir player); helperDetach = false; } else { _objectHelperPos = getPosATL _objectHelper; detach _objectHelper; _objectHelper setPosATL _objectHelperPos; _objectHelperDir = getDir _objectHelper; _objectHelper setVelocity [0,0,0]; //fix sliding glitch helperDetach = true; }; DZE_F = false; }; if(_rotate) then { if (helperDetach) then { _objectHelperDir = getDir _objectHelper; _objectHelperPos = getPosATL _objectHelper; _objectHelper setDir _objectHelperDir+_dir; _objectHelper setPosATL _objectHelperPos; } else { _objectHelper setDir _dir; _objectHelper setPosATL _position; //diag_log format["DEBUG Rotate BUILDING POS: %1", _position]; }; }; if(_zheightchanged) then { if (!helperDetach) then { detach _objectHelper; }; _position = getPosATL _objectHelper; if(_zheightdirection == "up") then { _position set [2,((_position select 2)+0.1)]; _objHDiff = _objHDiff + 0.1; }; if(_zheightdirection == "down") then { _position set [2,((_position select 2)-0.1)]; _objHDiff = _objHDiff - 0.1; }; if(_zheightdirection == "up_alt") then { _position set [2,((_position select 2)+1)]; _objHDiff = _objHDiff + 1; }; if(_zheightdirection == "down_alt") then { _position set [2,((_position select 2)-1)]; _objHDiff = _objHDiff - 1; }; if(_zheightdirection == "up_ctrl") then { _position set [2,((_position select 2)+0.01)]; _objHDiff = _objHDiff + 0.01; }; if(_zheightdirection == "down_ctrl") then { _position set [2,((_position select 2)-0.01)]; _objHDiff = _objHDiff - 0.01; }; _objectHelper setDir (getDir _objectHelper); _objectHelper setPosATL _position; //diag_log format["DEBUG Change BUILDING POS: %1", _position]; if (!helperDetach) then { _objectHelper attachTo [player]; }; }; sleep 0.5; _location2 = getPosATL player; if(DZE_5) exitWith { _isOk = false; detach _object; _dir = getDir _object; _position = getPosATL _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(_location1 distance _location2 > DZE_buildMaxMoveDistance) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_MOVED",DZE_buildMaxMoveDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(abs(_objHDiff) > DZE_buildMaxMoveDistance) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_TOO_FAR",DZE_buildMaxMoveDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith { _isOk = false; _cancel = true; _reason = localize "str_epoch_player_43"; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if (DZE_cancelBuilding) exitWith { _isOk = false; _cancel = true; _reason = localize "STR_EPOCH_PLAYER_46"; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; }; if (!DZE_BuildOnRoads) then { if (isOnRoad _position) then { _cancel = true; _reason = localize "STR_EPOCH_BUILD_FAIL_ROAD"; }; }; if(!canbuild) then { _cancel = true; _reason = format[localize "STR_EPOCH_PLAYER_136",localize "STR_EPOCH_TRADER"]; }; if(!_cancel) then { // Start Build _tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; _tmpbuilt setdir _dir; // Get position based on object _location = _position; _tmpbuilt setPosATL _location; format[localize "str_epoch_player_138",_text] call dayz_rollingMessages; player playActionNow "Medic"; [player,"repair",0,false,10] call dayz_zombieSpeak; [player,10,true,(getPosATL player)] spawn player_alertZombies; format[localize "str_build_01",_text] call dayz_rollingMessages; _tmpbuilt setVariable ["OEMPos",_location,true]; _tmpbuilt setVariable ["CharacterID",dayz_characterID,true]; _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; _charID = dayz_characterID; _activatingPlayer = player; PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname]; publicVariableServer "PVDZ_obj_Publish"; "Your build was successful!" call dayz_rollingMessages; player reveal _tmpbuilt; dayz_actionInProgress = false; processInitCommands; } else { format[localize "str_epoch_player_47",_text,_reason] call dayz_rollingMessages; dayz_actionInProgress = false; if(_AdminCraft) then { } else { { //Since player had items removed we need to give them back player addMagazine _x; } foreach _RM_temp; }; }; dayz_actionInProgress = false; You are using a outdated file. If what i just pasted doesnt work. I would suggest to re-download from my github. NOT from the link in my post. Bricktop 1 Link to comment Share on other sites More sharing options...
Erzengelgames Posted October 19, 2017 Report Share Posted October 19, 2017 1 hour ago, theduke said: try this for your custom_builds.sqf Hide contents /* DayZ Custom Buildables Made for DayZ Epoch please ask permission to use/edit/distrubute email [email protected]. Edits by Mike of http://www.petuniaserver.com/ - Original file & all kudos to the EPOCH devs! http://www.dayzepoch.com Edits and re-writes by hogscraper: Added code to see if player has tools and materials required to build item Removed a lot of code referencing lockables, plot pole placement and construction multiplier since part of that code was already removed Cleaned up a lot of old code that wasn't needed any more for this custom crafting Removed irrelevant variables from private block This file is called with zero parameters */ private ["_AdminCraft","_HM_temp","_HT_temp","_IsNearPlot","_RM_temp","_RT_temp","_activatingPlayer","_buildcheck","_canBuild","_canBuildOnPlot","_canDo","_cancel","_charID","_classname","_counter","_dir","_distance","_exitWith","_found","_friendlies","_hasMaterials","_hasTools","_hasmaterials","_hastools","_helperColor","_inVehicle","_isAllowedUnderGround","_isOk","_isfriendly","_isowner","_lbIndex","_location","_location1","_location2","_mags","_message","_nearestPole","_needText","_objHDiff","_object","_objectHelper","_objectHelperDir","_objectHelperPos","_offset","_onLadder","_ownerID","_playerUID","_plotcheck","_position","_reason","_requiredmaterials","_requiredtools","_requireplot","_rotate","_text","_tmp_Pos","_tmpbuilt","_vehicle","_weaps","_zheightchanged","_zheightdirection"]; _AdminCraft=false; _lbIndex = lbCurSel 3901; _classname = lbText [3901,_lbIndex]; if(dayz_actionInProgress) exitWith { localize "str_epoch_player_40" call dayz_rollingMessages; }; dayz_actionInProgress = true; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _cancel = false; _reason = ""; _canBuildOnPlot = false; _playerUID = getPlayerUID player; if(_playerUID in Admin_Crafting) then { _AdminCraft=true; }; //create arrays for checking whether or not the player //has the correct tools and materials to make the desired item _requiredtools = getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requiredtools"); _requiredmaterials = getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requiredmaterials"); _RT_temp=getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requiredtools"); _RM_temp=getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requiredmaterials"); _hastools = false; _hasmaterials = false; _weaps=[]; _mags=[]; _weaps=weapons player; _mags=magazines player; _tmp_Pos=0; _counter=0; { _tmp_Pos= _weaps find _x; if (_tmp_Pos > -1) then { _requiredtools set [_counter,objNull]; _weaps set [_tmp_Pos,objNull]; }; _counter = _counter + 1; } forEach _RT_temp; _requiredtools=_requiredtools-[objNull]; _weaps=_weaps-[objNull]; _tmp_Pos=0; _counter=0; { _tmp_Pos= _mags find _x; if (_tmp_Pos > -1) then { _requiredmaterials set [_counter,objNull]; _mags set [_tmp_Pos,objNull]; }; _counter = _counter + 1; } forEach _RM_temp; _requiredmaterials=_requiredmaterials-[objNull]; _mags=_mags-[objNull]; if(((count _requiredmaterials) == 0) or (_AdminCraft)) then { _hasmaterials=true; }; if(((count _requiredtools) == 0) or (_AdminCraft)) then { _hastools=true; }; //Create the message to display if player is missing any of the required tools if (!_hasTools) then{ _HT_temp="You are missing the following tools:"; { _HT_temp=_HT_temp+" " + getText (configFile >> "CfgWeapons" >> _x >> "displayName"); }foreach _requiredtools; }; //Create the message to display if player is missing any of the required materials if (!_hasMaterials) then{ _HM_temp="You are missing the following materials:"; { if(getText (configFile >> "CfgMagazines" >> _x >> "displayName")=="Supply Crate") then{ _HM_temp=_HM_temp+" " + getText (configFile >> "CfgMagazines" >> _x >> "descriptionShort"); }else{ _HM_temp=_HM_temp+" " + getText (configFile >> "CfgMagazines" >> _x >> "displayName"); }; }foreach _requiredmaterials; }; _vehicle = vehicle player; _inVehicle = (_vehicle != player); helperDetach = false; _canDo = (!r_drag_sqf and !r_player_unconscious); DZE_Q = false; DZE_Z = false; DZE_Q_alt = false; DZE_Z_alt = false; DZE_Q_ctrl = false; DZE_Z_ctrl = false; DZE_5 = false; DZE_4 = false; DZE_6 = false; DZE_F = false; DZE_cancelBuilding = false; call gear_ui_init; closeDialog 1; if (dayz_isSwimming) exitWith {dayz_actionInProgress = false; localize "str_player_26" call dayz_rollingMessages;}; if (_inVehicle) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_42" call dayz_rollingMessages;}; if (_onLadder) exitWith {dayz_actionInProgress = false; localize "str_player_21" call dayz_rollingMessages;}; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith {dayz_actionInProgress = false; localize "str_epoch_player_43" call dayz_rollingMessages;}; if (!_hasTools) exitWith {dayz_actionInProgress = false; format["%1",_HT_temp] call dayz_rollingMessages;}; if (!_hasMaterials) exitWith {dayz_actionInProgress = false; format["%1",_HM_temp] call dayz_rollingMessages;}; _text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); _requireplot = DZE_requireplot; if(isNumber (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requireplot")) then { _requireplot = getNumber(missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "requireplot"); }; if(_AdminCraft) then { _requireplot=0; }; _offset = getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _classname >> "offset"); if((count _offset) <= 0) then { _offset = [0,3,0]; }; _distance = DZE_PlotPole select 0; _needText = localize "str_epoch_player_246"; _canBuild = false; _nearestPole = objNull; _ownerID = 0; _friendlies = []; _plotcheck = [player, false] call FNC_find_plots; _distance = DZE_PlotPole select 0; _IsNearPlot = _plotcheck select 1; _nearestPole = _plotcheck select 2; if (_IsNearPlot == 0) then { if (_requireplot == 0) then { _canBuild = true; } else { _exitWith = localize "STR_EPOCH_PLAYER_135"; }; } else { _ownerID = _nearestPole getVariable["CharacterID","0"]; if (dayz_characterID == _ownerID) then { _canBuild = true; } else { if (DZE_permanentPlot) then { _buildcheck = [player, _nearestPole] call FNC_check_access; _isowner = _buildcheck select 0; _isfriendly = ((_buildcheck select 1) or (_buildcheck select 3)); if (_isowner || _isfriendly) then { _canBuild = true; } else { _exitWith = localize "STR_EPOCH_PLAYER_134"; }; } else { _friendlies = player getVariable ["friendlyTo",[]]; if (_ownerID in _friendlies) then { _canBuild = true; } else { _exitWith = localize "STR_EPOCH_PLAYER_134"; }; }; }; }; // _message if(!_canBuild) exitWith { dayz_actionInProgress = false; format[_exitWith,_needText,_distance] call dayz_rollingMessages; }; _location = [0,0,0]; _isOk = true; // get inital players position _location1 = getPosATL player; _dir = getDir player; _object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; //Build gizmo _objectHelper = "Sign_sphere10cm_EP1" createVehicle _location; _helperColor = "#(argb,8,8,3)color(0,0,0,0,ca)"; _objectHelper setobjecttexture [0,_helperColor]; _objectHelper attachTo [player,_offset]; _object attachTo [_objectHelper,[0,0,0]]; _position = getPosATL _objectHelper; if(_AdminCraft) then{ } else { { player removeMagazine _x; } foreach _RM_temp; }; _position = getPosATL _object; localize "str_epoch_player_45" call dayz_rollingMessages; _objHDiff = 0; while {_isOk} do { _zheightchanged = false; _zheightdirection = ""; _rotate = false; if (DZE_Q) then { DZE_Q = false; _zheightdirection = "up"; _zheightchanged = true; }; if (DZE_Z) then { DZE_Z = false; _zheightdirection = "down"; _zheightchanged = true; }; if (DZE_Q_alt) then { DZE_Q_alt = false; _zheightdirection = "up_alt"; _zheightchanged = true; }; if (DZE_Z_alt) then { DZE_Z_alt = false; _zheightdirection = "down_alt"; _zheightchanged = true; }; if (DZE_Q_ctrl) then { DZE_Q_ctrl = false; _zheightdirection = "up_ctrl"; _zheightchanged = true; }; if (DZE_Z_ctrl) then { DZE_Z_ctrl = false; _zheightdirection = "down_ctrl"; _zheightchanged = true; }; if (DZE_4) then { _rotate = true; DZE_4 = false; if (helperDetach) then { _dir = -45; } else { _dir = 180; }; }; if (DZE_6) then { _rotate = true; DZE_6 = false; if (helperDetach) then { _dir = 45; } else { _dir = 0; }; }; //Number keys above qwerty //1=turn clockwise 1/16th of a circle //2=detaches object from player - OBJECT MUST BE COMPLETELY ABOVE GROUND OR IT WILL DISAPPEAR!! //3=turn counter clockwise 1/16th of a circle if (AAC_1) then { _rotate = true; AAC_1 = false; if (helperDetach) then { _dir = -45; } else { _dir = _dir + 22.5;; }; }; if (AAC_3) then { _rotate = true; AAC_3 = false; if (helperDetach) then { _dir = -45; } else { _dir = _dir - 22.5; }; }; if (DZE_F and _canDo) then { if (helperDetach) then { _objectHelperDir = getDir _objectHelper; _objectHelper attachTo [player]; _objectHelper setDir _objectHelperDir-(getDir player); helperDetach = false; } else { _objectHelperPos = getPosATL _objectHelper; detach _objectHelper; _objectHelper setPosATL _objectHelperPos; _objectHelperDir = getDir _objectHelper; _objectHelper setVelocity [0,0,0]; //fix sliding glitch helperDetach = true; }; DZE_F = false; }; if(_rotate) then { if (helperDetach) then { _objectHelperDir = getDir _objectHelper; _objectHelperPos = getPosATL _objectHelper; _objectHelper setDir _objectHelperDir+_dir; _objectHelper setPosATL _objectHelperPos; } else { _objectHelper setDir _dir; _objectHelper setPosATL _position; //diag_log format["DEBUG Rotate BUILDING POS: %1", _position]; }; }; if(_zheightchanged) then { if (!helperDetach) then { detach _objectHelper; }; _position = getPosATL _objectHelper; if(_zheightdirection == "up") then { _position set [2,((_position select 2)+0.1)]; _objHDiff = _objHDiff + 0.1; }; if(_zheightdirection == "down") then { _position set [2,((_position select 2)-0.1)]; _objHDiff = _objHDiff - 0.1; }; if(_zheightdirection == "up_alt") then { _position set [2,((_position select 2)+1)]; _objHDiff = _objHDiff + 1; }; if(_zheightdirection == "down_alt") then { _position set [2,((_position select 2)-1)]; _objHDiff = _objHDiff - 1; }; if(_zheightdirection == "up_ctrl") then { _position set [2,((_position select 2)+0.01)]; _objHDiff = _objHDiff + 0.01; }; if(_zheightdirection == "down_ctrl") then { _position set [2,((_position select 2)-0.01)]; _objHDiff = _objHDiff - 0.01; }; _objectHelper setDir (getDir _objectHelper); _objectHelper setPosATL _position; //diag_log format["DEBUG Change BUILDING POS: %1", _position]; if (!helperDetach) then { _objectHelper attachTo [player]; }; }; sleep 0.5; _location2 = getPosATL player; if(DZE_5) exitWith { _isOk = false; detach _object; _dir = getDir _object; _position = getPosATL _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(_location1 distance _location2 > DZE_buildMaxMoveDistance) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_MOVED",DZE_buildMaxMoveDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if(abs(_objHDiff) > DZE_buildMaxMoveDistance) exitWith { _isOk = false; _cancel = true; _reason = format[localize "STR_EPOCH_BUILD_FAIL_TOO_FAR",DZE_buildMaxMoveDistance]; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if (player getVariable["combattimeout",0] >= diag_tickTime) exitWith { _isOk = false; _cancel = true; _reason = localize "str_epoch_player_43"; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; if (DZE_cancelBuilding) exitWith { _isOk = false; _cancel = true; _reason = localize "STR_EPOCH_PLAYER_46"; detach _object; deleteVehicle _object; detach _objectHelper; deleteVehicle _objectHelper; }; }; if (!DZE_BuildOnRoads) then { if (isOnRoad _position) then { _cancel = true; _reason = localize "STR_EPOCH_BUILD_FAIL_ROAD"; }; }; if(!canbuild) then { _cancel = true; _reason = format[localize "STR_EPOCH_PLAYER_136",localize "STR_EPOCH_TRADER"]; }; if(!_cancel) then { // Start Build _tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"]; _tmpbuilt setdir _dir; // Get position based on object _location = _position; _tmpbuilt setPosATL _location; format[localize "str_epoch_player_138",_text] call dayz_rollingMessages; player playActionNow "Medic"; [player,"repair",0,false,10] call dayz_zombieSpeak; [player,10,true,(getPosATL player)] spawn player_alertZombies; format[localize "str_build_01",_text] call dayz_rollingMessages; _tmpbuilt setVariable ["OEMPos",_location,true]; _tmpbuilt setVariable ["CharacterID",dayz_characterID,true]; _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; _charID = dayz_characterID; _activatingPlayer = player; PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname]; publicVariableServer "PVDZ_obj_Publish"; "Your build was successful!" call dayz_rollingMessages; player reveal _tmpbuilt; dayz_actionInProgress = false; processInitCommands; } else { format[localize "str_epoch_player_47",_text,_reason] call dayz_rollingMessages; dayz_actionInProgress = false; if(_AdminCraft) then { } else { { //Since player had items removed we need to give them back player addMagazine _x; } foreach _RM_temp; }; }; dayz_actionInProgress = false; You are using a outdated file. If what i just pasted doesnt work. I would suggest to re-download from my github. NOT from the link in my post. fuuuck yeah ! you fixed it. love so much ^^ theduke 1 Link to comment Share on other sites More sharing options...
Schalldampfer Posted October 27, 2017 Report Share Posted October 27, 2017 I've made it to show displayName instead of classname for required tools and materials changes are 2 lines added in Crafting_Compiles.sqf : Spoiler //player_selectSlot = compile preprocessFileLineNumbers "custom\Buildables\ui_selectSlot.sqf"; //fnc_usec_selfActions = compile preprocessFileLineNumbers "custom\fn_selfActions.sqf"; fnc_Load_Mats_and_Tools = { //5900-5903 tools //6901-6912 materials ctrlSetText [5900,""]; ctrlSetText [5901,""]; ctrlSetText [5902,""]; ctrlSetText [5903,""]; ctrlSetText [6900,""]; ctrlSetText [6901,""]; ctrlSetText [6902,""]; ctrlSetText [6903,""]; ctrlSetText [6904,""]; ctrlSetText [6905,""]; ctrlSetText [6906,""]; ctrlSetText [6907,""]; ctrlSetText [6908,""]; ctrlSetText [6909,""]; ctrlSetText [6910,""]; ctrlSetText [6911,""]; _lbIndex=lbCurSel 3901; _lbText=lbText [3901,_lbIndex]; _toolTmp = ""; _weaps = weapons player; _requiredtools = getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _lbText >> "requiredtools"); _craftdialog = uiNamespace getVariable "Advanced_CraftingV"; _counter=0; while {count _requiredtools > 0} do { _toolTmp = _requiredtools select 0; _tmp_Pos=_weaps find _toolTmp;_toolTmp = getText (configFile >> "CfgWeapons" >> _toolTmp >> "displayName"); switch (_counter) do { case 0: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 5900) ctrlSetTextColor [0.2,0.839,0.2,1]; _weaps set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 5900) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [5900,_toolTmp]; }; case 1: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 5901) ctrlSetTextColor [0.2,0.839,0.2,1]; _weaps set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 5901) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [5901,_toolTmp]; }; case 2: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 5902) ctrlSetTextColor [0.2,0.839,0.2,1]; _weaps set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 5902) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [5902,_toolTmp]; }; case 3: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 5903) ctrlSetTextColor [0.2,0.839,0.2,1]; _weaps set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 5903) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [5903,_toolTmp]; }; default {}; }; _requiredtools set [0,objNull]; _requiredtools=_requiredtools-[objNull]; _weaps = _weaps-[objNull]; _counter=_counter + 1; }; _materialTmp = ""; _mags = magazines player; _requiredmaterials = getArray (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult >> _lbText >> "requiredmaterials"); _counter=0; while{count _requiredmaterials>0} do { _materialTmp = _requiredmaterials select 0; _tmp_Pos=_mags find _materialTmp;_materialTmp = getText(configFile >> "cfgMagazines" >> _materialTmp >> "displayName"); switch (_counter) do { case 0: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6900) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6900) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6900,_materialTmp]; }; case 1: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6901) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6901) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6901,_materialTmp]; }; case 2: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6902) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6902) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6902,_materialTmp]; }; case 3: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6903) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6903) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6903,_materialTmp]; }; case 4: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6904) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6904) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6904,_materialTmp]; }; case 5: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6905) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6905) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6905,_materialTmp]; }; case 6: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6906) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6906) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6906,_materialTmp]; }; case 7: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6907) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6907) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6907,_materialTmp]; }; case 8: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6908) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6908) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6908,_materialTmp]; }; case 9: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6909) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6909) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6909,_materialTmp]; }; case 10: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6910) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6910) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6910,_materialTmp]; }; case 11: { if (_tmp_Pos > -1) then { (_craftdialog displayCtrl 6911) ctrlSetTextColor [0.2,0.839,0.2,1]; _mags set [_tmp_Pos,objNull]; } else { (_craftdialog displayCtrl 6911) ctrlSetTextColor [1,0.278,0.278,1]; }; ctrlSetText [6911,_materialTmp]; }; default {}; }; _requiredmaterials set [0,objNull]; _requiredmaterials=_requiredmaterials-[objNull]; _mags=_mags-[objNull]; _counter=_counter + 1; }; }; fnc_Load_Items = { _itemsBox = 3901; lbClear _itemsBox; _cmbArray=[]; _cmbType=[]; _cmbType = (missionConfigFile >> "Custom_Buildables" >> "Buildables" >> ComboBoxResult); for "_i" from 0 to ( count _cmbType ) -1 do { _entry = _cmbType select _i; if( isClass _entry ) then { _class = configName _entry; _cmbArray set [count _cmbArray, _class]; }; }; //Add to Shelf {lbAdd [_itemsbox, _x]} forEach _cmbArray; //_count= count _cmbArray; //diag_log format ["%1",_cmbArray]; //diag_log format ["%1",_count]; GlobalComboboxVariable=99; }; Bricktop and theduke 1 1 Link to comment Share on other sites More sharing options...
Relentless Posted October 27, 2017 Report Share Posted October 27, 2017 The display name would be better aswell because it's localized already. Link to comment Share on other sites More sharing options...
Bricktop Posted December 7, 2017 Report Share Posted December 7, 2017 Just installed - works perfect! Thank you, Edit: I changed all "ItemHatchet_DZE" to "MeleeHatchet" in MT_Defines.hpp Link to comment Share on other sites More sharing options...
Bricktop Posted December 11, 2017 Report Share Posted December 11, 2017 On 10/10/2017 at 11:29 AM, Erzengelgames said: hey, to get db safe working i ented all classnames to DayZ_SafeObjects like this Reveal hidden contents DayZ_SafeObjects = ["ASC_EU_BulbBLUP","ASC_EU_BulbGRNP","ASC_EU_LHVIndE","ASC_EU_LHVIndB","LAND_ASC_Wall_Lamp_New","LAND_ASC_Wall_Lamp_Old","LAND_ASC_runway_Bluelight","ASC_runway_BluelightB","MAP_b_betulaHumilis","MAP_b_canina2s","MAP_c_autumn_flowers","MAP_c_blueBerry","MAP_c_caluna","MAP_c_fern","MAP_c_fernTall","MAP_c_GrassCrookedForest","MAP_c_GrassCrookedGreen","MAP_c_GrassDryLong","MAP_c_GrassTall","MAP_c_leaves","MAP_c_MushroomBabka","MAP_c_MushroomHorcak","MAP_c_MushroomMuchomurka","MAP_c_MushroomPrasivky","MAP_c_picea","MAP_c_PlantsAutumnForest","MAP_c_raspBerry","MAP_C_SmallLeafPlant","MAP_c_wideLeafPlant","MAP_t_alnus2s","MAP_t_betula1f","MAP_t_betula2s","MAP_t_betula2w","MAP_t_fagus2s","MAP_t_acer2s","MAP_t_betula2f","MAP_t_carpinus2s","MAP_t_fagus2f","MAP_t_fraxinus2s","Land_Misc_Well_C_EP1","Bleacher_EP1","Land_Bench_EP1","Land_Cabinet_EP1","Land_Chest_EP1","MAP_almara","MAP_case_a","MAP_case_bedroom_a","MAP_case_bedroom_b","MAP_case_cans_b","MAP_case_d","MAP_case_wall_unit_part_c","MAP_case_wall_unit_part_d","MAP_case_wooden_b","MAP_Dhangar_borwnskrin","MAP_Dhangar_brownskrin","FoldChair","Land_Chair_EP1","MAP_armchair","FoldTable","Land_Table_EP1","Land_Table_small_EP1","Hhedgehog_concrete","Hhedgehog_concreteBig","Base_WarfareBBarrier10xTall","Fence_corrugated_plate","Fence_Ind_long","Land_CncBlock","Land_CncBlock_D","Land_CncBlock_Stripes","Land_fort_artillery_nest_EP1","Land_fort_rampart_EP1","MAP_Barbedwire","MAP_BarbGate","MAP_concrete_block","MAP_Concrete_Ramp","MAP_dragonTeeth","MAP_dragonTeethBig","MAP_fort_artillery_nest","MAP_fort_rampart","MAP_Fort_Razorwire","MAP_HBarrier5_round15","MAP_plot_provizorni","MAP_prebehlavka","Land_Fort_Watchtower_EP1","MAP_fort_watchtower","CDF_WarfareBBarracks","USMC_WarfareBBarracks","MAP_fortified_nest_big","MAP_vez","CDF_WarfareBFieldhHospital","MAP_MASH","MAP_Stan","MAP_Stan_east","MAP_tent_east","MAP_tent_small_west","MAP_tent_west","MAP_tent2_west","USMC_WarfareBFieldhHospital","MAP_fortified_nest_small","MAP_Pristresek_mensi","MAP_Mil_Mil_Guardhouse","MAP_GuardShed","MAP_Fortress_02","MAP_Fortress_01","WarfareBDepot","MAP_prolejzacka","MAP_ramp_concrete","MAP_woodenRamp","MAP_obstacle_get_over","MAP_obstacle_prone","MAP_obstacle_run_duck","MAP_kitchen_table_a","MAP_lobby_table","MAP_SmallTable","MAP_stul_hospoda","MAP_stul_kuch1","MAP_Table","MAP_table_drawer","Land_Rack_EP1","Land_Shelf_EP1","MAP_case_d","MAP_case_wall_unit_part_c","MAP_case_wall_unit_part_d","MAP_F_skrin_bar","MAP_Skrin_bar","MAP_library_a","Desk","MAP_conference_table_a","MAP_Dhangar_psacistul","MAP_office_table_a","MAP_ch_mod_c","MAP_ch_mod_h","MAP_ch_office_B","MAP_F_ch_mod_c","MAP_chair","MAP_kitchen_chair_a","MAP_lobby_chair","MAP_office_chair","WoodChair","MAP_Dhangar_knihovna","MAP_Dhangar_whiteskrin","MAP_library_a","MAP_shelf","MAP_Skrin_bar","MAP_Skrin_opalena","MAP_Truhla_stara","MAP_Church_chair","MAP_hospital_bench","MAP_lavicka_1","MAP_lavicka_2","MAP_lavicka_3","MAP_lavicka_4","MAP_bed_husbands","MAP_F_postel_manz_kov","MAP_F_postel_panelak2","MAP_F_Vojenska_palanda","MAP_postel_manz_kov","MAP_postel_panelak1","MAP_vojenska_palanda","Land_Misc_Well_L_EP1","MAP_Misc_Well","MAP_Misc_WellPump","MAP_pumpa","MAP_t_larix3f","MAP_t_larix3s","MAP_t_picea2s","Hanged","Hanged_MD","Body","GraveCross1","GraveCross2","GraveCrossHelmet","Mass_grave","MAP_t_picea3f","MAP_t_pinusN2s","MAP_t_pinusS2f","MAP_t_populus3s","MAP_t_quercus2f","MAP_t_quercus3s","MAP_t_fagus2W","MAP_t_fraxinus2W","MAP_t_malus1s","MAP_t_picea1s","MAP_t_pinusN1s","MAP_t_pyrus2s","MAP_t_salix2s","MAP_t_sorbus2s","MAP_flower_01","MAP_flower_02","MAP_p_articum","MAP_p_carduus","MAP_p_Helianthus","MAP_p_heracleum","MAP_p_Phragmites","MAP_p_urtica","MAP_pumpkin","MAP_pumpkin2","MAP_b_corylus","MAP_b_corylus2s","MAP_b_craet1","MAP_b_craet2","MAP_b_pmugo","MAP_b_prunus","MAP_b_salix2s","MAP_b_sambucus","LAND_ASC_runway_Yellowlight","ASC_runway_YellowlightB","MAP_fluor_lamp","MAP_lantern","MAP_Light_BathRoom","MAP_light_kitchen_03","Misc_Wall_lamp","Red_Light_Blinking_EP1","ASC_EU_LHVIndZ","ASC_EU_LHVInd","ASC_EU_LHV_lampa_sidlconc","ASC_EU_LHVSidl3","ASC_EU_LHVSidl2","ASC_EU_LHVSidl1","ASC_EU_LHVStre2","ASC_EU_LHVStre1","ASC_EU_LHVOld","ASC_EU_BulbPURP","ASC_EU_BulbREDP","ASC_EU_BulbYELP","ASC_EU_BulbBLUB","ASC_EU_BulbGRNB","ASC_EU_BulbPURB","ASC_EU_BulbREDB","ASC_EU_BulbYELB","Land_Ind_TankSmall","Land_Misc_ConcBox_EP1","MAP_AirCond_big","MAP_AirCond_small","MAP_AirCondition_A","MAP_AirCondition_B","MAP_antenna_big_roof","MAP_antenna_small_roof","MAP_antenna_small_roof_1","MAP_bouda_plech","MAP_drevo_hromada","MAP_kasna_new","MAP_kulna","MAP_Misc_Greenhouse","MAP_Misc_Hutch","MAP_PowerGenerator","Pile_of_wood","MAP_Misc_WoodPile","MAP_Ladder","MAP_P_Ladder","Axe_woodblock","Garbage_can","Garbage_container","MAP_popelnice","Haystack_small","Land_cages_EP1","Land_Campfire_burning","Land_transport_cart_EP1","MAP_ChickenCoop","MAP_fire","MAP_GasMeterExt","MAP_KBud","MAP_Misc_Boogieman","MAP_Misc_loudspeakers","MAP_Misc_PostBox","MAP_leseni2x","Land_covering_hut_EP1","Land_covering_hut_big_EP1","Land_Market_shelter_EP1","Land_sunshade_EP1","MAP_Camo_Box","MAP_CamoNet_EAST","MAP_CamoNet_EAST_var1","MAP_CamoNetB_EAST","MAP_CamoNet_NATO","MAP_CamoNet_NATO_var1","MAP_CamoNetB_NATO","MAP_Pristresek","MAP_stanek_3","MAP_stanek_3B","MAP_stanek_3_d","MAP_leseni4x","MAP_Misc_Scaffolding","MAP_parabola_big","MAP_phone_box","MAP_psi_bouda","MAP_snowman","MAP_Sphere","MAP_Sphere2","MAP_Toilet","MAP_Piskoviste","MAP_Houpacka","MAP_brana","MAP_LadderHalf","MAP_P_LadderLong","Land_Ind_BoardsPack1","Land_Ind_BoardsPack2","Land_Misc_Coil_EP1","Land_Misc_ConcOutlet_EP1","Land_Misc_ConcPipeline_EP1","Land_Misc_GContainer_Big","Land_Wheel_cart_EP1","MAP_P_cihly1","MAP_P_cihly2","MAP_P_cihly3","MAP_P_cihly4","MAP_P_pipe_big","MAP_P_pipe_small","MAP_P_ytong","MAP_paletaA","MAP_paletyC","MAP_paletyD","MAP_Pallets_Column","MAP_Misc_G_Pipes","MAP_Misc_palletsfoiled","MAP_Misc_palletsfoiled_heap","Misc_concrete","MAP_Ind_Timbers","MAP_P_Stavebni_kozy","MAP_P_bedna","MAP_garbage_misc","MAP_garbage_paleta","MAP_Misc_TyreHeap","MAP_pneu","Land_Crates_EP1","Land_Misc_Cargo1E_EP1","Land_Misc_Cargo1Eo_EP1","Land_Misc_Cargo2E","Land_Misc_Cargo2E_EP1","Land_transport_crates_EP1","MAP_drevena_bedna","MAP_metalcrate","MAP_metalcrate_02","MAP_Misc_cargo_cont_net1","MAP_Misc_cargo_cont_net2","MAP_Misc_cargo_cont_net3","MAP_Misc_cargo_cont_small","MAP_Misc_cargo_cont_small2","MAP_Misc_cargo_cont_tiny","Misc_Cargo1B_military","MAP_Barel1","MAP_Barel3","MAP_Barel4","MAP_Barel5","MAP_Barel6","MAP_Barel7","MAP_Barel8","MAP_Barels","MAP_Barels2","MAP_Barels3","MAP_barrel_empty","MAP_barrel_sand","MAP_barrel_water","MAP_nastenka2","MAP_nastenkaX","MAP_obraz_kancl4","MAP_picture_a","MAP_picture_a_02","MAP_picture_a_03","MAP_picture_a_04","MAP_picture_a_05","MAP_picture_b","MAP_picture_b_02","MAP_picture_c","MAP_picture_c_02","MAP_picture_d","MAP_picture_e","MAP_picture_f","MAP_picture_f_02","MAP_picture_g","MAP_wall_board","MAP_wall_board_02","MAP_wall_board_03","Can_small","FloorMop","Land_Bowl_EP1","Land_Bucket_EP1","Land_Canister_EP1","Land_Teapot_EP1","Land_Urn_EP1","Land_Vase_EP1","Land_Vase_loam_EP1","Land_Vase_loam_2_EP1","Land_Vase_loam_3_EP1","Land_Water_pipe_EP1","MAP_briefcase","MAP_bucket","MAP_FuelCan","MAP_MetalBucket","MAP_SmallObj_money","MAP_SmallObj_spukayev_docs_WPN","MAP_drapes","MAP_drapes_long","MAP_box_c","Land_Blankets_EP1","Land_Carpet_2_EP1","Land_Carpet_EP1","Land_Carpet_rack_EP1","Land_Pillow_EP1","MAP_misc_videoprojector","MAP_misc_videoprojector_platno","MAP_mutt_vysilacka","MAP_notebook","MAP_pc","MAP_phonebox","MAP_radio_b","MAP_satelitePhone","MAP_tv_a","Radio","SmallTV","Land_Bag_EP1","Land_bags_EP1","Land_Basket_EP1","Land_Sack_EP1","Land_Wicker_basket_EP1","MAP_icebox","MAP_lobby_counter","MAP_pultskasou","MAP_shelf","MAP_vending_machine","MAP_F_bath","MAP_lekarnicka","MAP_P_Basin_A","MAP_P_bath","MAP_P_sink","MAP_P_toilet_b_02","MAP_toilet_b","MAP_Dkamna_bila","MAP_Dkamna_uhli","MAP_F_Dkamna_uhli","MAP_fridge","MAP_Kitchenstove_Elec","MAP_washing_machine","MAP_sign_airport_new","MAP_sign_badRoadside","MAP_sign_children_new","MAP_sign_cow_new","MAP_sign_crossRoad_new","MAP_sign_crossRoadMain_new","MAP_sign_danger","MAP_sign_deer_new","MAP_sign_downHill_new","MAP_sign_fallingStones_new","MAP_sign_flyAWayGrit","MAP_sign_left_new","MAP_sign_pass_new","MAP_sign_right_new","MAP_sign_roadworks_new","MAP_sign_serpentine_left_new","MAP_sign_serpentine_right_new","MAP_sign_train","MAP_sign_upHil_new","MAP_sign_snow_new","MAP_sign_snowChains","MAP_sign_snowChains_end","MAP_sign_heightLimit","MAP_sign_krizeni_s_trati","MAP_sign_main_new","MAP_sign_main_end_new","MAP_sign_noDriving_new","MAP_sign_noDrivingWronWay_new","MAP_sign_noOverTaking","MAP_sign_priority_new","MAP_sign_speed20","MAP_sign_speed50","MAP_sign_stop_new","MAP_sign_stopProhibited_new","MAP_sign_tractorProhibited","MAP_sign_wiatingProhibited_new","MAP_sign_widthLimit","MAP_rail_50km","MAP_rail_KoniecNastupista","MAP_rail_o25m_Priecestie","MAP_rail_Priecestie","MAP_Zastavka_cedule","MAP_Zastavka_stojan","MAP_sign_prejezd","MAP_sign_prejezd2","MAP_sign_prejezd3","MAP_sign_danger_mines","MAP_sign_danger1","Sign_1L_Firstaid","Sign_1L_Firstaid_EP1","MAP_sign_accomodation","MAP_sign_bus","MAP_sign_food","MAP_sign_fuel_new","MAP_sign_hospital_new","MAP_sign_parking_new","MAP_sign_pedCrossing","MAP_sign_port","MAP_sign_service_new","MAP_sign_blindWay_new","MAP_sign_blindWay_left_new","MAP_sign_blindWay_right_new","FlagCarrierChecked","FlagCarrierSmall","Land_arrows_desk_R","Land_arrows_desk_L","RoadCone","Land_coneLight","Land_RedWhiteBarrier","MAP_arrows_yellow_L","MAP_arrows_yellow_R","RoadBarrier_long","RoadBarrier_light","Sign_tape_redwhite","MAP_sign_leftDirection_new","MAP_sign_oneWay","MAP_sign_rightDirection_new","HeliH","HeliHCivil","HeliHRescue","MAP_Heli_H_army","MAP_Heli_H_cross","Sr_border","Sign_Checkpoint","Sign_Checkpoint_TK_EP1","Sign_Checkpoint_US_EP1","Sign_Danger","Sign_MP_blu_EP1","Sign_MP_ind_EP1","Sign_MP_op_EP1","MAP_Bilboard_alkohol","MAP_Bilboard_Beach","MAP_Bilboard_Bienvenudo","MAP_Bilboard_cibulka","MAP_Bilboard_cigara_chernomorky","MAP_Bilboard_Escape","MAP_Bilboard_Everon","MAP_Bilboard_hlinik","MAP_Bilboard_likery_bardak","MAP_Bilboard_Nogova","MAP_Bilboard_pizza_presto","MAP_Bilboard_Riviera","MAP_Bilboard_seci_stroje","MAP_Bilboard_smadny_maskrnik","MAP_Bilboard_strana_noveho_radu","MAP_Bilboard_toaletak_armasan","MAP_Bilboard_veterans_choice","MAP_Bilboard_volte_cernaruske_hnuti","MAP_Bilboard_vstup_do_CDF","MAP_Bilboard_zlute_zgrynda","Base_Fire_DZ","WoodenGate_1","WoodenGate_2","WoodenGate_3","WoodenGate_4","Land_Fire_DZ","TentStorage","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","StashSmall","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4","Wire_cat1","Sandbag1_DZ","Fence_DZ","Generator_DZ","Hedgehog_DZ","BearTrap_DZ","DomeTentStorage","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","CamoNet_DZ","Trap_Cans","TrapTripwireFlare","TrapBearTrapSmoke","TrapTripwireGrenade","TrapTripwireSmoke","TrapBearTrapFlare","TentStorageDomed","VaultStorageLocked","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodStairsRails_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","WoodCrate_DZ","Scaffolding_DZ","DesertTentStorage","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4"]; but as mighjt expect because iam writing here it is not working. i do not try to get this look good in code just to get it working the easyest way. i also tried the way that was shown here but i dont get it to work. please help :) This was a HUGE time saver - thank you! Link to comment Share on other sites More sharing options...
Bricktop Posted December 17, 2017 Report Share Posted December 17, 2017 I have this working perfect on my server and I added gems to the zombies but I can't seem to figure out where to increase the chance that zombies will have loot on them. I found this - \dayz.epoch.chernarus\dayz_code\configs\CfgLoot\Groups\Zombies Spoiler ZombieSuit[] = { {Loot_GROUP, 6, Consumable}, {Loot_GROUP, 1, AmmoCivilian}, {Loot_MAGAZINE, 3, ItemBandage}, {Loot_MAGAZINE, 2, ItemObsidian}, <<----- added gem here {Loot_MAGAZINE, 2, ItemAntibacterialWipe}, {Loot_MAGAZINE, 3, ItemDocument} }; ZombieSuitViral[] = { {Loot_GROUP, 10, ZombieSuit}, {Loot_MAGAZINE, 1, ItemAntibiotic1} }; I think these settings only control what loot zeds have on them and % of that loot BUT I trying to increase the chance that zed have loot not what loot they have. ========================= Any help would be appreciated, Link to comment Share on other sites More sharing options...
Airwaves Man Posted December 17, 2017 Report Share Posted December 17, 2017 Hey, you can increase the chance that loot spawns in the zombie_generate.sqf https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/zombie_generate.sqf#L93 Link to comment Share on other sites More sharing options...
Airwaves Man Posted December 17, 2017 Report Share Posted December 17, 2017 5 minutes ago, Bricktop said: I have this working perfect on my server and I added gems to the zombies but I can't seem to figure out where to increase the chance that zombies will have loot on them. I found this - \dayz.epoch.chernarus\dayz_code\configs\CfgLoot\Groups\Zombies Reveal hidden contents ZombieSuit[] = { {Loot_GROUP, 6, Consumable}, {Loot_GROUP, 1, AmmoCivilian}, {Loot_MAGAZINE, 3, ItemBandage}, {Loot_MAGAZINE, 2, ItemObsidian}, <<----- added gem here {Loot_MAGAZINE, 2, ItemAntibacterialWipe}, {Loot_MAGAZINE, 3, ItemDocument} }; ZombieSuitViral[] = { {Loot_GROUP, 10, ZombieSuit}, {Loot_MAGAZINE, 1, ItemAntibiotic1} }; I think these settings only control what loot zeds have on them and % of that loot BUT I trying to increase the chance that zed have loot not what loot they have. ========================= Any help would be appreciated, Hey, you can increase the chance that loot spawns in the zombie_generate.sqf https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/zombie_generate.sqf#L93 Bricktop 1 Link to comment Share on other sites More sharing options...
Bricktop Posted December 17, 2017 Report Share Posted December 17, 2017 40 minutes ago, A Man said: Hey, you can increase the chance that loot spawns in the zombie_generate.sqf https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/zombie_generate.sqf#L93 Perfect! thanks man Link to comment Share on other sites More sharing options...
Bricktop Posted December 17, 2017 Report Share Posted December 17, 2017 4 hours ago, A Man said: Hey, you can increase the chance that loot spawns in the zombie_generate.sqf https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/zombie_generate.sqf#L93 Thanks for the info - So here's what I did but I don't see any difference. Maybe I did something wrong? ================================ 1- Extract zombie_generate.sqf from dayz_code.pbo 2 - changed this - if (0.3 > random 1) then { to this - if (0.9 > random 1) then { 3 - placed custom zombie_generate.sqf @ dayz_code\compile\zombie_generate.sqf 4 - added this to custom compiles if (isServer) then { diag_log "Loading custom server compiles"; }; if (!isDedicated) then { diag_log "Loading custom client compiles"; player_debug = compile preprocessFileLineNumbers "scripts\debug\player_debug.sqf"; fnc_usec_selfactions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf"; DZ_KeyDown_EH = compile preprocessFileLineNumbers "scripts\keyboard.sqf"; dze_buildChecks = compile preprocessFileLineNumbers "scripts\dze_buildChecks.sqf"; zombie_generate = compile preprocessFileLineNumbers "dayz_code\compile\zombie_generate.sqf"; }; ================================ Thanks for any help, Link to comment Share on other sites More sharing options...
theduke Posted December 17, 2017 Author Report Share Posted December 17, 2017 5 hours ago, Bricktop said: I have this working perfect on my server and I added gems to the zombies but I can't seem to figure out where to increase the chance that zombies will have loot on them. I found this - \dayz.epoch.chernarus\dayz_code\configs\CfgLoot\Groups\Zombies Hide contents ZombieSuit[] = { {Loot_GROUP, 6, Consumable}, {Loot_GROUP, 1, AmmoCivilian}, {Loot_MAGAZINE, 3, ItemBandage}, {Loot_MAGAZINE, 2, ItemObsidian}, <<----- added gem here {Loot_MAGAZINE, 2, ItemAntibacterialWipe}, {Loot_MAGAZINE, 3, ItemDocument} }; ZombieSuitViral[] = { {Loot_GROUP, 10, ZombieSuit}, {Loot_MAGAZINE, 1, ItemAntibiotic1} }; I think these settings only control what loot zeds have on them and % of that loot BUT I trying to increase the chance that zed have loot not what loot they have. ========================= Any help would be appreciated, increasing the chance is done by the zombie_generate.sqf like A man mentioned, but you need to make sure that the loot file you change (the one in this quote), is also in your mission file. You might need to change some paths. Bricktop 1 Link to comment Share on other sites More sharing options...
Bricktop Posted December 20, 2017 Report Share Posted December 20, 2017 On 12/17/2017 at 4:25 PM, theduke said: increasing the chance is done by the zombie_generate.sqf like A man mentioned, but you need to make sure that the loot file you change (the one in this quote), is also in your mission file. You might need to change some paths. Thanks for the info man. I'm finally on the right path - much appreciated theduke 1 Link to comment Share on other sites More sharing options...
Schalldampfer Posted December 30, 2017 Report Share Posted December 30, 2017 I think this script also do not work in 1.0.6.2, and I need update. Quote PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname]; would be replaced by Quote if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true]; PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],[],player,dayz_authKey]; } else { PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[],player,dayz_authKey]; }; theduke 1 Link to comment Share on other sites More sharing options...
theduke Posted December 31, 2017 Author Report Share Posted December 31, 2017 Thanks @Schalldampfer Git has been updated. https://github.com/theduke77/Advanced-Gem-crafting/commit/4748720f9ff4b5b27f405c52efe12cf3c786cda5 Link to comment Share on other sites More sharing options...
unconditional Posted January 2, 2018 Report Share Posted January 2, 2018 On 31/12/2017 at 5:47 PM, theduke said: Thanks @Schalldampfer Git has been updated. https://github.com/theduke77/Advanced-Gem-crafting/commit/4748720f9ff4b5b27f405c52efe12cf3c786cda5 Hi everybody, i'm not a coder...but if i don't mistake...it need to add publicVariableServer "PVDZ_obj_Publish"; so ultimately it should be: if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true]; PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],[],player,dayz_authKey]; } else { PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[],player,dayz_authKey]; }; publicVariableServer "PVDZ_obj_Publish"; I tested on my server...without publicVariableServer "PVDZ_obj_Publish"; the buildings disappear at server restart. With it...the buildings remain. I hope this is correct... Link to comment Share on other sites More sharing options...
salival Posted January 2, 2018 Report Share Posted January 2, 2018 32 minutes ago, unconditional said: Hi everybody, i'm not a coder...but if i don't mistake...it need to add publicVariableServer "PVDZ_obj_Publish"; so ultimately it should be: if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",dayz_playerUID,true]; PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,dayz_playerUID],[],player,dayz_authKey]; } else { PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[],player,dayz_authKey]; }; publicVariableServer "PVDZ_obj_Publish"; I tested on my server...without publicVariableServer "PVDZ_obj_Publish"; the buildings disappear at server restart. With it...the buildings remain. I hope this is correct... You are correct, I think it was more of a mistake than anything from @theduke I've submitted a pull request to fix this. Link to comment Share on other sites More sharing options...
theduke Posted January 2, 2018 Author Report Share Posted January 2, 2018 Thx @unconditional & @salival My noob careless mistake lol Fixed. https://github.com/theduke77/Advanced-Gem-crafting/commit/55726952443b6f55fcb77d8ab136837154f422f5 Link to comment Share on other sites More sharing options...
unconditional Posted January 3, 2018 Report Share Posted January 3, 2018 3 hours ago, theduke said: Thx @unconditional & @salival My noob careless mistake lol Fixed. https://github.com/theduke77/Advanced-Gem-crafting/commit/55726952443b6f55fcb77d8ab136837154f422f5 Glad to have been helpful... Link to comment Share on other sites More sharing options...
CrDraggin Posted January 19, 2018 Report Share Posted January 19, 2018 Is anyone seeing issues with the offsets in the MI_Defines.hpp not working? I have been using this script for years and made a good amount of offset changes over the years. I made this one... class MAP_nav_pier_c_big:DefaultDocks {offset[]={0,20,-20};}; but it still drops that object and the builder is in the dead center of it. This only started happening after the 1.0.6.1 version. I reviewed RPTs and nothing error related is showing up. Link to comment Share on other sites More sharing options...
Cenda1986 Posted February 14, 2018 Report Share Posted February 14, 2018 Hello in the club. Does it work on 1.0.6.2 ?? I can not find the script \ click_actions \ config.sqf :( solved ... inserted into player_craftItem.sqf and now only works to resolve rotation and height before standing does not want me to work. Quote // If a string was passed redirect to vanilla player_craftItem (Epoch items always pass an array) if (typeName _this == "STRING") exitWith {_this spawn player_craftItemVanilla;}; /* DayZ Epoch Crafting 0.3 Made for DayZ Epoch && Unleashed by [VB]AWOL please ask permission to use/edit/distrubute email [email protected]. Thanks to thevisad for help with the spawn call fixes. USAGE EXAMPLE: class ItemActions { class Crafting { text = "Craft Tent"; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; // [Class of itemaction,CfgMagazines || CfgWeapons, item] neednearby[] = {"workshop","fire"}; requiretools[] = {"ItemToolbox","ItemKnife"}; // (cfgweapons only) output[] = {{"ItemTent",1}}; // (CfgMagazines, qty) input[] = {{"ItemCanvas",2},{"ItemPole",2}}; // (CfgMagazines, qty) inputstrict = true; // (CfgMagazines input without inheritsFrom) Optional inputweapons[] = {"ItemToolbox"}; // consume toolbox (cfgweapons only) outputweapons[] = {"ItemToolbox"}; // return toolbox (cfgweapons only) }; }; */ private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_boiled","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_finished","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx"]; if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; dayz_actionInProgress = true; // This is used to find correct recipe based what itemaction was click allows multiple recipes per item. _crafting = _this select 0; // This tells the script what type of item we are clicking on _baseClass = _this select 1; _item = _this select 2; _abort = false; _distance = 3; _reason = ""; _waterLevel = 0; _outputWeapons = []; _selectedRecipeOutput = []; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; _canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder); _boiled = false; DZE_CLICK_ACTIONS = [ ["ItemAmethyst","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Amethyst.sqf';","true"], ["ItemCitrine","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Citrine.sqf';","true"], ["ItemEmerald","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Emerald.sqf';","true"], ["ItemObsidian","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Obsidian.sqf';","true"], ["ItemRuby","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Ruby.sqf';","true"], ["ItemSapphire","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Sapphire.sqf';","true"], ["ItemTopaz","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Topaz.sqf';","true"], ["ItemLightbulb","Start Crafting!","closeDialog 0;createDialog 'Advanced_Crafting';execVM 'Custom\Buildables\Lights.sqf';","true"] ]; // Need Near Requirements _needNear = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "neednearby"); if ("fire" in _needNear) then { _pPos = [player] call FNC_GetPos; _isNear = {inflamed _x} count (_pPos nearObjects _distance); if(_isNear == 0) then { _abort = true; _reason = "fire"; }; }; if ("workshop" in _needNear) then { _isNear = count (nearestObjects [player, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]); if(_isNear == 0) then { _abort = true; _reason = "workshop"; }; }; if (_abort) exitWith { format[localize "str_epoch_player_149",_reason,_distance] call dayz_rollingMessages; dayz_actionInProgress = false; }; // diag_log format["Checking for fire: %1", _isFireNear]; if (_canDo) then { _selectedRecipeTools = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "requiretools"); _selectedRecipeOutput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "output"); _selectedRecipeInput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "input"); _selectedRecipeInputStrict = ((isNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict")) && (getNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict") > 0)); _outputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "outputweapons"); _inputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputweapons"); _sfx = getText(configFile >> _baseClass >> _item >> "sfx"); if (_sfx == "") then { _sfx = "repair"; }; _randomOutput = 0; if (isNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "randomOutput")) then { _randomOutput = getNumber(configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "randomOutput"); }; _craft_doLoop = true; _tradeComplete = 0; while {_craft_doLoop} do { _temp_removed_array = []; if ([_item,_selectedRecipeTools,"none"] call dze_requiredItemsCheck) then { // Dry run to see if all parts are available. _proceed = true; if (count _selectedRecipeInput > 0) then { { _itemIn = _x select 0; _countIn = _x select 1; _qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player; if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; } forEach _selectedRecipeInput; }; // If all parts proceed if (_proceed) then { localize "str_epoch_player_62" call dayz_rollingMessages; [player,_sfx,0,false] call dayz_zombieSpeak; [player,50,true,(getPosATL player)] spawn player_alertZombies; _finished = ["Medic",1] call fn_loopAction; if (_finished) then { _removed_total = 0; // count total of removed items _tobe_removed_total = 0; // count total of all to be removed items _waterLevel_lowest = 0; // find the lowest _waterLevel // 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; // Preselect the item { _configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)); if ((_x == _itemIn) || (!_selectedRecipeInputStrict && _configParent == _itemIn)) then { // Get lowest waterlevel if ((_x == "ItemWaterbottle") ||( _configParent == "ItemWaterbottle")) then { _waterLevel = getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz"); if (_waterLevel_lowest == 0 || _waterLevel < _waterLevel_lowest) then { _waterLevel_lowest = _waterLevel; }; }; }; } forEach (magazines player); { _configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)); if ((_removed < _countIn) && ((_x == _itemIn) || (!_selectedRecipeInputStrict && _configParent == _itemIn))) then { if ((_waterLevel_lowest == 0) || ((_waterLevel_lowest > 0) && (getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz") == _waterLevel_lowest))) then { _num_removed = ([player,_x] call BIS_fnc_invRemove); } else { _num_removed = 0; }; _removed = _removed + _num_removed; _removed_total = _removed_total + _num_removed; if (_num_removed >= 1) then { //diag_log format["debug remove: %1 of: %2", _configParent, _x]; if (_x == "ItemWaterbottle" || _configParent == "ItemWaterbottle") then { _waterLevel = floor((getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz")) - 1); if (_x in ["ItemWaterbottle9ozBoiled","ItemWaterbottle8ozBoiled","ItemWaterbottle7ozBoiled","ItemWaterbottle6ozBoiled","ItemWaterbottle5ozBoiled","ItemWaterbottle4ozBoiled","ItemWaterbottle3ozBoiled","ItemWaterbottle2ozBoiled","ItemWaterBottleBoiled"]) then { _boiled = true; }; }; _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 { _num_removed_weapons = 0; { _num_removed_weapons = _num_removed_weapons + ([player,_x] call BIS_fnc_invRemove); } forEach _inputWeapons; if (_num_removed_weapons == (count _inputWeapons)) then { if (_randomOutput == 1) then { if (!isNil "_outputWeapons" && count _outputWeapons > 0) then { _selectedWeapon = _outputWeapons call BIS_fnc_selectRandom; _outputWeapons = [_selectedWeapon]; }; if (!isNil "_selectedRecipeOutput" && count _selectedRecipeOutput > 0) then { _selectedMag = _selectedRecipeOutput call BIS_fnc_selectRandom; _selectedRecipeOutput = [_selectedMag]; }; // exit loop _craft_doLoop = false; }; { if (_x == "ItemSledge") then { _x call player_addDuplicateTool; } else { player addWeapon _x; }; } forEach _outputWeapons; { _itemOut = _x select 0; _countOut = _x select 1; if (_itemOut == "ItemWaterbottleUnfilled") then { if (_waterLevel > 0) then { if (_boiled) then { _itemOut = format["ItemWaterbottle%1ozBoiled",_waterLevel]; } else { _itemOut = format["ItemWaterbottle%1oz",_waterLevel]; }; }; }; // diag_log format["Checking for water level: %1", _waterLevel]; for "_x" from 1 to _countOut do { player addMagazine _itemOut; }; _textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName"); // Add crafted item format[localize "str_epoch_player_150",_textCreate,_countOut] call dayz_rollingMessages; // sleep here uiSleep 1; } forEach _selectedRecipeOutput; _tradeComplete = _tradeComplete+1; }; } else { // Refund parts since we failed {player addMagazine _x; } forEach _temp_removed_array; format[localize "STR_EPOCH_PLAYER_145",_removed_total,_tobe_removed_total] call dayz_rollingMessages; }; } else { localize "str_epoch_player_64" call dayz_rollingMessages; _craft_doLoop = false; }; } else { _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); format[localize "str_epoch_player_152",_missingQty, _textMissing,_tradeComplete] call dayz_rollingMessages; _craft_doLoop = false; }; } else { //Missing text shown in dze_requiredItemsCheck _craft_doLoop = false; }; }; } else { localize "str_epoch_player_64" call dayz_rollingMessages; }; dayz_actionInProgress = false; Link to comment Share on other sites More sharing options...
Tanita-Corp Posted February 15, 2018 Report Share Posted February 15, 2018 dismantle script: Spoiler private["_objName","_found","_object","_roadType","_reqTools","_getMats","_objectID","_objectUID","_isOk","_proceed","_limit","_counter","_roadTar"]; if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; dayz_actionInProgress = true; _player = player; _pos = getPos _player; _types = publicTransportation; _found = []; _object = []; _onRoad = isOnRoad _pos; _search = nearestObjects [_pos, [], 5]; _subTypes = ["RoadsAsphalt1","RoadsAsphalt2","RoadsAsphalt3","RoadsGravel","RoadsIntersect","RoadsMud","RoadsPaved","RoadsRunways"]; { _road = _x; if ((typeOf _road) in publicTransportation) then { _objName = _road call fn_getModelName; _found = _found + [_objName]; _object = _object + [_road]; }; } forEach _search; if !(count _found >= 1) exitWith { cutText ["You are not near any roads...","PLAIN DOWN"];dayz_actionInProgress = false;}; if (count _found >= 1) then { { _branch = _x; _roadTar = _object select 0; _roadType = typeOf _roadTar; if (isClass(missionConfigFile >> "Custom_Buildables" >> "Buildables" >> _branch >> _roadType)) exitWith { _reqTools = getArray(missionConfigFile >> "Custom_Buildables" >> "Buildables" >> _branch >> _roadType >> "requiredtools"); _getMats = getArray(missionConfigFile >> "Custom_Buildables" >> "Buildables" >> _branch >> _roadType >> "requiredmaterials"); _objectID = _roadTar getVariable ["ObjectID","0"]; _objectUID = _roadTar getVariable ["ObjectUID","0"]; }; } forEach _subTypes; }; _hasAccess = [player, _roadTar] call FNC_check_access; _allowed = ((_hasAccess select 0) || (_hasAccess select 2) || (_hasAccess select 3) || (_hasAccess select 4)); if !(_allowed || (_hasAccess select 1)) exitWith { cutText ["You have no rights to this road...","PLAIN DOWN"];dayz_actionInProgress = false;}; _hasTools = _reqTools call player_hasTools; if (!_hasTools) exitWith { cutText [format["You require all of these %1, to dismantle...",_reqTools], "PLAIN DOWN"];dayz_actionInProgress = false;}; _isOk = true; _proceed = false; _limit = 3; _counter = 0; while {_isOk} do { ["Working",0,[20,48,15,0]] call dayz_NutritionSystem; player playActionNow "Medic"; cutText [format["Dismantling of road in progress, stage %1 of %2",(_counter + 1),_limit], "PLAIN DOWN"]; _dis=20; _sfx = "repair"; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; r_interrupt = false; r_doLoop = true; _started = false; _finished = false; DZE_cancelBuilding = false; while {r_doLoop} do { _animState = animationState player; _isMedic = ["medic",_animState] call fnc_inString; if (_isMedic) then { _started = true; }; if (_started && !_isMedic) then { r_doLoop = false; _finished = true; }; if (r_interrupt || (player getVariable["inCombat",false])) exitWith { r_doLoop = false; }; if (DZE_cancelBuilding) exitWith { r_doLoop = false; }; sleep 0.1; }; r_doLoop = false; if(!_finished) exitWith { _isOk = false; _proceed = false; }; if(_finished) then { _counter = _counter + 1; }; if(_counter == _limit) exitWith { _isOk = false; _proceed = true; }; }; if (_proceed) then { _countMats = count _getMats; _dir = getDir _player; _pos = getPos _player; _pos = [(_pos select 0)+2*sin(_dir),(_pos select 1)+2*cos(_dir),0]; _holder = createVehicle ['Weaponholder',_pos,[],0,'NONE']; if (_countMats >= 2) then { for "_i" from 0 to ((_countMats)- 1) do { _chance = round((random 100) + (random 10)); _against = round((random 50) + (random 10)); if (_chance > _against) then { _holder addMagazineCargoGlobal [(_getMats select _i),1]; }; }; }; PVDZ_obj_Destroy = [_objectID,_objectUID,player,_object,dayz_authKey]; publicVariableServer "PVDZ_obj_Destroy"; if (isServer) then { PVDZ_obj_Destroy call server_deleteObjDirect; }; deleteVehicle _roadTar; _holder setPosATL _pos; _roadTar reveal [_holder]; DZE_GearCheckBypass = true; player action ["Gear", _holder]; }; dayz_actionInProgress = false; After the restart is restored any idea? Link to comment Share on other sites More sharing options...
khalcifer Posted February 17, 2018 Report Share Posted February 17, 2018 why after restart M2 is locked? Link to comment Share on other sites More sharing options...
gelo534 Posted February 20, 2018 Report Share Posted February 20, 2018 On 5.7.2017 at 9:14 AM, Ghostis said: I removed the craft for each of the gems and added it to the category in a nice menu from Zupa zCraft. Call the menu right click on itemtoolbox 1. download files here 2. copy my description.hpp and zCraft.hpp in scripts folder 3. in description.hpp very bottom add: #include "scripts\description.hpp" #include "scripts\zCraft.hpp" 4. in deploy Deploy Anything in right click option add: ["ItemToolbox","Меню крафта","closeDialog 0;createDialog ""ZCraft"";","true"] hi, link not available for download Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now