Initial
This commit is contained in:
.gitignore24_napf.bat24_napf.cfgrules.sqf
@DayZ_Epoch_Server
HiveExt.dll
addons
dayz_server.pbo
dayz_server
$PREFIX$
AdminTools
DZAI
SHK_pos
shk_pos_fnc_findclosestposition.sqfshk_pos_fnc_getmarkercorners.sqfshk_pos_fnc_getmarkershape.sqfshk_pos_fnc_getpos.sqfshk_pos_fnc_getposfromcircle.sqfshk_pos_fnc_getposfromellipse.sqfshk_pos_fnc_getposfromrectangle.sqfshk_pos_fnc_getposfromsquare.sqfshk_pos_fnc_isblacklisted.sqfshk_pos_fnc_isincircle.sqfshk_pos_fnc_isinellipse.sqfshk_pos_fnc_isinrectangle.sqfshk_pos_fnc_issameposition.sqfshk_pos_fnc_rotateposition.sqfshk_pos_getpos.sqfshk_pos_getposmarker.sqfshk_pos_init.sqf
compile
BIN_taskPatrol.sqfai_alertzombies.sqfai_death.sqfai_fired.sqfai_generate_loot.sqfai_killed_air.sqfai_killed_all.sqfai_killed_dynamic.sqfai_killed_land.sqfai_killed_random.sqfai_killed_static.sqfai_setup_loadout.sqfai_unconscious.sqfcreateRandomSpawns.sqffn_abortdynspawn.sqffn_abortrandspawn.sqffn_checkclassname.sqffn_countkills.sqffn_createStaticSpawn.sqffn_customSpawnUnits.sqffn_damageHandlerAI2.sqffn_findKiller.sqffn_findspawnpos.sqffn_init_trigger.sqffn_refreshmarker.sqffn_seekPlayer.sqffn_selectRandom.sqffn_selectRandomWeighted.sqffn_skillboost.sqffn_spawnGroup.sqfgroup_manager.sqfheli_airlanding.sqfheli_awareness.sqfheli_destroyed.sqfheli_detectplayers.sqfheli_handledamage.sqfheli_parachute.sqfheli_randompatrol.sqfheli_reinforce.sqfveh_destroyed.sqfveh_handledamage.sqfveh_randompatrol.sqfveh_regroup.sqf
init
DZAI_version.txtdzai_config.sqfdzai_functions.sqfdzai_initserver.sqf
world_classname_configs
#readme - Read this before editing classnames.txtdayz_epoch.sqfdayz_huntinggrounds.sqfdayz_overwatch.sqfdayz_unleashed.sqf
default_classnames
world_spawn_configs
#readme - directory guide and custom spawn info.txt
custom_markers
cust_markers_caribou.sqfcust_markers_chernarus.sqfcust_markers_cmr_ovaron.sqfcust_markers_fallujah.sqfcust_markers_isladuala.sqfcust_markers_lingor.sqfcust_markers_mbg_celle2.sqfcust_markers_namalsk.sqfcust_markers_napf.sqfcust_markers_oring.sqfcust_markers_panthera2.sqfcust_markers_podagorsk.sqfcust_markers_sara.sqfcust_markers_sauerland.sqfcust_markers_takistan.sqfcust_markers_tavi.sqfcust_markers_trinity.sqfcust_markers_utes.sqfcust_markers_zargabad.sqf
custom_spawns
cust_spawns_caribou.sqfcust_spawns_chernarus.sqfcust_spawns_cmr_ovaron.sqfcust_spawns_fallujah.sqfcust_spawns_isladuala.sqfcust_spawns_lingor.sqfcust_spawns_mbg_celle2.sqfcust_spawns_namalsk.sqfcust_spawns_napf.sqfcust_spawns_oring.sqfcust_spawns_panthera2.sqfcust_spawns_podagorsk.sqfcust_spawns_sara.sqfcust_spawns_sauerland.sqfcust_spawns_takistan.sqfcust_spawns_tavi.sqfcust_spawns_trinity.sqfcust_spawns_utes.sqfcust_spawns_zargabad.sqf
spawn_areas
areas_caribou.sqfareas_chernarus.sqfareas_napf.sqfareas_podagorsk.sqfareas_sauerland.sqfareas_taviana.sqfareas_trinity.sqf
spawn_markers
markers_caribou.sqfmarkers_chernarus.sqfmarkers_cmr_ovaron.sqfmarkers_fallujah.sqfmarkers_isladuala.sqfmarkers_lingor.sqfmarkers_mbg_celle2.sqfmarkers_namalsk.sqfmarkers_napf.sqfmarkers_oring.sqfmarkers_panthera2.sqfmarkers_podagorsk.sqfmarkers_sara.sqfmarkers_sauerland.sqfmarkers_takistan.sqfmarkers_tavi.sqfmarkers_trinity.sqfmarkers_utes.sqfmarkers_zargabad.sqf
world_caribou.sqfworld_chernarus.sqfworld_cmr_ovaron.sqfworld_dayzunleashed.sqfworld_fallujah.sqfworld_fdf_isle1_a.sqfworld_isladuala.sqfworld_lingor.sqfworld_mbg_celle2.sqfworld_namalsk.sqfworld_napf.sqfworld_oring.sqfworld_panthera2.sqfworld_sara.sqfworld_sauerland.sqfworld_smd_sahrani_a2.sqfworld_takistan.sqfworld_tavi.sqfworld_tavi_old.sqfworld_trinity.sqfworld_utes.sqfworld_zargabad.sqfscripts
DZAI_serverMonitor.sqfDZAI_startup.sqfbuildWeaponArrays.sqfbuildWeightedTables.sqfbuildingpatch_all.sqfdynamicSpawn_manager.sqfsetup_autoStaticSpawns.sqfsetup_blacklist_areas.sqfsetup_locations.sqfsetup_playerspawn_areas.sqfsetup_veh_patrols.sqfverifyTables.sqf
spawn_functions
despawnBandits.sqfdespawnBandits_dynamic.sqfdespawnBandits_random.sqfrespawnBandits.sqfrespawnHandler1.sqfrespawnHandler2.sqfspawnBandits.sqfspawnBandits_custom.sqfspawnBandits_dynamic.sqfspawnBandits_dynamicV2.sqfspawnBandits_initialize.sqfspawnBandits_random.sqfspawnVehiclePatrol.sqfspawnVehicle_custom.sqf
DZMS
DZMSConfig.sqfDZMSInit.sqf
ExtConfig
Missions
AN2_Cargo_Drop.sqfAPC_Mission.sqfArmed_Vehicles.sqfC130_Crash.sqfConstruction_Site.sqfFirebase.sqfGeneral_Store.sqfHelicopter_Crash.sqfHelicopter_Landing.sqfHumvee_Crash.sqfMedical_Cache.sqfMedical_Camp.sqfMedical_Outpost.sqfSMA1.sqfSMA2.sqfSMA3.sqfSMA4.sqfSMA5.sqfSMA6.sqfSMI1.sqfSMI2.sqfSMI3.sqfSMI4.sqfSMI5.sqfSMI6.sqfSquad.sqfStash_House.sqfUral_Ambush.sqfWeapons_Cache.sqfWeapons_Truck.sqf
Scripts
WAI
compile
airdrop_winorfail.sqfauto_claim.sqfcustom_publish_vehicle.sqfdynamic_crate.sqffind_position.sqffunctions.sqfgroup_waypoints.sqfheli_para.sqfheli_patrol.sqfload_ammo.sqfminefield.sqfmission_winorfail.sqfon_kill.sqfpatrol_winorfail.sqfposition_functions.sqfspawn_group.sqfspawn_objects.sqfspawn_static.sqfstatic_spawn_manager.sqfvehicle_patrol.sqf
config.sqfconfigs
init.sqfmissions
MISSION_EXAMPLE.sqfMISSION_EXAMPLE_WITH_SINGLE_SPAWN_POINT.sqf
missions
abandoned_trader.sqfapc.sqfarmed_vehicle.sqfarmybase.sqfbase.sqfblack_hawk_crash.sqfbroken_down_ural.sqfcannibal_cave.sqfcaptured_mv22.sqfcargo.sqfcastle_grayskull.sqfcrop_raider.sqfdrone_pilot.sqfdrugbust.sqffallen_satellite.sqffarmer.sqffirestation.sqfgem_tower.sqfgold_mine.sqfikea_convoy.sqfjunkyard.sqflumberjack.sqfmacdonald.sqfmayors_mansion.sqfmedi_camp.sqfoil_depot.sqfoutpost.sqfpatrol.sqfpresidents_mansion.sqfradioshack.sqfrefugee.sqfscout_patrol.sqfslaughter_house.sqfsniper_extraction.sqftankcolumn.sqfvehicle_drop.sqfweapon_cache.sqfwuhan_lab.sqf
static
bankTraders
compile
EAT_crateSpawn.sqfEAT_serverAiSpawn.sqfEAT_vehSpawn.sqfKK_Functions.sqf
config.cppgarage
init.sqfserver_maintainVehicles.sqfserver_queryVehicle.sqfserver_spawnVehicle.sqfserver_storeVehicle.sqf
server_changeCode.sqfserver_checkIfTowed.sqfserver_deleteObj.sqfserver_deleteObjDirect.sqfserver_handleSafeGear.sqfserver_maintainArea.sqfserver_onPlayerDisconnect.sqfserver_plantSpawner.sqfserver_playerDeaths.sqfserver_playerDied.sqfserver_playerLogin.sqfserver_playerSetup.sqfserver_playerSync.sqfserver_publishObject.sqfserver_publishVehicle.sqfserver_publishVehicle2.sqfserver_publishVehicle3.sqfserver_spawnTraders.sqfserver_swapObject.sqfserver_toggle_debug.hppserver_tradeObject.sqfserver_updateObject.sqfserver_verifySender.sqfspawn_ammosupply.sqfspawn_mineveins.sqfspawn_roadblocks.sqfspawn_vehicles.sqfui_selectSlot.sqfupdateObject_functions.sqfzombie_Wildgenerate.sqfzombie_findOwner.sqfeventHandlers
init
modules
Care_Packages.sqfCrashSites.sqfInfected_Camps.sqfabandoned_vaults.sqfbuilding_supplies.sqfdrop_bombs.sqffuelstationbomb.sqflabyrinth.sqfmechanics_truck.sqfpirate_treasure.sqfrubble_town.sqfspecial_forces.sqfun_supply.sqf
system
dynamic_vehicle.sqflit_fireplaces.sqf
scheduler
sched_corpses.sqfsched_dzms.sqfsched_event.sqfsched_init.sqfsched_lootpiles.sqfsched_safetyVehicle.sqfsched_sync.sqfsched_traps.sqfsched_wai.sqf
server_monitor.sqfserver_vehicleSync.fsmserver_weather.fsmtraders
BattlEye
BEClient.dllBELauncher.iniBEServer.cfgBEServer.dllBEService.exeBEService_x64.exeBE_AEG.exeaddbackpackcargo.txtaddmagazinecargo.txtaddweaponcargo.txtattachto.txtbeserver.socreatevehicle.txtdeleteVehicle.txtmpeventhandler.txtpublicvariable.txtpublicvariableval.txtremotecontrol.txtremoteexec.txtscripts.txtselectplayer.txtsetdamage.txtsetpos.txtsetvariable.txtsetvariableval.txtteamswitch.txtwaypointcondition.txtwaypointstatement.txt
DatabaseMySql.dllDatabasePostgre.dllEATadminLogger.dllEATbaseExporter.dllHiveExt.iniKeys
MPMissions/DayZ_Epoch_24.Napf
ActionMenu
actionmenu_activate.sqfactionmenu_execute.sqfactionmenu_main.sqf
donations
fog
1000.sqf10000.sqf1250.sqf1500.sqf1750.sqf2000.sqf20000.sqf250.sqf2500.sqf3000.sqf4000.sqf500.sqf5000.sqf750.sqf
sky
tools
CfgServerTraderZSC
Category
AirVehicles.hppAmmunition.hppBandit.hppBlackMarket.hppBoats.hppCurrency.hppGeneralStore.hppHero.hppMedicalSupplies.hppParts.hppVehicles.hppWeapons.hppWholesale.hpp
DayZ Epoch Currency Values.txtcfgServerTrader.hppStats
dayz_code
description.extdialog.hppinit.sqflogistic
mission.sqmrlnt
client/init
dialogs
functions
scripts/Weapon HUD
scripts
clickActions
deployAnything
locateVehicle.sqfmarker_manager.sqfremoteVehicle
safe_zones.sqfservicePoints
takeClothes.sqfvirtualGarage
player_MaintainVG.sqfplayer_getVehicle.sqfplayer_removePad.sqfplayer_storeVehicle.sqfvehicleInfo.sqfvirtualGarage.hppvirtualGarage.sqf
vkc
spawn
config.sqfdialogs.hpp
stringtable.xmlfunctions
class_fillItems.sqfclass_fillList.sqfclass_pick.sqfclass_preview.sqfclass_randomMags.sqfclass_randomTools.sqfclass_wipeGear.sqfcleanup.sqffinish.sqfspawn_fill.sqfspawn_map.sqfspawn_pick.sqf
init.sqfmain.sqfUsers/server
epoch.sql
53
@DayZ_Epoch_Server/addons/dayz_server/init/mission_check.sqf
Executable file
53
@DayZ_Epoch_Server/addons/dayz_server/init/mission_check.sqf
Executable file
@ -0,0 +1,53 @@
|
||||
//Temporary check for A2OA mission override exploit.
|
||||
//This bug should be fixed in the next EOL patch.
|
||||
//Put this code at the bottom of dayz_server\init\server_functions.sqf
|
||||
|
||||
//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'
|
||||
];
|
||||
|
||||
_list = [];
|
||||
{
|
||||
_file = toArray (toLower(preprocessFile _x));
|
||||
_sum = 0;
|
||||
_count = {_sum = _sum + _x; true} count _file;
|
||||
if (_count > 999999) then {_count = _count mod 999999}; //Prevent scientific notation when converting to string below
|
||||
if (_sum > 999999) then {_sum = _sum mod 999999};
|
||||
_list set [count _list,[_count,_sum]];
|
||||
} forEach _files;
|
||||
|
||||
//Check mission integrity on all clients
|
||||
_temp = "HeliHEmpty" createVehicle [0,0,0];
|
||||
_temp setVehicleInit (str formatText["
|
||||
if (isServer) exitWith {};
|
||||
|
||||
_list = [];
|
||||
{
|
||||
_file = toArray (toLower(preprocessFile _x));
|
||||
_sum = 0;
|
||||
_count = {_sum = _sum + _x; true} count _file;
|
||||
if (_count > 999999) then {_count = _count mod 999999};
|
||||
if (_sum > 999999) then {_sum = _sum mod 999999};
|
||||
_list set [count _list,[_count,_sum]];
|
||||
} forEach %1;
|
||||
|
||||
_file = -1;
|
||||
{
|
||||
if ((_x select 0 != (_list select _forEachIndex) select 0) or (_x select 1 != (_list select _forEachIndex) select 1)) then {
|
||||
_file = _forEachIndex;
|
||||
};
|
||||
} forEach %2;
|
||||
|
||||
if (_file != -1) then {
|
||||
MISSION_CHECK = if ((_list select _file) select 0 < 49999) then {preprocessFileLineNumbers (%1 select _file)} else {'TOO BIG'};
|
||||
publicVariableServer 'MISSION_CHECK';
|
||||
[] spawn {
|
||||
uiSleep 1;
|
||||
{(findDisplay _x) closeDisplay 2;} count [0,8,12,18,46,70];
|
||||
};
|
||||
};
|
||||
",_files,_list]);
|
||||
|
||||
processInitCommands;
|
246
@DayZ_Epoch_Server/addons/dayz_server/init/server_functions.sqf
Executable file
246
@DayZ_Epoch_Server/addons/dayz_server/init/server_functions.sqf
Executable file
@ -0,0 +1,246 @@
|
||||
#include "\z\addons\dayz_server\adminTools\init.sqf"
|
||||
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
||||
|
||||
waitUntil {!isNil "bis_fnc_init"};
|
||||
|
||||
BIS_MPF_remoteExecutionServer = {
|
||||
if ((_this select 1) select 2 == "JIPrequest") then {
|
||||
[nil,(_this select 1) select 0,"loc",rJIPEXEC,[any,any,"per","execVM","ca\Modules\Functions\init.sqf"]] call RE;
|
||||
};
|
||||
};
|
||||
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\util\compile.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_code\loot\init.sqf";
|
||||
|
||||
BIS_Effects_Burn = {};
|
||||
dayz_disconnectPlayers = [];
|
||||
dayz_serverKey = [59]; //makes sure client is kicked by publicvariableval.txt if they try to send it
|
||||
for "_i" from 1 to 12 do {
|
||||
dayz_serverKey set [_i, ceil(random 128)];
|
||||
};
|
||||
dayz_serverKey = toString dayz_serverKey;
|
||||
server_playerLogin = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerLogin.sqf";
|
||||
server_playerSetup = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSetup.sqf";
|
||||
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_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
|
||||
server_deleteObjDirect = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_deleteObjDirect.sqf"; //Removes the object from the DB, NO AUTH, ONLY CALL FROM SERVER, NO PV ACCESS
|
||||
server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerSync.sqf";
|
||||
zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";
|
||||
//server_Wildgenerate = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_Wildgenerate.sqf";
|
||||
base_fireMonitor = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\fire_monitor.sqf";
|
||||
spawnComposition = compile preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf"; //"\z\addons\dayz_code\compile\object_mapper.sqf";
|
||||
server_sendToClient = compile preprocessFileLineNumbers "\z\addons\dayz_server\eventHandlers\server_sendToClient.sqf";
|
||||
server_verifySender = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_verifySender.sqf";
|
||||
|
||||
// EPOCH ADDITIONS
|
||||
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
|
||||
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";
|
||||
server_checkIfTowed = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_checkIfTowed.sqf";
|
||||
server_handleSafeGear = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_handleSafeGear.sqf";
|
||||
server_spawnTraders = compile preprocessFile "\z\addons\dayz_server\compile\server_spawnTraders.sqf";
|
||||
server_updateGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\server_updateGroup.sqf";
|
||||
server_changeCode = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_changeCode.sqf";
|
||||
|
||||
spawn_ammosupply = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\spawn_ammosupply.sqf";
|
||||
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
|
||||
};
|
||||
|
||||
vehicle_handleServerKilled = {
|
||||
local _unit = _this select 0;
|
||||
|
||||
[_unit,"killed",false,false,"SERVER",dayz_serverKey] call server_updateObject;
|
||||
_unit removeAllMPEventHandlers "MPKilled";
|
||||
_unit removeAllEventHandlers "Killed";
|
||||
_unit removeAllEventHandlers "HandleDamage";
|
||||
_unit removeAllEventHandlers "GetIn";
|
||||
_unit removeAllEventHandlers "GetOut";
|
||||
};
|
||||
|
||||
check_publishobject = {
|
||||
local _object = _this select 0;
|
||||
local _playername = _this select 1;
|
||||
local _allowed = false;
|
||||
|
||||
#ifdef OBJECT_DEBUG
|
||||
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 {
|
||||
_allowed = true;
|
||||
};
|
||||
|
||||
#ifdef OBJECT_DEBUG
|
||||
local _saveObject = "DayZ_SafeObjects";
|
||||
diag_log format["DEBUG: Object: %1 published by %2 is allowed by %3",_object,_playername,_saveObject];
|
||||
#endif
|
||||
|
||||
_allowed
|
||||
};
|
||||
|
||||
server_hiveWrite = {
|
||||
//diag_log ("ATTEMPT WRITE: " + _this);
|
||||
local _data = "HiveExt" callExtension _this;
|
||||
//diag_log ("WRITE: " +str(_data));
|
||||
};
|
||||
|
||||
server_hiveReadWrite = {
|
||||
local _key = _this;
|
||||
//diag_log ("ATTEMPT READ/WRITE: " + _key);
|
||||
local _data = "HiveExt" callExtension _key;
|
||||
//diag_log ("READ/WRITE: " +str(_data));
|
||||
local _resultArray = call compile str formatText["%1", _data];
|
||||
if (isNil "_resultArray") then {_resultArray = "HIVE CONNECTION ERROR";};
|
||||
_resultArray
|
||||
};
|
||||
|
||||
onPlayerDisconnected "[_uid,_name] call server_onPlayerDisconnect;";
|
||||
|
||||
server_getStatsDiff = {
|
||||
local _player = _this select 0;
|
||||
local _playerUID = _this select 1;
|
||||
local _result = [];
|
||||
local _statsArray = missionNamespace getVariable _playerUID;
|
||||
local _new = 0;
|
||||
local _old = 0;
|
||||
|
||||
if (isNil "_statsArray") exitWith {
|
||||
diag_log format["Server_getStatsDiff error: playerUID %1 not found on server",_playerUID];
|
||||
[0,0,0,0,0]
|
||||
};
|
||||
|
||||
{
|
||||
_new = _player getVariable [_x,0];
|
||||
_old = _statsArray select _forEachIndex;
|
||||
_result set [_forEachIndex, (_new - _old)];
|
||||
_statsArray set [_forEachIndex, _new]; //updates original var too
|
||||
} forEach ["humanity","zombieKills","headShots","humanKills","banditKills"];
|
||||
|
||||
#ifdef PLAYER_DEBUG
|
||||
diag_log format["Server_getStatsDiff - Object:%1 Diffs:%2 New:%3",_player,_result,_statsArray];
|
||||
#endif
|
||||
|
||||
_result
|
||||
};
|
||||
|
||||
//seems max is 19 digits
|
||||
dayz_objectUID2 = {
|
||||
local _dir = _this select 0;
|
||||
local _time = round diag_tickTime;
|
||||
if (_time > 99999) then {_time = round(random 99999);}; //prevent overflow if server isn't restarted
|
||||
local _key = "";
|
||||
local _position = _this select 1;
|
||||
_key = format["%1%2%3%4", round(_time + abs(_position select 0)), round(_dir), round(abs(_position select 1)), _time];
|
||||
_key;
|
||||
};
|
||||
|
||||
dayz_recordLogin = {
|
||||
local _key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
|
||||
_key call server_hiveWrite;
|
||||
|
||||
local _status = call {
|
||||
if ((_this select 2) == 0) exitwith { "CLIENT LOADED & PLAYING" };
|
||||
if ((_this select 2) == 1) exitwith { "LOGIN PUBLISHING, Location " +(_this select 4) };
|
||||
if ((_this select 2) == 2) exitwith { "LOGGING IN" };
|
||||
if ((_this select 2) == 3) exitwith { "LOGGED OUT, Location " +(_this select 4) };
|
||||
};
|
||||
|
||||
local _name = if (typeName (_this select 3) == "ARRAY") then { toString (_this select 3) } else { _this select 3 };
|
||||
diag_log format["INFO - Player: %1(UID:%3/CID:%4) Status: %2",_name,_status,(_this select 0),(_this select 1)];
|
||||
};
|
||||
|
||||
generate_new_damage = {
|
||||
local _damage = ((random(DynamicVehicleDamageHigh-DynamicVehicleDamageLow))+DynamicVehicleDamageLow) / 100;
|
||||
_damage
|
||||
};
|
||||
|
||||
server_hiveReadWriteLarge = {
|
||||
local _key = _this;
|
||||
local _data = "HiveExt" callExtension _key;
|
||||
local _resultArray = call compile _data;
|
||||
_resultArray
|
||||
};
|
||||
|
||||
// coor2str: convert position to a GPS coordinates
|
||||
fa_coor2str = {
|
||||
local _pos = +(_this);
|
||||
if (count _pos < 1) then {
|
||||
_pos = [0,0];
|
||||
} else {
|
||||
if (count _pos < 2) then { _pos = [_pos select 0,0]; };
|
||||
};
|
||||
local _nearestCity = nearestLocations [_pos, ["NameCityCapital","NameCity","NameVillage","NameLocal"],1000];
|
||||
local _town = "Wilderness";
|
||||
if (count _nearestCity > 0) then {_town = text (_nearestCity select 0)};
|
||||
local _res = format["%1 [%2]", _town, mapGridPosition _pos];
|
||||
|
||||
_res
|
||||
};
|
||||
|
||||
// print player player PID and name. If name unknown then print UID.
|
||||
fa_plr2str = {
|
||||
local _y = _this;
|
||||
local _res = "nobody";
|
||||
if (!isNil "_y") then {
|
||||
local _name = _y getVariable ["bodyName", nil];
|
||||
if ((isNil "_name" OR {(_name == "")}) AND ({alive _y})) then { _name = name _y; };
|
||||
if (isNil "_name" OR {(_name == "")}) then { _name = "UID#"+(getPlayerUID _y); };
|
||||
_res = format["PID#%1(%2)", owner _y, _name ];
|
||||
};
|
||||
_res
|
||||
};
|
||||
|
||||
array_reduceSize = {
|
||||
local _array1 = _this select 0;
|
||||
local _array = _array1 - ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Bat_Swing","BatBarbed_Swing","BatNails_Swing","Fishing_Swing","Sledge_Swing","CSGAS"];
|
||||
local _count = _this select 1;
|
||||
local _num = count _array;
|
||||
if (_num > _count) then {
|
||||
_array resize _count;
|
||||
};
|
||||
_array
|
||||
};
|
||||
|
||||
// Precise base building 1.0.5
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\kk_functions.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\eventHandlers\server_eventHandler.sqf";
|
||||
#include "mission_check.sqf"
|
||||
|
||||
#include "spawn_config.sqf"
|
||||
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\init.sqf";
|
||||
call compile preprocessFileLineNumbers "\z\addons\dayz_server\DZMS\DZMSInit.sqf";
|
132
@DayZ_Epoch_Server/addons/dayz_server/init/spawn_config.sqf
Executable file
132
@DayZ_Epoch_Server/addons/dayz_server/init/spawn_config.sqf
Executable file
@ -0,0 +1,132 @@
|
||||
/*
|
||||
ESSV3 Server Side Config
|
||||
|
||||
For detailed information about these variables see:
|
||||
https://github.com/ebayShopper/ESSV3/blob/master/DOCUMENTATION.md
|
||||
*/
|
||||
class_level1 = ["0","0","0"];
|
||||
class_level2 = ["0","0","0"];
|
||||
class_level3 = ["0","0","0"];
|
||||
class_levelCount = 3; //If you add more class levels then increase this number.
|
||||
// To give higher level VIPs access to lower level VIP classes uncomment the two lines below:
|
||||
// class_level1 = class_level1 + class_level2 + class_level3;
|
||||
// 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"
|
||||
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"]
|
||||
];
|
||||
class_customLoadout = [
|
||||
"12345678900000000", // ebay
|
||||
"0",
|
||||
"0"
|
||||
];
|
||||
class_customLoadouts = [ // These are only visible to their owner
|
||||
["ebay's Loadout","Bandit1_DZ","BanditW1_DZ",["100Rnd_762x51_M240",2,"15Rnd_9x19_M9SD",3,"Skin_Sniper1_DZ",VIP_ITEMS],["Mk48_CCO_DZ","M9_SD_DZ",VIP_TOOLS],"DZ_Backpack_EP1",["20Rnd_762x51_DMR",3],["DMR_DZ"],0,"MeleeHatchet"],
|
||||
[],
|
||||
[]
|
||||
];
|
||||
|
||||
spawn_level1 = ["0","0","0"];
|
||||
spawn_level2 = ["0","0","0"];
|
||||
spawn_level3 = ["0","0","0"];
|
||||
spawn_levelCount = 3; //If you add more spawn levels then increase this number.
|
||||
// To give higher level VIPs access to lower level VIP spawns uncomment the two lines below:
|
||||
// spawn_level1 = spawn_level1 + spawn_level2 + spawn_level3;
|
||||
// spawn_level2 = spawn_level2 + spawn_level3;
|
||||
|
||||
spawn_private = [ // These are only visible to players in their respective spawn levels
|
||||
//["VIP Base",[1607,7804,0],1,0],
|
||||
//["VIP Hideout",[12944,12767,0],2,0]
|
||||
];
|
||||
spawn_base = [
|
||||
"12345678900000000", // ebay
|
||||
"0",
|
||||
"0"
|
||||
];
|
||||
spawn_bases = [
|
||||
["ebay's base",[2300,15324,0]],
|
||||
[],
|
||||
[]
|
||||
];
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
The function below returns all private classes, private spawns, class levels and spawn levels the player has access to.
|
||||
The player is sent this data when they respawn.
|
||||
*/
|
||||
spawn_config = {
|
||||
private ["_classes","_classLevel","_classLevels","_freshSpawn","_index","_playerUID","_return","_spawnLevel","_spawnLevels","_spawns"];
|
||||
|
||||
_freshSpawn = _this select 0;
|
||||
_playerUID = _this select 1;
|
||||
|
||||
if (!_freshSpawn) exitWith {false};
|
||||
_return = [[],[],[],[]];
|
||||
|
||||
_index = class_customLoadout find _playerUID;
|
||||
if (_index != -1) then {
|
||||
_classes = _return select 0;
|
||||
_classes set [0,(class_customLoadouts select _index)];
|
||||
_return set [0,_classes];
|
||||
};
|
||||
|
||||
_index = spawn_base find _playerUID;
|
||||
if (_index != -1) then {
|
||||
_spawns = _return select 1;
|
||||
_spawns set [0,(spawn_bases select _index)];
|
||||
_return set [1,_spawns];
|
||||
};
|
||||
|
||||
_classLevels = [];
|
||||
_spawnLevels = [];
|
||||
for "_i" from 1 to class_levelCount do {
|
||||
if (_playerUID in (call compile format["class_level%1",_i])) then {
|
||||
_classLevels set [count _classLevels,_i];
|
||||
};
|
||||
};
|
||||
for "_i" from 1 to spawn_levelCount do {
|
||||
if (_playerUID in (call compile format["spawn_level%1",_i])) then {
|
||||
_spawnLevels set [count _spawnLevels,_i];
|
||||
};
|
||||
};
|
||||
_return set [2,_classLevels];
|
||||
_return set [3,_spawnLevels];
|
||||
|
||||
{
|
||||
_classLevel = _x select 8;
|
||||
if (typeName _classLevel == "ARRAY") then {_classLevel = _x select 19;}; //Random
|
||||
if (_classLevel == 0 or {_playerUID in (call compile format["class_level%1",_classLevel])}) then {
|
||||
_classes = _return select 0;
|
||||
_classes set [count _classes,_x];
|
||||
_return set [0,_classes];
|
||||
};
|
||||
} forEach class_private;
|
||||
|
||||
{
|
||||
_spawnLevel = _x select 2;
|
||||
if (_spawnLevel == 0 or {_playerUID in (call compile format["spawn_level%1",_spawnLevel])}) then {
|
||||
_spawns = _return select 1;
|
||||
_spawns set [count _spawns,_x];
|
||||
_return set [1,_spawns];
|
||||
};
|
||||
} forEach spawn_private;
|
||||
|
||||
_return
|
||||
};
|
||||
|
||||
//Allow extra skins in vanilla
|
||||
if !(isClass (configFile >> "CfgWeapons" >> "Chainsaw")) then {
|
||||
AllPlayers = AllPlayers + [
|
||||
"Citizen3","CZ_Soldier_DES_EP1","Rocket_DZ","TK_INS_Soldier_EP1",
|
||||
"US_Soldier_EP1","Villager1","Worker1"
|
||||
];
|
||||
};
|
||||
|
||||
//Not defined in 1.8.8
|
||||
respawn_west_original = getMarkerPos "respawn_west";
|
Reference in New Issue
Block a user