#15 Upgrade to Epoch 1.7.0.1 #16
@ -1,6 +1,6 @@
|
||||
// Add UIDs and names of Admins and Mods Here. If an admin or mod wants to play with no admin tools, change name in profile.
|
||||
#define SUPER_ADMIN_LIST ["76561198180152023","76500000000000000","76500000000000000"]
|
||||
#define SUPER_ADMIN_NAMES ["Stuzer","SuperAdminName","SuperAdminName"]
|
||||
#define SUPER_ADMIN_NAMES ["stuzer05","SuperAdminName","SuperAdminName"]
|
||||
#define ADMIN_LIST ["76500000000000000","76500000000000000","76500000000000000"]
|
||||
#define ADMIN_NAMES ["AdminName","AdminName","AdminName"]
|
||||
#define MOD_LIST ["76500000000000000","76500000000000000","76500000000000000"]
|
||||
|
@ -20,7 +20,7 @@ DZAI_monitorRate = 300;
|
||||
|
||||
//Enable or disable verification and error-correction of classname tables used by DZAI. If invalid entries are found, they are removed and logged into the RPT log.
|
||||
//If disabled, any invalid classnames will not be removed and clients may crash if AI bodies with invalid items are looted. Only disable if a previous scan shows no invalid classnames (Default: true).
|
||||
DZAI_verifyTables = true;
|
||||
DZAI_verifyTables = false;
|
||||
|
||||
//(Feature in development) Enables additional checking and error-correction of certain classname tables. (Default: false)
|
||||
DZAI_extendedVerify = false;
|
||||
@ -254,7 +254,7 @@ DZAI_banAIWeapons = [];
|
||||
//List of launcher-type weapons for mid/high-level AI to use (by default, weapongrade 1/2/3), example: ["M136"]. If left empty, AI will not use launcher weapons. (Default: [])
|
||||
//If AI encounter an armored player vehicle, they will switch to a randomly-selected launcher-type weapon to engage.
|
||||
//Weapon classnames added here are verified if DZAI_verifyTables is set to true. Note: Launcher weapons are removed from the AI unit upon death.
|
||||
DZAI_launcherTypes = [M_Igla_AA, M_AT13_AT, M_Strela_AA, Javelin, BAF_NLAW_Launcher, M47Launcher_EP1, MetisLauncher, SMAW];
|
||||
DZAI_launcherTypes = ["M_Igla_AA", "M_AT13_AT", "M_Strela_AA", "Javelin", "BAF_NLAW_Launcher", "M47Launcher_EP1", "MetisLauncher", "SMAW"];
|
||||
|
||||
//List of AI weapongrades that are permitted to use launcher-type weapons. Individual custom weapongrade levels may be added to allow launcher use (Default: [1,2,3])
|
||||
DZAI_launcherLevels = [1,2,3];
|
||||
|
@ -32,7 +32,7 @@ DZMSObjectsDamageOff = false;
|
||||
DZMSAnnounceType = "TitleText";
|
||||
|
||||
// Turn this on to enable troubleshooting. RPT entries might show where problems occur.
|
||||
DZMSDebug = false;
|
||||
DZMSDebug = true;
|
||||
|
||||
// Do you want your players to gain or lose humanity from killing mission AI?
|
||||
DZMSMissHumanity = true;
|
||||
@ -62,7 +62,7 @@ DZMSRunGear = false;
|
||||
|
||||
// How long before bodies disappear? (in minutes) (default = 30)
|
||||
// Also used by WAI. Make sure they are the same if both are installed.
|
||||
DZE_NPC_CleanUp_Time = 30;
|
||||
DZE_NPC_CleanUp_Time = 40;
|
||||
|
||||
// Percentage of AI that must be dead before mission completes (default = 0)
|
||||
//( 0 is 0% of AI / 0.50 is 50% / 1 is 100% )
|
||||
@ -142,9 +142,9 @@ DZMSMissionArray = [
|
||||
"Medical_Outpost", // Medical Supplies, Weapons
|
||||
"Weapons_Cache", // Weapons
|
||||
"Stash_house", // Weapons
|
||||
"Weapons_Truck" // Weapons
|
||||
//"SMA1","SMA2","SMA3","SMA4","SMA5","SMA6",
|
||||
//"SMI1","SMI2","SMI3","SMI4","SM5I","SMI6"
|
||||
"Weapons_Truck", // Weapons
|
||||
"SMA1","SMA2","SMA3","SMA4","SMA5","SMA6",
|
||||
"SMI1","SMI2","SMI3","SMI4","SM5I","SMI6"
|
||||
];
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
wai_debug_mode = false; // enable debug
|
||||
wai_user_spawnpoints = false; // setting this to true will disable the dynamic mission spawning system and enable server owners to define their own mission spawn points in WAI\configs\spawnpoints.sqf.
|
||||
wai_use_blacklist = true; // You can edit the blacklist per map in file WAI\configs\blacklist.sqf.
|
||||
wai_use_blacklist = false; // You can edit the blacklist per map in file WAI\configs\blacklist.sqf.
|
||||
|
||||
/* END GENERAL CONFIG */
|
||||
|
||||
|
@ -19,36 +19,3 @@ VG_RandomizeMyKey = {
|
||||
};
|
||||
vg_serverKey = toString (8 call VG_RandomizeMyKey);
|
||||
vg_alreadySpawned = [];
|
||||
|
||||
VG_ClearTurrets = {
|
||||
//By denvdmj (probably, I found it on the biki)
|
||||
private ["_weaponArray","_findRecurse","_class","_obj","_turret","_mags"];
|
||||
_obj = _this;
|
||||
|
||||
_weaponArray = [];
|
||||
_weaponArray set [count _weaponArray,[-1]];
|
||||
|
||||
_findRecurse = {
|
||||
private ["_root", "_class", "_path", "_currentPath", "_thisThis"];
|
||||
_root = (_this select 0);
|
||||
_path = +(_this select 1);
|
||||
_thisThis = _this select 2;
|
||||
for "_i" from 0 to count _root -1 do {
|
||||
_class = _root select _i;
|
||||
if (isClass _class) then {
|
||||
_currentPath = _path + [_i];
|
||||
{_weaponArray set [count _weaponArray, _currentPath];} count getArray (_class >> "weapons");
|
||||
_class = _class >> "turrets";
|
||||
if (isClass _class) then {[_class, _currentPath, _thisThis] call _findRecurse;};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
[configFile >> "CfgVehicles" >> typeOf (_obj) >> "turrets", [], _this] call _findRecurse;
|
||||
|
||||
{
|
||||
_turret = _x;
|
||||
_mags = _obj magazinesTurret _turret;
|
||||
{_obj removeMagazinesTurret[_x,_turret];} count _mags;
|
||||
} forEach _weaponArray;
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
private ["_isAir","_VG_ObjID","_characterID","_class","_clientID","_clrinit","_clrinit2","_colour","_colour2","_dam","_damage","_dir","_fuel","_hitpoints","_id","_inventory","_key","_location","_message","_object","_oid","_outcome","_player","_result","_selection","_serverKey","_uid","_worldSpace"];
|
||||
private ["_VG_ObjID","_characterID","_class","_clientID","_clrinit","_clrinit2","_colour","_colour2","_dam","_damage","_dir","_fuel","_hitpoints","_id","_inventory","_key","_location","_message","_object","_oid","_outcome","_player","_result","_selection","_serverKey","_uid","_worldSpace"];
|
||||
|
||||
_worldSpace = _this select 0;
|
||||
_player = _this select 1;
|
||||
@ -53,18 +53,17 @@ if (_outcome != "PASS") then {
|
||||
_object setPos _location;
|
||||
};
|
||||
|
||||
_object addEventHandler ["HandleDamage",{false}];
|
||||
_object addEventHandler ["HandleDamage",{0}];
|
||||
|
||||
clearWeaponCargoGlobal _object;
|
||||
clearMagazineCargoGlobal _object;
|
||||
if (vg_clearAmmo && {vg_serverKey == _serverKey}) then {_object call VG_ClearTurrets;};
|
||||
|
||||
_object setFuel _fuel;
|
||||
_object setDamage _damage;
|
||||
|
||||
[_inventory select 0,_inventory select 1,_inventory select 2,_object] call fn_addCargo;
|
||||
|
||||
_object setVariable ["ObjectID", _oid, true];
|
||||
_object setVariable ["ObjectID", _oid];
|
||||
_object setVariable ["lastUpdate",diag_tickTime];
|
||||
_object setVariable ["VGObjectID",_VG_ObjID, false];
|
||||
|
||||
@ -83,22 +82,19 @@ if (_outcome != "PASS") then {
|
||||
processInitCommands;
|
||||
|
||||
_characterID = str(_characterID);
|
||||
_object setVariable ["CharacterID", _characterID, true];
|
||||
_object setVariable ["CharacterID", _characterID, [true,false] select (_characterID == "0")];
|
||||
|
||||
if (_characterID != "0" && !(_object isKindOf "Bicycle")) then {_object setVehicleLock "LOCKED";};
|
||||
_isAir = _object isKindOf "Air";
|
||||
|
||||
{
|
||||
_selection = _x select 0;
|
||||
_dam = _x select 1;
|
||||
_dam = [_x select 1,(_x select 1) min 0.8] select (!_isAir && {_selection in dayZ_explosiveParts});
|
||||
[_object,_selection,_dam] call fnc_veh_setFixServer;
|
||||
} forEach _hitpoints;
|
||||
[_object,_hitpoints] call server_setHitpoints;
|
||||
|
||||
[_object,"all",true] call server_updateObject;
|
||||
|
||||
[_object,vg_clearAmmo,false] call fn_vehicleAddons;
|
||||
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
|
||||
_object call fnc_veh_ResetEH;
|
||||
{if (_object isKindOf _x) exitWith {_object disableTIEquipment true;}} count vg_disableThermal;
|
||||
|
||||
PVDZE_veh_Init = _object;
|
||||
publicVariable "PVDZE_veh_Init";
|
||||
|
@ -1,4 +1,4 @@
|
||||
private ["_damageVeh","_VGobjID","_array","_backPack","_backPackCount","_charID","_class","_clientID","_colour","_colour2","_damage","_displayName","_fnc_sanitizeInput","_fuel","_gearCount","_hit","_hitpoints","_index","_inventory","_inventoryCount","_key","_magazine","_magazineCount","_message","_name","_objectID","_objectUID","_player","_playerUID","_selection","_vehicle","_weapons","_weaponsCount","_woGear"];
|
||||
private ["_damageVeh","_VGobjID","_array","_backPack","_backPackCount","_charID","_class","_clientID","_colour","_colour2","_damage","_displayName","_fuel","_hit","_hitpoints","_index","_inventory","_inventoryCount","_key","_magazine","_magazineCount","_message","_name","_objectID","_objectUID","_player","_playerUID","_selection","_vehicle","_weapons","_weaponsCount","_woGear"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
_player = _this select 1;
|
||||
@ -6,31 +6,9 @@ _woGear = _this select 2;
|
||||
_clientID = owner _player;
|
||||
_playerUID = if (count _this > 3) then {_this select 3} else {getPlayerUID _player};
|
||||
|
||||
_gearCount = {
|
||||
private ["_counter"];
|
||||
_counter = 0;
|
||||
{_counter = _counter + _x;} count _this;
|
||||
_counter;
|
||||
};
|
||||
|
||||
_fnc_sanitizeInput = {
|
||||
private ["_input","_badChars"];
|
||||
|
||||
_input = _this;
|
||||
_input = toArray (_input);
|
||||
_badChars = [60,62,38,123,125,91,93,59,58,39,96,126,44,46,47,63,124,92,34];
|
||||
|
||||
{
|
||||
_input = _input - [_x];
|
||||
} forEach _badChars;
|
||||
|
||||
_input = toString (_input);
|
||||
_input
|
||||
};
|
||||
|
||||
_class = typeOf _vehicle;
|
||||
_displayName = (getText(configFile >> "cfgVehicles" >> _class >> "displayName")) call _fnc_sanitizeInput;
|
||||
_name = if (alive _player) then {(name _player) call _fnc_sanitizeInput;} else {"unknown player";};
|
||||
_displayName = [(getText(configFile >> "cfgVehicles" >> _class >> "displayName")),1] call fnc_sanitizeInput;
|
||||
_name = if (alive _player) then {[(name _player),1] call fnc_sanitizeInput;} else {"unknown player";};
|
||||
|
||||
_charID = _vehicle getVariable ["CharacterID","0"];
|
||||
_objectID = _vehicle getVariable ["ObjectID","0"];
|
||||
@ -71,9 +49,9 @@ if (!_woGear) then {
|
||||
_weapons = getWeaponCargo _vehicle;
|
||||
_magazine = getMagazineCargo _vehicle;
|
||||
_backPack = getBackpackCargo _vehicle;
|
||||
_weaponsCount = (_weapons select 1) call _gearCount;
|
||||
_magazineCount = (_magazine select 1) call _gearCount;
|
||||
_backPackCount = (_backPack select 1) call _gearCount;
|
||||
_weaponsCount = (_weapons select 1) call fnc_gearCount;
|
||||
_magazineCount = (_magazine select 1) call fnc_gearCount;
|
||||
_backPackCount = (_backPack select 1) call fnc_gearCount;
|
||||
_inventory = [_weapons, _magazine, _backPack];
|
||||
_inventoryCount = [_weaponsCount, _magazineCount, _backPackCount];
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
changeCode - Safe, Lockbox and Door code changing script by salival (https://github.com/oiad)
|
||||
*/
|
||||
|
||||
private ["_backpacks","_charID","_characterID","_clientID","_coins","_dir","_holder","_inventory","_key","_lockedClass","_magazines","_message","_name","_object","_objectID","_objectUID","_ownerID","_ownerPUID","_player","_playerUID","_pos","_typeOf","_vector","_weapons","_worldSpace","_clientKey","_exitReason"];
|
||||
private ["_isZSC","_backpacks","_charID","_characterID","_clientID","_coins","_dir","_holder","_inventory","_key","_lockedClass","_magazines","_message","_name","_object","_objectID","_objectUID","_ownerID","_ownerPUID","_player","_playerUID","_pos","_typeOf","_vector","_weapons","_worldSpace","_clientKey","_exitReason"];
|
||||
|
||||
if (count _this < 4) exitWith {diag_log "server_changeCode error: Improper parameter format";};
|
||||
|
||||
@ -15,7 +15,7 @@ _typeOf = typeOf _object;
|
||||
if !(_typeOf in DZE_unlockedStorage) exitWith {diag_log "server_changeCode called with invalid storage object!"};
|
||||
|
||||
_lockedClass = getText (configFile >> "CfgVehicles" >> _typeOf >> "lockedClass");
|
||||
_pos = _object getVariable ["OEMPos",getPosATL _object];
|
||||
_pos = getPosATL _object;
|
||||
_dir = getDir _object;
|
||||
_vector = [vectorDir _object, vectorUp _object];
|
||||
_charID = _object getVariable ["CharacterID","0"];
|
||||
@ -35,30 +35,30 @@ if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
_weapons = getWeaponCargo _object;
|
||||
_magazines = getMagazineCargo _object;
|
||||
_backpacks = getBackpackCargo _object;
|
||||
if (Z_singleCurrency) then {_coins = _object getVariable ["cashMoney",0];};
|
||||
_isZSC = false;
|
||||
if (Z_singleCurrency) then {
|
||||
_isZSC = _typeOf in DZE_MoneyStorageClasses && _lockedClass in DZE_MoneyStorageClasses;
|
||||
};
|
||||
if (_isZSC) then {_coins = _object getVariable ["cashMoney",0];};
|
||||
|
||||
[_objectID,_objectUID,_object] call server_deleteObjDirect;
|
||||
|
||||
_holder = _lockedClass createVehicle [0,0,0];
|
||||
_holder setDir _dir;
|
||||
//_holder setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp
|
||||
_holder setVariable ["memDir",_dir,true];
|
||||
_holder setVectorDirAndUp _vector;
|
||||
_holder setPosATL _pos;
|
||||
_holder setVariable ["CharacterID",_characterID,true];
|
||||
_holder setVariable ["OEMPos",_pos,true];
|
||||
|
||||
if (DZE_permanentPlot) then {
|
||||
_ownerPUID = if (_charID == "0000" || _charID == "10000") then {_playerUID} else {_ownerID};
|
||||
_worldSpace = [_dir,_pos,_ownerPUID,_vector];
|
||||
_holder setVariable ["ownerPUID",_ownerPUID,true];
|
||||
} else {
|
||||
_worldSpace = [_dir,_pos];
|
||||
};
|
||||
_ownerPUID = if (_charID == "0000" || _charID == "10000") then {_playerUID} else {_ownerID};
|
||||
_worldSpace = [_dir,_pos,_ownerPUID,_vector];
|
||||
_holder setVariable ["ownerPUID",_ownerPUID,true];
|
||||
|
||||
if (Z_singleCurrency) then {_holder setVariable ["cashMoney",_coins,true];};
|
||||
|
||||
if (_isZSC) then {_holder setVariable ["cashMoney",_coins,true];};
|
||||
|
||||
_objectUID = _worldSpace call dayz_objectUID2;
|
||||
_holder setVariable ["ObjectUID",_objectUID,true];
|
||||
_holder setVariable ["ObjectUID",_objectUID];
|
||||
|
||||
deleteVehicle _object;
|
||||
|
||||
@ -69,7 +69,7 @@ _holder setVariable ["BackpackCargo",_backpacks,false];
|
||||
|
||||
[_characterID,_holder,_worldSpace,_inventory,_player,_clientKey] call server_publishObj;
|
||||
|
||||
if (Z_singleCurrency) then {
|
||||
if (_isZSC) then {
|
||||
_key = format["CHILD:309:%1:",_objectUID] + str _inventory + ":" + str _coins + ":";
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
|
@ -1,38 +1,33 @@
|
||||
/*
|
||||
[_objectID,_objectUID,_activatingPlayer,_objPos,dayz_authKey] call server_deleteObj;
|
||||
[netID _activatingPlayer,netID _obj,dayz_authKey] call server_deleteObj;
|
||||
For PV calls from the client use this function, otherwise if calling directly from the server use server_deleteObjDirect
|
||||
*/
|
||||
private["_id","_uid","_key","_activatingPlayer","_objPos","_clientKey","_exitReason","_PlayerUID","_processDelete"];
|
||||
if (count _this < 3) exitWith {diag_log "Server_DeleteObj error: Improper parameter format";};
|
||||
|
||||
if (count _this < 5) exitWith {diag_log "Server_DeleteObj error: Improper parameter format";};
|
||||
_id = _this select 0;
|
||||
_uid = _this select 1;
|
||||
_activatingPlayer = _this select 2;
|
||||
_objPos = _this select 3; //Can be object or position if _processDelete is false
|
||||
_clientKey = _this select 4;
|
||||
_processDelete = [true,_this select 5] select (count _this > 5);
|
||||
_PlayerUID = getPlayerUID _activatingPlayer;
|
||||
local _activatingPlayer = objectFromNetID(_this select 0);
|
||||
local _obj = objectFromNetID(_this select 1);
|
||||
local _clientKey = _this select 2;
|
||||
local _playerUID = getPlayerUID _activatingPlayer;
|
||||
|
||||
_exitReason = [_this,"DeleteObj",_objPos,_clientKey,_PlayerUID,_activatingPlayer] call server_verifySender;
|
||||
local _exitReason = [_this,"DeleteObj",_obj,_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
if (isServer) then {
|
||||
if (_processDelete) then {deleteVehicle _objPos};
|
||||
local _id = _obj getVariable ["ObjectID","0"];
|
||||
local _uid = _obj getVariable ["ObjectUID","0"];
|
||||
_type = typeOf _obj;
|
||||
|
||||
if (typeName _objPos != "ARRAY") then {
|
||||
_objPos = typeof _objPos;
|
||||
};
|
||||
local _processDelete = [true,_this select 3] select (count _this > 3);
|
||||
if (_processDelete) then {deleteVehicle _obj};
|
||||
|
||||
//remove from database
|
||||
if (parseNumber _id > 0) then {
|
||||
//Send request
|
||||
_key = format["CHILD:304:%1:",_id];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE: Player %1(%2) deleted %4 with ID: %3",(_activatingPlayer call fa_plr2str), _PlayerUID, _id, _objPos];
|
||||
} else {
|
||||
//Send request
|
||||
_key = format["CHILD:310:%1:",_uid];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE: Player %1(%2) deleted %4 with UID: %3",(_activatingPlayer call fa_plr2str), _PlayerUID, _uid, _objPos];
|
||||
};
|
||||
//remove from database
|
||||
if (parseNumber _id > 0) then {
|
||||
//Send request
|
||||
_key = format["CHILD:304:%1:",_id];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE: Player %1(%2) deleted %4 with ID: %3",(_activatingPlayer call fa_plr2str), _playerUID, _id, _type];
|
||||
} else {
|
||||
//Send request
|
||||
_key = format["CHILD:310:%1:",_uid];
|
||||
_key call server_hiveWrite;
|
||||
diag_log format["DELETE: Player %1(%2) deleted %4 with UID: %3",(_activatingPlayer call fa_plr2str), _playerUID, _uid, _type];
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
private ["_exitReason","_clientKey","_backpacks","_charID","_clientID","_dir","_holder","_lockCode","_lockedClass","_magazines","_name","_obj","_objectID","_objectUID","_ownerID","_packedClass","_player","_playerUID","_pos","_status","_statusText","_type","_unlockedClass","_vector","_weapons","_message","_suppliedCode","_damage","_coins","_wealth"];
|
||||
private ["_isZSC","_exitReason","_clientKey","_backpacks","_charID","_clientID","_dir","_holder","_lockCode","_lockedClass","_magazines","_name","_obj","_objectID","_objectUID","_ownerID","_packedClass","_player","_playerUID","_pos","_status","_statusText","_type","_unlockedClass","_vector","_weapons","_message","_suppliedCode","_damage","_coins","_wealth"];
|
||||
|
||||
_player = _this select 0;
|
||||
_obj = _this select 1;
|
||||
@ -6,7 +6,7 @@ _status = _this select 2;
|
||||
|
||||
_name = ["Dead Player",name _player] select (alive _player);
|
||||
_type = typeOf _obj;
|
||||
_pos = _obj getVariable ["OEMPos",getPosATL _obj];
|
||||
_pos = getPosATL _obj;
|
||||
_dir = direction _obj;
|
||||
_vector = [vectorDir _obj, vectorUp _obj];
|
||||
_charID = _obj getVariable ["CharacterID","0"];
|
||||
@ -51,27 +51,30 @@ if !(_type in DZE_DoorsLocked) then {
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
call {
|
||||
_isZSC = false;
|
||||
if (Z_singleCurrency) then {
|
||||
_isZSC = _type in DZE_MoneyStorageClasses;
|
||||
};
|
||||
if (_status == 0) exitwith { //Unlocking
|
||||
_unlockedClass = getText (configFile >> "CfgVehicles" >> _type >> "unlockedClass");
|
||||
_weapons = _obj getVariable ["WeaponCargo",[]];
|
||||
_magazines = _obj getVariable ["MagazineCargo",[]];
|
||||
_backpacks = _obj getVariable ["BackpackCargo",[]];
|
||||
if (Z_singleCurrency) then {_coins = _obj getVariable ["cashMoney",0];};
|
||||
if (_isZSC && {_unlockedClass in DZE_MoneyStorageClasses}) then {_coins = _obj getVariable ["cashMoney",0];};
|
||||
_damage = damage _obj;
|
||||
|
||||
// Create new unlocked safe, then delete old locked safe
|
||||
_holder = _unlockedClass createVehicle [0,0,0];
|
||||
_holder setDir _dir;
|
||||
//_holder setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp
|
||||
_holder setVariable ["memDir",_dir,true];
|
||||
_holder setVectorDirAndUp _vector;
|
||||
_holder setPosATL _pos;
|
||||
_holder setVariable ["CharacterID",_charID,true];
|
||||
_holder setVariable ["ObjectID",_objectID,true];
|
||||
_holder setVariable ["ObjectUID",_objectUID,true];
|
||||
_holder setVariable ["OEMPos",_pos,true];
|
||||
_holder setVariable ["ObjectID",_objectID];
|
||||
_holder setVariable ["ObjectUID",_objectUID];
|
||||
_holder setDamage _damage;
|
||||
if (DZE_permanentPlot) then {_holder setVariable ["ownerPUID",_ownerID,true];};
|
||||
if (Z_singleCurrency) then {_holder setVariable ["cashMoney",_coins,true];};
|
||||
_holder setVariable ["ownerPUID",_ownerID,true];
|
||||
if (_isZSC && {_unlockedClass in DZE_MoneyStorageClasses}) then {_holder setVariable ["cashMoney",_coins,true];};
|
||||
deleteVehicle _obj;
|
||||
|
||||
[_weapons,_magazines,_backpacks,_holder] call fn_addCargo;
|
||||
@ -84,22 +87,21 @@ call {
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
if (Z_singleCurrency) then {_coins = _obj getVariable ["cashMoney",0];};
|
||||
if (_isZSC && {_lockedClass in DZE_MoneyStorageClasses}) then {_coins = _obj getVariable ["cashMoney",0];};
|
||||
_damage = damage _obj;
|
||||
|
||||
// Create new locked safe, then delete old unlocked safe
|
||||
_holder = _lockedClass createVehicle [0,0,0];
|
||||
_holder setDir _dir;
|
||||
//_holder setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp
|
||||
_holder setVariable ["memDir",_dir,true];
|
||||
_holder setVectorDirAndUp _vector;
|
||||
_holder setPosATL _pos;
|
||||
_holder setVariable ["CharacterID",_charID,true];
|
||||
_holder setVariable ["ObjectID",_objectID,true];
|
||||
_holder setVariable ["ObjectUID",_objectUID,true];
|
||||
_holder setVariable ["OEMPos",_pos,true];
|
||||
_holder setVariable ["ObjectID",_objectID];
|
||||
_holder setVariable ["ObjectUID",_objectUID];
|
||||
_holder setDamage _damage;
|
||||
if (DZE_permanentPlot) then {_holder setVariable ["ownerPUID",_ownerID,true];};
|
||||
if (Z_singleCurrency) then {_holder setVariable ["cashMoney",_coins,true];};
|
||||
_holder setVariable ["ownerPUID",_ownerID,true];
|
||||
if (_isZSC && {_lockedClass in DZE_MoneyStorageClasses}) then {_holder setVariable ["cashMoney",_coins,true];};
|
||||
deleteVehicle _obj;
|
||||
|
||||
// Local setVariable gear onto new locked safe for easy access on next unlock
|
||||
@ -114,7 +116,7 @@ call {
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
if (Z_singleCurrency) then {_coins = _obj getVariable ["cashMoney",0];};
|
||||
if (_isZSC) then {_coins = _obj getVariable ["cashMoney",0];};
|
||||
|
||||
_holder = _packedClass createVehicle [0,0,0];
|
||||
deleteVehicle _obj;
|
||||
@ -122,7 +124,7 @@ call {
|
||||
_holder setPosATL _pos;
|
||||
_holder addMagazineCargoGlobal [getText(configFile >> "CfgVehicles" >> _packedClass >> "seedItem"),1];
|
||||
[_weapons,_magazines,_backpacks,_holder] call fn_addCargo;
|
||||
if (Z_singleCurrency && {_coins > 0}) then {
|
||||
if (_isZSC && {_coins > 0}) then {
|
||||
private "_displayName";
|
||||
|
||||
_displayName = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
|
||||
@ -140,7 +142,7 @@ call {
|
||||
|
||||
if (_status < 4) then {
|
||||
_type = call {
|
||||
if (_type in ["VaultStorageLocked","VaultStorage","VaultStorage2Locked","VaultStorage2","TallSafe"]) exitwith {
|
||||
if (_type in ["VaultStorageLocked","VaultStorage","VaultStorage2Locked","VaultStorage2","TallSafe","TallSafeLocked"]) exitwith {
|
||||
if (_ownerID == _playerUID) then {_lockCode = format["%1 - Owner",_lockCode];};
|
||||
"Safe"
|
||||
};
|
||||
|
@ -1,47 +1,51 @@
|
||||
/* Maintain Area - written by Skaronator */
|
||||
/*
|
||||
1: PVDZE_maintainArea = [player,1,[[Object, _objectID, _objectUID],[Object, _objectID, _objectUID]...etc]];
|
||||
2: PVDZE_maintainArea = [player,2,[Object, _objectID, _objectUID]];
|
||||
/* Maintain Area - written by Skaronator
|
||||
Updated by iben
|
||||
|
||||
1: PVDZE_maintainArea = [netID player,1,[netID Object,netID Object,netID Object,...etc]];
|
||||
2: PVDZE_maintainArea = [netID player,2,[netID Object]];
|
||||
*/
|
||||
|
||||
private ["_player","_option","_obj","_name","_objectsInfo","_UID","_ID","_key"];
|
||||
if ((_this select 1) == 1) exitWith {
|
||||
{
|
||||
local _obj = objectFromNetId _x;
|
||||
local _ID = _obj getVariable ["ObjectID", "0"];
|
||||
|
||||
_player = _this select 0;
|
||||
_option = _this select 1;
|
||||
_objectsInfo = _this select 2;
|
||||
if (_ID == "0") then {
|
||||
local _UID = _obj getVariable ["ObjectUID", "0"];
|
||||
|
||||
if (_option == 1) then {
|
||||
{
|
||||
_obj = _x select 0;
|
||||
_ID = _x select 1;
|
||||
_UID = _x select 2;
|
||||
if (_ID == "0") then {
|
||||
if (_UID != "0") then {
|
||||
_obj setDamage 0;
|
||||
_key = format["CHILD:397:%1:", _UID];
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
} else {
|
||||
_obj setDamage 0;
|
||||
_key = format["CHILD:396:%1:", _ID];
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
} count _objectsInfo;
|
||||
_name = if (alive _player) then { name _player; } else { "Dead Player"; };
|
||||
diag_log format ["MAINTAIN AREA BY %1 - %2 Objects at %3, Grid: %4", _name, (count _objectsInfo), (getPosATL _player), mapGridPosition(getPosATL _player)];
|
||||
} else {
|
||||
_obj = _objectsInfo select 0;
|
||||
_ID = _objectsInfo select 1;
|
||||
_UID = _objectsInfo select 2;
|
||||
if (_ID == "0") then {
|
||||
if (_UID != "0") then {
|
||||
_obj setDamage 0;
|
||||
_key = format["CHILD:397:%1:", _UID];
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
} else {
|
||||
_obj setDamage 0;
|
||||
_key = format["CHILD:396:%1:", _ID];
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
if (_UID != "0") then {
|
||||
_obj setDamage 0;
|
||||
(format ["CHILD:397:%1:", _UID]) call server_hiveWrite
|
||||
}
|
||||
} else {
|
||||
_obj setDamage 0;
|
||||
(format ["CHILD:396:%1:", _ID]) call server_hiveWrite
|
||||
}
|
||||
} count (_this select 2);
|
||||
|
||||
local _player = objectFromNetId (_this select 0);
|
||||
local _position = getPosATL _player;
|
||||
|
||||
diag_log format [
|
||||
"MAINTAIN AREA BY %1 - %2 Objects at %3, Grid: %4."
|
||||
,if (alive _player) then {name _player} else {"Dead Player"}
|
||||
,count (_this select 2), _position, mapGridPosition _position
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
local _obj = objectFromNetId ((_this select 2) select 0);
|
||||
local _ID = _obj getVariable ["ObjectID", "0"];
|
||||
|
||||
if (_ID == "0") exitWith {
|
||||
local _UID = _obj getVariable ["ObjectUID", "0"];
|
||||
|
||||
if (_UID != "0") then {
|
||||
_obj setDamage 0;
|
||||
(format ["CHILD:397:%1:", _UID]) call server_hiveWrite
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
_obj setDamage 0;
|
||||
(format ["CHILD:396:%1:", _ID]) call server_hiveWrite
|
||||
|
@ -18,7 +18,6 @@ _sourceID = _this select 10;
|
||||
//Mark player as dead so we bypass the ghost system
|
||||
dayz_died set [count dayz_died, _playerID];
|
||||
|
||||
_newObject setVariable ["bodyName",_playerName,true];
|
||||
_newObject setVariable ["bodyUID",_playerID,true];
|
||||
_pos = getPosATL _newObject;
|
||||
|
||||
@ -87,4 +86,3 @@ if (_playerName != "unknown" || {_sourceName != "unknown"}) then {
|
||||
|
||||
_newObject setDamage 1;
|
||||
_newObject setOwner 0;
|
||||
//dead_bodyCleanup set [count dead_bodyCleanup,_newObject];
|
||||
|
@ -194,8 +194,3 @@ if (count dayz_activeInvites > 0) then {
|
||||
|
||||
PVCDZ_plr_PlayerAccepted = [_playerName,diag_ticktime];
|
||||
(owner _playerObj) publicVariableClient "PVCDZ_plr_PlayerAccepted";
|
||||
|
||||
if ((count DZE_ServerMarkerArray) > 0) then {
|
||||
PVDZ_ServerMarkerSend = ["JIP",DZE_ServerMarkerArray];
|
||||
(owner _playerObj) publicVariableClient "PVDZ_ServerMarkerSend";
|
||||
};
|
@ -99,6 +99,7 @@ if (count _medical > 0) then {
|
||||
_fractures = _medical select 9;
|
||||
_playerObj setVariable ["hit_legs",(_fractures select 0),true];
|
||||
_playerObj setVariable ["hit_hands",(_fractures select 1),true];
|
||||
|
||||
_playerObj setVariable ["unconsciousTime",(_medical select 10),true];
|
||||
_playerObj setVariable ["messing",if (count _medical >= 14) then {(_medical select 13)} else {[0,0,0]},true];
|
||||
_playerObj setVariable ["blood_testdone",if (count _medical >= 15) then {(_medical select 14)} else {false},true];
|
||||
@ -114,7 +115,10 @@ if (count _medical > 0) then {
|
||||
};
|
||||
} else {
|
||||
//Reset bleeding wounds
|
||||
call fnc_usec_resetWoundPoints;
|
||||
{
|
||||
_playerObj setVariable["hit_"+_x,false,true];
|
||||
} forEach USEC_typeOfWounds;
|
||||
|
||||
//Reset fractures
|
||||
_playerObj setVariable ["hit_legs",0,true];
|
||||
_playerObj setVariable ["hit_hands",0,true];
|
||||
@ -228,7 +232,6 @@ if (_findIndex > -1) then {
|
||||
// Sync weather settings for JIP player
|
||||
_clientID publicVariableClient "PVDZE_SetWeather";
|
||||
|
||||
//PVCDZ_plr_Login2 = [_worldspace,_state,_randomKey];
|
||||
PVCDZ_plr_Login2 = [[0,respawn_west_original],_state,_randomKey,_worldspace,_randomSpot,([_randomSpot,_playerID] call spawn_config)];
|
||||
_clientID publicVariableClient "PVCDZ_plr_Login2";
|
||||
if (dayz_townGenerator) then {
|
||||
@ -240,7 +243,7 @@ _playerObj setVariable ["lastTime",diag_ticktime];
|
||||
|
||||
//set server-side inventory variable to monitor player gear
|
||||
if (count _inventory > 2) then {
|
||||
_playerObj setVariable["ServerMagArray",[_inventory select 1,_inventory select 2,_inventory select 0], false];
|
||||
_playerObj setVariable["ServerMagArray",_inventory select 1, false];
|
||||
};
|
||||
|
||||
//Record Player Login/LogOut
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
local _character = _this select 0;
|
||||
local _magazines = _this select 1;
|
||||
local _dayz_onBack = _this select 2;
|
||||
local _weaponsPlayer = _this select 3;
|
||||
local _dayz_onBack = _character getVariable ["dayz_onBack",""];
|
||||
local _characterID = _character getVariable ["characterID","0"];
|
||||
local _playerUID = getPlayerUID _character;
|
||||
local _charPos = getPosATL _character;
|
||||
@ -41,7 +40,7 @@ local _usec_Dead = _character getVariable ["USEC_isDead",false];
|
||||
local _lastTime = _character getVariable ["lastTime",-1];
|
||||
local _modelChk = _character getVariable ["model_CHK",""];
|
||||
local _temp = round (_character getVariable ["temperature",100]);
|
||||
local _lastMagazines = _character getVariable ["ServerMagArray",[[],"",[]]];
|
||||
local _lastMagazines = _character getVariable ["ServerMagArray",[]];
|
||||
//Get difference between current stats and stats at last sync
|
||||
local _statsDiff = [_character,_playerUID] call server_getStatsDiff;
|
||||
_humanity = _statsDiff select 0;
|
||||
@ -54,17 +53,12 @@ local _charPosLen = count _charPos;
|
||||
local _magTemp = [];
|
||||
|
||||
if (!isNil "_magazines") then {
|
||||
_playerGear = [_weaponsPlayer,_magazines,_dayz_onBack];
|
||||
_character setVariable["ServerMagArray",[_magazines,_dayz_onBack,_weaponsPlayer], false];
|
||||
_playerGear = [weapons _character,_magazines,_dayz_onBack];
|
||||
_character setVariable["ServerMagArray",_magazines, false];
|
||||
} else {
|
||||
//check Magazines everytime they aren't sent by player_forceSave
|
||||
_magTemp = (_lastMagazines select 0);
|
||||
if (isNil "_dayz_onBack") then {
|
||||
_dayz_onBack = _lastMagazines select 1;
|
||||
};
|
||||
if (isNil "_weaponsPlayer") then {
|
||||
_weaponsPlayer = _lastMagazines select 2;
|
||||
};
|
||||
_magTemp = _lastMagazines;
|
||||
|
||||
if (count _magTemp > 0) then {
|
||||
_magazines = [(magazines _character),20] call array_reduceSize;
|
||||
{
|
||||
@ -73,7 +67,7 @@ if (!isNil "_magazines") then {
|
||||
_class = _x select 0;
|
||||
};
|
||||
if (_class in _magazines) then {
|
||||
local _MatchedCount = {_compare = if (typeName _x == "ARRAY") then {_x select 0;} else {_x}; _compare == _class} count _magTemp;
|
||||
local _MatchedCount = {local _compare = if (typeName _x == "ARRAY") then {_x select 0;} else {_x}; _compare == _class} count _magTemp;
|
||||
local _CountedActual = {_x == _class} count _magazines;
|
||||
if (_MatchedCount > _CountedActual) then {
|
||||
_magTemp set [_forEachIndex, "0"];
|
||||
@ -81,16 +75,15 @@ if (!isNil "_magazines") then {
|
||||
} else {
|
||||
_magTemp set [_forEachIndex, "0"];
|
||||
};
|
||||
} forEach (_lastMagazines select 0);
|
||||
} forEach _lastMagazines;
|
||||
_magazines = _magTemp - ["0"];
|
||||
_magazines = [_magazines,_dayz_onBack,_weaponsPlayer];
|
||||
_character setVariable["ServerMagArray",_magazines, false];
|
||||
_playerGear = [_magazines select 2,_magazines select 0,_magazines select 1];
|
||||
_playerGear = [weapons _character,_magazines,_dayz_onBack];
|
||||
} else {
|
||||
_magazines = [_magTemp,_dayz_onBack,_weaponsPlayer];
|
||||
_magazines = _magTemp;
|
||||
};
|
||||
_character setVariable["ServerMagArray",_magazines, false];
|
||||
_playerGear = [_magazines select 2,_magazines select 0,_magazines select 1];
|
||||
_playerGear = [weapons _character,_magazines,_dayz_onBack];
|
||||
};
|
||||
|
||||
//Check if update is requested
|
||||
|
@ -31,11 +31,12 @@ if ([_object, "Server"] call check_publishobject) then {
|
||||
|
||||
if !(_object isKindOf "TrapItems") then {
|
||||
if (DZE_GodModeBase && {!(_type in DZE_GodModeBaseExclude)}) then {
|
||||
_object addEventHandler ["HandleDamage", {false}];
|
||||
_object addEventHandler ["HandleDamage", {0}];
|
||||
} else {
|
||||
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||
_object addMPEventHandler ["MPKilled",{if !(isServer) exitWith {};_this call vehicle_handleServerKilled;}];
|
||||
};
|
||||
};
|
||||
|
||||
// Test disabling simulation server side on buildables only.
|
||||
_object enableSimulation false;
|
||||
|
||||
|
@ -63,25 +63,25 @@ if (_outcome != "PASS") then {
|
||||
diag_log("CUSTOM: failed to get id for : " + str(_uid));
|
||||
} else {
|
||||
_oid = _result select 1;
|
||||
_object setVariable ["ObjectID", _oid, true];
|
||||
_object setVariable ["ObjectID", _oid];
|
||||
|
||||
#ifdef OBJECT_DEBUG
|
||||
diag_log("CUSTOM: Selected " + str(_oid));
|
||||
#endif
|
||||
|
||||
_object setVariable ["lastUpdate",diag_tickTime];
|
||||
_object setVariable ["CharacterID", _characterID, true];
|
||||
_object setVariable ["CharacterID", _characterID]; // Non key vehicles need no global set CharacterID
|
||||
_object setDamage _damage;
|
||||
|
||||
{
|
||||
_selection = _x select 0;
|
||||
_dam = _x select 1;
|
||||
if (_selection in dayZ_explosiveParts && _dam > 0.8) then {_dam = 0.8};
|
||||
[_object,_selection,_dam] call fnc_veh_setFixServer;
|
||||
} count _array;
|
||||
[_object,_array] call server_setHitpoints;
|
||||
|
||||
_object setFuel _fuel;
|
||||
_object setvelocity [0,0,1];
|
||||
|
||||
[_object,"all",true] call server_updateObject;
|
||||
|
||||
[_object,DZE_clearVehicleAmmo,DZE_addVehicleAmmo] call fn_vehicleAddons;
|
||||
|
||||
_object call fnc_veh_ResetEH;
|
||||
|
||||
PVDZE_veh_Init = _object;
|
||||
|
@ -73,15 +73,14 @@ if (_outcome != "PASS") then {
|
||||
|
||||
if(!_donotusekey) then {
|
||||
_object setvehiclelock "locked";
|
||||
//_object setVariable ["MF_Tow_Cannot_Tow",true,true];
|
||||
};
|
||||
|
||||
clearWeaponCargoGlobal _object;
|
||||
clearMagazineCargoGlobal _object;
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
_object setVariable ["ObjectID", _oid, true];
|
||||
_object setVariable ["ObjectID", _oid];
|
||||
_object setVariable ["lastUpdate",diag_tickTime];
|
||||
_object setVariable ["CharacterID", _characterID, true];
|
||||
_object setVariable ["CharacterID", _characterID,[true,false] select (_donotusekey)]; // Set CharacterID global only for vehicles with a key.
|
||||
|
||||
if(DZE_TRADER_SPAWNMODE) then {
|
||||
_object attachTo [_object_para, [0,0,-1.6]];
|
||||
@ -95,8 +94,9 @@ if (_outcome != "PASS") then {
|
||||
};
|
||||
};
|
||||
|
||||
[_object,DZE_clearVehicleAmmo,DZE_addVehicleAmmo] call fn_vehicleAddons;
|
||||
|
||||
_object call fnc_veh_ResetEH;
|
||||
_object setVariable ["Owner", [_playerUID], true];
|
||||
|
||||
PVDZE_veh_Init = _object;
|
||||
publicVariable "PVDZE_veh_Init";
|
||||
|
@ -1,7 +1,7 @@
|
||||
private ["_coins","_activatingPlayer","_object","_worldspace","_location","_dir","_class","_uid","_key","_keySelected"
|
||||
,"_characterID","_result","_outcome","_oid","_objectID","_objectUID","_newobject","_weapons","_magazines","_backpacks"
|
||||
,"_clientKey","_exitReason","_playerUID","_isAir","_fuel","_selection","_dam","_hitpoints","_newHitpoints","_damage"
|
||||
,"_hit","_inv","_action","_clearTurrets","_message"];
|
||||
,"_hit","_inv"];
|
||||
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
||||
|
||||
if (count _this < 6) exitWith {
|
||||
@ -16,7 +16,6 @@ _class = _this select 2;
|
||||
_keySelected = _this select 3;
|
||||
_activatingPlayer = _this select 4;
|
||||
_clientKey = _this select 5;
|
||||
_action = if (count _this > 6) then {_this select 6} else {""};
|
||||
_playerUID = getPlayerUID _activatingPlayer;
|
||||
_characterID = _keySelected;
|
||||
|
||||
@ -47,7 +46,7 @@ _magazines = getMagazineCargo _object;
|
||||
_backpacks = getBackpackCargo _object;
|
||||
_inv = [_weapons,_magazines,_backpacks];
|
||||
|
||||
if (Z_SingleCurrency && ZSC_VehicleMoneyStorage) then {
|
||||
if (Z_SingleCurrency && {ZSC_VehicleMoneyStorage}) then {
|
||||
_coins = _object getVariable ["cashMoney",0];
|
||||
};
|
||||
|
||||
@ -67,9 +66,9 @@ diag_log ("PUBLISH: Attempt " + str(_object));
|
||||
_dir = _worldspace select 0;
|
||||
_uid = _worldspace call dayz_objectUID2;
|
||||
|
||||
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, _inv, _newHitpoints, _fuel,_uid];
|
||||
_key = str formatText["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, _inv, _newHitpoints, _fuel,_uid];
|
||||
#ifdef OBJECT_DEBUG
|
||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
diag_log ("HIVE: WRITE: "+ _key);
|
||||
#endif
|
||||
|
||||
_key call server_hiveWrite;
|
||||
@ -94,9 +93,6 @@ if (_outcome != "PASS") then {
|
||||
diag_log("CUSTOM: Selected " + str(_oid));
|
||||
#endif
|
||||
|
||||
_colour = _object getVariable ["Colour","0"];
|
||||
_colour2 = _object getVariable ["Colour2","0"];
|
||||
|
||||
deleteVehicle _object;
|
||||
[_objectID,_objectUID,_object] call server_deleteObjDirect;
|
||||
|
||||
@ -107,11 +103,11 @@ if (_outcome != "PASS") then {
|
||||
// switch var to new vehicle at this point.
|
||||
_object = _newobject;
|
||||
|
||||
_object setVariable ["ObjectID", _oid, true];
|
||||
_object setVariable ["ObjectID", _oid];
|
||||
_object setVariable ["lastUpdate",diag_tickTime];
|
||||
_object setVariable ["CharacterID", _characterID, true];
|
||||
_object setVariable ["CharacterID", _characterID, [false,true] select (_characterID != "0")];
|
||||
|
||||
if (Z_SingleCurrency && ZSC_VehicleMoneyStorage && {_coins > 0}) then {
|
||||
if (Z_SingleCurrency && {ZSC_VehicleMoneyStorage && (_coins > 0)}) then {
|
||||
_object setVariable ["cashMoney",_coins,true];
|
||||
};
|
||||
|
||||
@ -126,80 +122,23 @@ if (_outcome != "PASS") then {
|
||||
_object setVectorUp surfaceNormal _location;
|
||||
_object setDamage _damage;
|
||||
|
||||
if (_colour != "0") then {
|
||||
_object setVariable ["Colour",_colour,true];
|
||||
_clrinit = format ["#(argb,8,8,3)color(%1)",_colour];
|
||||
_object setVehicleInit "this setObjectTexture [0,"+str _clrinit+"];";
|
||||
};
|
||||
|
||||
if (_colour2 != "0") then {
|
||||
_object setVariable ["Colour2",_colour2,true];
|
||||
_clrinit2 = format ["#(argb,8,8,3)color(%1)",_colour2];
|
||||
_object setVehicleInit "this setObjectTexture [1,"+str _clrinit2+"];";
|
||||
};
|
||||
|
||||
processInitCommands;
|
||||
[_weapons,_magazines,_backpacks,_object] call fn_addCargo;
|
||||
|
||||
_clearTurrets = {
|
||||
//By denvdmj (probably, I found it on the biki)
|
||||
private ["_weaponArray","_findRecurse","_class","_obj","_turret","_mags"];
|
||||
_obj = _this;
|
||||
|
||||
_weaponArray = [];
|
||||
_weaponArray set [count _weaponArray,[-1]];
|
||||
|
||||
_findRecurse = {
|
||||
private ["_root", "_class", "_path", "_currentPath", "_thisThis"];
|
||||
_root = (_this select 0);
|
||||
_path = +(_this select 1);
|
||||
_thisThis = _this select 2;
|
||||
for "_i" from 0 to count _root -1 do {
|
||||
_class = _root select _i;
|
||||
if (isClass _class) then {
|
||||
_currentPath = _path + [_i];
|
||||
{_weaponArray set [count _weaponArray, _currentPath];} count getArray (_class >> "weapons");
|
||||
_class = _class >> "turrets";
|
||||
if (isClass _class) then {[_class, _currentPath, _thisThis] call _findRecurse;};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
[configFile >> "CfgVehicles" >> typeOf (_obj) >> "turrets", [], _this] call _findRecurse;
|
||||
|
||||
{
|
||||
_turret = _x;
|
||||
_mags = _obj magazinesTurret _turret;
|
||||
{_obj removeMagazinesTurret[_x,_turret];} count _mags;
|
||||
} forEach _weaponArray;
|
||||
};
|
||||
|
||||
_isAir = _object isKindOf "Air";
|
||||
{
|
||||
_selection = _x select 0;
|
||||
_dam = [_x select 1,(_x select 1) min 0.8] select (!_isAir && {_selection in dayZ_explosiveParts});
|
||||
_object setHit [_selection,_dam];
|
||||
} count _newHitpoints;
|
||||
|
||||
_object setFuel _fuel;
|
||||
|
||||
[_object,_newHitpoints] call server_setHitpoints;
|
||||
|
||||
[_object,"all",true] call server_updateObject;
|
||||
|
||||
[_object,DZE_clearVehicleAmmo,false] call fn_vehicleAddons;
|
||||
|
||||
_object call fnc_veh_ResetEH;
|
||||
// for non JIP users this should make sure everyone has eventhandlers for vehicles.
|
||||
PVDZE_veh_Init = _object;
|
||||
publicVariable "PVDZE_veh_Init";
|
||||
|
||||
{if (_object isKindOf _x) exitWith {_object disableTIEquipment true;}} count vkc_disableThermal;
|
||||
if (vkc_clearAmmo) then {_object call _clearTurrets;};
|
||||
|
||||
dze_waiting = "success";
|
||||
(owner _activatingPlayer) publicVariableClient "dze_waiting";
|
||||
|
||||
if (_action == "") then {
|
||||
_message = format["PUBLISH: %1(%2) upgraded %3 with UID %4 @%5",(_activatingPlayer call fa_plr2str),_playerUID,_class,_uid,(_location call fa_coor2str)];
|
||||
} else {
|
||||
_message = format["PUBLISH: %1(%2) %6 %3 with UID %4 @%5",(_activatingPlayer call fa_plr2str),_playerUID,_class,_uid,(_location call fa_coor2str),_action];
|
||||
};
|
||||
diag_log _message;
|
||||
diag_log format["PUBLISH: %1(%2) upgraded %3 with UID %4 @%5",(_activatingPlayer call fa_plr2str),_playerUID,_class,_uid,(_location call fa_coor2str)];
|
||||
};
|
||||
|
@ -0,0 +1,178 @@
|
||||
private ["_coins","_activatingPlayer","_object","_worldspace","_location","_dir","_class","_uid","_key","_keySelected"
|
||||
,"_characterID","_result","_outcome","_oid","_objectID","_objectUID","_newobject","_weapons","_magazines","_backpacks"
|
||||
,"_clientKey","_exitReason","_playerUID","_isAir","_fuel","_selection","_dam","_hitpoints","_newHitpoints","_damage"
|
||||
,"_hit","_inv","_action","_clearTurrets","_message"];
|
||||
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
||||
|
||||
if (count _this < 6) exitWith {
|
||||
diag_log "Server_PublishVehicle3 error: Wrong parameter format";
|
||||
dze_waiting = "fail";
|
||||
(owner (_this select 4)) publicVariableClient "dze_waiting";
|
||||
};
|
||||
|
||||
_object = _this select 0;
|
||||
_worldspace = _this select 1;
|
||||
_class = _this select 2;
|
||||
_keySelected = _this select 3;
|
||||
_activatingPlayer = _this select 4;
|
||||
_clientKey = _this select 5;
|
||||
_action = if (count _this > 6) then {_this select 6} else {""};
|
||||
_playerUID = getPlayerUID _activatingPlayer;
|
||||
_characterID = _keySelected;
|
||||
|
||||
_exitReason = [_this,"PublishVehicle3",(_worldspace select 1),_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {
|
||||
diag_log _exitReason;
|
||||
dze_waiting = "fail";
|
||||
(owner _activatingPlayer) publicVariableClient "dze_waiting";
|
||||
};
|
||||
|
||||
if (!(isClass(configFile >> "CfgVehicles" >> _class)) || isNull _object) exitWith {
|
||||
diag_log ("HIVE-PublishVehicle3 Error: Vehicle does not exist: "+ str(_class));
|
||||
dze_waiting = "fail";
|
||||
(owner _activatingPlayer) publicVariableClient "dze_waiting";
|
||||
};
|
||||
|
||||
_objectID = _object getVariable ["ObjectID","0"];
|
||||
_objectUID = _object getVariable ["ObjectUID","0"];
|
||||
|
||||
if (_objectUID == "0") then {
|
||||
_objectUID = "";
|
||||
{
|
||||
_x = _x * 10;
|
||||
if (_x < 0) then {_x = _x * -10};
|
||||
_objectUID = _objectUID + str(round(_x));
|
||||
} forEach getPosATL _object;
|
||||
_objectUID = _objectUID + str(round((getDir _object) + time));
|
||||
_object setVariable ["ObjectUID",_objectUID];
|
||||
};
|
||||
|
||||
_location = [_object] call fnc_getPos;
|
||||
_fuel = fuel _object;
|
||||
_hitpoints = _object call vehicle_getHitpoints;
|
||||
_newHitpoints = [];
|
||||
_damage = damage _object;
|
||||
|
||||
// add items from previous vehicle here
|
||||
_weapons = getWeaponCargo _object;
|
||||
_magazines = getMagazineCargo _object;
|
||||
_backpacks = getBackpackCargo _object;
|
||||
_inv = [_weapons,_magazines,_backpacks];
|
||||
|
||||
if (Z_SingleCurrency && {ZSC_VehicleMoneyStorage}) then {
|
||||
_coins = _object getVariable ["cashMoney",0];
|
||||
};
|
||||
|
||||
{
|
||||
_hit = [_object,_x] call object_getHit;
|
||||
if ((_hit select 0) > 0) then {
|
||||
_newHitpoints set [count _newHitpoints,[(_hit select 1),(_hit select 0)]];
|
||||
} else {
|
||||
_newHitpoints set [count _newHitpoints,[(_hit select 1),0]];
|
||||
};
|
||||
} count _hitpoints;
|
||||
|
||||
#ifdef OBJECT_DEBUG
|
||||
diag_log ("PUBLISH: Attempt " + str(_object));
|
||||
#endif
|
||||
|
||||
_dir = _worldspace select 0;
|
||||
_uid = _worldspace call dayz_objectUID2;
|
||||
|
||||
_key = str formatText["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, _inv, _newHitpoints, _fuel,_uid];
|
||||
#ifdef OBJECT_DEBUG
|
||||
diag_log ("HIVE: WRITE: "+ _key);
|
||||
#endif
|
||||
|
||||
_key call server_hiveWrite;
|
||||
|
||||
// GET DB ID
|
||||
_key = format["CHILD:388:%1:",_uid];
|
||||
#ifdef OBJECT_DEBUG
|
||||
diag_log ("HIVE: WRITE: "+ str(_key));
|
||||
#endif
|
||||
_result = _key call server_hiveReadWrite;
|
||||
_outcome = _result select 0;
|
||||
|
||||
if (_outcome != "PASS") then {
|
||||
diag_log("HIVE-pv3: failed to get id for : " + str(_uid));
|
||||
_key = format["CHILD:310:%1:",_uid];
|
||||
_key call server_hiveWrite;
|
||||
dze_waiting = "fail";
|
||||
(owner _activatingPlayer) publicVariableClient "dze_waiting";
|
||||
} else {
|
||||
_oid = _result select 1;
|
||||
#ifdef OBJECT_DEBUG
|
||||
diag_log("CUSTOM: Selected " + str(_oid));
|
||||
#endif
|
||||
|
||||
_colour = _object getVariable ["Colour","0"];
|
||||
_colour2 = _object getVariable ["Colour2","0"];
|
||||
|
||||
deleteVehicle _object;
|
||||
[_objectID,_objectUID,_object] call server_deleteObjDirect;
|
||||
|
||||
uiSleep 3;
|
||||
|
||||
_newobject = _class createVehicle [0,0,0];
|
||||
|
||||
// switch var to new vehicle at this point.
|
||||
_object = _newobject;
|
||||
|
||||
_object setVariable ["ObjectID", _oid];
|
||||
_object setVariable ["lastUpdate",diag_tickTime];
|
||||
_object setVariable ["CharacterID", _characterID, true];
|
||||
|
||||
if (Z_SingleCurrency && {ZSC_VehicleMoneyStorage && {_coins > 0}}) then {
|
||||
_object setVariable ["cashMoney",_coins,true];
|
||||
};
|
||||
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
|
||||
|
||||
clearWeaponCargoGlobal _object;
|
||||
clearMagazineCargoGlobal _object;
|
||||
clearBackpackCargoGlobal _object;
|
||||
|
||||
_object setDir _dir;
|
||||
_object setPosATL _location;
|
||||
_object setVectorUp surfaceNormal _location;
|
||||
_object setDamage _damage;
|
||||
|
||||
if (_colour != "0") then {
|
||||
_object setVariable ["Colour",_colour,true];
|
||||
_clrinit = format ["#(argb,8,8,3)color(%1)",_colour];
|
||||
_object setVehicleInit "this setObjectTexture [0,"+str _clrinit+"];";
|
||||
};
|
||||
|
||||
if (_colour2 != "0") then {
|
||||
_object setVariable ["Colour2",_colour2,true];
|
||||
_clrinit2 = format ["#(argb,8,8,3)color(%1)",_colour2];
|
||||
_object setVehicleInit "this setObjectTexture [1,"+str _clrinit2+"];";
|
||||
};
|
||||
|
||||
processInitCommands;
|
||||
[_weapons,_magazines,_backpacks,_object] call fn_addCargo;
|
||||
|
||||
_object setFuel _fuel;
|
||||
|
||||
[_object,_newHitpoints] call server_setHitpoints;
|
||||
|
||||
[_object,"all",true] call server_updateObject;
|
||||
|
||||
[_object,DZE_clearVehicleAmmo,false] call fn_vehicleAddons;
|
||||
|
||||
_object call fnc_veh_ResetEH;
|
||||
// for non JIP users this should make sure everyone has eventhandlers for vehicles.
|
||||
PVDZE_veh_Init = _object;
|
||||
publicVariable "PVDZE_veh_Init";
|
||||
|
||||
dze_waiting = "success";
|
||||
(owner _activatingPlayer) publicVariableClient "dze_waiting";
|
||||
|
||||
if (_action == "") then {
|
||||
_message = format["PUBLISH: %1(%2) upgraded %3 with UID %4 @%5",(_activatingPlayer call fa_plr2str),_playerUID,_class,_uid,(_location call fa_coor2str)];
|
||||
} else {
|
||||
_message = format["PUBLISH: %1(%2) %6 %3 with UID %4 @%5",(_activatingPlayer call fa_plr2str),_playerUID,_class,_uid,(_location call fa_coor2str),_action];
|
||||
};
|
||||
diag_log _message;
|
||||
};
|
@ -0,0 +1,9 @@
|
||||
local _obj = _this select 0;
|
||||
local _hitpoints = _this select 1;
|
||||
local _isAir = _obj isKindOf "Air";
|
||||
|
||||
{
|
||||
local _selection = _x select 0;
|
||||
local _dam = [_x select 1,(_x select 1) min 0.8] select (!_isAir && {_selection in dayZ_explosiveParts});
|
||||
_obj setHit [_selection,_dam];
|
||||
} count _hitpoints;
|
@ -1,4 +1,4 @@
|
||||
private ["_gearClasses","_coins","_class","_uid","_charID","_object","_worldspace","_key","_allowed","_obj","_inv","_objectID","_objectUID","_proceed","_activatingplayer","_clientKey","_exitReason","_playerUID","_weapons","_magazines","_backpacks"];
|
||||
private ["_setGlobal","_gearClasses","_coins","_class","_uid","_charID","_object","_worldspace","_key","_allowed","_obj","_inv","_objectID","_objectUID","_proceed","_activatingplayer","_clientKey","_exitReason","_playerUID","_weapons","_magazines","_backpacks"];
|
||||
|
||||
if (count _this < 8) exitWith {diag_log format ["Server_SwapObject error: Wrong parameter format from player %1",_this select 5];};
|
||||
|
||||
@ -67,10 +67,8 @@ if (!_allowed || !_proceed) exitWith {
|
||||
};
|
||||
|
||||
// Publish variables
|
||||
_object setVariable ["CharacterID",_charID,true];
|
||||
|
||||
//_object setVariable ["ObjectUID",_objectUID,true];
|
||||
_object setVariable ["OEMPos",(_worldspace select 1),true];
|
||||
_setGlobal = [false,true] select ((_class in DZE_isLockedStorageUpgrade) || (_class in DZE_DoorsLocked));
|
||||
_object setVariable ["CharacterID",_charID,_setGlobal];
|
||||
|
||||
//diag_log ("PUBLISH: Attempt " + str(_object));
|
||||
|
||||
@ -84,15 +82,15 @@ _key = str formatText["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _cl
|
||||
_key call server_hiveWrite;
|
||||
|
||||
_object setVariable ["lastUpdate",diag_tickTime];
|
||||
_object setVariable ["ObjectUID", _uid,true];
|
||||
// _object setVariable ["CharacterID",_charID,true];
|
||||
_object setVariable ["ObjectUID", _uid];
|
||||
|
||||
if (DZE_GodModeBase && {!(_class in DZE_GodModeBaseExclude)}) then {
|
||||
_object addEventHandler ["HandleDamage",{false}];
|
||||
_object addEventHandler ["HandleDamage",{0}];
|
||||
} else {
|
||||
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||
_object addMPEventHandler ["MPKilled",{if !(isServer) exitWith {};_this call vehicle_handleServerKilled;}];
|
||||
};
|
||||
|
||||
_gearClasses = ["Wooden_shed2_DZ","WoodShack2_DZ","StorageShed2_DZ","GunRack2_DZ","WoodCrate2_DZ","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4""DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4","TentStorageWinter0","TentStorageWinter1","TentStorageWinter2","TentStorageWinter3","TentStorageWinter4","WinterDomeTentStorage0","WinterDomeTentStorage1","WinterDomeTentStorage2","WinterDomeTentStorage3","WinterDomeTentStorage4"];
|
||||
_gearClasses = ["Wooden_shed2_DZ","WoodShack2_DZ","StorageShed2_DZ","GunRack2_DZ","WoodCrate2_DZ","TentStorage0","TentStorage1","TentStorage2","TentStorage3","TentStorage4","DomeTentStorage0","DomeTentStorage1","DomeTentStorage2","DomeTentStorage3","DomeTentStorage4","DesertTentStorage0","DesertTentStorage1","DesertTentStorage2","DesertTentStorage3","DesertTentStorage4","StashSmall1","StashSmall2","StashSmall3","StashSmall4","StashMedium","StashMedium1","StashMedium2","StashMedium3","StashMedium4","TentStorageWinter0","TentStorageWinter1","TentStorageWinter2","TentStorageWinter3","TentStorageWinter4","WinterDomeTentStorage0","WinterDomeTentStorage1","WinterDomeTentStorage2","WinterDomeTentStorage3","WinterDomeTentStorage4"];
|
||||
|
||||
if (count _inv > 0 && {_class in _gearClasses}) then {
|
||||
[_weapons,_magazines,_backpacks,_object] call fn_addCargo;
|
||||
|
@ -5,28 +5,27 @@
|
||||
This is useful to hinder and identify cheaters who attempt mass deletion or creation of hive objects via PVS.
|
||||
*/
|
||||
|
||||
private ["_clientKey","_exitReason","_function","_index","_objPos","_params","_player","_playerUID"];
|
||||
local _params = _this select 0;
|
||||
local _function = "Server_" + (_this select 1);
|
||||
local _objPos = _this select 2; //Can be object or position
|
||||
local _clientKey = _this select 3;
|
||||
local _playerUID = _this select 4;
|
||||
local _player = _this select 5;
|
||||
local _playerPos = [_player] call fnc_getPos;
|
||||
|
||||
_params = _this select 0;
|
||||
_function = "Server_" + (_this select 1);
|
||||
_objPos = _this select 2; //Can be object or position
|
||||
_clientKey = _this select 3;
|
||||
_playerUID = _this select 4;
|
||||
_player = _this select 5;
|
||||
local _index = dayz_serverPUIDArray find _playerUID;
|
||||
|
||||
_index = dayz_serverPUIDArray find _playerUID;
|
||||
|
||||
_exitReason = call {
|
||||
local _exitReason = call {
|
||||
//If object or player is null distance returns 9999+
|
||||
//If object or player was moved with setPos on client, position takes a second to update on server
|
||||
//Coordinates can be used in place of object
|
||||
if (_objPos distance _player > (Z_VehicleDistance + 10)) exitwith {
|
||||
format["%1 error: Verification failed, player is too far from object. Distance: %2m/%3m limit PV ARRAY: %4",_function,round (_objPos distance _player),Z_VehicleDistance + 10,_params]
|
||||
if (_objPos distance _playerPos > (Z_VehicleDistance + 10)) exitwith {
|
||||
format["%1 error: Verification failed, player is too far from object. Distance: %2m/%3m limit PV ARRAY: %4",_function,round (_objPos distance _playerPos),Z_VehicleDistance + 10,_params]
|
||||
};
|
||||
if (_index < 0) exitwith {
|
||||
format["%1 error: PUID NOT FOUND ON SERVER. PV ARRAY: %2",_function,_params]
|
||||
};
|
||||
if (((dayz_serverClientKeys select _index) select 0 != owner _player) or ((dayz_serverClientKeys select _index) select 1 != _clientKey)) exitwith {
|
||||
if (((dayz_serverClientKeys select _index) select 0 != owner _player) || ((dayz_serverClientKeys select _index) select 1 != _clientKey)) exitwith {
|
||||
format["%1 error: CLIENT AUTH KEY INCORRECT OR UNRECOGNIZED. PV ARRAY: %2",_function,_params]
|
||||
};
|
||||
"";
|
||||
|
@ -20,5 +20,4 @@ if ((count _position) == 2) then {
|
||||
_veh enableSimulation false;
|
||||
_veh setDir round(random 360);
|
||||
_veh setPos _position;
|
||||
_veh setVariable ["ObjectID","1",true];
|
||||
};
|
@ -15,7 +15,7 @@ if ((count _position) == 2) then {
|
||||
_veh enableSimulation false;
|
||||
_veh setDir round(random 360);
|
||||
_veh setPos _position;
|
||||
_veh setVariable ["ObjectID","1",true];
|
||||
|
||||
_veh addEventHandler ["HandleDamage",{
|
||||
local _damage = _this select 2;
|
||||
if ((_this select 4) == "Sledge_Swing_Ammo") then {
|
||||
|
@ -15,5 +15,4 @@ if ((count _position) == 2) then {
|
||||
_veh enableSimulation false;
|
||||
_veh setDir round(random 360);
|
||||
_veh setPos _position;
|
||||
_veh setVariable ["ObjectID","1",true];
|
||||
};
|
@ -25,7 +25,7 @@ server_obj_inv = {
|
||||
local _class = _this select 3;
|
||||
|
||||
local _inventory = call {
|
||||
if (DZE_permanentPlot && {_class == "Plastic_Pole_EP1_DZ"}) exitwith {
|
||||
if (_class == "Plastic_Pole_EP1_DZ") exitwith {
|
||||
_object getVariable ["plotfriends", []] //We're replacing the inventory with UIDs for this item
|
||||
};
|
||||
if (DZE_doorManagement && {_class in DZE_DoorsLocked}) exitwith {
|
||||
@ -37,7 +37,6 @@ server_obj_inv = {
|
||||
[getWeaponCargo _object, getMagazineCargo _object, getBackpackCargo _object]
|
||||
};
|
||||
|
||||
|
||||
local _previous = str(_object getVariable["lastInventory",[]]);
|
||||
if (str _inventory != _previous) then {
|
||||
local _key = "";
|
||||
@ -48,7 +47,7 @@ server_obj_inv = {
|
||||
_key = format["CHILD:303:%1:",_objectID] + str _inventory + ":";
|
||||
};
|
||||
|
||||
if (Z_SingleCurrency) then {
|
||||
if (Z_SingleCurrency && {(_class in DZE_MoneyStorageClasses) || {ZSC_VehicleMoneyStorage && (_object isKindOf "AllVehicles") && !(_object isKindOf "StaticWeapon")}}) then {
|
||||
local _coins = _object getVariable ["cashMoney", -1]; //set to invalid value if getVariable fails to prevent overwriting of coins in DB
|
||||
_key = _key + str _coins + ":";
|
||||
};
|
||||
|
@ -7,11 +7,9 @@
|
||||
"PVDZ_plr_Login2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
|
||||
"PVDZ_plr_LoginRecord" addPublicVariableEventHandler {_id = (_this select 1) spawn dayz_recordLogin};
|
||||
"PVDZ_obj_Destroy" addPublicVariableEventHandler {(_this select 1) call server_deleteObj};
|
||||
"PVDZ_plr_Delete" addPublicVariableEventHandler {(_this select 1) spawn sched_co_deleteVehicle}; // Delete hided players
|
||||
"PVDZ_plr_Delete" addPublicVariableEventHandler {(_this select 1) setVariable ["sched_co_fliesDeleted", true];(_this select 1) spawn sched_co_deleteVehicle}; // Delete hided players
|
||||
"PVDZ_send" addPublicVariableEventHandler {(_this select 1) call server_sendToClient};
|
||||
//"PVDZ_dayzCarBomb" addPublicVariableEventHandler {[_this select 1] execVM "\z\addons\dayz_code\actions\detonate_bomb.sqf";};
|
||||
//[player,[medical Array]];
|
||||
"PVDZ_playerMedicalSync" addPublicVariableEventHandler { (_this select 1) call server_medicalSync; ((_this select 1) select 0) setVariable["Medical",((_this select 1) select 1),false]; }; //diag_log format["%1 - %2",((_this select 1) select 0),((_this select 1) select 1)]; };
|
||||
|
||||
// EPOCH ADDITIONS
|
||||
"PVDZE_maintainArea" addPublicVariableEventHandler {(_this select 1) spawn server_maintainArea};
|
||||
|
@ -5,7 +5,7 @@
|
||||
//List of files in your mission to check. For example, you may want to add 'custom\variables.sqf' etc.
|
||||
//Remove any you aren't using
|
||||
_files = [
|
||||
'description.ext','init.sqf','mission.sqm','rules.sqf'
|
||||
'description.ext','init.sqf','mission.sqm','rules.sqf','configVariables.sqf','dayz_code\init\compiles.sqf','dayz_code\init\variables.sqf'
|
||||
];
|
||||
|
||||
_list = [];
|
||||
|
@ -24,6 +24,7 @@ server_playerSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\co
|
||||
server_onPlayerDisconnect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\updateObject_functions.sqf";
|
||||
server_updateObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateObject.sqf";
|
||||
server_setHitpoints = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_setHitpoints.sqf";
|
||||
server_playerDied = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDied.sqf";
|
||||
server_publishObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishObject.sqf"; //Creates the object in DB
|
||||
server_deleteObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_deleteObj.sqf"; //Removes the object from the DB
|
||||
@ -40,7 +41,11 @@ server_verifySender = compile preprocessFileLineNumbers "\z\addons\dayz_server\c
|
||||
server_swapObject = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_swapObject.sqf"; //Used to downgrade and upgrade Epoch buildables
|
||||
server_publishVeh = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle.sqf"; //Used to spawn random vehicles by server
|
||||
server_publishVeh2 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle2.sqf"; //Used to purchase vehicles at traders
|
||||
server_publishVeh3 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle3.sqf"; //Used for car upgrades
|
||||
if (DZE_VehicleKey_Changer) then {
|
||||
server_publishVeh3 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle3_vkc.sqf"; //Used for car upgrades
|
||||
} else {
|
||||
server_publishVeh3 = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_publishVehicle3.sqf"; //Used for car upgrades
|
||||
};
|
||||
server_tradeObj = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_tradeObject.sqf";
|
||||
server_deaths = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDeaths.sqf";
|
||||
server_maintainArea = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_maintainArea.sqf";
|
||||
@ -54,29 +59,9 @@ spawn_ammosupply = compile preprocessFileLineNumbers "\z\addons\dayz_server\comp
|
||||
spawn_mineveins = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\spawn_mineveins.sqf";
|
||||
spawn_roadblocks = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\spawn_roadblocks.sqf";
|
||||
spawn_vehicles = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\spawn_vehicles.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\garage\init.sqf";
|
||||
|
||||
fnc_veh_setFixServer = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\veh_setFixServer.sqf"; //process the hit as a NORMAL damage (useful for persistent vehicles)
|
||||
|
||||
server_medicalSync = {
|
||||
local _player = _this select 0;
|
||||
local _array = _this select 1;
|
||||
|
||||
_player setVariable ["USEC_isDead",(_array select 0)]; //0
|
||||
_player setVariable ["NORRN_unconscious",(_array select 1)]; //1
|
||||
_player setVariable ["USEC_infected",(_array select 2)]; //2
|
||||
_player setVariable ["USEC_injured",(_array select 3)]; //3
|
||||
_player setVariable ["USEC_inPain",(_array select 4)]; //4
|
||||
_player setVariable ["USEC_isCardiac",(_array select 5)]; //5
|
||||
_player setVariable ["USEC_lowBlood",(_array select 6)]; //6
|
||||
_player setVariable ["USEC_BloodQty",(_array select 7)]; //7
|
||||
// _wounds; //8
|
||||
// [_legs,_arms]; //9
|
||||
_player setVariable ["unconsciousTime",(_array select 10)]; //10
|
||||
_player setVariable ["blood_type",(_array select 11)]; //11
|
||||
_player setVariable ["rh_factor",(_array select 12)]; //12
|
||||
_player setVariable ["messing",(_array select 13)]; //13
|
||||
_player setVariable ["blood_testdone",(_array select 14)]; //14
|
||||
if (DZE_Virtual_Garage) then {
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\garage\init.sqf";
|
||||
};
|
||||
|
||||
vehicle_handleServerKilled = {
|
||||
@ -99,8 +84,7 @@ check_publishobject = {
|
||||
diag_log format["DEBUG: Checking if Object: %1 is allowed, published by %2",_object,_playername];
|
||||
#endif
|
||||
|
||||
if ((typeOf _object) in DayZ_SafeObjects || (_object getVariable ["EAT_Building",0] == 1)) then {
|
||||
//if ((typeOf _object) in DayZ_SafeObjects) then {
|
||||
if ((typeOf _object) in DayZ_SafeObjects) then {
|
||||
_allowed = true;
|
||||
};
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
For detailed information about these variables see:
|
||||
https://github.com/ebayShopper/ESSV3/blob/master/DOCUMENTATION.md
|
||||
*/
|
||||
class_epoch = isClass (configFile >> "CfgWeapons" >> "Chainsaw");
|
||||
class_level1 = ["0","0","0"];
|
||||
class_level2 = ["0","0","0"];
|
||||
class_level3 = ["0","0","0"];
|
||||
@ -13,11 +14,11 @@ class_levelCount = 3; //If you add more class levels then increase this number.
|
||||
// class_level2 = class_level2 + class_level3;
|
||||
|
||||
#define VIP_ITEMS "HandRoadFlare","ItemBandage",2,"ItemPainkiller","ItemWaterbottle","FoodPistachio","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemMorphine" // constant example, these can be removed if they are not used below
|
||||
#define VIP_TOOLS "Binocular_Vector","NVGoggles","ItemCompass","ItemKnife","Itemmatchbox","Itemetool","ItemFlashlightRed","ItemWatch","ItemGPS"
|
||||
#define VIP_TOOLS "Binocular_Vector","NVGoggles","ItemCompass","ItemKnife","ItemMatchbox","Itemetool","ItemFlashlightRed","ItemWatch","ItemGPS"
|
||||
class_private = [ // These are only visible to players in their respective class levels
|
||||
["VIP Scout","Camo1_DZ","SurvivorW2_DZ",["30Rnd_556x45_Stanag",2,"15Rnd_9x19_M9SD",3,VIP_ITEMS],["M16A4_ACOG_DZ","M9_SD_DZ","Binocular_Vector"],"DZ_ALICE_Pack_EP1",[],[],1,0,0,"MeleeHatchet"],
|
||||
["VIP Specialist","Rocket_DZ","SurvivorW2_DZ",["100Rnd_762x51_M240",2,"15Rnd_9x19_M9SD",3,VIP_ITEMS],["Mk48_CCO_DZ","M9_SD_DZ","Binocular_Vector"],"DZ_British_ACU",[],[],2,0,0,"MeleeHatchet"],
|
||||
["VIP Sniper","Sniper1_DZ","SurvivorW2_DZ",["20Rnd_762x51_DMR",2,"15Rnd_9x19_M9SD",3,VIP_ITEMS],["DMR_DZ","M9_SD_DZ","Binocular_Vector"],"DZ_Backpack_EP1",[],[],3,0,0,"MeleeHatchet"]
|
||||
["VIP Scout","Camo1_DZ","SurvivorW2_DZ",["30Rnd_556x45_Stanag",2,"15Rnd_9x19_M9SD",3,VIP_ITEMS],["M16A4_ACOG_DZ","M9_SD_DZ","Binocular_Vector"],if (class_epoch) then {"ALICE_Pack_DZE1"} else {"DZ_ALICE_Pack_EP1"},[],[],1,0,0,"MeleeHatchet"],
|
||||
["VIP Specialist","Rocket_DZ","SurvivorW2_DZ",["100Rnd_762x51_M240",2,"15Rnd_9x19_M9SD",3,VIP_ITEMS],["Mk48_CCO_DZ","M9_SD_DZ","Binocular_Vector"],if (class_epoch) then {"British_ACU_DZE1"} else {"DZ_British_ACU"},[],[],2,0,0,"MeleeHatchet"],
|
||||
["VIP Sniper","Sniper1_DZ","SurvivorW2_DZ",["20Rnd_762x51_DMR",2,"15Rnd_9x19_M9SD",3,VIP_ITEMS],["DMR_DZ","M9_SD_DZ","Binocular_Vector"],if (class_epoch) then {"CoyoteBackpack_DZE1"} else {"DZ_Backpack_EP1"},[],[],3,0,0,"MeleeHatchet"]
|
||||
];
|
||||
class_customLoadout = [
|
||||
"12345678900000000", // ebay
|
||||
|
@ -42,8 +42,6 @@ for "_i" from 1 to (SPAWN_NUM) do
|
||||
//_vehicle = createVehicle [_class, _position, [], 0, "CAN_COLLIDE"];
|
||||
_vehicle = _class createVehicle _position;
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor, _vehicle];
|
||||
_vehicle setVariable ["ObjectID", 1, true];
|
||||
|
||||
_size = sizeOf _class;
|
||||
|
||||
{
|
||||
|
@ -46,7 +46,6 @@ _spawnCrashSite =
|
||||
|
||||
_vehicle = "ClutterCutter_small_2_EP1" createVehicle _position;
|
||||
_vehicle = _class createVehicle [0,0,0];
|
||||
_vehicle setVariable ["ObjectID", 1, true];
|
||||
_vehicle setDir random 360;
|
||||
_vehicle setPos _position;
|
||||
|
||||
|
@ -90,6 +90,7 @@ AllowedVehiclesList = [
|
||||
["SUV_TK_CIV_EP1_DZE",_Ratio1],
|
||||
["SUV_White",_Ratio1],
|
||||
["SUV_Yellow",_Ratio1],
|
||||
["SUV_Blue_White",_Ratio1],
|
||||
["Tractor_DZE",_Ratio3],
|
||||
["TT650_Civ_DZE",_Ratio3],
|
||||
["TT650_Ins_DZE",_Ratio3],
|
||||
|
@ -0,0 +1,39 @@
|
||||
/*
|
||||
Safe Zone Relocate by salival (https://github.com/oiad)
|
||||
*/
|
||||
|
||||
private ["_customPosition","_minDist","_maxDist","_maxDamage","_message","_nearVehicles","_objDist","_position","_safeZonePos","_safeZoneRadius","_useCustomPosition","_unlock"];
|
||||
|
||||
_useCustomPosition = false; // Enable a custom position to move vehicles to (i.e a junk yard)
|
||||
_customPosition = [6942.64,15121.6,0]; // Position for vehicles to be moved to if _useCustomPosition = true;
|
||||
_minDist = 5; // Minimum distance from the custom position to move vehicles to
|
||||
_maxDist = 1000; // Maximum distance from the safe zone position to find a safe position or custom position for relocation, setting this too low can make vehicles spawn very close to other vehicles.
|
||||
_objDist = 15; // Minimum distance from the safe position for relocation to the center of the nearest object. Specifying quite a large distance here will slow the function and might often fail to find a suitable position.
|
||||
_unlock = false; // Unlock vehicle when moved from the safe zone?
|
||||
_maxDamage = 0.75; // Vehicles above or equal to this amount of damage will be deleted
|
||||
|
||||
{
|
||||
_safeZonePos = _x select 0;
|
||||
_safeZoneRadius = _x select 1;
|
||||
_nearVehicles = _safeZonePos nearEntities [["Air","LandVehicle","Ship"],_safeZoneRadius];
|
||||
{
|
||||
if (damage _x >= _maxDamage) then {
|
||||
_message = format ["[SAFEZONE] %1 was deleted from the server for being too damaged before relocate: @%2 %3",typeOf _x,mapGridPosition _x,getPosATL _x];
|
||||
diag_log _message;
|
||||
[_x getVariable["ObjectID","0"],_x getVariable["ObjectUID","0"],_x] call server_deleteObjDirect;
|
||||
deleteVehicle _x;
|
||||
} else {
|
||||
if (_useCustomPosition) then {
|
||||
_position = [_customPosition,_minDist,_maxDist,_objDist,1,0,0,[]] call BIS_fnc_findSafePos;
|
||||
} else {
|
||||
_position = [_safeZonePos,(_safeZoneRadius + 50),_maxDist,_objDist,if (_x isKindOf "Ship") then {2} else {0},0,0,[],[_safeZonePos,_safeZonePos]] call BIS_fnc_findSafePos;
|
||||
};
|
||||
_x setPos _position;
|
||||
[_x,"position"] call server_updateObject;
|
||||
if (_unlock && {locked _x}) then {_x setVehicleLock "UNLOCKED"};
|
||||
|
||||
_message = format ["[SAFEZONE] %1 was moved out of a safe zone to: @%2 %3",typeOf _x,mapGridPosition _position,_position];
|
||||
diag_log _message;
|
||||
};
|
||||
} forEach _nearVehicles;
|
||||
} forEach DZE_safeZonePosArray;
|
@ -1,7 +1,5 @@
|
||||
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
||||
|
||||
if (isNil "DZE_NPC_CleanUp_Time") then {DZE_NPC_CleanUp_Time = -1;};
|
||||
|
||||
sched_co_deleteVehicle = {
|
||||
private "_group";
|
||||
_this removeAllMPEventHandlers "mpkilled";
|
||||
@ -28,7 +26,7 @@ sched_co_deleteVehicle = {
|
||||
|
||||
|
||||
sched_corpses = {
|
||||
private ["_delQtyG","_delQtyZ","_delQtyP","_addFlies","_x","_deathTime","_onoff","_delQtyAnimal","_sound","_deathPos","_cpos","_animal","_nearPlayer","_delQtyV","_delQtyAI"];
|
||||
private ["_delQtyG","_delQtyZ","_delQtyP","_addFlies","_x","_deathTime","_onoff","_delQtyAnimal","_sound","_deathPos","_cpos","_animal","_nearPlayer","_delQtyV"];
|
||||
// EVERY 2 MINUTE
|
||||
// DELETE UNCONTROLLED ZOMBIES --- PUT FLIES ON FRESH PLAYER CORPSES --- REMOVE OLD FLIES & CORPSES
|
||||
_delQtyZ = 0;
|
||||
@ -36,10 +34,9 @@ sched_corpses = {
|
||||
_delQtyG = 0;
|
||||
_delQtyV = 0;
|
||||
_addFlies = 0;
|
||||
_delQtyAI = 0;
|
||||
{
|
||||
if (local _x && {_x isKindOf "CAManBase"}) then {
|
||||
if (_x isKindOf "zZombie_Base") then {
|
||||
if (_x isKindOf "zZombie_Base" || {typeOf _x == "z_bloodsucker"}) then {
|
||||
_x call sched_co_deleteVehicle;
|
||||
_delQtyZ = _delQtyZ + 1;
|
||||
} else {
|
||||
@ -62,28 +59,8 @@ sched_corpses = {
|
||||
_addFlies = _addFlies + 1;
|
||||
};
|
||||
};
|
||||
// 60 * DZE_NPC_CleanUp_Time = how long an NPC corpse stays on the map
|
||||
if (DZE_NPC_CleanUp_Time != -1 && {diag_tickTime - _deathTime > (60 * DZE_NPC_CleanUp_Time)} && {_x getVariable["bodyName",""] == "NPC"}) then {
|
||||
if (_x getVariable["sched_co_fliesDeleted",false] or !dayz_enableFlies) then {
|
||||
// flies have been switched off, we can delete body
|
||||
_sound = _x getVariable ["sched_co_fliesSource", nil];
|
||||
|
||||
if !(isNil "_sound") then {
|
||||
detach _sound;
|
||||
deleteVehicle _sound;
|
||||
};
|
||||
|
||||
_x call sched_co_deleteVehicle;
|
||||
_delQtyAI = _delQtyAI + 1;
|
||||
} else {
|
||||
PVCDZ_flies = [ 0, _x ];
|
||||
publicVariable "PVCDZ_flies";
|
||||
_x setVariable ["sched_co_fliesDeleted", true];
|
||||
// body will be deleted at next round
|
||||
};
|
||||
};
|
||||
// 40 minutes = how long a player corpse stays on the map
|
||||
if ((diag_tickTime - _deathTime > 40*60) && {_x getVariable["bodyName",""] != "NPC"}) then {
|
||||
if (diag_tickTime - _deathTime > 40*60) then {
|
||||
if (_x getVariable["sched_co_fliesDeleted",false] or !dayz_enableFlies) then {
|
||||
// flies have been switched off, we can delete body
|
||||
_sound = _x getVariable ["sched_co_fliesSource", nil];
|
||||
@ -120,7 +97,7 @@ sched_corpses = {
|
||||
if (_onoff == 1) then {
|
||||
_sound = createSoundSource["Sound_Flies",getPosATL _x,[],0];
|
||||
_sound attachTo [_x];
|
||||
_x setVariable ["sched_co_fliesSource", _sound];
|
||||
_x setVariable ["sched_co_fliesSource", _sound,[false,true] select (DZE_Bury_Body || DZE_Butcher_Body)];
|
||||
//diag_log "create sound";
|
||||
};
|
||||
// broadcast flies status for everyone periodically, to update visible swarm
|
||||
@ -181,8 +158,8 @@ sched_corpses = {
|
||||
|
||||
#ifdef SERVER_DEBUG
|
||||
if (_delQtyZ+_delQtyP+_addFlies+_delQtyGrp+_delQtyG+_delQtyV > 0) then {
|
||||
diag_log format ["%1: Deleted %2 uncontrolled zombies, %3 uncontrolled animals, %4 dead character bodies, %7 ghosts, %8 destroyed vehicles, %9 dead mission ai and %5 empty groups. Added %6 flies.",__FILE__,
|
||||
_delQtyZ,_delQtyAnimal,_delQtyP,_delQtyGrp,_addFlies,_delQtyG,_delQtyV,_delQtyAI];
|
||||
diag_log format ["%1: Deleted %2 uncontrolled zombies, %3 uncontrolled animals, %4 dead character bodies, %7 ghosts, %8 destroyed vehicles and %5 empty groups. Added %6 flies.",__FILE__,
|
||||
_delQtyZ,_delQtyAnimal,_delQtyP,_delQtyGrp,_addFlies,_delQtyG,_delQtyV];
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -4,15 +4,11 @@
|
||||
*/
|
||||
|
||||
epoch_eventIsAny = {
|
||||
private ["_boolReturn","_event","_date","_bool","_index"];
|
||||
_event = _this select 0;
|
||||
_date = _this select 1;
|
||||
|
||||
_boolReturn = false;
|
||||
|
||||
_index = 0;
|
||||
local _event = _this select 0;
|
||||
local _date = _this select 1;
|
||||
local _boolReturn = false;
|
||||
local _index = 0;
|
||||
{
|
||||
_bool = false;
|
||||
if (typeName _x == "STRING") then {
|
||||
_boolReturn = true;
|
||||
} else {
|
||||
@ -21,50 +17,41 @@ epoch_eventIsAny = {
|
||||
if (!_boolReturn) exitWith {};
|
||||
_index = _index + 1;
|
||||
} count _event;
|
||||
|
||||
_boolReturn
|
||||
};
|
||||
|
||||
sched_event_init = {
|
||||
diag_log("EPOCH EVENTS INIT");
|
||||
diag_log formatText ["EPOCH EVENTS: %1 Events Scheduled",(count EpochEvents)];
|
||||
""
|
||||
};
|
||||
|
||||
sched_event = {
|
||||
private ["_date","_key","_result","_outcome","_handle","_datestr","_lastTime"];
|
||||
// Find current time from server
|
||||
_lastTime = _this;
|
||||
_key = "CHILD:307:";
|
||||
_result = _key call server_hiveReadWrite;
|
||||
_outcome = _result select 0;
|
||||
if(_outcome == "PASS") then {
|
||||
_date = _result select 1;
|
||||
_datestr = str(_date);
|
||||
local _lastTime = _this;
|
||||
local _key = "CHILD:307:";
|
||||
local _result = _key call server_hiveReadWrite;
|
||||
local _outcome = _result select 0;
|
||||
if (_outcome == "PASS") then {
|
||||
local _date = _result select 1;
|
||||
local _datestr = str(_date);
|
||||
if (_lastTime != _datestr) then {
|
||||
|
||||
// internal timestamp
|
||||
ServerCurrentTime = _date;
|
||||
|
||||
// Once a minute.
|
||||
_lastTime = _datestr;
|
||||
|
||||
//diag_log ("EVENTS: Local Time is: " + _datestr);
|
||||
if (count EpochEvents == 0) exitWith {};
|
||||
{
|
||||
|
||||
// Run event at server start when minutes are set to -1
|
||||
if ((_x select 4) == -1) then {
|
||||
diag_log ("RUNNING EVENT: " + (_x select 5) + " on " + _datestr);
|
||||
_handle = [] execVM "\z\addons\dayz_server\modules\" + (_x select 5) + ".sqf";
|
||||
local _handle = [] execVM "\z\addons\dayz_server\modules\" + (_x select 5) + ".sqf";
|
||||
|
||||
// Remove event from array so it doesn't run again.
|
||||
_lastIndex = (count EpochEvents) - 1;
|
||||
if (_lastIndex != _forEachIndex) then {EpochEvents set [_forEachIndex, EpochEvents select _lastIndex];};
|
||||
EpochEvents resize _lastIndex;
|
||||
EpochEvents = [EpochEvents,_forEachIndex] call fnc_deleteAt;
|
||||
} else {
|
||||
if([[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4)],_date] call epoch_eventIsAny) then {
|
||||
diag_log ("RUNNING EVENT: " + (_x select 5) + " on " + _datestr);
|
||||
_handle = [] execVM "\z\addons\dayz_server\modules\" + (_x select 5) + ".sqf";
|
||||
local _handle = [] execVM "\z\addons\dayz_server\modules\" + (_x select 5) + ".sqf";
|
||||
};
|
||||
};
|
||||
} forEach EpochEvents;
|
||||
|
@ -0,0 +1,57 @@
|
||||
/*
|
||||
EVR Storms AKA "Blowouts" Server Scheduler Functions by JasonTM.
|
||||
The EVR storms are rolled out in stages for JIP players.
|
||||
The server controls the EVR timing to keep the clients in sync so players have the same experience.
|
||||
*/
|
||||
|
||||
evr_storm = {
|
||||
PVDZE_EVR = "Stage1";
|
||||
publicVariable "PVDZE_EVR";
|
||||
uiSleep 60;
|
||||
|
||||
PVDZE_EVR = "Stage2";
|
||||
publicVariable "PVDZE_EVR";
|
||||
uiSleep 50;
|
||||
|
||||
PVDZE_EVR = "Stage3";
|
||||
publicVariable "PVDZE_EVR";
|
||||
uiSleep 40;
|
||||
|
||||
PVDZE_EVR = "Stage4";
|
||||
publicVariable "PVDZE_EVR";
|
||||
uiSleep 30;
|
||||
|
||||
PVDZE_EVR = "Stage5";
|
||||
publicVariable "PVDZE_EVR";
|
||||
uiSleep 20;
|
||||
|
||||
PVDZE_EVR = "Stage6";
|
||||
publicVariable "PVDZE_EVR";
|
||||
uiSleep 10;
|
||||
|
||||
PVDZE_EVR = "Stage7";
|
||||
publicVariable "PVDZE_EVR";
|
||||
uiSleep 180;
|
||||
EVR_Lockout = false;
|
||||
};
|
||||
|
||||
sched_evr_init = {
|
||||
diag_log "EVR STORMS ENABLED";
|
||||
EVR_Lockout = false; // Prevents the server from starting an EVR storm while one is running.
|
||||
[diag_tickTime, (((DZE_EVRFirstTime select 0) max (random (DZE_EVRFirstTime select 1))) * 60)]
|
||||
};
|
||||
|
||||
sched_evr = {
|
||||
local _time = _this select 0;
|
||||
local _timer = _this select 1;
|
||||
|
||||
if (!EVR_Lockout && {diag_tickTime - _time >= _timer}) then {
|
||||
[] spawn evr_storm;
|
||||
EVR_Lockout = true;
|
||||
_time = diag_tickTime;
|
||||
_timer = ((DZE_EVRTimer select 0) max (random (DZE_EVRTimer select 1))) * 60;
|
||||
diag_log format ["EVR Storm Started: Next storm in %1 minutes", round(_timer / 60)];
|
||||
};
|
||||
|
||||
[_time, _timer]
|
||||
};
|
@ -1,37 +1,41 @@
|
||||
#define PATH "z\addons\dayz_server\system\scheduler\"
|
||||
#define PATH "\z\addons\dayz_server\system\scheduler\"
|
||||
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_corpses.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_lootpiles.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_sync.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_safetyVehicle.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_dzms.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_wai.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_dzms.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_event.sqf");
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_traps.sqf");
|
||||
if (DZE_Bury_Body || DZE_Butcher_Body) then {
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_lootCrates.sqf");
|
||||
};
|
||||
if (DZE_EVR) then {
|
||||
call compile preprocessFileLineNumbers (PATH+"sched_evr.sqf");
|
||||
};
|
||||
|
||||
[
|
||||
local _list = [
|
||||
// period offset code <-> ctx init code ->ctx
|
||||
[ 60, 0, sched_event, sched_event_init ],
|
||||
[ 60, 224, sched_corpses ],
|
||||
[ 300, 336, sched_lootpiles_5m, sched_lootpiles_5m_init ],
|
||||
[ 90, 60, sched_dzms, sched_dzms_init ],
|
||||
[ 90, 60, sched_wai, sched_wai_init ],
|
||||
[ 90, 60, sched_dzms, sched_dzms_init ],
|
||||
[ 6, 340, sched_lootpiles ],
|
||||
[ 900, 0, sched_sync ],
|
||||
[ 120, 48, sched_safetyVehicle ],
|
||||
[ 360, 480, sched_fps ],
|
||||
[ 30, 60, sched_traps, sched_traps_init ]
|
||||
] execFSM ("z\addons\dayz_code\system\scheduler\scheduler.fsm");
|
||||
];
|
||||
|
||||
if (DZE_Bury_Body || DZE_Butcher_Body) then {
|
||||
_list set [count _list, [ 60, 240, sched_lootCrates ]];
|
||||
};
|
||||
if (DZE_EVR) then {
|
||||
_list set [count _list, [ 60, 180, sched_evr, sched_evr_init ]];
|
||||
};
|
||||
|
||||
_list execFSM ("\z\addons\dayz_code\system\scheduler\scheduler.fsm");
|
||||
|
||||
//diag_log [ __FILE__, "Scheduler started"];
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
// (see ViralZeds.hpp -> zombie_agent.fsm -> zombie_findOwner.sqf), called when a zombie becomes "local" to the server after the player disconnected
|
||||
zombie_findOwner = {
|
||||
(_this select 0) call fa_deleteVehicle;
|
||||
};
|
||||
*/
|
||||
|
||||
|
@ -0,0 +1,38 @@
|
||||
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
||||
|
||||
// Delete loot crates, graves and crosses after 25 minutes
|
||||
sched_lootCrates = {
|
||||
private ["_delQtyCrate","_crateTime","_objects","_crates","_graves","_cross"];
|
||||
|
||||
_delQtyCrate = 0;
|
||||
#define CENTER getMarkerPos "center"
|
||||
#define RADIUS ((getMarkerSize "center") select 1)*2
|
||||
|
||||
_crates = CENTER nearObjects ["DZ_AmmoBoxSmallUS",RADIUS];
|
||||
_graves = CENTER nearObjects ["Grave",RADIUS];
|
||||
_cross = CENTER nearObjects ["GraveCross1",RADIUS];
|
||||
|
||||
_objects = _crates + _graves + _cross;
|
||||
|
||||
{
|
||||
if (_x getVariable ["bury",false]) then {
|
||||
_crateTime = _x getVariable ["sched_co_crateTime", -1];
|
||||
if (_crateTime == -1) exitWith {
|
||||
_crateTime = diag_tickTime;
|
||||
_x setVariable ["sched_co_crateTime", _crateTime];
|
||||
};
|
||||
if (diag_tickTime - _crateTime > 25*60) then {
|
||||
_x call sched_co_deleteVehicle;
|
||||
_delQtyCrate = _delQtyCrate + 1;
|
||||
};
|
||||
};
|
||||
} forEach _objects;
|
||||
|
||||
#ifdef SERVER_DEBUG
|
||||
if (_delQtyCrate> 0) then {
|
||||
diag_log format ["%1: Deleted %2 bury/butcher objects.",__FILE__,_delQtyCrate];
|
||||
};
|
||||
#endif
|
||||
|
||||
objNull
|
||||
};
|
@ -102,7 +102,7 @@ if ((playersNumber west + playersNumber civilian) == 0) exitWith {
|
||||
_damage = _x select 8;
|
||||
_storageMoney = _x select 9;
|
||||
|
||||
if ((_type isKindOf "AllVehicles")) then {
|
||||
if ((_type isKindOf "AllVehicles") && {!(_type isKindOf "StaticWeapon") && {!(_type in DZE_StaticWeapons)}}) then {
|
||||
_VehicleQueue set [_vQty,_x];
|
||||
_vQty = _vQty + 1;
|
||||
} else {
|
||||
@ -184,20 +184,22 @@ if ((playersNumber west + playersNumber civilian) == 0) exitWith {
|
||||
};
|
||||
|
||||
_object = _type createVehicle [0,0,0]; //more than 2x faster than createvehicle array
|
||||
_object setDir _dir;
|
||||
_object setPosATL _pos;
|
||||
_object setDamage _damage;
|
||||
|
||||
if (_vecExists) then {
|
||||
_object setVectorDirAndUp _vector;
|
||||
} else {
|
||||
_object setDir _dir; // setdir is incompatible with setVectorDirAndUp and should not be used together on the same object https://community.bistudio.com/wiki/setVectorDirAndUp
|
||||
};
|
||||
_object enableSimulation false;
|
||||
_object setPosATL _pos;
|
||||
|
||||
_doorLocked = _type in DZE_DoorsLocked;
|
||||
_isPlot = _type == "Plastic_Pole_EP1_DZ";
|
||||
|
||||
// prevent immediate hive write when vehicle parts are set up
|
||||
_object setVariable ["lastUpdate",diag_ticktime];
|
||||
_object setVariable ["ObjectID", _idKey, true];
|
||||
_object setVariable ["ObjectID", _idKey];
|
||||
_object setVariable ["OwnerPUID", _ownerPUID, true];
|
||||
if (Z_SingleCurrency && {_type in DZE_MoneyStorageClasses}) then {
|
||||
_object setVariable ["cashMoney", _storageMoney, true];
|
||||
@ -234,7 +236,7 @@ if ((playersNumber west + playersNumber civilian) == 0) exitWith {
|
||||
{_object addBackpackCargoGlobal [_x, _backpackqty select _foreachindex];} foreach _backpackcargo;
|
||||
};
|
||||
} else {
|
||||
if (DZE_permanentPlot && _isPlot) then {
|
||||
if (_isPlot) then {
|
||||
_object setVariable ["plotfriends", _inventory, true];
|
||||
};
|
||||
if (DZE_doorManagement && _doorLocked) then {
|
||||
@ -261,15 +263,20 @@ if ((playersNumber west + playersNumber civilian) == 0) exitWith {
|
||||
};
|
||||
};
|
||||
};
|
||||
_object setVariable ["CharacterID", _ownerID, true];
|
||||
|
||||
if (_type isKindOf "StaticWeapon" || {_type in DZE_StaticWeapons}) then {
|
||||
[_object,DZE_clearStaticAmmo,false] call fn_vehicleAddons;
|
||||
};
|
||||
|
||||
_setGlobal = [false,true] select ((_type in DZE_LockedStorage) || (_type in DZE_DoorsLocked));
|
||||
_object setVariable ["CharacterID", _ownerID, _setGlobal];
|
||||
if (_isSafeObject && !_isTrapItem) then {
|
||||
_object setVariable["memDir",_dir,true];
|
||||
if (DZE_GodModeBase && {!(_type in DZE_GodModeBaseExclude)}) then {
|
||||
_object addEventHandler ["HandleDamage",{false}];
|
||||
_object addEventHandler ["HandleDamage",{0}];
|
||||
} else {
|
||||
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
|
||||
_object addMPEventHandler ["MPKilled",{if !(isServer) exitWith {};_this call vehicle_handleServerKilled;}];
|
||||
};
|
||||
_object setVariable ["OEMPos",_pos,true]; // used for inplace upgrades and lock/unlock of safe
|
||||
} else {
|
||||
_object enableSimulation true;
|
||||
};
|
||||
@ -338,8 +345,8 @@ if ((playersNumber west + playersNumber civilian) == 0) exitWith {
|
||||
|
||||
// prevent immediate hive write when vehicle parts are set up
|
||||
_object setVariable ["lastUpdate",diag_ticktime];
|
||||
_object setVariable ["ObjectID", _idKey, true];
|
||||
if (Z_SingleCurrency && ZSC_VehicleMoneyStorage) then {
|
||||
_object setVariable ["ObjectID", _idKey];
|
||||
if (Z_SingleCurrency && {ZSC_VehicleMoneyStorage}) then {
|
||||
_object setVariable ["cashMoney", _storageMoney, true];
|
||||
};
|
||||
|
||||
@ -362,22 +369,19 @@ if ((playersNumber west + playersNumber civilian) == 0) exitWith {
|
||||
{_object addBackpackCargoGlobal [_x, _backpackqty select _foreachindex];} foreach _backpackcargo;
|
||||
};
|
||||
|
||||
_object setVariable ["CharacterID", _ownerID, true];
|
||||
_isAir = _object isKindOf "Air";
|
||||
_setGlobal = [false,true] select (_ownerID != "0");
|
||||
_object setVariable ["CharacterID", _ownerID, _setGlobal];
|
||||
|
||||
{
|
||||
_selection = _x select 0;
|
||||
_dam = [_x select 1,(_x select 1) min 0.8] select (!_isAir && {_selection in dayZ_explosiveParts});
|
||||
_object setHit [_selection,_dam];
|
||||
} count _hitpoints;
|
||||
[_object,"damage"] call server_updateObject;
|
||||
[_object,_hitpoints] call server_setHitpoints;
|
||||
|
||||
_object setFuel _fuel;
|
||||
|
||||
[_object,"all",true] call server_updateObject;
|
||||
|
||||
[_object,DZE_clearVehicleAmmo,DZE_addVehicleAmmo] call fn_vehicleAddons;
|
||||
|
||||
_object call fnc_veh_ResetEH;
|
||||
if (_ownerID != "0" && {!(_object isKindOf "Bicycle")}) then {
|
||||
_object setVehicleLock "locked";
|
||||
//_object setVariable ["MF_Tow_Cannot_Tow",true,true];
|
||||
};
|
||||
if (_ownerID != "0" && {!(_object isKindOf "Bicycle")}) then {_object setVehicleLock "locked";};
|
||||
_serverVehicleCounter set [count _serverVehicleCounter,_type]; // total each vehicle
|
||||
_object enableSimulation true;
|
||||
_object setVelocity [0,0,1];
|
||||
@ -415,7 +419,9 @@ for "_i" from 0 to 10 do {
|
||||
diag_log format["Total Number of spawn locations %1", actualSpawnMarkerCount];
|
||||
|
||||
if (isDedicated) then {endLoadingScreen;};
|
||||
[] call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZAI\init\dzai_initserver.sqf";
|
||||
allowConnection = true;
|
||||
[] ExecVM "\z\addons\dayz_server\DZMS\DZMSInit.sqf";
|
||||
sm_done = true;
|
||||
publicVariable "sm_done";
|
||||
|
||||
@ -467,4 +473,7 @@ if (_hiveLoaded) then {
|
||||
//Update gear last after all dynamic vehicles are created to save random loot to database (low priority)
|
||||
{[_x,"gear"] call server_updateObject} count _vehiclesToUpdate;
|
||||
};
|
||||
if (DZE_SafeZone_Relocate) then {
|
||||
execVM "\z\addons\dayz_server\system\safeZoneRelocate.sqf";
|
||||
};
|
||||
};
|
||||
|
@ -60,7 +60,7 @@
|
||||
] call server_spawnTraders;
|
||||
|
||||
// Bankers
|
||||
if (Z_singleCurrency && Z_globalBanking && Z_globalBankingTraders) then {
|
||||
if (Z_singleCurrency && {Z_globalBanking && Z_globalBankingTraders}) then {
|
||||
[
|
||||
["Functionary1_EP1",[12399.83,5054.3413,0.2],52],
|
||||
["Functionary1_EP1",[15529.827,13236.555,2.38],164],
|
||||
|
676
MPMissions/DayZ_Epoch_24.Napf/configVariables.sqf
Normal file
676
MPMissions/DayZ_Epoch_24.Napf/configVariables.sqf
Normal file
@ -0,0 +1,676 @@
|
||||
// EPOCH CONFIG VARIABLES //
|
||||
// Standard DayZ variables are found in dayz_code\init\variables.sqf.
|
||||
|
||||
// Do not move the variables from here to the init.sqf. This file was made to have all variables in one place.
|
||||
|
||||
// Both
|
||||
dayz_REsec = 1; // DayZ RE Security / 1 = enabled // 0 = disabled
|
||||
DZE_PlayerZed = false; // Enable spawning as a player zombie when players die with infected status
|
||||
DZE_SafeZonePosArray = []; //Fail-Safe, actual safezones are defined in the map specific init's
|
||||
dayz_infectiouswaterholes = true; //Enable infected waterholes, randomly adds some bodies, graves and wrecks by ponds (negatively impacts FPS), not supported by all maps
|
||||
dayz_townGenerator = false; // Spawn vanilla map junk instead of Epoch DynamicDebris. Currently only compatible with Chernarus. Also enables comfrey plant spawner which negatively impacts performance.
|
||||
dayz_townGeneratorBlackList = []; // If townGenerator is enabled it will not spawn junk within 150m of these positions. Example for Chernarus traders: [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]]
|
||||
DZE_HeliLift = true; // Enable Epoch heli lift system
|
||||
DZE_NoVehicleExplosions = false; //Disable vehicle explosions to prevent damage to objects by ramming. Doesn't work with amphibious pook which should not be used due to FPS issues.
|
||||
DZE_SafeZoneZombieLoot = false; // Enable spawning of Zombies and loot in positions listed in DZE_SafeZonePosArray?
|
||||
dayz_ForcefullmoonNights = false; // Forces night time to be full moon.
|
||||
infectedWaterHoles = []; //Needed for non-cherno maps.
|
||||
dayz_spawnselection = 0; //(Chernarus only) Turn on spawn selection 0 = random only spawns, 1 = spawn choice based on limits
|
||||
dayz_classicBloodBagSystem = true; // disable blood types system and use the single classic ItemBloodbag
|
||||
dayz_enableFlies = true; // Enable flies on dead bodies (negatively impacts FPS).
|
||||
|
||||
// Building
|
||||
DZE_PlotPole = [30,45]; // Plot radius, minimum distance between plots
|
||||
DZE_GodModeBase = false; // Disables damage handler from base objects so they can't be destroyed. Make player built base objects indestructible.
|
||||
DZE_GodModeBaseExclude = []; //Array of object class names excluded from the god mode bases feature
|
||||
DZE_GodModeVehiclesPlot = false; //Disable vehicle damage at plot poles when the vehicle is locked and no crew is inside.
|
||||
|
||||
// Death Messages
|
||||
DZE_DeathMsgChat = "none"; //"none","global","side","system" Display death messages in selected chat channel.
|
||||
DZE_DeathMsgDynamicText = false; // Display death messages as dynamicText in the top left with weapon icons.
|
||||
DZE_DeathMsgRolling = false; // Display death messages as rolling messages in bottom center of screen.
|
||||
|
||||
// ZSC
|
||||
Z_SingleCurrency = true; // Enable single currency system.
|
||||
Z_globalBanking = true; // Enable global banking system.
|
||||
|
||||
if (Z_SingleCurrency) then {
|
||||
Z_persistentMoney = false; // Enabling this stores currency to player_data instead of character_data. Currency transfers to a new character after death. For PVE servers only. Formerly called "GlobalMoney".
|
||||
CurrencyName = "Coins"; // If using single currency this is the currency display name.
|
||||
DZE_MoneyStorageClasses = ["VaultStorage","VaultStorage2","VaultStorageLocked","VaultStorage2Locked","LockboxStorageLocked","LockboxStorage2Locked","LockboxStorage","LockboxStorage2","LockboxStorageWinterLocked","LockboxStorageWinter2Locked","LockboxStorageWinter","LockboxStorageWinter2","TallSafe","TallSafeLocked"]; // If using single currency this is an array of object classes players can store coins in. E.g.: ["GunRack_DZ","WoodCrate_DZ"]
|
||||
ZSC_VehicleMoneyStorage = true; // Allow players to store money in vehicles. If vehicles are destroyed the money is also destroyed.
|
||||
};
|
||||
|
||||
Z_VehicleDistance = 40; // Max distance a vehicle can be sold or accessed from at a trader.
|
||||
|
||||
// Vehicle Key Changer
|
||||
DZE_VehicleKey_Changer = false; // Enable Vehicle Key Changer. Create or change the key for a vehicle.
|
||||
|
||||
// Virtual Garage
|
||||
DZE_Virtual_Garage = false; // Enable the Virtual Garage to store vehicles.
|
||||
|
||||
// Plot Management and Plot for Life
|
||||
DZE_isRemovable = ["Plastic_Pole_EP1_DZ"]; //Items that can be removed with a crowbar with no ownership or access required. To forbid base take overs remove plot pole from this list and add it to DZE_restrictRemoval. It is not necessary to add wrecks or items that inherit from 'BuiltItems' to this list.
|
||||
|
||||
// Door Management
|
||||
DZE_doorManagement = true; // Enable Door Management by @DevZupa.
|
||||
|
||||
// Group System
|
||||
dayz_groupSystem = false; // Enable group system
|
||||
|
||||
// Bloodsuckers
|
||||
DZE_Bloodsuckers = false; // Enable bloodsucker spawning.
|
||||
|
||||
// EVR Storms
|
||||
DZE_EVR = false; // Enable EVR storms.
|
||||
|
||||
// Bury and Butcher Bodies
|
||||
DZE_Bury_Body = false; // Enable Bury Bodies
|
||||
DZE_Butcher_Body = false; // Enable Butcher Bodies
|
||||
|
||||
// Weather
|
||||
DZE_Weather = 2; // Options: 1 - Summer Static, 2 - Summer Dynamic, 3 - Winter Static, 4 - Winter Dynamic. If static is selected, the weather settings will be set at server startup and not change. Weather settings can be adjusted with array DZE_WeatherVariables.
|
||||
|
||||
// The settings in the array below may be adjusted as desired. The default settings are designed to maximize client and server performance.
|
||||
// Having several features enabled at once might have adverse effects on client performance. For instance, you could have snowfall, ground fog, and breath fog threads all running at once.
|
||||
DZE_WeatherVariables = [
|
||||
15, // Minimum time in minutes for the weather to change. (default value: 15).
|
||||
30, // Maximum time in minutes for the weather to change. (default value: 30).
|
||||
0, // Minimum fog intensity (0 = no fog, 1 = maximum fog). (default value: 0).
|
||||
.2, // Maximum fog intensity (0 = no fog, 1 = maximum fog). (default value: 0.8).
|
||||
0, // Minimum overcast intensity (0 = clear sky, 1 = completely overcast). (default value: 0). Note: Rain and snow will not occur when overcast is less than 0.70.
|
||||
.6, // Maximum overcast intensity (0 = clear sky, 1 = completely overcast). (default value: 1).
|
||||
0, // Minimum rain intensity (0 = no rain, 1 = maximum rain). Overcast needs to be at least 70% for it to rain.
|
||||
.6, // Maximum rain intensity (0 = no rain, 1 = maximum rain). Overcast needs to be at least 70% for it to rain.
|
||||
0, // Minimum wind strength (default value: 0).
|
||||
3, // Maximum wind strength (default value: 5).
|
||||
.25, // Probability for wind to change when weather changes. (default value: .25).
|
||||
1, // Minimum snow intensity (0 = no snow, 1 = maximum snow). Overcast needs to be at least 75% for it to snow.
|
||||
1, // Maximum snow intensity (0 = no snow, 1 = maximum snow). Overcast needs to be at least 75% for it to snow.
|
||||
.2,// Probability for a blizzard to occur when it is snowing. (0 = no blizzards, 1 = blizzard all the time). (default value: .2).
|
||||
10, // Blizzard interval in minutes. Set to zero to have the blizzard run for the whole interval, otherwise you can set a custom time interval for the blizzard.
|
||||
0, // Ground Fog Effects. Options: 0 - no ground fog, 1 - only at evening, night, and early morning, 2 - anytime, 3 - near cities and towns, at late evening, night, and early morning, 4 - near cities and towns, anytime.
|
||||
400, // Distance in meters from player to scan for buildings to spawn ground fog. By default, only the 15 nearest buildings will spawn ground fog.
|
||||
false, // Allow ground fog when it's snowing or raining?
|
||||
2 // Winter Breath Fog Effects. Options: 0 - no breath fog, 1 - anytime, 2 - only when snowing or blizzard. Note: breath fog is only available with winter weather enabled.
|
||||
];
|
||||
|
||||
DZE_PlotManagementAdmins = []; //Array of admin PlayerUIDs. UIDs in this list are able to access every pole's management menu and delete or build any buildable with a pole nearby.
|
||||
DZE_doorManagementAdmins = []; //Array of admin PlayerUIDs. UIDs in this list are able to access every door's management menu and open it.
|
||||
|
||||
DZE_disableThermal = []; // Array of vehicle classnames to disable thermal on when being spawned. i.e: ["AH1Z","MTVR"];
|
||||
DZE_clearStaticAmmo = true; // Clears the ammo of all built and spawned static guns
|
||||
DZE_clearVehicleAmmo = true; // Clears the ammo of vehicles spawned, bought, claimed and upgraded during the same restart
|
||||
DZE_clearVehicleFlares = false; // Clears the flares of vehicles during the same restart, DZE_clearVehicleAmmo must be true in order to work
|
||||
DZE_addVehicleAmmo = false; // Adds ammo to all spawned, bought, claimed and upgraded vehicles during the same restart
|
||||
|
||||
// Uncomment the lines below to change the default loadout
|
||||
//DefaultMagazines = ["HandRoadFlare","ItemBandage","ItemPainkiller","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"];
|
||||
//DefaultWeapons = ["Makarov_DZ","ItemFlashlight"];
|
||||
//DefaultBackpack = "GymBag_Camo_DZE1";
|
||||
//DefaultBackpackItems = []; // Can include both weapons and magazines i.e. ["PDW_DZ","30Rnd_9x19_UZI"];
|
||||
|
||||
//Server
|
||||
if (isServer) then {
|
||||
EpochEvents = [ //[year,month,day of month, minutes,name of file - .sqf] If minutes is set to -1, the event will run once immediately after server start.
|
||||
//["any","any","any","any",-1,"Infected_Camps"], // (negatively impacts FPS)
|
||||
["any","any","any","any",-1,"Care_Packages"],
|
||||
["any","any","any","any",-1,"CrashSites"]
|
||||
];
|
||||
|
||||
dayz_POIs = false; //Adds Point of Interest map additions (negatively impacts FPS)
|
||||
DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with
|
||||
DynamicVehicleDamageHigh = 100; // Max damage random vehicles can spawn with
|
||||
DynamicVehicleFuelLow = 0; // Min fuel random vehicles can spawn with
|
||||
DynamicVehicleFuelHigh = 100; // Max fuel random vehicles can spawn with
|
||||
MaxAmmoBoxes = 3; // Max number of random Supply_Crate_DZE filled with vehicle ammo to spawn around the map
|
||||
MaxMineVeins = 50; // Max number of random mine veins to spawn around the map
|
||||
DZE_TRADER_SPAWNMODE = false; // Vehicles purchased at traders will be parachuted in
|
||||
MaxDynamicDebris = 100; // Max number of random road blocks to spawn around the map
|
||||
MaxVehicleLimit = 50; // Max number of random vehicles to spawn around the map
|
||||
dayz_enableGhosting = false;
|
||||
dayz_ghostTimer = 120;
|
||||
|
||||
// ZSC
|
||||
Z_globalBankingTraders = true; // Enable banking NPCs at trader cities.
|
||||
|
||||
// Safe Zone Relocating
|
||||
DZE_SafeZone_Relocate = false; //Enables relocating of vehicles left in Safe Zones over a server restart.
|
||||
|
||||
if (DZE_Virtual_Garage) then {
|
||||
vg_clearAmmo = true; // Clear the ammo of vehicles spawned during the same restart they are stored? (stops users storing a vehicle for a free rearm)
|
||||
vg_sortColumn = 0; //0 or an out of range value sorts by the default column 'DisplayName', otherwise 1 = 'DateStored', 2 = 'id', 3 = 'Name' (of storing player), 4 = 'DateMaintained'
|
||||
};
|
||||
|
||||
// EVR Storms
|
||||
if (DZE_EVR) then {
|
||||
DZE_EVRFirstTime = [15, 60]; // Random time in minutes after server restart to begin the first EVR storm [min, max].
|
||||
DZE_EVRTimer = [45, 180]; // Random time in minutes between additional EVR storms [min, max].
|
||||
};
|
||||
};
|
||||
|
||||
// Client
|
||||
if (!isDedicated) then {
|
||||
dayz_antihack = 1; // DayZ Antihack / 1 = enabled // 0 = disabled
|
||||
dayZ_serverName = ""; //Shown to all players in the bottom left of the screen (country code + server number)
|
||||
dayz_enableRules = true; //Enables a nice little news/rules feed on player login (make sure to keep the lists quick).
|
||||
dayz_randomMaxFuelAmount = 500; //Puts a random amount of fuel in all fuel stations.
|
||||
dayz_bleedingeffect = 2; //1 = blood on the ground (negatively impacts FPS), 2 = partical effect, 3 = both
|
||||
DZE_R3F_WEIGHT = true; // Enable R3F weight. Players carrying too much will be overburdened and forced to move slowly.
|
||||
DZE_CombatTimer = 30; // Time how long a player is in combat after shooting or other combat actions
|
||||
|
||||
DZE_defaultSkin = [["Survivor2_DZ","Rocker1_DZ","Rocker2_DZ","Rocker3_DZ","Rocker4_DZ","Priest_DZ","Functionary1_EP1_DZ","Doctor_DZ","Assistant_DZ","Worker1_DZ","Worker3_DZ","Worker4_DZ","TK_CIV_Takistani01_EP1_DZ","TK_CIV_Takistani03_EP1_DZ","TK_CIV_Takistani04_EP1_DZ","TK_CIV_Takistani06_EP1_DZ","Firefighter1_DZ","Firefighter2_DZ","Firefighter3_DZ","Firefighter4_DZ","Firefighter5_DZ","Firefighter_Officer1_DZ","Firefighter_Officer2_DZ","Postman1_DZ","Postman2_DZ","Postman3_DZ","Postman4_DZ","SchoolTeacher_DZ","Gardener_DZ","RU_Policeman2_DZ","Hunter_DZ","Civilian1_DZ","Civilian3_DZ","Civilian5_DZ","Civilian7_DZ","Civilian9_DZ","Civilian11_DZ","Civilian13_DZ","Prisoner1_DZ","Prisoner2_DZ","Prisoner3_DZ","Reporter_DZ","MafiaBoss_DZ","Dealer_DZ","BusinessMan_DZ","Paramedic_DZ","Garbage_Man_DZ"],["SurvivorW2_DZ","SurvivorWcombat_DZ","SurvivorWdesert_DZ","SurvivorWurban_DZ","SurvivorWpink_DZ","SurvivorW3_DZ"]]; // Default player skin for fresh spawns, selected randomly DZE_defaultSkin = [["Male skin1","Male skin2"],["Female skin1","Female skin2"]], comment out the whole line to disable this feature.
|
||||
dayz_tameDogs = false; // Allow taming dogs with raw meat. Note dog behavior is experimental and buggy.
|
||||
DZE_WarmClothes = []; //Array of warm clothes, type of player model must be added: E.g. ["MVD_Soldier_DZ","GUE_Soldier_2_DZ"];
|
||||
DZE_TempVars = [7, 15, 4, 4, 2, 6, 8, 3, 2, 0.25, 0.75, 0.5, 12, 33]; //[vehicle, fire, building, moving, sun, heatpack, warm clothes, water, standing, rain, wind, night, snow, shivering] water, standing, rain, wind and night factors have a negative impact on temperature. The greater they are the quicker the player gets cold. To disable shivering set it to 26.
|
||||
DZE_TwoPrimaries = 2; // 0 do not allow primary weapon on back. 1 allow primary weapon on back, but not when holding a primary weapon in hand. 2 allow player to hold two primary weapons, one on back and one in their hands.
|
||||
dayz_quickSwitch = false; //Turns on forced animation for weapon switch. (hotkeys 1,2,3) False = enable animations, True = disable animations
|
||||
DZE_AntiWallLimit = 3; // Number of activations before player_antiWall kills player for glitching attempt. Lower is stricter, but may result in false positives.
|
||||
DZE_DamageBeforeMaint = 0.09; // Min damage built items must have before they can be maintained
|
||||
DZE_NameTags = 0; // Name displays when looking at player up close 0 = Off, 1= On, 2 = Player choice
|
||||
DZE_ForceNameTagsInTrader = false; // Force name display when looking at player up close in traders. Overrides player choice.
|
||||
DZE_HumanityTargetDistance = 25; // Distance to show name tags (red for bandit, blue for hero, green for friend)
|
||||
DZE_HeartBeat = false; // Enable heartbeat sound when looking at bandit (<= -3000 humanity) up close
|
||||
DZE_RestrictSkins = []; // Clothes that players are not allowed to wear. i.e. ["Skin_GUE_Soldier_CO_DZ","Skin_GUE_Soldier_2_DZ"] etc.
|
||||
DZE_VanillaUICombatIcon = true; //Display or hide combat UI icon if using DZE_UI = "vanilla"; otherwise it has no affect.
|
||||
timezoneswitch = 0; // Changes murderMenu times with this offset in hours.
|
||||
dayz_maxGlobalZeds = 500; // Maximum allowed zeds on the map
|
||||
dayz_paraSpawn = false; // Helo jump spawn
|
||||
DZE_enableBloodRegen = true; // player slowly regains blood if they are well fed and resting
|
||||
DZE_SelfTransfuse = true; // Allow players to give themselves blood transfusions
|
||||
DZE_selfTransfuse_Values = [12000,15,120]; // [blood amount, infection chance, cool-down (seconds)]
|
||||
dayz_DamageMultiplier = 1; // Increases the damage to the player by zombie attacks
|
||||
DZE_BackpackAntiTheft = true; // Prevents accessing backpack gear of non-friendly players in trader cities
|
||||
DZE_StaticConstructionCount = 0; // Number of animations required for building an object. Leaving set at zero will default to the construction count in the configs for each object.
|
||||
dayz_maxMaxWeaponHolders = 120; // Maximum number of loot piles that can spawn within 200 meters of a player.
|
||||
dayz_temperature_override = false; // Set to true to disable all temperature changes.
|
||||
dayz_nutritionValuesSystem = true; //true, Enables nutrition system, false, disables nutrition system.
|
||||
DZE_DisableVehicleUpgrade = []; // List of vehicles that cannot be upgraded with manuals E.g.: ["ArmoredSUV_PMC_DZE","LandRover_CZ_EP1_DZE"]
|
||||
DZE_debrisRefundParts = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"]; // Dynamic debris wrecks refund
|
||||
|
||||
// Build restrictions
|
||||
DZE_NoBuildNear = []; //Array of object class names that are blacklisted to build near. i.e ["Land_Mil_ControlTower","Land_SS_hangar"] etc.
|
||||
DZE_NoBuildNearDistance = 150; // Distance from blacklisted objects to disallow building near.
|
||||
DZE_BuildHeightLimit = 0; // 0 = No building height limit | >0 = Height limit in meters | Changing this to 30 would limit the maximum built height to 30 meters.
|
||||
DZE_HeightLimitColor = true; // display plot boundary helpers in red if they are above DZE_BuildHeightLimit
|
||||
DZE_requireplot = 1; // Players require a plot to build
|
||||
DZE_requirePlotOverride = []; // Add a list of classnames that require a plot pole to build. This will override the config settings. E.g. ["DomeTentStorage","VaultStorageLocked","VaultStorage2Locked","TallSafeLocked","LockboxStorageLocked","LockboxStorage2Locked","LockboxStorageWinterLocked","LockboxStorageWinter2Locked"];
|
||||
DZE_BuildOnRoads = false; // Allow building on roads
|
||||
DZE_BuildingLimit = 150; // Maximum allowed objects per plot
|
||||
DZE_RestrictedBuildingZones = []; // [["Balota Airfield", [5158.72, 2518.75, 0], 600]]; // [["description", [position], distance], ["description", [position], distance], ... ];
|
||||
DZE_BlacklistedBuildings = []; // [["Fire Station", "Land_a_stationhouse", 250]]; // [["description", "className", distance], ["description", "className", distance], ... ];
|
||||
DZE_buildOnWater = true; // Allow building in or over sea water. Note: Sea level will change between low tide and high tide and may cause base flooding. This does not affect inland ponds, dams or lakes.
|
||||
DZE_maxSeaLevel = 1.85; // ASL height (in meters) of high tide. Objects placed below this level over sea water will trigger a warning message about potential flooding during high tide. Low tide is 06:00 hrs, high tide is 12:00 hrs, but maps may vary.
|
||||
|
||||
DZE_salvageLocked = true; //Enable or disable salvaging of locked vehicles, useful for stopping griefing on locked vehicles.
|
||||
DZE_DisabledChannels = [(localize "str_channel_side"),(localize "str_channel_global"),(localize "str_channel_command")]; //List of disabled voice channels. Other channels are: "str_channel_group","str_channel_direct","str_channel_vehicle"
|
||||
DZE_NutritionDivisor = [1, 1, 1, 1]; //array of DIVISORS that regulate the rate of [calories, thirst, hunger, temperature] use when "working" (keep in mind that temperature raises with actions) - min values 0.1 - Larger values slow the effect, smaller values accelerate it
|
||||
DZE_ZombieSpeed = [0,0]; //Default agro speed is 6 per zombie config, set array elements 0 and 1 the same for non-variable speed, set to 0 to disable. array format = [min, max]; Ex: [2, 6]; results in a range of speed between 2 and 6 (2 is the old DZE_slowZombies hard-coded speed)
|
||||
DZE_ZombieHumanity = 5;
|
||||
DZE_lockablesHarderPenalty = true; // Enforce an exponential wait on attempts between unlocking a safe/lockbox from a failed code.
|
||||
DZE_Hide_Body = true; //Enable hide dead bodies. Hiding a dead body removes the corpse marker from the map too. Default = true
|
||||
DZE_PVE_Mode = false; //Disable the PvP damage on the server. If DZE_BackpackAntiTheft = true, the backpack anti theft is active on the whole server. This is just a basic support for PVE Servers. Default = false
|
||||
|
||||
// SafeZone
|
||||
DZE_SafeZoneNoBuildItems = []; // Array of object class names not allowed to be built near the zones in DZE_SafeZonePosArray (see mission\init.sqf). Can be nested arrays for custom distances. i.e ["VaultStorageLocked","LockboxStorageLocked",["Plastic_Pole_EP1_DZ",1300]] etc.
|
||||
DZE_SafeZoneNoBuildDistance = 150; // Distance from zones in DZE_SafeZonePosArray (see mission\init.sqf) to disallow building near.
|
||||
DZE_DeathScreen = true; // True=Use Epoch death screen (Trade city obituaries have been amended) False=Use DayZ death screen (You are dead)
|
||||
|
||||
// HALO Jump
|
||||
DZE_HaloAltitudeMeter = false; // Display altitude and speed on screen while in halo jump.
|
||||
DZE_HaloOpenChuteHeight = 180; // Automatically open chute at specified height. Set to -1 to disable this feature.
|
||||
DZE_HaloSpawnHeight = 2000; // This is the altitude fresh spawn players start at when HALO spawn is enabled.
|
||||
DZE_HaloJump = true; // Enable halo jumping out of air vehicles above 400m
|
||||
|
||||
// Trader Menu
|
||||
DZE_serverLogTrades = true; // Log trades to server RPT (sent with publicVariableServer on every trade)
|
||||
DZE_GemChance = 0.4; // Chance of gem occurrence in an Ore Vein, valid values from 0.01 - 1, 0.4 = 40% Chance
|
||||
DZE_GemOccurance = [["ItemTopaz",10], ["ItemObsidian",8], ["ItemSapphire",6], ["ItemAmethyst",4], ["ItemEmerald",3], ["ItemCitrine",2], ["ItemRuby",1]]; //Sets how rare each gem is in the order shown when mining (whole numbers only)
|
||||
DZE_GemWorthArray = [["ItemTopaz",15000], ["ItemObsidian",20000], ["ItemSapphire",25000], ["ItemAmethyst",30000], ["ItemEmerald",35000], ["ItemCitrine",40000], ["ItemRuby",45000]]; // Array of gem prices, only works with config traders. Set DZE_GemWorthArray=[]; to disable return change in gems.
|
||||
DZE_SaleRequiresKey = false; // Require the player has the key for a vehicle in order to sell it. The key can be in the player's toolbelt, backpack, or the vehicle's inventory.
|
||||
DZE_keepVehicleKey = false; // Keep the vehicle key when the vehicle is sold? (Useful on servers with the key changer mod)
|
||||
Z_AllowTakingMoneyFromBackpack = true; // Allow traders to take money from backpacks when buying with default currency.
|
||||
Z_AllowTakingMoneyFromVehicle = true; // Allow traders to take money from vehicles when buying with default currency.
|
||||
|
||||
// Plot Management and Plot for Life
|
||||
DZE_plotManagementMustBeClose = false; //Players must be within 10m of pole to be added as a plot friend.
|
||||
DZE_MaxPlotFriends = 10; //Max friends allowed on a plot. There is no character limit in the inventory field of the database, but lower values limit the max global setVariable size to improve performance.
|
||||
DZE_maintainCurrencyRate = 100; //The currency rate of what maintaining an item will be, for instance: at 100, 10 items will have a worth of 1000 (1 10oz gold or 1k coins) see actions/maintain_area.sqf for more examples.
|
||||
DZE_limitPlots = 0; // Limit the amount of plot poles per person, Use 0 to disable. UIDS in the DZE_PlotManagementAdmins array are exempt.
|
||||
DZE_PlotOzone = 10; // distance (in meters) outside the plot radius where the player may stand while building, provided the object remains within the plot radius.
|
||||
DZE_AxialHelper = true; // when building within a plot radius, display a perpendicular line of helpers from the highest point to lowest point of the plot boundary.
|
||||
DZE_plotGreenTransparency = 0.4; // green plot pole helper transparency. min = 0.1, max = 1
|
||||
DZE_plotRedTransparency = 0.7; // red plot pole helper transparency. min = 0.1, max = 1
|
||||
DZE_restrictRemoval = ["FuelPump_DZ","FireBarrel_DZ","CanvasHut_DZ","ParkBench_DZ","DeerStand_DZ","MetalGate_DZ","Fence_corrugated_DZ","StickFence_DZ","LightPole_DZ","Scaffolding_DZ","Hedgehog_DZ","MetalPanel_DZ","Fort_RazorWire","FortifiedWire_DZ","BarbedGate_DZ","WoodGate_DZ","Notebook_DZ","Water_Pump_DZ","Greenhouse_DZ","Bed_DZ","Table_DZ","Office_Chair_DZ","Garage_Green_DZ","Garage_White_DZ","Garage_Brown_DZ","Garage_Grey_DZ","CCTV_DZ","Boggle_DZE","Satellite_Dish_DZE","Fueltank_DZE","Watertank_DZE","Watertower_DZE","Compost_Barrel_Empty_DZE","Compost_Barrel_Full_DZE","Plant_Patch_Pumpkin_DZE","Plant_Patch_Sunflower_DZE","Plant_Patch_Carrot_DZE","Plant_Patch_Potato_DZE","Plant_Patch_Hemp_DZE","Plant_Patch_Tobacco_DZE","Plant_Patch_Tea_DZE","Plant_Patch_Garlic_DZE","Plant_Patch_Comfrey_DZE","Sandbag1_DZ","BagFenceRound_DZ"]; //Items that can be removed with a crowbar only with proper ownership or access. It is not necessary to add doors, storage or items that inherit from 'ModularItems' to this list. Items that inherit from 'BuiltItems' can be added to this list if desired.
|
||||
DZE_DisableUpgrade = []; //Array of buildables that are not allowed to be upgraded. For example: DZE_DisableUpgrade = ["WoodShack_DZ","StorageShed_DZ"];
|
||||
|
||||
// Snap Build and Build Vectors
|
||||
DZE_noRotate = ["ItemWoodLadder","woodfence_foundation_kit","metalfence_foundation_kit","cook_tripod_kit","metal_drawbridge_kit","metal_drawbridge_kit_locked","storage_crate_kit"]; // List of objects (magazine classnames) that cannot be rotated. Example: ["ItemVault","ItemTent","ItemDomeTent","ItemDesertTent"];
|
||||
DZE_vectorDegrees = [0.01, 0.1, 1, 5, 15, 45, 90]; // Degree positions players are able to rotate buildables with using the build vectors action menu.
|
||||
DZE_curDegree = 45; // Starting rotation angle. Prefer any value in the array above.
|
||||
DZE_snapDistance = 2; // maximum distance between two snapping points before snapping will occur. Default: 2 meters.
|
||||
DZE_snapAutoRefresh = true; // enable auto-refresh of snapping point helpers if player moves the current build object out of initial snapping range. Default: true.
|
||||
DZE_uiSnapText = true; // enable on-screen helper text near the closest snapping point when building. Default: true
|
||||
|
||||
// Remove/Deconstruct modular object variables
|
||||
DZE_refundModular = true; // enable/disable refunding of modular objects
|
||||
DZE_allowDeconstruct = true; // enable/disable the Deconstruct player action menu. If DZE_refundModular = false, this setting has no effect.
|
||||
DZE_displayHelpers = true; // enable/disable display of modular object helpers
|
||||
DZE_displayOnlyIfNearby = false; // if identical object types are nearby, display green helpers. If no identical types are nearby, then do not display. false = always display green helpers. (This setting does not apply to Red and Blue helpers). If DZE_displayHelpers is disabled, then this setting will be ignored.
|
||||
DZE_RefundDamageLimit = 0.25; // amount of damage an object can withstand before no refunded parts will be given. 0 = disable (will always refund)
|
||||
|
||||
// Refund single kits, or modular object recipes as per the build configs
|
||||
// [[Enable, Modular Object, Refund Kit, [[Refund Class 1, Qty], [Refund Class 2, Qty], [Refund Class 3, Qty], [Refund Class 4, Qty]]]]
|
||||
//
|
||||
// Enable: bool If DZE_refundModular = true, then set the Enable column to customize individual modular object refunds to on or off. Default = true.
|
||||
// Modular Object: class CfgVehicles class of the built object. The string must be in quotes.
|
||||
// Refund Kit: class CfgMagazines class of the refunded object when using the "Remove" action. Will refund a singular kit only.
|
||||
// Refund Class n: class When using the "Deconstruct" action, refund multiple parts as per the config recipe. Repeat for each material type, up to 4 types maximum.
|
||||
// Qty: integer Quantity of each material type, as per the recipe. Or alternatively a range of values using an array, e.g [1,3] will refund a random integer between 1 and 3.
|
||||
|
||||
DZE_modularConfig = [
|
||||
|
||||
// Enable Modular Object Refund Kit Refund Class 1 Qty Refund Class 2 Qty Refund Class 3 Qty Refund Class 4 Qty
|
||||
// ====== ============== =============================== =========================================== =========================== =========================== ===========================
|
||||
// // Glass //
|
||||
[true, "GlassFloor_DZ", "glass_floor_kit", [["glass_floor_half_kit", 2]]],
|
||||
[true, "GlassFloor_Half_DZ", "glass_floor_half_kit", [["glass_floor_quarter_kit", 2]]],
|
||||
[true, "GlassFloor_Quarter_DZ", "glass_floor_quarter_kit", [["ItemPole", 8], ["PartGlass", 4]]],
|
||||
|
||||
// // Metal //
|
||||
[true, "MetalFloor_DZ", "metal_floor_kit", [["metal_floor_half_kit", 2]]],
|
||||
[true, "MetalFloor_Half_DZ", "metal_floor_half_kit", [["metal_floor_quarter_kit", 2]]],
|
||||
[true, "MetalFloor_Quarter_DZ", "metal_floor_quarter_kit", [["ItemPole", 4], ["equip_metal_sheet", 4]]],
|
||||
[true, "MetalFloor4x_DZ", "metal_floor4x_kit", [["metal_floor_kit", 4]]],
|
||||
[true, "Metal_Drawbridge_DZ", "metal_drawbridge_kit", [["metal_floor_kit", 2], ["ItemRSJ", 6]]],
|
||||
[true, "MetalPillar_DZ", "metal_pillar_kit", [["ItemPole", 1], ["equip_metal_sheet", 2]]],
|
||||
[true, "DoorFrame_DZ", "door_frame_kit", [["ItemPole", 4], ["ItemTankTrap", 4], ["PartGeneric", 2]]],
|
||||
[true, "Door_DZ", "door_kit", [["door_frame_kit", 1], ["ItemTankTrap", 1], ["ItemPole", 1]]],
|
||||
[true, "MetalFence_1_foundation_DZ", "metalfence_foundation_kit", [["ItemStone", 8], ["MortarBucket", 1], ["ItemRSJ", 1]]],
|
||||
[true, "MetalFence_1_frame_DZ", "metalfence_frame_kit", [["ItemPlank", 4], ["ItemRSJ", 1]]],
|
||||
[true, "MetalFence_halfpanel_DZ", "metalfence_halfpanel_kit", [["ItemMetalSheet", 3], ["ItemScrews", 1]]],
|
||||
[true, "MetalFence_thirdpanel_DZ", "metalfence_thirdpanel_kit", [["ItemMetalSheet", 3], ["ItemScrews", 1]]],
|
||||
[true, "MetalFence_1_DZ", "metalfence_1_kit", [["ItemMetalSheet", 3], ["ItemScrews", 1]]],
|
||||
[true, "MetalFence_2_DZ", "metalfence_2_kit", [["ItemMetalSheet", 4], ["ItemScrews", 1], ["ItemRSJ", 2]]],
|
||||
[true, "MetalFence_3_DZ", "metalfence_3_kit", [["ItemMetalSheet", 4], ["ItemScrews", 1], ["ItemRSJ", 2]]],
|
||||
[true, "MetalFence_4_DZ", "metalfence_4_kit", [["ItemScrews", 1], ["ItemRSJ", 4]]],
|
||||
[true, "MetalFence_5_DZ", "metalfence_5_kit", [["ItemScrews", 1], ["ItemRSJ", 2]]],
|
||||
[true, "MetalFence_6_DZ", "metalfence_6_kit", [["ItemScrews", 1], ["ItemPole", 4], ["equip_metal_sheet", 4]]],
|
||||
[true, "MetalFence_7_DZ", "metalfence_7_kit", [["ItemScrews", 1], ["ItemPole", 6], ["PartGeneric", 2]]],
|
||||
[true, "MetalContainer1A_DZ", "metal_container_1a_kit", [["metal_floor_quarter_kit", 2], ["metal_floor_half_kit",4], ["ItemTankTrap", 2]]],
|
||||
[true, "MetalContainer1B_DZ", "metal_container_1b_kit", [["metal_floor_quarter_kit", 2], ["metal_floor_half_kit",4], ["ItemTankTrap", 2]]],
|
||||
[true, "MetalContainer1G_DZ", "metal_container_1g_kit", [["metal_floor_quarter_kit", 2], ["metal_floor_half_kit",4], ["ItemTankTrap", 2]]],
|
||||
[true, "MetalContainer2D_DZ", "metal_container_2d_kit", [["metal_container_1a_kit", 2]]],
|
||||
|
||||
// // Cinder //
|
||||
[true, "CinderWallHalf_DZ", "half_cinder_wall_kit", [["CinderBlocks", 3], ["MortarBucket", 1]]],
|
||||
[true, "CinderWallHalf_Gap_DZ", "half_cinder_wall_gap_kit", [["CinderBlocks", 3], ["MortarBucket", 1]]],
|
||||
[true, "CinderWall_DZ", "full_cinder_wall_kit", [["CinderBlocks", 7], ["MortarBucket", 2]]],
|
||||
[true, "CinderWallWindow_DZ", "cinderwall_window_kit", [["CinderBlocks", 5], ["MortarBucket", 1], ["ItemTankTrap", 1], ["ItemPole", 1]]],
|
||||
[true, "CinderWallSmallDoorway_DZ", "cinder_door_frame_kit", [["CinderBlocks", 4], ["MortarBucket", 1], ["ItemTankTrap", 1]]],
|
||||
[true, "CinderWallDoorSmall_DZ", "cinder_door_kit", [["cinder_door_frame_kit", 1], ["ItemTankTrap", 1], ["ItemPole", 1]]],
|
||||
[true, "CinderDoorHatch_DZ", "cinder_door_hatch_kit", [["CinderBlocks", 4], ["MortarBucket", 1], ["ItemTankTrap", 2], ["ItemPole", 1]]],
|
||||
[true, "CinderWallDoorway_DZ", "cinder_garage_frame_kit", [["CinderBlocks", 3], ["MortarBucket", 1], ["ItemTankTrap", 1]]],
|
||||
[true, "CinderWallDoor_DZ", "cinder_garage_kit", [["cinder_garage_frame_kit", 1], ["ItemTankTrap", 3], ["ItemPole", 3]]],
|
||||
[true, "CinderGarageOpenTopFrame_DZ", "cinder_garage_top_open_frame_kit", [["CinderBlocks", 4], ["MortarBucket", 1]]],
|
||||
[true, "CinderGarageOpenTop_DZ", "cinder_garage_top_open_kit", [["cinder_garage_top_open_frame_kit", 1], ["ItemTankTrap", 3], ["ItemPole", 3]]],
|
||||
[true, "CinderGateFrame_DZ", "cinder_gate_frame_kit", [["CinderBlocks", 8], ["MortarBucket", 4]]],
|
||||
[true, "CinderGate_DZ", "cinder_gate_kit", [["cinder_gate_frame_kit", 1], ["equip_metal_sheet", 6], ["ItemRSJ", 2], ["ItemScrews", 2]]],
|
||||
[true, "Concrete_Bunker_DZ", "cinder_bunker_kit", [["full_cinder_wall_kit", 3], ["ItemConcreteBlock", 5], ["equip_metal_sheet", 3], ["ItemScrews", 1]]],
|
||||
|
||||
// // Wood //
|
||||
[true, "WoodFloor_DZ", "ItemWoodFloor", [["ItemWoodFloorHalf", 2]]],
|
||||
[true, "WoodFloor4x_DZ", "ItemWoodFloor4x", [["ItemWoodFloor", 4]]],
|
||||
[true, "WoodFloorHalf_DZ", "ItemWoodFloorHalf", [["ItemWoodFloorQuarter", 2]]],
|
||||
[true, "WoodFloorQuarter_DZ", "ItemWoodFloorQuarter", [["PartWoodPlywood", 3], ["PartWoodLumber", 3]]],
|
||||
[true, "WoodSmallWall_DZ", "ItemWoodWall", [["ItemWoodWallThird", 3]]],
|
||||
[true, "WoodTriangleWall_DZ", "ItemTriangleWoodWall", [["ItemWoodFloorHalf", 1], ["ItemWoodFloorQuarter",1]]],
|
||||
[true, "WoodSmallWallThird_DZ", "ItemWoodWallThird", [["PartWoodPlywood", 3], ["PartWoodLumber", 3]]],
|
||||
[true, "WoodSmallWallWin_DZ", "ItemWoodWallWindow", [["ItemWoodWall", 1], ["PartGlass", 1]]],
|
||||
[true, "WoodSmallWallDoor_DZ", "ItemWoodWallDoor", [["ItemWoodWallThird", 3]]],
|
||||
[true, "Land_DZE_WoodDoor", "ItemWoodWallWithDoor", [["ItemWoodWallDoor", 1], ["PartWoodPlywood", 1], ["PartWoodLumber", 1]]],
|
||||
[true, "Land_DZE_GarageWoodDoor", "ItemWoodWallGarageDoor", [["ItemWoodWallLg", 1], ["PartWoodLumber", 2]]],
|
||||
[true, "Land_DZE_WoodOpenTopGarageDoor", "ItemWoodOpenTopGarageDoor", [["ItemWoodWallLg", 1], ["PartWoodLumber", 2]]],
|
||||
[true, "WoodLargeWall_DZ", "ItemWoodWallLg", [["ItemWoodWall", 1], ["PartWoodPlywood", 1], ["PartWoodLumber", 1]]],
|
||||
[true, "WoodLargeWallWin_DZ", "ItemWoodWallWindowLg", [["ItemWoodWallLg", 1], ["PartGlass", 1]]],
|
||||
[true, "WoodLargeWallDoor_DZ", "ItemWoodWallDoorLg", [["ItemWoodWall", 1], ["PartWoodPlywood", 1], ["PartWoodLumber", 1]]],
|
||||
[true, "Land_DZE_LargeWoodDoor", "ItemWoodWallWithDoorLg", [["ItemWoodWallDoorLg", 1], ["PartWoodPlywood", 1], ["PartWoodLumber", 1]]],
|
||||
[true, "WoodGateFrame_DZ", "ItemWoodGateFrame", [["ItemWoodWallThird", 6]]],
|
||||
[true, "Land_DZE_WoodGate", "ItemWoodGate", [["ItemWoodGateFrame", 1], ["PartWoodPlywood", 8], ["PartWoodLumber", 2], ["equip_nails", 1]]],
|
||||
[true, "WoodFloorStairs_DZ", "ItemWoodFloorStairs", [["ItemWoodFloor", 1], ["ItemWoodStairs", 1]]],
|
||||
[true, "WoodTriangleFloor_DZ", "ItemTriangleWoodFloor", [["ItemWoodFloorHalf", 1], ["ItemWoodFloorQuarter",1]]],
|
||||
[true, "WoodStairsSans_DZ", "ItemWoodStairs", [["PartWoodLumber", 8], ["equip_nails", 2]]],
|
||||
[true, "WoodStairs_DZ", "ItemWoodStairsSupport", [["ItemWoodStairs", 1], ["PartWoodLumber", 2]]],
|
||||
[true, "WoodStairsRails_DZ", "ItemWoodStairsRails", [["ItemWoodStairsSupport", 1], ["PartWoodLumber", 2]]],
|
||||
[true, "WoodLadder_DZ", "ItemWoodLadder", [["PartWoodLumber", 8], ["equip_nails", 2]]],
|
||||
[true, "WoodHandrail_DZ", "ItemWoodHandRail", [["PartWoodLumber", 3], ["equip_nails", 1]]],
|
||||
[true, "WoodPillar_DZ", "ItemWoodPillar", [["PartWoodLumber", 4], ["equip_nails", 1]]],
|
||||
[true, "WoodRamp_DZ", "wood_ramp_kit", [["ItemDocumentRamp", 1], ["PartWoodLumber", 8]]],
|
||||
[true, "WoodenFence_1_foundation_DZ", "woodfence_foundation_kit", [["ItemStone", 8], ["MortarBucket", 1], ["ItemPlank", 1]]],
|
||||
[true, "WoodenFence_1_frame_DZ", "woodfence_frame_kit", [["woodfence_foundation_kit", 1], ["ItemPlank", 4], ["equip_nails", 1]]],
|
||||
[true, "WoodenFence_quaterpanel_DZ", "woodfence_quaterpanel_kit", [["woodfence_frame_kit", 1], ["ItemPlank", 4], ["equip_nails", 1]]],
|
||||
[true, "WoodenFence_halfpanel_DZ", "woodfence_halfpanel_kit", [["woodfence_quaterpanel_kit", 1], ["ItemPlank", 4], ["equip_nails", 1]]],
|
||||
[true, "WoodenFence_thirdpanel_DZ", "woodfence_thirdpanel_kit", [["woodfence_halfpanel_kit", 1], ["ItemPlank", 4], ["equip_nails", 1]]],
|
||||
[true, "WoodenFence_1_DZ", "woodfence_1_kit", [["woodfence_thirdpanel_kit", 1], ["ItemPlank", 4], ["equip_nails", 1]]],
|
||||
[true, "WoodenFence_2_DZ", "woodfence_2_kit", [["woodfence_1_kit", 1], ["ItemPlank", 8], ["equip_nails", 2]]],
|
||||
[true, "WoodenFence_3_DZ", "woodfence_3_kit", [["woodfence_2_kit", 1], ["ItemPlank", 8], ["equip_nails", 2]]],
|
||||
[true, "WoodenFence_4_DZ", "woodfence_4_kit", [["woodfence_3_kit", 1], ["ItemPlank", 8], ["equip_nails", 2]]],
|
||||
[true, "WoodenFence_5_DZ", "woodfence_5_kit", [["woodfence_4_kit", 1], ["ItemLog", 5], ["equip_nails", 2]]],
|
||||
[true, "WoodenFence_6_DZ", "woodfence_6_kit", [["woodfence_5_kit", 1], ["PartWoodPlywood", 4], ["ItemPlank", 2], ["equip_nails", 2]]],
|
||||
[true, "WoodenFence_7_DZ", "woodfence_7_kit", [["woodfence_6_kit", 1], ["ItemWoodLadder", 1], ["equip_nails", 1]]],
|
||||
[true, "WoodenGate_foundation_DZ", "woodfence_gate_foundation_kit", [["ItemLog", 6]]],
|
||||
[true, "WoodenGate_1_DZ", "woodfence_gate_1_kit", [["woodfence_gate_foundation_kit", 1], ["ItemPlank", 8], ["equip_nails", 1], ["ItemComboLock", 1]]],
|
||||
[true, "WoodenGate_2_DZ", "woodfence_gate_2_kit", [["woodfence_gate_1_kit", 1], ["ItemPlank", 10], ["equip_nails", 1]]],
|
||||
[true, "WoodenGate_3_DZ", "woodfence_gate_3_kit", [["woodfence_gate_2_kit", 1], ["ItemPlank", 10], ["equip_nails", 1]]],
|
||||
[true, "WoodenGate_4_DZ", "woodfence_gate_4_kit", [["woodfence_gate_3_kit", 1], ["ItemPlank", 10], ["equip_nails", 1]]],
|
||||
[true, "WorkBench_DZ", "workbench_kit", [["PartWoodPlywood", 1], ["PartWoodLumber", 2]]],
|
||||
[true, "SimpleFootbridge_DZ", "simple_footbridge_kit", [["ItemPlank", 3]]],
|
||||
[true, "WoodenFootbridge_DZ", "wooden_footbridge_kit", [["ItemPlank", 3], ["PartWoodLumber", 2], ["equip_nails", 1]]],
|
||||
[true, "Windbreak_DZ", "windbreak_kit", [["equip_wood_pallet", 2], ["PartWoodLumber", 2], ["equip_nails", 1]]],
|
||||
|
||||
// // Fortifications //
|
||||
[true, "Land_HBarrier1_DZ", "ItemSandbagLarge", [["ItemSandbag", 3], ["ItemWire", 1], ["ItemTankTrap", 1]]],
|
||||
[true, "Land_HBarrier3_DZ", "ItemSandbagExLarge", [["ItemSandbagLarge", 3]]],
|
||||
[true, "Land_HBarrier5_DZ", "ItemSandbagExLarge5x", [["ItemSandbagExLarge", 1], ["ItemSandbagLarge", 2]]],
|
||||
[true, "Land_HBarrier5Curved_DZ", "ItemSandbagExLarge5xCurved", [["ItemSandbagExLarge", 1], ["ItemSandbagLarge", 2]]],
|
||||
[true, "HeavyBagFence_DZ", "ItemSandbagHeavy_kit", [["ItemSandbag", 2], ["PartWoodPile", 1]]],
|
||||
[true, "HeavyBagFenceCorner_DZ", "ItemSandBagHeavyCorner_kit", [["ItemSandbagHeavy_kit", 2]]],
|
||||
[true, "HeavyBagFenceRound_DZ", "ItemSandbagHeavyRound_kit", [["ItemSandbagHeavy_kit", 3]]],
|
||||
[true, "SandNest_DZ", "sandbag_nest_kit", [["ItemSandbag", 4], ["PartWoodPlywood", 2], ["PartWoodLumber", 4]]],
|
||||
[true, "SandNestLarge_DZ", "sandbag_nest_large_kit", [["ItemSandBagHeavyCorner_kit", 4], ["sandbag_nest_kit", 4]]],
|
||||
[true, "Land_WarfareBarrier5x_DZ", "ItemWarfareBarrier5x_kit", [["ItemSandbagLarge", 5]]],
|
||||
[true, "Land_WarfareBarrier10x_DZ", "ItemWarfareBarrier10x_kit", [["ItemWarfareBarrier5x_kit", 2]]],
|
||||
[true, "Land_WarfareBarrier10xTall_DZ", "ItemWarfareBarrier10xTall_kit", [["ItemWarfareBarrier10x_kit", 3]]],
|
||||
[true, "FortifiedWire_DZ", "fortified_wire_kit", [["ItemWire", 1], ["ItemTankTrap", 2]]],
|
||||
[true, "BarbedGate_DZ", "barbed_gate_kit", [["ItemWire", 1], ["ItemTankTrap", 2], ["ItemPole", 2]]],
|
||||
[true, "ConcreteBarrier_DZ", "concrete_barrier_kit", [["CementBag", 3], ["ItemStone", 2], ["ItemWire", 1]]],
|
||||
[true, "ConcreteBarrierStriped_DZ", "concrete_barrier_striped_kit", [["CementBag", 3], ["ItemStone", 2], ["ItemWire", 1]]],
|
||||
[true, "ConcreteWall_DZ", "concrete_wall_kit", [["concrete_barrier_kit", 5], ["CementBag", 2]]],
|
||||
[true, "ConcretePipe_DZ", "concrete_pipe_kit", [["concrete_barrier_kit", 6], ["CementBag", 2]]],
|
||||
[true, "DragonTeeth_DZ", "dragonteeth_kit", [["concrete_wall_kit", 1], ["ItemStone", 6], ["CementBag", 4]]],
|
||||
[true, "DragonTeethBig_DZ", "dragonteeth_big_kit", [["dragonteeth_kit", 1], ["ItemStone", 6], ["CementBag", 4]]]
|
||||
];
|
||||
|
||||
DZE_modularExclude = [];
|
||||
{
|
||||
if !(_x select 0) then {
|
||||
DZE_modularExclude = DZE_modularExclude + [_x select 1];
|
||||
};
|
||||
} count DZE_modularConfig;
|
||||
|
||||
// Door Management
|
||||
DZE_doorManagementMustBeClose = false; //Players must be within 10m of door to be added as a door friend.
|
||||
DZE_doorManagementAllowManualCode = true; //Allow unlocking doors by manually entering the combination. Setting false requires the use of eye scan for all doors.
|
||||
DZE_doorManagementMaxFriends = 10; //Max friends allowed on a door. There is no character limit in the inventory field of the database, but lower values limit the max global setVariable size to improve performance.
|
||||
DZE_doorManagementHarderPenalty = true; //Enforce an exponential wait on attempts between unlocking a door from a failed code.
|
||||
|
||||
// Group System
|
||||
dayz_markGroup = 1; // Players can see their group members on the map 0=never, 1=always, 2=With GPS only
|
||||
dayz_markSelf = 0; // Players can see their own position on the map 0=never, 1=always, 2=With GPS only
|
||||
dayz_markBody = 0; // Players can see their corpse position on the map 0=never, 1=always, 2=With GPS only
|
||||
dayz_requireRadio = false; // Require players to have a radio on their toolbelt to create a group, be in a group and receive invites.
|
||||
|
||||
// Humanity System
|
||||
DZE_Hero = 5000; // Defines the value at how much humanity the player is classed as a hero.
|
||||
DZE_Bandit = -5000; // Defines the value at how much humanity the player is classed as a bandit.
|
||||
|
||||
// ZSC
|
||||
if (Z_SingleCurrency) then {
|
||||
Z_showCurrencyUI = true; // Show the currency icon on the screen when Z_SingleCurrency is enabled.
|
||||
Z_showBankUI = true; // Show the banking icon on the screen when Z_globalBanking is enabled.
|
||||
ZSC_bankTraders = ["Functionary1_EP1"]; // Array of trader classnames that are available for banking (i.e Functionary1_EP1), do not use _DZ classes - they are used as player skins
|
||||
ZSC_limitOnBank = true; // Have a limit on the bank? (i.e true or false) limits the global banking to the number below.
|
||||
ZSC_bankObjects = [""]; // Array of objects that are available for banking i.e: ["Suitcase","Info_Board_EP1","Laptop_EP1","SatPhone"]
|
||||
ZSC_maxBankMoney = 500000; // Default limit for bank objects.
|
||||
ZSC_defaultStorageMultiplier = 200; // Default magazine count for bank objects that don't have storage slots i.e: ["Suitcase","Info_Board_EP1","Laptop_EP1","SatPhone"]
|
||||
ZSC_MaxMoneyInStorageMultiplier = 5000; // Multiplier for how much money a bank object can hold, example: 200 magazine slots in the object (or the default value above ^^) multiplied by the 5000 multiplier is 1 million coin storage. (200 * 5000 = 1,000,000 coins)
|
||||
ZSC_ZombieCoins = [false,[0,1000]]; // First value activate coins on zombies, second value from 0 - 1000 coins on each zombie. Coin for zombies are handled directly in check wallet.
|
||||
};
|
||||
|
||||
// Loot system
|
||||
dayz_toolBreaking = false; //Sledgehammer, crowbar and pickaxe have a chance to break when used.
|
||||
dayz_knifeDulling = false; // Enable knife dulling. Knives need to be sharpened after so many uses.
|
||||
dayz_matchboxCount = false; // Enable match stick count. After five uses matches run out and must be replaced.
|
||||
dayz_waterBottleBreaking = false; // Water bottles have a chance to break when boiling and require duct tape to fix
|
||||
DZE_bottleBreakChance = 0.10; // Water bottle break chance when boiling. Valid values from 0.01 - 1. 0.10 = 10% Chance
|
||||
DZE_toolBreakChance = 0.04; // Tool break chance when removing a building, valid values from 0.01 - 1, 0.04 = 4% Chance
|
||||
|
||||
// Bury and Butcher Bodies
|
||||
if (DZE_Bury_Body) then {
|
||||
DZE_Bury_Body_Value = 30;// Amount of humanity to gain for burying a body.
|
||||
DZE_BuryOnRoad = false; // Allow burying/butchering on roads?
|
||||
};
|
||||
if (DZE_Butcher_Body) then {
|
||||
DZE_Butcher_Body_Value = -30;// Amount of humanity to lose for butchering a body.
|
||||
DZE_BuryOnRoad = false; // Allow burying/butchering on roads?
|
||||
};
|
||||
|
||||
// Take Clothes
|
||||
DZE_Take_Clothes = false; // Allows to take the clothing from dead players and AIs
|
||||
DZE_Disable_Take_Clothes = []; // Enter the skins you do not want to be allowed to be recovered from dead bodies. E.g.: DZE_Disable_Take_Clothes = ["Doctor_DZ","Assistant_DZ","Worker1_DZ"];
|
||||
|
||||
/*
|
||||
DZE_CLICK_ACTIONS
|
||||
This is where you register your right-click actions
|
||||
FORMAT -- (no comma after last array entry)
|
||||
[_classname,_text,_execute,_condition],
|
||||
PARAMETERS
|
||||
_classname : the name of the class to click on (example = "ItemBloodbag")
|
||||
_text : the text for the option that is displayed when right clicking on the item (example = "Self Transfuse")
|
||||
_execute : compiled code to execute when the option is selected (example = "execVM 'my\scripts\self_transfuse.sqf';")
|
||||
_condition : compiled code evaluated to determine whether or not the option is displayed (example = {true})
|
||||
*/
|
||||
|
||||
DZE_CLICK_ACTIONS = [
|
||||
/* ["ItemGPS",localize "STR_CL_CA_SCAN_NEARBY","if(isNil 'CA_GPS_RANGE') then {CA_GPS_RANGE = 1500;};CA_ZOMBIE_COUNT = count ((position player) nearEntities ['zZombie_Base',CA_GPS_RANGE]); CA_MAN_COUNT = count ((position player) nearEntities ['CAManBase',CA_GPS_RANGE]); format[localize 'STR_CL_CA_SCAN',CA_GPS_RANGE,CA_MAN_COUNT - CA_ZOMBIE_COUNT,count ((position player) nearEntities ['zZombie_Base',CA_GPS_RANGE]),count ((position player) nearEntities ['allVehicles',CA_GPS_RANGE]) - CA_MAN_COUNT] call dayz_rollingMessages;","true"],
|
||||
["ItemGPS",localize "STR_CL_CA_RANGE_UP","if(isNil 'CA_GPS_RANGE') then {CA_GPS_RANGE = 1500;};CA_GPS_RANGE = (CA_GPS_RANGE + 100) min 2500; format[localize 'STR_CL_CA_RANGE_GPS',CA_GPS_RANGE] call dayz_rollingMessages;","true"],
|
||||
["ItemGPS",localize "STR_CL_CA_RANGE_DOWN","if(isNil 'CA_GPS_RANGE') then {CA_GPS_RANGE = 1500;};CA_GPS_RANGE = (CA_GPS_RANGE - 100) max 1000; format[localize 'STR_CL_CA_RANGE_GPS',CA_GPS_RANGE] call dayz_rollingMessages;","true"]
|
||||
*/
|
||||
];
|
||||
|
||||
DZE_Remote_Vehicle = false; // Enable/Disable the Remote Vehicle options like ejecting players from a vehicle or lock/unlock the vehicle from the distance just by the key.
|
||||
|
||||
if (DZE_Remote_Vehicle) then {
|
||||
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [
|
||||
["ItemKey",localize "STR_CL_RV_CA_EJECT","spawn remoteVehicle;","true",1],
|
||||
["ItemKey",localize "STR_CL_RV_CA_ENGINE","spawn remoteVehicle;","true",2],
|
||||
["ItemKey",localize "STR_CL_RV_CA_UNLOCK","spawn remoteVehicle;","true",3],
|
||||
["ItemKey",localize "STR_CL_RV_CA_LOCK","spawn remoteVehicle;","true",4],
|
||||
["ItemKey",localize "STR_CL_RV_CA_LIGHTS","spawn remoteVehicle;","true",5]
|
||||
];
|
||||
};
|
||||
|
||||
DZE_LocateVehicle = false; // Enable/Disable the option to locate a vehicle from a key in the inventory with a rightclick on the GPS.
|
||||
|
||||
if (DZE_LocateVehicle) then {
|
||||
DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [
|
||||
["ItemGPS",localize "STR_CL_LV_LOCATE_VEHICLES","[] spawn locateVehicle;","true"]
|
||||
];
|
||||
};
|
||||
|
||||
if (DZE_VehicleKey_Changer) then {
|
||||
vkc_claimPrice = 1000; // Amount in worth for claiming a vehicle. See the top of this script for an explanation.
|
||||
vkc_changePrice = 5000; // Amount in worth for changing the key for a vehicle. See the top of this script for an explanation.
|
||||
};
|
||||
|
||||
if (DZE_Virtual_Garage) then {
|
||||
vg_list = ["Plastic_Pole_EP1_DZ"]; // List of objects/traders that are allowed to interact with virtual garage. i.e: ["Plastic_Pole_EP1_DZ","Worker2"];
|
||||
vg_blackListed = []; // Array of vehicle config classes as well as vehicle classnames that are blacklisted from being stored, i.e ["All","Land","Air","Ship","StaticWeapon","AH1Z","MTVR"]
|
||||
vg_heliPads = ["Helipad_Civil_DZ","Helipad_Rescue_DZ","Helipad_Army_DZ","Helipad_Cross_DZ","Helipad_ParkBorder_DZ"]; // Array of heli pad classnames
|
||||
vg_store_keyless_vehicles = false; // Allow storing of keyless vehicle (map or mission spawned)
|
||||
vg_removeKey = true; // Remove the key from the players inventory after storing vehicle?
|
||||
vg_requireKey = true; // Require the player to have the key when storing a locked vehicle.
|
||||
vg_storeWithGear = true; // Allow storing vehicles with gear?
|
||||
vg_tiedToPole = true; // Tie the virtual garage to a local plot pole? If no plot pole is present (i.e a communal garage at a trader etc) the players UID will be used.
|
||||
vg_pricePer = 100; // Price in worth to store a vehicle per gear item, use 0 if you want it to be free.
|
||||
vg_maintainCost = 10000; //cost is 1000 per 10oz gold, gem cost is as defined in DZE_GemWorthArray; if you use ZSC then this is an amount of coins. This is a flate rate for all vehicles in the garage/per player depending on vg_tiedToPole
|
||||
vg_price = [["Land",500],["Air",500],["Ship",500]];
|
||||
/*
|
||||
vg_price can be an array of vehicle config classes as well as vehicle classnames, you need to put these in order of what you prefer to get checked first.
|
||||
Price is in worth for briefcases or coins for gold based servers (10,000 worth is considered 1 briefcase, 100,000 coins is considered 1 briefcase)
|
||||
|
||||
i.e:
|
||||
vg_price = [["Land",500],["Air",300],["Ship",100]];
|
||||
vg_price = [["350z_red",200],["Land",500],["AH1Z",1000],["Air",300],["Ship",100]];
|
||||
*/
|
||||
vg_limit = [["Land",5],["Air",5],["Ship",5]];
|
||||
/*
|
||||
vg_limit can be an array of vehicle config classes and classnames to narrow down what players can store or it can be a numerical value for a total limit.
|
||||
These can be classnames as well as config classnames, you need to put these in order of what you prefer to get checked first.
|
||||
|
||||
i.e:
|
||||
vg_limit = [["Land",5],["Air",3],["Ship",1]];
|
||||
vg_limit = [["350z_red",2],["Land",5],["AH1Z",1],["Air",3],["Ship",1]];
|
||||
vg_limit = 5;
|
||||
*/
|
||||
};
|
||||
|
||||
// Bloodsuckers
|
||||
if (DZE_Bloodsuckers) then {
|
||||
DZE_BloodsuckerChance = .15; // Chance that a building will spawn a bloodsucker. Default .15 (15%)
|
||||
DZE_BloodsuckerBuildings = ["Land_Hlidac_budka","Land_Mil_Guardhouse","Land_Mil_Barracks","Land_Mil_House","Land_Mil_Barracks_i","CrashSite_RU","CrashSite_US","CrashSite_EU","CrashSite_UN"]; // Bloodsuckers will spawn near these building classes.
|
||||
DZE_BloodsuckersMaxGlobal = 15; // Maximum number of bloodsuckers allowed on the map at one time.
|
||||
DZE_BloodsuckersMaxNear = 3; // Maximum number of bloodsuckers allowed in any 200 meter area.
|
||||
DZE_BloodsuckersMaxLocal = 2; // Maximum number of bloodsuckers that can spawn per client.
|
||||
DZE_BloodsuckerScreenEffect = true; // On screen slash marks when the bloodsuckers attack.
|
||||
DZE_BloodsuckerDeleteNearTrader = true; // Deletes bloodsuckers when near trader cities.
|
||||
DZE_MutantHeartProtect = true; // Disables targeting and attack if the player has a mutant heart in inventory.
|
||||
DZE_MutantHumanity = 20;
|
||||
};
|
||||
|
||||
// EVR Storms
|
||||
if (DZE_EVR) then {
|
||||
DZE_EVRWhiteFlash = true; // Turns On/Off the white flash within the EVR Storm, this is an important option for players who suffers from epilepsy.
|
||||
DZE_EVRHandleVehicles = true; // Enable/Disable that vehicles getting effected by the EVR Storm, the EVR Storm turns off the vehicle engine if enabled.
|
||||
DZE_EVRProtectInside = true; // Skips the unconscious animation, pain and blood loss when the player is inside a building.
|
||||
DZE_EVRDamageItemsChance = .20; // Chance that an EVR storm will damage items in inventory. From 0 to 1. Chance applies to each item. Set to 0 to disable.
|
||||
DZE_EVRDamageItems = [["Binocular_Vector","Binocular_VectorBroken"],["NVGoggles_DZE","ItemNVGFullBroken_DZE"],["NVGoggles","ItemNVGBroken_DZE"],["ItemGPS","ItemGPSBroken_DZE"],["ItemRadio","ItemRadioBroken_DZE"],["Smartphone_DZE","SmartphoneBroken_DZE"]]; // [item (input), damaged item (output)]. Items that have a chance to be damaged by EMP.
|
||||
DZE_EVRBloodLoss = [4000,8000]; // Random number of blood loss if a player does not have an APSI and/or is not inside a building [min, max]. Player will not die, there is a minimum of 1000 after the calculation
|
||||
};
|
||||
|
||||
// Garage Door Opener
|
||||
DZE_GarageDoor_Opener = false; // Enables the option to open Garage Doors from the inside of a vehicle.
|
||||
|
||||
if (DZE_GarageDoor_Opener) then {
|
||||
DZE_GarageDoors = ["CinderWallDoorLocked_DZ","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","WoodenGate_1_DZ","WoodenGate_2_DZ","WoodenGate_3_DZ","WoodenGate_4_DZ","Land_DZE_WoodGateLocked","CinderGateLocked_DZ","Land_DZE_WoodOpenTopGarageLocked","CinderGarageOpenTopLocked_DZ"]; // Array of Garage Doors that can be opened.
|
||||
DZE_GarageDoor_Radius = 30; // Radius from where the Garage Doors can be opened. Higher values may negatively impact the performance
|
||||
};
|
||||
|
||||
// Service Points for Refuel, Repair and Rearm
|
||||
DZE_Service_Points = false;
|
||||
|
||||
if (DZE_Service_Points) then {
|
||||
// Valid vehicle config classes as an example: "Air", "AllVehicles", "All", "APC", "Bicycle", "Car", "Helicopter", "Land", "Motorcycle", "Plane", "Ship", "Tank"
|
||||
DZE_SP_Classes = ["Map_A_FuelStation_Feed","Land_A_FuelStation_Feed","FuelPump_DZ"]; // service point classes, You can also use dayz_fuelpumparray by its self for all the default fuel pumps.
|
||||
DZE_SP_MaxDistance = 50; // maximum distance from a service point for the options to be shown
|
||||
|
||||
// Refuel Settings
|
||||
DZE_SP_Refuel_Enable = true; // enable or disable the refuel option
|
||||
if (DZE_SP_Refuel_Enable) then {
|
||||
DZE_SP_Refuel_Costs = [
|
||||
//["Ship",localize "str_temp_param_disabled"], // All vehicles are disabled to refuel.
|
||||
["Land",localize "strwffree"], // All vehicles are free to refuel.
|
||||
["Air",1000] //1000 worth is 1 10oz gold for all air vehicles
|
||||
];
|
||||
DZE_SP_Refuel_UpdateInterval = 1; // update interval (in seconds)
|
||||
DZE_SP_Refuel_Amount = 0.05; // amount of fuel to add with every update (in percent)
|
||||
};
|
||||
|
||||
|
||||
// Repair Settings
|
||||
DZE_SP_Repair_Enable = true; // enable or disable the repair option
|
||||
if (DZE_SP_Repair_Enable) then {
|
||||
DZE_SP_Repair_RepairTime = 2; // time needed to repair each damaged part (in seconds)
|
||||
DZE_SP_Repair_Costs = [
|
||||
["Air",4000], // 4000 worth is 4 10oz gold.
|
||||
["AllVehicles",2000] // 2000 worth is 2 10oz gold for all other vehicles
|
||||
];
|
||||
};
|
||||
|
||||
// Rearm Settings
|
||||
DZE_SP_Rearm_Enable = true; // enable or disable the rearm option
|
||||
if (DZE_SP_Rearm_Enable) then {
|
||||
DZE_SP_Rearm_Defaultcost = 10000; // Default cost to rearm a weapon. (10000 worth == 1 briefcase)
|
||||
DZE_SP_Rearm_MagazineCount = 2; // amount of magazines to be added to the vehicle weapon
|
||||
DZE_SP_Rearm_Ignore = [(localize "str_dn_horn"),(localize "str_dn_laser_designator")]; // Array of weapon display names that are ignored in the rearm listing.
|
||||
/*
|
||||
DZE_SP_Rearm_Costs is an array based on the AMMO type. I.e M240, MK19, PKM, PKT, M134 etc.
|
||||
You can disable certain ammo types from being able to be rearmed by making the price disabled text
|
||||
example: ["M134",localize "str_temp_param_disabled"]
|
||||
*/
|
||||
DZE_SP_Rearm_Costs = [
|
||||
[(localize "str_mn_40rnd_grad"),localize "str_temp_param_disabled"], // BM-21 Grad is disabled (ammo is broken)
|
||||
[(localize "str_dn_flarelauncher"),2000], // Flares
|
||||
[(localize "str_ep1_dn_smokelauncher"),2000], // Smokes
|
||||
[(localize "str_dn_pk"),5000], // PKM
|
||||
[(localize "str_dn_pkt"),5000], // PKT
|
||||
[(localize "str_sn_m134"),5000], // M134
|
||||
[(localize "str_dn_ags30"),5000], // AGS-30
|
||||
[(localize "str_dn_dshkm"),5000], // DSHKM
|
||||
[(localize "str_DN_VIKHR_CCP"),5000], // Vikhr 9A4172
|
||||
[(localize "str_baf_baf_l94a10"),5000], // L94A1 Chain Gun
|
||||
[(localize "str_baf_crv70"),5000], // CRV7
|
||||
[(localize "str_baf_ctws0"),5000], // CTWS
|
||||
[(localize "str_baf_m621_manual0"),5000], // M621
|
||||
[(localize "str_dn_2a38m"),5000], // 2A38M Gun
|
||||
[(localize "str_dn_2a42"),5000], // 2A42
|
||||
[(localize "str_dn_2a46m"),5000], // 2A46M Cannon
|
||||
[(localize "str_dn_2a46m_rocket"),5000], // 9M119M Refleks rocket
|
||||
[(localize "str_dn_2a70"),5000], // 2A70 100mm
|
||||
[(localize "str_dn_2a70_rocket"),5000], // 9M117M1 Arkan
|
||||
[(localize "str_dn_2a72"),5000], // 2A72 30mm
|
||||
[(localize "str_dn_80mmlauncher_burst"),5000], // S-8
|
||||
[(localize "str_dn_9m311laucher"),5000], // Tunguska 9M311
|
||||
[(localize "str_dn_ags17"),5000], // AGS-17
|
||||
[(localize "str_dn_d81"),5000], // D-81
|
||||
[(localize "str_dn_dt_veh"),5000], // DT
|
||||
[(localize "str_dn_hellfire"),5000], // AGM-114 Hellfire
|
||||
[(localize "str_dn_kord"),5000], // KORD
|
||||
[(localize "str_dn_m197"),5000], // M197
|
||||
[(localize "str_dn_m240"),5000], // M240
|
||||
[(localize "str_dn_m242"),5000], // M242
|
||||
[(localize "str_dn_m256"),5000], // M256
|
||||
[(localize "str_dn_sidewinderlaucher"),5000], // AIM-9L Sidewinder
|
||||
[(localize "str_dn_zis_s_53"),5000], // ZiS-S-53
|
||||
[(localize "str_ep1_dn_57mmlauncher"),5000], // S-5
|
||||
[(localize "str_ep1_dn_azp85"),5000], // AZP-23
|
||||
[(localize "str_ep1_dn_ffarlauncher"),5000], // Hydra
|
||||
[(localize "str_ep1_dn_m2"),5000], // M2 Machinegun
|
||||
[(localize "str_ep1_dn_m230"),5000], // M230
|
||||
[(localize "str_ep1_dn_m32_ep1"),5000], // M32
|
||||
[(localize "str_ep1_dn_mk19"),5000], // Mk19
|
||||
[(localize "str_ep1_dn_yakb"),5000], // Yak-B
|
||||
[(localize "str_mn_at2_mi24d"),5000], // Falanga 3M11
|
||||
[(localize "str_mn_at5_bmp2"),5000], // Konkurs 9M113
|
||||
[(localize "str_mn_stinger"),5000], // FIM-92F Stinger
|
||||
[(localize "str_mn_12rnd_mlrs"),5000], // MLRS
|
||||
[(localize "str_baf_baf_l2a10"),5000], // L111A1
|
||||
[(localize "STR_DN_D10_CCP"),5000], // D-10
|
||||
[(localize "str_dn_tow"),5000], // M220 TOW
|
||||
[(localize "str_dn_zu23"),5000], // ZU-23
|
||||
[(localize "str_dn_kpvt"),5000], // KPVT
|
||||
[(localize "str_dn_m3p"),5000], // M3P
|
||||
[(localize "str_dn_spg9"),5000], // SPG-9
|
||||
[(localize "str_dn_gau8"),5000], // GAU-8
|
||||
[(localize "str_dn_maverick"),5000], // AGM-65 Maverick
|
||||
[(localize "str_dn_gbu12"),5000], // GBU-12
|
||||
[(localize "str_dn_gau12"),5000], // GAU-12
|
||||
[(localize "STR_DN_KH29_CCP"),5000], // Kh-29L
|
||||
[(localize "str_dn_r73"),5000], // R-73
|
||||
[(localize "str_mn_fab250"),5000], // FAB-250
|
||||
[(localize "str_dn_gsh301"),5000], // GSh-301
|
||||
[(localize "str_mn_23mm_gsh23l"),5000], // GSh-23L
|
||||
[(localize "str_sn_grenade"),5000], // Grenade
|
||||
[(localize "str_mn_at9_mi24p"),5000], // Ataka-V 9M120
|
||||
[(localize "str_mn_at6_mi24v"),5000], // Shturm 9K114
|
||||
|
||||
["SGMT",5000], // SGMT no localization available
|
||||
["M68",5000], // M68 no localization available
|
||||
["GAU-22",5000], // GAU-22 no localization available
|
||||
["GSh-30",5000], // GSh-30 no localization available
|
||||
["M60",5000], // M60 no localization available
|
||||
["GSh-30K",5000] // GSh-30K no localization available
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
379
MPMissions/DayZ_Epoch_24.Napf/custom/fn_halo.sqf
Normal file
379
MPMissions/DayZ_Epoch_24.Napf/custom/fn_halo.sqf
Normal file
@ -0,0 +1,379 @@
|
||||
scriptName "modules_e\Functions\objects\fn_HALO.sqf";
|
||||
uiSleep 0.01;
|
||||
|
||||
//--- HALO -------------------------------------------------------------------------------------------------------------------------------------
|
||||
if (typename _this == typename objnull) then {
|
||||
|
||||
_unit = _this;
|
||||
|
||||
//--- Eject!
|
||||
waituntil {(vehicle _unit) iskindof "ParachuteBase" || !isnil {_unit getvariable "bis_fnc_halo_now"}};
|
||||
if (!local _unit) exitwith {};
|
||||
|
||||
//--- Delete parachute
|
||||
_parachute = vehicle _unit;
|
||||
if (_parachute != _unit) then {
|
||||
deletevehicle _parachute;
|
||||
};
|
||||
|
||||
//--- Init
|
||||
_dir = ([[0,0,0],velocity _unit] call bis_fnc_dirto);
|
||||
_unit setdir _dir;
|
||||
[objNull, player, rSwitchMove,"HaloFreeFall_non"] call RE;
|
||||
player switchmove "HaloFreeFall_non";
|
||||
|
||||
//--- Key controls
|
||||
if (_unit == player) then {
|
||||
//--- PLAYER ------------------------------------------------
|
||||
|
||||
_brightness = 0.99;
|
||||
_pos = [player] call FNC_GetPos;
|
||||
_parray = [
|
||||
/* 00 */ ["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 13, 0],
|
||||
/* 01 */ "",
|
||||
/* 02 */ "Billboard",
|
||||
/* 03 */ 1,
|
||||
/* 04 */ 3,
|
||||
/* 05 */ [0,0,-200],
|
||||
/* 06 */ wind,
|
||||
/* 07 */ 0,
|
||||
/* 08 */ 1.275,
|
||||
/* 09 */ 1,
|
||||
/* 10 */ 0,
|
||||
/* 11 */ [100],
|
||||
/* 12 */ [
|
||||
[_brightness,_brightness,_brightness,0],
|
||||
[_brightness,_brightness,_brightness,0.01],
|
||||
[_brightness,_brightness,_brightness,0.10],
|
||||
[_brightness,_brightness,_brightness,0]
|
||||
],
|
||||
/* 13 */ [1000],
|
||||
/* 14 */ 0,
|
||||
/* 15 */ 0,
|
||||
/* 16 */ "",
|
||||
/* 17 */ "",
|
||||
/* 18 */ player
|
||||
];
|
||||
bis_fnc_halo_clouds = "#particlesource" createVehicleLocal _pos;
|
||||
bis_fnc_halo_clouds setParticleParams _parray;
|
||||
bis_fnc_halo_clouds setParticleRandom [0, [100, 100, 0], [0, 0, 0], 0, 0, [0, 0, 0, 0], 0, 1];
|
||||
bis_fnc_halo_clouds setParticleCircle [00, [00, 00, 00]];
|
||||
bis_fnc_halo_clouds setDropInterval (0.4 - (0.3 * overcast));
|
||||
|
||||
|
||||
//--- Effects
|
||||
bis_fnc_halo_ppRadialBlur = ppeffectcreate ["RadialBlur",464];
|
||||
bis_fnc_halo_ppRadialBlur ppEffectAdjust [0.01,0.01,0.3,0.3];
|
||||
bis_fnc_halo_ppRadialBlur ppEffectCommit 0.01;
|
||||
bis_fnc_halo_ppRadialBlur ppEffectEnable true ;
|
||||
bis_fnc_halo_soundLoop = time;
|
||||
playsound "BIS_HALO_Flapping";
|
||||
|
||||
bis_fnc_halo_action = _unit addaction [localize "STR_HALO_OPEN_CHUTE", "custom\fn_halo.sqf",[],1,true,true,"Eject"];
|
||||
|
||||
bis_fnc_halo_keydown = {
|
||||
_key = _this select 1;
|
||||
|
||||
//--- Forward
|
||||
//if (_key in (actionkeys 'HeliForward')) then {
|
||||
if (_key in (actionkeys 'MoveForward')) then {
|
||||
if (bis_fnc_halo_vel < +bis_fnc_halo_velLimit) then {bis_fnc_halo_vel = bis_fnc_halo_vel + bis_fnc_halo_velAdd};
|
||||
};
|
||||
|
||||
//--- Backward
|
||||
//if (_key in (actionkeys 'HeliBack')) then {
|
||||
if (_key in (actionkeys 'MoveBack')) then {
|
||||
if (bis_fnc_halo_vel > -bis_fnc_halo_velLimit) then {bis_fnc_halo_vel = bis_fnc_halo_vel - bis_fnc_halo_velAdd};
|
||||
};
|
||||
|
||||
//--- Left
|
||||
//if (_key in (actionkeys 'HeliCyclicLeft')) then {
|
||||
if (_key in (actionkeys 'TurnLeft')) then {
|
||||
if (bis_fnc_halo_dir > -bis_fnc_halo_dirLimit) then {bis_fnc_halo_dir = bis_fnc_halo_dir - bis_fnc_halo_dirAdd};
|
||||
};
|
||||
|
||||
//--- Right
|
||||
//if (_key in (actionkeys 'HeliCyclicRight')) then {
|
||||
if (_key in (actionkeys 'TurnRight')) then {
|
||||
if (bis_fnc_halo_dir < +bis_fnc_halo_dirLimit) then {bis_fnc_halo_dir = bis_fnc_halo_dir + bis_fnc_halo_dirAdd};
|
||||
};
|
||||
};
|
||||
bis_fnc_halo_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_keydown;"];
|
||||
|
||||
//--- Loop
|
||||
bis_fnc_halo_vel = 0;
|
||||
bis_fnc_halo_velLimit = 0.2;
|
||||
bis_fnc_halo_velAdd = 0.03;
|
||||
bis_fnc_halo_dir = 0;
|
||||
bis_fnc_halo_dirLimit = 1;
|
||||
bis_fnc_halo_dirAdd = 0.06;
|
||||
|
||||
[] spawn {
|
||||
_time = time - 0.1;
|
||||
while {alive player && vehicle player == player && isnil {player getvariable "bis_fnc_halo_terminate"} && (([player] call FNC_GetPos) select 2) > DZE_HaloOpenChuteHeight} do {
|
||||
|
||||
//--- FPS counter
|
||||
_fpsCoef = ((time - _time) * 60) / acctime; //Script is optimized for 60 FPS
|
||||
_time = time;
|
||||
|
||||
bis_fnc_halo_velLimit = 0.2 * _fpsCoef;
|
||||
bis_fnc_halo_velAdd = 0.03 * _fpsCoef;
|
||||
bis_fnc_halo_dirLimit = 1 * _fpsCoef;
|
||||
bis_fnc_halo_dirAdd = 0.06 * _fpsCoef;
|
||||
|
||||
//--- Dir
|
||||
bis_fnc_halo_dir = bis_fnc_halo_dir * 0.98;
|
||||
_dir = direction player + bis_fnc_halo_dir;
|
||||
player setdir _dir;
|
||||
|
||||
//--- Velocity
|
||||
_vel = velocity player;
|
||||
bis_fnc_halo_vel = bis_fnc_halo_vel * 0.96;
|
||||
player setvelocity [
|
||||
(_vel select 0) + (sin _dir * bis_fnc_halo_vel),
|
||||
(_vel select 1) + (cos _dir * bis_fnc_halo_vel),
|
||||
(_vel select 2)
|
||||
];
|
||||
|
||||
//--- Animation system
|
||||
_anim = "HaloFreeFall_non";
|
||||
_v = bis_fnc_halo_vel;
|
||||
_h = bis_fnc_halo_dir;
|
||||
|
||||
_vLimit = 0.1;
|
||||
_hLimit = 0.3;
|
||||
if ((abs _v) > _vLimit || (abs _h) > _hLimit) then {
|
||||
_vAnim = "";
|
||||
if (_v > +_vLimit) then {_vAnim = "F"};
|
||||
if (_v < -_vLimit) then {_vAnim = "B"};
|
||||
_hAnim = "";
|
||||
if (_h > +_hLimit) then {_hAnim = "R"};
|
||||
if (_h < -_hLimit) then {_hAnim = "L"};
|
||||
_anim = "HaloFreeFall_" + _vAnim + _hAnim;
|
||||
};
|
||||
|
||||
player playmovenow _anim;
|
||||
|
||||
//--- Sound
|
||||
if ((time - bis_fnc_halo_soundLoop) > 4.5) then {
|
||||
playsound "BIS_HALO_Flapping";
|
||||
bis_fnc_halo_soundLoop = time;
|
||||
};
|
||||
|
||||
//--- Effects
|
||||
/*
|
||||
bis_fnc_halo_ppRadialBlur ppEffectAdjust [0.02,0.02,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef,0.3 - (bis_fnc_halo_vel/7)/_fpsCoef];
|
||||
bis_fnc_halo_ppRadialBlur ppEffectCommit 0.01;
|
||||
*/
|
||||
if (DZE_HaloAltitudeMeter && !isNil "Dayz_loginCompleted") then {
|
||||
titleText [
|
||||
format [
|
||||
localize "str_halo_altitude_speed",
|
||||
str(round(([player] call FNC_GetPos) select 2)) + " m",
|
||||
str(abs(round(speed(vehicle player)))) + " " + localize "str_lib_info_unit_kilometers_per_hour"
|
||||
],"PLAIN DOWN",0.01
|
||||
];
|
||||
};
|
||||
|
||||
uiSleep 0.01;
|
||||
};
|
||||
//--- End
|
||||
player removeaction bis_fnc_halo_action;
|
||||
(finddisplay 46) displayremoveeventhandler ["keydown",bis_fnc_halo_keydown_eh];
|
||||
ppeffectdestroy bis_fnc_halo_ppRadialBlur;
|
||||
deletevehicle bis_fnc_halo_clouds;
|
||||
|
||||
bis_fnc_halo_clouds = nil;
|
||||
bis_fnc_halo_vel = nil;
|
||||
bis_fnc_halo_velLimit = nil;
|
||||
bis_fnc_halo_velAdd = nil;
|
||||
bis_fnc_halo_dir = nil;
|
||||
bis_fnc_halo_dirLimit = nil;
|
||||
bis_fnc_halo_dirAdd = nil;
|
||||
bis_fnc_halo_action = nil;
|
||||
bis_fnc_halo_keydown = nil;
|
||||
bis_fnc_halo_keydown_eh = nil;
|
||||
|
||||
if (!alive player) then {
|
||||
[objNull, player, rSwitchMove,"adthppnemstpsraswrfldnon_1"] call RE;
|
||||
player switchmove "adthppnemstpsraswrfldnon_1";
|
||||
player setvelocity [0,0,0];
|
||||
} else {
|
||||
if (DZE_HaloOpenChuteHeight > -1 && isNil "bis_fnc_halo_para_dirAbs") then {
|
||||
//Auto open chute
|
||||
[player] spawn BIS_fnc_Halo;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
//--- AI ------------------------------------------------
|
||||
while {(([_unit] call FNC_GetPos) select 2) > 100} do {
|
||||
_destination = expecteddestination _unit select 0;
|
||||
_unitPosition = [_unit] call FNC_GetPos;
|
||||
if ((_destination distance [(_unitPosition select 0),(_unitPosition select 1),0]) > 10) then {
|
||||
_vel = velocity _unit;
|
||||
_dirTo = [_unit,_destination] call bis_fnc_dirto;
|
||||
if (player distance _unit > 500) then {
|
||||
_unit setdir _dirTo;
|
||||
};
|
||||
_unit setvelocity [
|
||||
(_vel select 0) + (sin _dirTo * 0.2),
|
||||
(_vel select 1) + (cos _dirTo * 0.2),
|
||||
(_vel select 2)
|
||||
];
|
||||
};
|
||||
uiSleep 0.01;
|
||||
};
|
||||
|
||||
//--- Open
|
||||
[_unit] spawn bis_fnc_halo;
|
||||
};
|
||||
};
|
||||
|
||||
//--- PARA -------------------------------------------------------------------------------------------------------------------------------------
|
||||
if (typename _this == typename []) then {
|
||||
|
||||
_unit = _this select 0;
|
||||
if (!local _unit) exitwith {};
|
||||
|
||||
//--- Free fall
|
||||
if (count _this == 2) exitwith { //Fresh spawn calling from player_monitor.fsm
|
||||
_alt = _this select 1;
|
||||
_unit call fn_exitSwim;
|
||||
_unit setvariable ["bis_fnc_halo_now",true];
|
||||
_unit spawn bis_fnc_halo;
|
||||
};
|
||||
//-------------
|
||||
|
||||
_para = objnull;
|
||||
_vel = [];
|
||||
_unit allowDamage false; //Prevent glitch death when opening chute
|
||||
_paraPosition1 = [_unit] call FNC_GetPos;
|
||||
_para = createVehicle ["ParachuteWest", _paraPosition1, [], 0, "CAN_COLLIDE"];
|
||||
//_para = "BIS_Steerable_Parachute" createVehicle position _unit;
|
||||
_para setpos _paraPosition1;
|
||||
_para setdir direction _unit;
|
||||
_vel = velocity _unit;
|
||||
_unit moveindriver _para;
|
||||
//_unit moveingunner _para;
|
||||
_para lock false;
|
||||
|
||||
bis_fnc_halo_para_dirAbs = direction _para;
|
||||
_unit allowDamage true;
|
||||
|
||||
//--- Key controls
|
||||
if (_unit == player) then {
|
||||
_para setvelocity [(_vel select 0),(_vel select 1),(_vel select 2)*1];
|
||||
|
||||
/*
|
||||
bis_fnc_halo_DynamicBlur = ppeffectcreate ["DynamicBlur",464];
|
||||
bis_fnc_halo_DynamicBlur ppEffectEnable true;
|
||||
bis_fnc_halo_DynamicBlur ppEffectAdjust [8.0];
|
||||
bis_fnc_halo_DynamicBlur ppEffectCommit 0;
|
||||
bis_fnc_halo_DynamicBlur ppEffectAdjust [0.0];
|
||||
bis_fnc_halo_DynamicBlur ppEffectCommit 1;
|
||||
*/
|
||||
|
||||
bis_fnc_halo_para_vel = 0;
|
||||
bis_fnc_halo_para_velLimit = 0.5;
|
||||
bis_fnc_halo_para_velAdd = 0.01;
|
||||
bis_fnc_halo_para_dir = 0;
|
||||
bis_fnc_halo_para_dirLimit = 1.5;
|
||||
bis_fnc_halo_para_dirAdd = 0.03;
|
||||
|
||||
bis_fnc_halo_para_keydown = {
|
||||
_key = _this select 1;
|
||||
|
||||
//--- Forward
|
||||
if (_key in (actionkeys 'MoveForward')) then {
|
||||
if (bis_fnc_halo_para_vel < +bis_fnc_halo_para_velLimit) then {bis_fnc_halo_para_vel = bis_fnc_halo_para_vel + bis_fnc_halo_para_velAdd};
|
||||
};
|
||||
|
||||
//--- Backward
|
||||
if (_key in (actionkeys 'MoveBack')) then {
|
||||
if (bis_fnc_halo_para_vel > -bis_fnc_halo_para_velLimit*0) then {bis_fnc_halo_para_vel = bis_fnc_halo_para_vel - bis_fnc_halo_para_velAdd};
|
||||
};
|
||||
|
||||
//--- Left
|
||||
if (_key in (actionkeys 'TurnLeft')) then {
|
||||
if (bis_fnc_halo_para_dir > -bis_fnc_halo_para_dirLimit) then {bis_fnc_halo_para_dir = bis_fnc_halo_para_dir - bis_fnc_halo_para_dirAdd};
|
||||
};
|
||||
|
||||
//--- Right
|
||||
if (_key in (actionkeys 'TurnRight')) then {
|
||||
if (bis_fnc_halo_para_dir < +bis_fnc_halo_para_dirLimit) then {bis_fnc_halo_para_dir = bis_fnc_halo_para_dir + bis_fnc_halo_para_dirAdd};
|
||||
};
|
||||
};
|
||||
bis_fnc_halo_para_loop_time = time - 0.1;
|
||||
bis_fnc_halo_para_velZ = velocity _para select 2;
|
||||
bis_fnc_halo_para_loop = {
|
||||
if (!isnil {player getvariable "bis_fnc_halo_terminate"}) exitwith {};
|
||||
if (time == bis_fnc_halo_para_loop_time) exitwith {}; //--- FPS too high
|
||||
|
||||
_para = vehicle player;
|
||||
|
||||
//--- FPS counter
|
||||
_fpsCoef = ((time - bis_fnc_halo_para_loop_time) * 20) / acctime; //Script is optimized for 20 FPS
|
||||
bis_fnc_halo_para_loop_time = time;
|
||||
|
||||
//_fpsCoef = _fpsCoef / 3;
|
||||
bis_fnc_halo_para_velLimit = 0.3 * _fpsCoef;
|
||||
bis_fnc_halo_para_velAdd = 0.002 * _fpsCoef;
|
||||
bis_fnc_halo_para_dirLimit = 1.5 * _fpsCoef;
|
||||
bis_fnc_halo_para_dirAdd = 0.03 * _fpsCoef;
|
||||
|
||||
//--- Dir
|
||||
bis_fnc_halo_para_dir = bis_fnc_halo_para_dir * 0.98;
|
||||
bis_fnc_halo_para_dirAbs = bis_fnc_halo_para_dirAbs + bis_fnc_halo_para_dir;
|
||||
_para setdir bis_fnc_halo_para_dirAbs;
|
||||
_dir = direction _para;
|
||||
|
||||
//--- Crash
|
||||
_velZ = velocity _para select 2;
|
||||
//if ((_velZ - bis_fnc_halo_para_velZ) > 7 && (getposatl _para select 2) < 100) then {player setdamage 1;debuglog ["Log::::::::::::::",(_velZ - bis_fnc_halo_para_velZ)];};
|
||||
bis_fnc_halo_para_velZ = _velZ;
|
||||
|
||||
//--- Pos
|
||||
_para setposasl [
|
||||
(getposasl _para select 0) + (sin _dir * (0.1 + bis_fnc_halo_para_vel)),
|
||||
(getposasl _para select 1) + (cos _dir * (0.1 + bis_fnc_halo_para_vel)),
|
||||
(getposasl _para select 2) - 0.01 - 0.1 * abs bis_fnc_halo_para_vel
|
||||
];
|
||||
|
||||
[
|
||||
_para,
|
||||
(-bis_fnc_halo_para_vel * 75) + 0.5*(sin (time * 180)),
|
||||
(+bis_fnc_halo_para_dir * 25) + 0.5*(cos (time * 180))
|
||||
] call bis_fnc_setpitchbank;
|
||||
};
|
||||
|
||||
bis_fnc_halo_para_mousemoving_eh = (finddisplay 46) displayaddeventhandler ["mousemoving","_this call bis_fnc_halo_para_loop;"];
|
||||
bis_fnc_halo_para_mouseholding_eh = (finddisplay 46) displayaddeventhandler ["mouseholding","_this call bis_fnc_halo_para_loop;"];
|
||||
|
||||
uiSleep 4;
|
||||
|
||||
// ppeffectdestroy bis_fnc_halo_DynamicBlur;
|
||||
bis_fnc_halo_para_keydown_eh = (finddisplay 46) displayaddeventhandler ["keydown","_this call bis_fnc_halo_para_keydown;"];
|
||||
|
||||
//--- End
|
||||
//waituntil {vehicle player == player};
|
||||
player setvariable ["bis_fnc_halo_terminate",nil];
|
||||
waituntil {(([(vehicle player)] call FNC_GetPos) select 2) < 2 || !isnil {player getvariable "bis_fnc_halo_terminate"}};
|
||||
(finddisplay 46) displayremoveeventhandler ["keydown",bis_fnc_halo_para_keydown_eh];
|
||||
(finddisplay 46) displayremoveeventhandler ["mousemoving",bis_fnc_halo_para_mousemoving_eh];
|
||||
(finddisplay 46) displayremoveeventhandler ["mouseholding",bis_fnc_halo_para_mouseholding_eh];
|
||||
|
||||
bis_fnc_halo_para_vel = nil;
|
||||
bis_fnc_halo_para_velLimit = nil;
|
||||
bis_fnc_halo_para_velAdd = nil;
|
||||
bis_fnc_halo_para_dir = nil;
|
||||
bis_fnc_halo_para_dirLimit = nil;
|
||||
bis_fnc_halo_para_dirAdd = nil;
|
||||
bis_fnc_halo_para_keydown = nil;
|
||||
bis_fnc_halo_para_loop = nil;
|
||||
bis_fnc_halo_para_keydown_eh = nil;
|
||||
bis_fnc_halo_para_mousemoving_eh = nil;
|
||||
bis_fnc_halo_para_mouseholding_eh = nil;
|
||||
bis_fnc_halo_para_dirAbs = nil;
|
||||
};
|
||||
};
|
@ -0,0 +1,6 @@
|
||||
/*
|
||||
DZAI Version Identifier File
|
||||
*/
|
||||
|
||||
#define DZAI_CLIENT_TYPE "DZAI Client Addon"
|
||||
#define DZAI_CLIENT_VERSION "1.0.0"
|
@ -0,0 +1,15 @@
|
||||
if (isServer) exitWith {};
|
||||
|
||||
/*
|
||||
DZAI Client-side Addon Configuration File
|
||||
|
||||
*/
|
||||
|
||||
//Enables use of client-side radio functions. DZAI_clientRadio must be set 'true' in dzai_config.sqf.
|
||||
DZAIC_radio = false;
|
||||
|
||||
//Enables AI hostility to zombies. DZAI_zombieEnemy must be set 'true' in dzai_config.sqf.
|
||||
DZAIC_zombieEnemy = false;
|
||||
|
||||
//Enables death messages to be displayed to players who kill AI units. DZAI_deathMessages must be set 'true' in dzai_config.sqf
|
||||
DZAIC_deathMessages = false;
|
@ -0,0 +1,37 @@
|
||||
if (isServer) exitWith {};
|
||||
|
||||
#include "DZAI_client_version.hpp"
|
||||
diag_log format ["[DZAI] Initializing %1 version %2.",DZAI_CLIENT_TYPE,DZAI_CLIENT_VERSION];
|
||||
|
||||
call compile preprocessFileLineNumbers "dayz_code\DZAI_Client\dzai_client_config.sqf";
|
||||
|
||||
if (DZAIC_radio) then {
|
||||
"DZAI_SMS" addPublicVariableEventHandler {
|
||||
if (isNil "DZAI_noRadio") then {
|
||||
systemChat (_this select 1);
|
||||
DZAI_noRadio = true;
|
||||
_nul = (_this select 1) spawn {
|
||||
for "_i" from 1 to 2 do {cutText [_this, "PLAIN DOWN"];sleep 0.5;};
|
||||
DZAI_noRadio = nil;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (DZAIC_zombieEnemy) then {
|
||||
"DZAI_ratingModify" addPublicVariableEventHandler {
|
||||
_targets = (_this select 1) select 0;
|
||||
_rating = (_this select 1) select 1;
|
||||
|
||||
{
|
||||
if (local _x) then {_x addRating _rating};
|
||||
} forEach _targets;
|
||||
};
|
||||
};
|
||||
|
||||
if (DZAIC_deathMessages) then {
|
||||
"DZAI_killMSG" addPublicVariableEventHandler {
|
||||
systemChat format ["%1 was killed",(_this select 1)];
|
||||
//diag_log format ["DZAI Debug: %1 was killed.",(_this select 1)];
|
||||
};
|
||||
};
|
@ -0,0 +1,42 @@
|
||||
// Written by icomrade (https://github.com/icomrade)
|
||||
|
||||
private["_itemText","_enoughMoney","_moneyInfo","_wealth","_success","_ownerPUID"];
|
||||
|
||||
closeDialog 0;
|
||||
|
||||
_itemText = if (Z_SingleCurrency) then {CurrencyName} else {[vg_maintainCost,true] call z_calcCurrency};
|
||||
_enoughMoney = false;
|
||||
_moneyInfo = [false, [], [], [], 0];
|
||||
|
||||
if (Z_SingleCurrency) then {
|
||||
_wealth = player getVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),0];
|
||||
_enoughMoney = (_wealth >= vg_maintainCost);
|
||||
} else {
|
||||
Z_Selling = false;
|
||||
_moneyInfo = vg_maintainCost call Z_canAfford;
|
||||
_enoughMoney = _moneyInfo select 0;
|
||||
};
|
||||
|
||||
_success = true;
|
||||
if (vg_maintainCost > 0) then {
|
||||
_success = if (Z_SingleCurrency) then {_enoughMoney} else {[player,vg_maintainCost,_moneyInfo,false,0] call Z_payDefault};
|
||||
};
|
||||
|
||||
if (!_success && _enoughMoney) exitWith {systemChat localize "STR_EPOCH_TRADE_GEAR_AND_BAG_FULL";};
|
||||
|
||||
if (_enoughMoney || vg_maintainCost < 1) then {
|
||||
if (Z_SingleCurrency) then {
|
||||
player setVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),(_wealth - vg_maintainCost),true];
|
||||
};
|
||||
localize "STR_CL_VG_MAINTAINSUCCESS" call dayz_rollingMessages;
|
||||
PVDZE_maintainGarage = if (vg_tiedToPole) then {
|
||||
_plotCheck = [player,false] call FNC_find_plots;
|
||||
_ownerPUID = if (_plotCheck select 1 > 0) then {(_plotCheck select 2) getVariable ["ownerPUID","0"]} else {dayz_playerUID};
|
||||
[player,_ownerPUID]
|
||||
} else {
|
||||
[player]
|
||||
};
|
||||
publicVariableServer "PVDZE_maintainGarage";
|
||||
} else {
|
||||
localize "STR_CL_VG_MAINTAINFAIL" call dayz_rollingMessages;
|
||||
};
|
@ -0,0 +1,106 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// fn_isSheltered.sqf
|
||||
//
|
||||
// Author: Victor the Cleaner
|
||||
// Date: May 2022
|
||||
//
|
||||
// Calculate how much shelter the player has and represent it as variable DZE_sheltered.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Raycast and perform collision check
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
local _deepScan = {
|
||||
|
||||
local _objects = lineIntersectsWith [_pos1, _pos2, _unit, objNull, true]; // sorted (nearest last)
|
||||
local _nearest = (count _objects) - 1; // nearest object
|
||||
local _idx = _this; // weight index
|
||||
|
||||
scopeName "exit";
|
||||
for "_n" from _nearest to 0 step -1 do {
|
||||
local _object = _objects select _n;
|
||||
|
||||
call {
|
||||
if (_object isKindOf "AllVehicles") exitWith {}; // exclude vehicles, zombies and other players
|
||||
|
||||
local _model = _object call fn_getModelName;
|
||||
|
||||
if (_model in DZE_allTrees) exitWith {}; // exclude trees
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Get object edge data
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
local _box = boundingBox _object;
|
||||
local _edge = [_box select 1, _box select 0] call DZE_fnc_vectorDiff;
|
||||
local _edgeX = _edge select 0;
|
||||
local _edgeY = _edge select 1;
|
||||
local _edgeZ = _edge select 2;
|
||||
|
||||
local _proceed = false;
|
||||
|
||||
call {
|
||||
if (_edgeX > _e2 && {(_edgeY > _e1 || {_edgeZ > _e1})}) exitWith {_proceed = true;};
|
||||
if (_edgeY > _e2 && {(_edgeX > _e1 || {_edgeZ > _e1})}) exitWith {_proceed = true;};
|
||||
if (_edgeZ > _e2 && {(_edgeX > _e1 || {_edgeY > _e1})}) exitWith {_proceed = true;};
|
||||
};
|
||||
|
||||
if (_proceed) then {
|
||||
_hitWgt set [_idx, (_hitWgt select _idx) + (_scanWgt select _idx)]; // object meets criteria
|
||||
breakTo "exit";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// calculate ASL vector dome
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
local _unit = _this select 0; // vehicle player
|
||||
local _dir = _this select 1; // align hemisphere to building if inside
|
||||
local _rad = 50; // scan radius
|
||||
local _seg = 8; // initial segments
|
||||
local _spin = 0; // z spin offset per arc-cycle
|
||||
local _e1 = 2.5; // minimum edge length
|
||||
local _e2 = 4.6; // long edge length
|
||||
local _scanWgt = [1,1.5,2]; // scan weighting index
|
||||
local _hitWgt = [0,0,0]; // record hit weighting
|
||||
local _total = 0; // total hits, adjusted for weighting
|
||||
local _pos1 = aimPos _unit; // ASL from
|
||||
local _pos2 = +_pos1; // ASL to
|
||||
|
||||
_pos2 set [2, (_pos2 select 2) + _rad]; // overhead pos
|
||||
2 call _deepScan; // perform initial raycast
|
||||
DZE_roofOverhead = (_hitWgt select 2) > 0; // valid sized object directly above
|
||||
|
||||
for "_r" from 0 to 2 do {
|
||||
|
||||
local _rx = 30 * _r; // aggregate x rotation above the horizon
|
||||
local _arc = 360 / (_seg / (_r max 1)); // arc segments per z rotation
|
||||
|
||||
for "_a" from _arc to 360 step _arc do {
|
||||
local _rz = _dir + _a + _spin; // world direction with radial offset (or aligned to building)
|
||||
local _pz = sin _rx; // x rotation gives z height
|
||||
local _py = cos _rx; // x rotation gives y pos
|
||||
local _px = _py * -(sin _rz); // z rotation gives x pos
|
||||
_py = _py * (cos _rz); // z rotation gives y pos refactor
|
||||
_pos2 = [_px, _py, _pz]; // unit vector (relative)
|
||||
|
||||
for "_i" from 0 to 2 do { // multiply and add from/to vectors
|
||||
_pos2 set [_i, ((_pos2 select _i) * _rad) + (_pos1 select _i)];
|
||||
};
|
||||
|
||||
_r call _deepScan; // perform raycast
|
||||
};
|
||||
_spin = _spin + 22.5; // incremental z spin
|
||||
_total = _total + (_hitWgt select _r); // hit weighting running total
|
||||
};
|
||||
|
||||
DZE_sheltered = _total / 30;
|
@ -0,0 +1,186 @@
|
||||
/*
|
||||
DayZ Epoch Vehicle Upgrades
|
||||
Made for DayZ Unleashed by [VB]AWOL please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
|
||||
*/
|
||||
if (dayz_actionInProgress) exitWith {localize "STR_EPOCH_PLAYER_52" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_text","_requirementsTools","_upgradeName","_displayname","_vehicle","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_removed","_tobe_removed_total","_textMissing","_num_removed","_removed_total","_location","_dir","_objectCharacterID","_classname","_newclassname","_upgrade","_vehicle","_finished","_temp_removed_array_mag","_temp_removed_array_wep","_notNearestPlayer","_requirementsWeapon","_requirementsMagazine"];
|
||||
|
||||
_upgrade = _this;
|
||||
_vehicle = cursorTarget;
|
||||
|
||||
if (isNull _vehicle || !(_vehicle isKindOf "AllVehicles") || !(alive _vehicle)) exitWith {dayz_actionInProgress = false; systemChat localize "str_cursorTargetNotFound";};
|
||||
|
||||
if (vehicle player != player) exitWith {dayz_actionInProgress = false; localize "STR_EPOCH_ACTIONS_18" call dayz_rollingMessages;};
|
||||
|
||||
_classname = typeOf _vehicle;
|
||||
_displayname = getText (configFile >> "CfgVehicles" >> _classname >> "displayname");
|
||||
|
||||
if (_classname in DZE_DisableVehicleUpgrade) exitWith {dayz_actionInProgress = false; format [localize "STR_EPOCH_VEHUP_NOT_ALLOWED",_displayname] call dayz_rollingMessages;};
|
||||
|
||||
if ((player distance _vehicle) > 10) exitWith {dayz_actionInProgress = false; format [localize "STR_EPOCH_VEHUP_DISTANCE_TOO_FAR",_displayname] call dayz_rollingMessages;};
|
||||
|
||||
if (count (crew _vehicle) == 0) then {
|
||||
_notNearestPlayer = _vehicle call dze_isnearest_player;
|
||||
|
||||
if (local _vehicle && !_notNearestPlayer) then {
|
||||
// lookup vehicle and find if any upgrades are available
|
||||
_upgradeName = getText (configFile >> "CfgMagazines" >> _upgrade >> "displayname");
|
||||
|
||||
// Can be removed after a futher Epoch Update, fixes the AAV_DZE could not be upgraded due to a missing config entry
|
||||
if (_classname == "AAV_DZE") then {
|
||||
_upgrade = ["AAV_DZE1",["ItemToolbox","ItemCrowbar"],[],[["ItemTankORP",1],["PartEngine",6],["PartGeneric",2],["ItemScrews",2]]];
|
||||
} else {
|
||||
_upgrade = getArray (configFile >> "CfgVehicles" >> _classname >> "Upgrades" >> _upgrade);
|
||||
};
|
||||
|
||||
if (!isNil "_upgrade" && {(count _upgrade) > 0}) then {
|
||||
closeDialog 0;
|
||||
_newclassname = _upgrade select 0;
|
||||
_requirementsTools = _upgrade select 1;
|
||||
|
||||
if (["",_requirementsTools,"none"] call dze_requiredItemsCheck) then {
|
||||
_requirementsWeapon = _upgrade select 2;
|
||||
_requirementsMagazine = _upgrade select 3;
|
||||
|
||||
_missingQty = 0;
|
||||
_missing = "";
|
||||
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
} count _requirementsMagazine;
|
||||
|
||||
{
|
||||
_itemIn = _x;
|
||||
_countIn = 1;
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgWeapons" >> _x)) == _itemIn) } count weapons player;
|
||||
if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
} count _requirementsWeapon;
|
||||
|
||||
if (_proceed) then {
|
||||
[player,(getPosATL player),20,"repair"] spawn fnc_alertZombies;
|
||||
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
if (!_finished) exitWith {};
|
||||
|
||||
if (count (crew _vehicle) > 0) exitWith {format [localize "STR_CL_LOG_FAIL_PLAYER",_displayname] call dayz_rollingMessages;};
|
||||
["Working",0,[3,2,4,0]] call dayz_NutritionSystem;
|
||||
|
||||
_temp_removed_array_mag = [];
|
||||
_temp_removed_array_wep = [];
|
||||
_removed_total = 0;
|
||||
_tobe_removed_total = 0;
|
||||
|
||||
{
|
||||
_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_mag set [count _temp_removed_array_mag,_x];
|
||||
};
|
||||
};
|
||||
} count magazines player;
|
||||
} forEach _requirementsMagazine;
|
||||
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x;
|
||||
_countIn = 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 >> "cfgWeapons" >> _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_wep set [count _temp_removed_array_wep,_x];
|
||||
};
|
||||
};
|
||||
} count weapons player;
|
||||
} forEach _requirementsWeapon;
|
||||
|
||||
// all parts removed proceed
|
||||
if (_tobe_removed_total == _removed_total) then {
|
||||
call player_forceSave;
|
||||
// Current charID
|
||||
_objectCharacterID = _vehicle getVariable ["CharacterID","0"];
|
||||
|
||||
if (_objectCharacterID == "-1") then {
|
||||
localize "str_epoch_player_50" call dayz_rollingMessages;
|
||||
} else {
|
||||
// Get position
|
||||
_location = getposATL _vehicle;
|
||||
|
||||
// Get direction
|
||||
_dir = getDir _vehicle;
|
||||
|
||||
localize "STR_EPOCH_VEHUP_IN_PROGRESS" call dayz_rollingMessages;
|
||||
[_newclassname,objNull] call fn_waitForObject;
|
||||
dze_waiting = nil;
|
||||
PVDZE_veh_Upgrade = [_vehicle,[_dir,_location],_newclassname,_objectCharacterID,player,dayz_authKey];
|
||||
publicVariableServer "PVDZE_veh_Upgrade";
|
||||
|
||||
//Wait for hive to finish spawning vehicle. Prevents dupe via player queuing multiple upgrades.
|
||||
waitUntil {!isNil "dze_waiting"};
|
||||
|
||||
if (dze_waiting == "fail") then {
|
||||
{player addMagazine _x;} count _temp_removed_array_mag;
|
||||
{player addWeapon _x;} count _temp_removed_array_wep;
|
||||
format[localize "str_crafting_failed",_newclassname] call dayz_rollingMessages;
|
||||
} else {
|
||||
localize "STR_EPOCH_VEHUP_SUCCESS" call dayz_rollingMessages;
|
||||
["Working",0,[3,2,4,0]] call dayz_NutritionSystem;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
{player addMagazine _x;} count _temp_removed_array_mag;
|
||||
{player addWeapon _x;} count _temp_removed_array_wep;
|
||||
format[localize "str_epoch_player_145",_removed_total,_tobe_removed_total] call dayz_rollingMessages;
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
format[localize "STR_EPOCH_ACTIONS_6",_missingQty, _textMissing] call dayz_rollingMessages;
|
||||
|
||||
systemchat localize "STR_CRAFTING_NEEDED_ITEMS";
|
||||
|
||||
if (count _requirementsMagazine > 0) then {
|
||||
{
|
||||
_text = getText(configFile >> "CfgMagazines" >> (_x select 0) >> "displayName");
|
||||
systemchat format ["%2x %1",_text,(_x select 1)];
|
||||
} count _requirementsMagazine;
|
||||
};
|
||||
if (count _requirementsWeapon > 0) then {
|
||||
{
|
||||
_text = getText(configFile >> "CfgWeapons" >> _x >> "displayName");
|
||||
systemchat format ["1x %1",_text];
|
||||
|
||||
} count _requirementsWeapon;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
format [localize "STR_EPOCH_VEHUP_NO_UPGRADE_FOR_VEHICLE",_upgradeName,_displayname] call dayz_rollingMessages;
|
||||
};
|
||||
} else {
|
||||
localize "str_epoch_player_245" call dayz_rollingMessages;
|
||||
};
|
||||
} else {
|
||||
format [localize "STR_CL_LOG_FAIL_PLAYER",_displayname] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
@ -1,13 +1,28 @@
|
||||
if (isServer) then {
|
||||
diag_log "Loading custom server compiles";
|
||||
|
||||
};
|
||||
|
||||
if (!isDedicated) then {
|
||||
diag_log "Loading custom client compiles";
|
||||
//Add your custom or override functions here
|
||||
fnc_usec_selfActions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf";
|
||||
|
||||
// All fixes down below can be removed in a future Epoch Update
|
||||
|
||||
// Fix Wooden bases with wooden walls and floors got not properly recognized as shelter.
|
||||
fnc_issheltered = compile preprocessFileLineNumbers "dayz_code\compile\fn_isSheltered.sqf";
|
||||
|
||||
// Fix upgrading AAV_DZE to AAV_DZE1 did not work, only needed if you are using the AAV_DZE
|
||||
player_upgradeVehicle = compile preprocessFileLineNumbers "dayz_code\compile\player_upgradeVehicle.sqf";
|
||||
|
||||
// Fix Maintain the Virtual Garage with Coins does not work properly
|
||||
if (DZE_Virtual_Garage) then {
|
||||
Player_MaintainVG = compile preprocessFileLineNumbers "dayz_code\actions\virtualGarage\player_MaintainVG.sqf";
|
||||
};
|
||||
|
||||
player_selectSlot = compile preprocessFileLineNumbers "dayz_code\compile\ui_selectSlot.sqf";
|
||||
fnc_usec_selfActions = compile preprocessFileLineNumbers "dayz_code\compile\fn_selfActions.sqf";
|
||||
|
||||
locateVehicle = compile preprocessFileLineNumbers "scripts\locateVehicle.sqf";
|
||||
|
||||
remoteVehicle = compile preprocessFileLineNumbers "scripts\remoteVehicle\remoteVehicle.sqf";
|
||||
};
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
if (isServer) then {
|
||||
diag_log "Loading custom server variables";
|
||||
|
||||
vkc_clearAmmo = true; // Clear the ammo of vehicles after they have been rekeyed/claimed? (stops users getting a free rearm)
|
||||
vkc_disableThermal = [""]; // Array of vehicle config classes as well as vehicle classnames to disable thermal on when being spawned. i.e: ["All","Land","Air","Ship","StaticWeapon","AH1Z","MTVR"];
|
||||
|
||||
vg_clearAmmo = true; // Clear the ammo of vehicles spawned during the same restart they are stored? (stops users storing a vehicle for a free rearm)
|
||||
vg_clearAmmo = true; // Clear the ammo of vehicles spawned during the same restart they are stored? (stops users storing a vehicle for a free rearm)
|
||||
vg_disableThermal = []; // Array of vehicle config classes as well as vehicle classnames to disable thermal on when being spawned. i.e: ["All","Land","Air","Ship","StaticWeapon","AH1Z","MTVR"];
|
||||
vg_sortColumn = 0; //0 or an out of range value sorts by the default column 'DisplayName', otherwise 1 = 'DateStored', 2 = 'id', 3 = 'Name' (of storing player), 4 = 'DateMaintained'
|
||||
};
|
||||
@ -12,6 +10,14 @@ if (isServer) then {
|
||||
if (!isDedicated) then {
|
||||
diag_log "Loading custom client variables";
|
||||
|
||||
dayz_resetSelfActions1 = dayz_resetSelfActions;
|
||||
dayz_resetSelfActions = {
|
||||
call dayz_resetSelfActions1;
|
||||
// Add custom reset actions here
|
||||
|
||||
};
|
||||
call dayz_resetSelfActions;
|
||||
|
||||
vkc_claimPrice = 1000; // Amount in worth for claiming a vehicle. See the top of this script for an explanation.
|
||||
vkc_changePrice = 5000; // Amount in worth for changing the key for a vehicle. See the top of this script for an explanation.
|
||||
|
||||
@ -44,7 +50,3 @@ if (!isDedicated) then {
|
||||
vg_limit = 5;
|
||||
*/
|
||||
};
|
||||
|
||||
Z_singleCurrency = true;
|
||||
Z_globalBanking = true;
|
||||
Z_globalBankingTraders = true;
|
@ -1,21 +1,20 @@
|
||||
// For DayZ Epoch
|
||||
// EPOCH CONFIG VARIABLES //
|
||||
//#include "\z\addons\dayz_code\configVariables.sqf" // If you have problems with certain variables uncomment this line.
|
||||
#include "configVariables.sqf" // Don't remove this line, path in your missionfile
|
||||
|
||||
// EPOCH CONFIG VARIABLES START //
|
||||
#include "\z\addons\dayz_code\configVariables.sqf" // Don't remove this line
|
||||
#include "dayz_code\configVariables.sqf"
|
||||
// See the above file for a full list including descriptions and default values
|
||||
// Map Specific Config //
|
||||
|
||||
// Server only settings
|
||||
if (isServer) then {
|
||||
DZE_ServerMarkerArray = [];
|
||||
DZE_ServerMarkerArray = [];
|
||||
DZE_MissionPositions = [];
|
||||
dayZ_instance = 24; //Instance ID of this server
|
||||
dayz_POIs = false; //Adds Point of Interest map additions (negatively impacts FPS)
|
||||
dayz_POIs = false; //Adds Point of Interest map additions (negatively impacts FPS)
|
||||
MaxDynamicDebris = 500; // Max number of random road blocks to spawn around the map
|
||||
MaxVehicleLimit = 500; // Max number of random vehicles to spawn around the map
|
||||
spawnArea = 1400; // Distance around markers to find a safe spawn position
|
||||
spawnShoremode = 0; // Random spawn locations 1 = on shores, 0 = inland
|
||||
EpochEvents = [ //[year,month,day of month, minutes,name of file - .sqf] If minutes is set to -1, the event will run once immediately after server start.
|
||||
EpochEvents = [ //[year,month,day of month, minutes,name of file - .sqf] If minutes is set to -1, the event will run once immediately after server start.
|
||||
["any","any","any","any",3,"Infected_Camps"], // (negatively impacts FPS)
|
||||
["any","any","any","any",-1,"Care_Packages"],
|
||||
["any","any","any","any",5,"abandoned_vaults"],
|
||||
@ -95,7 +94,7 @@ if (!isDedicated) then {
|
||||
ZSC_bankTraders = ["Functionary1_EP1"]; // Array of trader classnames that are available for banking (i.e Functionary1_EP1), do not use _DZ classes - they are used as player skins
|
||||
ZSC_limitOnBank = true; // Have a limit on the bank? (i.e true or false) limits the global banking to the number below.
|
||||
ZSC_bankObjects = ["SignM_FARP_Winchester_EP1","ATM_DZ"]; // Array of objects that are available for banking i.e: ["Suitcase","Info_Board_EP1","Laptop_EP1","SatPhone"]
|
||||
ZSC_maxBankMoney = 5000000; // Default limit for bank objects.
|
||||
ZSC_maxBankMoney = 15000000; // Default limit for bank objects.
|
||||
ZSC_defaultStorageMultiplier = 50; // Default magazine count for bank objects that don't have storage slots i.e: ["Suitcase","Info_Board_EP1","Laptop_EP1","SatPhone"]
|
||||
ZSC_MaxMoneyInStorageMultiplier = 1000; // Multiplier for how much money a bank object can hold, example: 200 magazine slots in the object (or the default value above ^^) multiplied by the 5000 multiplier is 1 million coin storage. (200 * 5000 = 1,000,000 coins)
|
||||
ZSC_ZombieCoins = [true,[10,500]]; // First value activate coins on zombies, second value from 0 - 1000 coins on each zombie. Coin for zombies are handled directly in check wallet.
|
||||
@ -138,10 +137,10 @@ enableRadio false;
|
||||
enableSentences false;
|
||||
//setTerrainGrid 25;
|
||||
|
||||
diag_log 'dayz_preloadFinished reset';
|
||||
//diag_log 'dayz_preloadFinished reset';
|
||||
dayz_preloadFinished=nil;
|
||||
onPreloadStarted "diag_log [diag_tickTime,'onPreloadStarted']; dayz_preloadFinished = false;";
|
||||
onPreloadFinished "diag_log [diag_tickTime,'onPreloadFinished']; dayz_preloadFinished = true;";
|
||||
onPreloadStarted "dayz_preloadFinished = false;";
|
||||
onPreloadFinished "dayz_preloadFinished = true;";
|
||||
with uiNameSpace do {RscDMSLoad=nil;}; // autologon at next logon
|
||||
|
||||
if (!isDedicated) then {
|
||||
@ -208,14 +207,15 @@ if (!isDedicated) then {
|
||||
execVM "\z\addons\dayz_code\system\antihack.sqf";
|
||||
|
||||
if (dayz_townGenerator) then {execVM "\z\addons\dayz_code\compile\client_plantSpawner.sqf";};
|
||||
call compile preprocessFileLineNumbers "spawn\init.sqf";
|
||||
|
||||
"EAT_login" addPublicVariableEventHandler {call (_this select 1)};
|
||||
EAT_clientToServer = ["login", player];
|
||||
publicVariableServer "EAT_clientToServer";
|
||||
|
||||
call compile preprocessFileLineNumbers "scripts\marker_manager.sqf";
|
||||
call compile preprocessFileLineNumbers "spawn\init.sqf";
|
||||
execFSM "\z\addons\dayz_code\system\player_monitor.fsm";
|
||||
call compile preprocessFileLineNumbers "dayz_code\DZAI_Client\dzai_initclient.sqf";
|
||||
execVM "scripts\servicePoints\init.sqf";
|
||||
//[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
|
||||
//[600,.15,30] execVM "\z\addons\dayz_code\compile\fn_chimney.sqf"; // Smoking chimney effects.
|
||||
|
@ -4,7 +4,6 @@ class Mission
|
||||
addOns[]=
|
||||
{
|
||||
"napf",
|
||||
"aif_arma1buildings",
|
||||
"map_eu",
|
||||
"ca_modules_animals",
|
||||
"dayz_anim",
|
||||
@ -34,7 +33,7 @@ class Mission
|
||||
class Intel
|
||||
{
|
||||
briefingName="DayZ Epoch Napf";
|
||||
briefingDescription="Version 1.0.7";
|
||||
briefingDescription="Version 1.0.7.1";
|
||||
startWeather=0;
|
||||
forecastWeather=0;
|
||||
year=2008;
|
||||
|
@ -6,29 +6,79 @@
|
||||
*/
|
||||
|
||||
class_selection = true; //Enable class selection dialog
|
||||
#define START_ITEMS "HandRoadFlare","ItemBandage",2,"ItemPainkiller","ItemWaterbottle","FoodPistachio","PartGeneric"
|
||||
#define START_ITEMS "HandRoadFlare","ItemBandage",2,"ItemPainkiller","ItemWaterbottle","FoodPistachio"
|
||||
class_public = [ // These are visible to anyone on the server
|
||||
[(localize "str_playerstats_bandit")+" Lvl1","Bandit1_DZ","BanditW1_DZ",[START_ITEMS,"17Rnd_9x19_glock17",2],["G17_DZ"],"",[],[],0,-5000,0,""],
|
||||
[(localize "str_playerstats_bandit")+" Lvl2","Bandit1_DZ","BanditW1_DZ",[START_ITEMS,"30Rnd_9x19_UZI",3,"ItemMorphine"],["PDW_DZ"],if (class_epoch) then {"Assault_Pack_DZE1"} else {"DZ_Assault_Pack_EP1"},[],[],0,-15000,0,""],
|
||||
[(localize "str_playerstats_bandit")+" Lvl3","Bandit1_DZ","BanditW1_DZ",[START_ITEMS,"30Rnd_9x19_UZI_SD",4,"ItemMorphine"],["PDW_SD_DZ"],if (class_epoch) then {"TK_Assault_Pack_DZE1"} else {"DZ_TK_Assault_Pack_EP1"},[],[],0,-25000,0,"MeleeHatchet"],
|
||||
[(localize "str_playerstats_hero")+" Lvl1",if (class_epoch) then {"Soldier_Sniper_PMC_DZ"} else {"Survivor3_DZ"},"SurvivorW2_DZ",[START_ITEMS,"6Rnd_45ACP",2],["Revolver_DZ"],"",[],[],0,10000,0,""],
|
||||
[(localize "str_playerstats_hero")+" Lvl2",if (class_epoch) then {"Soldier_Sniper_PMC_DZ"} else {"Survivor3_DZ"},"SurvivorW2_DZ",[START_ITEMS,"30Rnd_9x19_UZI",3,"ItemMorphine"],["PDW_DZ"],if (class_epoch) then {"Assault_Pack_DZE1"} else {"DZ_Assault_Pack_EP1"},[],[],0,20000,0,""],
|
||||
[(localize "str_playerstats_hero")+" Lvl3",if (class_epoch) then {"Soldier_Sniper_PMC_DZ"} else {"Survivor3_DZ"},"SurvivorW2_DZ",[START_ITEMS,"30Rnd_9x19_UZI_SD",4,"ItemMorphine"],["PDW_SD_DZ"],if (class_epoch) then {"TK_Assault_Pack_DZE1"} else {"DZ_TK_Assault_Pack_EP1"},[],[],0,30000,0,"MeleeHatchet"],
|
||||
[(localize "str_playerstats_bandit")+" Lvl2","Bandit1_DZ","BanditW1_DZ",[START_ITEMS,"17Rnd_9x19_glock17",3,"ItemMorphine"],["G17_DZ"],if (class_epoch) then {"Assault_Pack_DZE1"} else {"DZ_Assault_Pack_EP1"},[],[],0,-10000,0,""],
|
||||
[(localize "str_playerstats_bandit")+" Lvl3","Bandit1_DZ","BanditW1_DZ",[START_ITEMS,"17Rnd_9x19_glock17",4,"ItemMorphine"],["G17_DZ"],if (class_epoch) then {"TK_Assault_Pack_DZE1"} else {"DZ_TK_Assault_Pack_EP1"},[],[],0,-15000,0,"MeleeHatchet"],
|
||||
[(localize "str_playerstats_hero")+" Lvl1",if (class_epoch) then {"Soldier_Sniper_PMC_DZ"} else {"Survivor3_DZ"},"SurvivorW2_DZ",[START_ITEMS,"6Rnd_45ACP",2],["Revolver_DZ"],"",[],[],0,5000,0,""],
|
||||
[(localize "str_playerstats_hero")+" Lvl2",if (class_epoch) then {"Soldier_Sniper_PMC_DZ"} else {"Survivor3_DZ"},"SurvivorW2_DZ",[START_ITEMS,"6Rnd_45ACP",3,"ItemMorphine"],["Revolver_DZ"],if (class_epoch) then {"Assault_Pack_DZE1"} else {"DZ_Assault_Pack_EP1"},[],[],0,10000,0,""],
|
||||
[(localize "str_playerstats_hero")+" Lvl3",if (class_epoch) then {"Soldier_Sniper_PMC_DZ"} else {"Survivor3_DZ"},"SurvivorW2_DZ",[START_ITEMS,"6Rnd_45ACP",4,"ItemMorphine"],["Revolver_DZ"],if (class_epoch) then {"TK_Assault_Pack_DZE1"} else {"DZ_TK_Assault_Pack_EP1"},[],[],0,15000,0,"MeleeHatchet"],
|
||||
[localize "str_playerstats_survivor","Survivor2_DZ","SurvivorW2_DZ",[START_ITEMS,"8Rnd_9x18_Makarov",2],["Makarov_DZ"],"",[],[],0,0,0]
|
||||
];
|
||||
|
||||
halo_selection = true; // Enable HALO selection dialog
|
||||
halo_force = false; // Skip HALO selection dialog and force HALO spawn.
|
||||
halo_type = "C130J_US_EP1_DZ"; // Type of plane. Tested with C130J_US_EP1_DZ, AN2_DZ, MV22_DZ. Use "" to disable the plane and use regular HALO.
|
||||
halo_type = "AN2_DZ"; // Type of plane. Tested with C130J_US_EP1_DZ, AN2_DZ, MV22_DZ. Use "" to disable the plane and use regular HALO.
|
||||
|
||||
spawn_selection = true; // Enable spawn selection dialog
|
||||
spawn_bodyCheck = 1500; // If a player has a body within this distance of a spawn that spawn will be blocked. Set to -1 to disable.
|
||||
spawn_bodyCheck = 4000; // If a player has a body within this distance of a spawn that spawn will be blocked. Set to -1 to disable.
|
||||
spawn_nearGroup = false; // Allow players to spawn near their group. BodyCheck can override.
|
||||
spawn_nearPlot = true; // Allow players to spawn near their plot. BodyCheck can override.
|
||||
spawn_radius = 1200; // Distance around spawn to find a safe pos. Lower is closer to exact coordinates. Do not set too low or BIS_fnc_findSafePos may fail.
|
||||
spawn_nearPlot = false; // Allow players to spawn near their plot. BodyCheck can override.
|
||||
spawn_radius = 800; // Distance around spawn to find a safe pos. Lower is closer to exact coordinates. Do not set too low or BIS_fnc_findSafePos may fail.
|
||||
|
||||
spawn_public = switch (toLower worldName) do {
|
||||
case "napf": {
|
||||
spawn_public = call {
|
||||
if ((toLower worldName) in ["chernarus","chernarus_winter"]) exitwith {
|
||||
[
|
||||
[localize "str_disp_srvsetup_random",[[4523,2444,0],[12037,9100,0],[6723,2562,0],[10417,2120,0],[1896,2242,0],[13470,6306,0]],0,0,1], // Random will never be blocked, so always keep it if using body check.
|
||||
[localize "str_location_balota",[4523,2444,0],0,0],
|
||||
[localize "str_location_berezino",[12037,9100,0],0,0],
|
||||
[localize "str_location_chernogorsk",[6723,2562,0],0,0],
|
||||
[localize "str_location_elektrozavodsk",[10417,2120,0],0,0],
|
||||
[localize "str_location_kamenka",[1896,2242,0],0,0],
|
||||
[localize "str_location_solnichniy",[13470,6306,0],0,0],
|
||||
// Above are defaults
|
||||
[localize "str_location_loc_devilscastle",[6900,11419,0],0,0],
|
||||
[localize "str_location_gorka",[9659,8839,0],0,0],
|
||||
[localize "str_location_grishino",[5967,10323,0],0,0],
|
||||
[localize "str_location_guglovo",[8472,6754,0],0,0],
|
||||
[localize "str_location_gvozdno",[8654,11832,0],0,0],
|
||||
[localize "str_location_kabanino",[5346,8630,0],0,0],
|
||||
[localize "str_location_kamyshovo",[12073,3490,0],0,0],
|
||||
[localize "str_location_komarovo",[3643,2473,0],0,0],
|
||||
[localize "str_location_krasnostav",[11342,12232,0],0,0],
|
||||
[localize "str_location_loc_capkrutoy",[13395,4159,0],0,0],
|
||||
[localize "str_location_lopatino",[2731,10000,0],0,0],
|
||||
[localize "str_location_petrovka",[5035,12459,0],0,0],
|
||||
[localize "str_location_pogorevka",[4461,6424,0],0,0],
|
||||
[localize "str_location_prigorodki",[8059,3381,0],0,0],
|
||||
[localize "str_location_pusta",[9178,3928,0],0,0],
|
||||
[localize "str_location_vybor",[3893,8883,0],0,0],
|
||||
[localize "str_location_vyshnoe",[6612,6065,0],0,0],
|
||||
[localize "str_location_zelenogorsk",[2858,5313,0],0,0]
|
||||
]
|
||||
};
|
||||
if ((toLower worldName) in ["tavi","taviana"]) exitwith {
|
||||
[
|
||||
[localize "str_disp_srvsetup_random",[[9093,2614,0],[17588,4952,0],[15954,15847,0],[16674,13930,0],[11361,6685,0],[17744,10299,0],[18292,7537,0],[13561,19300,0],[15246,17425,0],[12268,9763,0]],0,0,1],
|
||||
["Topolka",[9093,2614,0],0,0],
|
||||
["Stari Sad",[17588,4952,0],0,0],
|
||||
["Sevastopol",[15954,15847,0],0,0],
|
||||
["Martin",[16674,13930,0],0,0],
|
||||
["Komarovo",[11361,6685,0],0,0],
|
||||
["Dubovo",[17744,10299,0],0,0],
|
||||
["Byelov",[18292,7537,0],0,0],
|
||||
["Khotanovsk",[13561,19300,0],0,0],
|
||||
["Dalnogorsk",[15246,17425,0],0,0],
|
||||
// Above are defaults
|
||||
["Kameni",[8350,18937,0],0,0],
|
||||
["Lyepestok",[11238,14413,0],0,0],
|
||||
["Marina",[10184,1542,0],0,0],
|
||||
["Race Track",[1529,7271,0],0,0],
|
||||
["Chernovar",[5904,10519,0],0,0]
|
||||
]
|
||||
};
|
||||
if ((toLower worldName) == "napf") exitwith {
|
||||
[
|
||||
[localize "str_disp_srvsetup_random",[[5411,16676,0],[1511,11479,0],[12231,16319,0],[6946,17385,0],[12862,14850,0],[4672,14940,0],[2720,12226,0],[4104,13026,0],[1461,10584,0],[10283,18449,0],[10709,17085,0]],0,0,1],
|
||||
["Seltishafen",[5411,16676,0],0,0],
|
||||
@ -54,4 +104,114 @@ spawn_public = switch (toLower worldName) do {
|
||||
["Waldegg",[8538,852,0],0,0]
|
||||
]
|
||||
};
|
||||
if ((toLower worldName) == "lingor") exitwith {
|
||||
[
|
||||
[localize "str_disp_srvsetup_random",[[2085,5501,0],[1355,315,0],[4550,913,0],[8880,1703,0],[580,5547,0],[3250,2556,0],[6143,2753,0],[1269,2858,0],[8295,8667,0],[9072,7323,0],[6899,3971,0]],0,0,1],
|
||||
["Vidora",[2085,5501,0],0,0],
|
||||
["Alma",[1355,315,0],0,0],
|
||||
["Calamar",[4550,913,0],0,0],
|
||||
["Pikawas",[8880,1703,0],0,0],
|
||||
["Benio",[580,5547,0],0,0],
|
||||
["Aguado",[3250,2556,0],0,0],
|
||||
["Prospero",[6143,2753,0],0,0],
|
||||
["Rago",[1269,2858,0],0,0],
|
||||
["Cemarin",[8295,8667,0],0,0],
|
||||
["Conoteta",[9072,7323,0],0,0],
|
||||
["Sanvigado",[6899,3971,0],0,0]
|
||||
// Above are defaults
|
||||
]
|
||||
};
|
||||
if ((toLower worldName) == "namalsk") exitwith {
|
||||
[
|
||||
[localize "str_disp_srvsetup_random",[[4620,10916,0],[7600,6020,0],[6498,11851,0],[7668,11707,0],[4340,4960,0],[7885,7206,0],[3013,7506,0],[4673,10004,0],[7859,9096,0],[8756,10119,0],[5823,5641,0]],0,0,1],
|
||||
["Lubjansk",[4620,10916,0],0,0],
|
||||
["Old Sawmill",[7600,6020,0],0,0],
|
||||
["West Vorkuta",[6498,11851,0],0,0],
|
||||
["East Vorkuta",[7668,11707,0],0,0],
|
||||
["Brensk",[4340,4960,0],0,0],
|
||||
["Tara Harbor",[7885,7206,0],0,0],
|
||||
["Norinsk Tunnel",[3013,7506,0],0,0],
|
||||
["Lubjansk Bay",[4673,10004,0],0,0],
|
||||
["Nemsk Factory",[7859,9096,0],0,0],
|
||||
["Jalovisko",[8756,10119,0],0,0],
|
||||
["Brensk Bay",[5823,5641,0],0,0]
|
||||
// Above are defaults
|
||||
]
|
||||
};
|
||||
if ((toLower worldName) == "sauerland") exitwith {
|
||||
[
|
||||
[localize "str_disp_srvsetup_random",[[15448,8466,0],[19488,7462,0],[19478,12440,0],[20210,14501,0],[16453,6895,0],[19666,10377,0],[11000,10157,0],[10669,13320,0],[11349,12225,0],[12104,8936,0],[12879,14983,0]],0,0,1],
|
||||
["Buersfeld",[15448,8466,0],0,0],
|
||||
["Hoeinghausen",[19488,7462,0],0,0],
|
||||
["Berghausen",[19478,12440,0],0,0],
|
||||
["Heggen",[20210,14501,0],0,0],
|
||||
["Heidermuehle",[16453,6895,0],0,0],
|
||||
["Remblinghausen",[19666,10377,0],0,0],
|
||||
["Schueren",[11000,10157,0],0,0],
|
||||
["Schmallenberg",[10669,13320,0],0,0],
|
||||
["Calle",[11349,12225,0],0,0],
|
||||
["Oberdorf",[12104,8936,0],0,0],
|
||||
["Burg Calle",[12879,14983,0],0,0],
|
||||
// Above are defaults
|
||||
["Strelingen",[3437,18843,0],0,0],
|
||||
["Berghoven",[18734,21955,0],0,0],
|
||||
["Oeventrop",[8668,22650,0],0,0],
|
||||
["Arnsberg",[1134,24264,0],0,0],
|
||||
["Suederbarup",[13260,543,0],0,0],
|
||||
["Osterholz",[2580,8344,0],0,0],
|
||||
["Uhlenbusch",[4092,12942,0],0,0],
|
||||
["Ihrhofen",[9640,19193,0],0,0],
|
||||
["Old Airfield",[17253,2167,0],0,0]
|
||||
]
|
||||
};
|
||||
if ((toLower worldName) == "panthera2") exitwith {
|
||||
[
|
||||
[localize "str_disp_srvsetup_random",[[2354,5213,0],[3281,3348,0],[4793,1862,0],[5969,944,0],[7873,1403,0],[8425,3152,0],[8679,5043,0],[7961,4949,0],[6420,6127,0],[4823,6512,0],[3354,6649,0],[5549,7227,0],[4624,8042,0],[2267,9042,0],[1062,9359,0],[1646,8814,0],[5406,3876,0],[7883,1936,0],[7022,1134,0],[5840,2363,0],[2688,3400,0]],0,0,1],
|
||||
["Sella Nevea",[2354,5213,0],0,0],
|
||||
["Kobarid",[3281,3348,0],0,0],
|
||||
["Taff Grove",[4793,1862,0],0,0],
|
||||
["Zappado",[5969,944,0],0,0],
|
||||
["New Skooma",[7873,1403,0],0,0],
|
||||
["Zelezniki",[8425,3152,0],0,0],
|
||||
["Begunje",[8679,5043,0],0,0],
|
||||
["Bled",[7961,4949,0],0,0],
|
||||
["Mojstrana",[6420,6127,0],0,0],
|
||||
["Podkoren",[4823,6512,0],0,0],
|
||||
["Tarvisio",[3354,6649,0],0,0],
|
||||
// Above are defaults
|
||||
["Hoopsberg",[5549,7227,0],0,0],
|
||||
["Arnoldstein",[4624,8042,0],0,0],
|
||||
["Mello",[2267,9042,0],0,0],
|
||||
["Vatra",[1062,9359,0],0,0],
|
||||
["Borna",[1646,8814,0],0,0],
|
||||
["Ukanc",[5406,3876,0],0,0],
|
||||
["Smugglers Den",[7883,1936,0],0,0],
|
||||
["Foxhill",[7022,1134,0],0,0],
|
||||
["Koritnica",[5840,2363,0],0,0],
|
||||
["FOB Boriana",[2688,3400,0],0,0]
|
||||
]
|
||||
};
|
||||
if ((toLower worldName) == "smd_sahrani_a2") exitwith {
|
||||
[
|
||||
[localize "str_disp_srvsetup_random",[[11369,5348,0],[9343,5953,0],[7645,6408,0],[12369,7108,0],[9131,8319,0],[10697,9490,0],[13197,8848,0],[14307,12496,0],[9763,14424,0],[10690,16186,0],[17314,14304,0],[18952,13913,0],[4541,15297,0],[9691,11021,0],[8311,9058,0],[2106,2679,0],[7767,15806,0],[6222,17336,0],[14230,1691,0]],0,0,1],
|
||||
["Parato",[11369,5348,0],0,0],
|
||||
["Cayo",[9343,5953,0],0,0],
|
||||
["Arcadia",[7645,6408,0],0,0],
|
||||
["Ortego",[12369,7108,0],0,0],
|
||||
["Somato",[9131,8319,0],0,0],
|
||||
["Paraiso",[10697,9490,0],0,0],
|
||||
["Corazol",[13197,8848,0],0,0],
|
||||
["Bagango",[14307,12496,0],0,0],
|
||||
["Pacamac",[9763,14424,0],0,0],
|
||||
["Mataredo",[10690,16186,0],0,0],
|
||||
["Masbete",[17314,14304,0],0,0],
|
||||
["Pita",[18952,13913,0],0,0],
|
||||
["Isla Del Vassal",[4541,15297,0],0,0],
|
||||
["Rashidah",[9691,11021,0],0,0],
|
||||
["Chantico",[8311,9058,0],0,0],
|
||||
["Rahmadi",[2106,2679,0],0,0],
|
||||
["Hunapu",[7767,15806,0],0,0],
|
||||
["Cabo Valiente",[6222,17336,0],0,0]
|
||||
]
|
||||
};
|
||||
};
|
@ -1,7 +1,11 @@
|
||||
if (player distance respawn_west_original < 100) then {
|
||||
// Ground spawn
|
||||
player setPosATL _grid;
|
||||
if (surfaceIsWater respawn_west_original) then {player call fn_exitSwim;};
|
||||
if (surfaceIsWater respawn_west_original) then {
|
||||
player allowDamage false;
|
||||
player call fn_exitSwim;
|
||||
player allowDamage true;
|
||||
};
|
||||
|
||||
// Show infoText if not in HALO spawn
|
||||
_nearestCity = nearestLocations [_grid, ["NameCityCapital","NameCity","NameVillage","NameLocal"],1000];
|
||||
|
@ -19,7 +19,6 @@ if (!class_epoch) then { //Undefined variables in vanilla
|
||||
DZE_HaloJump = false;
|
||||
DZE_HaloOpenChuteHeight = 180;
|
||||
DZE_HaloSpawnHeight = 2000;
|
||||
Z_MoneyVariable = "cashMoney";
|
||||
};
|
||||
|
||||
if (spawn_selection) then {
|
||||
|
@ -144,7 +144,7 @@ if (class_selection && !_isPZombie) then {
|
||||
[_bweps,3,_bag] call class_fillItems;
|
||||
};
|
||||
|
||||
if (_onBack != "") then {dayz_onBack = _onBack;};
|
||||
if (_onBack != "") then {dayz_onBack = _onBack;player setVariable ["dayz_onBack",dayz_onBack,true];};
|
||||
|
||||
_main = primaryWeapon player;
|
||||
if (_main == "") then {
|
||||
@ -166,10 +166,11 @@ if (class_selection && !_isPZombie) then {
|
||||
case (count class_choice > 0): {class_choice select 8}; //Custom loadout by UID
|
||||
default {0};
|
||||
};
|
||||
|
||||
_wealth = player getVariable [Z_MoneyVariable,0];
|
||||
if (_wealth < _coins) then {
|
||||
player setVariable [Z_MoneyVariable,(_wealth + _coins),true];
|
||||
if (Z_SingleCurrency) then {
|
||||
_wealth = player getVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),0];
|
||||
if (_wealth < _coins) then {
|
||||
player setVariable [(["cashMoney","globalMoney"] select Z_persistentMoney),(_wealth + _coins),true];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user