This commit is contained in:
2023-10-01 20:58:19 +03:00
parent 6268a86c47
commit 6576a3ab6f
53 changed files with 1249 additions and 508 deletions

View File

@ -31,10 +31,10 @@ DZE_DeathMsgDynamicText = false; // Display death messages as dynamicText in the
DZE_DeathMsgRolling = false; // Display death messages as rolling messages in bottom center of screen.
// ZSC
Z_SingleCurrency = false; // Enable single currency system.
Z_SingleCurrency = true; // Enable single currency system.
Z_globalBanking = true; // Enable global banking system.
if (Z_SingleCurrency) then {
Z_globalBanking = false; // Enable global banking system.
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"]
@ -132,7 +132,7 @@ if (isServer) then {
dayz_ghostTimer = 120;
// ZSC
Z_globalBankingTraders = false; // Enable banking NPCs at trader cities.
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.

View 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;
};
};

View File

@ -0,0 +1,6 @@
/*
DZAI Version Identifier File
*/
#define DZAI_CLIENT_TYPE "DZAI Client Addon"
#define DZAI_CLIENT_VERSION "1.0.0"

View File

@ -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;

View File

@ -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)];
};
};

View File

@ -49,8 +49,4 @@ if (!isDedicated) then {
vg_limit = [["350z_red",2],["Land",5],["AH1Z",1],["Air",3],["Ship",1]];
vg_limit = 5;
*/
};
Z_singleCurrency = true;
Z_globalBanking = true;
Z_globalBankingTraders = true;
};

View File

@ -94,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.
@ -195,26 +195,27 @@ if (!isServer) then {
if (!isDedicated) then {
call compile preprocessFileLineNumbers "\z\addons\dayz_code\system\mission\server_traders\napf.sqf";
call compile preprocessFileLineNumbers "logistic\init.sqf";
call compile preprocessFileLineNumbers "logistic\init.sqf";
if (toLower worldName in ["chernarus","chernarus_winter"]) then {
execVM "\z\addons\dayz_code\system\mission\chernarus\hideGlitchObjects.sqf";
};
//[] execVM "Stats\j0k3r5_stats.sqf";
//[] execVM "Stats\j0k3r5_stats.sqf";
// Enables Plant lib fixes
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.

View File

@ -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]
]
};
};

View File

@ -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];

View File

@ -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 {

View File

@ -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,11 +166,12 @@ 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];
};
};
};
if (spawn_selection) then {