Initial
This commit is contained in:
commit
9d4fc88901
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/.idea
|
||||
/BattlEye/*.log
|
2
24_napf.bat
Executable file
2
24_napf.bat
Executable file
@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
start "arma2" /min /high arma2oaserver.exe -port=2302 "-config=D:\Dayz Epoch Server\24_napf.cfg" "-cfg=D:\Dayz Epoch Server\basic.cfg" "-profiles=D:\Dayz Epoch Server" -name=server "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;"
|
41
24_napf.cfg
Executable file
41
24_napf.cfg
Executable file
@ -0,0 +1,41 @@
|
||||
hostName = "DayZ Epoch Napf Server (1.0.7/144629)";
|
||||
password = "qwertyplm";
|
||||
passwordAdmin = "root";
|
||||
maxPlayers = 20;
|
||||
steamport = 2304;
|
||||
steamqueryport = 2303;
|
||||
|
||||
motd[] = {"DayZ Epoch","Have fun!"};
|
||||
motdInterval = 0;
|
||||
|
||||
logFile = "server_log.txt";
|
||||
voteThreshold = 2;
|
||||
voteMissionPlayers = 999;
|
||||
timeStampFormat = "short";
|
||||
|
||||
vonCodecQuality = 11;
|
||||
disableVoN = 0;
|
||||
kickduplicate = 1;
|
||||
verifySignatures = 2;
|
||||
persistent = 1;
|
||||
BattlEye = 0;
|
||||
requiredSecureId = 2;
|
||||
doubleIdDetected = "";
|
||||
|
||||
onUserConnected = "";
|
||||
onUserDisconnected = "";
|
||||
onUnsignedData = "kick (_this select 0)";
|
||||
onHackedData = "kick (_this select 0)";
|
||||
onDifferentData = "";
|
||||
|
||||
regularCheck = "";
|
||||
requiredBuild = 144629;
|
||||
class Missions
|
||||
{
|
||||
class Mission1
|
||||
{
|
||||
template = "DayZ_Epoch_24.Napf";
|
||||
difficulty="regular";
|
||||
};
|
||||
|
||||
};
|
BIN
@DayZ_Epoch_Server/HiveExt.dll
Executable file
BIN
@DayZ_Epoch_Server/HiveExt.dll
Executable file
Binary file not shown.
BIN
@DayZ_Epoch_Server/addons/dayz_server.pbo
Executable file
BIN
@DayZ_Epoch_Server/addons/dayz_server.pbo
Executable file
Binary file not shown.
1
@DayZ_Epoch_Server/addons/dayz_server/$PREFIX$
Executable file
1
@DayZ_Epoch_Server/addons/dayz_server/$PREFIX$
Executable file
@ -0,0 +1 @@
|
||||
z\addons\dayz_server
|
56
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Admin/activate.sqf
Executable file
56
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Admin/activate.sqf
Executable file
@ -0,0 +1,56 @@
|
||||
dayz_antihack = 0; // Disable vanilla antihack for admins
|
||||
|
||||
// Initialize Variables
|
||||
#include "\z\addons\dayz_server\AdminTools\Admin\config.sqf"
|
||||
#include "\z\addons\dayz_server\AdminTools\Admin\functions.sqf"
|
||||
#include "\z\addons\dayz_server\AdminTools\Admin\main.sqf"
|
||||
|
||||
|
||||
[] spawn {
|
||||
waitUntil {uiSleep 0.1;(!isNil "Dayz_loginCompleted" && !isNil "keyboard_keys")};
|
||||
|
||||
EAT_Keybind = {
|
||||
private ["_option","_handled"];
|
||||
#include "\ca\editor\Data\Scripts\dikCodes.h"
|
||||
|
||||
_option = _this select 0;
|
||||
_handled = false;
|
||||
|
||||
call
|
||||
{
|
||||
if (_option == "AdminMenu") exitWith {keyboard_keys set [DIK_F2,{call EAT_ToolsMain;_handled = true;}];};
|
||||
if (_option == "AdminMode") exitWith {
|
||||
keyboard_keys set [DIK_F4,{call optionMenu;_handled = true;}];
|
||||
keyboard_keys set [DIK_DELETE,{[] spawn EAT_DeleteObj;_handled = true;}];
|
||||
keyboard_keys set [DIK_U,{[] spawn EAT_Unlock;_handled = true;}];
|
||||
keyboard_keys set [DIK_L,{[] spawn EAT_Lock;_handled = true;}];
|
||||
keyboard_keys set [DIK_J,{call EAT_GetObjDetails;_handled = true;}];
|
||||
keyboard_keys set [DIK_T,{[] spawn EAT_TeleportToggle;_handled = true;}];
|
||||
};
|
||||
if (_option == "EndAdminMode") exitWith {
|
||||
keyboard_keys set [DIK_F4,{_handled = true;}];
|
||||
keyboard_keys set [DIK_DELETE,{_handled = true;}];
|
||||
keyboard_keys set [DIK_U,{_handled = true;}];
|
||||
keyboard_keys set [DIK_L,{_handled = true;}];
|
||||
keyboard_keys set [DIK_J,{_handled = true;}];
|
||||
keyboard_keys set [DIK_T,{_handled = true;}];
|
||||
};
|
||||
if (_option == "ESP") exitWith {keyboard_keys set [DIK_7,{call F5Menu;_handled = true;}];};
|
||||
if (_option == "EndESP") exitWith {keyboard_keys set [DIK_7,{_handled = true;}];};
|
||||
if (_option == "Spectate") exitWith {keyboard_keys set [DIK_F6,{spectate = false;_handled = true;}];};
|
||||
if (_option == "EndSpectate") exitWith {keyboard_keys set [DIK_F6,{_handled = true;}];};
|
||||
if (_option == "FastWalk") exitWith {keyboard_keys set [DIK_4, {call EAT_FastForward;_handled = true;}];};
|
||||
if (_option == "EndFastWalk") exitWith {keyboard_keys set [DIK_4, {_handled = true;}];};
|
||||
if (_option == "FastUp") exitWith {keyboard_keys set [DIK_5, {call EAT_AdminFastUp;_handled = true;}];};
|
||||
if (_option == "EndFastUp") exitWith {keyboard_keys set [DIK_5, {_handled = true;}];};
|
||||
};
|
||||
_handled
|
||||
};
|
||||
|
||||
["AdminMenu"] call EAT_Keybind;
|
||||
#include "\z\addons\dayz_server\adminTools\DebugMonitors\debugMonitor2.sqf"
|
||||
|
||||
systemChat "Admin Tools Loaded...";
|
||||
systemChat "Press F2 to Open the Admin Menu";
|
||||
diag_log("Admin Tools: AdminActivate.sqf loaded");
|
||||
};
|
46
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Admin/config.sqf
Executable file
46
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Admin/config.sqf
Executable file
@ -0,0 +1,46 @@
|
||||
/************** Epoch Admin Tools Variables **************/
|
||||
|
||||
//Enable/Disable weather/time change menu. This may cause server to revert to mid-day on restart.
|
||||
EAT_wtChanger = true;
|
||||
|
||||
// Change the maximum build distance for placable base items
|
||||
DZE_buildMaxMoveDistance = 20;
|
||||
|
||||
//This creates a log in your server\EpochAdminToolLogs\toolUsageLog.txt REQUIRES: EATadminLogger.dll
|
||||
EAT_logMajorTool = true; //A major tool is a strong tool with high possibility for exploitation
|
||||
EAT_logMinorTool = true;//A minor tool is a weak tool with low possibility for exploitation
|
||||
|
||||
/************** Admin/Mod mode Variables **************/
|
||||
|
||||
// Defines the default on and off for admin/mod mode options
|
||||
// ALL items can be turned on or off during gameplay, these are just defaults
|
||||
EAT_playerGod = true;
|
||||
EAT_vehicleGod = true;
|
||||
EAT_playerESPMode = true;
|
||||
EAT_enhancedESPMode = false;
|
||||
EAT_grassOff = true;
|
||||
EAT_infAmmo = true;
|
||||
EAT_speedBoost = false;
|
||||
EAT_fastWalk = true;
|
||||
EAT_fastUp = true;
|
||||
EAT_invisibility = false;
|
||||
EAT_flyingMode = false;
|
||||
EAT_adminBuildMode = false;
|
||||
EAT_ZombieShield = false;
|
||||
|
||||
EAT_isOverpoch = isClass (configFile >> "CfgWeapons" >> "USSR_cheytacM200"); // Used to detect the Overwatch Mod for crate spawning
|
||||
|
||||
// This section defines all of the buildings in the building GUI
|
||||
// Format: variable = [["TYPE","NAME","BUILING_CLASS"],["TYPE","NAME","BUILING_CLASS"]];
|
||||
|
||||
// Epoch Modular Buildables
|
||||
EAT_buildCinder = [["Cinder","1/2 Wall","CinderWallHalf_DZ"],["Cinder","1/2 Wall w/ Gap","CinderWallHalf_Gap_DZ"],["Cinder","Full Wall","CinderWall_DZ"],["Cinder","Full Wall w/ Window","CinderWallWindow_DZ"],["Cinder","Garage Doorway","CinderWallDoorway_DZ"],["Cinder","Garage Doorway Open Top","CinderGarageOpenTopFrame_DZ"],["Cinder","Doorway","CinderWallSmallDoorway_DZ"],["Cinder","Doorway w/ Hatch","CinderDoorHatch_DZ"],["Cinder","Tall Gate","CinderGateFrame_DZ"],["Cinder","Bunker","Concrete_Bunker_DZ"]];
|
||||
EAT_buildWood = [["Wood","Ramp","WoodRamp_DZ"],["Wood","Floor w/ Stairs","WoodFloorStairs_DZ"],["Wood","4X Floor","WoodFloor4x_DZ"],["Wood","Wood Floor","WoodFloor_DZ"],["Wood","1/2 Floor","WoodFloorHalf_DZ"],["Wood","1/4 Floor","WoodFloorQuarter_DZ"],["Wood","Triangle Floor","WoodTriangleFloor_DZ"],["Wood","Large Wall","WoodLargeWall_DZ"],["Wood","Large Doorway","WoodLargeWallDoor_DZ"],["Wood","Large Wall w/Window","WoodLargeWallWin_DZ"],["Wood","Garage Frame","Land_DZE_GarageWoodDoor"],["Wood","Open Top Garage","Land_DZE_WoodOpenTopGarageDoor"],["Wood","Wood Gate Frame","WoodGateFrame_DZ"],["Wood","Wood Gate","Land_DZE_WoodGate"],["Wood","Wall","WoodSmallWall_DZ"],["Wood","1/3 Wall","WoodSmallWallThird_DZ"],["Wood","Triangle Wall","WoodTriangleWall_DZ"],["Wood","Wall w/Window","WoodSmallWallWin_DZ"],["Wood","Doorway","WoodSmallWallDoor_DZ"],["Wood","Stairs","WoodStairsSans_DZ"],["Wood","Stairs w/Stilts","WoodStairs_DZ"],["Wood","Stairs w/Rails","WoodStairsRails_DZ"],["Wood","Ladder","WoodLadder_DZ"],["Wood","Handrail","WoodHandrail_DZ"],["Wood","Pillar","WoodPillar_DZ"],["Wood","Door Frame","DoorFrame_DZ"],["Wood","Frame w/ Door","Door_DZ"]];
|
||||
EAT_buildMetal = [["Metal","Panel","MetalPanel_DZ"],["Metal","4X Floor","MetalFloor4x_DZ"],["Metal","Floor","MetalFloor_DZ"],["Metal","1/2 Floor","MetalFloor_Half_DZ"],["Metal","1/4 Floor","MetalFloor_Quarter_DZ"],["Metal","Glass Floor","GlassFloor_DZ"],["Metal","1/2 Glass Floor","GlassFloor_Half_DZ"],["Metal","1/4 Glass Floor","GlassFloor_Quarter_DZ"],["Metal","Pillar","MetalPillar_DZ"],["Metal","Corrugated Fence","Fence_corrugated_DZ"],["Metal","Tank Trap","Hedgehog_DZ"],["Metal","Wire Fence","Fort_RazorWire"],["Metal","Metal Gate","MetalGate_DZ"],["Metal","Drawbridge","Metal_Drawbridge_DZ"]];
|
||||
EAT_buildNets = [["Camo Net","Desert","DesertCamoNet_DZ"],["Camo Net","Forest","ForestCamoNet_DZ"],["Camo Net","Winter","WinterCamoNet_DZ"],["Camo Net","Large Desert","DesertLargeCamoNet_DZ"],["Camo Net","Large Forest","ForestLargeCamoNet_DZ"],["Camo Net","Large Winter","WinterLargeCamoNet_DZ"]];
|
||||
EAT_buildStorage = [["Storage","Large Storage Shed","StorageShed_DZ"],["Storage","Upgraded Large Storage Shed","StorageShed2_DZ"],["Storage","Gun Rack","GunRack_DZ"],["Storage","Upgraded Gun Rack","GunRack2_DZ"],["Storage","Wood Crate","WoodCrate_DZ"],["Storage","Upgraded Wood Crate","WoodCrate2_DZ"],["Storage","Wood Shack","WoodShack_DZ"],["Storage","Upgraded Wood Shack","WoodShack2_DZ"],["Storage","Fancy Wood Shed","Wooden_shed_DZ"],["Storage","Upgraded Fancy Wood Shed","Wooden_shed2_DZ"],["Storage","Safe","VaultStorageLocked"],["Storage","Upgraded Safe","VaultStorage2Locked"],["Storage","Tall Safe","TallSafeLocked"],["Storage","Lockbox","LockboxStorageLocked"],["Storage","Upgraded Lockbox","LockboxStorage2Locked"],["Storage","Winter Lockbox","LockboxStorageWinterLocked"],["Storage","Upgraded Winter Lockbox","LockboxStorageWinter2Locked"]];
|
||||
EAT_buildSandbags = [["SandBags","Sandbag Fence","Sandbag1_DZ"],["SandBags","Sandbag Fence (round)","BagFenceRound_DZ"],["SandBags","H-barrier Cube","Land_HBarrier1_DZ"],["SandBags","H-barrier (short)","Land_HBarrier3_DZ"],["SandBags","H-barrier (long)","Land_HBarrier5_DZ"],["SandBags","H-barrier (extra large)","Base_WarfareBBarrier10xTall"],["SandBags","Sandbag Nest","SandNest_DZ"]];
|
||||
EAT_buildMisc = [["Misc","Workbench","WorkBench_DZ"],["Misc","Advanced Workbench","Advanced_WorkBench_DZ"],["Misc","Outhouse","OutHouse_DZ"],["Misc","Fuel Pump","FuelPump_DZ"],["Misc","Light Pole","LightPole_DZ"],["Misc","Generator","Generator_DZ"],["Misc","Plot Pole","Plastic_Pole_EP1_DZ"],["Misc","Canvas Hut","CanvasHut_DZ"],["Misc","Park Bench","ParkBench_DZ"],["Misc","Stick Fence","StickFence_DZ"],["Misc","Deer Stand","DeerStand_DZ"],["Misc","Scaffolding","Scaffolding_DZ"],["Misc","Fire Barrel","FireBarrel_DZ"],["Misc","Machine Gun Nest","M240Nest_DZ"],["Misc","Cooking Tripod","CookTripod_DZ"],["Misc","Stone Oven","Stoneoven_DZ"],["Misc","Toilet","Commode_DZ"],["Misc","Wardrobe","Wardrobe_DZ"],["Misc","Fridge","Fridge_DZ"],["Misc","Washing Machine","Washing_Machine_DZ"],["Misc","Server Rack","Server_Rack_DZ"],["Misc","ATM","ATM_DZ"],["Misc","Armchair","Armchair_DZ"],["Misc","Sofa","Sofa_DZ"],["Misc","Arcade Game","Arcade_DZ"],["Misc","Vending Machine","Vendmachine1_DZ"],["Misc","Vending Machine","Vendmachine2_DZ"],["Misc","Storage Crate","StorageCrate_DZ"],["Misc","Camo Storage Crate","CamoStorageCrate_DZ"],["Misc","Water Pump","Water_Pump_DZ"],["Misc","Greenhouse","Greenhouse_DZ"],["Misc","Bed","Bed_DZ"],["Misc","Table","Table_DZ"],["Misc","Office Chair","Office_Chair_DZ"],["Misc","Green Garage","Garage_Green_DZ"],["Misc","White Garage","Garage_White_DZ"],["Misc","Brown Garage","Garage_Brown_DZ"],["Misc","Grey Garage","Garage_Grey_DZ"],["Misc","Civilian Helipad","Helipad_Civil_DZ"]];
|
||||
EAT_allBuildingList = EAT_buildCinder + EAT_buildWood + EAT_buildMetal + EAT_buildNets + EAT_buildStorage + EAT_buildSandbags + EAT_buildMisc;
|
||||
|
||||
diag_log("Admin Tools: config.sqf loaded");
|
3147
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Admin/functions.sqf
Executable file
3147
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Admin/functions.sqf
Executable file
File diff suppressed because it is too large
Load Diff
306
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Admin/main.sqf
Executable file
306
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Admin/main.sqf
Executable file
@ -0,0 +1,306 @@
|
||||
EAT_ToolsMain = {
|
||||
private["_EXECdate","_EXECcloud","_EXECfog"];
|
||||
|
||||
_EXECdate = 'EAT_clientToServer = ["Date",player,[%1,%2],dayz_authKey]; publicVariableServer "EAT_clientToServer"';
|
||||
_EXECcloud = 'EAT_clientToServer = ["Cloud",player,[%1,5],dayz_authKey]; publicVariableServer "EAT_clientToServer"';
|
||||
_EXECfog = 'EAT_clientToServer = ["Fog",player,[%1,5],dayz_authKey]; publicVariableServer "EAT_clientToServer"';
|
||||
|
||||
|
||||
// Main menu
|
||||
if(isNil "EAT_mainMenu") then {
|
||||
EAT_mainMenu = [["",true],["-- Epoch Admin Tools (Level: Admin) --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Admin Menu >>", [], "#USER:EAT_adminMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Vehicle Menu >>",[],"#USER:EAT_vehicleMenu",-5,[["expression",""]],"1","1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Crate Menu >>",[],"#USER:EAT_crateMenu",-5,[["expression",""]],"1","1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Epoch Menu >>", [], "#USER:EAT_epochMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Weapon/Item Kits >>", [], "#USER:EAT_weaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Teleport Menu >>",[],"#USER:EAT_teleportMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Skin Change Menu >>", [], "#USER:EAT_skinMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
if(EAT_wtChanger)then{EAT_mainMenu = EAT_mainMenu + [["Weather/Time Menu >>", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];};
|
||||
EAT_mainMenu = EAT_mainMenu + [["", [], "", -5, [["expression", ""]], "1", "0"], ["Exit", [20], "", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Admin only menu
|
||||
EAT_adminMenu = [["",true]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["-- Administrator's Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Admin Mode (F4 for options)",[],"", -5,[["expression","[] spawn EAT_AdminModeToggle;"]],"1","1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Point to Repair",[],"", -5,[["expression","call EAT_Repair;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Point to Delete",[],"", -5,[["expression","[] spawn EAT_DeleteObj;"]],"1","1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Spectate player (F6 to cancel)",[],"", -5,[["expression","[] spawn EAT_Spectate;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Zombie Spawner", [], "", -5, [["expression","[] spawn EAT_SpawnZombie;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["AI spawner", [], "", -5, [["expression","[] spawn EAT_AISpawn;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Heal Players",[],"", -5, [["expression","[] spawn EAT_HealPlayer;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Send Server Message",[],"", -5,[["expression","[] spawn EAT_SendMessage;"]],"1","1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Humanity Menu >>",[],"#USER:EAT_humanityMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Main vehicle selection menu
|
||||
EAT_vehicleMenu = [["",true]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["-- Vehicle Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Graphical Vehicle Menu", [],"", -5, [["expression", "[] spawn EAT_AddVehDialog;"]], "1", "1"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Eject Players", [],"", -5, [["expression", "call EAT_Eject;"]], "1", "1"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Vehicle Tools >>", [], "#USER:EAT_vehicleTools", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Different tools for working with vehicles
|
||||
EAT_vehicleTools = [["",true]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["-- Vehicle Tools --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Vehicle Locater",[],"",-5,[["expression", "call EAT_locateVeh;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Recover Vehicle Key",[],"",-5,[["expression", "call EAT_RecoverKey;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Point to Repair", [],"", -5, [["expression", "call EAT_Repair;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Point to Delete",[],"",-5,[["expression","[] spawn EAT_DeleteObj;"]],"1","1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Flip Vehicle", [],"", -5, [["expression", "call EAT_flipVeh;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
//Main menu to handle humanity changing
|
||||
EAT_humanityMenu = [["",true]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["-- Humanity Change Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["Add to self or target", [],"", -5, [["expression", '["add"] spawn EAT_Humanity;']], "1", "1"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["Remove from self or target", [],"", -5, [["expression", '["remove"] spawn EAT_Humanity;']], "1", "1"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["Reset to 2500", [],"", -5, [["expression", '["reset"] spawn EAT_Humanity;']], "1", "1"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu for teleport options
|
||||
// teleport to place Example: ["Name",[],"", -5, [["expression", '[x,y,z] execVM "admintools\tools\Teleport\teleportToLocation.sqf"']], "1", "1"]];
|
||||
EAT_teleportMenu = [["",true]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["-- Teleport Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["Teleport (T Key)",[],"", -5,[["expression", "[] spawn EAT_TeleportToggle;"]], "1", "1"]];
|
||||
// EAT_teleportMenu = EAT_teleportMenu + [["Teleport To Me",[],"", -5, [["expression", "[] spawn EAT_TPtoMe;"]], "1", "1"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["Teleport To Player",[],"", -5, [["expression", "[] spawn EAT_TpToPlayer;"]], "1", "1"]];
|
||||
// EAT_teleportMenu = EAT_teleportMenu + [["Return Player to Last Pos",[],"", -5, [["expression", "[] spawn EAT_ReturnPlayerTP;"]], "1", "1"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu for changing skins.
|
||||
// Entry Format:["Entry Name",[],"",-5,[["expression",'["Skin_class_name"] execVM "admintools\tools\skinChanger.sqf"']],"1","1"]];
|
||||
EAT_skinMenu = [["",true]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["-- Skin Menu (Page 1)", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Survivor",[],"",-5,[["expression",'["Survivor2_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Hero",[],"",-5,[["expression",'["Survivor3_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Bandit",[],"",-5,[["expression",'["Bandit1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Soldier",[],"",-5,[["expression",'["Soldier1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Ghillie",[],"",-5,[["expression",'["Sniper1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Special Forces",[],"",-5,[["expression",'["CZ_Special_Forces_GL_DES_EP1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Pilot",[],"",-5,[["expression",'["CZ_Special_Forces_GL_DES_EP1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Next page >", [], "#USER:EAT_skinMenu2", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu2 for changing skins.
|
||||
EAT_skinMenu2 = [["",true]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["-- Skin Menu (Page 2)", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Camo",[],"",-5,[["expression",'["Camo1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Bodyguard",[],"",-5,[["expression",'["Soldier_Bodyguard_AA12_PMC_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Officer",[],"",-5,[["expression",'["Rocket_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Alejandria",[],"",-5,[["expression",'["SurvivorWcombat_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Savannah",[],"",-5,[["expression",'["SurvivorWdesert_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Melly",[],"",-5,[["expression",'["SurvivorWpink_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Bandit Jane",[],"",-5,[["expression",'["BanditW2_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Invisible",[],"",-5,[["expression",'["Survivor1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["< Back", [], "#USER:EAT_skinMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Weapon menu select
|
||||
EAT_weaponMenu = [["",true]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["-- Weapons Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Admin/Mod Loadouts >>",[],"#USER:EAT_adminLoadoutsMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Primary Weapons Menu >>",[],"#USER:EAT_primaryWeaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Secondary Weapons Menu >>",[],"#USER:EAT_secondaryWeaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Gear/Items Menu >>",[],"#USER:EAT_gearMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Delete all gear", [],"", -5, [["expression","call EAT_RemoveGear;"]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Main weapons like the M4
|
||||
// Entry Format:["Name", [],"", -5, [["expression", format[_EXECweapons,"Gun_Calss_Name","Ammo_Class_Name","Explosive_Round_Class_Name"]]], "1", "1"]];
|
||||
// If there is no explosive 203 round then put "nil" in place of "Explosive_Round_Class_Name"
|
||||
EAT_primaryWeaponMenu = [["",true]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["-- Primary Weapons --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["P90 Holo SD", [],"", -5, [["expression",'["P90_Holo_SD_DZ","50Rnd_57x28_P90SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Blue SteyrAug A3 Holo GL", [],"", -5, [["expression",'["SteyrAug_A3_Holo_GL_Blue_DZ","30Rnd_556x45_Aug","1Rnd_HE_M203"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["MK14 Sniper SD", [],"", -5, [["expression",'["MK14_Sniper_SD_DZ","20Rnd_762x51_DMRSD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["CheyTac SD", [],"", -5, [["expression",'["M200_CheyTac_SD_DZ","5Rnd_408_CheyTac_SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["FN FAL", [],"", -5, [["expression",'["FNFAL_CCO_DZ","20Rnd_762x51_FNFAL"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Mk 48", [],"", -5, [["expression",'["Mk48_CCO_DZ","100Rnd_762x51_M240"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["DMR_DZ", [],"", -5, [["expression",'["DMR_DZ","20Rnd_762x51_DMR"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["AS50", [],"", -5, [["expression",'["BAF_AS50_scoped","5Rnd_127x99_AS50"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [[".338 LAPUA", [],"", -5, [["expression",'["L115A3_2_DZ","5Rnd_86x70_L115A1"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Anzio 20", [],"", -5, [["expression",'["Anzio_20_DZ","3rnd_Anzio_20x102mm"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Secondary Weapons", [], "#USER:EAT_secondaryWeaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Sidearm weapons like the Makarov
|
||||
EAT_secondaryWeaponMenu = [["",true]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["-- Secondary Weapons --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["PDW SD", [],"", -5, [["expression",'["UZI_SD_EP1","30Rnd_9x19_UZI_SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Desert Eagle", [],"", -5, [["expression",'["DesertEagle_DZ","7Rnd_50AE_Deagle"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Colt Anaconda", [],"", -5, [["expression",'["Colt_Anaconda_DZ","6Rnd_44Magnum"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["M9 SD Camo", [],"", -5, [["expression",'["M9_Camo_SD_DZ","15Rnd_9x19_M9SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["CZ 75 Phantom SD", [],"", -5, [["expression",'["CZ75SP_SD_DZ","18Rnd_9x19_PhantomSD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Silver P99 SD", [],"", -5, [["expression",'["P99_Silver_SD_DZ","15Rnd_10x22_p99_sd"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Beretta 93R", [],"", -5, [["expression",'["M93R_DZ","20Rnd_9x19_M93R"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Gear/Items", [], "#USER:EAT_gearMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu for spawning items to the admin like bags and tools
|
||||
EAT_gearMenu = [["",true]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["-- Gear Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["ToolBelt gear", [],"", -5, [["expression","call EAT_AddTools;"]], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Medical gear", [],"", -5, [["expression","call EAT_AddMeds;"]], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Alice Pack", [],"", -5, [["expression",'["ALICE_Pack_DZE2"] call EAT_AddBackPack;']], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Coyote Pack", [],"", -5, [["expression",'["CoyoteBackpack_DZE2"] call EAT_AddBackPack;']], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Large Gun Bag", [],"", -5, [["expression",'["LargeGunBag_DZE2"] call EAT_AddBackPack;']], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Main crate menu
|
||||
EAT_crateMenu = [["",true]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["-- Crate Menu --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Crate Menu >>",[],"#USER:EAT_crateMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// This menu selects a crate type to send to the server to spawn
|
||||
// Entry Format: ["name",[],"",-5,[["expression",format[_EXECcrates,"cratetype"]]],"1","1"]];
|
||||
EAT_crateMenu = [["",true]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["-- Crates --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Epoch Weapons Crate",[],"",-5,[["expression",'["EpochWeapons"] spawn EAT_SpawnCrate;']],"1","1"]];
|
||||
if(EAT_isOverpoch)then{EAT_crateMenu = EAT_crateMenu + [["Overwatch Weapons Crate",[],"",-5,[["expression",'["OverwatchWeapons"] spawn EAT_SpawnCrate;']],"1","1"]];};
|
||||
EAT_crateMenu = EAT_crateMenu + [["Items Crate",[],"",-5,[["expression",'["Items"] spawn EAT_SpawnCrate;']],"1","1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["ALL Weapons/Items Crate",[],"",-5,[["expression",'["AllWeapons"] spawn EAT_SpawnCrate;']],"1","1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Building Crate Menu >>",[],"#USER:EAT_BuildingCrateMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["All Backpacks",[],"",-5,[["expression",'["Backpack"] spawn EAT_SpawnCrate;']],"1","1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
EAT_BuildingCrateMenu =
|
||||
[
|
||||
["",true],
|
||||
["-- Building Crate Menu --", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["Admin Building Kit",[],"",-5,[["expression",'["AllItemsBuilding"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Small Cinder Kit",[],"",-5,[["expression",'["smallCinderBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Medium Cinder Kit",[],"",-5,[["expression",'["mediumCinderBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Large Cinder Kit",[],"",-5,[["expression",'["largeCinderBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Small Wood Kit",[],"",-5,[["expression",'["smallWoodBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Medium Wood Kit",[],"",-5,[["expression",'["mediumWoodBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Large Wood Kit",[],"",-5,[["expression",'["largeWoodBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]
|
||||
];
|
||||
|
||||
EAT_adminLoadoutsMenu =
|
||||
[
|
||||
["",true],
|
||||
["-- Admin Loadout Menu --", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["DMR",[],"",-5,[["expression", "['DMR_DZ','M9_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["Lapua",[],"",-5,[["expression", "['L115A3_2_DZ','M9_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["Mk48 CCO",[],"",-5,[["expression", "['Mk48_CCO_DZ','M9_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["M107",[],"",-5,[["expression", "['M107_DZ','M9_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["AS50",[],"",-5,[["expression", "['BAF_AS50_scoped_DZ','M9_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["FN FAL CCO",[],"",-5,[["expression", "['FNFAL_CCO_DZ','M9_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["Sa58 ACOG",[],"",-5,[["expression", "['Sa58V_RCO_EP1','M9_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]
|
||||
];
|
||||
|
||||
// Menu for changing time and weather
|
||||
EAT_weatherTimeMenu = [["",true]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["-- Weather/Time Menu --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["Day Menu >>",[],"#USER:EAT_dayMenu",-5,[["expression",""]], "1", "1"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["Full-Moon Nights Menu >>",[],"#USER:EAT_fullMoonNight",-5,[["expression",""]], "1", "1"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["No-Moon Nights Menu >>",[],"#USER:EAT_noMoonNight",-5,[["expression",""]], "1", "1"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["Weather Menu >>",[],"#USER:EAT_weatherMenu",-5,[["expression",""]], "1", "1"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Dark nights
|
||||
EAT_noMoonNight = [["",true]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["-- No moon night --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["8pm",[],"",-5,[["expression",format[_EXECdate,19, 20]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["10pm",[],"",-5,[["expression",format[_EXECdate,19, 22]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["Midnight",[],"",-5,[["expression",format[_EXECdate,19, 0]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["2am",[],"",-5,[["expression",format[_EXECdate,19, 2]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["4am",[],"",-5,[["expression",format[_EXECdate,19, 4]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["< Back", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Normal nights
|
||||
EAT_fullMoonNight = [["",true]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["-- Full moon night --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["8pm",[],"",-5,[["expression",format[_EXECdate,4,20]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["10pm",[],"",-5,[["expression",format[_EXECdate,4,22]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["Midnight",[],"",-5,[["expression",format[_EXECdate,4,4]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["2am",[],"",-5,[["expression",format[_EXECdate,4,2]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["4am",[],"",-5,[["expression",format[_EXECdate,4,4]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["< Back", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Day time
|
||||
EAT_dayMenu = [["",true]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["-- Set Day Time --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["5am",[],"",-5,[["expression",format[_EXECdate,4,5]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["7am",[],"",-5,[["expression",format[_EXECdate,4,7]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["9am",[],"",-5,[["expression",format[_EXECdate,4,9]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["11am",[],"",-5,[["expression",format[_EXECdate,6,4,11]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["Noon",[],"",-5,[["expression",format[_EXECdate,4,12]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["1pm",[],"",-5,[["expression",format[_EXECdate,4,13]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["3pm",[],"",-5,[["expression",format[_EXECdate,4,15]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["5pm",[],"",-5,[["expression",format[_EXECdate,4,17]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["7pm",[],"",-5,[["expression",format[_EXECdate,4,19]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["< Back", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Weather change menu
|
||||
EAT_weatherMenu = [["",true]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["-- Set Weather --",[],"",-5,[["expression",""]],"1","0"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Clear Sky",[],"",-5,[["expression",format[_EXECcloud,0]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Slightly Cloudy",[],"",-5,[["expression",format[_EXECcloud,0.25]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Cloudy",[],"",-5,[["expression",format[_EXECcloud,0.5]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Very Cloudy",[],"",-5,[["expression",format[_EXECcloud,0.75]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Overcast",[],"",-5,[["expression",format[_EXECcloud,1]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["-- Set Fog --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Off",[],"",-5,[["expression",format[_EXECfog,0]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Thin",[],"",-5,[["expression",format[_EXECfog,0.25]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Medium",[],"",-5,[["expression",format[_EXECfog,0.5]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Thick",[],"",-5,[["expression",format[_EXECfog,0.75]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Maximum",[],"",-5,[["expression",format[_EXECfog,1]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["< Back", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu that deals with epoch specific items like locks and safes
|
||||
EAT_epochMenu = [["",true]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["-- Epoch Only Menu --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["Admin Build Menu >> ",[],"#USER:EAT_buildMenu", -5,[["expression",""]],"1","1"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["Cursor Target Menu >>",[],"#USER:EAT_pointMenu", -5,[["expression",""]],"1","1"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["Get current position",[],"",-5,[["expression","[player] call EAT_GetPosition;"]],"1","1"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu that deals with cursor target items like locks and safes "call EAT_DeleteObj;"
|
||||
EAT_pointMenu = [["",true]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["-- Cursor Target Menu --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to get position",[],"",-5,[["expression","[cursorTarget] call EAT_GetPosition;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to display code",[],"",-5,[["expression","call EAT_DisplayCode;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to make new key",[],"",-5,[["expression","call EAT_RecoverKey;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to lock object",[],"",-5,[["expression","[] spawn EAT_Lock;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to unlock object",[],"",-5,[["expression","[] spawn EAT_Unlock;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to Delete Item",[],"", -5,[["expression","[] spawn EAT_DeleteObj;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Base menu for Admin Build functions
|
||||
EAT_buildMenu = [["",true]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["-- Admin Build Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Rebuild last item",[],"", -5,[["expression",'["rebuild",false,true] spawn EAT_AdminBuild;']],"1","1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Building GUI", [],"", -5, [["expression", "[] spawn EAT_BuildingDialog;"]], "1", "1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Point To Upgrade",[],"", -5,[["expression","call EAT_Upgrade;"]],"1","1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Point To Downgrade",[],"", -5,[["expression","call EAT_DownGrade;"]],"1","1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Maintain Base",[],"", -5,[["expression","call EAT_MaintainArea;"]],"1","1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
};
|
||||
showCommandingMenu "#USER:EAT_mainMenu";
|
||||
};
|
100
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/AntiCheat/antiCheat.sqf
Executable file
100
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/AntiCheat/antiCheat.sqf
Executable file
@ -0,0 +1,100 @@
|
||||
// This file is the work of ebayShopper. Modified for use with Epoch Admin Tools by JasonTM.
|
||||
|
||||
#define MENUS [""]
|
||||
#define KICK_VARIABLES []
|
||||
#define KICK_DISPLAYS [30, 32, 45, 125, 140, 155, 156, 1001, 2929, 3030, 13000, 14000]
|
||||
// [RscDisplayTemplateLoad, RscDisplayIntel, RscDisplayArcadeMarker, RscDisplayEditDiaryRecord, RscDisplaySingleplayer, RscDisplayDSinterface, RscDisplayAddonActions, RscDisplayWFVoting, RscFunctionsViewer, RscConfigEditor_Main, EATDialog, BaseManager]
|
||||
#define CONVERT(s) format["%1",s]
|
||||
|
||||
PVDZ_fail = nil; // Make logging by client slightly harder (recommend minimizing this file to reduce network send size)
|
||||
dayz_antihack = 1; // Enable vanilla AC on this client, regardless of init.sqf setting. Changing value after scheduler start has no effect.
|
||||
|
||||
if (!isNil "tk_ac") then {diag_log "ERROR: AC reinitialized"};
|
||||
tk_ac = "started";
|
||||
|
||||
[
|
||||
getPlayerUID player,
|
||||
CONVERT(fnc_usec_damageHandler),
|
||||
CONVERT(player_fired),
|
||||
CONVERT(player_death),
|
||||
getMarkerPos "respawn_west",
|
||||
CONVERT(fnc_usec_unconscious),
|
||||
CONVERT(fnc_veh_handleDam),
|
||||
CONVERT(fnc_veh_handleKilled),
|
||||
CONVERT(player_zombieAttack),
|
||||
CONVERT(player_zombieCheck),
|
||||
CONVERT(DZ_KeyDown_EH)
|
||||
] spawn {
|
||||
private ["_charID","_damageHandler","_firedHandler","_isPZombie","_keyDown","_killedHandler","_name",
|
||||
"_reason","_respawn","_type","_uid","_unconscious","_vehicleDamage","_vehicleKilled","_zFind","_zTarget","_startTime","_done"];
|
||||
|
||||
_uid = _this select 0;
|
||||
_damageHandler = _this select 1;
|
||||
_firedHandler = _this select 2;
|
||||
_killedHandler = _this select 3;
|
||||
_respawn = _this select 4;
|
||||
_unconscious = _this select 5;
|
||||
_vehicleDamage = _this select 6;
|
||||
_vehicleKilled = _this select 7;
|
||||
_zTarget = _this select 8;
|
||||
_zFind = _this select 9;
|
||||
_keyDown = _this select 10;
|
||||
|
||||
waitUntil {!isNil "Dayz_loginCompleted"};
|
||||
|
||||
_charID = CONVERT(dayz_characterID);
|
||||
_name = if (alive player) then {name player} else {"DeadPlayer"};
|
||||
_isPZombie = player isKindOf "PZombie_VB";
|
||||
|
||||
while {true} do {
|
||||
|
||||
_type = typeOf player;
|
||||
_reason = switch true do {
|
||||
case (_charID != CONVERT(dayz_characterID)): {"Dayz_characterID modified"};
|
||||
case (_uid != CONVERT(dayz_playerUID)): {"Dayz_playerUID modified"};
|
||||
//case (_damageHandler != CONVERT(fnc_usec_damageHandler)): {"DamageHandler modified"}; // disabled this line for safezones.
|
||||
case (_firedHandler != CONVERT(player_fired)): {"FiredHandler modified"};
|
||||
case (_killedHandler != CONVERT(player_death)): {"KilledHandler modified"};
|
||||
case (_unconscious != CONVERT(fnc_usec_unconscious)): {"Unconscious modified"};
|
||||
case (_vehicleDamage != CONVERT(fnc_veh_handleDam)): {"VehicleDamage modified"};
|
||||
case (_vehicleKilled != CONVERT(fnc_veh_handleKilled)): {"VehicleKilled modified"};
|
||||
case (_zTarget != CONVERT(player_zombieAttack) && !_isPZombie): {"ZombieTarget modified"};
|
||||
case (_zFind != CONVERT(player_zombieCheck) && !_isPZombie): {"ZombieFind modified"};
|
||||
case (_keyDown != CONVERT(DZ_KeyDown_EH)): {"KeyDown modified"};
|
||||
case (_type == "Survivor1_DZ"): {"Survivor1_DZ morph"};
|
||||
case (_type isKindOf "Animal"): {"Animal morph"};
|
||||
case (getMarkerPos "respawn_west" distance _respawn > 0): {"Respawn moved"};
|
||||
default {"none"};
|
||||
};
|
||||
{
|
||||
if (!isNull findDisplay _x) then {
|
||||
_reason = format["Display%1",_x];
|
||||
};
|
||||
} count KICK_DISPLAYS;
|
||||
{
|
||||
if (!isNil _x) then {
|
||||
_reason = format["Variable %1",_x];
|
||||
};
|
||||
} count KICK_VARIABLES;
|
||||
|
||||
if !(commandingMenu in MENUS) then {
|
||||
_reason = format["CommandingMenu %1",commandingMenu];
|
||||
};
|
||||
|
||||
if (_reason != "none") exitWith {
|
||||
PVDZ_sec_atp = format["TK_AC_KICK - %1(%2) %3",_name,_uid,_reason];
|
||||
publicVariableServer "PVDZ_sec_atp"; //Log to server RPT
|
||||
uiSleep 1; // Wait for PV to send
|
||||
call compile format["TK_AC_KICK%1'%2(%3) %4'","=",_name,_uid,_reason]; //Recommend adding "TK_AC_KICK=" to scripts.txt and BEC ScriptBan
|
||||
uiSleep 1; // Wait for scripts.txt trigger
|
||||
TK_AC_KICK = ";";
|
||||
publicVariableServer "TK_AC_KICK"; // Trigger PV kick
|
||||
uiSleep 1;
|
||||
{(findDisplay _x) closeDisplay 2;} count [0,8,12,18,46,70]; // Last resort if no BE
|
||||
};
|
||||
|
||||
uiSleep 4;
|
||||
};
|
||||
};
|
||||
|
||||
#include "\z\addons\dayz_server\adminTools\DebugMonitors\debugMonitor2.sqf"
|
@ -0,0 +1,81 @@
|
||||
[] spawn {
|
||||
private["_serverName","_serverSubtitle","_teamspeak","_time","_hours","_minutes","_restartTime"];
|
||||
|
||||
/************************* CONFIG *************************/
|
||||
|
||||
_serverName = "SERVER NAME HERE";
|
||||
_serverSubtitle = "WEBSITE/MESSAGE HERE"; // DELETE line 40 if you don't want this to show
|
||||
_teamspeak = "Teamspeak: TEAMSPEAK IP HERE"; // DELETE line 50 if you don't want this to show
|
||||
_restartTime = 180; //total time before server restart (3hrs = 180 minutes)
|
||||
|
||||
/************************* CONFIG *************************/
|
||||
|
||||
if (isNil "DebugMonitorActive") then {DebugMonitorActive = true;};
|
||||
|
||||
EAT_DebugMonitorToggle = {
|
||||
DebugMonitorActive = !DebugMonitorActive;
|
||||
if !(DebugMonitorActive) exitWith {hintSilent '';};
|
||||
};
|
||||
|
||||
waitUntil {!isNull (findDisplay 46)};
|
||||
Ins_KEY = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 210) then {call EAT_DebugMonitorToggle;};"];
|
||||
|
||||
while {true} do {
|
||||
if (DebugMonitorActive) then {
|
||||
_time = (round(_restartTime-(serverTime)/60)); //Want it to count up instead of down? use _time = (round serverTime)/60;
|
||||
_hours = (floor(_time/60));
|
||||
_minutes = (_time - (_hours * 60));
|
||||
|
||||
switch(_minutes) do
|
||||
{
|
||||
case 9: {_minutes = "09"};
|
||||
case 8: {_minutes = "08"};
|
||||
case 7: {_minutes = "07"};
|
||||
case 6: {_minutes = "06"};
|
||||
case 5: {_minutes = "05"};
|
||||
case 4: {_minutes = "04"};
|
||||
case 3: {_minutes = "03"};
|
||||
case 2: {_minutes = "02"};
|
||||
case 1: {_minutes = "01"};
|
||||
case 0: {_minutes = "00"};
|
||||
};
|
||||
|
||||
// Want to change the colors? http://www.w3schools.com/colors/colors_picker.asp
|
||||
// Use the #xxxxxx color code you get on that website and place it with any of the
|
||||
//<t size..... lines below format: color='#xxxxxx'
|
||||
|
||||
// You can delete any of the <t size..... lines that you do not want
|
||||
// THE LAST LINE MUST HAVE A ",
|
||||
hintSilent parseText format ["
|
||||
<t size='1.25' font='Bitstream' align='center' color='#5882FA'>%1</t><br/>
|
||||
<t size='1.05' font='Bitstream' align='center' color='#5882FA'>%2</t><br/>
|
||||
<t size='0.95' font='Bitstream' align='left' color='#FFBF00'></t><t size='0.95 'font='Bitstream' align='right'></t><br/>
|
||||
<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Players Online: </t><t size='0.95 'font='Bitstream' align='right'>%3</t><br/>
|
||||
<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='0.95' font='Bitstream' align='right'>%4</t><br/>
|
||||
<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='0.95' font='Bitstream' align='right'>%5</t><br/>
|
||||
<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Zombies Killed: </t><t size='0.95' font='Bitstream' align='right'>%6</t><br/>
|
||||
<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Humanity: </t><t size='0.95' font='Bitstream' align='right'>%7</t><br/>
|
||||
<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Blood: </t><t size='0.95' font='Bitstream' align='right'>%8</t><br/>
|
||||
<t size='0.95' font='Bitstream' align='left' color='#FFBF00'>FPS: </t><t size='0.95' font='Bitstream' align='right'>%9</t><br/>
|
||||
<t size='0.95' font='Bitstream' align='left' color='#FFBF00'></t><t size='0.95 'font='Bitstream' align='right'></t><br/>
|
||||
<t size='1.15' font='Bitstream'align='center' color='#5882FA'>%10</t><br/>
|
||||
<t size='1.15' font='Bitstream'align='center' color='#5882FA'>Server restart in %11:%12</t><br/>", //ONLY last line needs the ",
|
||||
|
||||
_serverName, // Used on line 40 for server title
|
||||
_serverSubtitle, // Used on line 41 for server subtitle
|
||||
(count playableUnits), // Used on line 43 for player count
|
||||
(player getVariable['humanKills', 0]), // Used on line 44 for murder count
|
||||
(player getVariable['banditKills', 0]), // Used on line 45 for bandit kill count
|
||||
(player getVariable['zombieKills', 0]), // Used on line 46 for zombie kill count
|
||||
(player getVariable['humanity', 0]), // Used on line 47 for humanity count
|
||||
(player getVariable['USEC_BloodQty', r_player_blood]), // Used on line 48 for player blood amount
|
||||
(round diag_fps), // Used on line 49 for frames per second
|
||||
_teamspeak, // Used on line 51 for frames per second
|
||||
_hours, // Used on line 52 to display hours
|
||||
_minutes // Used on line 52 to display minutes
|
||||
];
|
||||
};
|
||||
//Don't modify this part
|
||||
uiSleep 0.5;
|
||||
};
|
||||
};
|
@ -0,0 +1,74 @@
|
||||
[] spawn {
|
||||
|
||||
_serverName = "SERVER NAME";
|
||||
_teamspeak = "000.000.000.000"; // DELETE line 50 if you don't want this to show
|
||||
_restartTime = 180; //total time before server restart (3hrs = 180 minutes)
|
||||
_pic = "";
|
||||
|
||||
if (isNil "DebugMonitorActive") then {DebugMonitorActive = true;};
|
||||
|
||||
EAT_DebugMonitorToggle = {
|
||||
DebugMonitorActive = !DebugMonitorActive;
|
||||
hintSilent '';
|
||||
};
|
||||
|
||||
waitUntil {!isNull (findDisplay 46)};
|
||||
Ins_KEY = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 210) then {call EAT_DebugMonitorToggle;};"];
|
||||
|
||||
while {true} do {
|
||||
if (DebugMonitorActive) then {
|
||||
_time = (round(_restartTime-(serverTime)/60));
|
||||
_hours = (floor(_time/60));
|
||||
_minutes = (_time - (_hours * 60));
|
||||
|
||||
if (player == vehicle player) then {
|
||||
_pic = (getText (configFile >> "cfgWeapons" >> (currentWeapon player) >> "picture"));
|
||||
} else {
|
||||
_pic = (getText (configFile >> "CfgVehicles" >> (typeOf vehicle player) >> "picture"));
|
||||
};
|
||||
|
||||
switch(_minutes) do
|
||||
{
|
||||
case 9: {_minutes = "09"};
|
||||
case 8: {_minutes = "08"};
|
||||
case 7: {_minutes = "07"};
|
||||
case 6: {_minutes = "06"};
|
||||
case 5: {_minutes = "05"};
|
||||
case 4: {_minutes = "04"};
|
||||
case 3: {_minutes = "03"};
|
||||
case 2: {_minutes = "02"};
|
||||
case 1: {_minutes = "01"};
|
||||
case 0: {_minutes = "00"};
|
||||
};
|
||||
|
||||
hintSilent parseText format ["
|
||||
<t size='1.2' font='Bitstream' align='center' color='#718d67'>%12</t><br/>
|
||||
<t size='1' font='Bitstream' align='center' color='#e5e5e5'>%1 Players Online: </t><br/>
|
||||
<img size='3' align='Center' image='%11'/><br/>
|
||||
<t size='1' font='Bitstream' align='left' color='#f00c0c'>Blood: </t><t size='1' font='Bitstream' align='right' color='#f00c0c'>%5</t><br/>
|
||||
<t size='1' font='Bitstream' align='left' color='#007feb'>Humanity: </t><t size='1' font='Bitstream' align='right' color='#007feb'>%6</t><br/>
|
||||
<t size='1' font='Bitstream' align='left' color='#e5e5e5'>FPS: </t><t size='1' font='Bitstream' align='right' color='#e5e5e5'>%7</t><br/>
|
||||
<t size='1' font='Bitstream' align='left' color='#e5e5e5'>Murders: </t><t size='1' font='Bitstream' align='right' color='#e5e5e5'>%3</t><br/>
|
||||
<t size='1' font='Bitstream' align='left' color='#e5e5e5'>Bandit Kills: </t><t size='1' font='Bitstream' align='right' color='#e5e5e5'>%4</t><br/>
|
||||
<t size='1' font='Bitstream' align='left' color='#e5e5e5'>Zombie Kills: </t><t size='1' font='Bitstream' align='right' color='#e5e5e5'>%2</t><br/>
|
||||
<t size='1' font='Bitstream' align='left' color='#ffd863'>Server restart in: </t><t size='1' font='Bitstream' align='right' color='#ffd863'>%8:%9</t><br/><br/>
|
||||
<t size='.80' font='Bitstream' align='left' color='#5882FA'>Teamspeak: </t><t size='.80' font='Bitstream' align='right' color='#5882FA'>%13</t>",
|
||||
|
||||
(count playableUnits), // 1
|
||||
(player getVariable['zombieKills', 0]), // 2
|
||||
(player getVariable['humanKills', 0]), // 3
|
||||
(player getVariable['banditKills', 0]), // 4
|
||||
(player getVariable['USEC_BloodQty', r_player_blood]), // 5
|
||||
(player getVariable['humanity', 0]), // 6
|
||||
(round diag_fps), // 7
|
||||
_hours, // 8
|
||||
_minutes, // 9
|
||||
dayz_playerName, // 10
|
||||
_pic, // 11
|
||||
_serverName, // 12
|
||||
_teamspeak // 13
|
||||
];
|
||||
uiSleep 1;
|
||||
};
|
||||
};
|
||||
};
|
57
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Mod/activate.sqf
Executable file
57
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Mod/activate.sqf
Executable file
@ -0,0 +1,57 @@
|
||||
dayz_antihack = 0; // Disable vanilla antihack for admins and mods
|
||||
|
||||
// Load Configs and Functions
|
||||
#include "\z\addons\dayz_server\AdminTools\Mod\config.sqf"
|
||||
#include "\z\addons\dayz_server\AdminTools\Mod\functions.sqf"
|
||||
#include "\z\addons\dayz_server\AdminTools\Mod\main.sqf"
|
||||
|
||||
|
||||
|
||||
|
||||
[] spawn {
|
||||
waitUntil {uiSleep 0.1;(!isNil "Dayz_loginCompleted" && !isNil "keyboard_keys")};
|
||||
|
||||
EAT_Keybind = {
|
||||
private ["_option","_handled"];
|
||||
#include "\ca\editor\Data\Scripts\dikCodes.h"
|
||||
|
||||
_option = _this select 0;
|
||||
_handled = false;
|
||||
|
||||
call
|
||||
{
|
||||
if (_option == "ModMenu") exitWith {keyboard_keys set [DIK_F2,{call EAT_ToolsMain;_handled = true;}];};
|
||||
if (_option == "ModMode") exitWith {
|
||||
keyboard_keys set [DIK_F4,{call optionMenu;_handled = true;}];
|
||||
keyboard_keys set [DIK_DELETE,{[] spawn EAT_DeleteObj;_handled = true;}];
|
||||
keyboard_keys set [DIK_U,{[] spawn EAT_Unlock;_handled = true;}];
|
||||
keyboard_keys set [DIK_L,{[] spawn EAT_Lock;_handled = true;}];
|
||||
keyboard_keys set [DIK_T,{[] spawn EAT_TeleportToggle;_handled = true;}];
|
||||
};
|
||||
if (_option == "EndModMode") exitWith {
|
||||
keyboard_keys set [DIK_F4,{_handled = true;}];
|
||||
keyboard_keys set [DIK_DELETE,{_handled = true;}];
|
||||
keyboard_keys set [DIK_U,{_handled = true;}];
|
||||
keyboard_keys set [DIK_L,{_handled = true;}];
|
||||
keyboard_keys set [DIK_T,{_handled = true;}];
|
||||
};
|
||||
if (_option == "Spectate") exitWith {keyboard_keys set [DIK_F6,{spectate = false;_handled = true;}];};
|
||||
if (_option == "EndSpectate") exitWith {keyboard_keys set [DIK_F6,{_handled = true;}];};
|
||||
if (_option == "FastWalk") exitWith {keyboard_keys set [DIK_4, {call EAT_FastForward;_handled = true;}];};
|
||||
if (_option == "EndFastWalk") exitWith {keyboard_keys set [DIK_4, {_handled = true;}];};
|
||||
if (_option == "FastUp") exitWith {keyboard_keys set [DIK_5, {call EAT_AdminFastUp;_handled = true;}];};
|
||||
if (_option == "EndFastUp") exitWith {keyboard_keys set [DIK_5, {_handled = true;}];};
|
||||
};
|
||||
_handled
|
||||
};
|
||||
|
||||
// Bind F2 key for mod menu
|
||||
["ModMenu"] call EAT_Keybind;
|
||||
|
||||
// Start Debug Monitor
|
||||
#include "\z\addons\dayz_server\adminTools\DebugMonitors\debugMonitor2.sqf"
|
||||
|
||||
systemChat "Moderator Tools Loaded...";
|
||||
systemChat "Press F2 to Open the Moderator Menu";
|
||||
diag_log("Moderator Tools: ModActivate.sqf loaded");
|
||||
};
|
21
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Mod/config.sqf
Executable file
21
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Mod/config.sqf
Executable file
@ -0,0 +1,21 @@
|
||||
/************** Epoch Moderator Tools Variables **************/
|
||||
|
||||
//This creates a log in your server\EpochAdminToolLogs\toolUsageLog.txt REQUIRES: EATadminLogger.dll
|
||||
EAT_logMajorTool = true; //A major tool is a strong tool with high possibility for exploitation
|
||||
EAT_logMinorTool = true;//A minor tool is a weak tool with low possibility for exploitation
|
||||
|
||||
/************** ModMode Variables **************/
|
||||
|
||||
// Defines the default on and off for mod mode options
|
||||
// ALL items can be turned on or off during gameplay, these are just defaults
|
||||
EAT_playerGod = true;
|
||||
EAT_vehicleGod = false;
|
||||
EAT_playerESPMode = true;
|
||||
EAT_grassOff = true;
|
||||
EAT_infAmmo = true;
|
||||
EAT_fastWalk = true;
|
||||
EAT_fastUp = true;
|
||||
EAT_invisibility = false;
|
||||
EAT_ZombieShield = false;
|
||||
|
||||
diag_log("Moderator Tools: Configs loaded");
|
1145
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Mod/functions.sqf
Executable file
1145
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Mod/functions.sqf
Executable file
File diff suppressed because it is too large
Load Diff
151
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Mod/main.sqf
Executable file
151
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/Mod/main.sqf
Executable file
@ -0,0 +1,151 @@
|
||||
EAT_ToolsMain = {
|
||||
|
||||
// Main menu
|
||||
if(isNil "EAT_mainMenu") then {
|
||||
EAT_mainMenu = [["",true],["-- Epoch Admin Tools (Level: Mod) --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Mod Menu >>", [], "#USER:EAT_modMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Vehicle Menu >>",[],"#USER:EAT_vehicleMenu",-5,[["expression",""]],"1","1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Weapon/Item Kits >>", [], "#USER:EAT_weaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Teleport Menu >>",[],"#USER:EAT_teleportMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Skin Change Menu >>", [], "#USER:EAT_skinMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
//if(EAT_ActionMenuPlayers && EAT_AllowContactAdmin)then{EAT_mainMenu = EAT_mainMenu + [["Player Ticket Menu >>", [], "", -5, [["expression", format[_EXECgenTools,"contactAdminTickets.sqf"]]], "1", "1"]];};
|
||||
EAT_mainMenu = EAT_mainMenu + [["", [], "", -5, [["expression", ""]], "1", "0"], ["Exit", [20], "", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
|
||||
// Mod only menu
|
||||
EAT_modMenu = [["",true]];
|
||||
EAT_modMenu = EAT_modMenu + [["-- Moderator's Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_modMenu = EAT_modMenu + [["Mod Mode (F4 for options)",[],"", -5,[["expression","[] spawn EAT_ModModeToggle;"]],"1","1"]];
|
||||
EAT_modMenu = EAT_modMenu + [["Point to Repair",[],"", -5,[["expression","call EAT_Repair;"]], "1", "1"]];
|
||||
EAT_modMenu = EAT_modMenu + [["Point to Delete",[],"", -5,[["expression","[] spawn EAT_DeleteObj;"]],"1","1"]];
|
||||
EAT_modMenu = EAT_modMenu + [["Spectate player (F6 to cancel)",[],"", -5,[["expression","[] spawn EAT_Spectate;"]], "1", "1"]];
|
||||
EAT_modMenu = EAT_modMenu + [["Heal Players",[],"", -5, [["expression","[] spawn EAT_HealPlayer;"]], "1", "1"]];
|
||||
EAT_modMenu = EAT_modMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_modMenu = EAT_modMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
|
||||
// Main vehicle selection menu
|
||||
EAT_vehicleMenu = [["",true]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["-- Vehicle Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Graphical Vehicle Menu", [],"", -5, [["expression", "[] spawn EAT_AddVehDialog;"]], "1", "1"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Vehicle Tools >>", [], "#USER:EAT_vehicleTools", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Different tools for working with vehicles
|
||||
EAT_vehicleTools = [["",true]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["-- Vehicle Tools --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Vehicle Locater",[],"",-5,[["expression", "call EAT_locateVeh;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Recover Vehicle Key",[],"",-5,[["expression", "call EAT_RecoverKey;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Point to Repair", [],"", -5, [["expression", "call EAT_Repair;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Point to Delete",[],"",-5,[["expression","[] spawn EAT_DeleteObj;"]],"1","1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Flip Vehicle", [],"", -5, [["expression", "call EAT_flipVeh;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu for teleport options
|
||||
// teleport to place Example: ["Name",[],"", -5, [["expression", '[x,y,z] execVM "admintools\tools\Teleport\teleportToLocation.sqf"']], "1", "1"]];
|
||||
EAT_teleportMenu = [["",true]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["-- Teleport Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["Teleport (T Key)",[],"", -5,[["expression", "[] spawn EAT_TeleportToggle;"]], "1", "1"]];
|
||||
// EAT_teleportMenu = EAT_teleportMenu + [["Teleport To Me",[],"", -5, [["expression", "[] spawn EAT_TPtoMe;"]], "1", "1"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["Teleport To Player",[],"", -5, [["expression", "[] spawn EAT_TpToPlayer;"]], "1", "1"]];
|
||||
// EAT_teleportMenu = EAT_teleportMenu + [["Return Player to Last Pos",[],"", -5, [["expression", "[] spawn EAT_ReturnPlayerTP;"]], "1", "1"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu for changing skins.
|
||||
// Entry Format:["Entry Name",[],"",-5,[["expression",'["Skin_class_name"] execVM "admintools\tools\skinChanger.sqf"']],"1","1"]];
|
||||
EAT_skinMenu = [["",true]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["-- Skin Menu (Page 1)", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Survivor",[],"",-5,[["expression",'["Survivor2_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Hero",[],"",-5,[["expression",'["Survivor3_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Bandit",[],"",-5,[["expression",'["Bandit1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Soldier",[],"",-5,[["expression",'["Soldier1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Ghillie",[],"",-5,[["expression",'["Sniper1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Special Forces",[],"",-5,[["expression",'["CZ_Special_Forces_GL_DES_EP1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Pilot",[],"",-5,[["expression",'["CZ_Special_Forces_GL_DES_EP1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Next page >", [], "#USER:EAT_skinMenu2", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu2 for changing skins.
|
||||
EAT_skinMenu2 = [["",true]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["-- Skin Menu (Page 2)", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Camo",[],"",-5,[["expression",'["Camo1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Bodyguard",[],"",-5,[["expression",'["Soldier_Bodyguard_AA12_PMC_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Officer",[],"",-5,[["expression",'["Rocket_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Alejandria",[],"",-5,[["expression",'["SurvivorWcombat_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Savannah",[],"",-5,[["expression",'["SurvivorWdesert_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Melly",[],"",-5,[["expression",'["SurvivorWpink_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Bandit Jane",[],"",-5,[["expression",'["BanditW2_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
//EAT_skinMenu2 = EAT_skinMenu2 + [["Invisible",[],"",-5,[["expression",'["Survivor1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["< Back", [], "#USER:EAT_skinMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Weapon menu select
|
||||
EAT_weaponMenu = [["",true]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["-- Weapons Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Admin/Mod Loadouts >>",[],"#USER:EAT_adminLoadoutsMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Primary Weapons Menu >>",[],"#USER:EAT_primaryWeaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Secondary Weapons Menu >>",[],"#USER:EAT_secondaryWeaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Gear/Items Menu >>",[],"#USER:EAT_gearMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Delete all gear", [],"", -5, [["expression","call EAT_RemoveGear;"]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Main weapons like the M4
|
||||
// Entry Format:["Name", [],"", -5, [["expression", format[_EXECweapons,"Gun_Calss_Name","Ammo_Class_Name","Explosive_Round_Class_Name"]]], "1", "1"]];
|
||||
// If there is no explosive 203 round then put "nil" in place of "Explosive_Round_Class_Name"
|
||||
EAT_primaryWeaponMenu = [["",true]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["-- Primary Weapons --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["M4 Holo", [],"", -5, [["expression",'["M4A1_HWS_GL_camo","30Rnd_556x45_Stanag","1Rnd_HE_M203"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["M4A1_DZ GL SD Camo", [],"", -5, [["expression",'["M4A1_HWS_GL_SD_Camo","30Rnd_556x45_StanagSD","1Rnd_HE_M203"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Sa58V ACOG", [],"", -5, [["expression",'["Sa58V_RCO_EP1","30Rnd_762x39_SA58"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["AKM Kobra", [],"", -5, [["expression",'["AKM_Kobra_DZ","30Rnd_762x39_AK47"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["FN FAL", [],"", -5, [["expression",'["FNFAL_CCO_DZ","20Rnd_762x51_FNFAL"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Mk 48", [],"", -5, [["expression",'["Mk48_CCO_DZ","100Rnd_762x51_M240"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["MK14 Sniper SD", [],"", -5, [["expression",'["MK14_Sniper_SD_DZ","20Rnd_762x51_DMRSD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [[".338 LAPUA", [],"", -5, [["expression",'["L115A3_2_DZ","5Rnd_86x70_L115A1"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["DMR_DZ", [],"", -5, [["expression",'["DMR_DZ","20Rnd_762x51_DMR"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Secondary Weapons", [], "#USER:EAT_secondaryWeaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Sidearm weapons like the Makarov
|
||||
EAT_secondaryWeaponMenu = [["",true]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["-- Secondary Weapons --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["PDW SD", [],"", -5, [["expression",'["UZI_SD_EP1","30Rnd_9x19_UZI_SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["PDW", [],"", -5, [["expression",'["PDW_DZ","30Rnd_9x19_UZI"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["M9 SD Camo", [],"", -5, [["expression",'["M9_Camo_SD_DZ","15Rnd_9x19_M9SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["M9_DZ SD", [],"", -5, [["expression",'["M9_SD_DZ","15Rnd_9x19_M9SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Makarov_DZ", [],"", -5, [["expression",'["Makarov_DZ","8Rnd_9x18_Makarov"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Makarov_DZ SD", [],"", -5, [["expression",'["Makarov_SD_DZ","8Rnd_9x18_Makarov"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Gear/Items", [], "#USER:EAT_gearMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu for spawning items to the admin like bags and tools
|
||||
EAT_gearMenu = [["",true]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["-- Gear Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["ToolBelt gear", [],"", -5, [["expression","call EAT_AddTools;"]], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Medical gear", [],"", -5, [["expression","call EAT_AddMeds;"]], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Alice Pack", [],"", -5, [["expression",'["ALICE_Pack_DZE2"] call EAT_AddBackPack;']], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Coyote Pack", [],"", -5, [["expression",'["CoyoteBackpack_DZE2"] call EAT_AddBackPack;']], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Large Gun Bag", [],"", -5, [["expression",'["LargeGunBag_DZE2"] call EAT_AddBackPack;']], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
EAT_adminLoadoutsMenu =
|
||||
[
|
||||
["",true],
|
||||
["-- Admin Loadout Menu --", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["DMR",[],"",-5,[["expression", "['DMR_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["Lapua",[],"",-5,[["expression", "['BAF_LRR_scoped','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["Mk48 CCO",[],"",-5,[["expression", "['Mk48_CCO_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["MK14 Sniper SD",[],"",-5,[["expression", "['MK14_Sniper_SD_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["FN FAL CCO",[],"",-5,[["expression", "['FNFAL_CCO_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["Sa58 ACOG",[],"",-5,[["expression", "['Sa58V_RCO_EP1','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]
|
||||
];
|
||||
};
|
||||
showCommandingMenu "#USER:EAT_mainMenu";
|
||||
};
|
118
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/ServerFunctions/aiSpawn.sqf
Executable file
118
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/ServerFunctions/aiSpawn.sqf
Executable file
@ -0,0 +1,118 @@
|
||||
private ["_aiMag","_aiWeapon","_aiAssault","_aiMachine","_aiSniper","_aiRandomWep","_aiWepAndMag","_aiPosition","_divisor","_playerUID","_clientKey","_playerPos","_activatingPlayer","_exitReason","_aiArea","_aiCount","_unitGroup","_unit","_deadai","_killer"];
|
||||
|
||||
//_activatingPlayer = _this select 0;
|
||||
//_params = _this select 1;
|
||||
//_clientKey = _this select 2;
|
||||
EAT_BanditorHero = _params select 0;
|
||||
_aiArea = _params select 1;
|
||||
_aiCount = _params select 2;
|
||||
_divisor = _params select 3;
|
||||
_aiPosition = _params select 4;
|
||||
_playerPos = _params select 6;
|
||||
//_playerUID = getPlayerUID _activatingPlayer;
|
||||
|
||||
|
||||
_exitReason = [_this,"EAT_AiSpawn",_playerPos,_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
#define AI_SKILL [["aimingAccuracy",0.60],["aimingShake",0.60],["aimingSpeed",0.60],["endurance",1.00],["spotDistance",0.60],["spotTime",0.60],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]]
|
||||
#define AI_ITEMS ["ItemBandage","ItemAntibiotic","ItemPainkiller","ItemAntibacterialWipe","ItemMorphine","ItemEpinephrine","FoodCanBakedBeans","FoodCanPotatoes","ItemSodaMtngreen","ItemSodaLemonade"]
|
||||
#define AI_BAG ["DZ_Czech_Vest_Pouch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_GunBag_EP1","DZ_CivilBackpack_EP1","DZ_Backpack_EP1","DZ_LargeGunBag_EP1"]
|
||||
#define BANDIT_SKIN ["Ins_Soldier_GL_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","GUE_Commander_DZ","GUE_Soldier_Sniper_DZ","GUE_Soldier_MG_DZ","GUE_Soldier_Crew_DZ","GUE_Soldier_2_DZ","GUE_Soldier_CO_DZ","BanditW1_DZ","BanditW2_DZ","Bandit1_DZ","Bandit2_DZ"]
|
||||
#define HERO_SKIN ["Soldier_Sniper_PMC_DZ","FR_OHara_DZ","Soldier_Bodyguard_AA12_PMC_DZ","FR_R_DZ","FR_Sapper_DZ","FR_Marksman_DZ","FR_Assault_R_DZ","UN_CDF_Soldier_Guard_EP1_DZ","UN_CDF_Soldier_EP1_DZ","BAF_Soldier_N_MTP_DZ"]
|
||||
#define AI_TOOLS ["ItemKnife","ItemMap","ItemMatchbox","ItemHatchet","ItemToolbox","ItemCrowbar"]
|
||||
_aiAssault = [["M16A4_ACOG_DZ","30Rnd_556x45_Stanag"],["Sa58V_RCO_EP1","30Rnd_762x39_AK47"],["SCAR_L_STD_Mk4CQT","30Rnd_556x45_Stanag"],["M8_sharpshooter","30Rnd_556x45_Stanag"],["M4A1_Holo_MFL_DZ","30Rnd_556x45_Stanag"],["SCAR_L_STD_HOLO","30Rnd_556x45_Stanag"],["M4A1_CCO_DZ","30Rnd_556x45_Stanag"],["G36C_ACOG_DZ","30Rnd_556x45_G36"],["AKM_Kobra_DZ","30Rnd_762x39_AK47"],["SA58_Holo_DZ","30Rnd_762x39_SA58"],["m8_carbine","30Rnd_556x45_Stanag"],["L85A2_CCO_FL_DZ","30Rnd_556x45_Stanag"],["AK74_GL_PSO1_DZ","30Rnd_545x39_AK"]];
|
||||
_aiMachine = [["RPK74_Kobra_DZ","75Rnd_545x39_RPK"],["Mk48_CCO_DZ","100Rnd_762x51_M240"],["M249_DZ","200Rnd_556x45_M249"],["Pecheneg_DZ","100Rnd_762x54_PK"],["M240_DZ","100Rnd_762x51_M240"]];
|
||||
_aiSniper = [["M14_Holo_DZ","20Rnd_762x51_DMR"],["SCAR_H_LNG_Sniper_SD","20Rnd_762x51_SB_SCAR"],["M110_NVG_EP1","20rnd_762x51_B_SCAR"],["SVD_PSO1_Gh_DZ","10Rnd_762x54_SVD"],["VSS_Vintorez","20Rnd_9x39_SP5_VSS"],["DMR_DZ","20Rnd_762x51_DMR"],["M40A3_DZ","5Rnd_762x51_M24"]];
|
||||
_aiRandomWep = [_aiAssault,_aiAssault,_aiAssault,_aiSniper,_aiMachine];
|
||||
_aiWepAndMag = (_aiRandomWep call BIS_fnc_selectRandom) call BIS_fnc_selectRandom;
|
||||
_aiWeapon = _aiWepAndMag select 0;
|
||||
_aiMag = _aiWepAndMag select 1;
|
||||
|
||||
EAT_unitWaypoints = {
|
||||
private ["_wp","_pos_x","_pos_y","_pos_z","_unitGroup","_position","_waypoint"];
|
||||
|
||||
_unitGroup = _this select 0;
|
||||
_position = _this select 1;
|
||||
_pos_x = _position select 0;
|
||||
_pos_y = _position select 1;
|
||||
_pos_z = _position select 2;
|
||||
_waypoint = _this select 2;
|
||||
|
||||
{
|
||||
_wp = _unitGroup addWaypoint [_x,10];
|
||||
_wp setWaypointType "MOVE";
|
||||
|
||||
} count [[_pos_x,(_pos_y+_waypoint),0],[(_pos_x+_waypoint),_pos_y,0],[_pos_x,(_pos_y-_waypoint),0],[(_pos_x-_waypoint),_pos_y,0]];
|
||||
|
||||
_wp = _unitGroup addWaypoint [[_pos_x,_pos_y,0],_waypoint];
|
||||
_wp setWaypointType "CYCLE";
|
||||
};
|
||||
|
||||
_unitGroup = createGroup EAST;
|
||||
|
||||
for "_x" from 1 to (_aiCount/_divisor) do {
|
||||
if (EAT_BanditorHero == "Hero") then {
|
||||
_unit = _unitGroup createUnit [(HERO_SKIN call BIS_fnc_selectRandom),_aiPosition,[],(_aiArea/2),"CAN COLLIDE"];
|
||||
} else {
|
||||
_unit = _unitGroup createUnit [(BANDIT_SKIN call BIS_fnc_selectRandom),_aiPosition,[],(_aiArea/2),"CAN COLLIDE"];
|
||||
};
|
||||
[_unit] joinSilent _unitGroup;
|
||||
//_unit setVariable ["Bandit",true];
|
||||
_unit enableAI "TARGET";
|
||||
_unit enableAI "AUTOTARGET";
|
||||
_unit enableAI "MOVE";
|
||||
_unit enableAI "ANIM";
|
||||
_unit enableAI "FSM";
|
||||
_unit setCombatMode "YELLOW";
|
||||
_unit setBehaviour "COMBAT";
|
||||
removeAllWeapons _unit;
|
||||
removeAllItems _unit;
|
||||
if (sunOrMoon != 1) then {
|
||||
_unit addWeapon "NVGoggles";
|
||||
};
|
||||
_i = 0;
|
||||
_j = 0;
|
||||
|
||||
// Magazine count 3
|
||||
for "_i" from 1 to 3 do {
|
||||
_unit addMagazine _aiMag;
|
||||
};
|
||||
|
||||
_unit addWeapon _aiWeapon;
|
||||
_unit selectWeapon _aiWeapon;
|
||||
_unit addBackpack (AI_BAG call BIS_fnc_selectRandom);
|
||||
_unit addWeapon (AI_TOOLS call BIS_fnc_selectRandom);
|
||||
|
||||
for "_j" from 1 to 3 do {
|
||||
_unit addMagazine (AI_ITEMS call BIS_fnc_selectRandom);
|
||||
};
|
||||
|
||||
{
|
||||
_unit setSkill [(_x select 0),(_x select 1)]
|
||||
} count AI_SKILL;
|
||||
|
||||
_unit addEventHandler ["Killed",{
|
||||
_deadai = _this select 0;
|
||||
_killer = _this select 1;
|
||||
_deadai setVariable ["bodyName","unknown",false];
|
||||
[_deadai,_killer] spawn {
|
||||
private ["_humanity","_humankills","_banditkills","_player"];
|
||||
_player = _this select 1;
|
||||
if (isPlayer _player) then {
|
||||
_humanity = _player getVariable["humanity",0];
|
||||
if (EAT_BanditorHero == "Hero") then {
|
||||
_humankills = _player getVariable["humanKills",0];
|
||||
_player setVariable ["humanKills",(_humankills + 1),true];
|
||||
_player setVariable ["humanity",(_humanity - EAT_HumanityGainLoss),true];
|
||||
} else {
|
||||
_banditkills = _player getVariable ["banditKills", 0];
|
||||
_player setVariable ["banditKills",(_banditkills + 1),true];
|
||||
_player setVariable ["humanity",(_humanity + EAT_HumanityGainLoss),true];
|
||||
};
|
||||
};
|
||||
uiSleep EAT_aiDeleteTimer; deleteVehicle (_this select 0);};}];
|
||||
};
|
||||
_unitGroup setFormation "ECH LEFT";
|
||||
_unitGroup selectLeader ((units _unitGroup) select 0);
|
||||
[_unitGroup, _aiPosition, _aiArea] spawn EAT_unitWaypoints;
|
195
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/ServerFunctions/crateSpawn.sqf
Executable file
195
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/ServerFunctions/crateSpawn.sqf
Executable file
File diff suppressed because one or more lines are too long
@ -0,0 +1,25 @@
|
||||
private ["_exitReason","_playerUID","_clientKey","_vehtospawn","_worldspace","_pos","_dir","_veh","_activatingPlayer"];
|
||||
|
||||
//_activatingPlayer = _this select 0;
|
||||
//_params = _this select 1;
|
||||
//_clientKey = _this select 2;
|
||||
_vehtospawn = _params select 0;
|
||||
_dir = _params select 1;
|
||||
_pos = _params select 2;
|
||||
//_playerUID = getPlayerUID _activatingPlayer;
|
||||
|
||||
|
||||
_exitReason = [_this,"EAT_vehSpawn",_pos,_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
_veh = _vehtospawn createVehicle _pos;
|
||||
_veh setDir _dir;
|
||||
_veh setPos _pos;
|
||||
_veh setVariable ["ObjectID", "1", true];
|
||||
_veh setVariable ["ObjectUID", "1", true];
|
||||
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_veh];
|
||||
//_veh setVariable ["EAT_Veh",1,true];
|
||||
clearMagazineCargoGlobal _veh;
|
||||
clearWeaponCargoGlobal _veh;
|
||||
|
||||
//if (_vehtospawn == "CSJ_GyroC") then {_veh setVehicleAmmo 0;};
|
56
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/SuperAdmin/activate.sqf
Executable file
56
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/SuperAdmin/activate.sqf
Executable file
@ -0,0 +1,56 @@
|
||||
dayz_antihack = 0; // Disable vanilla antihack for admins
|
||||
|
||||
// Initialize Variables
|
||||
#include "\z\addons\dayz_server\AdminTools\SuperAdmin\config.sqf"
|
||||
#include "\z\addons\dayz_server\AdminTools\SuperAdmin\functions.sqf"
|
||||
#include "\z\addons\dayz_server\AdminTools\SuperAdmin\main.sqf"
|
||||
|
||||
|
||||
[] spawn {
|
||||
waitUntil {uiSleep 0.1;(!isNil "Dayz_loginCompleted" && !isNil "keyboard_keys")};
|
||||
|
||||
EAT_Keybind = {
|
||||
private ["_option","_handled"];
|
||||
#include "\ca\editor\Data\Scripts\dikCodes.h"
|
||||
|
||||
_option = _this select 0;
|
||||
_handled = false;
|
||||
|
||||
call
|
||||
{
|
||||
if (_option == "AdminMenu") exitWith {keyboard_keys set [DIK_F2,{call EAT_ToolsMain;_handled = true;}];};
|
||||
if (_option == "AdminMode") exitWith {
|
||||
keyboard_keys set [DIK_F4,{call optionMenu;_handled = true;}];
|
||||
keyboard_keys set [DIK_DELETE,{[] spawn EAT_DeleteObj;_handled = true;}];
|
||||
keyboard_keys set [DIK_U,{[] spawn EAT_Unlock;_handled = true;}];
|
||||
keyboard_keys set [DIK_L,{[] spawn EAT_Lock;_handled = true;}];
|
||||
keyboard_keys set [DIK_J,{call EAT_GetObjDetails;_handled = true;}];
|
||||
keyboard_keys set [DIK_T,{[] spawn EAT_TeleportToggle;_handled = true;}];
|
||||
};
|
||||
if (_option == "EndAdminMode") exitWith {
|
||||
keyboard_keys set [DIK_F4,{_handled = true;}];
|
||||
keyboard_keys set [DIK_DELETE,{_handled = true;}];
|
||||
keyboard_keys set [DIK_U,{_handled = true;}];
|
||||
keyboard_keys set [DIK_L,{_handled = true;}];
|
||||
keyboard_keys set [DIK_J,{_handled = true;}];
|
||||
keyboard_keys set [DIK_T,{_handled = true;}];
|
||||
};
|
||||
if (_option == "ESP") exitWith {keyboard_keys set [DIK_7,{call F5Menu;_handled = true;}];};
|
||||
if (_option == "EndESP") exitWith {keyboard_keys set [DIK_7,{_handled = true;}];};
|
||||
if (_option == "Spectate") exitWith {keyboard_keys set [DIK_F6,{spectate = false;_handled = true;}];};
|
||||
if (_option == "EndSpectate") exitWith {keyboard_keys set [DIK_F6,{_handled = true;}];};
|
||||
if (_option == "FastWalk") exitWith {keyboard_keys set [DIK_4, {call EAT_FastForward;_handled = true;}];};
|
||||
if (_option == "EndFastWalk") exitWith {keyboard_keys set [DIK_4, {_handled = true;}];};
|
||||
if (_option == "FastUp") exitWith {keyboard_keys set [DIK_5, {call EAT_AdminFastUp;_handled = true;}];};
|
||||
if (_option == "EndFastUp") exitWith {keyboard_keys set [DIK_5, {_handled = true;}];};
|
||||
};
|
||||
_handled
|
||||
};
|
||||
|
||||
["AdminMenu"] call EAT_Keybind;
|
||||
#include "\z\addons\dayz_server\adminTools\DebugMonitors\debugMonitor2.sqf"
|
||||
|
||||
systemChat "Admin Tools Loaded...";
|
||||
systemChat "Press F2 to Open the Admin Menu";
|
||||
diag_log("Admin Tools: AdminActivate.sqf loaded");
|
||||
};
|
200
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/SuperAdmin/config.sqf
Executable file
200
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/SuperAdmin/config.sqf
Executable file
@ -0,0 +1,200 @@
|
||||
/************** Epoch Admin Tools Variables **************/
|
||||
|
||||
//Enable/Disable weather/time change menu. This may cause server to revert to mid-day on restart.
|
||||
EAT_wtChanger = true;
|
||||
|
||||
// Change the maximum build distance for placable base items
|
||||
DZE_buildMaxMoveDistance = 20;
|
||||
|
||||
//This creates a log in your server\EpochAdminToolLogs\toolUsageLog.txt REQUIRES: EATadminLogger.dll
|
||||
EAT_logMajorTool = true; //A major tool is a strong tool with high possibility for exploitation
|
||||
EAT_logMinorTool = true;//A minor tool is a weak tool with low possibility for exploitation
|
||||
|
||||
/************** Admin/Mod mode Variables **************/
|
||||
|
||||
// Defines the default on and off for admin/mod mode options
|
||||
// ALL items can be turned on or off during gameplay, these are just defaults
|
||||
EAT_playerGod = true;
|
||||
EAT_vehicleGod = false;
|
||||
EAT_playerESPMode = true;
|
||||
EAT_enhancedESPMode = false;
|
||||
EAT_grassOff = true;
|
||||
EAT_infAmmo = true;
|
||||
EAT_speedBoost = false;
|
||||
EAT_fastWalk = true;
|
||||
EAT_fastUp = true;
|
||||
EAT_invisibility = false;
|
||||
EAT_flyingMode = false;
|
||||
EAT_adminBuildMode = false;
|
||||
EAT_ZombieShield = false;
|
||||
|
||||
// Initialize Base Manager Variables
|
||||
BD_Buildables = true;
|
||||
BD_PlotPoles = true;
|
||||
BD_vehicles = true;
|
||||
BCCurrentBase = [];
|
||||
BC_BuildVector = [];
|
||||
|
||||
EAT_isOverpoch = isClass (configFile >> "CfgWeapons" >> "USSR_cheytacM200"); // Used to detect the Overwatch Mod for crate spawning
|
||||
|
||||
// This section defines all of the buildings in the building GUI
|
||||
// Format: variable = [["TYPE","NAME","BUILING_CLASS"],["TYPE","NAME","BUILING_CLASS"]];
|
||||
|
||||
//Residential
|
||||
local _buildHouse = [["House","Large Brick (Open)","Land_HouseV2_04_interier"],["House","Log Cabin (Open)","Land_HouseV_1I4"],["House","Yellow Modern","Land_sara_domek_zluty"],["House","Large Orange","Land_Housev2_02_Interier"],["House","Yellow Wood","land_housev_3i3"],["House","Burgundy","land_housev_1l2"],["House","Orange/Green","Land_HouseV_3I1"],["House","Damaged Brick","land_r_housev2_04"],["House","Orange/Red","Land_HouseV_1I1"],["House","Barn","Land_HouseV_3I4"],["House","Yellow","Land_HouseV_1T"],["House","Red Brick","Land_HouseV_2I"],["House","Wood","Land_HouseV_1I3"],["House","Green","Land_HouseV_1L1"],["House","Yellow Wood","Land_HouseV_1I2"],["House","Yellow Stone","Land_HouseV_2L"],["House","Green Wood","Land_HouseV_2T2"],["House","Green wood/concrete","Land_HouseV_3I2"],["House","Shanty","Land_MBG_Shanty_BIG"],["House","Middle-East 1","Land_House_C_11_EP1"],["House","Middle-East 2","Land_House_C_12_EP1"],["House","Old Stone 1","Land_House_K_1_EP1"],["House","Old Stone 2","Land_House_K_3_EP1"],["House","Old Stone 3","Land_House_K_5_EP1"],["House","Old Stone 4","Land_House_K_7_EP1"],["House","Old Stone 5","Land_House_K_8_EP1"],["House","Old Stone 6","Land_House_L_1_EP1"],["House","Old Stone 7","Land_House_L_3_EP1"],["House","Old Stone 8","Land_House_L_4_EP1"],["House","Old Stone 9","Land_House_L_6_EP1"],["House","Old Stone 10","Land_House_L_7_EP1"],["House","Old Stone 11","Land_House_L_8_EP1"],["House","Old Stone Ruins","Land_ruin_01"]];
|
||||
local _buildHouseBlock = [["House Block","A1","Land_HouseBlock_A1"],["House Block","A1","Land_HouseBlock_A1"],["House Block","A1_2","Land_HouseBlock_A1_2"],["House Block","A2","Land_HouseBlock_A2"],["House Block","A2_1","Land_HouseBlock_A2_1"],["House Block","A3","Land_HouseBlock_A3"],["House Block","B1","Land_HouseBlock_B1"],["House Block","B2","Land_HouseBlock_B2"],["House Block","B3","Land_HouseBlock_B3"],["House Block","B4","Land_HouseBlock_B4"],["House Block","B5","Land_HouseBlock_B5"],["House Block","B6","Land_HouseBlock_B6"],["House Block","C1","Land_HouseBlock_C1"],["House Block","C2","Land_HouseBlock_C2"],["House Block","C3","Land_HouseBlock_C3"],["House Block","C4","Land_HouseBlock_C4"],["House Block","C5","Land_HouseBlock_C5"]];
|
||||
local _buildApartment = [["Apartment","B","Land_MBG_ApartmentsTwo_B"],["Apartment","G","Land_MBG_ApartmentsTwo_G"],["Apartment","P","Land_MBG_ApartmentsTwo_P"],["Apartment","W","Land_MBG_ApartmentsOne_W"],["Apartment","Large","land_mbg_apartments_big_04"],["Apartment","Red Short","Land_Panelak"],["Apartment","Red Tall","Land_Panelak2"],["Apartment","Red Very Tall","Land_Panelak3"],["Apartment","Grey (closed)","Land_A_Office02"]];
|
||||
local _buildOffice = [["Office","International Hotel","Land_HouseB_Tenement"],["Office","Municipal Office","Land_A_MunicipalOffice"],["School","School (normal)","Land_A_Office01"]];
|
||||
EAT_buildShed = [["Shed","Nice Wood (open)","Land_Shed_Wooden"],["Shed","Rickety Wood (closed)","Land_kulna"],["Shed","Large Old Wood (closed)","Land_Shed_W4"],["Shed","Patchwork wood (closed)","Land_Shed_W03"],["Shed","Grey Wood (closed)","Land_Shed_W02"],["Shed","Old Metal (closed)","Land_Shed_m03"]];
|
||||
local _buildResidentMisc = [["Hospital","Hospital (normal)","land_a_hospital"],["Store","Pub","Land_A_Pub_01"],["Store","Supermarket 1","Land_A_GeneralStore_01"],["Store","Supermarket 2","Land_A_GeneralStore_01a"],["House","Mayor's Mansion","Land_A_Villa_EP1"]];
|
||||
EAT_buildResidential = _buildHouse + _buildHouseBlock + _buildApartment + _buildOffice + EAT_buildShed + _buildResidentMisc;
|
||||
|
||||
//Industrial
|
||||
local _buildCargo = [["Cargo","1 Closed Red Crate","Land_Misc_Cargo1Bo"],["Cargo","2 Closed Red Crates","Land_Misc_Cargo2D"],["Cargo","1 Open Cargo Crate","Land_Misc_Cargo1D"],["Cargo","Military Crate","US_WarfareBVehicleServicePoint_Base_EP1"]];
|
||||
local _buildIndustrialParts = [["Metal","Overhang","Land_Ind_Shed_02_main"],["Metal","Arch","Land_Ind_Shed_01_end"],["Station","Vehicle Ceckpoint","Land_Hlidac_budka"]];
|
||||
local _buildIndustrial = [["Industrial","Large Construction","MAP_A_BuildingWIP"],["Industrial","Hangar","Land_Hangar_2"],["Industrial","Workshop","Land_Ind_Workshop01_01"],["Industrial","Workshop","Land_Ind_Workshop01_04"],["Industrial","Workshop","Land_Ind_Workshop01_L"],["Industrial","Shed","Land_Shed_Ind02"],["Industrial","Repair Center","Land_repair_center"],["Industrial","Garage","Land_Ind_Garage01"],["Industrial","Industrial Warehouse","Land_Ind_Pec_03a"],["Industrial","Fuel Station","Land_A_FuelStation_Shed"],["Industrial","Fuel Station","Land_A_FuelStation_Feed"],["Industrial","Fuel Station","Land_A_FuelStation_Build"],["Industrial","Fuel Tank","Land_Fuel_tank_stairs"],["Industrial","Fuel Tank","Land_Ind_TankSmall"],["Industrial","Large Factory","Land_Ind_Vysypka"],["Industrial","Small Factory","Land_Tovarna2"],["Industrial","Well","MAP_Pumpa"],["Industrial","Well","Land_Misc_Well_C_EP1"],["Industrial","Fire Barrel","Land_Fire_barrel"]];
|
||||
EAT_buildIndustrial = _buildIndustrial + _buildCargo + _buildIndustrialParts;
|
||||
|
||||
// Farm
|
||||
EAT_buildFarm = [["Farm","Barn","Land_stodola_old_open"],["Farm","Cowshed Section A","Land_Farm_Cowshed_a"],["Farm","Cowshed Section B","Land_Farm_Cowshed_b"],["Farm","Cowshed Section C","Land_Farm_Cowshed_c"],["Farm","Barn","Land_Barn_W_01"],["Farm","Barn","Land_stodola_open"],["Farm","Barn","Land_Barn_W_02"],["Farm","Hay Bale","Land_seno_balik"]];
|
||||
|
||||
//Military
|
||||
EAT_buildMilitary = [["Military","Airplane Hangar","Land_SS_hangar"],["Military","Administration","Land_Mil_House"],["Military","ATC","Land_Mil_ControlTower"],["Barracks","L-Barracks","Land_Mil_Barracks_L"],["Barracks","L-Barracks","Land_Mil_Barracks_i"],["Barracks","Open Barracks","Land_Mil_Barracks"],["Military","Fire Station","Land_a_stationhouse"],["Depot","Warfare Depot","WarfareBDepot"],["Hospital","Field Hospital","INS_WarfareBFieldhHospital"],["Military","Guardhouse","Land_Mil_Guardhouse"],["Military","Military Tent","CampEast_EP1"],["Military","Medical Tent (Red Cross)","MASH_EP1"],["Military","Medical Tent","Camp_EP1"],["Military","Military Tent","Land_tent_east"]];
|
||||
|
||||
//Religious
|
||||
EAT_buildReligious = [["Church","Orange","Land_Church_01"],["Church","Open","Land_Church_03"],["Church","Closed","Land_Church_02"],["Church","Destroyed","Land_Church_05R"],["Mosque","Small","Land_A_Mosque_small_2_EP1"],["Mosque","Medium","Land_A_Mosque_small_1_EP1"],["Mosque","Large","Land_A_Mosque_big_hq_EP1"],["Mosque","Addon","Land_A_Mosque_big_addon_EP1"],["Mosque","Wall","Land_A_Mosque_big_wall_EP1"]];
|
||||
|
||||
//Graves
|
||||
EAT_buildGrave = [["Grave","Grave (normal)","Grave"],["Grave","Cross 1","GraveCross1"],["Grave","Cross 2","GraveCross2"],["Grave","Cross /w Helmet","GraveCrossHelmet"],["Grave","Mass Grave","Mass_grave_DZ"]];
|
||||
|
||||
//Castle
|
||||
EAT_buildCastle = [["Castle","Gate","Land_A_Castle_Gate"],["Castle","Tower","Land_A_Castle_Bergfrit"],["Castle","Stairs","Land_A_Castle_Stairs_A"],["Castle","Wall","Land_A_Castle_Wall1_20"],["Castle","Wall","Land_A_Castle_Wall2_30"],["Castle","Wall","Land_A_Castle_WallS_10"],["Castle","Wall End","Land_A_Castle_Wall2_End_2"],["Castle","Wall End","Land_A_Castle_Wall1_20_Turn"],["Castle","Bastion","Land_A_Castle_Bastion"],["Castle","Keep","Land_A_Castle_Donjon"],["Castle","End1","Land_A_Castle_Wall1_End"],["Castle","End2","Land_A_Castle_WallS_End"],["Castle","End3","Land_A_Castle_Wall1_End_2"],["Castle","End4","Land_A_Castle_Wall2_End"],["Castle","End5","Land_A_Castle_Wall2_End_2"],["Dock","Wall","MAP_molo_krychle"]];
|
||||
|
||||
// Epoch Modular Buildables
|
||||
local _buildCinder = [["Cinder","1/2 Wall","CinderWallHalf_DZ"],["Cinder","1/2 Wall w/ Gap","CinderWallHalf_Gap_DZ"],["Cinder","Full Wall","CinderWall_DZ"],["Cinder","Full Wall w/ Window","CinderWallWindow_DZ"],["Cinder","Garage Doorway","CinderWallDoorway_DZ"],["Cinder","Garage Doorway Open Top","CinderGarageOpenTopFrame_DZ"],["Cinder","Doorway","CinderWallSmallDoorway_DZ"],["Cinder","Doorway w/ Hatch","CinderDoorHatch_DZ"],["Cinder","Tall Gate","CinderGateFrame_DZ"],["Cinder","Bunker","Concrete_Bunker_DZ"]];
|
||||
local _buildMetal = [["Metal","Panel","MetalPanel_DZ"],["Metal","4X Floor","MetalFloor4x_DZ"],["Metal","Floor","MetalFloor_DZ"],["Metal","1/2 Floor","MetalFloor_Half_DZ"],["Metal","1/4 Floor","MetalFloor_Quarter_DZ"],["Metal","Glass Floor","GlassFloor_DZ"],["Metal","1/2 Glass Floor","GlassFloor_Half_DZ"],["Metal","1/4 Glass Floor","GlassFloor_Quarter_DZ"],["Metal","Pillar","MetalPillar_DZ"],["Metal","Corrugated Fence","Fence_corrugated_DZ"],["Metal","Tank Trap","Hedgehog_DZ"],["Metal","Wire Fence","Fort_RazorWire"],["Metal","Metal Gate","MetalGate_DZ"],["Metal","Drawbridge","Metal_Drawbridge_DZ"]];
|
||||
local _buildWood = [["Wood","Ramp","WoodRamp_DZ"],["Wood","Floor w/ Stairs","WoodFloorStairs_DZ"],["Wood","4X Floor","WoodFloor4x_DZ"],["Wood","Wood Floor","WoodFloor_DZ"],["Wood","1/2 Floor","WoodFloorHalf_DZ"],["Wood","1/4 Floor","WoodFloorQuarter_DZ"],["Wood","Triangle Floor","WoodTriangleFloor_DZ"],["Wood","Large Wall","WoodLargeWall_DZ"],["Wood","Large Doorway","WoodLargeWallDoor_DZ"],["Wood","Large Wall w/Window","WoodLargeWallWin_DZ"],["Wood","Garage Frame","Land_DZE_GarageWoodDoor"],["Wood","Open Top Garage","Land_DZE_WoodOpenTopGarageDoor"],["Wood","Wood Gate Frame","WoodGateFrame_DZ"],["Wood","Wood Gate","Land_DZE_WoodGate"],["Wood","Wall","WoodSmallWall_DZ"],["Wood","1/3 Wall","WoodSmallWallThird_DZ"],["Wood","Triangle Wall","WoodTriangleWall_DZ"],["Wood","Wall w/Window","WoodSmallWallWin_DZ"],["Wood","Doorway","WoodSmallWallDoor_DZ"],["Wood","Stairs","WoodStairsSans_DZ"],["Wood","Stairs w/Stilts","WoodStairs_DZ"],["Wood","Stairs w/Rails","WoodStairsRails_DZ"],["Wood","Ladder","WoodLadder_DZ"],["Wood","Handrail","WoodHandrail_DZ"],["Wood","Pillar","WoodPillar_DZ"],["Wood","Door Frame","DoorFrame_DZ"],["Wood","Frame w/ Door","Door_DZ"]];
|
||||
local _buildNets = [["Camo Net","Desert","DesertCamoNet_DZ"],["Camo Net","Forest","ForestCamoNet_DZ"],["Camo Net","Winter","WinterCamoNet_DZ"],["Camo Net","Large Desert","DesertLargeCamoNet_DZ"],["Camo Net","Large Forest","ForestLargeCamoNet_DZ"],["Camo Net","Large Winter","WinterLargeCamoNet_DZ"]];
|
||||
local _buildStorage = [["Storage","Large Storage Shed","StorageShed_DZ"],["Storage","Upgraded Large Storage Shed","StorageShed2_DZ"],["Storage","Gun Rack","GunRack_DZ"],["Storage","Upgraded Gun Rack","GunRack2_DZ"],["Storage","Wood Crate","WoodCrate_DZ"],["Storage","Upgraded Wood Crate","WoodCrate2_DZ"],["Storage","Wood Shack","WoodShack_DZ"],["Storage","Upgraded Wood Shack","WoodShack2_DZ"],["Storage","Fancy Wood Shed","Wooden_shed_DZ"],["Storage","Upgraded Fancy Wood Shed","Wooden_shed2_DZ"],["Storage","Safe","VaultStorageLocked"],["Storage","Upgraded Safe","VaultStorage2Locked"],["Storage","Tall Safe","TallSafeLocked"],["Storage","Lockbox","LockboxStorageLocked"],["Storage","Upgraded Lockbox","LockboxStorage2Locked"],["Storage","Winter Lockbox","LockboxStorageWinterLocked"],["Storage","Upgraded Winter Lockbox","LockboxStorageWinter2Locked"]];
|
||||
local _buildSandbags = [["SandBags","Sandbag Fence","Sandbag1_DZ"],["SandBags","Sandbag Fence (round)","BagFenceRound_DZ"],["SandBags","H-barrier Cube","Land_HBarrier1_DZ"],["SandBags","H-barrier (short)","Land_HBarrier3_DZ"],["SandBags","H-barrier (long)","Land_HBarrier5_DZ"],["SandBags","H-barrier (extra large)","Base_WarfareBBarrier10xTall"],["SandBags","Sandbag Nest","SandNest_DZ"]];
|
||||
local _buildMisc = [["Misc","Workbench","WorkBench_DZ"],["Misc","Advanced Workbench","Advanced_WorkBench_DZ"],["Misc","Outhouse","OutHouse_DZ"],["Misc","Fuel Pump","FuelPump_DZ"],["Misc","Light Pole","LightPole_DZ"],["Misc","Generator","Generator_DZ"],["Misc","Plot Pole","Plastic_Pole_EP1_DZ"],["Misc","Canvas Hut","CanvasHut_DZ"],["Misc","Park Bench","ParkBench_DZ"],["Misc","Stick Fence","StickFence_DZ"],["Misc","Deer Stand","DeerStand_DZ"],["Misc","Scaffolding","Scaffolding_DZ"],["Misc","Fire Barrel","FireBarrel_DZ"],["Misc","Machine Gun Nest","M240Nest_DZ"],["Misc","Cooking Tripod","CookTripod_DZ"],["Misc","Stone Oven","Stoneoven_DZ"],["Misc","Toilet","Commode_DZ"],["Misc","Wardrobe","Wardrobe_DZ"],["Misc","Fridge","Fridge_DZ"],["Misc","Washing Machine","Washing_Machine_DZ"],["Misc","Server Rack","Server_Rack_DZ"],["Misc","ATM","ATM_DZ"],["Misc","Armchair","Armchair_DZ"],["Misc","Sofa","Sofa_DZ"],["Misc","Arcade Game","Arcade_DZ"],["Misc","Vending Machine","Vendmachine1_DZ"],["Misc","Vending Machine","Vendmachine2_DZ"],["Misc","Storage Crate","StorageCrate_DZ"],["Misc","Camo Storage Crate","CamoStorageCrate_DZ"],["Misc","Water Pump","Water_Pump_DZ"],["Misc","Greenhouse","Greenhouse_DZ"],["Misc","Bed","Bed_DZ"],["Misc","Table","Table_DZ"],["Misc","Office Chair","Office_Chair_DZ"],["Misc","Green Garage","Garage_Green_DZ"],["Misc","White Garage","Garage_White_DZ"],["Misc","Brown Garage","Garage_Brown_DZ"],["Misc","Grey Garage","Garage_Grey_DZ"],["Misc","Civilian Helipad","Helipad_Civil_DZ"]];
|
||||
EAT_buildModular = _buildCinder + _buildMetal + _buildWood + _buildNets + _buildStorage + _buildSandbags + _buildMisc;
|
||||
|
||||
//Ore
|
||||
EAT_buildOre = [["Ore","Gold","Gold_Vein_DZE"],["Ore","Silver","Silver_Vein_DZE"],["Ore","Iron","Iron_Vein_DZE"]];
|
||||
|
||||
//Roads
|
||||
EAT_buildRoad = [["Fence","Fence","MAP_zed2_civil"],["Fence","Fence","MAP_Wall_Fen1_5_Pole"],["Fence","Fence","MAP_Wall_Fen1_5"],["Fence","Fence","MAP_Wall_Fen1_5_Hole"],["Fence","Fence","MAP_Wall_Tin_4"],["Fence","Fence","MAP_Wall_Tin_4_2"],["Tree","Tree","MAP_t_picea2s"],["Tree","Tree","MAP_t_picea1s"],["Runway","Runway","MAP_runway_beton"],["Runway","Runway","MAP_runway_end15"],["Runway","Runway","MAP_runway_main"],["Runway","Runway","MAP_runway_poj_L_2_end"],["Runway","Runway","MAP_runway_poj_T_2"],["Runway","Runway","MAP_runway_poj_draha"],["Runway","Runway","MAP_runway_poj_L_2"],["Runway","Runway","MAP_runway_poj_T_1"],["Runway","Runway","MAP_runway_beton_end1"],["Runway","Runway","MAP_runway_beton_end2"],["Road","Road","MAP_asf3_10_75"],["Road","Road","MAP_asf3_6konec"],["Road","Road","MAP_asf3_0_2000"],["Road","Road","MAP_kr_t_asf3_asf3"],["Road","Road","MAP_asf3_6"],["Road","Road","MAP_asf3_12"],["Road","Road","MAP_asf2_0_2000"],["Road","Road","MAP_asf3_10_25"],["Road","Road","MAP_asf3_22_50"],["Road","Road","MAP_asf3_10_50"],["Road","Road","MAP_asf2_12"],["Road","Road","MAP_city_0_2000"],["Road","Road","MAP_city_10_75"],["Road","Road","MAP_kr_t_city_asf3"],["Road","Road","MAP_city_10_25"],["Road","Road","MAP_city_6"],["Road","Gravel Road","MAP_grav_1_1000"],["Road","Gravel Road","MAP_grav_10_50"],["Road","Gravel Road","MAP_grav_6konec"],["Road","Gravel Road","MAP_grav_30_25"],["Road","Gravel Road","MAP_grav_6"],["Road","Gravel Road","MAP_grav_15_75"],["Road","Gravel Road","MAP_grav_10_25"],["Road","Grass Cutter","ClutterCutter_EP1"]];
|
||||
|
||||
//Other
|
||||
local _buildMarker = [["Marker","Archway","Sign_circle_EP1"]];
|
||||
local _buildSand = [["Sandbag","Nest (BIG)","Land_fortified_nest_big"],["Sandbag","2 Story cubes /w Net","Land_Fort_Watchtower"]];
|
||||
local _buildRamp = [["Ramp","Concrete Tall","Land_ConcreteRamp"],["Ramp","Concrete Short","RampConcrete"],["Ramp","Wood Small","Land_WoodenRamp"]];
|
||||
local _buildMisc = [["Statue","Soldiers /w Flag","Land_A_statue01"],["Statue","Tank","Land_A_statue02"],["Misc","Archway","Land_brana02nodoor"]];
|
||||
EAT_buildOutdoors = [["Outdoors","Outhouse","Land_KBud"]];
|
||||
EAT_buildOther = EAT_buildOutdoors + _buildMisc + _buildRamp + _buildSand + _buildMarker;
|
||||
|
||||
|
||||
EAT_allBuildingList = EAT_buildResidential + EAT_buildIndustrial + EAT_buildMilitary + EAT_buildReligious + EAT_buildGrave + EAT_buildCastle + EAT_buildOre + EAT_buildOther;
|
||||
|
||||
/***************** add basses here for base manager *****************/
|
||||
BCBaseList = [
|
||||
[
|
||||
"base1",
|
||||
"Test Base",
|
||||
[0,23,0],
|
||||
[
|
||||
["CinderWallDoor_DZ",[0.0551758,-0.736328,3.37357],239.861],
|
||||
["MetalFloor_DZ",[2.53516,0.763672,6.58356],59.9374],
|
||||
["MetalFloor_DZ",[2.54492,0.763672,3.19955],59.8886],
|
||||
["MetalFloor_DZ",[-2.00488,-1.83691,6.58356],239.937],
|
||||
["MetalFloor_DZ",[-2.00488,-1.83691,3.19955],239.889],
|
||||
["CinderWall_DZ",[-4.20508,1.36328,3.38358],150.186],
|
||||
["CinderWallDoorSmall_DZ",[-2.5249,3.76367,3.38358],239.993],
|
||||
["FireBarrel_DZ",[4.40527,1.86328,3.43457],59.2191],
|
||||
["CinderWallDoor_DZ",[4.78516,2.06348,-0.000427246],59.9374],
|
||||
["MetalFloor_DZ",[-0.0947266,5.26367,6.58356],239.937],
|
||||
["MetalFloor_DZ",[-0.0947266,5.26367,3.19955],59.8886],
|
||||
["WoodSmallWallThird_DZ",[4.84521,2.06348,3.38358],239.847],
|
||||
["WoodSmallWallThird_DZ",[4.89502,1.96289,3.38358],59.8468],
|
||||
["MetalFloor_DZ",[-4.63477,2.66309,3.19955],239.889],
|
||||
["MetalFloor_DZ",[-4.63477,2.66309,6.58356],59.9374],
|
||||
["CinderWall_DZ",[-0.214844,-5.63672,3.38358],329.709],
|
||||
["CinderWallDoorSmall_DZ",[2.71484,-5.23633,3.39355],59.7286],
|
||||
["MetalFloor_DZ",[5.16504,-3.83691,6.58356],239.937],
|
||||
["MetalFloor_DZ",[5.1748,-3.83691,3.19955],59.8886],
|
||||
["MetalFloor_DZ",[0.625,-6.43652,6.58356],59.9374],
|
||||
["MetalFloor_DZ",[0.635254,-6.43652,3.19955],239.889],
|
||||
["CinderWall_DZ",[6.18506,2.76367,3.38358],60.0843],
|
||||
["CinderWallDoorSmall_DZ",[2.33496,6.36328,-0.000427246],59.7633],
|
||||
["CinderWall_DZ",[-1.50488,7.46289,3.38956],329.972],
|
||||
["CinderWall_DZ",[-1.54492,7.46289,-0.000427246],150.363],
|
||||
["CinderWall_DZ",[-6.04492,4.76367,-0.000427246],148.928],
|
||||
["CinderWallDoorSmall_DZ",[7.34521,-2.33691,0.009552],59.8816],
|
||||
["CinderWallHalf_DZ",[-6.23486,4.66309,3.38956],149.364],
|
||||
["MetalFloor_DZ",[7.08496,3.36328,6.58356],59.9374],
|
||||
["MetalFloor_DZ",[-6.54492,-4.53711,3.19955],239.889],
|
||||
["MetalFloor_DZ",[-6.54492,-4.53711,6.58356],239.937],
|
||||
["MetalFloor_DZ",[5.36523,6.36328,3.18356],59.7772],
|
||||
["CinderWall_DZ",[8.55518,1.06348,-0.000427246],149.939],
|
||||
["CinderWall_DZ",[-8.59473,-1.13672,3.38358],150.109],
|
||||
["MetalFloor_DZ",[8.90527,0.263672,3.19357],59.8189],
|
||||
["CinderWall_DZ",[6.375,-6.23633,3.37958],149.81],
|
||||
["CinderWall_DZ",[6.375,-6.23633,-0.000427246],329.81],
|
||||
["Sandbag1_DZ",[6.68506,6.16309,-0.00143433],329.956],
|
||||
["MetalFloor_DZ",[4.44482,7.96289,3.19955],59.8886],
|
||||
["MetalFloor_DZ",[4.45508,7.96289,6.58356],59.9374],
|
||||
["MetalFloor_DZ",[-9.1748,0.0634766,6.58356],239.937],
|
||||
["MetalFloor_DZ",[-9.1748,0.0634766,3.19955],239.889],
|
||||
["CinderWallHalf_DZ",[1.60498,-9.03711,3.37958],149.81],
|
||||
["CinderWall_DZ",[1.60498,-9.03711,-0.000427246],329.81],
|
||||
["CinderWall_DZ",[-4.58496,-8.13672,3.38358],329.818],
|
||||
["CinderWallDoorSmall_DZ",[7.10498,6.36328,3.39755],330.226],
|
||||
["MetalFloor_DZ",[8.5752,4.26367,3.19357],59.7494],
|
||||
["MetalFloor_DZ",[8.70508,4.26367,6.58755],59.9444],
|
||||
["MetalFloor_DZ",[9.71484,-1.13672,6.58356],59.9374],
|
||||
["MetalFloor_DZ",[-3.90479,-9.03711,3.19955],239.889],
|
||||
["MetalFloor_DZ",[-3.91504,-9.03711,6.58356],239.937],
|
||||
["CinderWallDoorSmall_DZ",[9.78516,1.76367,3.39755],149.591],
|
||||
["WoodStairsSans_DZ",[9.64502,-3.23633,0.299561],149.952],
|
||||
["WoodSmallWallThird_DZ",[10.1748,-1.83691,3.37756],149.842],
|
||||
["WoodSmallWallThird_DZ",[10.2148,-1.73633,3.37756],329.842],
|
||||
["CinderWall_DZ",[3.24512,10.1631,-0.000427246],150.363],
|
||||
["CinderWall_DZ",[3.24512,10.1631,3.37958],330.363],
|
||||
["CinderWall_DZ",[-9.03516,-5.73633,-0.000427246],60.2108],
|
||||
["CinderWall_DZ",[-9.60498,-4.73633,3.38956],60.2249],
|
||||
["CinderWall_DZ",[-10.5649,2.16309,-0.000427246],150.057],
|
||||
["CinderWallHalf_DZ",[-10.5649,2.16309,3.37958],330.057],
|
||||
["CinderWall_DZ",[-8.23486,-7.13672,3.38956],60.0563],
|
||||
["CinderWall_DZ",[6.85498,9.16309,3.37958],60.0283],
|
||||
["CinderWall_DZ",[6.85498,9.16309,-0.000427246],240.028],
|
||||
["CinderWall_DZ",[-11.5552,-1.33691,-0.000427246],60.3165],
|
||||
["CinderWallHalf_DZ",[-11.5552,-1.33691,3.37958],240.317],
|
||||
["CinderWall_DZ",[11.1353,-3.43652,-0.000427246],329.81],
|
||||
["CinderWall_DZ",[11.1353,-3.43652,3.37958],149.81],
|
||||
["CinderWallHalf_DZ",[-2.60498,-11.4365,3.37958],150.089],
|
||||
["CinderWall_DZ",[-2.60498,-11.4365,-0.000427246],330.089],
|
||||
["CinderWallHalf_DZ",[10.7451,5.46289,3.37357],59.9723],
|
||||
["CinderWall_DZ",[12.0649,0.163086,3.37958],60.1405],
|
||||
["CinderWall_DZ",[12.0649,0.163086,-0.000427246],240.14],
|
||||
["CinderWall_DZ",[-6.29492,-10.5371,-0.000427246],60.2108],
|
||||
["CinderWallHalf_DZ",[-6.29492,-10.5371,3.37958],240.211],
|
||||
["WoodStairsSans_DZ",[12.2749,-1.63672,-2.20044],149.947]
|
||||
]
|
||||
],
|
||||
[
|
||||
"Base2", //Name the base
|
||||
"Bambi Bunker", //give it a display name
|
||||
[0,23,0], //This is the distance the base will spawn from you
|
||||
[
|
||||
["MetalFloor_DZ",[-0.635254,-0.428711,3.1275],124.745],
|
||||
["CinderWall_DZ",[0.869141,1.74072,-0.076416],214.745],
|
||||
["CinderWall_DZ",[1.53467,-1.93359,-0.076355],304.745],
|
||||
["CinderWall_DZ",[-2.80469,1.07617,-0.0765076],124.745],
|
||||
["CinderWallDoorSmall_DZ",[-2.13965,-2.59863,-0.0762634],34.7454]
|
||||
]
|
||||
] // to add a base place a comma here. ex: ],
|
||||
//add base from server/EpochAdminToolLogs/SavedBases here
|
||||
];
|
||||
|
||||
diag_log("Admin Tools: config.sqf loaded");
|
3622
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/SuperAdmin/functions.sqf
Executable file
3622
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/SuperAdmin/functions.sqf
Executable file
File diff suppressed because it is too large
Load Diff
310
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/SuperAdmin/main.sqf
Executable file
310
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/SuperAdmin/main.sqf
Executable file
@ -0,0 +1,310 @@
|
||||
EAT_ToolsMain = {
|
||||
private["_EXECdate","_EXECcloud","_EXECfog"];
|
||||
|
||||
_EXECdate = 'EAT_clientToServer = ["Date",player,[%1,%2],dayz_authKey]; publicVariableServer "EAT_clientToServer"';
|
||||
_EXECcloud = 'EAT_clientToServer = ["Cloud",player,[%1,5],dayz_authKey]; publicVariableServer "EAT_clientToServer"';
|
||||
_EXECfog = 'EAT_clientToServer = ["Fog",player,[%1,5],dayz_authKey]; publicVariableServer "EAT_clientToServer"';
|
||||
|
||||
|
||||
// Main menu
|
||||
if(isNil "EAT_mainMenu") then {
|
||||
EAT_mainMenu = [["",true],["-- Epoch Admin Tools (Level: Admin) --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Admin Menu >>", [], "#USER:EAT_adminMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Vehicle Menu >>",[],"#USER:EAT_vehicleMenu",-5,[["expression",""]],"1","1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Crate Menu >>",[],"#USER:EAT_crateMenu",-5,[["expression",""]],"1","1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Epoch Menu >>", [], "#USER:EAT_epochMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Weapon/Item Kits >>", [], "#USER:EAT_weaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Teleport Menu >>",[],"#USER:EAT_teleportMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_mainMenu = EAT_mainMenu + [["Skin Change Menu >>", [], "#USER:EAT_skinMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
if(EAT_wtChanger)then{EAT_mainMenu = EAT_mainMenu + [["Weather/Time Menu >>", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];};
|
||||
EAT_mainMenu = EAT_mainMenu + [["", [], "", -5, [["expression", ""]], "1", "0"], ["Exit", [20], "", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Admin only menu
|
||||
EAT_adminMenu = [["",true]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["-- Administrator's Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Admin Mode (F4 for options)",[],"", -5,[["expression","[] spawn EAT_AdminModeToggle;"]],"1","1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Point to Repair",[],"", -5,[["expression","call EAT_Repair;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Point to Delete",[],"", -5,[["expression","[] spawn EAT_DeleteObj;"]],"1","1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Spectate player (F6 to cancel)",[],"", -5,[["expression","[] spawn EAT_Spectate;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Zombie Spawner", [], "", -5, [["expression","[] spawn EAT_SpawnZombie;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["AI spawner", [], "", -5, [["expression","[] spawn EAT_AISpawn;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Heal Players",[],"", -5, [["expression","[] spawn EAT_HealPlayer;"]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Send Server Message",[],"", -5,[["expression","[] spawn EAT_SendMessage;"]],"1","1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Humanity Menu >>",[],"#USER:EAT_humanityMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_adminMenu = EAT_adminMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Main vehicle selection menu
|
||||
EAT_vehicleMenu = [["",true]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["-- Vehicle Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Graphical Vehicle Menu", [],"", -5, [["expression", "[] spawn EAT_AddVehDialog;"]], "1", "1"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Eject Players", [],"", -5, [["expression", "call EAT_Eject;"]], "1", "1"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Vehicle Tools >>", [], "#USER:EAT_vehicleTools", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleMenu = EAT_vehicleMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Different tools for working with vehicles
|
||||
EAT_vehicleTools = [["",true]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["-- Vehicle Tools --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Vehicle Locater",[],"",-5,[["expression", "call EAT_locateVeh;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Recover Vehicle Key",[],"",-5,[["expression", "call EAT_RecoverKey;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Point to Repair", [],"", -5, [["expression", "call EAT_Repair;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Point to Delete",[],"",-5,[["expression","[] spawn EAT_DeleteObj;"]],"1","1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Flip Vehicle", [],"", -5, [["expression", "call EAT_flipVeh;"]], "1", "1"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_vehicleTools = EAT_vehicleTools + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
//Main menu to handle humanity changing
|
||||
EAT_humanityMenu = [["",true]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["-- Humanity Change Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["Add to self or target", [],"", -5, [["expression", '["add"] spawn EAT_Humanity;']], "1", "1"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["Remove from self or target", [],"", -5, [["expression", '["remove"] spawn EAT_Humanity;']], "1", "1"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["Reset to 2500", [],"", -5, [["expression", '["reset"] spawn EAT_Humanity;']], "1", "1"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_humanityMenu = EAT_humanityMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu for teleport options
|
||||
// teleport to place Example: ["Name",[],"", -5, [["expression", '[x,y,z] execVM "admintools\tools\Teleport\teleportToLocation.sqf"']], "1", "1"]];
|
||||
EAT_teleportMenu = [["",true]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["-- Teleport Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["Teleport (T Key)",[],"", -5,[["expression", "[] spawn EAT_TeleportToggle;"]], "1", "1"]];
|
||||
// EAT_teleportMenu = EAT_teleportMenu + [["Teleport To Me",[],"", -5, [["expression", "[] spawn EAT_TPtoMe;"]], "1", "1"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["Teleport To Player",[],"", -5, [["expression", "[] spawn EAT_TpToPlayer;"]], "1", "1"]];
|
||||
// EAT_teleportMenu = EAT_teleportMenu + [["Return Player to Last Pos",[],"", -5, [["expression", "[] spawn EAT_ReturnPlayerTP;"]], "1", "1"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_teleportMenu = EAT_teleportMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu for changing skins.
|
||||
// Entry Format:["Entry Name",[],"",-5,[["expression",'["Skin_class_name"] execVM "admintools\tools\skinChanger.sqf"']],"1","1"]];
|
||||
EAT_skinMenu = [["",true]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["-- Skin Menu (Page 1)", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Survivor",[],"",-5,[["expression",'["Survivor2_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Hero",[],"",-5,[["expression",'["Survivor3_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Bandit",[],"",-5,[["expression",'["Bandit1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Soldier",[],"",-5,[["expression",'["Soldier1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Ghillie",[],"",-5,[["expression",'["Sniper1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Special Forces",[],"",-5,[["expression",'["CZ_Special_Forces_GL_DES_EP1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Apocalyptic Rifleman",[],"",-5,[["expression",'["Apo_Rifleman_03_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu = EAT_skinMenu + [["Next page >", [], "#USER:EAT_skinMenu2", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu2 for changing skins.
|
||||
EAT_skinMenu2 = [["",true]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["-- Skin Menu (Page 2)", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Camo",[],"",-5,[["expression",'["Camo1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Stalker",[],"",-5,[["expression",'["gsc_eco_stalker_mask_neutralW_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Officer",[],"",-5,[["expression",'["Rocket_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Alejandria",[],"",-5,[["expression",'["SurvivorWcombat_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Savannah",[],"",-5,[["expression",'["SurvivorWdesert_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Melly",[],"",-5,[["expression",'["SurvivorWpink_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Bandit Jane",[],"",-5,[["expression",'["BanditW2_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["Invisible",[],"",-5,[["expression",'["Survivor1_DZ"] spawn EAT_SkinChanger;']],"1","1"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_skinMenu2 = EAT_skinMenu2 + [["< Back", [], "#USER:EAT_skinMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Weapon menu select
|
||||
EAT_weaponMenu = [["",true]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["-- Weapons Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Admin/Mod Loadouts >>",[],"#USER:EAT_adminLoadoutsMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Primary Weapons Menu >>",[],"#USER:EAT_primaryWeaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Secondary Weapons Menu >>",[],"#USER:EAT_secondaryWeaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Gear/Items Menu >>",[],"#USER:EAT_gearMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Delete all gear", [],"", -5, [["expression","call EAT_RemoveGear;"]], "1", "1"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_weaponMenu = EAT_weaponMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Main weapons like the M4
|
||||
// Entry Format:["Name", [],"", -5, [["expression", format[_EXECweapons,"Gun_Calss_Name","Ammo_Class_Name","Explosive_Round_Class_Name"]]], "1", "1"]];
|
||||
// If there is no explosive 203 round then put "nil" in place of "Explosive_Round_Class_Name"
|
||||
EAT_primaryWeaponMenu = [["",true]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["-- Primary Weapons --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["P90 Holo SD", [],"", -5, [["expression",'["P90_Holo_SD_DZ","50Rnd_57x28_P90SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Blue SteyrAug A3 Holo GL", [],"", -5, [["expression",'["SteyrAug_A3_Holo_GL_Blue_DZ","30Rnd_556x45_Aug","1Rnd_HE_M203"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["MK14 Sniper SD", [],"", -5, [["expression",'["MK14_Sniper_SD_DZ","20Rnd_762x51_DMRSD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["CheyTac SD", [],"", -5, [["expression",'["M200_CheyTac_SD_DZ","5Rnd_408_CheyTac_SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["FN FAL", [],"", -5, [["expression",'["FNFAL_CCO_DZ","20Rnd_762x51_FNFAL"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Mk 48", [],"", -5, [["expression",'["Mk48_CCO_DZ","100Rnd_762x51_M240"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["DMR_DZ", [],"", -5, [["expression",'["DMR_DZ","20Rnd_762x51_DMR"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["AS50", [],"", -5, [["expression",'["BAF_AS50_scoped","5Rnd_127x99_AS50"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [[".338 LAPUA", [],"", -5, [["expression",'["L115A3_2_DZ","5Rnd_86x70_L115A1"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Anzio 20", [],"", -5, [["expression",'["Anzio_20_DZ","3rnd_Anzio_20x102mm"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_primaryWeaponMenu = EAT_primaryWeaponMenu + [["Secondary Weapons", [], "#USER:EAT_secondaryWeaponMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Sidearm weapons like the Makarov
|
||||
EAT_secondaryWeaponMenu = [["",true]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["-- Secondary Weapons --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["PDW SD", [],"", -5, [["expression",'["UZI_SD_EP1","30Rnd_9x19_UZI_SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Desert Eagle", [],"", -5, [["expression",'["DesertEagle_DZ","7Rnd_50AE_Deagle"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Colt Anaconda", [],"", -5, [["expression",'["Colt_Anaconda_DZ","6Rnd_44Magnum"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["M9 SD Camo", [],"", -5, [["expression",'["M9_Camo_SD_DZ","15Rnd_9x19_M9SD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["CZ 75 Phantom SD", [],"", -5, [["expression",'["CZ75SP_SD_DZ","18Rnd_9x19_PhantomSD"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Silver P99 SD", [],"", -5, [["expression",'["P99_Silver_SD_DZ","15Rnd_10x22_p99_sd"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Beretta 93R", [],"", -5, [["expression",'["M93R_DZ","20Rnd_9x19_M93R"] call EAT_AddWeapon;']], "1", "1"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_secondaryWeaponMenu = EAT_secondaryWeaponMenu + [["Gear/Items", [], "#USER:EAT_gearMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu for spawning items to the admin like bags and tools
|
||||
EAT_gearMenu = [["",true]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["-- Gear Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["ToolBelt gear", [],"", -5, [["expression","call EAT_AddTools;"]], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Medical gear", [],"", -5, [["expression","call EAT_AddMeds;"]], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Alice Pack", [],"", -5, [["expression",'["ALICE_Pack_DZE2"] call EAT_AddBackPack;']], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Coyote Pack", [],"", -5, [["expression",'["CoyoteBackpack_DZE2"] call EAT_AddBackPack;']], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Large Gun Bag", [],"", -5, [["expression",'["LargeGunBag_DZE2"] call EAT_AddBackPack;']], "1", "1"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_gearMenu = EAT_gearMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Main crate menu
|
||||
EAT_crateMenu = [["",true]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["-- Crate Menu --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Crate Menu >>",[],"#USER:EAT_crateMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// This menu selects a crate type to send to the server to spawn
|
||||
// Entry Format: ["name",[],"",-5,[["expression",format[_EXECcrates,"cratetype"]]],"1","1"]];
|
||||
EAT_crateMenu = [["",true]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["-- Crates --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Epoch Weapons Crate",[],"",-5,[["expression",'["EpochWeapons"] spawn EAT_SpawnCrate;']],"1","1"]];
|
||||
if(EAT_isOverpoch)then{EAT_crateMenu = EAT_crateMenu + [["Overwatch Weapons Crate",[],"",-5,[["expression",'["OverwatchWeapons"] spawn EAT_SpawnCrate;']],"1","1"]];};
|
||||
EAT_crateMenu = EAT_crateMenu + [["Items Crate",[],"",-5,[["expression",'["Items"] spawn EAT_SpawnCrate;']],"1","1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Building Crate Menu >>",[],"#USER:EAT_BuildingCrateMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["All Backpacks",[],"",-5,[["expression",'["Backpack"] spawn EAT_SpawnCrate;']],"1","1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Rocket Launchers",[],"",-5,[["expression",'["RocketLaunchers"] spawn EAT_SpawnCrate;']],"1","1"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_crateMenu = EAT_crateMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
EAT_BuildingCrateMenu =
|
||||
[
|
||||
["",true],
|
||||
["-- Building Crate Menu --", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["Admin Building Kit",[],"",-5,[["expression",'["AllItemsBuilding"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Small Cinder Kit",[],"",-5,[["expression",'["smallCinderBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Medium Cinder Kit",[],"",-5,[["expression",'["mediumCinderBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Large Cinder Kit",[],"",-5,[["expression",'["largeCinderBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Small Wood Kit",[],"",-5,[["expression",'["smallWoodBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Medium Wood Kit",[],"",-5,[["expression",'["mediumWoodBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Large Wood Kit",[],"",-5,[["expression",'["largeWoodBuildingKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["Vanilla Build Kit",[],"",-5,[["expression",'["VanillaBuildKit"] spawn EAT_SpawnCrate;']],"1","1"],
|
||||
["", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]
|
||||
];
|
||||
|
||||
EAT_adminLoadoutsMenu =
|
||||
[
|
||||
["",true],
|
||||
["-- Admin Loadout Menu --", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["P90 Holo SD",[],"",-5,[["expression", "['P90_Holo_SD_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["Blue SteyrAug A3 Holo GL",[],"",-5,[["expression", "['SteyrAug_A3_Holo_GL_Blue_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["DMR",[],"",-5,[["expression", "['DMR_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["MK14 Sniper SD",[],"",-5,[["expression", "['MK14_Sniper_SD_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["Mk48 CCO",[],"",-5,[["expression", "['Mk48_CCO_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["CheyTac SD",[],"",-5,[["expression", "['M200_CheyTac_SD_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["AS50",[],"",-5,[["expression", "['BAF_AS50_scoped_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["FN FAL CCO",[],"",-5,[["expression", "['FNFAL_CCO_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["Anzio 20",[],"",-5,[["expression", "['Anzio_20_DZ','M9_Camo_SD_DZ'] call EAT_Loadouts;"]],"1","1"],
|
||||
["", [], "", -5, [["expression", ""]], "1", "0"],
|
||||
["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]
|
||||
];
|
||||
|
||||
// Menu for changing time and weather
|
||||
EAT_weatherTimeMenu = [["",true]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["-- Weather/Time Menu --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["Day Menu >>",[],"#USER:EAT_dayMenu",-5,[["expression",""]], "1", "1"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["Full-Moon Nights Menu >>",[],"#USER:EAT_fullMoonNight",-5,[["expression",""]], "1", "1"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["No-Moon Nights Menu >>",[],"#USER:EAT_noMoonNight",-5,[["expression",""]], "1", "1"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["Weather Menu >>",[],"#USER:EAT_weatherMenu",-5,[["expression",""]], "1", "1"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherTimeMenu = EAT_weatherTimeMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Dark nights
|
||||
EAT_noMoonNight = [["",true]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["-- No moon night --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["8pm",[],"",-5,[["expression",format[_EXECdate,19, 20]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["10pm",[],"",-5,[["expression",format[_EXECdate,19, 22]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["Midnight",[],"",-5,[["expression",format[_EXECdate,19, 0]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["2am",[],"",-5,[["expression",format[_EXECdate,19, 2]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["4am",[],"",-5,[["expression",format[_EXECdate,19, 4]]],"1","1"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_noMoonNight = EAT_noMoonNight + [["< Back", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Normal nights
|
||||
EAT_fullMoonNight = [["",true]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["-- Full moon night --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["8pm",[],"",-5,[["expression",format[_EXECdate,4,20]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["10pm",[],"",-5,[["expression",format[_EXECdate,4,22]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["Midnight",[],"",-5,[["expression",format[_EXECdate,4,4]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["2am",[],"",-5,[["expression",format[_EXECdate,4,2]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["4am",[],"",-5,[["expression",format[_EXECdate,4,4]]],"1","1"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_fullMoonNight = EAT_fullMoonNight + [["< Back", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Day time
|
||||
EAT_dayMenu = [["",true]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["-- Set Day Time --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["5am",[],"",-5,[["expression",format[_EXECdate,4,5]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["7am",[],"",-5,[["expression",format[_EXECdate,4,7]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["9am",[],"",-5,[["expression",format[_EXECdate,4,9]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["11am",[],"",-5,[["expression",format[_EXECdate,6,4,11]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["Noon",[],"",-5,[["expression",format[_EXECdate,4,12]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["1pm",[],"",-5,[["expression",format[_EXECdate,4,13]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["3pm",[],"",-5,[["expression",format[_EXECdate,4,15]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["5pm",[],"",-5,[["expression",format[_EXECdate,4,17]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["7pm",[],"",-5,[["expression",format[_EXECdate,4,19]]],"1","1"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_dayMenu = EAT_dayMenu + [["< Back", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Weather change menu
|
||||
EAT_weatherMenu = [["",true]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["-- Set Weather --",[],"",-5,[["expression",""]],"1","0"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Clear Sky",[],"",-5,[["expression",format[_EXECcloud,0]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Slightly Cloudy",[],"",-5,[["expression",format[_EXECcloud,0.25]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Cloudy",[],"",-5,[["expression",format[_EXECcloud,0.5]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Very Cloudy",[],"",-5,[["expression",format[_EXECcloud,0.75]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Overcast",[],"",-5,[["expression",format[_EXECcloud,1]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["-- Set Fog --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Off",[],"",-5,[["expression",format[_EXECfog,0]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Thin",[],"",-5,[["expression",format[_EXECfog,0.25]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Medium",[],"",-5,[["expression",format[_EXECfog,0.5]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Thick",[],"",-5,[["expression",format[_EXECfog,0.75]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["Maximum",[],"",-5,[["expression",format[_EXECfog,1]]],"1","1"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_weatherMenu = EAT_weatherMenu + [["< Back", [], "#USER:EAT_weatherTimeMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu that deals with epoch specific items like locks and safes
|
||||
EAT_epochMenu = [["",true]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["-- Epoch Only Menu --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["Admin Build Menu >> ",[],"#USER:EAT_buildMenu", -5,[["expression",""]],"1","1"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["Base Manager Menu >>", [], "", -5, [["expression","[] spawn EAT_BaseManager;"]], "1", "1"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["Cursor Target Menu >>",[],"#USER:EAT_pointMenu", -5,[["expression",""]],"1","1"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["Get current position",[],"",-5,[["expression","[player] call EAT_GetPosition;"]],"1","1"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_epochMenu = EAT_epochMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Menu that deals with cursor target items like locks and safes "call EAT_DeleteObj;"
|
||||
EAT_pointMenu = [["",true]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["-- Cursor Target Menu --", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to get position",[],"",-5,[["expression","[cursorTarget] call EAT_GetPosition;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to display code",[],"",-5,[["expression","call EAT_DisplayCode;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to make new key",[],"",-5,[["expression","call EAT_RecoverKey;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to lock object",[],"",-5,[["expression","[] spawn EAT_Lock;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to unlock object",[],"",-5,[["expression","[] spawn EAT_Unlock;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Point to Delete Item",[],"", -5,[["expression","[] spawn EAT_DeleteObj;"]],"1","1"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["", [], "", -5, [["expression", ""]], "1", "0"]];
|
||||
EAT_pointMenu = EAT_pointMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
|
||||
// Base menu for Admin Build functions
|
||||
EAT_buildMenu = [["",true]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["-- Admin Build Menu --", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Rebuild last item",[],"", -5,[["expression",'["rebuild",false,true] spawn EAT_AdminBuild;']],"1","1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Building GUI", [],"", -5, [["expression", "[] spawn EAT_BuildingDialog;"]], "1", "1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Point To Upgrade",[],"", -5,[["expression","call EAT_Upgrade;"]],"1","1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Point To Downgrade",[],"", -5,[["expression","call EAT_DownGrade;"]],"1","1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Maintain Base",[],"", -5,[["expression","call EAT_MaintainArea;"]],"1","1"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["", [], "", -5,[["expression", ""]], "1", "0"]];
|
||||
EAT_buildMenu = EAT_buildMenu + [["Main Menu", [20], "#USER:EAT_mainMenu", -5, [["expression", ""]], "1", "1"]];
|
||||
};
|
||||
showCommandingMenu "#USER:EAT_mainMenu";
|
||||
};
|
214
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/init.sqf
Executable file
214
@DayZ_Epoch_Server/addons/dayz_server/AdminTools/init.sqf
Executable file
@ -0,0 +1,214 @@
|
||||
// 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 ADMIN_LIST ["76500000000000000","76500000000000000","76500000000000000"]
|
||||
#define ADMIN_NAMES ["AdminName","AdminName","AdminName"]
|
||||
#define MOD_LIST ["76500000000000000","76500000000000000","76500000000000000"]
|
||||
#define MOD_NAMES ["ModeratorName","ModeratorName","ModeratorName"]
|
||||
|
||||
// These variables are used in the AI spawner. You can adjust them.
|
||||
EAT_HumanityGainLoss = 25;
|
||||
EAT_aiDeleteTimer = 600;
|
||||
|
||||
// DO NOT EDIT BELOW THIS LINE
|
||||
|
||||
"EAT_clientToServer" addPublicVariableEventHandler {
|
||||
private ["_array","_type","_activatingPlayer","_playerUID"];
|
||||
_array = _this select 1;
|
||||
_type = _array select 0;
|
||||
_activatingPlayer = _array select 1;
|
||||
_playerUID = getPlayerUID _activatingPlayer;
|
||||
|
||||
if ((count _array == 2) && (_type == "login")) then {
|
||||
{
|
||||
if (_playerUID == getPlayerUID _x) exitWith {
|
||||
call
|
||||
{
|
||||
if ((getPlayerUID _x) in SUPER_ADMIN_LIST && (name _x) in SUPER_ADMIN_NAMES) exitWith {
|
||||
EAT_login = {
|
||||
#include "\z\addons\dayz_server\AdminTools\SuperAdmin\activate.sqf"
|
||||
};
|
||||
(owner _x) publicVariableClient "EAT_login";
|
||||
};
|
||||
|
||||
if ((getPlayerUID _x) in ADMIN_LIST && (name _x) in ADMIN_NAMES) exitWith {
|
||||
EAT_login = {
|
||||
#include "\z\addons\dayz_server\AdminTools\Admin\activate.sqf"
|
||||
};
|
||||
(owner _x) publicVariableClient "EAT_login";
|
||||
};
|
||||
|
||||
if ((getPlayerUID _x) in MOD_LIST && (name _x) in MOD_NAMES) exitWith {
|
||||
EAT_login = {
|
||||
#include "\z\addons\dayz_server\AdminTools\Mod\activate.sqf"
|
||||
};
|
||||
(owner _x) publicVariableClient "EAT_login";
|
||||
};
|
||||
|
||||
EAT_login = {
|
||||
#include "\z\addons\dayz_server\adminTools\AntiCheat\antiCheat.sqf"
|
||||
};
|
||||
(owner _x) publicVariableClient "EAT_login";
|
||||
};
|
||||
};
|
||||
} count playableUnits;
|
||||
};
|
||||
|
||||
|
||||
if (count _array > 2) then {
|
||||
|
||||
_params = _array select 2;
|
||||
_clientKey = _array select 3;
|
||||
|
||||
// First line of defense
|
||||
if (!((_playerUID) in SUPER_ADMIN_LIST) && !((_playerUID) in ADMIN_LIST) && !((_playerUID) in MOD_LIST)) exitWith {diag_log format["ADMIN TOOLS: unauthorized use by %1, %2",_playerUID, (name _activatingPlayer)];};
|
||||
|
||||
if (_type == "tempVeh") exitWith {
|
||||
#include "\z\addons\dayz_server\adminTools\ServerFunctions\vehSpawn.sqf"
|
||||
};
|
||||
if (_type == "addAI") exitWith {
|
||||
#include "\z\addons\dayz_server\adminTools\ServerFunctions\aiSpawn.sqf"
|
||||
};
|
||||
if (_type == "crate") exitWith {
|
||||
#include "\z\addons\dayz_server\adminTools\ServerFunctions\crateSpawn.sqf"
|
||||
};
|
||||
if (_type == "invisibility") exitWith {
|
||||
private ["_hide","_position","_isActive"];
|
||||
_isActive = _params select 0;
|
||||
_position = _params select 1;
|
||||
|
||||
_exitReason = [_this,"EAT_invisibility",_position,_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
_activatingPlayer setVehicleInit format["this hideObject %1;",_isActive];
|
||||
processInitCommands;
|
||||
clearVehicleInit _activatingPlayer;
|
||||
};
|
||||
// Have the server spawn the transparent red globes to avoid BattlEye kicks
|
||||
if (_type == "Base Manager") exitWith {
|
||||
local _radius = _params select 0;
|
||||
local _center = _params select 1;
|
||||
local _pos = _params select 2;
|
||||
|
||||
_exitReason = [_this,"Base Manager",_pos,_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
[_radius,_center, _pos] spawn {
|
||||
private ["_obj","_center","_a","_b","_radius","_angle","_count","_objects","_isWater"];
|
||||
_radius = _this select 0;
|
||||
_center = _this select 1;
|
||||
_angle = 0;
|
||||
_count = round((2 * pi * _radius) / 2);
|
||||
_objects = [];
|
||||
_isWater = surfaceIsWater (_this select 2);
|
||||
for "_x" from 0 to _count do
|
||||
{
|
||||
_a = (_center select 0) + (sin(_angle)*_radius);
|
||||
_b = (_center select 1) + (cos(_angle)*_radius);
|
||||
_obj = "Sign_sphere100cm_EP1" createVehicle [0,0,0];
|
||||
if (_isWater) then {
|
||||
_obj setPosASL [_a, _b, _center select 2];
|
||||
} else {
|
||||
_obj setPosATL [_a, _b, _center select 2];
|
||||
};
|
||||
//_obj setPosASL [_a, _b, _center select 2];
|
||||
_objects set [count _objects, _obj];
|
||||
_angle = _angle + (360/_count);
|
||||
};
|
||||
|
||||
for "_x" from 0 to _count do
|
||||
{
|
||||
_a = (_center select 0) + (sin(_angle)*_radius);
|
||||
_b = (_center select 2) + (cos(_angle)*_radius);
|
||||
_obj = "Sign_sphere100cm_EP1" createVehicle [0,0,0];
|
||||
//_obj setPosASL [_a, _center select 1, _b];
|
||||
if (_isWater) then {
|
||||
_obj setPosASL [_a, _center select 1, _b];
|
||||
} else {
|
||||
_obj setPosATL [_a, _center select 1, _b];
|
||||
};
|
||||
_objects set [count _objects, _obj];
|
||||
_angle = _angle + (360/_count);
|
||||
};
|
||||
|
||||
for "_x" from 0 to _count do
|
||||
{
|
||||
_a = (_center select 1) + (sin(_angle)*_radius);
|
||||
_b = (_center select 2) + (cos(_angle)*_radius);
|
||||
_obj = "Sign_sphere100cm_EP1" createVehicle [0,0,0];
|
||||
//_obj setPosASL [_center select 0, _a, _b];
|
||||
if (_isWater) then {
|
||||
_obj setPosASL [_center select 0, _a, _b];
|
||||
} else {
|
||||
_obj setPosATL [_center select 0, _a, _b];
|
||||
};
|
||||
_objects set [count _objects, _obj];
|
||||
_angle = _angle + (360/_count);
|
||||
};
|
||||
|
||||
uiSleep 30;
|
||||
{deleteVehicle _x; true } count _objects;
|
||||
};
|
||||
};
|
||||
if (_type == "ServerMessage") exitWith {
|
||||
private ["_message","_args"];
|
||||
_message = _params select 0;
|
||||
_message = format["ADMIN:%1",_message];
|
||||
|
||||
_exitReason = [_this,"ServerMessage",getPos _activatingPlayer,_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
_args = ["0.40","#FFFFFF","0.70","#990000",0,-.3,10,0.5];
|
||||
RemoteMessage = ["dynamic_text",["",_message],_args];
|
||||
publicVariable "RemoteMessage";
|
||||
};
|
||||
if (_type == "Date") exitWith {
|
||||
private ["_moon","_time"];
|
||||
_moon = _params select 0;
|
||||
_time = _params select 1;
|
||||
_exitReason = [_this,"SetDate",getPos _activatingPlayer,_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
dayzSetDate = [2012,6,_moon,_time,1];
|
||||
publicVariable "dayzSetDate";
|
||||
setDate dayzSetDate;
|
||||
};
|
||||
if (_type == "Fog") exitWith {
|
||||
private ["_value","_time"];
|
||||
_value = _params select 0;
|
||||
_time = _params select 1;
|
||||
|
||||
_exitReason = [_this,"SetFog",getPos _activatingPlayer,_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
drn_DynamicWeatherEventArgs = [overcast,fog,rain,"FOG",_value,_time,-1,-1];
|
||||
publicVariable "drn_DynamicWeatherEventArgs";
|
||||
drn_DynamicWeatherEventArgs call drn_fnc_DynamicWeather_SetWeatherLocal;
|
||||
};
|
||||
//[current overcast, current fog, current rain, current weather change ("OVERCAST", "FOG" or ""), target weather value, time until weather completion (in seconds), current wind x, current wind z]
|
||||
if (_type == "Cloud") exitWith {
|
||||
private ["_value","_time"];
|
||||
_value = _params select 0;
|
||||
_time = _params select 1;
|
||||
|
||||
_exitReason = [_this,"SetWeather",getPos _activatingPlayer,_clientKey,_playerUID,_activatingPlayer] call server_verifySender;
|
||||
if (_exitReason != "") exitWith {diag_log _exitReason};
|
||||
|
||||
drn_DynamicWeatherEventArgs = [overcast,fog,rain,"OVERCAST",_value,_time,-1,-1];
|
||||
publicVariable "drn_DynamicWeatherEventArgs";
|
||||
drn_DynamicWeatherEventArgs call drn_fnc_DynamicWeather_SetWeatherLocal;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// This variable is used for crate spawning. DO NOT CHANGE IT.
|
||||
EAT_isOverPoch = isClass (configFile >> "CfgWeapons" >> "USSR_cheytacM200");
|
||||
|
||||
// Log tool usage to .txt file
|
||||
"EAT_PVEH_usageLogger" addPublicVariableEventHandler {
|
||||
"EATadminLogger" callExtension (_this select 1);
|
||||
};
|
||||
|
||||
// Export base to .sqf
|
||||
"EAT_PVEH_baseExporter" addPublicVariableEventHandler {
|
||||
"EATbaseExporter" callExtension (_this select 1);
|
||||
};
|
@ -0,0 +1,19 @@
|
||||
// Return the closest position from array to the positionA.
|
||||
// In: [positionA,[array of positions]]
|
||||
// Out: positionB
|
||||
private ["_pA","_ps","_p1","_p2"];
|
||||
_pA = _this select 0;
|
||||
_ps = _this select 1;
|
||||
|
||||
_p1 = _ps select 0;
|
||||
|
||||
if (count _ps > 1) then {
|
||||
for "_i" from 1 to (count _ps - 1) do {
|
||||
_p2 = _ps select _i;
|
||||
if ((_p2 distance _pA) < (_p1 distance _pA)) then {
|
||||
_p1 = _p2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_p1
|
@ -0,0 +1,59 @@
|
||||
// In: marker
|
||||
// Out: array of positions
|
||||
private ["_area","_corners"];
|
||||
_area = _this;
|
||||
_corners = [];
|
||||
|
||||
// Center point
|
||||
private ["_center","_centerX","_centerY"];
|
||||
_center = getMarkerPos _area;
|
||||
_centerX = _center select 0;
|
||||
_centerY = _center select 1;
|
||||
|
||||
// Direction and make sure it's between 0 and 360.
|
||||
private ["_dir","_dirCos","_dirSin"];
|
||||
_dir = (markerDir _area) * -1;
|
||||
_dir = _dir % 360;
|
||||
_dirCos = cos _dir;
|
||||
_dirSin = sin _dir;
|
||||
|
||||
// Size
|
||||
private ["_size","_sizeX","_sizeY"];
|
||||
_size = getMarkerSize _area;
|
||||
_sizeX = _size select 0;
|
||||
_sizeY = _size select 1;
|
||||
|
||||
|
||||
private ["_cosX","_sinX","_cosY","_sinY","_addX","_addY","_subX","_subY"];
|
||||
_cosX = _dirCos * _sizeX;
|
||||
_sinX = _dirSin * _sizeX;
|
||||
_cosY = _dirCos * _sizeY;
|
||||
_sinY = _dirSin * _sizeY;
|
||||
|
||||
_addX = _cosX + _sinY;
|
||||
_addY = _sinX + _cosY;
|
||||
_subX = _cosX - _sinY;
|
||||
_subY = _sinX - _cosY;
|
||||
|
||||
private ["_posX","_posY"];
|
||||
// Bottom Left
|
||||
_posX = _centerX - _subX;
|
||||
_posY = _centerY - _addY;
|
||||
_corners set [0,[_posX,_posY]];
|
||||
|
||||
// Top Left
|
||||
_posX = _centerX - _addX;
|
||||
_posY = _centerY - _subY;
|
||||
_corners set [1,[_posX,_posY]];
|
||||
|
||||
// Top Right
|
||||
_posX = _centerX + _subX;
|
||||
_posY = _centerY + _addY;
|
||||
_corners set [2,[_posX,_posY]];
|
||||
|
||||
// Bottom Right
|
||||
_posX = _centerX + _addX;
|
||||
_posY = _centerY + _subY;
|
||||
_corners set [3,[_posX,_posY]];
|
||||
|
||||
_corners
|
@ -0,0 +1,30 @@
|
||||
// In: marker
|
||||
// Out: string (marker shape)
|
||||
|
||||
private ["_size","_x","_y","_ret"];
|
||||
_size = markersize _this;
|
||||
_x = _size select 0;
|
||||
_y = _size select 1;
|
||||
|
||||
_ret = "";
|
||||
|
||||
switch (tolower(markershape _this)) do {
|
||||
case "rectangle": {
|
||||
if (_x == _y) then {
|
||||
_ret = "SQUARE";
|
||||
} else {
|
||||
_ret = "RECTANGLE";
|
||||
};
|
||||
};
|
||||
case "ellipse": {
|
||||
if (_x == _y) then {
|
||||
_ret = "CIRCLE";
|
||||
} else {
|
||||
_ret = "ELLIPSE";
|
||||
};
|
||||
};
|
||||
case "icon": {
|
||||
_ret = "ICON";
|
||||
};
|
||||
};
|
||||
_ret
|
13
@DayZ_Epoch_Server/addons/dayz_server/DZAI/SHK_pos/shk_pos_fnc_getpos.sqf
Executable file
13
@DayZ_Epoch_Server/addons/dayz_server/DZAI/SHK_pos/shk_pos_fnc_getpos.sqf
Executable file
@ -0,0 +1,13 @@
|
||||
// In: [position,distance,direction]
|
||||
// Out: position
|
||||
private ["_pos","_dst","_dir","_orgX","_orgY","_posX","_posY"];
|
||||
_pos = _this select 0;
|
||||
_dst = _this select 1;
|
||||
_dir = _this select 2;
|
||||
|
||||
_orgX = _pos select 0;
|
||||
_orgY = _pos select 1;
|
||||
_posX = _orgX + (_dst * sin _dir);
|
||||
_posY = _orgY + (_dst * cos _dir);
|
||||
|
||||
[_posX,_posY,0]
|
@ -0,0 +1,26 @@
|
||||
// In: marker
|
||||
// Out: position
|
||||
|
||||
// Center point
|
||||
private ["_center","_centerX","_centerY"];
|
||||
_center = getMarkerPos _this;
|
||||
_centerX = _center select 0;
|
||||
_centerY = _center select 1;
|
||||
|
||||
// Size
|
||||
private ["_size"];
|
||||
_size = getMarkerSize _this;
|
||||
_size = _size select 0;
|
||||
|
||||
// Randomly pick a direction,
|
||||
private ["_dir","_posX","_posY","_rand","_pos"];
|
||||
_dir = random 360;
|
||||
_rand = sqrt random 1;
|
||||
_posX = (_size * (cos _dir)) * _rand;
|
||||
_posY = (_size * (sin _dir)) * _rand;
|
||||
_pos = [_posX,_posY];
|
||||
|
||||
_posX = _centerX + (_pos select 0);
|
||||
_posY = _centerY + (_pos select 1);
|
||||
|
||||
[_posX,_posY,0]
|
@ -0,0 +1,43 @@
|
||||
// In: ellipseMarker
|
||||
// Out: position
|
||||
|
||||
// Center point
|
||||
private ["_center","_centerX","_centerY"];
|
||||
_center = getMarkerPos _this;
|
||||
_centerX = _center select 0;
|
||||
_centerY = _center select 1;
|
||||
|
||||
// Direction and make sure it's between 0 and 360.
|
||||
private ["_dirMrk"];
|
||||
_dirMrk = (markerDir _this) * -1;
|
||||
_dirMrk = _dirMrk % 360;
|
||||
|
||||
// Size
|
||||
private ["_size","_sizeX","_sizeY"];
|
||||
_size = getMarkerSize _this;
|
||||
_sizeX = _size select 0;
|
||||
_sizeY = _size select 1;
|
||||
|
||||
// If B axis is longer than A, switch them and fix direction.
|
||||
if (_sizeX < _sizeY) then {
|
||||
_sizeX = _size select 1;
|
||||
_sizeY = _size select 0;
|
||||
_dirMrk = _dirMrk + 90;
|
||||
};
|
||||
|
||||
// Randomly pick a direction,
|
||||
private ["_dir","_posX","_posY","_rand","_pos"];
|
||||
_dir = random 360;
|
||||
_rand = sqrt random 1;
|
||||
_posX = (_sizeX * (cos _dir)) * _rand;
|
||||
_posY = (_sizeY * (sin _dir)) * _rand;
|
||||
_pos = [_posX,_posY];
|
||||
|
||||
if (_dirMrk != 0) then {
|
||||
_pos = [_pos,_dirMrk] call SHK_pos_fnc_rotatePosition;
|
||||
};
|
||||
|
||||
_posX = _centerX + (_pos select 0);
|
||||
_posY = _centerY + (_pos select 1);
|
||||
|
||||
[_posX,_posY,0]
|
@ -0,0 +1,37 @@
|
||||
// In: marker
|
||||
// Out: position
|
||||
|
||||
// Center point
|
||||
private ["_center","_centerX","_centerY"];
|
||||
_center = getMarkerPos _this;
|
||||
_centerX = _center select 0;
|
||||
_centerY = _center select 1;
|
||||
|
||||
// Size
|
||||
private ["_size","_sizeX","_sizeY"];
|
||||
_size = getMarkerSize _this;
|
||||
_sizeX = _size select 0;
|
||||
_sizeY = _size select 1;
|
||||
|
||||
// Direction and make sure it's between 0 and 360.
|
||||
private ["_dir","_dirCos","_dirSin"];
|
||||
_dir = (markerDir _this) * -1;
|
||||
_dir = _dir % 360;
|
||||
_dirCos = cos _dir;
|
||||
_dirSin = sin _dir;
|
||||
|
||||
private ["_rndX","_rndY","_posX","_posY"];
|
||||
// Select random X and Y
|
||||
_rndX = (random (_sizeX * 2)) - _sizeX;
|
||||
_rndY = (random (_sizeY * 2)) - _sizeY;
|
||||
|
||||
// If area is angled, shift X and Y
|
||||
if (_dir != 0) then {
|
||||
_posX = _centerX + (_dirCos * _rndX - _dirSin * _rndY);
|
||||
_posY = _centerY + (_dirSin * _rndX + _dirCos * _rndY);
|
||||
} else {
|
||||
_posX = _centerX + _rndX;
|
||||
_posY = _centerY + _rndY;
|
||||
};
|
||||
|
||||
[_posX,_posY,0]
|
@ -0,0 +1,36 @@
|
||||
// In: marker
|
||||
// Out: position
|
||||
|
||||
// Center point
|
||||
private ["_center","_centerX","_centerY"];
|
||||
_center = getMarkerPos _this;
|
||||
_centerX = _center select 0;
|
||||
_centerY = _center select 1;
|
||||
|
||||
// Size
|
||||
private ["_size"];
|
||||
_size = getMarkerSize _this;
|
||||
_size = _size select 0;
|
||||
|
||||
// Direction and make sure it's between 0 and 360.
|
||||
private ["_dir","_dirCos","_dirSin"];
|
||||
_dir = (markerDir _this) * -1;
|
||||
_dir = _dir % 360;
|
||||
_dirCos = cos _dir;
|
||||
_dirSin = sin _dir;
|
||||
|
||||
private ["_rndX","_rndY","_posX","_posY"];
|
||||
// Select random X and Y
|
||||
_rndX = (random (_size * 2)) - _size;
|
||||
_rndY = (random (_size * 2)) - _size;
|
||||
|
||||
// If area is angled, shift X and Y
|
||||
if (_dir != 0) then {
|
||||
_posX = _centerX + (_dirCos * _rndX - _dirSin * _rndY);
|
||||
_posY = _centerY + (_dirSin * _rndX + _dirCos * _rndY);
|
||||
} else {
|
||||
_posX = _centerX + _rndX;
|
||||
_posY = _centerY + _rndY;
|
||||
};
|
||||
|
||||
[_posX,_posY,0]
|
@ -0,0 +1,85 @@
|
||||
// In: [position,blackListMarker]
|
||||
// Out: boolean
|
||||
|
||||
private ["_pos","_area","_return"];
|
||||
_pos = _this select 0;
|
||||
_area = _this select 1;
|
||||
_return = false;
|
||||
|
||||
// Find corner positions of the rectangle
|
||||
private ["_dir"];
|
||||
_dir = markerDir _area;
|
||||
_dir = _dir % 360;
|
||||
|
||||
// Center point
|
||||
private ["_center","_centerX","_centerY"];
|
||||
_center = getMarkerPos _area;
|
||||
_centerX = _center select 0;
|
||||
_centerY = _center select 1;
|
||||
|
||||
private ["_shape"];
|
||||
_shape = _area call SHK_pos_fnc_getMarkerShape;
|
||||
|
||||
if (_shape == "ICON") then {
|
||||
// Icon has only one position, so if it equals to the given position, then it's blacklisted.
|
||||
if ([_pos,_center] call SHK_pos_fnc_isSamePosition) then {
|
||||
_return = true;
|
||||
};
|
||||
|
||||
// Markers that have an area.
|
||||
} else {
|
||||
if (_shape in ["RECTANGLE","SQUARE"]) then {
|
||||
private ["_corners"];
|
||||
_corners = _area call SHK_pos_fnc_getMarkerCorners;
|
||||
|
||||
// If rectangle is not axis-aligned.
|
||||
if (_dir % 90 != 0) then {
|
||||
// Add the point position to the array to have it shifted by the FOR below
|
||||
_corners set [4,_pos];
|
||||
|
||||
// Rotate each corner position so that the rectangle is aligned with x and y axises
|
||||
// Use origo as center while rotating, but for comparison shift positions back
|
||||
private ["_posCor","_posNew","_orgX","_orgY","_shiftedX","_shiftedY","_newX","_newY"];
|
||||
for "_i" from 0 to (count _corners - 1) do {
|
||||
_posCor = _corners select _i;
|
||||
|
||||
// Original coordinates
|
||||
_orgX = _posCor select 0;
|
||||
_orgY = _posCor select 1;
|
||||
|
||||
// Subtract the marker center coordinates from corner coordinates.
|
||||
// Rotation is done using origo (0,0) as anchor/centerpoint.
|
||||
_shiftedX = _orgX - _centerX;
|
||||
_shiftedY = _orgY - _centerY;
|
||||
|
||||
// Axis-aligned corner position
|
||||
_posNew = [[_shiftedX,_shiftedY],_dir] call SHK_pos_fnc_rotatePosition;
|
||||
|
||||
// Shift the aligned corner position back near to the original marker location.
|
||||
_newX = _posNew select 0;
|
||||
_newY = _posNew select 1;
|
||||
_newX = _newX + _centerX;
|
||||
_newY = _newY + _centerY;
|
||||
|
||||
_posCor = [_newX,_newY];
|
||||
|
||||
_corners set [_i,_posCor];
|
||||
};
|
||||
|
||||
// Point position
|
||||
_pos = _corners select 4;
|
||||
};
|
||||
|
||||
// Check if the position is within the marker area.
|
||||
_return = [_pos,_corners] call SHK_pos_fnc_isInRectangle;
|
||||
} else {
|
||||
if (_shape == "CIRCLE") then {
|
||||
_return = [_pos,_area] call SHK_pos_fnc_isInCircle;
|
||||
} else {
|
||||
_return = [_pos,_area] call SHK_pos_fnc_isInEllipse;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
_return
|
@ -0,0 +1,36 @@
|
||||
// In: [position,marker]
|
||||
// Out: boolean
|
||||
|
||||
private ["_pos","_area","_posX","_posY"];
|
||||
_pos = _this select 0;
|
||||
_area = _this select 1;
|
||||
|
||||
_posX = _pos select 0;
|
||||
_posY = _pos select 1;
|
||||
|
||||
// Center point
|
||||
private ["_center","_centerX","_centerY"];
|
||||
_center = getMarkerPos _area;
|
||||
_centerX = _center select 0;
|
||||
_centerY = _center select 1;
|
||||
|
||||
// Size
|
||||
private ["_size"];
|
||||
_size = getMarkerSize _area;
|
||||
_size = _size select 0;
|
||||
|
||||
// Difference in coordinates
|
||||
private ["_difX","_difY"];
|
||||
_difX = _posX - _centerX;
|
||||
_difY = _posY - _centerY;
|
||||
|
||||
private ["_return"];
|
||||
_return = false;
|
||||
|
||||
// If distance from center of marker to the given position is
|
||||
// smaller than the radius of the circle, then position is inside.
|
||||
if (sqrt((_difX * _difX) + (_difY * _difY)) < _size) then {
|
||||
_return = true;
|
||||
};
|
||||
|
||||
_return
|
@ -0,0 +1,54 @@
|
||||
// In: [position,ellipseMarker]
|
||||
// Out: boolean
|
||||
|
||||
private ["_pos","_area","_return"];
|
||||
_pos = _this select 0;
|
||||
_area = _this select 1;
|
||||
_return = false;
|
||||
|
||||
// Ellipse size
|
||||
private ["_size","_sizeX","_sizeY"];
|
||||
_size = getMarkerSize _area;
|
||||
_sizeX = _size select 0;
|
||||
_sizeY = _size select 1;
|
||||
|
||||
// Direction and make sure it's between 0 and 360.
|
||||
private ["_dir"];
|
||||
_dir = markerDir _area;
|
||||
_dir = _dir % 360;
|
||||
|
||||
// Ellipse center position
|
||||
private ["_center","_centerX","_centerY"];
|
||||
_center = getMarkerPos _area;
|
||||
_centerX = _center select 0;
|
||||
_centerY = _center select 1;
|
||||
|
||||
// If marker is not axis-aligned, rotate the dot position.
|
||||
if (_dir % 90 != 0) then {
|
||||
private ["_orgX","_orgY","_shiftedX","_shiftedY"];
|
||||
_orgX = _pos select 0;
|
||||
_orgY = _pos select 1;
|
||||
_shiftedX = _orgX - _centerX;
|
||||
_shiftedY = _orgY - _centerY;
|
||||
_pos = [[_shiftedX,_shiftedY],_dir] call SHK_pos_fnc_rotatePosition;
|
||||
_pos set [0,(_pos select 0) + _centerX];
|
||||
_pos set [1,(_pos select 1) + _centerY];
|
||||
};
|
||||
// Dot position
|
||||
private ["_posX","_posY"];
|
||||
_posX = _pos select 0;
|
||||
_posY = _pos select 1;
|
||||
|
||||
// Distance between dot and ellipse center
|
||||
private ["_dstX","_dstY"];
|
||||
_dstX = abs(_posX - _centerX);
|
||||
_dstY = abs(_posY - _centerY);
|
||||
|
||||
private ["_sum"];
|
||||
_sum = ((_dstX * _dstX)/(_sizeX * _sizeX)) + ((_dstY * _dstY)/(_sizeY * _sizeY));
|
||||
|
||||
if (_sum <= 1) then {
|
||||
_return = true;
|
||||
};
|
||||
|
||||
_return
|
@ -0,0 +1,26 @@
|
||||
// In: [pointPosition,corners]
|
||||
// Out: boolean
|
||||
private ["_pos","_corners","_return"];
|
||||
_pos = _this select 0;
|
||||
_corners = _this select 1;
|
||||
_return = false;
|
||||
|
||||
private ["_dotX","_dotY","_bottomLeft","_left","_bottom","_topRight","_right","_top"];
|
||||
_dotX = _pos select 0;
|
||||
_dotY = _pos select 1;
|
||||
|
||||
_bottomLeft = _corners select 0;
|
||||
_left = _bottomLeft select 0;
|
||||
_bottom = _bottomLeft select 1;
|
||||
|
||||
_topRight = _corners select 2;
|
||||
_right = _topRight select 0;
|
||||
_top = _topRight select 1;
|
||||
|
||||
// x is between left and right
|
||||
// y is between bottom and top
|
||||
if (_dotX >= _left && _dotX < _right && _dotY >= _bottom && _dotY < _top) then {
|
||||
_return = true;
|
||||
};
|
||||
|
||||
_return
|
@ -0,0 +1,16 @@
|
||||
// In: [array1,array2]
|
||||
// Out: boolean
|
||||
|
||||
private ["_p1","_p2","_return"];
|
||||
_p1 = _this select 0;
|
||||
_p2 = _this select 1;
|
||||
_return = true;
|
||||
|
||||
// Only compare X and Y coordinates, ignore Z.
|
||||
for "_i" from 0 to 1 do {
|
||||
if ((_p1 select _i) != (_p2 select _i)) exitwith {
|
||||
_return = false;
|
||||
};
|
||||
};
|
||||
|
||||
_return
|
@ -0,0 +1,13 @@
|
||||
// In: [position,direction]
|
||||
// Out: position
|
||||
private ["_pos","_dir","_orgX","_orgY","_newX","_newY"];
|
||||
_pos = _this select 0;
|
||||
_dir = _this select 1;
|
||||
|
||||
_orgX = _pos select 0;
|
||||
_orgY = _pos select 1;
|
||||
|
||||
_newX = (_orgX * (cos _dir)) - (_orgY * (sin _dir));
|
||||
_newY = (_orgX * (sin _dir)) + (_orgY * (cos _dir));
|
||||
|
||||
[_newX,_newY]
|
170
@DayZ_Epoch_Server/addons/dayz_server/DZAI/SHK_pos/shk_pos_getpos.sqf
Executable file
170
@DayZ_Epoch_Server/addons/dayz_server/DZAI/SHK_pos/shk_pos_getpos.sqf
Executable file
@ -0,0 +1,170 @@
|
||||
/* Select a random position based on anchor position, direction and distance.
|
||||
In: [position,distance,direction,water,road,emptySpace]
|
||||
Out: position
|
||||
*/
|
||||
private ["_org","_dst","_dir","_pos","_water","_road","_empty"];
|
||||
_org = _this select 0;
|
||||
_dst = _this select 1;
|
||||
_dir = if (count _this > 2) then {_this select 2} else {random 360};
|
||||
_water = if (count _this > 3) then {_this select 3} else {0};
|
||||
_road = if (count _this > 4) then {_this select 4} else {[0,200]};
|
||||
_empty = if (count _this > 5) then {_this select 5} else {[]};
|
||||
|
||||
// Object instead of position array given
|
||||
if (typename _org == "OBJECT") then {_org = getpos _org};
|
||||
|
||||
// Distance given as an array of min and max. Pick a random between them.
|
||||
if (typename _dst == "ARRAY") then {
|
||||
private ["_min","_max"];
|
||||
_min = _dst select 0;
|
||||
_max = _dst select 1;
|
||||
_dst = (_min + random(_max - _min));
|
||||
};
|
||||
|
||||
// Direction given as an array of min and max. Pick a random dir between them.
|
||||
if (typename _dir == "ARRAY") then {
|
||||
private ["_min","_max","_ang"];
|
||||
_min = _dir select 0;
|
||||
_max = _dir select 1;
|
||||
|
||||
_ang = _max - _min;
|
||||
|
||||
// Min bigger than max, can happen with directions around north
|
||||
if (_ang < 0) then { _ang = _ang + 360 };
|
||||
|
||||
_dir = (_min + random _ang);
|
||||
};
|
||||
|
||||
_pos = [_org,_dst,_dir] call SHK_pos_fnc_getPos;
|
||||
|
||||
// Water position
|
||||
if (typeName _water == "SCALAR") then {
|
||||
switch _water do {
|
||||
case 0: { // Water not allowed
|
||||
if (surfaceIsWater _pos) then {
|
||||
private ["_p","_d","_l"];
|
||||
_d = 0; _l = true;
|
||||
|
||||
// Search for a land position starting from the randomly picked position and
|
||||
// then going outwards from it in full circles in 20m steps.
|
||||
while {_d = _d + 20; _l && _d < 5000} do {
|
||||
for "_i" from 0 to 340 step 20 do {
|
||||
_p = [_pos,_d,_i] call SHK_pos_fnc_getpos;
|
||||
if (!surfaceIsWater _p) exitwith {_l = false};
|
||||
};
|
||||
};
|
||||
_pos = _p;
|
||||
};
|
||||
};
|
||||
case 1: { // Water allowed
|
||||
|
||||
};
|
||||
case 2: { // Only water allowed
|
||||
if !(surfaceIsWater _pos) then {
|
||||
private ["_p","_d","_l"];
|
||||
_d = 0; _l = true;
|
||||
|
||||
// Search for a water position starting from the randomly picked position and
|
||||
// then going outwards from it in full circles in 20m steps.
|
||||
while {_d = _d + 20; _l && _d < 5000} do {
|
||||
for "_i" from 0 to 340 step 20 do {
|
||||
_p = [_pos,_d,_i] call SHK_pos_fnc_getpos;
|
||||
if (surfaceIsWater _p) exitwith {_l = false};
|
||||
};
|
||||
};
|
||||
_pos = _p;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else { // For backward compatibility
|
||||
// Water position is not allowed
|
||||
if !_water then {
|
||||
if (surfaceIsWater _pos) then {
|
||||
private ["_p","_d","_l"];
|
||||
_d = 0; _l = true;
|
||||
|
||||
// Search for a land position starting from the randomly picked position and
|
||||
// then going outwards from it in full circles in 20m steps.
|
||||
while {_d = _d + 20; _l && _d < 5000} do {
|
||||
for "_i" from 0 to 340 step 20 do {
|
||||
_p = [_pos,_d,_i] call SHK_pos_fnc_getpos;
|
||||
if (!surfaceIsWater _p) exitwith {_l = false};
|
||||
};
|
||||
};
|
||||
_pos = _p;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// Road position.
|
||||
if (count _road > 0) then {
|
||||
if ((_road select 0) > 0) then {
|
||||
private ["_mode","_range","_roads","_cnt","_p","_p2"];
|
||||
_mode = _road select 0;
|
||||
_range = _road select 1;
|
||||
_roads = _pos nearroads _range;
|
||||
_cnt = count _roads;
|
||||
_p = [];
|
||||
|
||||
// Road position(s) found.
|
||||
if (_cnt > 0) then {
|
||||
_p = getpos (_roads select 0);
|
||||
|
||||
// Found more than one road position, return closest.
|
||||
if (_cnt > 1) then {
|
||||
for "_i" from 1 to (_cnt - 1) do {
|
||||
_p2 = getpos (_roads select _i);
|
||||
if ((_p2 distance _pos) < (_p distance _pos)) then {
|
||||
_p = _p2;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
switch _mode do {
|
||||
// Road position preferred but not forced.
|
||||
case 1: {
|
||||
if (count _p > 0) then {
|
||||
_pos = _p;
|
||||
};
|
||||
};
|
||||
// Only accept road position, return empty array if none found.
|
||||
case 2: {
|
||||
if (count _p > 0) then {
|
||||
_pos = _p;
|
||||
} else {
|
||||
_pos resize 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// Find empty position
|
||||
private ["_dst","_veh","_p"];
|
||||
|
||||
_dst = 200;
|
||||
_veh = "";
|
||||
switch (typename _empty) do {
|
||||
case "OBJECT": { _veh = typeof _empty }; // Only vehicle given, use default distance
|
||||
case "SCALAR": {_dst = _empty;};
|
||||
case "ARRAY": {
|
||||
if (count _empty > 0) then {
|
||||
_dst = _empty select 0;
|
||||
_veh = _empty select 1;
|
||||
if (typename _veh == typename objNull) then { _veh = typeof _veh };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_p = [];
|
||||
if (count _pos > 0) then {_p = _pos findEmptyPosition [0,_dst,_veh];};
|
||||
|
||||
|
||||
// If an empty position is found, use it. Otherwise, return the original position.
|
||||
if (count _p > 0) then {
|
||||
_pos = _p;
|
||||
};
|
||||
|
||||
// Return position
|
||||
_pos
|
101
@DayZ_Epoch_Server/addons/dayz_server/DZAI/SHK_pos/shk_pos_getposmarker.sqf
Executable file
101
@DayZ_Epoch_Server/addons/dayz_server/DZAI/SHK_pos/shk_pos_getposmarker.sqf
Executable file
@ -0,0 +1,101 @@
|
||||
/* Select a random position from an area defined by a marker.
|
||||
In: [marker,water,blacklist,emptySpace]
|
||||
Out: position
|
||||
*/
|
||||
private ["_area","_water","_blist","_pos","_empty"];
|
||||
_area = _this select 0;
|
||||
_water = if (count _this > 1) then {_this select 1} else {0};
|
||||
_blist = if (count _this > 2) then {_this select 2} else {[]};
|
||||
_empty = if (count _this > 3) then {_this select 3} else {[]};
|
||||
_pos = [];
|
||||
|
||||
if (typename _blist == "STRING") then {_blist = [_blist]};
|
||||
|
||||
private ["_shape"];
|
||||
_shape = _area call SHK_pos_fnc_getMarkerShape;
|
||||
|
||||
// Limited loop so the script won't get stuck
|
||||
private ["_i","_exit"];
|
||||
_exit = false;
|
||||
for [{_i = 0}, {_i < 1000 && !_exit}, {_i = _i + 1}] do {
|
||||
|
||||
// Rectangle or Ellipse marker given?
|
||||
if (_shape in ["SQUARE","RECTANGLE"]) then {
|
||||
_pos = _area call SHK_pos_fnc_getPosFromRectangle;
|
||||
} else {
|
||||
_pos = _area call SHK_pos_fnc_getPosFromEllipse;
|
||||
};
|
||||
|
||||
// Find empty position
|
||||
private ["_dst","_veh","_p"];
|
||||
|
||||
_dst = 200;
|
||||
_veh = "";
|
||||
switch (typename _empty) do {
|
||||
case (typename objNull): { _veh = typeof _empty }; // Only vehicle given, use default distance
|
||||
case ("STRING"): { _veh = _empty };
|
||||
case (typename []): {
|
||||
if (count _empty > 0) then {
|
||||
_dst = _empty select 0;
|
||||
_veh = _empty select 1;
|
||||
if (typename _veh == typename objNull) then { _veh = typeof _veh };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_p = _pos findEmptyPosition [0,_dst,_veh];
|
||||
|
||||
// If an empty position is found, use it. Otherwise, return the original position.
|
||||
if (count _p > 0) then {
|
||||
_pos = _p;
|
||||
};
|
||||
|
||||
// Water position
|
||||
if (typeName _water == "SCALAR") then {
|
||||
switch _water do {
|
||||
|
||||
case 0: { // Water position is not allowed
|
||||
// Position is on land, try to exit script.
|
||||
if !(surfaceIsWater _pos) then {
|
||||
_exit = true;
|
||||
};
|
||||
};
|
||||
|
||||
case 1: { // Doesn't matter if position is on water or land.
|
||||
_exit = true;
|
||||
};
|
||||
|
||||
case 2: { // Only water position is allowed
|
||||
// Position is on water, try to exit script.
|
||||
if (surfaceIsWater _pos) then {
|
||||
_exit = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else { // For backward compatibility
|
||||
// Water position is not allowed
|
||||
if !_water then {
|
||||
// Position is on land, try to exit script.
|
||||
if !(surfaceIsWater _pos) then {
|
||||
_exit = true;
|
||||
};
|
||||
// Doesn't matter if position is on water or land.
|
||||
} else {
|
||||
_exit = true;
|
||||
};
|
||||
};
|
||||
|
||||
// Position is not allowed in blacklisted areas
|
||||
if (count _blist > 0 && _exit) then {
|
||||
// Check each blacklist marker
|
||||
{
|
||||
// If blacklisted, jump out of blacklist check and continue main loop.
|
||||
if ([_pos,_x] call SHK_pos_fnc_isBlacklisted) exitwith {
|
||||
_exit = false;
|
||||
};
|
||||
} foreach _blist;
|
||||
};
|
||||
};
|
||||
|
||||
// Return position
|
||||
_pos
|
105
@DayZ_Epoch_Server/addons/dayz_server/DZAI/SHK_pos/shk_pos_init.sqf
Executable file
105
@DayZ_Epoch_Server/addons/dayz_server/DZAI/SHK_pos/shk_pos_init.sqf
Executable file
@ -0,0 +1,105 @@
|
||||
/*
|
||||
SHK_pos
|
||||
|
||||
Version 0.24
|
||||
Author: Shuko (shuko@quakenet, miika@miikajarvinen.fi)
|
||||
Contributors: Cool=Azroul13, Hatifnat
|
||||
|
||||
Forum: http://forums.bistudio.com/showthread.php?162695-SHK_pos
|
||||
|
||||
Marker Based Selection
|
||||
Required Parameters:
|
||||
0 String Area marker's name.
|
||||
|
||||
Optional Parameters:
|
||||
1 Number Water position. Default is only land positions allowed.
|
||||
0 Find closest land. Search outwards 360 degrees (20 degree steps) and 20m steps.
|
||||
1 Allow water positions.
|
||||
2 Find only water positions.
|
||||
2 Array or String One or multiple blacklist area markers which are excluded from the main marker area.
|
||||
3 Array, Number, Object or Vehicle Type Force finding large enough empty position.
|
||||
0 Max range from the selection position to look for empty space. Default is 200.
|
||||
1 Vehicle or vehicle type to fit into an empty space.
|
||||
|
||||
Examples:
|
||||
[...,[300,heli]] Array with distance and vehicle object.
|
||||
[...,350] Only distance given
|
||||
[...,(typeof heli)] Only vehicle type given
|
||||
[...,heli] Only vehicle object given
|
||||
|
||||
Position Based Selection
|
||||
Required Parameters:
|
||||
0 Object or Position Anchor point from where the relative position is calculated from.
|
||||
1 Array or Number Distance from anchor.
|
||||
|
||||
Optional Parameters:
|
||||
2 Array of Number Direction from anchor. Default is random between 0 and 360.
|
||||
3 Number Water position. Default is only land positions allowed.
|
||||
0 Find closest land. Search outwards 360 degrees (20 degree steps) and 20m steps.
|
||||
1 Allow water positions.
|
||||
2 Find only water positions.
|
||||
4 Array Road positions.
|
||||
0 Number Road position forcing. Default is 0.
|
||||
0 Do not search for road positions.
|
||||
1 Find closest road position. Return the generated random position if none found.
|
||||
2 Find closest road position. Return empty array if none found.
|
||||
1 Number Road search range. Default is 200m.
|
||||
5 Array, Number, Object or Vehicle Type Force finding large enough empty position.
|
||||
0 Max range from the selection position to look for empty space. Default is 200.
|
||||
1 Vehicle or vehicle type to fit into an empty space.
|
||||
|
||||
Examples:
|
||||
[...,[300,heli]] Array with distance and vehicle object.
|
||||
[...,350] Only distance given
|
||||
[...,(typeof heli)] Only vehicle type given
|
||||
[...,heli] Only vehicle object given
|
||||
|
||||
Usage:
|
||||
Preprocess the file in init.sqf:
|
||||
call compile preprocessfile "SHK_pos\shk_pos_init.sqf";
|
||||
|
||||
Actually getting the position:
|
||||
pos = [parameters] call SHK_pos;
|
||||
*/
|
||||
// Functions
|
||||
SHK_pos_getPos = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_getpos.sqf",DZAI_directory];
|
||||
SHK_pos_getPosMarker = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_getposmarker.sqf",DZAI_directory];
|
||||
|
||||
// Sub functions
|
||||
SHK_pos_fnc_findClosestPosition = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_findclosestposition.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_getMarkerCorners = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_getmarkercorners.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_getMarkerShape = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_getmarkershape.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_getPos = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_getpos.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_getPosFromCircle = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_getposfromcircle.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_getPosFromEllipse = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_getposfromellipse.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_getPosFromRectangle = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_getposfromrectangle.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_getPosFromSquare = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_getposfromsquare.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_isBlacklisted = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_isblacklisted.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_isInCircle = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_isincircle.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_isInEllipse = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_isinellipse.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_isInRectangle = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_isinrectangle.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_isSamePosition = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_issameposition.sqf",DZAI_directory];
|
||||
SHK_pos_fnc_rotatePosition = compile preprocessFileLineNumbers format ["%1\shk_pos\shk_pos_fnc_rotateposition.sqf",DZAI_directory];
|
||||
|
||||
// Wrapper function
|
||||
// Decide which function to call based on parameters.
|
||||
SHK_pos = {
|
||||
private ["_pos"];
|
||||
_pos = [];
|
||||
|
||||
// Only marker is given as parameter
|
||||
if (typename _this == "STRING") then {
|
||||
_pos = [_this] call SHK_pos_getPosMarker;
|
||||
|
||||
// Parameter array
|
||||
} else {
|
||||
if (typename (_this select 0) == "STRING") then {
|
||||
_pos = _this call SHK_pos_getPosMarker;
|
||||
} else {
|
||||
_pos = _this call SHK_pos_getPos;
|
||||
};
|
||||
};
|
||||
|
||||
// Return position
|
||||
_pos
|
||||
};
|
186
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/BIN_taskPatrol.sqf
Executable file
186
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/BIN_taskPatrol.sqf
Executable file
@ -0,0 +1,186 @@
|
||||
/*
|
||||
=======================================================================================================================
|
||||
Script: BIN_taskPatrol.sqf v1.3
|
||||
Author(s): Binesi
|
||||
Partly based on original code by BIS
|
||||
|
||||
Description:
|
||||
Creates a continually randomized patrol path which circles and intersects a given position.
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: the group to which to assign the waypoints (Group)
|
||||
_this select 1: the position on which to base the patrol (Array)
|
||||
_this select 2: the maximum distance between waypoints (Number)
|
||||
_this select 3: (optional) debug markers on or off (Number)
|
||||
_this select 4: (optional) blacklist of areas (Array)
|
||||
|
||||
Returns:
|
||||
Boolean - success flag
|
||||
|
||||
Example(s):
|
||||
null = [group this,(getPos this),250] execVM "BIN_taskPatrol.sqf"
|
||||
null = [group this,(getPos this),250,1] execVM "BIN_taskPatrol.sqf" // Same with debug markers
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------
|
||||
Notes: Wolffy.au
|
||||
If anyone is interested, I've made some additions to Binesi's BIN_taskPatrol script.
|
||||
Random initial patrol direction - I noticed every patrol started off in the same direction, so I've randomised it.
|
||||
Fixed the 2D position / findSafePos errors
|
||||
Added building positions as possible patrol locations using Random Building Position Script v1.0 by Tophe of Östgöta Ops
|
||||
Added check that BIS Functions has been initialized
|
||||
|
||||
ArmaIIholic
|
||||
-- added JTD direction normalization function
|
||||
-- changed numbers for waypoints to match previous waypoints
|
||||
-- randomized initial direction - Wolffy.au added only the offset
|
||||
-- fixed error with building position format
|
||||
-- randomized initial direction -- Wolffy.au added only the offset which had to be reduced to 180
|
||||
- however this script is making full circle from wherever it starts
|
||||
|
||||
Edited version for DZAI (https://github.com/dayzai/DZAI)
|
||||
=======================================================================================================================
|
||||
*/
|
||||
|
||||
if (isServer) then
|
||||
{
|
||||
//waitUntil {!isNil "bis_fnc_init"};
|
||||
_grp = _this select 0;
|
||||
_pos = _this select 1;
|
||||
_max_dist = _this select 2;
|
||||
//_debug = if ((count _this) > 3) then {_this select 3} else {((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled})};
|
||||
_unitType = _grp getVariable ["unitType",""];
|
||||
_allowWater = (_unitType == "aircustom");
|
||||
_searchLoot = _unitType in ["static","dynamic"];
|
||||
_isVehicle = (_unitType == "landcustom");
|
||||
|
||||
//_grp setBehaviour "AWARE";
|
||||
if (_max_dist < 75) then {_grp setSpeedMode "LIMITED"};
|
||||
//_grp setCombatMode "RED";
|
||||
|
||||
_wpStatements = if ((_max_dist >= 100) && {_searchLoot}) then {"if ((random 3) > 2) then { group this setCurrentWaypoint [(group this), (floor (random (count (waypoints (group this)))))];} else {_nul = [(group this),100] spawn DZAI_findLootPile;};"} else {"if ((random 3) > 2) then { group this setCurrentWaypoint [(group this), (floor (random (count (waypoints (group this)))))];};"};
|
||||
_wpTimeouts = if (_max_dist >= 100) then {[0, 3, 10]} else {[5, 10, 15]};
|
||||
|
||||
_center_x = (_pos) select 0;
|
||||
_center_y = (_pos) select 1;
|
||||
_center_z = (_pos) select 2;
|
||||
if(isNil "_center_z")then{_center_z = 0;};
|
||||
|
||||
_wp_count = 4 + (floor random 3) + (floor (_max_dist / 100 ));
|
||||
_angle = (360 / (_wp_count -1));
|
||||
|
||||
_newangle = 0;
|
||||
_wp_array = [];
|
||||
_slack = _max_dist / 5.5;
|
||||
_completionRadius = if (_isVehicle) then {(5 + _slack) max 75} else {(5 + _slack)};
|
||||
if ( _slack < 20 ) then { _slack = 20 };
|
||||
|
||||
_angle_offset = random 180;
|
||||
while {count _wp_array < _wp_count} do
|
||||
{
|
||||
private ["_x1","_y1","_wp_pos", "_prepos","_bldgpos","_bldgs","_a","_b"];
|
||||
|
||||
_newangle = (count _wp_array * _angle) + _angle_offset;
|
||||
|
||||
if ((_newangle > 360) || (_newangle < 0)) then
|
||||
{
|
||||
_newangle = abs (abs (_newangle) - 360);
|
||||
};
|
||||
|
||||
if ((random 1) < 0.5) then
|
||||
{
|
||||
_newangle = -_newangle;
|
||||
|
||||
if ((_newangle > 360) || (_newangle < 0)) then
|
||||
{
|
||||
_newangle = abs (abs (_newangle) - 360);
|
||||
};
|
||||
};
|
||||
|
||||
_x1 = _center_x - (sin _newangle * _max_dist);
|
||||
_y1 = _center_y - (cos _newangle * _max_dist);
|
||||
|
||||
_prepos = [_x1, _y1, _center_z];
|
||||
if ( isNil "_center_z" ) then {
|
||||
_prepos = [_x1, _y1];
|
||||
};
|
||||
|
||||
_wp_pos = [_prepos, 0, _slack, 6, 0, 50 * (pi / 180), 0, [],[_prepos]] call BIS_fnc_findSafePos;
|
||||
|
||||
_a = 0 + (_wp_pos select 0);
|
||||
_b = 0 + (_wp_pos select 1);
|
||||
|
||||
if (_searchLoot) then {
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// The following code is an extract from Random Building Position Script v1.0 by Tophe of Östgöta Ops
|
||||
//////////////////////////////////////////////////////////////////
|
||||
_bldgpos = [];
|
||||
_bldgs = nearestObjects [[_a,_b,0], ["HouseBase"], 50];
|
||||
{
|
||||
private["_i","_y"];
|
||||
_i = 0;
|
||||
_y = _x buildingPos _i;
|
||||
while {format["%1", _y] != "[0,0,0]"} do {
|
||||
_bldgpos = _bldgpos + [_y];
|
||||
_i = _i + 1;
|
||||
_y = _x buildingPos _i;
|
||||
};
|
||||
} forEach _bldgs;
|
||||
|
||||
if(count _bldgpos != 0) then {_wp_pos = _bldgpos call BIS_fnc_selectRandom2;};
|
||||
} else {
|
||||
if (_isVehicle) then {
|
||||
_nearRoads = _wp_pos nearRoads ((_max_dist/2) min 100);
|
||||
_roadsCount = count _nearRoads;
|
||||
_returnPos = [];
|
||||
if (_roadsCount > 0) then {
|
||||
_returnPos = getPosASL (_nearRoads select 0);
|
||||
if (_roadsCount > 1) then {
|
||||
for "_i" from 1 to (_roadsCount -1) do {
|
||||
_comparePos = getPosASL (_nearRoads select _i);
|
||||
if ((_comparePos distance _wp_pos) < (_returnPos distance _wp_pos)) then {
|
||||
_returnPos = _comparePos;
|
||||
};
|
||||
};
|
||||
};
|
||||
_wp_pos = _returnPos;
|
||||
};
|
||||
};
|
||||
};
|
||||
_wp_array = _wp_array + [_wp_pos];
|
||||
|
||||
uiSleep 0.5;
|
||||
};
|
||||
|
||||
uiSleep 1;
|
||||
|
||||
for "_i" from 1 to (_wp_count - 1) do
|
||||
{
|
||||
private ["_wp","_cur_pos"];
|
||||
|
||||
_cur_pos = (_wp_array select _i);
|
||||
|
||||
if ((!(surfaceIsWater _cur_pos)) or {_allowWater}) then {
|
||||
_wp = _grp addWaypoint [_cur_pos, 0];
|
||||
_wp setWaypointType "MOVE";
|
||||
_wp setWaypointCompletionRadius _completionRadius;
|
||||
_wp setWaypointTimeout [_wpTimeouts select 0, _wpTimeouts select 1, _wpTimeouts select 2];
|
||||
_wp setWaypointStatements ["true", _wpStatements];
|
||||
};
|
||||
uiSleep 0.25;
|
||||
};
|
||||
|
||||
if (_searchLoot) then {
|
||||
// End back near start point and then pick a new random point
|
||||
_wp1 = _grp addWaypoint [_pos, 0];
|
||||
_wp1 setWaypointType "SAD";
|
||||
_wp1 setWaypointCompletionRadius (_max_dist max 100);
|
||||
[_grp,(count waypoints _grp)] setWaypointStatements ["true", "group this setCurrentWaypoint [(group this), (round (random 2) + 1)];"];
|
||||
};
|
||||
|
||||
// Cycle in case we reach the end
|
||||
_wp2 = _grp addWaypoint [_pos, 0];
|
||||
_wp2 setWaypointType "CYCLE";
|
||||
_wp2 setWaypointCompletionRadius (_max_dist max 100);
|
||||
|
||||
true
|
||||
};
|
26
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_alertzombies.sqf
Executable file
26
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_alertzombies.sqf
Executable file
@ -0,0 +1,26 @@
|
||||
|
||||
private["_unit","_distance","_i","_listTalk","_zombie","_targets","_pos"];
|
||||
//Alert Zed's to noise of shot
|
||||
_unit = _this select 0;
|
||||
_distance = _this select 1;
|
||||
_doRun = _this select 2;
|
||||
_pos = _this select 3;
|
||||
_listTalk = _pos nearEntities ["zZombie_Base",_distance];
|
||||
|
||||
{
|
||||
if ((_unit distance _x) > 10) then {
|
||||
if (_doRun) then {
|
||||
_localtargets = _x getVariable ["localtargets",[]];
|
||||
_remotetargets = _x getVariable ["remotetargets",[]];
|
||||
_epochtargets = _x getVariable ["targets",[]];
|
||||
_targets = _localtargets + _remotetargets + _epochtargets;
|
||||
if (!(_unit in _targets)) then {
|
||||
_remotetargets set [count _remotetargets,_unit];
|
||||
_x setVariable ["remotetargets",_remotetargets,true];
|
||||
_x setVariable ["targets",_remotetargets,true];
|
||||
};
|
||||
} else {
|
||||
_x setVariable ["myDest",_pos,true];
|
||||
};
|
||||
};
|
||||
} count _listTalk;
|
104
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_death.sqf
Executable file
104
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_death.sqf
Executable file
@ -0,0 +1,104 @@
|
||||
/*
|
||||
DZAI_unitDeath
|
||||
|
||||
Description: Called when AI unit blood level drops below zero to process unit death.
|
||||
|
||||
Usage: [_unit,_killer] call DZAI_unitDeath;
|
||||
*/
|
||||
|
||||
private["_coins","_values","_victim","_killer","_unitGroup","_unitType","_launchWeapon","_launchAmmo","_deathType","_groupIsEmpty","_unitsAlive","_vehicle","_groupSize"];
|
||||
|
||||
_victim = _this select 0;
|
||||
_killer = _this select 1;
|
||||
_deathType = if ((count _this) > 2) then {_this select 2} else {"bled"};
|
||||
|
||||
if (_victim getVariable ["deathhandled",false]) exitWith {};
|
||||
_victim setVariable ["deathhandled",true];
|
||||
|
||||
_vehicle = (vehicle _victim);
|
||||
_unitGroup = (group _victim);
|
||||
|
||||
_victim setDamage 1;
|
||||
_victim removeAllEventHandlers DZAI_healthType;
|
||||
|
||||
//Check number of units alive, preserve group immediately if empty.
|
||||
_unitsAlive = ({alive _x} count (units _unitGroup));
|
||||
_groupIsEmpty = if (_unitsAlive == 0) then {_unitGroup call DZAI_protectGroup; true} else {false};
|
||||
|
||||
//Update group size counter
|
||||
_groupSize = (_unitGroup getVariable ["GroupSize",0]);
|
||||
if (_groupSize > 0) then {_unitGroup setVariable ["GroupSize",(_groupSize - 1)]};
|
||||
|
||||
//Retrieve group type
|
||||
_unitType = _unitGroup getVariable ["unitType",""];
|
||||
|
||||
call {
|
||||
if (_unitType == "static") exitWith {
|
||||
[_victim,_killer,_unitGroup,_groupIsEmpty] call DZAI_AI_killed_static;
|
||||
0 = [_victim,_killer,_unitGroup,_unitType,_unitsAlive] call DZAI_AI_killed_all;
|
||||
};
|
||||
if (_unitType == "dynamic") exitWith {
|
||||
[_victim,_killer,_unitGroup,_groupIsEmpty] call DZAI_AI_killed_dynamic;
|
||||
0 = [_victim,_killer,_unitGroup,_unitType,_unitsAlive] call DZAI_AI_killed_all;
|
||||
};
|
||||
if (_unitType == "randomspawn") exitWith {
|
||||
[_victim,_killer,_unitGroup,_groupIsEmpty] call DZAI_AI_killed_random;
|
||||
0 = [_victim,_killer,_unitGroup,_unitType,_unitsAlive] call DZAI_AI_killed_all;
|
||||
};
|
||||
if (_unitType in ["air","aircustom"]) exitWith {
|
||||
[_victim,_unitGroup] call DZAI_AI_killed_air;
|
||||
};
|
||||
if (_unitType in ["land","landcustom"]) exitWith {
|
||||
0 = [_victim,_killer,_unitGroup,_unitType] call DZAI_AI_killed_all;
|
||||
[_victim,_unitGroup,_groupIsEmpty] call DZAI_AI_killed_land;
|
||||
};
|
||||
if (_unitType == "aircrashed") exitWith {};
|
||||
if (_groupIsEmpty) then {
|
||||
_unitGroup setVariable ["GroupSize",-1];
|
||||
};
|
||||
};
|
||||
|
||||
if !(isNull _victim) then {
|
||||
//_launchWeapon = (secondaryWeapon _victim);
|
||||
//if (_launchWeapon in DZAI_launcherTypes) then {
|
||||
// _launchAmmo = getArray (configFile >> "CfgWeapons" >> _launchWeapon >> "magazines") select 0;
|
||||
// _victim removeWeapon _launchWeapon;
|
||||
// _victim removeMagazines _launchAmmo;
|
||||
//};
|
||||
|
||||
if (_deathType == "shothead") then { //no need for isplayer check since "shothead" is only possible if killer is a player
|
||||
_nul = _killer spawn {
|
||||
_headshots = _this getVariable ["headShots",0];
|
||||
_headshots = _headshots + 1;
|
||||
_this setVariable ["headShots",_headshots,true];
|
||||
};
|
||||
};
|
||||
|
||||
if (_victim getVariable ["removeNVG",true]) then {
|
||||
_victim removeWeapon "NVGoggles";
|
||||
};
|
||||
|
||||
_victim spawn DZAI_deathFlies;
|
||||
_bodyName = _victim getVariable ["bodyName","unknown"];
|
||||
_victim setVariable ["bodyName",_bodyName];
|
||||
_victim setVariable ["deathType",_deathType,true];
|
||||
_victim setVariable ["DZAI_deathTime",diag_tickTime];
|
||||
_victim setVariable ["unconscious",true];
|
||||
|
||||
if (Z_SingleCurrency && {DZAI_hasCoins select 0}) then {
|
||||
_values = DZAI_hasCoins select 1;
|
||||
_coins = ceil(random (_values select 1)) max (_values select 0);
|
||||
_victim setVariable ["cashMoney",_coins,true];
|
||||
};
|
||||
|
||||
if (_vehicle == (_unitGroup getVariable ["assignedVehicle",objNull])) then {
|
||||
_victim setPosASL (getPosASL _victim);
|
||||
};
|
||||
if ((combatMode _unitGroup) == "BLUE") then {_unitGroup setCombatMode "RED"};
|
||||
//[_victim] joinSilent grpNull;
|
||||
if (DZAI_deathMessages && {isPlayer _killer}) then {
|
||||
_nul = [_killer,_bodyName] spawn DZAI_sendKillMessage;
|
||||
};
|
||||
};
|
||||
|
||||
_victim
|
16
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_fired.sqf
Executable file
16
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_fired.sqf
Executable file
@ -0,0 +1,16 @@
|
||||
private["_unit","_ammo","_audible","_distance"];
|
||||
|
||||
//[unit, weapon, muzzle, mode, ammo, magazine]
|
||||
_unit = _this select 0;
|
||||
_ammo = _this select 4;
|
||||
|
||||
if ((diag_tickTime - (_unit getVariable ["lastFired",0])) > 5) then {
|
||||
//Calculate audible range of fired bullet
|
||||
_audible = getNumber (configFile >> "CfgAmmo" >> _ammo >> "audibleFire");
|
||||
_caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "caliber");
|
||||
_distance = round(_audible * 10 * _caliber);
|
||||
[_unit,_distance/2,true,(ASLtoATL getPosASL _unit)] spawn DZAI_alertZombies;
|
||||
_unit setVariable ["lastFired",diag_tickTime];
|
||||
};
|
||||
|
||||
true
|
111
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_generate_loot.sqf
Executable file
111
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_generate_loot.sqf
Executable file
@ -0,0 +1,111 @@
|
||||
private ["_unit","_pistol","_pistols","_weapongrade","_magazine","_currentWeapon","_toolselect","_chance","_tool","_toolsArray","_loot"];
|
||||
_unit = _this select 0;
|
||||
_weapongrade = _this select 1;
|
||||
|
||||
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: AI killed by player at %1. Generating loot with weapongrade %2.",mapGridPosition _unit,_weapongrade];};
|
||||
|
||||
_loot = [];
|
||||
|
||||
if (_unit getVariable ["CanGivePistol",true]) then {
|
||||
_pistols = missionNamespace getVariable ["DZAI_Pistols"+str(_weapongrade),DZAI_Pistols0+DZAI_Pistols1+DZAI_Pistols2+DZAI_Pistols3];
|
||||
_pistol = _pistols call BIS_fnc_selectRandom2;
|
||||
_magazine = getArray (configFile >> "CfgWeapons" >> _pistol >> "magazines") select 0;
|
||||
_unit addMagazine _magazine;
|
||||
_unit addWeapon _pistol;
|
||||
if (DZAI_debugLevel > 1) then {
|
||||
_loot set [count _loot,_pistol];
|
||||
_loot set [count _loot,_magazine];
|
||||
};
|
||||
};
|
||||
|
||||
//Add consumables, medical items, and miscellaneous items
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//Clear backpack cargo in case there are items
|
||||
clearMagazineCargoGlobal _unit;
|
||||
|
||||
//Add one guaranteed Bandage to inventory
|
||||
_unit addMagazine "ItemBandage";
|
||||
|
||||
//Add edible items to inventory
|
||||
for "_i" from 1 to DZAI_invedibles do {
|
||||
if (DZAI_chanceEdibles call DZAI_chance) then {
|
||||
_invedible = DZAI_Edibles call BIS_fnc_selectRandom2;
|
||||
_unit addMagazine _invedible;
|
||||
if (DZAI_debugLevel > 1) then {_loot set [count _loot,_invedible];};
|
||||
};
|
||||
};
|
||||
|
||||
//Add edible items to backpack
|
||||
for "_i" from 1 to DZAI_bpedibles do {
|
||||
if (DZAI_chanceEdibles call DZAI_chance) then {
|
||||
_bpedible = DZAI_Edibles call BIS_fnc_selectRandom2;
|
||||
(unitBackpack _unit) addMagazineCargoGlobal [_bpedible, 1];
|
||||
if (DZAI_debugLevel > 1) then {_loot set [count _loot,_bpedible];};
|
||||
};
|
||||
};
|
||||
|
||||
//Chance to add miscellaneous item (Small) to backpack
|
||||
for "_i" from 1 to DZAI_numMiscItemS do {
|
||||
if (DZAI_chanceMiscItemS call DZAI_chance) then {
|
||||
_miscItemS = DZAI_MiscItemS call BIS_fnc_selectRandom2;
|
||||
(unitBackpack _unit) addMagazineCargoGlobal [_miscItemS,1];
|
||||
if (DZAI_debugLevel > 1) then {_loot set [count _loot,_miscItemS];};
|
||||
};
|
||||
};
|
||||
|
||||
if (_weapongrade > 0) then {
|
||||
//Chance to add miscellaneous item (Large) to backpack - only if backpack capacity greater than 6
|
||||
if ((getNumber (configFile >> "CfgVehicles" >> (str (unitBackpack _unit)) >> "transportMaxMagazines")) > 6) then {
|
||||
for "_i" from 1 to DZAI_numMiscItemL do {
|
||||
if (DZAI_chanceMiscItemL call DZAI_chance) then {
|
||||
_miscItemL = DZAI_MiscItemL call BIS_fnc_selectRandom2;
|
||||
(unitBackpack _unit) addMagazineCargoGlobal [_miscItemL,1];
|
||||
if (DZAI_debugLevel > 1) then {_loot set [count _loot,_miscItemL];};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//Add medical items to backpack
|
||||
for "_i" from 1 to DZAI_bpmedicals do {
|
||||
if (DZAI_chanceMedicals call DZAI_chance) then {
|
||||
_bpmedical = DZAI_Medicals2 call BIS_fnc_selectRandom2;
|
||||
(unitBackpack _unit) addMagazineCargoGlobal [_bpmedical, 1];
|
||||
if (DZAI_debugLevel > 1) then {_loot set [count _loot,_bpmedical];};
|
||||
};
|
||||
};
|
||||
|
||||
//Add medical items to inventory
|
||||
for "_i" from 1 to DZAI_invmedicals do {
|
||||
if (DZAI_chanceMedicals call DZAI_chance) then {
|
||||
_invmedical = DZAI_Medicals1 call BIS_fnc_selectRandom2;
|
||||
_unit addMagazine _invmedical;
|
||||
if (DZAI_debugLevel > 1) then {_loot set [count _loot,_invmedical];};
|
||||
};
|
||||
};
|
||||
|
||||
if (DZAI_modName == "epoch") then {
|
||||
_barsAdded = 0;
|
||||
{
|
||||
if (_barsAdded >= DZAI_metalBarNum) exitWith {};
|
||||
if (((_x select 1) call DZAI_chance) && {[(_x select 0),"magazine"] call DZAI_checkClassname}) then {
|
||||
_unit addMagazine (_x select 0);
|
||||
_barsAdded = _barsAdded + 1;
|
||||
if (DZAI_debugLevel > 1) then {_loot set [count _loot,(_x select 0)];};
|
||||
}
|
||||
} count DZAI_metalBars;
|
||||
};
|
||||
};
|
||||
|
||||
//Add tool items
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
_toolsArray = if (_weapongrade < 2) then {DZAI_tools0} else {DZAI_tools1};
|
||||
{
|
||||
if (((_x select 1) call DZAI_chance) && {[(_x select 0),"weapon"] call DZAI_checkClassname}) then {
|
||||
_unit addWeapon (_x select 0);
|
||||
if (DZAI_debugLevel > 1) then {_loot set [count _loot,(_x select 0)];};
|
||||
}
|
||||
} count _toolsArray;
|
||||
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Generated loot for AI death: %1",_loot];};
|
25
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_air.sqf
Executable file
25
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_air.sqf
Executable file
@ -0,0 +1,25 @@
|
||||
private ["_vehicle","_victim","_unitGroup","_parachuted"];
|
||||
|
||||
_victim = _this select 0;
|
||||
_unitGroup = _this select 1;
|
||||
|
||||
_vehicle = (_unitGroup getVariable ["assignedVehicle",objNull]);
|
||||
if (alive _vehicle) then {
|
||||
if (_victim getVariable ["isDriver",false]) then {
|
||||
_unitGroup setVariable ["unitType","aircrashed"]; //prevent this case from being run for ejected non-pilot units
|
||||
_parachuted = [_vehicle] call DZAI_parachuteOut;
|
||||
if (_parachuted) then {
|
||||
_nul = _vehicle spawn {
|
||||
_this setFuel 0;
|
||||
_this setVehicleAmmo 0;
|
||||
uiSleep 2.5;
|
||||
_this setDamage 1;
|
||||
};
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: AI %1 pilot unit %2 killed, ejecting surving crew.",(typeOf _vehicle),(typeOf _victim)];};
|
||||
};
|
||||
} else {
|
||||
0 = [_victim,(_unitGroup getVariable ["weapongrade",1])] spawn DZAI_addLoot;
|
||||
};
|
||||
};
|
||||
|
||||
true
|
46
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_all.sqf
Executable file
46
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_all.sqf
Executable file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
fnc_banditAIKilled
|
||||
|
||||
Description: Adds loot to AI corpse if killed by a player. Script is shared between all infantry-type AI units.
|
||||
|
||||
Usage: [_victim,_killer,_unitGroup,_unitType] call DZAI_AI_killed_all;
|
||||
|
||||
*/
|
||||
|
||||
private["_victim","_killer","_unitGroup","_unitType","_groupSize","_unitsAlive"];
|
||||
_victim = _this select 0;
|
||||
_killer = _this select 1;
|
||||
_unitGroup = _this select 2;
|
||||
_unitType = _this select 3;
|
||||
_unitsAlive = if ((count _this) > 4) then {_this select 4} else {0};
|
||||
|
||||
if (isPlayer _killer) then {
|
||||
_weapongrade = _unitGroup getVariable ["weapongrade",1];
|
||||
0 = [_victim,_weapongrade] spawn DZAI_addLoot;
|
||||
0 = [_killer,_victim,"banditKills"] call DZAI_countKills;
|
||||
if (_unitsAlive > 0) then {
|
||||
_unitGroup reveal [vehicle _killer,4];
|
||||
_unitGroup setFormDir ([(leader _unitGroup),_killer] call BIS_fnc_dirTo);
|
||||
(units _unitGroup) doTarget (vehicle _killer);
|
||||
(units _unitGroup) doFire (vehicle _killer);
|
||||
if (DZAI_findKiller) then {0 = [_killer,_unitGroup] spawn DZAI_huntKiller};
|
||||
if (DZAI_lastManStanding && {_unitsAlive == 1}) then {0 = _unitGroup spawn DZAI_skillBoost;}; //"Last man standing" mode on
|
||||
if (DZAI_debugLevel > 0) then {diag_log format["DZAI Debug: AI group %1 killed, %2 units left alive in group.",_unitGroup,_unitsAlive];};
|
||||
};
|
||||
} else {
|
||||
if (_killer == _victim) then {
|
||||
removeAllWeapons _victim; //Clear unit inventory if death is caused by collision.
|
||||
{_victim removeMagazines _x} count (magazines _victim);
|
||||
removeBackpack _victim;
|
||||
};
|
||||
};
|
||||
|
||||
//Force death animation if unit has pistol and conscious to avoid "standing while dead" bug.
|
||||
if ((vehicle _victim) == _victim) then {
|
||||
if !((_victim getVariable ["CanGivePistol",true]) && {(_victim getVariable ["unconscious",false])}) then {
|
||||
_anim = if ((animationState _victim) in ["amovppnemrunsnonwnondf","amovppnemstpsnonwnondnon","amovppnemstpsraswrfldnon","amovppnemsprslowwrfldf","aidlppnemstpsnonwnondnon0s","aidlppnemstpsnonwnondnon01"]) then {"adthppnemstpsraswpstdnon_2"} else {"adthpercmstpslowwrfldnon_4"};
|
||||
_nul = [objNull, _victim, rSWITCHMOVE, _anim] call RE;
|
||||
};
|
||||
};
|
||||
|
||||
true
|
14
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_dynamic.sqf
Executable file
14
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_dynamic.sqf
Executable file
@ -0,0 +1,14 @@
|
||||
|
||||
private ["_victim","_killer","_groupIsEmpty","_trigger","_unitGroup"];
|
||||
|
||||
_victim = _this select 0;
|
||||
_killer = _this select 1;
|
||||
_unitGroup = _this select 2;
|
||||
_groupIsEmpty = _this select 3;
|
||||
|
||||
_trigger = _unitGroup getVariable ["trigger",DZAI_defaultTrigger];
|
||||
if (_groupIsEmpty) then {
|
||||
[_trigger,true] spawn fnc_despawnBandits_dynamic; //force despawning even if players are present in trigger area.
|
||||
};
|
||||
|
||||
true
|
37
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_land.sqf
Executable file
37
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_land.sqf
Executable file
@ -0,0 +1,37 @@
|
||||
private ["_victim","_vehicle","_unitGroup","_groupIsEmpty"];
|
||||
|
||||
_victim = _this select 0;
|
||||
_unitGroup = _this select 1;
|
||||
_groupIsEmpty = _this select 2;
|
||||
|
||||
_vehicle = _unitGroup getVariable ["assignedVehicle",objNull];
|
||||
if (_groupIsEmpty) then {
|
||||
if (_vehicle isKindOf "LandVehicle") then {
|
||||
{_vehicle removeAllEventHandlers _x} count ["HandleDamage","Killed"];
|
||||
[_unitGroup,_vehicle] call DZAI_respawnAIVehicle;
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: AI vehicle patrol destroyed, adding vehicle %1 to cleanup queue.",(typeOf _vehicle)];};
|
||||
};
|
||||
_unitGroup setVariable ["GroupSize",-1];
|
||||
} else {
|
||||
if (_victim getVariable ["isDriver",false]) then {
|
||||
_groupUnits = (units _unitGroup) - [_victim];
|
||||
_newDriver = _groupUnits call BIS_fnc_selectRandom2; //Find another unit to serve as driver
|
||||
if (!isNil "_newDriver") then {
|
||||
_nul = [_newDriver,_vehicle] spawn {
|
||||
private ["_newDriver","_vehicle"];
|
||||
_newDriver = _this select 0;
|
||||
_vehicle = _this select 1;
|
||||
unassignVehicle _newDriver;
|
||||
_newDriver assignAsDriver _vehicle;
|
||||
if (_newDriver in _vehicle) then {
|
||||
_newDriver moveInDriver _vehicle;
|
||||
};
|
||||
[_newDriver] orderGetIn true;
|
||||
_newDriver setVariable ["isDriver",true];
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Replaced driver unit for group %1 vehicle %2.",(group _newDriver),(typeOf _vehicle)];};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
true
|
14
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_random.sqf
Executable file
14
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_random.sqf
Executable file
@ -0,0 +1,14 @@
|
||||
|
||||
private ["_victim","_killer","_groupIsEmpty","_trigger","_unitGroup"];
|
||||
|
||||
_victim = _this select 0;
|
||||
_killer = _this select 1;
|
||||
_unitGroup = _this select 2;
|
||||
_groupIsEmpty = _this select 3;
|
||||
|
||||
_trigger = _unitGroup getVariable ["trigger",DZAI_defaultTrigger];
|
||||
if (_groupIsEmpty) then {
|
||||
[_trigger,true] spawn fnc_despawnBandits_random; //force despawning even if players are present in trigger area.
|
||||
};
|
||||
|
||||
true
|
55
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_static.sqf
Executable file
55
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_killed_static.sqf
Executable file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
fnc_staticAIDeath
|
||||
|
||||
Usage: [_victim,_killer,_unitGroup] call DZAI_AI_killed_static;
|
||||
|
||||
Description: Script is called when an AI unit is killed, and waits for the specified amount of time before respawning the unit into the same group it was part of previously.
|
||||
If the killed unit was the last surviving unit of its group, a dummy AI unit is created to occupy the group until a dead unit in the group is respawned.
|
||||
*/
|
||||
|
||||
private ["_victim","_killer","_unitGroup","_trigger","_dummy","_groupIsEmpty"];
|
||||
|
||||
_victim = _this select 0;
|
||||
_killer = _this select 1;
|
||||
_unitGroup = _this select 2;
|
||||
_groupIsEmpty = _this select 3;
|
||||
|
||||
_trigger = _unitGroup getVariable ["trigger",DZAI_defaultTrigger];
|
||||
|
||||
if (_groupIsEmpty) then {
|
||||
if (_trigger getVariable ["respawn",true]) then {
|
||||
_respawnCount = _trigger getVariable ["respawnLimit",-1];
|
||||
if (_respawnCount != 0) then {
|
||||
[0,_trigger,_unitGroup] call fnc_respawnHandler; //If there are still respawns possible... respawn the group
|
||||
if (_respawnCount > -1) then {
|
||||
_trigger setVariable ["respawnLimit",(_respawnCount - 1)]; //If respawns are limited, decrease respawn counter
|
||||
if (DZAI_debugLevel > 0) then {diag_log format["DZAI Debug: Respawns remaining for group %1: %2.",_unitGroup,(_unitGroup getVariable ["respawnLimit",-1])];};
|
||||
};
|
||||
} else {
|
||||
_trigger setVariable ["permadelete",true]; //deny respawn and delete trigger on next despawn.
|
||||
};
|
||||
} else {
|
||||
if ((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled}) then {deleteMarker str(_trigger)};
|
||||
_nul = _trigger spawn {
|
||||
_trigger = _this;
|
||||
_trigger setTriggerStatements ["this","true","false"]; //Disable trigger from activating or deactivating while cleanup is performed
|
||||
if (DZAI_debugLevel > 0) then {diag_log format["DZAI Debug: Deleting custom-defined AI spawn %1 at %2 in 30 seconds.",triggerText _trigger, mapGridPosition _trigger];};
|
||||
uiSleep 30;
|
||||
{
|
||||
//_x call DZAI_deleteGroup;
|
||||
_x setVariable ["GroupSize",-1];
|
||||
} forEach (_trigger getVariable ["GroupArray",[]]);
|
||||
deleteMarker (_trigger getVariable ["spawnmarker",""]);
|
||||
[_trigger,"DZAI_staticTriggerArray"] call DZAI_updateSpawnCount;
|
||||
deleteVehicle _trigger;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (!(_trigger getVariable ["respawn",true])) then {
|
||||
_maxUnits = _trigger getVariable ["maxUnits",[0,0]]; //Reduce maximum AI for spawn trigger for each AI killed for non-respawning spawns.
|
||||
_maxUnits set [0,(_maxUnits select 0) - 1];
|
||||
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: MaxUnits variable for group %1 set to %2.",_unitGroup,_maxUnits];};
|
||||
};
|
||||
};
|
||||
|
||||
true
|
57
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_setup_loadout.sqf
Executable file
57
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_setup_loadout.sqf
Executable file
@ -0,0 +1,57 @@
|
||||
private ["_unit","_weapongrade","_weapons","_weapon","_magazine","_backpacks","_gadgetsArray","_backpack","_gadget","_inventory"];
|
||||
_unit = _this select 0;
|
||||
_weapongrade = _this select 1;
|
||||
|
||||
if (_unit getVariable ["loadoutDone",false]) exitWith {diag_log format ["DZAI Error: Unit already has loadout! (%1)",__FILE__];};
|
||||
|
||||
if !(_weapongrade in DZAI_weaponGradesAll) then {
|
||||
_weapongradeInvalid = _weapongrade;
|
||||
_weapongrade = DZAI_weaponGrades call BIS_fnc_selectRandom2;
|
||||
diag_log format ["DZAI Error: Invalid weapongrade provided: %1. Generating new weapongrade value: %2. (%3)",_weapongradeInvalid,_weapongrade,__FILE__];
|
||||
};
|
||||
|
||||
if ((count (weapons _unit)) > 0) then {
|
||||
removeAllWeapons _unit;
|
||||
{_unit removeWeapon _x} count ["ItemMap","ItemGPS","ItemCompass","ItemRadio","ItemWatch"];
|
||||
};
|
||||
|
||||
_weapons = missionNamespace getVariable ["DZAI_Rifles"+str(_weapongrade),DZAI_Rifles1+DZAI_Rifles2+DZAI_Rifles3];
|
||||
if ((_weapongrade == 0) && {(0.25 call DZAI_chance)}) then {
|
||||
_weapons = missionNamespace getVariable ("DZAI_Pistols" + str(floor(random 2)));
|
||||
};
|
||||
_backpacks = missionNamespace getVariable ["DZAI_Backpacks"+str(_weapongrade),DZAI_Backpacks1+DZAI_Backpacks2+DZAI_Backpacks3];
|
||||
|
||||
//Select weapon and backpack
|
||||
_weapon = _weapons call BIS_fnc_selectRandom2;
|
||||
_backpack = _backpacks call BIS_fnc_selectRandom2;
|
||||
|
||||
//Add weapon, ammunition, and backpack
|
||||
_magazine = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines") select 0;
|
||||
_unit addMagazine _magazine;
|
||||
_unit addWeapon _weapon;
|
||||
_unit selectWeapon _weapon;
|
||||
_unit addBackpack _backpack;
|
||||
if ((getNumber (configFile >> "CfgWeapons" >> _weapon >> "type")) == 2) then {_unit setVariable ["CanGivePistol",false]};
|
||||
if ((getNumber (configFile >> "CfgMagazines" >> _magazine >> "count")) < 8) then {_unit addMagazine _magazine};
|
||||
|
||||
_gadgetsArray = if (_weapongrade > 1) then {DZAI_gadgets1} else {DZAI_gadgets0};
|
||||
for "_i" from 0 to ((count _gadgetsArray) - 1) do {
|
||||
if (((_gadgetsArray select _i) select 1) call DZAI_chance) then {
|
||||
_gadget = ((_gadgetsArray select _i) select 0);
|
||||
_unit addWeapon _gadget;
|
||||
};
|
||||
};
|
||||
|
||||
//If unit has weapongrade 2 or 3 and was not given NVGs, give the unit temporary NVGs which will be removed at death. Set DZAI_tempNVGs to true in variables config to enable temporary NVGs.
|
||||
if (DZAI_tempNVGs) then {
|
||||
if (!(_unit hasWeapon "NVGoggles") && {(_weapongrade > 0)} && {(daytime < 6 || daytime > 20)}) then {
|
||||
_nvg = _unit call DZAI_addTempNVG;
|
||||
if (DZAI_debugLevel > 1) then {diag_log "DZAI Extended Debug: Generated temporary NVGs for AI.";};
|
||||
};
|
||||
};
|
||||
|
||||
_unit setVariable ["loadoutDone",true];
|
||||
_unit setVariable ["loadout",[[_weapon],[_magazine]]];
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Created loadout for unit %1 (weapongrade: %2): [%3,%4,%5].",_unit,_weapongrade,_weapon,_magazine,_backpack];};
|
||||
|
||||
true
|
45
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_unconscious.sqf
Executable file
45
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/ai_unconscious.sqf
Executable file
@ -0,0 +1,45 @@
|
||||
//Knocks an AI unit unconscious for x seconds - determines the correct animation to use, and returns unit to standing state after waking.
|
||||
|
||||
private ["_unit","_anim","_hit","_knockoutTime","_launchWeapon","_launchAmmo"];
|
||||
_unit = _this select 0;
|
||||
_hit = _this select 1;
|
||||
|
||||
if ((vehicle _unit) == _unit) then { //do not allow vehicle AI to be knocked unconscious.
|
||||
if ((animationState _unit) in ["amovppnemrunsnonwnondf","amovppnemstpsnonwnondnon","amovppnemstpsraswrfldnon","amovppnemsprslowwrfldf","aidlppnemstpsnonwnondnon0s","aidlppnemstpsnonwnondnon01"]) then {
|
||||
_anim = "adthppnemstpsraswpstdnon_2";
|
||||
} else {
|
||||
_anim = "adthpercmstpslowwrfldnon_4";
|
||||
};
|
||||
_unit switchMove _anim;
|
||||
_nul = [objNull, _unit, rSWITCHMOVE, _anim] call RE;
|
||||
{_unit disableAI _x} forEach ["TARGET","MOVE","FSM"];
|
||||
//diag_log "DEBUG :: AI unit is unconscious.";
|
||||
|
||||
//_launchWeapon = (secondaryWeapon _unit);
|
||||
//if (_launchWeapon in DZAI_launcherTypes) then {
|
||||
// _launchAmmo = getArray (configFile >> "CfgWeapons" >> _launchWeapon >> "magazines") select 0;
|
||||
// _unit removeWeapon _launchWeapon;
|
||||
// _unit removeMagazines _launchAmmo;
|
||||
// _loadout = _unit getVariable ["loadout",[]];
|
||||
// (_loadout select 0) resize 1;
|
||||
// (_loadout select 1) resize 1;
|
||||
// //if (_launchWeapon in (weapons _unit)) then {diag_log format ["Warning: Unable to remove launcher weapon %1 from unit %2.",_launchWeapon,_unit]};
|
||||
// //if (_launchAmmo in (magazines _unit)) then {diag_log format ["Warning: Unable to remove launcher ammo %1 from unit %2.",_launchWeapon,_unit]};
|
||||
// //if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Unit %1 knocked out, removed launcher weapon %2 and ammo %3.",_unit,_launchWeapon,_launchAmmo]};
|
||||
//};
|
||||
|
||||
_knockoutTime = if (_hit == "head_hit") then {40} else {20};
|
||||
//diag_log format ["DEBUG :: Knocked out AI %1 for %2 seconds.",_unit,_knockoutTime];
|
||||
uiSleep _knockoutTime;
|
||||
|
||||
if (alive _unit) then {
|
||||
_nul = [objNull, _unit, rSWITCHMOVE, "AmovPpneMstpSnonWnonDnon_healed"] call RE;
|
||||
_unit switchMove "AmovPpneMstpSnonWnonDnon_healed";
|
||||
uiSleep 1.75;
|
||||
{_unit enableAI _x} forEach ["TARGET","MOVE","FSM"];
|
||||
_unit setVariable ["unconscious",false];
|
||||
};
|
||||
} else {
|
||||
uiSleep 10;
|
||||
_unit setVariable ["unconscious",false];
|
||||
};
|
55
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/createRandomSpawns.sqf
Executable file
55
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/createRandomSpawns.sqf
Executable file
@ -0,0 +1,55 @@
|
||||
private ["_maxRandomSpawns","_debugMarkers","_triggerArea","_attempts","_trigPos","_trigger","_markername","_marker"];
|
||||
|
||||
_maxRandomSpawns = _this;
|
||||
|
||||
_debugMarkers = ((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled});
|
||||
_triggerArea = 600;
|
||||
|
||||
//waitUntil {sleep 1; !isNil "DZAI_locations_ready"};
|
||||
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Attempting to place %1 random spawns on the map...",_maxRandomSpawns];};
|
||||
|
||||
for "_i" from 1 to _maxRandomSpawns do {
|
||||
_attempts = 0;
|
||||
_keepSearching = true;
|
||||
_trigPos = [0,0,0];
|
||||
while {
|
||||
_keepSearching
|
||||
} do {
|
||||
_trigPos = ["DZAI_centerMarker",false,DZAI_randAreaBlacklist] call SHK_pos;
|
||||
_attempts = _attempts + 1;
|
||||
_keepSearching = ((count ((nearestLocations [_trigPos, ["Strategic"], 650])) > 0) && {_attempts < 3});
|
||||
if (_keepSearching) then {uiSleep 0.25};
|
||||
};
|
||||
|
||||
if (_attempts < 3) then {
|
||||
_trigger = createTrigger ["EmptyDetector",_trigPos];
|
||||
|
||||
_location = createLocation ["Strategic",(getPosASL _trigger),600,600]; //Create temporary dynamic spawn blacklist area
|
||||
_trigger setVariable ["triggerLocation",_location];
|
||||
[_trigger,"DZAI_randTriggerArray"] call DZAI_updateSpawnCount;
|
||||
|
||||
_trigger setTriggerArea [_triggerArea, _triggerArea, 0, false];
|
||||
_trigger setTriggerActivation ["ANY", "PRESENT", true];
|
||||
_trigger setTriggerTimeout [5, 5, 5, true];
|
||||
_trigger setTriggerStatements ["{isPlayer _x} count thisList > 0;","0 = [300,thisTrigger,thisList] call fnc_spawnBandits_random;", "[thisTrigger] spawn fnc_despawnBandits_random;"];
|
||||
if (_debugMarkers) then {
|
||||
_markername = str(_trigger);
|
||||
_marker = createMarker[_markername,_trigPos];
|
||||
_marker setMarkerShape "ELLIPSE";
|
||||
_marker setMarkerType "Flag";
|
||||
_marker setMarkerBrush "SOLID";
|
||||
_marker setMarkerSize [_triggerArea, _triggerArea];
|
||||
_marker setMarkerColor "ColorYellow";
|
||||
_marker setMarkerAlpha 0.6;
|
||||
DZAI_mapMarkerArray set [(count DZAI_mapMarkerArray),_marker];
|
||||
};
|
||||
_trigger setTriggerText format ["Random Spawn at %1",(mapGridPosition _trigger)];
|
||||
_trigger setVariable ["timestamp",diag_tickTime];
|
||||
if (DZAI_debugLevel > 0) then {diag_log format["DZAI Debug: Random spawn %1 of %2 placed at %3 (Retries: %4).",_i,_maxRandomSpawns,_trigPos,_attempts];};
|
||||
//DZAI_randTriggerArray set [(count DZAI_randTriggerArray),_trigger];
|
||||
} else {
|
||||
if (DZAI_debugLevel > 0) then {diag_log format["DZAI Debug: Could not find suitable location to place random spawn %1 of %2.",_i,_maxRandomSpawns];};
|
||||
};
|
||||
uiSleep 3;
|
||||
};
|
9
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_abortdynspawn.sqf
Executable file
9
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_abortdynspawn.sqf
Executable file
@ -0,0 +1,9 @@
|
||||
private["_trigger"];
|
||||
_trigger = _this;
|
||||
|
||||
DZAI_dynTriggerArray = DZAI_dynTriggerArray - [_trigger];
|
||||
if ((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled}) then {deleteMarker str(_trigger)};
|
||||
|
||||
deleteVehicle _trigger;
|
||||
|
||||
false
|
14
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_abortrandspawn.sqf
Executable file
14
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_abortrandspawn.sqf
Executable file
@ -0,0 +1,14 @@
|
||||
private["_trigger","_triggerLocation"];
|
||||
_trigger = _this;
|
||||
|
||||
[_trigger,"DZAI_randTriggerArray"] call DZAI_updateSpawnCount;
|
||||
if ((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled}) then {deleteMarker (str _trigger)};
|
||||
|
||||
_triggerLocation = _trigger getVariable "triggerLocation";
|
||||
deleteLocation _triggerLocation;
|
||||
//_triggerLocation setVariable ["deletetime",(diag_tickTime + 900)];
|
||||
//DZAI_tempBlacklist set [(count DZAI_tempBlacklist),_triggerLocation];
|
||||
|
||||
deleteVehicle _trigger;
|
||||
|
||||
false
|
63
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_checkclassname.sqf
Executable file
63
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_checkclassname.sqf
Executable file
@ -0,0 +1,63 @@
|
||||
private ["_classname","_checkType","_result","_config","_banString","_check","_configIndex"];
|
||||
|
||||
_classname = _this select 0;
|
||||
_checkType = _this select 1;
|
||||
_result = false;
|
||||
_configIndex = -1;
|
||||
_checkType = (toLower _checkType);
|
||||
_startTime = diag_tickTime;
|
||||
|
||||
call {
|
||||
if (_checkType == "weapon") exitWith {
|
||||
if (_classname in (DZAI_checkedClassnames select 0)) then {
|
||||
_result = true;
|
||||
} else {
|
||||
if (!(_classname in (DZAI_invalidClassnames select 0))) then {
|
||||
_config = "CfgWeapons";
|
||||
_banString = "bin\config.bin/CfgWeapons/FakeWeapon";
|
||||
_configIndex = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_checkType == "magazine") exitWith {
|
||||
if (_classname in (DZAI_checkedClassnames select 1)) then {
|
||||
_result = true;
|
||||
} else {
|
||||
if (!(_classname in (DZAI_invalidClassnames select 0))) then {
|
||||
_config = "CfgMagazines";
|
||||
_banString = "bin\config.bin/CfgMagazines/FakeMagazine";
|
||||
_configIndex = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_checkType == "vehicle") exitWith {
|
||||
if (_classname in (DZAI_checkedClassnames select 2)) then {
|
||||
_result = true;
|
||||
} else {
|
||||
if (!(_classname in (DZAI_invalidClassnames select 0))) then {
|
||||
_config = "CfgVehicles";
|
||||
_banString = "bin\config.bin/CfgVehicles/Banned";
|
||||
_configIndex = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
diag_log format ["DZAI Error: Attempted to check %1 as an invalid classname type! Provided type: %2. Valid types: weapon, magazine, vehicle.",_checkType];
|
||||
};
|
||||
|
||||
if (_configIndex > -1) then {
|
||||
_check = (str(inheritsFrom (configFile >> _config >> _classname)));
|
||||
_classnameArray = [];
|
||||
if ((_check != "") && {(_check != _banString)} && {(getNumber (configFile >> _config >> _classname >> "scope")) != 0}) then {
|
||||
_classnameArray = DZAI_checkedClassnames;
|
||||
_result = true;
|
||||
} else {
|
||||
_classnameArray = DZAI_invalidClassnames;
|
||||
diag_log format ["DZAI Warning: %1 is an invalid %2 classname!",_classname,_checkType];
|
||||
};
|
||||
(_classnameArray select _configIndex) set [(count (_classnameArray select _configIndex)),_classname]; //Classname now known to be either valid or invalid, no need to check it again
|
||||
//;diag_log format ["DEBUG :: Classname check result: %1. ClassnameArray: %2.",_result,_classnameArray];
|
||||
};
|
||||
|
||||
//diag_log format ["DEBUG :: Classname %1 (check result: %2) completed in %3 seconds.",_classname,_result,diag_tickTime - _startTime];
|
||||
|
||||
_result
|
13
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_countkills.sqf
Executable file
13
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_countkills.sqf
Executable file
@ -0,0 +1,13 @@
|
||||
private ["_killer","_victim","_killType","_killCount"];
|
||||
_killer = _this select 0;
|
||||
_victim = _this select 1;
|
||||
_killType = _this select 2;
|
||||
|
||||
_killCount = _killer getVariable [_killType,0];
|
||||
_killer setVariable [_killType,(_killCount +1),true];
|
||||
|
||||
if (DZAI_humanityGain != 0) then {
|
||||
_humanity = _killer getVariable["humanity",0];
|
||||
_humanity = _humanity + DZAI_humanityGain;
|
||||
_killer setVariable["humanity",_humanity,true];
|
||||
};
|
52
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_createStaticSpawn.sqf
Executable file
52
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_createStaticSpawn.sqf
Executable file
@ -0,0 +1,52 @@
|
||||
/*Syntax: [
|
||||
_spawnMarker, //Circular marker defining patrol radius.
|
||||
[_minAI,_addAI], //(Optional, default [1,1]) Minimum and maximum bonus amount of AI units per group.
|
||||
_positionArray, //(Optional, default []): Array of markers defining possible spawn points. If omitted or left empty, nearby buildings within 250m radius will be used as spawn points.
|
||||
_equipType, //(Optional, default 1): Number between 0-3. Defines AI weapon selection and skill parameters.
|
||||
_numGroups //(Optional, default 1): Number of AI groups to spawn using the above parameters.
|
||||
] call DZAI_static_spawn;
|
||||
*/
|
||||
|
||||
private ["_spawnMarker","_minAI","_addAI","_positionArray","_equipType","_numGroups","_patrolDist","_onActStatements","_trigger","_abort"];
|
||||
|
||||
_spawnMarker = _this select 0;
|
||||
if ((getMarkerColor _spawnMarker) == "") exitWith {diag_log format ["DZAI Error: Static spawn marker %1 does not exist!",_spawnMarker];};
|
||||
if ((markerAlpha _spawnMarker) > 0) then {_spawnMarker setMarkerAlpha 0};
|
||||
|
||||
_abort = true;
|
||||
if ((count _this) > 1) then {
|
||||
_minAI = (_this select 1) select 0;
|
||||
_addAI = (_this select 1) select 1;
|
||||
if ((_minAI + _addAI) > 0) then {
|
||||
_abort = false;
|
||||
};
|
||||
} else {
|
||||
_minAI = 1;
|
||||
_addAI = 1;
|
||||
};
|
||||
|
||||
if (_abort) exitWith {
|
||||
diag_log format ["DZAI Error: Zero AI amount for spawn area %1. Spawn area not created. (%2)",_spawnMarker,__FILE__];
|
||||
|
||||
objNull
|
||||
};
|
||||
|
||||
_positionArray = if ((count _this) > 2) then {_this select 2} else {[]};
|
||||
_equipType = if ((count _this) > 3) then {_this select 3} else {1};
|
||||
_numGroups = if ((count _this) > 4) then {_this select 4} else {1};
|
||||
|
||||
_patrolDist = (getMarkerSize _spawnMarker) select 0;
|
||||
|
||||
if !(_equipType in [0,1,2,3]) then {_equipType = 1};
|
||||
|
||||
_onActStatements = format ["_nul = [%1,%2,%3,thisTrigger,%4,%5,%6] call DZAI_spawnBandits_init;",_minAI,_addAI,_patrolDist,_positionArray,_equipType,_numGroups];
|
||||
_trigger = createTrigger ["EmptyDetector", getMarkerPos(_spawnMarker)];
|
||||
_trigger setTriggerArea [600, 600, 0, false];
|
||||
_trigger setTriggerActivation ["ANY", "PRESENT", true];
|
||||
_trigger setTriggerTimeout [10, 10, 10, true];
|
||||
_trigger setTriggerText _spawnMarker;
|
||||
_trigger setTriggerStatements ["{isPlayer _x} count thisList > 0;",_onActStatements,""];
|
||||
|
||||
deleteMarker _spawnMarker;
|
||||
|
||||
_trigger
|
30
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_customSpawnUnits.sqf
Executable file
30
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_customSpawnUnits.sqf
Executable file
@ -0,0 +1,30 @@
|
||||
private ["_spawnMarker","_patrolRadius","_trigStatements","_trigger","_respawn","_weapongrade","_totalAI","_respawnTime"];
|
||||
|
||||
_spawnMarker = _this select 0;
|
||||
if ((typeName _spawnMarker) != "STRING") exitWith {diag_log "DZAI Error: Marker string not given!"};
|
||||
_totalAI = if ((typeName (_this select 1)) == "SCALAR") then {_this select 1} else {1};
|
||||
_weapongrade = if ((typeName (_this select 2)) == "SCALAR") then {_this select 2} else {1};
|
||||
_respawn = if ((count _this) > 3) then {if ((typeName (_this select 3)) == "BOOL") then {_this select 3} else {true}} else {true};
|
||||
_respawnTime = if ((count _this) > 4) then {if ((typeName (_this select 4)) == "SCALAR") then {_this select 4} else {0}} else {0};
|
||||
|
||||
_patrolRadius = ((((getMarkerSize _spawnMarker) select 0) min ((getMarkerSize _spawnMarker) select 1)) min 300);
|
||||
|
||||
_trigStatements = format ["0 = [%1,0,%2,thisTrigger,%3,%4] call fnc_spawnBandits_custom;",_totalAI,_patrolRadius,_weapongrade,_spawnMarker];
|
||||
_trigger = createTrigger ["EmptyDetector", getMarkerPos(_spawnMarker)];
|
||||
_trigger setTriggerArea [600, 600, 0, false];
|
||||
_trigger setTriggerActivation ["ANY", "PRESENT", true];
|
||||
_trigger setTriggerTimeout [5, 5, 5, true];
|
||||
_trigger setTriggerText _spawnMarker;
|
||||
_trigger setTriggerStatements ["{isPlayer _x} count thisList > 0;",_trigStatements,"0 = [thisTrigger] spawn fnc_despawnBandits;"];
|
||||
_trigger setVariable ["respawn",_respawn];
|
||||
_trigger setVariable ["spawnmarker",_spawnMarker];
|
||||
if (_respawnTime > 0) then {_trigger setVariable ["respawnTime",_respawnTime];};
|
||||
//diag_log format ["DEBUG :: %1",_trigStatements];
|
||||
|
||||
if ((markerAlpha _spawnMarker) > 0) then {
|
||||
_spawnMarker setMarkerAlpha 0;
|
||||
};
|
||||
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Created custom spawn area %1 at %2 with %3 AI units, weapongrade %4, respawn %5, respawn time %6.",_spawnMarker,mapGridPosition _trigger,_totalAI,_weapongrade,_respawn,_respawnTime];};
|
||||
|
||||
_trigger
|
83
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_damageHandlerAI2.sqf
Executable file
83
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_damageHandlerAI2.sqf
Executable file
@ -0,0 +1,83 @@
|
||||
private["_unit","_hit","_damage","_source","_ammo","_unithealth","_scale","_blooddamage","_newbloodlevel","_headShots","_partdamage","_deathType","_headHit"];
|
||||
/*
|
||||
Damage Handler script modified for DZAI
|
||||
Simulates DayZ's player health system for individual AI units
|
||||
|
||||
*/
|
||||
_unit = _this select 0; //Object the event handler is assigned to. (the unit taking damage)
|
||||
_hit = _this select 1; //Name of the selection where the unit was damaged. "" for over-all structural damage, "?" for unknown selections.
|
||||
_damage = _this select 2; //Resulting level of damage for the selection. (Received damage)
|
||||
_source = _this select 3; //The source unit that caused the damage.
|
||||
_ammo = _this select 4; //Classname of the projectile that caused inflicted the damage. ("" for unknown, such as falling damage.)
|
||||
|
||||
if ((group _unit) == (group _source)) then {_damage = (_damage/10)}; //Reduce friendly fire and collision damage.
|
||||
//if (isNil {_unit getVariable "unithealth"}) then {_unit setVariable ["unithealth",[12000,0,false]]}; //Reset initial health stats if not found
|
||||
_unithealth = _unit getVariable "unithealth"; // Retrieve unit's health statistics
|
||||
|
||||
_scale = 300;
|
||||
_deathType = "bled";
|
||||
_headHit = (_hit == "head_hit");
|
||||
if (_damage > 0.4) then {
|
||||
//Calculate locational damage
|
||||
call {
|
||||
if (_hit == "legs") exitWith {
|
||||
_partdamage = (_unithealth select 1) + (_damage/2);
|
||||
_unithealth set [1,_partdamage]; //Record leg damage internally
|
||||
if ((_partdamage > 0.99) && {!(_unithealth select 2)}) then {
|
||||
_nul = _unit spawn {_this setHit["legs",1]}; //Break legs when enough damage taken
|
||||
[nil,_unit,rSAY,["z_fracture_1",40]] call RE;
|
||||
_unithealth set [2,true];
|
||||
};
|
||||
};
|
||||
if (_headHit) exitWith {
|
||||
_scale = _scale + 500;
|
||||
};
|
||||
};
|
||||
|
||||
//additional damage if attacker is a player
|
||||
if (isPlayer _source) then {
|
||||
_scale = _scale + 800;
|
||||
if (_headHit) then {
|
||||
if (_damage > 1.5) then {
|
||||
_deathType = "shothead";
|
||||
_scale = 12000; //sufficient head shot damage causes instant death
|
||||
} else {
|
||||
_scale = _scale + 500;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//special death types
|
||||
call {
|
||||
if (_ammo isKindOf "GrenadeBase") exitWith {
|
||||
_scale = _scale + 200;
|
||||
if (_damage > 4) then {
|
||||
_deathType = "explosion";
|
||||
_scale = 12000; //sufficient grenade damage causes instant death
|
||||
};
|
||||
};
|
||||
if ((_ammo isKindOf "B_127x107_Ball") or (_ammo isKindOf "B_127x99_Ball")) exitWith {
|
||||
_scale = _scale + 200;
|
||||
if (_damage > 4) then {
|
||||
_deathType = "shotheavy";
|
||||
_scale = 12000; //sufficient high calibre damage causes instant death
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_blooddamage = (_damage * _scale);
|
||||
_newbloodlevel = (_unithealth select 0) - _blooddamage;
|
||||
_unithealth set [0,_newbloodlevel];
|
||||
|
||||
//Uncomment the following line to report blood damage to rpt log
|
||||
//diag_log format ["DEBUG :: Unit %1 took %2 blood damage in part %3 by ammo %4 (Blood level: %5).",_unit,_blooddamage,_hit,_ammo,_newbloodlevel];
|
||||
|
||||
if (_newbloodlevel < 0) then {
|
||||
_nul = [_unit,_source,_deathType] call DZAI_unitDeath;
|
||||
//diag_log format ["DEBUG :: %1 was killed by %2 from %3m. Cause: %4.",_unit,_source,(_unit distance _source),_deathType];
|
||||
} else {
|
||||
if (!(_unit getVariable ["unconscious",false]) && {((_damage > 2) || {((_damage > 0.5) && (_hit == "head_hit"))})}) then {_nul = [_unit,_hit] spawn DZAI_unconscious; _unit setVariable ["unconscious",true];};
|
||||
};
|
||||
};
|
||||
|
||||
0
|
149
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_findKiller.sqf
Executable file
149
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_findKiller.sqf
Executable file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
fn_findKiller
|
||||
|
||||
Description: If an AI unit is killed, surviving members of their group will aggressively pursue the killer for a set amount of time. After this amount of time has passed, the group will return to their patrol state.
|
||||
|
||||
Last updated: 2:00 AM 7/1/2014
|
||||
*/
|
||||
private ["_unitGroup","_targetPlayer","_startPos","_chaseDistance"];
|
||||
|
||||
_targetPlayer = _this select 0;
|
||||
_unitGroup = _this select 1;
|
||||
|
||||
//Disable killer-finding for dynamic AI in hunting mode
|
||||
if (_unitGroup getVariable ["seekActive",false]) exitWith {};
|
||||
|
||||
//If group is already pursuing player and target player has killed another group member, then extend pursuit time.
|
||||
if (((_unitGroup getVariable ["pursuitTime",0]) > 0) && {((_unitGroup getVariable ["targetKiller",""]) == (name _targetPlayer))}) exitWith {
|
||||
_unitGroup setVariable ["pursuitTime",((_unitGroup getVariable ["pursuitTime",0]) + 20)];
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Pursuit time +20 sec for Group %1 (Target: %2) to %3 seconds (fn_findKiller).",_unitGroup,name _targetPlayer,(_unitGroup getVariable ["pursuitTime",0]) - diag_tickTime]};
|
||||
};
|
||||
|
||||
_startPos = _unitGroup getVariable ["trigger",(getPosASL (leader _unitGroup))];
|
||||
_chaseDistance = _unitGroup getVariable ["patrolDist",250];
|
||||
|
||||
#define TRANSMIT_RANGE 50 //distance to broadcast radio text around target player
|
||||
#define RECEIVE_DIST 150 //distance requirement to receive message from AI group leader
|
||||
|
||||
if ((_startPos distance _targetPlayer) < _chaseDistance) then {
|
||||
private ["_targetPlayerPos","_leader","_ableToChase","_debugMarkers","_marker"];
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Group %1 has entered pursuit state for 180 seconds. Target: %2. (fn_findKiller)",_unitGroup,_targetPlayer];};
|
||||
|
||||
//Temporarily cancel patrol state.
|
||||
_unitGroup lockWP true;
|
||||
|
||||
//Set pursuit timer
|
||||
_unitGroup setVariable ["pursuitTime",diag_tickTime+180];
|
||||
_unitGroup setVariable ["targetKiller",name _targetPlayer];
|
||||
|
||||
_debugMarkers = ((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled});
|
||||
if (_debugMarkers) then {
|
||||
_markername = format ["%1 Target",_unitGroup];
|
||||
if ((getMarkerColor _markername) != "") then {deleteMarker _markername; uiSleep 0.5;};
|
||||
_marker = createMarker [_markername,getPosASL _targetPlayer];
|
||||
_marker setMarkerText _markername;
|
||||
_marker setMarkerType "Attack";
|
||||
_marker setMarkerColor "ColorRed";
|
||||
_marker setMarkerBrush "Solid";
|
||||
};
|
||||
|
||||
//Begin pursuit state.
|
||||
_ableToChase = true;
|
||||
while {
|
||||
_ableToChase &&
|
||||
{alive _targetPlayer} &&
|
||||
{((_startPos distance _targetPlayer) < _chaseDistance)} &&
|
||||
{(!((vehicle _targetPlayer) isKindOf "Air"))}
|
||||
} do {
|
||||
if ((_unitGroup knowsAbout _targetPlayer) < 4) then {_unitGroup reveal [_targetPlayer,4]};
|
||||
_targetPlayerPos = ASLtoATL getPosASL _targetPlayer;
|
||||
(units _unitGroup) doMove _targetPlayerPos;
|
||||
(units _unitGroup) doTarget _targetPlayer;
|
||||
(units _unitGroup) doFire _targetPlayer;
|
||||
{
|
||||
if (alive _x) then {
|
||||
_x moveTo _targetPlayerPos
|
||||
};
|
||||
} count (units _unitGroup);
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: AI group %1 in pursuit state. Pursuit time remaining: %2 seconds.",_unitGroup,(_unitGroup getVariable ["pursuitTime",0]) - diag_tickTime];};
|
||||
|
||||
if (DZAI_radioMsgs) then {
|
||||
_leader = (leader _unitGroup);
|
||||
if (((_targetPlayer distance _leader) <= RECEIVE_DIST) && {!(_leader getVariable ["unconscious",false])}) then {
|
||||
private ["_nearbyUnits","_radioSpeech"];
|
||||
_nearbyUnits = _targetPlayerPos nearEntities [["LandVehicle","CAManBase"],TRANSMIT_RANGE];
|
||||
if ((_unitGroup getVariable ["GroupSize",0]) > 1) then {
|
||||
{
|
||||
if ((isPlayer _x)&& {((driver (vehicle _x)) hasWeapon "ItemRadio")}) then {
|
||||
_speechIndex = (floor (random 3));
|
||||
_radioSpeech = call {
|
||||
if (_speechIndex == 0) exitWith {
|
||||
format ["[RADIO] %1 (Bandit Leader): %2 is nearby. That's our target!",(name _leader),(name _targetPlayer)]
|
||||
};
|
||||
if (_speechIndex == 1) exitWith {
|
||||
format ["[RADIO] %1 (Bandit Leader): Target looks like a %2. Find him!",(name _leader),(getText (configFile >> "CfgVehicles" >> (typeOf _targetPlayer) >> "displayName"))]
|
||||
};
|
||||
if (_speechIndex == 2) exitWith {
|
||||
format ["[RADIO] %1 (Bandit Leader): Target's distance is %2 meters. Search the area!",(name _leader),round (_leader distance _targetPlayer)]
|
||||
};
|
||||
"" //Default radio message: empty string (this case should never happen)
|
||||
};
|
||||
[_x,_radioSpeech] call DZAI_radioSend;
|
||||
};
|
||||
} count _nearbyUnits;
|
||||
} else {
|
||||
_radioSpeech = "[RADIO] Your radio is picking up a signal nearby.";
|
||||
{
|
||||
if ((isPlayer _x)&& {((driver (vehicle _x)) hasWeapon "ItemRadio")}) then {
|
||||
[_x,_radioSpeech] call DZAI_radioSend;
|
||||
};
|
||||
} count _nearbyUnits;
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_debugMarkers) then {
|
||||
_marker setMarkerPos (getPosASL _targetPlayer);
|
||||
};
|
||||
uiSleep 19.5;
|
||||
_ableToChase = ((!isNull _unitGroup) && {diag_tickTime < (_unitGroup getVariable ["pursuitTime",0])} && {(_unitGroup getVariable ["GroupSize",0]) > 0});
|
||||
if (_ableToChase && {isNull _targetPlayer}) then {
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Group %1 is attempting to re-establish contact with target %2.",_unitGroup,_unitGroup getVariable "targetKiller"];};
|
||||
_nearUnits = _targetPlayerPos nearEntities ["CAManBase",100];
|
||||
{
|
||||
if ((isPlayer _x) && {((name _x) == _unitGroup getVariable "targetKiller")}) exitWith {_targetPlayer = _x};
|
||||
} forEach _nearUnits;
|
||||
};
|
||||
uiSleep 0.5;
|
||||
};
|
||||
|
||||
if !(isNull _unitGroup) then {
|
||||
//End of pursuit state. Re-enable patrol state.
|
||||
_unitGroup setVariable ["pursuitTime",0];
|
||||
_unitGroup setVariable ["targetKiller",""];
|
||||
_unitGroup lockWP false;
|
||||
|
||||
if ((_unitGroup getVariable ["GroupSize",0]) > 0) then {
|
||||
_waypoints = (waypoints _unitGroup);
|
||||
_unitGroup setCurrentWaypoint (_waypoints call BIS_fnc_selectRandom2);
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Pursuit state ended for group %1. Returning to patrol state. (fn_findKiller)",_unitGroup];};
|
||||
|
||||
if (DZAI_radioMsgs) then {
|
||||
_leader = (leader _unitGroup);
|
||||
if (((_targetPlayer distance _leader) <= RECEIVE_DIST) && {((_unitGroup getVariable ["GroupSize",0]) > 1)} && {!(_leader getVariable ["unconscious",false])} && {!(isNull _targetPlayer)}) then {
|
||||
private ["_nearbyUnits","_radioSpeech","_radioText"];
|
||||
_radioText = if (alive _targetPlayer) then {"%1 (Bandit Leader): Lost contact with target. Breaking off pursuit."} else {"%1 (Bandit Leader): Target has been eliminated."};
|
||||
_radioSpeech = format [_radioText,(name (leader _unitGroup))];
|
||||
_nearbyUnits = (getPosASL _targetPlayer) nearEntities [["LandVehicle","CAManBase"],TRANSMIT_RANGE];
|
||||
{
|
||||
if ((isPlayer _x)&&{((driver (vehicle _x)) hasWeapon "ItemRadio")}) then {
|
||||
[_x,_radioSpeech] call DZAI_radioSend;
|
||||
};
|
||||
} count _nearbyUnits;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_debugMarkers) then {
|
||||
deleteMarker _marker;
|
||||
};
|
||||
};
|
23
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_findspawnpos.sqf
Executable file
23
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_findspawnpos.sqf
Executable file
@ -0,0 +1,23 @@
|
||||
//Finds a position that does not have a player within a certain distance.
|
||||
private ["_spawnPos","_attempts","_continue","_spawnpool","_maxAttempts"];
|
||||
|
||||
_attempts = 0;
|
||||
_continue = true;
|
||||
_spawnPos = [];
|
||||
_spawnpool = +_this;
|
||||
_maxAttempts = ((count _spawnpool) min 5); //5: Maximum number of attempts
|
||||
while {_continue && {(_attempts < _maxAttempts)}} do {
|
||||
_index = floor (random (count _spawnpool));
|
||||
_spawnPosSelected = _spawnpool select _index;
|
||||
if (({isPlayer _x} count (_spawnPosSelected nearEntities [["CAManBase","LandVehicle"],75])) == 0) then {
|
||||
_spawnPos = _spawnPosSelected;
|
||||
_continue = false;
|
||||
} else {
|
||||
_spawnpool set [_index,objNull];
|
||||
_spawnpool = _spawnpool - [objNull];
|
||||
_attempts = _attempts + 1;
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Player found within 75 meters of chosen spawn position. (attempt %1/%2).",_attempts,_maxAttempts];};
|
||||
};
|
||||
};
|
||||
|
||||
_spawnPos
|
49
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_init_trigger.sqf
Executable file
49
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_init_trigger.sqf
Executable file
@ -0,0 +1,49 @@
|
||||
private["_trigger","_mode"];
|
||||
|
||||
_mode = _this select 0;
|
||||
_trigger = _this select 1;
|
||||
|
||||
_trigger setVariable ["isCleaning",false];
|
||||
_trigger setVariable ["GroupArray",(_this select 2)];
|
||||
|
||||
call {
|
||||
if (_mode == 0) exitWith {
|
||||
//Static spawns
|
||||
_trigger setVariable ["patrolDist",(_this select 3)];
|
||||
_trigger setVariable ["equipType",(_this select 4)];
|
||||
_trigger setVariable ["locationArray",(_this select 5)];
|
||||
_trigger setVariable ["maxUnits",(_this select 6)];
|
||||
_trigger setVariable ["spawnChance",missionNamespace getVariable [format ["DZAI_spawnChance%1",(_this select 4)],1]];
|
||||
//DZAI_locations set [(count DZAI_locations),[(triggerText _trigger),(getPosASL _trigger),"NameLocal"]]; //Add helicopter patrol WP pointing to static spawn location
|
||||
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: Initialized static spawn at %1. GroupArray: %2, PatrolDist: %3. equipType: %4. %LocationArray %5 positions, MaxUnits %6.",triggerText _trigger,(_this select 2),(_this select 3),(_this select 4),count (_this select 5),(_this select 6)];};
|
||||
};
|
||||
if (_mode == 1) exitWith {
|
||||
//Dynamic spawns
|
||||
_location = createLocation ["Strategic",(getPosASL _trigger),600,600]; //Create temporary dynamic spawn blacklist area
|
||||
_trigger setVariable ["triggerLocation",_location];
|
||||
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: Initialized dynamic spawn at %1. GroupArray: %2.",triggerText _trigger,(_this select 2)];};
|
||||
};
|
||||
if (_mode == 2) exitWith {
|
||||
//Random spawns
|
||||
_triggerPos = getPosASL _trigger;
|
||||
_location = _trigger getVariable ["triggerLocation",_triggerPos];
|
||||
if ((_triggerPos distance _location) > 0) then {
|
||||
_location setPosition _triggerPos;
|
||||
};
|
||||
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: Initialized random spawn at %1. GroupArray: %2.",triggerText _trigger,(_this select 2)];};
|
||||
};
|
||||
if (_mode == 3) exitWith {
|
||||
//Static spawns (custom)
|
||||
_trigger setVariable ["patrolDist",(_this select 3)];
|
||||
_trigger setVariable ["equipType",(_this select 4)];
|
||||
_trigger setVariable ["locationArray",(_this select 5)];
|
||||
_trigger setVariable ["maxUnits",(_this select 6)];
|
||||
_trigger setVariable ["spawnChance",1];
|
||||
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: Initialized custom spawn at %1. GroupArray: %2, PatrolDist: %3. equipType: %4. %LocationArray %5 positions, MaxUnits %6.",triggerText _trigger,(_this select 2),(_this select 3),(_this select 4),count (_this select 5),(_this select 6)];};
|
||||
};
|
||||
};
|
||||
|
||||
_trigger setVariable ["triggerStatements",+(triggerStatements _trigger)];
|
||||
_trigger setVariable ["initialized",true];
|
||||
|
||||
true
|
17
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_refreshmarker.sqf
Executable file
17
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_refreshmarker.sqf
Executable file
@ -0,0 +1,17 @@
|
||||
private ["_trigger","_marker"];
|
||||
_trigger = _this select 0;
|
||||
|
||||
_marker = str (_trigger);
|
||||
if ((getMarkerColor _marker) == "") then {
|
||||
_marker = createMarker [_marker, (getPosASL _trigger)];
|
||||
_marker setMarkerType "Defend";
|
||||
_marker setMarkerBrush "Solid";
|
||||
};
|
||||
|
||||
_marker setMarkerText "STATIC TRIGGER (ACTIVE)";
|
||||
_marker setMarkerColor "ColorRed";
|
||||
|
||||
while {!((getMarkerColor _marker) in ["ColorGreen",""])} do {
|
||||
_marker setMarkerPos (getMarkerPos _marker);
|
||||
uiSleep 30;
|
||||
};
|
135
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_seekPlayer.sqf
Executable file
135
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_seekPlayer.sqf
Executable file
@ -0,0 +1,135 @@
|
||||
/*
|
||||
DZAI_dyn_huntPlayer
|
||||
|
||||
Description: Used for dynamically spawned AI. Creates a MOVE waypoint directing AI to a random player's position, then uses BIN_taskPatrol to create a circular patrol path around initial spawn position.
|
||||
|
||||
Last updated: 2:12 AM 1/11/2014
|
||||
*/
|
||||
|
||||
#define TRANSMIT_RANGE 50 //distance to broadcast radio text around target player (target player will also recieve messages)
|
||||
#define SEEK_RANGE 450 //distance to chase player from initial group spawn location
|
||||
|
||||
private ["_unitGroup","_spawnPos","_waypoint","_patrolDist","_statement","_targetPlayer","_triggerPos","_leader","_nearbyUnits","_radioSpeech","_radioText","_ableToChase"];
|
||||
|
||||
_unitGroup = _this select 0;
|
||||
_spawnPos = _this select 1;
|
||||
_patrolDist = _this select 2;
|
||||
_targetPlayer = _this select 3;
|
||||
_triggerPos = _this select 4;
|
||||
|
||||
_unitGroup setVariable ["seekActive",true];
|
||||
|
||||
_waypoint = [_unitGroup,0]; //Group will move to waypoint index 0 (first waypoint).
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 35;
|
||||
_waypoint setWaypointTimeout [10,12,15];
|
||||
_waypoint setWPPos (ASLtoATL getPosASL _targetPlayer);
|
||||
_unitGroup setCurrentWaypoint _waypoint;
|
||||
|
||||
if (DZAI_radioMsgs) then {
|
||||
_leader = (leader _unitGroup);
|
||||
if (((_unitGroup getVariable ["GroupSize",0]) > 1) && {!(_leader getVariable ["unconscious",false])}) then {
|
||||
_nearbyUnits = (getPosASL _targetPlayer) nearEntities [["LandVehicle","CAManBase"],TRANSMIT_RANGE];
|
||||
{
|
||||
if (isPlayer _x) then {
|
||||
if ((driver (vehicle _x)) hasWeapon "ItemRadio") then {
|
||||
_radioSpeech = [
|
||||
"[RADIO] You hear static coming from your Radio...",
|
||||
"[RADIO] Your Radio is picking up a signal..."
|
||||
] call BIS_fnc_selectRandom2;
|
||||
[_x,_radioSpeech] call DZAI_radioSend;
|
||||
} else {
|
||||
if (0.10 call DZAI_chance) then {
|
||||
_radioSpeech = [
|
||||
"You feel as if you are being watched...",
|
||||
"You feel as if you are being followed...",
|
||||
"You feel something isn't quite right..."
|
||||
] call BIS_fnc_selectRandom2;
|
||||
[_x,_radioSpeech] call DZAI_radioSend;
|
||||
};
|
||||
};
|
||||
}
|
||||
} count _nearbyUnits;
|
||||
};
|
||||
};
|
||||
uiSleep 10;
|
||||
|
||||
//Begin hunting phase
|
||||
_ableToChase = true;
|
||||
while {
|
||||
_ableToChase &&
|
||||
{alive _targetPlayer} &&
|
||||
{((_targetPlayer distance _triggerPos) < SEEK_RANGE)}
|
||||
} do {
|
||||
if !(_unitGroup getVariable ["inPursuit",false]) then {
|
||||
_leader = (leader _unitGroup);
|
||||
if (((getWPPos [_unitGroup,0]) distance _targetPlayer) > 25) then {
|
||||
_waypoint setWPPos (ASLtoATL getPosASL _targetPlayer);
|
||||
_unitGroup setCurrentWaypoint _waypoint;
|
||||
_unitGroup setFormDir ([_leader,_targetPlayer] call BIS_fnc_dirTo);
|
||||
_unitGroup reveal [_targetPlayer,4];
|
||||
};
|
||||
(units _unitGroup) doTarget _targetPlayer;
|
||||
(units _unitGroup) doFire _targetPlayer;
|
||||
if (DZAI_radioMsgs) then {
|
||||
//Warn player of AI bandit presence if they have a radio.
|
||||
if (((_unitGroup getVariable ["GroupSize",0]) > 1) && {!(_leader getVariable ["unconscious",false])} && {(_leader distance _targetPlayer) < 150}) then {
|
||||
_nearbyUnits = (ASLtoATL getPosASL _targetPlayer) nearEntities [["LandVehicle","CAManBase"],TRANSMIT_RANGE];
|
||||
|
||||
{
|
||||
if ((isPlayer _x)&&{((driver (vehicle _x)) hasWeapon "ItemRadio")}) then {
|
||||
_index = (floor (random 10));
|
||||
_radioSpeech = call {
|
||||
if (_index == 0) exitWith {format ["[RADIO] %1 (Bandit Leader): Target's name is %2. Find him!",(name _leader),(name _targetPlayer)]};
|
||||
if (_index == 1) exitWith {format ["[RADIO] %1 (Bandit Leader): Target is a %2. Find him!",(name _leader),(getText (configFile >> "CfgVehicles" >> (typeOf _targetPlayer) >> "displayName"))]};
|
||||
if (_index == 2) exitWith {format ["[RADIO] %1 (Bandit Leader): Target's distance is %2 meters. Find him!",(name _leader),round (_leader distance _targetPlayer)]};
|
||||
if (_index > 2) exitWith {"[RADIO] ??? (Bandit): .... (static)"};
|
||||
"[RADIO] ??? : ..."
|
||||
};
|
||||
//diag_log format ["DEBUG :: %1",_radioSpeech];
|
||||
[_x,_radioSpeech] call DZAI_radioSend;
|
||||
};
|
||||
} count _nearbyUnits;
|
||||
};
|
||||
};
|
||||
};
|
||||
uiSleep 19.5;
|
||||
_ableToChase = ((!isNull _unitGroup) && {(_unitGroup getVariable ["GroupSize",0]) > 0});
|
||||
if (_ableToChase && {isNull _targetPlayer}) then {
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Group %1 is attempting to search for a new target.",_unitGroup];};
|
||||
_nearUnits = (leader _unitGroup) nearEntities ["CAManBase",200];
|
||||
{
|
||||
if (isPlayer _x) exitWith {
|
||||
_targetPlayer = _x;
|
||||
_unitGroup reveal [_targetPlayer,4];
|
||||
};
|
||||
} forEach _nearUnits;
|
||||
};
|
||||
uiSleep 0.5;
|
||||
};
|
||||
|
||||
if ((isNull _unitGroup) or {(_unitGroup getVariable ["GroupSize",0]) < 1}) exitWith {};
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Group %1 has exited hunting phase. Moving to patrol phase. (fn_seekPlayer)",_unitGroup];};
|
||||
|
||||
//Begin patrol phase
|
||||
_waypoint setWaypointStatements ["true","if ((random 1) < 0.50) then { group this setCurrentWaypoint [(group this), (floor (random (count (waypoints (group this)))))];};"];
|
||||
0 = [_unitGroup,_triggerPos,_patrolDist] spawn DZAI_BIN_taskPatrol;
|
||||
_unitGroup setVariable ["seekActive",nil];
|
||||
|
||||
uiSleep 5;
|
||||
|
||||
if (DZAI_radioMsgs) then {
|
||||
_leader = (leader _unitGroup);
|
||||
if (((_unitGroup getVariable ["GroupSize",0]) > 1) && {!(_leader getVariable ["unconscious",false])} && {!(isNull _targetPlayer)}) then {
|
||||
_nearbyUnits = (getPosASL _targetPlayer) nearEntities [["LandVehicle","CAManBase"],TRANSMIT_RANGE];
|
||||
{
|
||||
if ((isPlayer _x)&&{((driver (vehicle _x)) hasWeapon "ItemRadio")}) then {
|
||||
_radioText = if (alive _targetPlayer) then {"%1 (Bandit Leader): We've lost contact with the target. Let's move out."} else {"%1 (Bandit Leader): The target has been killed."};
|
||||
_radioSpeech = format [_radioText,(name _leader)];
|
||||
[_x,_radioSpeech] call DZAI_radioSend;
|
||||
};
|
||||
} count _nearbyUnits;
|
||||
};
|
||||
};
|
||||
|
||||
true
|
22
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_selectRandom.sqf
Executable file
22
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_selectRandom.sqf
Executable file
@ -0,0 +1,22 @@
|
||||
//scriptName "Functions\arrays\fn_selectRandom.sqf";
|
||||
/************************************************************
|
||||
Random Select
|
||||
By Andrew Barron
|
||||
|
||||
Parameters: array
|
||||
|
||||
This returns a randomly selected element from the passed array.
|
||||
|
||||
Example: [1,2,3] call BIS_fnc_selectRandom
|
||||
Returns: 1, 2, or 3
|
||||
************************************************************/
|
||||
|
||||
private "_ret";
|
||||
|
||||
if(count _this > 0) then
|
||||
{
|
||||
_ret = count _this; //number of elements in the array
|
||||
_ret = floor (random _ret); //floor it first
|
||||
_ret = _this select _ret; //get the element, return it
|
||||
};
|
||||
_ret
|
@ -0,0 +1,60 @@
|
||||
//scriptName "Functions\arrays\fn_selectRandomWeighted.sqf";
|
||||
/*
|
||||
File: fn_selectRandomWeighted.sqf
|
||||
Author: Joris-Jan van 't Land
|
||||
|
||||
Description:
|
||||
Function to select a random item from an array, taking into account item weights.
|
||||
The weights should be Numbers between 0 and 1, with a maximum precision of hundreds.
|
||||
|
||||
Parameter(s):
|
||||
_this select 0: source Array (Array of Any Value)
|
||||
_this select 1: weights (Array of Number)
|
||||
|
||||
Returns:
|
||||
Any Value selected item
|
||||
|
||||
TODO:
|
||||
[*] Algorithm is inefficient?
|
||||
*/
|
||||
|
||||
private ["_array", "_weights","_index","_weighted","_i"];
|
||||
_array = _this select 0;
|
||||
_weights = _this select 1;
|
||||
//_amount = if ((count _this) > 2) then {_this select 2} else {1};
|
||||
|
||||
//Parameter validation.
|
||||
if ((typeName _array) != (typeName [])) exitWith {debugLog "Log: [selectRandomWeighted] Array (0) must be an Array!"; nil};
|
||||
if ((typeName _weights) != (typeName [])) exitWith {debugLog "Log: [selectRandomWeighted] Weights (1) must be an Array!"; nil};
|
||||
if ((count _array) > (count _weights)) exitWith {debugLog "Log: [selectRandomWeighted] There must be at least as many elements in Weights (1) as there are in Array (0)!"; nil};
|
||||
|
||||
//Created weighted array of indices.
|
||||
private ["_weighted"];
|
||||
_weighted = [];
|
||||
for "_i" from 0 to ((count _weights) - 1) do
|
||||
{
|
||||
private ["_weight"];
|
||||
_weight = _weights select _i;
|
||||
|
||||
//Ensure the weight is a Number.
|
||||
//If it's not, set weight to 0 to exclude it.
|
||||
if ((typeName _weight) != (typeName 0)) then {debugLog "Log: [selectRandomWeighted] Weights should be Numbers; weight set to 0!"; _weight = 0};
|
||||
|
||||
//The weight should be a Number between 0 and 1.
|
||||
if (_weight < 0) then {debugLog "Log: [selectRandomWeighted] Weights should be more than or equal to 0; weight set to 0!"; _weight = 0};
|
||||
//if (_weight > 1) then {debugLog "Log: [selectRandomWeighted] Weights should be less than or equal to 1; weight set to 1!"; _weight = 1};
|
||||
|
||||
//Normalize the weight for a precision of hundreds.
|
||||
_weight = round(_weight * 100);
|
||||
|
||||
for "_k" from 0 to (_weight - 1) do
|
||||
{
|
||||
_weighted = _weighted + [_i];
|
||||
};
|
||||
};
|
||||
|
||||
//Randomly select an index from the weighted array and therefore an element.
|
||||
private ["_index"];
|
||||
_index = _weighted call BIS_fnc_selectRandom2;
|
||||
|
||||
_array select _index
|
14
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_skillboost.sqf
Executable file
14
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_skillboost.sqf
Executable file
@ -0,0 +1,14 @@
|
||||
{
|
||||
_unit = _x;
|
||||
if (alive _x) exitWith {
|
||||
{
|
||||
_skillLevel = _unit skill _x;
|
||||
_skillLevel = (_skillLevel * 1.1) min 1;
|
||||
_unit setSkill [_x,_skillLevel];
|
||||
uiSleep 0.01;
|
||||
} count ["aimingAccuracy","aimingShake","aimingSpeed","endurance","spotDistance","spotTime","courage","reloadSpeed","general"];
|
||||
_bandageAmount = _x getVariable ["bandageAmount",0];
|
||||
_x setVariable ["bandageAmount",(_bandageAmount+1)];
|
||||
};
|
||||
uiSleep 0.05;
|
||||
} forEach (units _this);
|
88
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_spawnGroup.sqf
Executable file
88
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/fn_spawnGroup.sqf
Executable file
@ -0,0 +1,88 @@
|
||||
/*
|
||||
fnc_createGroup
|
||||
|
||||
Description: Spawns a group of AI units. Used for spawning of DZAI's static, dynamic, and custom AI units.
|
||||
|
||||
_totalAI = Number of AI units to spawn in the group
|
||||
_spawnPos: Position to create AI unit.
|
||||
_trigger: The trigger object responsible for spawning the AI unit.
|
||||
_weapongrade: weapongrade to be used for generating equipment. Influences weapon quality and skill level.
|
||||
|
||||
Last updated: 10:33 PM 5/14/2014
|
||||
|
||||
*/
|
||||
private ["_totalAI","_spawnPos","_unitGroup","_trigger","_attempts","_baseDist","_dummy","_weapongrade"];
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_totalAI = _this select 0;
|
||||
_spawnPos = _this select 2;
|
||||
_trigger = _this select 3;
|
||||
_weapongrade = _this select 4;
|
||||
|
||||
_pos = [];
|
||||
_attempts = 0;
|
||||
_baseDist = 25;
|
||||
|
||||
while {((count _pos) < 1) && {(_attempts < 3)}} do {
|
||||
_pos = _spawnPos findEmptyPosition [0.5,_baseDist,"Misc_cargo_cont_small_EP1"];
|
||||
if ((count _pos) > 1) then {
|
||||
_pos = _pos isFlatEmpty [0,0,0.75,5,0,false,objNull];
|
||||
};
|
||||
if ((count _pos) < 1) then {
|
||||
_baseDist = (_baseDist + 25); _attempts = (_attempts + 1);
|
||||
if (_attempts == 3) then {
|
||||
_pos = [_trigger,random (_trigger getVariable ["patrolDist",125]),random(360),0] call SHK_pos;
|
||||
_attempts = (_attempts + 1);
|
||||
};
|
||||
};
|
||||
};
|
||||
_pos set [2,0];
|
||||
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Found spawn position at %3 meters away at position %1 after %2 retries.",_pos,_attempts,(_pos distance _spawnPos)]};
|
||||
|
||||
_unitGroup = if (isNull (_this select 1)) then {[] call DZAI_createGroup} else {_this select 1};
|
||||
if (({isPlayer _x} count (_pos nearEntities ["CAManBase",100])) == 0) then {
|
||||
_unitGroup setCombatMode "RED";
|
||||
} else {
|
||||
_unitGroup setCombatMode "BLUE";
|
||||
_nul = _unitGroup spawn {
|
||||
uiSleep 10;
|
||||
_this setCombatMode "RED"; //Activate AI group hostility after 5 seconds
|
||||
};
|
||||
};
|
||||
|
||||
for "_i" from 1 to _totalAI do {
|
||||
private ["_type","_unit"];
|
||||
_type = DZAI_BanditTypes call BIS_fnc_selectRandom2; // Select skin of AI unit
|
||||
_unit = _unitGroup createUnit [_type, _pos, [], 0, "FORM"]; // Spawn the AI unit
|
||||
_unit setPos _pos;
|
||||
[_unit] joinSilent _unitGroup; // Add AI unit to group
|
||||
|
||||
_unit setVariable ["bodyName",(name _unit)]; // Set unit body name (will be PVed upon death).
|
||||
_unit setVariable ["unithealth",[(DZAI_baseBlood + (random DZAI_bonusBlood)),0,false]]; // Set unit health (blood, legs health, legs broken)
|
||||
_unit setVariable ["unconscious",false]; // Set unit consciousness
|
||||
_unit addEventHandler [DZAI_healthType, DZAI_healthStatements];
|
||||
0 = [_unit, _weapongrade] call DZAI_setupLoadout; // Assign unit loadout
|
||||
0 = [_unit, _weapongrade] call DZAI_setSkills; // Set AI skill
|
||||
if (DZAI_weaponNoise) then {_unit addEventHandler ["Fired", {_this call DZAI_aiFired;}];}; // Unit firing causes zombie aggro in the area, like player.
|
||||
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: Spawned AI Type %1 with weapongrade %2 for group %3 (fnc_createGroup).",_type,_weapongrade,_unitGroup];};
|
||||
};
|
||||
|
||||
//Delete dummy if it exists, and clear group's "dummy" variable.
|
||||
_dummy = _unitGroup getVariable "dummyUnit";
|
||||
if (!isNil "_dummy") then {
|
||||
deleteVehicle _dummy;
|
||||
_unitGroup setVariable ["dummyUnit",nil];
|
||||
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: Deleted 1 dummy AI unit for group %1. (fnc_createGroup)",_unitGroup];};
|
||||
};
|
||||
|
||||
_unitGroup selectLeader ((units _unitGroup) select 0);
|
||||
_unitGroup setVariable ["trigger",_trigger];
|
||||
_unitGroup setVariable ["GroupSize",_totalAI];
|
||||
_unitGroup setVariable ["weapongrade",_weapongrade];
|
||||
if (isNull _trigger) then {_unitGroup setVariable ["spawnPos",_spawnPos]}; //If group was spawned directly by scripting instead of a trigger object, record spawn position instead of trigger position as anchoring point
|
||||
//(DZAI_numAIUnits + _totalAI) call DZAI_updateUnitCount;
|
||||
0 = [_unitGroup,_weapongrade] spawn DZAI_autoRearm_group; //start group-level manager
|
||||
_unitGroup setFormDir (random 360);
|
||||
|
||||
_unitGroup
|
350
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/group_manager.sqf
Executable file
350
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/group_manager.sqf
Executable file
@ -0,0 +1,350 @@
|
||||
private ["_unitGroup","_weapongrade","_vehicle","_lastRearmTime","_useLaunchers","_isArmed","_debugMarkers","_marker","_marker2","_antistuckTime","_antistuckPos","_lastReinforceTime","_vehicleMoved"];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
_unitGroup = _this select 0;
|
||||
_weapongrade = _this select 1;
|
||||
|
||||
if (_unitGroup getVariable ["rearmEnabled",false]) exitWith {};
|
||||
_unitGroup setVariable ["rearmEnabled",true];
|
||||
|
||||
_vehicle = if ((_unitGroup getVariable ["unitType",""]) in ["static","dynamic"]) then {objNull} else {(vehicle (leader _unitGroup))};
|
||||
_useLaunchers = (((count DZAI_launcherTypes) > 0) && {(_weapongrade in DZAI_launcherLevels)});
|
||||
_isArmed = _vehicle getVariable ["isArmed",false];
|
||||
_antistuckPos = (getWPPos [_unitGroup,(currentWaypoint _unitGroup)]);
|
||||
if (isNil {_unitGroup getVariable "GroupSize"}) then {_unitGroup setVariable ["GroupSize",(count (units _unitGroup))]};
|
||||
_vehicleMoved = true;
|
||||
|
||||
//set up debug variables
|
||||
_debugMarkers = ((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled});
|
||||
_marker = "";
|
||||
_marker2 = "";
|
||||
|
||||
//Set up timer variables
|
||||
_lastRearmTime = diag_tickTime;
|
||||
_antistuckTime = diag_tickTime + 900;
|
||||
_lastReinforceTime = diag_tickTime + 600;
|
||||
|
||||
//Set up individual group units
|
||||
{
|
||||
if (isNil {_x getVariable "unithealth"}) then {_x setVariable ["unithealth",[((9000 + (random 3000)) min 12000),0,false]]};
|
||||
if (isNil {_x getVariable "unconscious"}) then {_x setVariable ["unconscious",false]};
|
||||
_x setVariable ["bandageAmount",((_weapongrade + 1) min 3)];
|
||||
_x setVariable ["lastBandage",0];
|
||||
_x setVariable ["needsHeal",false];
|
||||
_x setVariable ["rearmEnabled",true]; //prevent DZAI_autoRearm loop from executing on unit.
|
||||
_loadout = _x getVariable "loadout";
|
||||
|
||||
if (isNil "_loadout") then {
|
||||
_weapon = primaryWeapon _x;
|
||||
_magazine = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines") select 0;
|
||||
_loadout = [[_weapon],[_magazine]];
|
||||
_x setVariable ["loadout",_loadout];
|
||||
};
|
||||
|
||||
if ((getNumber (configFile >> "CfgMagazines" >> ((_loadout select 1) select 0) >> "count")) <= 8) then {_x setVariable ["extraMag",true]};
|
||||
|
||||
if (_useLaunchers) then {
|
||||
_maxLaunchers = (DZAI_launchersPerGroup min _weapongrade);
|
||||
if (_forEachIndex < _maxLaunchers) then {
|
||||
_launchWeapon = DZAI_launcherTypes call BIS_fnc_selectRandom2;
|
||||
_launchAmmo = [] + getArray (configFile >> "CfgWeapons" >> _launchWeapon >> "magazines") select 0;
|
||||
_x addMagazine _launchAmmo; (_loadout select 1) set [1,_launchAmmo];
|
||||
_x addWeapon _launchWeapon; (_loadout select 0) set [1,_launchWeapon];
|
||||
};
|
||||
};
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Unit %1 loadout: %2. Weapongrade %3. Blood: %4.",_x,_x getVariable ["loadout",[]],_weapongrade,((_x getVariable ["unithealth",[12000,0,false]]) select 0)];};
|
||||
} forEach (units _unitGroup);
|
||||
|
||||
if (_debugMarkers) then {
|
||||
_markername = format ["%1-1",_unitGroup];
|
||||
if ((getMarkerColor _markername) != "") then {deleteMarker _markername; uiSleep 0.5}; //Delete the previous marker if it wasn't deleted for some reason.
|
||||
_marker = createMarker [_markername,getPosASL (leader _unitGroup)];
|
||||
_marker setMarkerType "Attack";
|
||||
_marker setMarkerBrush "Solid";
|
||||
_marker setMarkerColor "ColorBlack";
|
||||
|
||||
if (isNull _vehicle) then {
|
||||
_marker setMarkerText format ["%1 (AI L%2)",_unitGroup,_weapongrade];
|
||||
} else {
|
||||
_marker setMarkerText format ["%1 (AI L%2 %3)",_unitGroup,_weapongrade,(typeOf (vehicle (leader _unitGroup)))];
|
||||
};
|
||||
|
||||
_markername2 = format ["%1-2",_unitGroup];
|
||||
if ((getMarkerColor _markername2) != "") then {deleteMarker _markername2; uiSleep 0.5;}; //Delete the previous marker if it wasn't deleted for some reason.
|
||||
_marker2 = createMarker [_markername2,(getWPPos [_unitGroup,(currentWaypoint _unitGroup)])];
|
||||
_marker2 setMarkerText format ["%1 WP",_unitGroup];
|
||||
_marker2 setMarkerType "Waypoint";
|
||||
_marker2 setMarkerColor "ColorBlue";
|
||||
_marker2 setMarkerBrush "Solid";
|
||||
|
||||
{
|
||||
_x spawn {
|
||||
private ["_mark","_markname"];
|
||||
_markname = str(_this);
|
||||
if ((getMarkerColor _markname) != "") then {deleteMarker _markname; uiSleep 0.5};
|
||||
_mark = createMarker [_markname,getPosASL _this];
|
||||
_mark setMarkerShape "ELLIPSE";
|
||||
_mark setMarkerType "Dot";
|
||||
_mark setMarkerColor "ColorRed";
|
||||
_mark setMarkerBrush "SolidBorder";
|
||||
_mark setMarkerSize [3,3];
|
||||
waitUntil {uiSleep 15; (!(alive _this))};
|
||||
//diag_log format ["DEBUG :: Deleting unit marker %1.",_mark];
|
||||
deleteMarker _mark;
|
||||
};
|
||||
uiSleep 0.1;
|
||||
} count (units _unitGroup);
|
||||
} else {
|
||||
_marker = nil;
|
||||
_marker2 = nil;
|
||||
};
|
||||
|
||||
//Main loop
|
||||
while {(!isNull _unitGroup) && {(_unitGroup getVariable ["GroupSize",-1]) > 0}} do {
|
||||
private ["_unitType"];
|
||||
_unitType = (_unitGroup getVariable ["unitType",""]);
|
||||
|
||||
call {
|
||||
//Zed hostility check
|
||||
if (_unitType in ["static","dynamic"]) exitWith {
|
||||
if (DZAI_zombieEnemy) then {
|
||||
if (_unitGroup getVariable ["detectReady",true]) then {
|
||||
_unitGroup setVariable ["detectReady",false];
|
||||
_nul = _unitGroup spawn {
|
||||
_unitGroup = _this;
|
||||
if !(isNull _unitGroup) then {
|
||||
_detectRange = if ((_unitGroup getVariable ["pursuitTime",0]) == 0) then {DZAI_zDetectRange} else {DZAI_zDetectRange/2}; //Reduce detection range of new zombies while searching for killer unit
|
||||
_leader = (leader _unitGroup);
|
||||
if (alive _leader) then {
|
||||
_nearbyZeds = _leader nearEntities ["zZombie_Base",_detectRange];
|
||||
_hostileZedsNew = [];
|
||||
{
|
||||
if (rating _x > -30000) then {
|
||||
_hostileZedsNew set [count _hostileZedsNew,_x];
|
||||
};
|
||||
if ((_forEachIndex % 5) == 0) then {uiSleep 0.05};
|
||||
} forEach _nearbyZeds;
|
||||
if ((count _hostileZedsNew) > 0) then {
|
||||
DZAI_ratingModify = [_hostileZedsNew,-30000];
|
||||
(owner (_hostileZedsNew select 0)) publicVariableClient "DZAI_ratingModify";
|
||||
};
|
||||
};
|
||||
_unitGroup setVariable ["detectReady",true];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//If any units have left vehicle then allow re-entry
|
||||
if (_unitType in ["land","landcustom"]) exitWith {
|
||||
if (alive _vehicle) then {
|
||||
if (_unitGroup getVariable ["regrouped",true]) then {
|
||||
if (({(_x distance _vehicle) > 175} count (assignedCargo _vehicle)) > 0) then {
|
||||
_unitGroup setVariable ["regrouped",false];
|
||||
[_unitGroup,_vehicle] call DZAI_vehRegroup;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_unitType == "air") exitWith {
|
||||
if ((alive _vehicle) && {!(_vehicle getVariable ["heli_disabled",false])}) then {
|
||||
if (((diag_tickTime - _lastReinforceTime) > 900) && {((count DZAI_reinforcePlaces) > 0)}) then {
|
||||
[_unitGroup,_vehicle] call DZAI_heliReinforce;
|
||||
_lastReinforceTime = diag_tickTime;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
{
|
||||
//Check infantry-type units
|
||||
if (((vehicle _x) == _x) && {!(_x getVariable ["unconscious",false])} && {_x getVariable ["canCheckUnit",true]}) then {
|
||||
_x setVariable ["canCheckUnit",false];
|
||||
_nul = _x spawn {
|
||||
if (!alive _this) exitWith {};
|
||||
_unit = _this;
|
||||
_loadout = _unit getVariable ["loadout",[[],[]]];
|
||||
if (!isNil "_loadout") then {
|
||||
_currentMagazines = (magazines _unit);
|
||||
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
|
||||
if (((_unit ammo ((_loadout select 0) select _i)) == 0) || {!((((_loadout select 1) select _i) in _currentMagazines))}) then {
|
||||
_unit removeMagazines ((_loadout select 1) select _i);
|
||||
_unit addMagazine ((_loadout select 1) select _i);
|
||||
if ((_i == 0) && {_unit getVariable ["extraMag",false]}) then {_unit addMagazine ((_loadout select 1) select _i)};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_bandages = _unit getVariable ["bandageAmount",0];
|
||||
if (_bandages > 0) then {
|
||||
_health = _unit getVariable ["unithealth",[12000,0,false]];
|
||||
if (_unit getVariable ["needsHeal",false]) then {
|
||||
_nearestEnemy = _unit findNearestEnemy _unit;
|
||||
_isSafe = ((_unit distance _nearestEnemy) > 35);
|
||||
if (_isSafe) then {
|
||||
_bandages = _bandages - 1;
|
||||
_unit setVariable ["bandageAmount",_bandages];
|
||||
{_unit disableAI _x} forEach ["TARGET","MOVE","FSM"];
|
||||
_unit playActionNow "Medic";
|
||||
_healTimes = 0;
|
||||
while {(!(_unit getVariable ["unconscious",false])) && {(_healTimes < 3)}} do {
|
||||
uiSleep 3;
|
||||
if (!(_unit getVariable ["unconscious",false])) then {
|
||||
_health set [0,(((_health select 0) + (DZAI_unitHealAmount/3)) min 12000)];
|
||||
_healTimes = _healTimes + 1;
|
||||
if ((alive _unit) && {(_healTimes == 3)}) then {
|
||||
_health set [1,0];
|
||||
_health set [2,false];
|
||||
_unit setHit ["legs",0];
|
||||
};
|
||||
};
|
||||
};
|
||||
_unit setVariable ["lastBandage",diag_tickTime];
|
||||
_unit setVariable ["needsHeal",false];
|
||||
uiSleep 1.75;
|
||||
{_unit enableAI _x} forEach ["TARGET","MOVE","FSM"];
|
||||
};
|
||||
} else {
|
||||
_lowblood = ((_health select 0) < DZAI_lowBloodLevel);
|
||||
_brokenbones = (_health select 2);
|
||||
if ((_lowblood or _brokenbones) && {((diag_tickTime - (_unit getVariable ["lastBandage",diag_tickTime])) > 60)}) then {
|
||||
_unit setVariable ["needsHeal",true];
|
||||
};
|
||||
};
|
||||
};
|
||||
_unit setVariable ["canCheckUnit",true];
|
||||
};
|
||||
};
|
||||
uiSleep 0.1;
|
||||
} forEach (units _unitGroup);
|
||||
|
||||
//Vehicle ammo/fuel check
|
||||
if (alive _vehicle) then { //If _vehicle is objNull (if no vehicle was assigned to the group) then nothing in this bracket should be executed
|
||||
if ((_isArmed) && {someAmmo _vehicle}) then { //Note: someAmmo check is not reliable for vehicles with multiple turrets
|
||||
_lastRearmTime = diag_tickTime; //Reset rearm timestamp if vehicle still has some ammo
|
||||
} else {
|
||||
if ((diag_tickTime - _lastRearmTime) > 180) then { //If ammo is depleted, wait 3 minutes until rearm is possible.
|
||||
_vehicle setVehicleAmmo 1; //Rearm vehicle. Rearm timestamp will be reset durng the next loop cycle.
|
||||
};
|
||||
};
|
||||
if ((fuel _vehicle) < 0.25) then {_vehicle setFuel 1};
|
||||
};
|
||||
|
||||
//Antistuck detection
|
||||
if ((diag_tickTime - _antistuckTime) > 900) then {
|
||||
_wpPos = (getWPPos [_unitGroup,(currentWaypoint _unitGroup)]);
|
||||
_unitType = (_unitGroup getVariable ["unitType",""]);
|
||||
call {
|
||||
if (_unitType in ["static","aircustom","landcustom"]) exitWith {
|
||||
//Static and custom air/land vehicle patrol anti stuck routine
|
||||
if ((_antistuckPos distance _wpPos) == 0) then {
|
||||
_currentWP = (currentWaypoint _unitGroup);
|
||||
_allWP = (waypoints _unitGroup);
|
||||
_nextWP = _currentWP + 1;
|
||||
if ((count _allWP) == _nextWP) then {_nextWP = 1}; //Cycle back to first added waypoint if group is currently on last waypoint.
|
||||
_unitGroup setCurrentWaypoint [_unitGroup,_nextWP];
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Antistuck detection triggered for AI group %1. Forcing next waypoint.",_unitGroup];};
|
||||
_antistuckTime = diag_tickTime + 300;
|
||||
} else {
|
||||
_antistuckPos = _wpPos;
|
||||
_antistuckTime = diag_tickTime;
|
||||
};
|
||||
};
|
||||
if (_unitType == "air") exitWith {
|
||||
//Mapwide air vehicle patrol anti stuck routine
|
||||
if ((canMove _vehicle) && {(_antistuckPos distance _wpPos) < 300}) then {
|
||||
_tooClose = true;
|
||||
_wpSelect = [];
|
||||
while {_tooClose} do {
|
||||
_wpSelect = (DZAI_locations call BIS_fnc_selectRandom2) select 1;
|
||||
if (((waypointPosition [_unitGroup,0]) distance _wpSelect) < 300) then {
|
||||
_tooClose = false;
|
||||
} else {
|
||||
uiSleep 0.1;
|
||||
};
|
||||
};
|
||||
_wpSelect = [_wpSelect,50+(random 900),(random 360),1] call SHK_pos;
|
||||
[_unitGroup,0] setWPPos _wpSelect;
|
||||
[_unitGroup,1] setWPPos _wpSelect;
|
||||
_vehicle doMove _wpSelect;
|
||||
_antistuckPos = _wpSelect;
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Antistuck detection triggered for AI vehicle %1 (Group: %2). Forcing next waypoint.",(typeOf _vehicle),_unitGroup];};
|
||||
_antistuckTime = diag_tickTime + 300;
|
||||
} else {
|
||||
_antistuckPos = _wpPos;
|
||||
_antistuckTime = diag_tickTime;
|
||||
};
|
||||
};
|
||||
if (_unitType == "land") exitWith {
|
||||
//Mapwide land vehicle patrol anti stuck routine
|
||||
if ((_antistuckPos distance _wpPos) < 300) then {
|
||||
if (_vehicleMoved && {canMove _vehicle}) then {
|
||||
_tooClose = true;
|
||||
_wpSelect = [];
|
||||
while {_tooClose} do {
|
||||
_wpSelect = (DZAI_locationsLand call BIS_fnc_selectRandom2) select 1;
|
||||
if (((waypointPosition [_unitGroup,0]) distance _wpSelect) < 300) then {
|
||||
_tooClose = false;
|
||||
} else {
|
||||
uiSleep 0.1;
|
||||
};
|
||||
};
|
||||
_wpSelect = [_wpSelect,random(300),random(360),0,[1,300]] call SHK_pos;
|
||||
[_unitGroup,0] setWPPos _wpSelect;
|
||||
_antistuckPos = _wpSelect;
|
||||
_vehicleMoved = false;
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Antistuck prevention triggered for AI vehicle %1 (Group: %2). Forcing next waypoint.",(typeOf _vehicle),_unitGroup];};
|
||||
_antistuckTime = diag_tickTime + 300;
|
||||
} else {
|
||||
if (!(_vehicle getVariable ["veh_disabled",false])) then {
|
||||
[_vehicle] call DZAI_vehDestroyed;
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: AI vehicle %1 (Group: %2) is immobilized. Respawning vehicle patrol group.",(typeOf _vehicle),_unitGroup];};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_antistuckPos = _wpPos;
|
||||
if (!_vehicleMoved) then {
|
||||
_vehicleMoved = true;
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Antistuck check passed for AI vehicle %1 (Group: %2). Reset vehicleMoved flag.",(typeOf _vehicle),_unitGroup];};
|
||||
};
|
||||
_antistuckTime = diag_tickTime;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (_debugMarkers) then {
|
||||
_marker setMarkerPos (getPosASL (vehicle (leader _unitGroup)));
|
||||
_marker2 setMarkerPos (getWPPos [_unitGroup,(currentWaypoint _unitGroup)]);
|
||||
{
|
||||
if (alive _x) then {
|
||||
(str (_x)) setMarkerPos (getPosASL _x);
|
||||
};
|
||||
if ((_forEachIndex % 3) == 0) then {uiSleep 0.05};
|
||||
} forEach (units _unitGroup);
|
||||
};
|
||||
|
||||
//diag_log format ["DEBUG: Group Manager cycle time for group %1: %2 seconds.",_unitGroup,(diag_tickTime - _debugStartTime)];
|
||||
if ((_unitGroup getVariable ["GroupSize",0]) > 0) then {uiSleep 15};
|
||||
};
|
||||
|
||||
_unitGroup setVariable ["rearmEnabled",false]; //allow group manager to run again on group respawn.
|
||||
|
||||
if (isEngineOn _vehicle) then {_vehicle engineOn false};
|
||||
|
||||
if (_debugMarkers) then {
|
||||
deleteMarker _marker;
|
||||
deleteMarker _marker2;
|
||||
};
|
||||
|
||||
//Wait until group is either respawned or marked for deletion. A dummy unit should be created to preserve group.
|
||||
while {(_unitGroup getVariable ["GroupSize",-1]) == 0} do {
|
||||
uiSleep 5;
|
||||
};
|
||||
|
||||
//GroupSize value of -1 marks group for deletion
|
||||
if ((_unitGroup getVariable ["GroupSize",-1]) == -1) then {
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Deleting %2 group %1.",_unitGroup,(_unitGroup getVariable ["unitType","unknown"])]};
|
||||
_unitGroup call DZAI_deleteGroup;
|
||||
};
|
65
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_airlanding.sqf
Executable file
65
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_airlanding.sqf
Executable file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
DZAI_airLanding
|
||||
|
||||
Description: Called when AI air vehicle performs a landing. Converts onboard AI crew into static-type units.
|
||||
|
||||
Last updated: 12:11 AM 6/17/2014
|
||||
*/
|
||||
|
||||
private ["_helicopter","_trigger","_heliPos","_unitsAlive","_unitGroup","_waypointCount"];
|
||||
_helicopter = _this select 0;
|
||||
|
||||
if (_helicopter getVariable ["heli_disabled",false]) exitWith {};
|
||||
_helicopter setVariable ["heli_disabled",true];
|
||||
{_helicopter removeAllEventHandlers _x} count ["HandleDamage","GetOut","Killed"];
|
||||
_unitGroup = _helicopter getVariable ["unitGroup",(group (_this select 2))];
|
||||
[_unitGroup,_helicopter] call DZAI_respawnAIVehicle;
|
||||
|
||||
_unitsAlive = {alive _x} count (units _unitGroup);
|
||||
if (_unitsAlive > 0) then {
|
||||
//Convert helicrew units to ground units
|
||||
{
|
||||
if (alive _x) then {
|
||||
_health = _x getVariable ["unithealth",[]];
|
||||
if ((_health select 1) > 0) then {
|
||||
_health set [1,0]; //If unit has any leg damage, heal it
|
||||
_health set [2,false];
|
||||
_x setHit["legs",0];
|
||||
};
|
||||
unassignVehicle _x;
|
||||
};
|
||||
} count (units _unitGroup);
|
||||
for "_i" from ((count (waypoints _unitGroup)) - 1) to 0 step -1 do {
|
||||
deleteWaypoint [_unitGroup,_i];
|
||||
};
|
||||
|
||||
_heliPos = ASLtoATL getPosASL _helicopter;
|
||||
0 = [_unitGroup,_heliPos,75] spawn DZAI_BIN_taskPatrol;
|
||||
//(DZAI_numAIUnits + _unitsAlive) call DZAI_updateUnitCount;
|
||||
|
||||
//Create area trigger
|
||||
_trigger = createTrigger ["EmptyDetector",_heliPos];
|
||||
_trigger setTriggerArea [600, 600, 0, false];
|
||||
_trigger setTriggerActivation ["ANY", "PRESENT", true];
|
||||
_trigger setTriggerTimeout [5, 5, 5, true];
|
||||
_trigger setTriggerText (format ["HeliLandingArea_%1",mapGridPosition _helicopter]);
|
||||
_trigger setTriggerStatements ["{isPlayer _x} count thisList > 0;","","0 = [thisTrigger] spawn fnc_despawnBandits;"];
|
||||
|
||||
//Set required trigger variables and begin despawn
|
||||
_trigger setVariable ["isCleaning",false];
|
||||
_trigger setVariable ["GroupArray",[_unitGroup]];
|
||||
_trigger setVariable ["equipType",DZAI_heliUnitLevel];
|
||||
_trigger setVariable ["maxUnits",[_unitsAlive,0]];
|
||||
_trigger setVariable ["respawn",false]; //landed AI units should never respawn
|
||||
_trigger setVariable ["permadelete",true]; //units should be permanently despawned
|
||||
[_trigger,"DZAI_staticTriggerArray"] call DZAI_updateSpawnCount;
|
||||
0 = [_trigger] spawn fnc_despawnBandits;
|
||||
|
||||
_unitGroup setVariable ["unitType","static"]; //convert units to static type
|
||||
_unitGroup setVariable ["trigger",_trigger]; //attach trigger object reference to group
|
||||
_unitGroup setVariable ["GroupSize",_unitsAlive]; //set group size
|
||||
_unitGroup setBehaviour "AWARE";
|
||||
_unitGroup allowFleeing 0;
|
||||
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: AI helicopter %1 landed at %2.",typeOf _helicopter,mapGridPosition _helicopter];};
|
||||
};
|
26
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_awareness.sqf
Executable file
26
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_awareness.sqf
Executable file
@ -0,0 +1,26 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
private ["_helicopter","_unitGroup"];
|
||||
|
||||
_helicopter = _this select 0;
|
||||
_unitGroup = _this select 1;
|
||||
|
||||
uiSleep 60;
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Starting helicopter awareness script for AI vehicle %1 (Group: %2).",typeOf _helicopter,_unitGroup];};
|
||||
|
||||
while {!(_helicopter getVariable ["heli_disabled",false]) && {alive _helicopter}} do {
|
||||
_detectOrigin = [getPosASL _helicopter,200,getDir _helicopter,1] call SHK_pos;
|
||||
_detectOrigin set [2,0];
|
||||
_detected = _detectOrigin nearEntities [["CAManBase","LandVehicle"],225];
|
||||
{
|
||||
if ((isPlayer _x) && {(_unitGroup knowsAbout _x) < 1.5}) then {
|
||||
_heliAimPos = aimPos _helicopter;
|
||||
_playerAimPos = aimPos _x;
|
||||
if (!(terrainIntersectASL [_heliAimPos,_playerAimPos]) && {!(lineIntersects [_heliAimPos,_playerAimPos,_helicopter,_x])}) then { //if no intersection of terrain and objects between helicopter and player, then reveal player
|
||||
_unitGroup reveal [_x,2.5];
|
||||
};
|
||||
};
|
||||
uiSleep 0.1;
|
||||
} forEach _detected;
|
||||
uiSleep 20;
|
||||
};
|
37
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_destroyed.sqf
Executable file
37
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_destroyed.sqf
Executable file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
DZAI_heliDestroyed
|
||||
|
||||
Description: Called when AI air vehicle is destroyed by collision damage.
|
||||
|
||||
Last updated: 12:11 AM 6/17/2014
|
||||
*/
|
||||
|
||||
private ["_helicopter","_unitGroup","_weapongrade"];
|
||||
_helicopter = _this select 0;
|
||||
|
||||
if (_helicopter getVariable ["heli_disabled",false]) exitWith {false};
|
||||
_helicopter setVariable ["heli_disabled",true];
|
||||
{_helicopter removeAllEventHandlers _x} count ["HandleDamage","GetOut","Killed"];
|
||||
_unitGroup = _helicopter getVariable "unitGroup";
|
||||
[_unitGroup,_helicopter] call DZAI_respawnAIVehicle;
|
||||
|
||||
if !(surfaceIsWater (getPosASL _helicopter)) then {
|
||||
_weapongrade = _unitGroup getVariable ["weapongrade",1];
|
||||
_unitGroup setVariable ["unitType","aircrashed"]; //Recategorize group as "aircrashed" to prevent AI inventory from being cleared since death is considered suicide.
|
||||
{
|
||||
if (alive _x) then {
|
||||
_x action ["eject",_helicopter];
|
||||
_nul = [_x,_x] call DZAI_unitDeath;
|
||||
0 = [_x,_weapongrade] spawn DZAI_addLoot;
|
||||
} else {
|
||||
[_x] joinSilent grpNull;
|
||||
};
|
||||
} count (units _unitGroup);
|
||||
} else {
|
||||
//_unitGroup call DZAI_deleteGroup;
|
||||
};
|
||||
|
||||
_unitGroup setVariable ["GroupSize",-1];
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: AI helicopter patrol destroyed at %1",mapGridPosition _helicopter];};
|
||||
|
||||
true
|
40
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_detectplayers.sqf
Executable file
40
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_detectplayers.sqf
Executable file
@ -0,0 +1,40 @@
|
||||
private ["_unitGroup","_detectBase","_detectFactor","_detectRange","_helicopter"];
|
||||
_unitGroup = _this select 0;
|
||||
|
||||
_helicopter = vehicle (leader _unitGroup);
|
||||
//_detectDelay = if ((waypointType [_unitGroup,1]) == "MOVE") then {5} else {20};
|
||||
_detectRange = if (_unitGroup getVariable ["DetectPlayersWide",false]) then {_unitGroup setVariable ["DetectPlayersWide",false]; 375} else {250};
|
||||
|
||||
//uiSleep (round (random _detectDelay));
|
||||
uiSleep 2;
|
||||
|
||||
if (_unitGroup getVariable ["HeliDetectReady",true]) then {
|
||||
_unitGroup setVariable ["HeliDetectReady",false];
|
||||
_detectStartPos = getPosASL _helicopter;
|
||||
while {!(_helicopter getVariable ["heli_disabled",false])} do {
|
||||
private ["_detected","_detectOrigin","_detectedCount","_startPos"];
|
||||
_startPos = getPosASL _helicopter;
|
||||
_detectOrigin = [_startPos,100,getDir _helicopter,1] call SHK_pos;
|
||||
_detectOrigin set [2,0];
|
||||
_detected = _detectOrigin nearEntities [["CAManBase","LandVehicle"],_detectRange];
|
||||
_detectedCount = (count _detected);
|
||||
if (_detectedCount > 0) then {
|
||||
if (_detectedCount > 15) then {_detected resize 15};
|
||||
{
|
||||
if (isPlayer _x) then {
|
||||
_heliAimPos = aimPos _helicopter;
|
||||
_playerAimPos = aimPos _x;
|
||||
if (!(terrainIntersectASL [_heliAimPos,_playerAimPos]) && {!(lineIntersects [_heliAimPos,_playerAimPos,_helicopter,_x])}) then { //if no intersection of terrain and objects between helicopter and player, then reveal player
|
||||
_unitGroup reveal [_x,2.5];
|
||||
};
|
||||
};
|
||||
uiSleep 0.1;
|
||||
} forEach _detected;
|
||||
|
||||
if (((_helicopter distance _detectStartPos) > 700) or {_helicopter getVariable ["heli_disabled",false]}) exitWith {_unitGroup setVariable ["HeliDetectReady",true]};
|
||||
uiSleep 15;
|
||||
} else {
|
||||
uiSleep 7.5;
|
||||
};
|
||||
};
|
||||
};
|
45
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_handledamage.sqf
Executable file
45
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_handledamage.sqf
Executable file
@ -0,0 +1,45 @@
|
||||
private["_unit","_hit","_damage","_source","_ammo","_partdamage","_durability"];
|
||||
_unit = _this select 0; //Object the event handler is assigned to. (the unit taking damage)
|
||||
_hit = _this select 1; //Name of the selection where the unit was damaged. "" for over-all structural damage, "?" for unknown selections.
|
||||
_damage = _this select 2; //Resulting level of damage for the selection. (Received damage)
|
||||
_source = _this select 3; //The source unit that caused the damage.
|
||||
_ammo = _this select 4; //Classname of the projectile that caused inflicted the damage. ("" for unknown, such as falling damage.)
|
||||
|
||||
_durability = _unit getVariable "durability";
|
||||
|
||||
if ((_ammo != "")&&{!isNil "_durability"}) then {
|
||||
call {
|
||||
if (_hit == "") exitWith {
|
||||
//Structural damage
|
||||
_partdamage = (_durability select 0) + _damage;
|
||||
_durability set [0,_partdamage];
|
||||
if (((_partdamage >= 0.9) or {((_durability select 1) >= 0.9)}) && {(alive _unit)}) then {
|
||||
0 = [_unit] call DZAI_parachuteOut;
|
||||
_nul = _unit spawn {
|
||||
uiSleep 3;
|
||||
_this setVehicleAmmo 0;
|
||||
_this setFuel 0;
|
||||
_this setDamage 1;
|
||||
};
|
||||
{_unit removeAllEventHandlers _x} forEach ["HandleDamage","GetOut","Killed"];
|
||||
};
|
||||
};
|
||||
if (_hit == "motor") exitWith {
|
||||
_partdamage = (_durability select 1) + _damage;
|
||||
_durability set [1,_partdamage];
|
||||
if ((_partdamage > 0.88) && {alive _unit}) then {
|
||||
_damage = 0.88; //Intercept fatal damage to helicopter engine - next hit will destroy the helicopter.
|
||||
};
|
||||
};
|
||||
if (_hit == "mala vrtule") exitWith {
|
||||
_partdamage = (_durability select 2) + _damage;
|
||||
_durability set [2,_partdamage];
|
||||
if ((_partdamage >= 0.9) && {_unit getVariable ["tailRotorFunctional",true]}) then {
|
||||
_unit setHit ["mala vrtule",1]; //Knock out helicopter tail rotor when sufficiently damaged
|
||||
_unit setVariable ["tailRotorFunctional",false];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_damage
|
90
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_parachute.sqf
Executable file
90
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_parachute.sqf
Executable file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
DZAI_parachuteOut
|
||||
|
||||
Description: Called when AI air vehicle suffers critical damage. Onboard units are ejected if the vehicle is not above water.
|
||||
|
||||
Last updated: 12:11 AM 6/17/2014
|
||||
*/
|
||||
|
||||
private ["_helicopter","_vehPos","_unitGroup"];
|
||||
_helicopter = _this select 0;
|
||||
|
||||
if (_helicopter getVariable ["heli_disabled",false]) exitWith {false};
|
||||
_helicopter setVariable ["heli_disabled",true];
|
||||
{_helicopter removeAllEventHandlers _x} count ["HandleDamage","GetOut","Killed"];
|
||||
_unitGroup = _helicopter getVariable "unitGroup";
|
||||
[_unitGroup,_helicopter] call DZAI_respawnAIVehicle;
|
||||
_vehPos = ASLtoATL getPosASL _helicopter;
|
||||
|
||||
if (!surfaceIsWater _vehPos) then {
|
||||
private ["_unitsAlive","_trigger","_weapongrade","_units","_waypointCount"];
|
||||
_weapongrade = _unitGroup getVariable ["weapongrade",1];
|
||||
_units = units _unitGroup;
|
||||
if (((_vehPos select 2) > 60) or {(0.40 call DZAI_chance)}) then {
|
||||
{
|
||||
if (alive _x) then {
|
||||
_health = _x getVariable ["unithealth",[]];
|
||||
if ((_health select 1) > 0) then {
|
||||
_health set [1,0]; //If unit has any leg damage, heal it
|
||||
_health set [2,false];
|
||||
_x setHit["legs",0];
|
||||
};
|
||||
_x action ["eject",_helicopter];
|
||||
unassignVehicle _x;
|
||||
} else {
|
||||
0 = [_x,_weapongrade] spawn DZAI_addLoot;
|
||||
};
|
||||
} forEach _units;
|
||||
|
||||
_unitsAlive = {alive _x} count _units;
|
||||
//(DZAI_numAIUnits + _unitsAlive) call DZAI_updateUnitCount;
|
||||
if (_unitsAlive > 0) then {
|
||||
for "_i" from ((count (waypoints _unitGroup)) - 1) to 0 step -1 do {
|
||||
deleteWaypoint [_unitGroup,_i];
|
||||
};
|
||||
|
||||
0 = [_unitGroup,_vehPos,75] spawn DZAI_BIN_taskPatrol;
|
||||
|
||||
_unitGroup allowFleeing 0;
|
||||
|
||||
//Create area trigger
|
||||
_trigger = createTrigger ["EmptyDetector",_vehPos];
|
||||
_trigger setTriggerArea [600, 600, 0, false];
|
||||
_trigger setTriggerActivation ["ANY", "PRESENT", true];
|
||||
_trigger setTriggerTimeout [5, 5, 5, true];
|
||||
_trigger setTriggerText (format ["Heli AI Parachute %1",mapGridPosition _helicopter]);
|
||||
_trigger setTriggerStatements ["{isPlayer _x} count thisList > 0;","","0 = [thisTrigger] spawn fnc_despawnBandits;"];
|
||||
|
||||
//Set required trigger variables and begin despawn
|
||||
_trigger setVariable ["isCleaning",false];
|
||||
_trigger setVariable ["GroupArray",[_unitGroup]];
|
||||
_trigger setVariable ["equipType",DZAI_heliUnitLevel];
|
||||
_trigger setVariable ["maxUnits",[_unitsAlive,0]];
|
||||
_trigger setVariable ["respawn",false]; //landed AI units should never respawn
|
||||
_trigger setVariable ["permadelete",true]; //units should be permanently despawned
|
||||
[_trigger,"DZAI_staticTriggerArray"] call DZAI_updateSpawnCount;
|
||||
0 = [_trigger] spawn fnc_despawnBandits;
|
||||
|
||||
_unitGroup setVariable ["unitType","static"];
|
||||
_unitGroup setVariable ["trigger",_trigger];
|
||||
_unitGroup setVariable ["groupSize",_unitsAlive];
|
||||
|
||||
_unitGroup setBehaviour "AWARE";
|
||||
};
|
||||
} else {
|
||||
_unitGroup setVariable ["unitType","aircrashed"];
|
||||
{
|
||||
_x action ["eject",_helicopter];
|
||||
_nul = [_x,_x] call DZAI_unitDeath;
|
||||
0 = [_x,_weapongrade] spawn DZAI_addLoot;
|
||||
} forEach _units;
|
||||
_unitGroup setVariable ["GroupSize",-1];
|
||||
};
|
||||
} else {
|
||||
//_unitGroup call DZAI_deleteGroup;
|
||||
_unitGroup setVariable ["GroupSize",-1];
|
||||
};
|
||||
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: AI helicopter %1 evacuated at %2.",typeOf _helicopter,mapGridPosition _helicopter];};
|
||||
|
||||
true
|
31
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_randompatrol.sqf
Executable file
31
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_randompatrol.sqf
Executable file
@ -0,0 +1,31 @@
|
||||
private ["_unitGroup","_tooClose","_wpSelect"];
|
||||
_unitGroup = _this select 0;
|
||||
|
||||
_tooClose = true;
|
||||
while {_tooClose} do {
|
||||
_wpSelect = (DZAI_locations call BIS_fnc_selectRandom2) select 1;
|
||||
if (((waypointPosition [_unitGroup,0]) distance _wpSelect) > 300) then {
|
||||
_tooClose = false;
|
||||
} else {
|
||||
uiSleep 0.1;
|
||||
};
|
||||
};
|
||||
_wpSelect = [_wpSelect,50+(random 900),(random 360),1] call SHK_pos;
|
||||
[_unitGroup,0] setWPPos _wpSelect;
|
||||
[_unitGroup,1] setWPPos _wpSelect;
|
||||
if ((waypointType [_unitGroup,1]) == "MOVE") then {
|
||||
if (0.275 call DZAI_chance) then {
|
||||
[_unitGroup,1] setWaypointType "SAD";
|
||||
[_unitGroup,1] setWaypointTimeout [20,25,30];
|
||||
_unitGroup setVariable ["DetectPlayersWide",true];
|
||||
};
|
||||
} else {
|
||||
[_unitGroup,1] setWaypointType "MOVE";
|
||||
[_unitGroup,1] setWaypointTimeout [3,6,9];
|
||||
};
|
||||
//[_unitGroup,0] setWaypointCompletionRadius 150;
|
||||
//_unitGroup setCurrentWaypoint [_unitGroup,0];
|
||||
//(vehicle (leader _unitGroup)) flyInHeight (100 + (random 40));
|
||||
|
||||
_unitGroup setCurrentWaypoint [_unitGroup,0];
|
||||
(vehicle (leader _unitGroup)) flyInHeight (100 + (random 40));
|
31
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_reinforce.sqf
Executable file
31
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/heli_reinforce.sqf
Executable file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
|
||||
|
||||
*/
|
||||
|
||||
private ["_index","_trigger","_targetPlayer","_unitGroup","_reinforcePos","_lastRedirectTime","_helicopter"];
|
||||
|
||||
_unitGroup = _this select 0;
|
||||
_helicopter = _this select 1;
|
||||
|
||||
_index = floor (random (count DZAI_reinforcePlaces));
|
||||
_trigger = DZAI_reinforcePlaces select _index;
|
||||
if (!isNull _trigger) then {
|
||||
_targetPlayer = _trigger getVariable "targetplayer";
|
||||
if (!isNil "_targetPlayer") then {_unitGroup reveal [_targetPlayer,4]};
|
||||
_reinforcePos = (getPosASL _trigger);
|
||||
DZAI_reinforcePlaces set [_index,objNull];
|
||||
DZAI_reinforcePlaces = DZAI_reinforcePlaces - [objNull];
|
||||
[_unitGroup,0] setWPPos _reinforcePos;
|
||||
[_unitGroup,1] setWPPos _reinforcePos;
|
||||
[_unitGroup,1] setWaypointType "SAD";
|
||||
[_unitGroup,1] setWaypointTimeout [40,50,60];
|
||||
_unitGroup setVariable ["DetectPlayersWide",true];
|
||||
|
||||
_unitGroup setCurrentWaypoint [_unitGroup,0];
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Helicopter %1 (%2) redirected to dynamic spawn area at %3.",_helicopter,(typeOf _helicopter),mapGridPosition _reinforcePos]};
|
||||
};
|
||||
DZAI_reinforcePlaces set [_index,objNull];
|
||||
DZAI_reinforcePlaces = DZAI_reinforcePlaces - [objNull];
|
||||
|
||||
true
|
62
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/veh_destroyed.sqf
Executable file
62
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/veh_destroyed.sqf
Executable file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
DZAI_vehDestroyed
|
||||
|
||||
Description: Called when AI land vehicle is destroyed
|
||||
|
||||
Last updated: 12:11 AM 6/17/2014
|
||||
|
||||
*/
|
||||
|
||||
private ["_vehicle","_unitGroup","_unitsAlive"];
|
||||
_vehicle = _this select 0;
|
||||
|
||||
if (_vehicle getVariable ["veh_disabled",false]) exitWith {};
|
||||
_vehicle setVariable ["veh_disabled",true];
|
||||
_unitGroup = _vehicle getVariable "unitGroup";
|
||||
{_vehicle removeAllEventHandlers _x} count ["HandleDamage","Killed"];
|
||||
[_unitGroup,_vehicle] call DZAI_respawnAIVehicle;
|
||||
_unitsAlive = {alive _x} count (units _unitGroup);
|
||||
|
||||
if (_unitsAlive > 0) then {
|
||||
//Restrict patrol area to vehicle wreck
|
||||
for "_i" from ((count (waypoints _unitGroup)) - 1) to 0 step -1 do {
|
||||
deleteWaypoint [_unitGroup,_i];
|
||||
};
|
||||
|
||||
_vehPos = ASLToATL getPosASL _vehicle;
|
||||
0 = [_unitGroup,_vehPos,100] spawn DZAI_BIN_taskPatrol;
|
||||
|
||||
//Create area trigger
|
||||
_trigger = createTrigger ["EmptyDetector",_vehPos];
|
||||
_trigger setTriggerArea [600, 600, 0, false];
|
||||
_trigger setTriggerActivation ["ANY", "PRESENT", true];
|
||||
_trigger setTriggerTimeout [5, 5, 5, true];
|
||||
_trigger setTriggerText (format ["Abandoned AI Vehicle %1",mapGridPosition _vehicle]);
|
||||
_trigger setTriggerStatements ["{isPlayer _x} count thisList > 0;","","0 = [thisTrigger] spawn fnc_despawnBandits;"];
|
||||
|
||||
//Set required trigger variables and begin despawn
|
||||
_trigger setVariable ["isCleaning",false];
|
||||
_trigger setVariable ["GroupArray",[_unitGroup]];
|
||||
_trigger setVariable ["equipType",DZAI_vehUnitLevel];
|
||||
_trigger setVariable ["maxUnits",[_unitsAlive,0]];
|
||||
_trigger setVariable ["respawn",false]; //landed AI units should never respawn
|
||||
_trigger setVariable ["permadelete",true]; //units should be permanently despawned
|
||||
//DZAI_actTrigs = DZAI_actTrigs + 1;
|
||||
[_trigger,"DZAI_staticTriggerArray"] call DZAI_updateSpawnCount;
|
||||
//(DZAI_numAIUnits + _unitsAlive) call DZAI_updateUnitCount;
|
||||
0 = [_trigger] spawn fnc_despawnBandits;
|
||||
|
||||
_unitGroup setVariable ["unitType","static"];
|
||||
_unitGroup setVariable ["trigger",_trigger];
|
||||
_unitGroup setVariable ["groupSize",_unitsAlive];
|
||||
|
||||
_unitGroup setBehaviour "AWARE";
|
||||
|
||||
{
|
||||
unassignVehicle _x;
|
||||
} forEach (assignedCargo _vehicle);
|
||||
} else {
|
||||
_unitGroup setVariable ["GroupSize",-1];
|
||||
};
|
||||
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: AI land vehicle patrol destroyed at %1",mapGridPosition _vehicle];};
|
10
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/veh_handledamage.sqf
Executable file
10
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/veh_handledamage.sqf
Executable file
@ -0,0 +1,10 @@
|
||||
private["_unit","_hit","_damage","_source","_ammo"];
|
||||
//_unit = _this select 0; //Object the event handler is assigned to. (the unit taking damage)
|
||||
_hit = _this select 1; //Name of the selection where the unit was damaged. "" for over-all structural damage, "?" for unknown selections.
|
||||
_damage = _this select 2; //Resulting level of damage for the selection. (Received damage)
|
||||
//_source = _this select 3; //The source unit that caused the damage.
|
||||
_ammo = _this select 4; //Classname of the projectile that caused inflicted the damage. ("" for unknown, such as falling damage.)
|
||||
|
||||
if (_ammo == "") then {_damage = 0};
|
||||
|
||||
_damage
|
17
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/veh_randompatrol.sqf
Executable file
17
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/veh_randompatrol.sqf
Executable file
@ -0,0 +1,17 @@
|
||||
private ["_unitGroup","_tooClose","_wpSelect"];
|
||||
_unitGroup = _this select 0;
|
||||
|
||||
_tooClose = true;
|
||||
while {_tooClose} do {
|
||||
_wpSelect = (DZAI_locationsLand call BIS_fnc_selectRandom2) select 1;
|
||||
if (((waypointPosition [_unitGroup,0]) distance _wpSelect) > 300) then {
|
||||
_tooClose = false;
|
||||
};
|
||||
};
|
||||
|
||||
_wpSelect = [_wpSelect,random(300),random(360),0,[1,300]] call SHK_pos;
|
||||
[_unitGroup,0] setWPPos _wpSelect;
|
||||
[_unitGroup,0] setWaypointCompletionRadius 150;
|
||||
if ((count (waypoints _unitGroup)) == 1) then {
|
||||
_unitGroup setCurrentWaypoint [_unitGroup,0];
|
||||
};
|
15
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/veh_regroup.sqf
Executable file
15
@DayZ_Epoch_Server/addons/dayz_server/DZAI/compile/veh_regroup.sqf
Executable file
@ -0,0 +1,15 @@
|
||||
private ["_unitGroup","_vehicle","_loadWP","_loadWPCond"];
|
||||
|
||||
_unitGroup = _this select 0;
|
||||
_vehicle = _this select 1;
|
||||
|
||||
_loadWP = _unitGroup addWaypoint [(ASLtoATL getPosASL _vehicle),0];
|
||||
_loadWP setWaypointType "LOAD";
|
||||
_loadWPCond = "_vehicle = (group this) getVariable ['assignedVehicle',objNull]; ({_x == (vehicle _x)} count (assignedCargo _vehicle)) == 0";
|
||||
_loadWP setWaypointStatements [_loadWPCond,(format ["_unitGroup = (group this); deleteWaypoint [_unitGroup,%1]; _unitGroup setVariable ['regrouped',true]; _unitGroup setCurrentWaypoint [_unitGroup,0];",(_loadWP select 1)])];
|
||||
_loadWP setWaypointCompletionRadius 20;
|
||||
_unitGroup setCurrentWaypoint _loadWP;
|
||||
|
||||
if (DZAI_debugLevel > 1) then {diag_log format ["DZAI Extended Debug: Regroup order issued for AI group %1 to vehicle %2. Check WP count: %3.",_unitGroup,typeOf _vehicle,(count (waypoints _unitGroup))];};
|
||||
|
||||
true
|
6
@DayZ_Epoch_Server/addons/dayz_server/DZAI/init/DZAI_version.txt
Executable file
6
@DayZ_Epoch_Server/addons/dayz_server/DZAI/init/DZAI_version.txt
Executable file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
DZAI Version Identifier File
|
||||
*/
|
||||
|
||||
#define DZAI_TYPE "DZAI"
|
||||
#define DZAI_VERSION "2.2.4 Release Build 20210419"
|
495
@DayZ_Epoch_Server/addons/dayz_server/DZAI/init/dzai_config.sqf
Executable file
495
@DayZ_Epoch_Server/addons/dayz_server/DZAI/init/dzai_config.sqf
Executable file
@ -0,0 +1,495 @@
|
||||
/*
|
||||
DZAI Configuration File
|
||||
|
||||
Description: Contains all configurable settings of DZAI. Contains settings for debugging, customization of AI units, spawning, and loot.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
diag_log "[DZAI] Reading DZAI configuration file.";
|
||||
|
||||
/* DZAI Settings
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Enable or disable event logging to arma2oaserver.rpt. Debug level setting. 0: No debug output, 1: Basic Debug output, 2: Extended Debug output. (Default: 0)
|
||||
//Debug output may help finding additional information about DZAI's background behavior. This output is helpful when asking for help regarding bugs or unexpected behaviors.
|
||||
DZAI_debugLevel = 0;
|
||||
|
||||
//Frequency of server monitor update to RPT log in seconds. The monitor periodically reports number of max/current AI units and dynamically spawned triggers into RPT log. (Default: 300, 0 = Disable reporting)
|
||||
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;
|
||||
|
||||
//(Feature in development) Enables additional checking and error-correction of certain classname tables. (Default: false)
|
||||
DZAI_extendedVerify = false;
|
||||
|
||||
//Enable to have server spawn in objects/buildings normally spawned clientside by DayZ's CfgTownGenerator. Prevents AI from walking/shooting through clutter and other objects. (Default: true)
|
||||
//If running DayZ Mod ("vanilla DayZ") or DayZ Overwatch, it is highly recommended to enable this option, as many added buildings are handled by the CfgTownGenerator. Not used with Epoch.
|
||||
DZAI_objPatch = true;
|
||||
|
||||
//Minimum seconds to pass until each dead AI body or destroyed vehicle can be cleaned up by DZAI's task scheduler. DZAI will not clean up a body/vehicle if there is a player close by (Default: 900).
|
||||
//Note: Other cleanup scripts might interfere by cleaning up dead AI bodies/vehicles!
|
||||
DZAI_cleanupDelay = 900;
|
||||
|
||||
//Enable auto detection of DayZ mod type ran by server. If additional support exists for the mod type, DZAI will load additional classnames (example: weapons, skins, or other items)
|
||||
//Additional support exists for the following DayZ mods: Epoch, Overwatch, Unleashed, Hunting Grounds, 2017. (Default: true)
|
||||
DZAI_modAutoDetect = true;
|
||||
|
||||
|
||||
/* AI Unit Settings
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Enhanced AI health system setting.
|
||||
//If enabled, AI units will use DayZ's 12,000 blood system, can be knocked unconscious and Tasered, and can self-bloodbag/morphine. If disabled, AI units will use default Arma 2 damage handling. (Default: true)
|
||||
DZAI_useHealthSystem = false;
|
||||
|
||||
//Minimum and maximum AI blood level to spawn each unit with. Each individual unit will have a randomized blood level within this range. Upper limit: 12000 blood (Default: [10000,12000])
|
||||
//Note: No effect if DZAI_useHealthSystem is false
|
||||
DZAI_unitBloodLevel = [10000,12000];
|
||||
|
||||
//Amount of blood restored from a full self-heal. One-third of the total amount is restored 3 times every 3 seconds. Note: Applies to infantry-type AI units. (Default: 6000)
|
||||
//Note: No effect if DZAI_useHealthSystem is false
|
||||
DZAI_unitHealAmount = 6000;
|
||||
|
||||
//Below this blood level, AI may decide to heal themselves for amount specified by DZAI_unitHealAmount. Healing requires 9 seconds to fully complete and can be interrupted by knocking the unit unconscious. (Default: 5000)
|
||||
//Note: No effect if DZAI_useHealthSystem is false
|
||||
DZAI_lowBloodLevel = 5000;
|
||||
|
||||
//Enable or disable zombie attraction to AI weapon sounds. No effect if DZAI_zombieEnemy is set to false. Enabling this option may impact server performance as a script is run for each AI bullet fired.
|
||||
//Note: AI cannot be attacked or damaged by zombies.(Default: false)
|
||||
DZAI_weaponNoise = false;
|
||||
|
||||
//If enabled, AI group will attempt to track down player responsible for killing a group member. Players with radios will be given text warnings if they are being pursued (Default: true)
|
||||
DZAI_findKiller = true;
|
||||
|
||||
//If normal probability check for spawning NVGs fails, then give AI temporary NVGs only if they are spawned with weapongrade 1 or higher (applies only during nighttime hours). Temporary NVGs are unlootable and will be removed at death (Default: false).
|
||||
DZAI_tempNVGs = false;
|
||||
|
||||
//Amount of humanity to reward player for killing an AI unit (Default: 0)
|
||||
DZAI_humanityGain = 0;
|
||||
|
||||
//If enabled, players with radios will be given text warnings if they are being pursued by AI groups. (Default: true)
|
||||
DZAI_radioMsgs = true;
|
||||
|
||||
//If enabled, last surviving unit of a group will be granted slightly boosted skills. No effect if unit is spawned alone (Default: false)
|
||||
DZAI_lastManStanding = false;
|
||||
|
||||
//If enabled, dead AI bodies have coins. From 100 - 2000 coins on each AI. Works only if Z_SingleCurrency = true; (Default: [false,[100,2000]])
|
||||
DZAI_hasCoins = [false,[100,2000]];
|
||||
|
||||
/*DZAI client-side addon settings.
|
||||
**NOTE**: These settings require the DZAI client-side addon to be installed to your mission pbo file in order to work.
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Enable to use client-side radio addon for radio messages instead of remote execution method. (Default: false)
|
||||
DZAI_clientRadio = false;
|
||||
|
||||
//Enable or disable AI hostility to zombies. If enabled, AI units spawned by DZAI will attack nearby zombies. (Default: false)
|
||||
DZAI_zombieEnemy = true;
|
||||
|
||||
//Maximum distance (in meters) for AI group leader to detect zombies. Increasing range beyond default may negatively impact server performance. (Default: 150)
|
||||
DZAI_zDetectRange = 150;
|
||||
|
||||
//Enable or disable AI death messages. Messages will be sent only to player responsible for killing the unit. Messages will be sent in System chat in the format "(Unit name) was killed." (Default: false)
|
||||
DZAI_deathMessages = false;
|
||||
|
||||
|
||||
/* Static AI Spawning Settings
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Enable or disable static AI spawns. If enabled, AI spawn points will be generated in cities, towns, and other predefined areas. Does not affect custom-defined spawns (Default: true).
|
||||
DZAI_staticAI = false;
|
||||
|
||||
//Set minimum and maximum wait time in seconds to respawn an AI group after all units have been killed. Applies to both static AI and custom spawned AI (Default: Min 300, Max 600).
|
||||
DZAI_respawnTimeMin = 300;
|
||||
DZAI_respawnTimeMax = 600;
|
||||
|
||||
//Time to allow spawned AI units to exist in seconds before being despawned when no players are present in a trigger area. Applies to both static AI and custom spawned AI (Default: 120)
|
||||
DZAI_despawnWait = 120;
|
||||
|
||||
//Respawn limits. Set to -1 for unlimited respawns. (Default: -1 for each).
|
||||
DZAI_respawnLimit0 = -1; //Respawn limit for low level AI found in low-value areas (Default: -1)
|
||||
DZAI_respawnLimit1 = -1; //Respawn limit for mid level AI found in cities and other mid-value areas (Default: -1)
|
||||
DZAI_respawnLimit2 = -1; //Respawn limit for high level AI found in places with military loot (Default: -1)
|
||||
DZAI_respawnLimit3 = -1; //Respawn limit for very high level AI in places with high-grade military loot (Default: -1)
|
||||
|
||||
//Spawn probabilities
|
||||
DZAI_spawnChance0 = 0.40; //Spawn chance for low-skill AI typically found in small towns (Default: 0.40)
|
||||
DZAI_spawnChance1 = 0.60; //Spawn chance for mid-level AI typically found in cities and large towns (Default: 0.60)
|
||||
DZAI_spawnChance2 = 0.80; //Spawn chance for high-level AI typically found in places with military-grade loot (Default: 0.80)
|
||||
DZAI_spawnChance3 = 0.90; //Spawn chance for expert-level AI found in areas with high-grade military loot (Default: 0.90)
|
||||
|
||||
|
||||
/* Dynamic AI Spawning Settings
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Enable or disable dynamic AI spawns. If enabled, AI spawn locations will be generated for randomly selected players at randomized intervals (Default: true)
|
||||
DZAI_dynAISpawns = false;
|
||||
|
||||
//Time (seconds) required to reach maximum spawn probability per player, after which the probability is reset to 0%. Lower number = More frequent spawns, Higher Number = Less frequent. (Recommended range: 1200-2700, Default: 1200)
|
||||
DZAI_maxSpawnTime = 1200;
|
||||
|
||||
//Time (seconds) to allow each player to retain maximum spawn probability. (Default: 1200).
|
||||
DZAI_keepMaxSpawnTime = 1200;
|
||||
|
||||
//Probability for dynamic AI to actively hunt a targeted player. If probability check fails, dynamic AI will patrol the area instead of hunting (Default: 0.50)
|
||||
DZAI_huntingChance = 0.50;
|
||||
|
||||
//Probability to send first available AI helicopter to reinforce dynamic AI group. No effect if DZAI_maxHeliPatrols is set to zero. (Default: 0.50)
|
||||
DZAI_heliReinforceChance = 0.50;
|
||||
|
||||
//Array of area blacklist markers. Players within marker areas will not be targeted for dynamic AI spawns (Example: ["BlacklistArea1","BlacklistArea2","BlacklistArea3"])
|
||||
//Epoch: DZAI will automatically set up 200m-radius blacklist areas around each trader area.
|
||||
DZAI_dynAreaBlacklist = [];
|
||||
|
||||
//Time to wait before despawning all AI units in dynamic spawn area when no players are present. (Default: 120)
|
||||
DZAI_dynDespawnWait = 120;
|
||||
|
||||
//Enable or disable dynamic spawn-free zones of 600m radius around player spawn areas. (Default: false)
|
||||
DZAI_freshSpawnSafeArea = false;
|
||||
|
||||
|
||||
/* Random AI Spawning Settings (Feature in development)
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Maximum number of placed random spawns on map
|
||||
DZAI_maxRandomSpawns = 0;
|
||||
|
||||
//Time to wait before despawning all AI units in random spawn area when no players are present. (Default: 120)
|
||||
DZAI_randDespawnWait = 120;
|
||||
|
||||
//Array of area blacklist markers. Players within marker areas will not be targeted for random AI spawns (Example: ["BlacklistArea1","BlacklistArea2","BlacklistArea3"])
|
||||
//Epoch: DZAI will automatically set up 200m-radius blacklist areas around each trader area.
|
||||
//Tip: To use dynamic-spawn blacklist areas for random-spawn blacklist areas, simply set DZAI_randAreaBlacklist = DZAI_dynAreaBlacklist;
|
||||
DZAI_randAreaBlacklist = [];
|
||||
|
||||
|
||||
/* AI Air vehicle patrol settings. These AI vehicles will randomly travel between different cities and towns.
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Global maximum number of active AI air vehicle patrols. Set at 0 to disable (Default: 0).
|
||||
DZAI_maxHeliPatrols = 0;
|
||||
|
||||
//Set minimum and maximum wait time in seconds to respawn an AI vehicle patrol after vehicle is destroyed or disabled. (Default: Min 600, Max 900).
|
||||
DZAI_respawnTMinA = 600;
|
||||
DZAI_respawnTMaxA = 900;
|
||||
|
||||
//Classnames of air vehicle types to use, with the maximum amount of each type to spawn.
|
||||
DZAI_heliList = [
|
||||
["UH1H_DZ",5],
|
||||
["Mi17_DZ",5]
|
||||
];
|
||||
|
||||
//Difficulty level of air vehicle patrol units. Difficulty level also affects unit loadout and loot. Possible values: 0 to 3 (Default: 3)
|
||||
DZAI_heliUnitLevel = 3;
|
||||
|
||||
//Maximum number of gunner units per air vehicle. Limited by actual number of available gunner positions. (Default: 2)
|
||||
DZAI_heliGunnerUnits = 3;
|
||||
|
||||
//Specify vehicle weapon for air vehicles that are unarmed by default. DZAI will arm these air vehicles with the specified weapons upon spawning each vehicle.
|
||||
//Weapon classnames are verified. If the classname is invalid (banned or nonexistent), it will not be added to the vehicle.
|
||||
//Format: Each row containing a vehicle classname will be equipped with the weapon from the corresponding row in weapon classnames section. DZAI will automatically select ammo type.
|
||||
DZAI_airWeapons = [
|
||||
//Air vehicle classnames (Remember: no comma for last entry! Otherwise, separate each string with commas)
|
||||
["Helicopter1_Example_Classname","Helicopter2_Example_Classname"]
|
||||
,
|
||||
//Corresponding weapon classnames (Remember: no comma for last entry! Otherwise, separate each string with commas)
|
||||
["Helicopter1_Example_Weapon","Helicopter2_Example_Weapon"]
|
||||
];
|
||||
|
||||
|
||||
/*AI Land vehicle patrol settings. These AI vehicles will randomly travel between different cities and towns.
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Global maximum number of active AI land vehicle patrols. Set at 0 to disable (Default: 0).
|
||||
DZAI_maxLandPatrols = 0;
|
||||
|
||||
//Set minimum and maximum wait time in seconds to respawn an AI vehicle patrol after vehicle is destroyed or disabled. (Default: Min 600, Max 900).
|
||||
DZAI_respawnTMinL = 600;
|
||||
DZAI_respawnTMaxL = 900;
|
||||
|
||||
//Classnames of land vehicle types to use, with the maximum amount of each type to spawn.
|
||||
DZAI_vehList = [
|
||||
["UAZ_Unarmed_TK_EP1_DZE",5],
|
||||
["SUV_TK_CIV_EP1_DZE",5]
|
||||
];
|
||||
|
||||
//Difficulty level of land vehicle patrol units. Difficulty level also affects unit loadout and loot. Possible values: 0 to 3 (Default: 3)
|
||||
DZAI_vehUnitLevel = 3;
|
||||
|
||||
//Maximum number of gunner units per land vehicle. Limited by actual number of available gunner positions. (Default: 1)
|
||||
DZAI_vehGunnerUnits = 2;
|
||||
|
||||
//Maximum number of cargo units per land vehicle. Limited by actual number of available cargo positions. (Default: 3)
|
||||
DZAI_vehCargoUnits = 3;
|
||||
|
||||
|
||||
/* AI Vehicle (Air & Land) Settings
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Array of area blacklist markers. Areas covered by marker will not be used as waypoints for vehicle patrols. (Example: ["BlacklistArea1","BlacklistArea2","BlacklistArea3"])
|
||||
//Note: Vehicles may still pass through these areas but will not make stops unless enemies are encountered.
|
||||
DZAI_waypointBlacklist = [];
|
||||
|
||||
|
||||
/* AI weapon selection settings
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//True: Dynamically generate AI weapon list from CfgBuildingLoot (DayZ loot tables). False: Use preset weapon tables located near the end of this file. (Default: true).
|
||||
//Highly recommended to enable DZAI_verifyTables if this option is set to false.
|
||||
DZAI_dynamicWeaponList = true;
|
||||
|
||||
//Determines whether DZAI reads from default DayZ loot tables for dynamic AI weapon generation or from user-installed custom loot tables. (Default: false)
|
||||
//No effect if DZAI_dynamicWeaponList is 'false'. If DZAI is unable to find custom loot tables installed, default loot tables will be used instead. If no loot tables are found, DZAI will use prebuilt weapon tables.
|
||||
DZAI_customLootTables = false;
|
||||
|
||||
//List of classnames of weapons that AI should never use. By default, AI may carry any lootable weapon. (Only if DZAI_dynamicWeaponList = true)
|
||||
//Example: DZAI_banAIWeapons = ["M107_DZ","BAF_AS50_scoped"] will remove the M107 and AS50 from AI weapon tables if dynamic weapon list is enabled.
|
||||
//Note: It is recommended to add all melee weapon classnames into this list as AI have issues using melee weapons.
|
||||
//Pre-banned weapons by DZAI: "Crossbow_DZ","Crossbow","MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeBaseball","MeleeBaseBallBat","MeleeBaseBallBatBarbed","MeleeBaseBallBatNails"
|
||||
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];
|
||||
|
||||
//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];
|
||||
|
||||
//Limit of number of launcher-type weapons to add to each AI group. Groups cannot have more launcher weapons than their weapongrade value (Default: 1).
|
||||
DZAI_launchersPerGroup = 1;
|
||||
|
||||
|
||||
/* AI loot quantity settings
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Number of selections of medical items (Inventory)
|
||||
DZAI_invmedicals = 1;
|
||||
|
||||
//Number of selections of edible items (Inventory)
|
||||
DZAI_invedibles = 1;
|
||||
|
||||
//Number of selections of medical items (Backpack)
|
||||
DZAI_bpmedicals = 1;
|
||||
|
||||
//Number of selections of edible items (Backpack)
|
||||
DZAI_bpedibles = 1;
|
||||
|
||||
//Maximum number of items to select from DZAI_MiscItemS table.
|
||||
DZAI_numMiscItemS = 3;
|
||||
|
||||
//Maximum number of items to select from DZAI_MiscItemL table.
|
||||
DZAI_numMiscItemL = 1;
|
||||
|
||||
|
||||
/* AI loot probability settings
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//Chance to add each medical item.
|
||||
DZAI_chanceMedicals = 0.70;
|
||||
|
||||
//Chance to add each edible item.
|
||||
DZAI_chanceEdibles = 0.70;
|
||||
|
||||
//Chance to add each random item from DZAI_MiscItemS table.
|
||||
DZAI_chanceMiscItemS = 0.60;
|
||||
|
||||
//Chance to add each random item from DZAI_MiscItemL table.
|
||||
DZAI_chanceMiscItemL = 0.15;
|
||||
|
||||
|
||||
/*AI weapon/skill probabilities (gradeChances should add up to 1.00) - [Civilian, Military, MilitarySpecial, HeliCrash] - Note: AI with higher grade weaponry will also have higher skill settings.
|
||||
--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
//equipType level 0 - most AI will have basic pistols or rifles, and occasionally common military weapons.
|
||||
DZAI_gradeChances0 = [0.90,0.10,0.00,0.00];
|
||||
|
||||
//equipType level 1 - most AI will have common rifles, many will have common military weapons. Very rarely, AI will spawn with high-grade military or helicrash weapons.
|
||||
DZAI_gradeChances1 = [0.65,0.30,0.04,0.01];
|
||||
|
||||
//equipType level 2 - most AI carry military weapons, and occasionally high-grade military weapons.
|
||||
DZAI_gradeChances2 = [0.15,0.65,0.15,0.05];
|
||||
|
||||
//equipType level 3 - All AI will carry at least a military-grade weapon. Many will be carrying high-grade military weapons. Note: Air and land vehicle patrols use equipType level 3.
|
||||
DZAI_gradeChances3 = [0.00,0.50,0.35,0.15];
|
||||
|
||||
//equipType level "dynamic" - Weapongrade chances for dynamic-spawned AI. Majority of dynamic AI will be carrying low-grade military weapons, some will carry high-grade military.
|
||||
DZAI_gradeChancesDyn = [0.00,0.88,0.09,0.03];
|
||||
|
||||
|
||||
/*
|
||||
AI skill settings
|
||||
Skill Level: Description
|
||||
0-1: Low to medium-skilled AI. Most common type of AI encountered. Intended to challenge players.
|
||||
2-3: High-skilled AI. Uncommon/rare type of AI found in places with military loot. Intended to kill players.
|
||||
Hint: The best way to quickly adjust AI difficulty is by modifying aimingAccuracy value. For all skill types, higher number = better skill.
|
||||
*/
|
||||
|
||||
//AI skill settings level 0 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.50
|
||||
DZAI_skill0 = [
|
||||
["aimingAccuracy",0.10,0.125],
|
||||
["aimingShake",0.50,0.59],
|
||||
["aimingSpeed",0.50,0.59],
|
||||
["endurance",0.50,0.59],
|
||||
["spotDistance",0.50,0.59],
|
||||
["spotTime",0.50,0.59],
|
||||
["courage",0.50,0.59],
|
||||
["reloadSpeed",0.50,0.59],
|
||||
["commanding",0.60,0.69],
|
||||
["general",0.60,0.69]
|
||||
];
|
||||
|
||||
//AI skill settings level 1 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.60
|
||||
DZAI_skill1 = [
|
||||
["aimingAccuracy",0.125,0.15],
|
||||
["aimingShake",0.60,0.69],
|
||||
["aimingSpeed",0.60,0.69],
|
||||
["endurance",0.60,0.69],
|
||||
["spotDistance",0.60,0.69],
|
||||
["spotTime",0.60,0.69],
|
||||
["courage",0.60,0.69],
|
||||
["reloadSpeed",0.60,0.69],
|
||||
["commanding",0.70,0.79],
|
||||
["general",0.70,0.79]
|
||||
];
|
||||
|
||||
//AI skill settings level 2 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.70
|
||||
DZAI_skill2 = [
|
||||
["aimingAccuracy",0.175,0.225],
|
||||
["aimingShake",0.70,0.79],
|
||||
["aimingSpeed",0.70,0.79],
|
||||
["endurance",0.70,0.79],
|
||||
["spotDistance",0.70,0.79],
|
||||
["spotTime",0.70,0.79],
|
||||
["courage",0.70,0.79],
|
||||
["reloadSpeed",0.70,0.79],
|
||||
["commanding",0.80,0.89],
|
||||
["general",0.80,0.89]
|
||||
];
|
||||
|
||||
//AI skill settings level 3 (Skill, Minimum skill, Maximum skill). Baseline skill level: 0.80
|
||||
DZAI_skill3 = [
|
||||
["aimingAccuracy",0.225,0.250],
|
||||
["aimingShake",0.80,0.89],
|
||||
["aimingSpeed",0.80,0.89],
|
||||
["endurance",0.80,0.89],
|
||||
["spotDistance",0.80,0.89],
|
||||
["spotTime",0.80,0.89],
|
||||
["courage",0.80,0.89],
|
||||
["reloadSpeed",0.80,0.89],
|
||||
["commanding",0.90,0.99],
|
||||
["general",0.90,0.99]
|
||||
];
|
||||
|
||||
|
||||
/*
|
||||
Additional AI skill settings can be defined (DZAI_skill4 - DZAI_skill9) for the corresponding custom weapongrade level using the same format above.
|
||||
Note: If a custom weapongrade is used without defining the corresponding custom skill settings, DZAI_skill3 settings will be used instead.
|
||||
Instructions: replace "nil" with the skill array. Refer to the above preset skill arrays for examples.
|
||||
Custom AI skill settings can only be used with custom-defined spawns (spawns created using the DZAI_spawn function).
|
||||
*/
|
||||
|
||||
//weapongrade 4 skills
|
||||
DZAI_skill4 = nil;
|
||||
|
||||
//weapongrade 5 skills
|
||||
DZAI_skill5 = nil;
|
||||
|
||||
//weapongrade 6 skills
|
||||
DZAI_skill6 = nil;
|
||||
|
||||
//weapongrade 7 skills
|
||||
DZAI_skill7 = nil;
|
||||
|
||||
//weapongrade 8 skills
|
||||
DZAI_skill8 = nil;
|
||||
|
||||
//weapongrade 9 skills
|
||||
DZAI_skill9 = nil;
|
||||
|
||||
|
||||
/*
|
||||
AI weapon, loot, and equipment settings
|
||||
|
||||
DZAI will first load the classname tables defined below, the modify the settings according to the DayZ map/mod being run.
|
||||
|
||||
Example: DZAI will always first load the classname tables defined below, then if DayZ Epoch is detected, DZAI will add or overwrite settings specified by \world_classname_configs\epoch\dayz_epoch.sqf.
|
||||
|
||||
*/
|
||||
|
||||
//Default weapon classname tables - DZAI will ONLY use these tables if the dynamic weapon list (DZAI_dynamicWeaponList) is disabled, otherwise they are ignored and overwritten if it is enabled.
|
||||
//Note: Low-level AI (weapongrade 0) may use pistols listed in DZAI_Pistols0 or DZAI_Pistols1. Mid/high level AI (weapongrade 1+) will carry pistol weapons but not use them - they will use rifle weapons instead.
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
DZAI_Pistols0 = ["Makarov_DZ","M1911_DZ","Revolver_DZ"]; //Weapongrade 0 pistols
|
||||
DZAI_Pistols1 = ["M9_DZ","M9_SD_DZ","Makarov_SD_DZ","PDW_DZ","G17_FL_DZ"]; //Weapongrade 1 pistols
|
||||
DZAI_Pistols2 = ["M9_SD_DZ","Makarov_SD_DZ","PDW_DZ","G17_FL_DZ"]; //Weapongrade 2 pistols
|
||||
DZAI_Pistols3 = ["M9_SD_DZ","Makarov_SD_DZ","PDW_DZ","G17_FL_DZ"]; //Weapongrade 3 pistols
|
||||
|
||||
DZAI_Rifles0 = ["LeeEnfield_DZ","Winchester1866_DZ","MR43_DZ","CZ550_DZ","LeeEnfield_DZ","Winchester1866_DZ","MR43_DZ"]; //Weapongrade 0 rifles
|
||||
DZAI_Rifles1 = ["M16A2_DZ","M16A2_GL_DZ","AK74_DZ","M4A1_CCO_DZ","AK74_Kobra_DZ","AKS74U_DZ","AKM_DZ","M24_DZ","M1014_DZ","DMR_DZ","M4A1_DZ","M14_CCO_DZ","Remington870_FL_DZ","MP5_DZ","MP5_SD_DZ","M4A3_DES_CCO_DZ"]; //Weapongrade 1 rifles
|
||||
DZAI_Rifles2 = ["M16A2_DZ","M16A2_GL_DZ","M249_DZ","AK74_DZ","M4A1_CCO_DZ","AK74_Kobra_DZ","AKS74U_DZ","AKM_DZ","M24_DZ","SVD_Gh_DZ","M1014_DZ","DMR_DZ","M4A1_DZ","M14_CCO_DZ","Remington870_FL_DZ","M240_DZ","M4A1_Camo_CCO_SD_DZ","M16A4_ACOG_DZ","M4A1_Camo_Holo_GL_DZ","Mk48_CCO_DZ","M4A3_DES_CCO_DZ","Sa58V_Camo_ACOG_DZ","Sa58V_Camo_CCO_DZ","M40A3_Gh_DZ","SA58_DZ","SA58_DZ"]; //Weapongrade 2 rifles
|
||||
DZAI_Rifles3 = ["FNFAL_DZ","FN_FAL_ANPVS4_DZE","Mk48_CCO_DZ","M249_DZ","L85_Holo_DZ","G36C_DZ","G36C_Camo_DZ","G36A_Camo_DZ","G36K_Camo_DZ","AKM_DZ","AKS74U_DZ","M14_CCO_DZ","Bizon_SD_DZ","DMR_DZ","RPK74_DZ"]; //Weapongrade 3 rifles
|
||||
|
||||
|
||||
/*
|
||||
Custom rifle tables can be defined below this line (DZAI_Rifles4 - DZAI_Rifles9) for the corresponding custom weapongrade level using the same format above.
|
||||
Note: If a custom weapongrade is used without defining the corresponding custom rifle array, the DZAI_Rifles3 array will be used instead.
|
||||
Instructions: Replace "nil" with the wanted rifle array. Refer to the above rifle arrays for examples on how to define custom rifle tables.
|
||||
Custom rifle tables can only be used with custom-defined spawns (spawns created using the DZAI_spawn function).
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
DZAI_Rifles4 = nil; //weapongrade 4 weapons
|
||||
DZAI_Rifles5 = nil; //weapongrade 5 weapons
|
||||
DZAI_Rifles6 = nil; //weapongrade 6 weapons
|
||||
DZAI_Rifles7 = nil; //weapongrade 7 weapons
|
||||
DZAI_Rifles8 = nil; //weapongrade 8 weapons
|
||||
DZAI_Rifles9 = nil; //weapongrade 9 weapons
|
||||
|
||||
|
||||
//AI skin classnames. DZAI will use any of these classnames for AI spawned. Note: Additional skins may be included on a per-map or per-mod basis - see folders in \world_classname_configs
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
DZAI_BanditTypes = ["Survivor2_DZ", "SurvivorW2_DZ", "Bandit1_DZ", "BanditW1_DZ", "Camo1_DZ", "Sniper1_DZ"];
|
||||
|
||||
|
||||
//AI Backpack types (for weapongrade levels 0-3)
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
DZAI_Backpacks0 = ["Patrol_Pack_DZE1","Czech_Vest_Pouch_DZE1","Assault_Pack_DZE1"];
|
||||
DZAI_Backpacks1 = ["Patrol_Pack_DZE1","Czech_Vest_Pouch_DZE1","Assault_Pack_DZE1","British_ACU_DZE1","TK_Assault_Pack_DZE1","CzechBackpack_DZE1","ALICE_Pack_DZE1"];
|
||||
DZAI_Backpacks2 = ["CzechBackpack_DZE1","British_ACU_DZE1","CoyoteBackpack_DZE1"];
|
||||
DZAI_Backpacks3 = ["CzechBackpack_DZE1","CoyoteBackpack_DZE1"];
|
||||
|
||||
|
||||
//AI Food/Medical item types. DZAI_Edibles: Drinkable and edible items. DZAI_Medicals1: List of common medical items to be added to AI inventory. DZAI_Medicals2: List of all medical items available only in hospitals to be added to AI backpack.
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
DZAI_Edibles = ["ItemSodaCoke", "ItemSodaPepsi", "ItemWaterbottle", "FoodCanSardines", "FoodCanBakedBeans", "FoodCanFrankBeans", "FoodCanPasta", "ItemWaterbottleUnfilled","ItemWaterbottleBoiled","FoodmuttonCooked","FoodchickenCooked","FoodBaconCooked","FoodRabbitCooked","FoodbaconRaw","FoodchickenRaw","FoodmuttonRaw","foodrabbitRaw","FoodCanUnlabeled","FoodPistachio","FoodNutmix","FoodMRE"];
|
||||
DZAI_Medicals1 = ["ItemBandage", "ItemPainkiller"];
|
||||
DZAI_Medicals2 = ["ItemPainkiller", "ItemMorphine", "ItemBandage", "ItemBloodbag", "ItemAntibiotic","ItemEpinephrine"];
|
||||
|
||||
|
||||
//AI Miscellaneous item types. DZAI_MiscItemS: List of random low-value items. DZAI_MiscItemL: List of random semi-valuable/useful items
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
DZAI_MiscItemS = ["ItemHeatpack", "HandRoadFlare", "HandChemBlue", "HandChemRed", "HandChemGreen","SmokeShell","TrashTinCan","TrashJackDaniels","ItemSodaEmpty"];
|
||||
DZAI_MiscItemL = ["ItemJerrycan", "PartWheel", "PartEngine", "PartFueltank", "PartGlass", "PartVRotor","PartWoodPile"];
|
||||
|
||||
|
||||
//AI toolbelt item types. Toolbelt items are added to AI inventory upon death. Format: [item classname, item probability]
|
||||
//Weapongrade level 0-1 AI will use DZAI_tools0 table, weapongrade level 2-3 AI will use DZAI_tools1 table. Custom-spawned AI will use DZAI_tools1 table.
|
||||
//NOTE: Do not delete any elements from this list, set its chance to zero intead. Only add elements to the end of the array, not in the middle.
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
DZAI_tools0 = [["ItemFlashlight",0.65],["ItemWatch",0.65],["ItemKnife",0.50],["ItemHatchet",0.40],["ItemCompass",0.40],["ItemMap",0.35],["ItemToolbox",0.15],["ItemMatchbox",0.15],["ItemFlashlightRed",0.05],["ItemGPS",0.005],["ItemRadio",0.005],["ItemCrowbar",0.15]];
|
||||
DZAI_tools1 = [["ItemFlashlight",0.75],["ItemWatch",0.75],["ItemKnife",0.75],["ItemHatchet",0.70],["ItemCompass",0.75],["ItemMap",0.70],["ItemToolbox",0.35],["ItemMatchbox",0.40],["ItemFlashlightRed",0.10],["ItemGPS",0.10],["ItemRadio",0.075],["ItemCrowbar",0.35]];
|
||||
|
||||
|
||||
//AI-useable toolbelt item types. These items are added to AI inventory at unit creation and may be used by AI. Format: [item classname, item probability]
|
||||
//Weapongrade level 0-1 AI will use DZAI_gadgets0 table, weapongrade level 2-3 AI will use DZAI_gadgets1 table. Custom-spawned AI will use DZAI_gadgets1 table.
|
||||
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
DZAI_gadgets0 = [["binocular",0.40],["NVGoggles",0.00]];
|
||||
DZAI_gadgets1 = [["binocular",0.60],["NVGoggles",0.05]];
|
||||
|
||||
|
||||
//NOTHING TO EDIT BEYOND THIS POINT
|
||||
diag_log "[DZAI] DZAI configuration file loaded.";
|
381
@DayZ_Epoch_Server/addons/dayz_server/DZAI/init/dzai_functions.sqf
Executable file
381
@DayZ_Epoch_Server/addons/dayz_server/DZAI/init/dzai_functions.sqf
Executable file
@ -0,0 +1,381 @@
|
||||
/*
|
||||
DZAI Functions
|
||||
|
||||
Last Updated: 5:08 AM 12/24/2013
|
||||
*/
|
||||
|
||||
diag_log "[DZAI] Compiling DZAI functions.";
|
||||
|
||||
//Utility functions
|
||||
if (isNil "SHK_pos_getPos") then {call compile preprocessFile format ["%1\SHK_pos\shk_pos_init.sqf",DZAI_directory];};
|
||||
if (isNil "fnc_selectRandomWeighted") then {fnc_selectRandomWeighted = compile preprocessFileLineNumbers format ["%1\compile\fn_selectRandomWeighted.sqf",DZAI_directory]};
|
||||
BIS_fnc_selectRandom2 = compile preprocessFileLineNumbers format ["%1\compile\fn_selectRandom.sqf",DZAI_directory];
|
||||
DZAI_checkClassname = compile preprocessFileLineNumbers format ["%1\compile\fn_checkclassname.sqf",DZAI_directory];
|
||||
|
||||
//Spawning-related functions
|
||||
DZAI_setup_AI = compile preprocessFileLineNumbers format ["%1\compile\fn_spawnGroup.sqf",DZAI_directory];
|
||||
DZAI_findSpawnPos = compile preprocessFileLineNumbers format ["%1\compile\fn_findspawnpos.sqf",DZAI_directory];
|
||||
DZAI_setTrigVars = compile preprocessFileLineNumbers format ["%1\compile\fn_init_trigger.sqf",DZAI_directory];
|
||||
fnc_spawnBandits_custom = compile preprocessFileLineNumbers format ["%1\spawn_functions\spawnBandits_custom.sqf",DZAI_directory];
|
||||
DZAI_spawnVehicle_custom = compile preprocessFileLineNumbers format ["%1\spawn_functions\spawnVehicle_custom.sqf",DZAI_directory];
|
||||
DZAI_spawn_units = compile preprocessFileLineNumbers format ["%1\compile\fn_customSpawnUnits.sqf",DZAI_directory];
|
||||
fnc_respawnBandits = compile preprocessFileLineNumbers format ["%1\spawn_functions\respawnBandits.sqf",DZAI_directory];
|
||||
fnc_respawnHandler = compile preprocessFileLineNumbers format ["%1\spawn_functions\respawnHandler1.sqf",DZAI_directory];
|
||||
fnc_respawnHandler2 = compile preprocessFileLineNumbers format ["%1\spawn_functions\respawnHandler2.sqf",DZAI_directory];
|
||||
fnc_despawnBandits = compile preprocessFileLineNumbers format ["%1\spawn_functions\despawnBandits.sqf",DZAI_directory];
|
||||
|
||||
//AI unit-related functions
|
||||
DZAI_AI_handledamage = compile preprocessFileLineNumbers format ["%1\compile\fn_damageHandlerAI2.sqf",DZAI_directory];
|
||||
DZAI_unconscious = compile preprocessFileLineNumbers format ["%1\compile\ai_unconscious.sqf",DZAI_directory];
|
||||
DZAI_BIN_taskPatrol = compile preprocessFileLineNumbers format ["%1\compile\BIN_taskPatrol.sqf",DZAI_directory];
|
||||
DZAI_addLoot = compile preprocessFileLineNumbers format ["%1\compile\ai_generate_loot.sqf",DZAI_directory];
|
||||
DZAI_setupLoadout = compile preprocessFileLineNumbers format ["%1\compile\ai_setup_loadout.sqf",DZAI_directory];
|
||||
DZAI_autoRearm_group = compile preprocessFileLineNumbers format ["%1\compile\group_manager.sqf",DZAI_directory];
|
||||
DZAI_heliAwareness = compile preprocessFileLineNumbers format ["%1\compile\heli_awareness.sqf",DZAI_directory];
|
||||
|
||||
//Kill-related functions
|
||||
DZAI_AI_killed_all = compile preprocessFileLineNumbers format ["%1\compile\ai_killed_all.sqf",DZAI_directory];
|
||||
DZAI_AI_killed_static = compile preprocessFileLineNumbers format ["%1\compile\ai_killed_static.sqf",DZAI_directory];
|
||||
DZAI_unitDeath = compile preprocessFileLineNumbers format ["%1\compile\ai_death.sqf",DZAI_directory];
|
||||
DZAI_countKills = compile preprocessFileLineNumbers format ["%1\compile\fn_countkills.sqf",DZAI_directory];
|
||||
|
||||
//Vehicle-related functions
|
||||
DZAI_hHandleDamage = compile preprocessFileLineNumbers format ["%1\compile\heli_handledamage.sqf",DZAI_directory];
|
||||
DZAI_vHandleDamage = compile preprocessFileLineNumbers format ["%1\compile\veh_handledamage.sqf",DZAI_directory];
|
||||
DZAI_airLanding = compile preprocessFileLineNumbers format ["%1\compile\heli_airlanding.sqf",DZAI_directory];
|
||||
DZAI_parachuteOut = compile preprocessFileLineNumbers format ["%1\compile\heli_parachute.sqf",DZAI_directory];
|
||||
DZAI_heliDestroyed = compile preprocessFileLineNumbers format ["%1\compile\heli_destroyed.sqf",DZAI_directory];
|
||||
DZAI_vehDestroyed = compile preprocessFileLineNumbers format ["%1\compile\veh_destroyed.sqf",DZAI_directory];
|
||||
DZAI_AI_killed_air = compile preprocessFileLineNumbers format ["%1\compile\ai_killed_air.sqf",DZAI_directory];
|
||||
DZAI_AI_killed_land = compile preprocessFileLineNumbers format ["%1\compile\ai_killed_land.sqf",DZAI_directory];
|
||||
DZAI_vehRegroup = compile preprocessFileLineNumbers format ["%1\compile\veh_regroup.sqf",DZAI_directory];
|
||||
|
||||
//Static AI functions
|
||||
if (DZAI_staticAI) then {
|
||||
fnc_spawnBandits = compile preprocessFileLineNumbers format ["%1\spawn_functions\spawnBandits.sqf",DZAI_directory];
|
||||
DZAI_spawnBandits_init = compile preprocessFileLineNumbers format ["%1\spawn_functions\spawnBandits_initialize.sqf",DZAI_directory];
|
||||
DZAI_static_spawn = compile preprocessFileLineNumbers format ["%1\compile\fn_createStaticSpawn.sqf",DZAI_directory];
|
||||
};
|
||||
|
||||
//Dynamic AI functions
|
||||
if (DZAI_dynAISpawns) then {
|
||||
DZAI_abortDynSpawn = compile preprocessFileLineNumbers format ["%1\compile\fn_abortdynspawn.sqf",DZAI_directory];
|
||||
fnc_spawnBandits_dynamic = compile preprocessFileLineNumbers format ["%1\spawn_functions\spawnBandits_dynamic.sqf",DZAI_directory];
|
||||
fnc_despawnBandits_dynamic = compile preprocessFileLineNumbers format ["%1\spawn_functions\despawnBandits_dynamic.sqf",DZAI_directory];
|
||||
DZAI_dyn_huntPlayer = compile preprocessFileLineNumbers format ["%1\compile\fn_seekPlayer.sqf",DZAI_directory];
|
||||
DZAI_AI_killed_dynamic = compile preprocessFileLineNumbers format ["%1\compile\ai_killed_dynamic.sqf",DZAI_directory];
|
||||
};
|
||||
|
||||
if (DZAI_maxRandomSpawns > 0) then {
|
||||
DZAI_createRandomSpawns = compile preprocessFileLineNumbers format ["%1\compile\createRandomSpawns.sqf",DZAI_directory];
|
||||
DZAI_abortRandSpawn = compile preprocessFileLineNumbers format ["%1\compile\fn_abortrandspawn.sqf",DZAI_directory];
|
||||
fnc_spawnBandits_random = compile preprocessFileLineNumbers format ["%1\spawn_functions\spawnBandits_random.sqf",DZAI_directory];
|
||||
fnc_despawnBandits_random = compile preprocessFileLineNumbers format ["%1\spawn_functions\despawnBandits_random.sqf",DZAI_directory];
|
||||
DZAI_AI_killed_random = compile preprocessFileLineNumbers format ["%1\compile\ai_killed_random.sqf",DZAI_directory];
|
||||
};
|
||||
|
||||
if (DZAI_findKiller) then {
|
||||
DZAI_huntKiller = compile preprocessFileLineNumbers format ["%1\compile\fn_findKiller.sqf",DZAI_directory];
|
||||
};
|
||||
|
||||
if ((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled}) then {
|
||||
//DZAI_updateSpawnMarker = compile preprocessFileLineNumbers format ["%1\compile\fn_refreshmarker.sqf",DZAI_directory];
|
||||
};
|
||||
|
||||
//Compile zombie aggro functions
|
||||
if (DZAI_zombieEnemy && {DZAI_weaponNoise}) then { // Optional Zed-to-AI aggro functions
|
||||
DZAI_aiFired = compile preprocessFileLineNumbers format ["%1\compile\ai_fired.sqf",DZAI_directory];
|
||||
DZAI_alertZombies = compile preprocessFileLineNumbers format ["%1\compile\ai_alertzombies.sqf",DZAI_directory];
|
||||
};
|
||||
|
||||
//Air/land vehicle patrol spawn scripts
|
||||
if ((DZAI_maxHeliPatrols > 0) or {DZAI_maxLandPatrols > 0}) then {
|
||||
DZAI_spawnVehiclePatrol = compile preprocessFileLineNumbers format ["%1\spawn_functions\spawnVehiclePatrol.sqf",DZAI_directory];
|
||||
//Helicopter patrol scripts
|
||||
if (DZAI_maxHeliPatrols > 0) then {
|
||||
DZAI_heliDetectPlayers = compile preprocessFileLineNumbers format ["%1\compile\heli_detectplayers.sqf",DZAI_directory];
|
||||
DZAI_heliRandomPatrol = compile preprocessFileLineNumbers format ["%1\compile\heli_randompatrol.sqf",DZAI_directory];
|
||||
if (DZAI_heliReinforceChance > 0) then {DZAI_heliReinforce = compile preprocessFileLineNumbers format ["%1\compile\heli_reinforce.sqf",DZAI_directory]};
|
||||
};
|
||||
//Land vehicle patrol scripts
|
||||
if (DZAI_maxLandPatrols > 0) then {
|
||||
DZAI_vehPatrol = compile preprocessFileLineNumbers format ["%1\compile\veh_randompatrol.sqf",DZAI_directory];
|
||||
};
|
||||
};
|
||||
|
||||
//AI skill-boosting function for last surviving AI unit.
|
||||
if (DZAI_lastManStanding) then {
|
||||
DZAI_skillBoost = compile preprocessFileLineNumbers format ["%1\compile\fn_skillboost.sqf",DZAI_directory];
|
||||
};
|
||||
|
||||
|
||||
//Miscellaneous functions
|
||||
//------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if (DZAI_radioMsgs) then {
|
||||
if (DZAI_clientRadio) then {
|
||||
DZAI_radioSend = {
|
||||
DZAI_SMS = (_this select 1);
|
||||
(owner (_this select 0)) publicVariableClient "DZAI_SMS";
|
||||
true
|
||||
};
|
||||
} else {
|
||||
DZAI_radioSend = {
|
||||
[nil,(_this select 0),"loc",rTITLETEXT,(_this select 1),"PLAIN DOWN",2] call RE;
|
||||
true
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (DZAI_deathMessages) then {
|
||||
DZAI_sendKillMessage = {
|
||||
private ["_killer","_victimName"];
|
||||
_killer = _this select 0;
|
||||
_victimName = _this select 1;
|
||||
{
|
||||
DZAI_killMSG = _victimName;
|
||||
(owner _x) publicVariableClient "DZAI_killMSG";
|
||||
} count (crew _killer);
|
||||
};
|
||||
};
|
||||
|
||||
DZAI_updGroupCount = {
|
||||
private ["_unitGroup","_isNewGroup"];
|
||||
_unitGroup = _this select 0;
|
||||
_isNewGroup = _this select 1;
|
||||
|
||||
if (isNull _unitGroup) exitWith {false};
|
||||
|
||||
if (_isNewGroup) then {
|
||||
DZAI_activeGroups = DZAI_activeGroups + [_unitGroup];
|
||||
} else {
|
||||
DZAI_activeGroups = DZAI_activeGroups - [_unitGroup];
|
||||
};
|
||||
true
|
||||
};
|
||||
|
||||
//DZAI group side assignment function. Detects when East side has too many groups, then switches to Resistance side.
|
||||
DZAI_createGroup = {
|
||||
private["_groupSide","_unitGroup"];
|
||||
_groupSide = (if (({(side _x) == east} count allGroups) < 141) then {
|
||||
east
|
||||
} else {
|
||||
//If there are 140 East groups, set West/Resistance hostility and assign a Resistance group instead.
|
||||
if ((resistance getFriend west) > 0) then {
|
||||
createCenter resistance;
|
||||
resistance setFriend [west,0];
|
||||
west setFriend [resistance,0];
|
||||
east setFriend [resistance, 1];
|
||||
resistance setFriend [east, 1];
|
||||
diag_log "DZAI Warning: Group maximum reached for East side! Modifying Resistance side for DZAI use. Recommend reducing amount of AI spawns.";
|
||||
};
|
||||
resistance
|
||||
});
|
||||
//diag_log format ["Assigned side %1 to AI group",_groupSide];
|
||||
|
||||
_unitGroup = createGroup _groupSide;
|
||||
[_unitGroup,true] call DZAI_updGroupCount;
|
||||
|
||||
_unitGroup
|
||||
};
|
||||
|
||||
//Sets skills for unit based on their weapongrade value.
|
||||
DZAI_setSkills = {
|
||||
private["_unit","_weapongrade","_skillArray"];
|
||||
_unit = _this select 0;
|
||||
_weapongrade = _this select 1;
|
||||
|
||||
_skillArray = missionNamespace getVariable ["DZAI_skill"+str(_weapongrade),DZAI_skill3];
|
||||
{
|
||||
_unit setskill [_x select 0,(((_x select 1) + random ((_x select 2)-(_x select 1))) min 1)];
|
||||
} forEach _skillArray;
|
||||
};
|
||||
|
||||
//Spawns flies on AI corpse
|
||||
DZAI_deathFlies = {
|
||||
private ["_soundFlies"];
|
||||
_soundFlies = createSoundSource ["Sound_Flies",ASLtoATL getPosASL _this,[],0];
|
||||
_soundFlies attachTo [_this,[0,0,0]];
|
||||
_this setVariable ["sound_flies",_soundFlies];
|
||||
waitUntil {sleep 5; (speed (vehicle _this)) == 0};
|
||||
_this enableSimulation false;
|
||||
};
|
||||
|
||||
//Combines two arrays and returns the combined array. Does not add duplicate values. Second array is appended to first array.
|
||||
DZAI_append = {
|
||||
if (((typeName (_this select 0)) != "ARRAY")&&((typeName (_this select 1)) != "ARRAY")) exitWith {diag_log "DZAI Error: DZAI_append function was not provided with two arrays!";};
|
||||
{
|
||||
if !(_x in (_this select 0)) then {
|
||||
(_this select 0) set [(count (_this select 0)),_x];
|
||||
};
|
||||
} forEach (_this select 1);
|
||||
|
||||
(_this select 0)
|
||||
};
|
||||
|
||||
DZAI_findLootPile = {
|
||||
private ["_lootPiles","_lootPos","_unitGroup","_searchRange"];
|
||||
_unitGroup = _this select 0;
|
||||
_searchRange = _this select 1;
|
||||
|
||||
_lootPiles = (getPosASL (leader _unitGroup)) nearObjects ["ReammoBox",_searchRange];
|
||||
if ((count _lootPiles) > 0) then {
|
||||
_lootPos = ASLtoATL getPosASL (_lootPiles call BIS_fnc_selectRandom2);
|
||||
if ((behaviour (leader _unitGroup)) != "AWARE") then {_unitGroup setBehaviour "AWARE"};
|
||||
(units _unitGroup) doMove _lootPos;
|
||||
{_x moveTo _lootPos} forEach (units _unitGroup);
|
||||
//diag_log format ["DEBUG :: AI group %1 is investigating a loot pile at %2.",_unitGroup,_lootPos];
|
||||
};
|
||||
};
|
||||
|
||||
//Prevents object from being destroyed/deleted from DayZ's anti-hacker check
|
||||
DZAI_protectObject = {
|
||||
private ["_objectMonitor","_object"];
|
||||
_object = _this;
|
||||
|
||||
_objectMonitor = missionNamespace getVariable [DZAI_serverObjectMonitor,[]];
|
||||
_objectMonitor set [count _objectMonitor,_object];
|
||||
DZAI_monitoredObjects set [count DZAI_monitoredObjects,_object];
|
||||
_object setVariable ["ObjectID","1"];
|
||||
_object setVariable ["ObjectUID","1"];
|
||||
|
||||
true
|
||||
};
|
||||
|
||||
DZAI_getWeapongrade = {
|
||||
private ["_indexWeighted"];
|
||||
|
||||
_indexWeighted = call {
|
||||
if (_this == 0) exitWith {DZAI_gradeIndices0};
|
||||
if (_this == 1) exitWith {DZAI_gradeIndices1};
|
||||
if (_this == 2) exitWith {DZAI_gradeIndices2};
|
||||
if (_this == 3) exitWith {DZAI_gradeIndices3};
|
||||
if (_this == 4) exitWith {DZAI_gradeIndicesDyn};
|
||||
DZAI_gradeIndices1
|
||||
};
|
||||
|
||||
DZAI_weaponGrades select (_indexWeighted call BIS_fnc_selectRandom2)
|
||||
};
|
||||
|
||||
DZAI_spawn_vehicle = {
|
||||
if ((getMarkerColor (_this select 0)) == "") exitWith {diag_log format ["DZAI Error: Unable to find provided marker %1 to spawn AI vehicle.",(_this select 0)]};
|
||||
if (!([(_this select 1),"vehicle"] call DZAI_checkClassname)) exitWith {diag_log format ["DZAI Error: Provided vehicle classname %1 is a banned or nonexistent classname.",(_this select 1)]};
|
||||
if ((typeName (_this select 2)) != "ARRAY") then {_this set [2,[3,3]]};
|
||||
if (!((_this select 3) in DZAI_weaponGradesAll)) then {_this set [3,1]};
|
||||
DZAI_customSpawnQueue set [(count DZAI_customSpawnQueue),_this];
|
||||
};
|
||||
|
||||
DZAI_protectGroup = {
|
||||
private ["_dummy"]; //_this = group
|
||||
|
||||
_dummy = _this createUnit ["Logic",[0,0,0],[],0,"FORM"];
|
||||
[_dummy] joinSilent _this;
|
||||
_dummy disableAI "MOVE";
|
||||
_dummy setVariable ["unconscious",true];
|
||||
if ((behaviour _dummy) != "AWARE") then {_this setBehaviour "AWARE"};
|
||||
_this setVariable ["dummyUnit",_dummy];
|
||||
|
||||
if (DZAI_debugLevel > 1) then {diag_log format["DZAI Extended Debug: Spawned 1 dummy AI unit to preserve group %1.",_this];};
|
||||
|
||||
_dummy
|
||||
};
|
||||
|
||||
DZAI_addTempNVG = {
|
||||
_this addWeapon "NVGoggles";
|
||||
//_this addEventHandler ["Killed",{(_this select 0) removeWeapon "NVGoggles"; (_this select 0) removeAllEventHandlers "Killed";}];
|
||||
_this setVariable ["removeNVG",true];
|
||||
|
||||
true
|
||||
};
|
||||
|
||||
DZAI_respawnAIVehicle = {
|
||||
//Usage: [_unitGroup,_vehicle] call DZAI_respawnAIVehicle;
|
||||
private ["_vehicle","_unitType"];
|
||||
_unitType = (_this select 0) getVariable ["unitType",""];
|
||||
_vehicle = _this select 1;
|
||||
call {
|
||||
if (_unitType in ["aircustom","landcustom"]) exitWith {
|
||||
private ["_spawnParams"];
|
||||
_spawnParams = (_this select 0) getVariable ["spawnParams",false];
|
||||
if (_spawnParams select 4) then {
|
||||
[1,_spawnParams] call fnc_respawnHandler;
|
||||
};
|
||||
if (_vehicle isKindOf "Air") then {DZAI_curHeliPatrols = DZAI_curHeliPatrols - 1} else {DZAI_curLandPatrols = DZAI_curLandPatrols - 1};
|
||||
};
|
||||
if (_unitType in ["air","land"]) exitWith {
|
||||
[2,typeOf _vehicle] call fnc_respawnHandler;
|
||||
if (_vehicle isKindOf "Air") then {DZAI_curHeliPatrols = DZAI_curHeliPatrols - 1} else {DZAI_curLandPatrols = DZAI_curLandPatrols - 1};
|
||||
};
|
||||
};
|
||||
_vehicle setVariable ["DZAI_deathTime",diag_tickTime]; //mark vehicle for cleanup
|
||||
|
||||
true
|
||||
};
|
||||
|
||||
DZAI_updateSpawnCount = {
|
||||
private ["_trigger","_arrayString","_triggerArray"];
|
||||
_trigger = _this select 0;
|
||||
_arrayString = _this select 1;
|
||||
|
||||
_triggerArray = missionNamespace getVariable [_arrayString,[]];
|
||||
if (!isNull _trigger) then {
|
||||
if (_trigger in _triggerArray) then {
|
||||
_triggerArray = _triggerArray - [_trigger];
|
||||
} else {
|
||||
if ((triggerStatements _trigger select 1) == "") then {
|
||||
_triggerArray set [count _triggerArray,_trigger];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_triggerArray = _triggerArray - [objNull];
|
||||
missionNamespace setVariable [_arrayString,_triggerArray];
|
||||
};
|
||||
|
||||
DZAI_deleteGroup = {
|
||||
private ["_groupManager"];
|
||||
|
||||
[_this,false] call DZAI_updGroupCount;
|
||||
|
||||
{
|
||||
if (alive _x) then {
|
||||
deleteVehicle _x;
|
||||
} else {
|
||||
[_x] joinSilent grpNull;
|
||||
};
|
||||
} count (units _this);
|
||||
deleteGroup _this;
|
||||
|
||||
true
|
||||
};
|
||||
|
||||
DZAI_chance = {
|
||||
private ["_result"];
|
||||
_result = ((random 1) < _this);
|
||||
|
||||
_result
|
||||
};
|
||||
|
||||
|
||||
DZAI_addMapMarker = {
|
||||
private ["_mapMarkerArray","_objectString"];
|
||||
_mapMarkerArray = missionNamespace getVariable ["DZAI_mapMarkerArray",[]];
|
||||
_objectString = str (_this);
|
||||
if !(_objectString in _mapMarkerArray) then { //Determine if marker is new
|
||||
if ((getMarkerColor _objectString) == "") then {
|
||||
private ["_marker"];
|
||||
_marker = createMarker [_objectString, (getPosASL _this)];
|
||||
_marker setMarkerType "Defend";
|
||||
_marker setMarkerBrush "Solid";
|
||||
};
|
||||
_mapMarkerArray set [(count _mapMarkerArray),_objectString];
|
||||
missionNamespace setVariable ["DZAI_mapMarkerArray",_mapMarkerArray];
|
||||
};
|
||||
if (_this isKindOf "EmptyDetector") then { //Set marker as active
|
||||
_objectString setMarkerText "STATIC TRIGGER (ACTIVE)";
|
||||
_objectString setMarkerColor "ColorRed";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
diag_log "[DZAI] DZAI functions compiled.";
|
189
@DayZ_Epoch_Server/addons/dayz_server/DZAI/init/dzai_initserver.sqf
Executable file
189
@DayZ_Epoch_Server/addons/dayz_server/DZAI/init/dzai_initserver.sqf
Executable file
@ -0,0 +1,189 @@
|
||||
/*
|
||||
DZAI Server Initialization File
|
||||
|
||||
Description: Handles startup process for DZAI. Does not contain any values intended for modification.
|
||||
*/
|
||||
private ["_startTime","_directoryAsArray","_worldname","_allUnits"];
|
||||
|
||||
if (!isServer || !isNil "DZAI_isActive") exitWith {};
|
||||
DZAI_isActive = true;
|
||||
|
||||
_startTime = diag_tickTime;
|
||||
|
||||
_directoryAsArray = toArray __FILE__;
|
||||
_directoryAsArray resize ((count _directoryAsArray) - 25);
|
||||
DZAI_directory = toString _directoryAsArray;
|
||||
if (isNil "_this") then {_this = []};
|
||||
if ((count _this) > 0) then {
|
||||
//diag_log "DEBUG :: Startup parameters found!";
|
||||
if ("readoverridefile" in _this) then {DZAI_overrideEnabled = true} else {DZAI_overrideEnabled = nil};
|
||||
if ("enabledebugmarkers" in _this) then {DZAI_debugMarkersEnabled = true} else {DZAI_debugMarkersEnabled = nil};
|
||||
} else {
|
||||
//diag_log "DEBUG :: Startup parameters not found!";
|
||||
DZAI_overrideEnabled = nil;
|
||||
DZAI_debugMarkersEnabled = nil;
|
||||
};
|
||||
|
||||
//Report DZAI version to RPT log
|
||||
#include "DZAI_version.txt"
|
||||
diag_log format ["[DZAI] Initializing %1 version %2 using base path %3.",DZAI_TYPE,DZAI_VERSION,DZAI_directory];
|
||||
|
||||
//Load DZAI main configuration file
|
||||
call compile preprocessFileLineNumbers format ["%1\init\dzai_config.sqf",DZAI_directory];
|
||||
|
||||
//Load custom DZAI settings file.
|
||||
if ((!isNil "DZAI_overrideEnabled") && {DZAI_overrideEnabled}) then {call compile preprocessFileLineNumbers format ["%1\DZAI_settings_override.sqf",DZAI_directory]};
|
||||
|
||||
//Load DZAI functions
|
||||
call compile preprocessFileLineNumbers format ["%1\init\dzai_functions.sqf",DZAI_directory];
|
||||
|
||||
//Set side relations
|
||||
_allUnits = +allUnits;
|
||||
if (({(side _x) == west} count _allUnits) == 0) then {createCenter west};
|
||||
if (({(side _x) == east} count _allUnits) == 0) then {createCenter east};
|
||||
east setFriend [west, 0];
|
||||
west setFriend [east, 0];
|
||||
|
||||
//Detect DayZ mod variant and version being used.
|
||||
if (isNil "DZAI_modName") then {DZAI_modName = "Default"};
|
||||
if (isNil "DZAI_modVersion") then {DZAI_modVersion = toLower (getText (configFile >> "CfgMods" >> "DayZ" >> "version"))};
|
||||
if (isNil "DZAI_modAutoDetect") then {DZAI_modAutoDetect = true};
|
||||
|
||||
if (DZAI_modAutoDetect) then {
|
||||
private["_modVariant"];
|
||||
_modVariant = toLower (getText (configFile >> "CfgMods" >> "DayZ" >> "dir"));
|
||||
if (DZAI_debugLevel > 0) then {diag_log format ["DZAI Debug: Detected mod variant %1.",_modVariant];};
|
||||
DZAI_modName = call {
|
||||
if (_modVariant == "@dayz_epoch") exitWith {"epoch"};
|
||||
if ((isClass (configFile >> "CfgWeapons" >> "ItemHatchet")) && {isClass (configFile >> "CfgWeapons" >> "ItemMatchbox")}) exitWith {"epoch"};
|
||||
if (_modVariant in ["dayzoverwatch","@dayzoverwatch"]) exitWith {"overwatch"};
|
||||
if (_modVariant == "@dayzhuntinggrounds") exitWith {"huntinggrounds"};
|
||||
if (_modVariant == "@dayzunleashed") exitWith {"unleashed"};
|
||||
if ((_modVariant == "dayzlingor") && {(toLower (getText (configFile >> "CfgMods" >> "DayZ" >> "action"))) == "http://www.skaronator.com"}) exitWith {"lingorskaro"};
|
||||
""
|
||||
};
|
||||
};
|
||||
|
||||
//Create reference marker to act as boundary for spawning AI air/land vehicles. These values will be later modified on a per-map basis.
|
||||
if (isNil "DZAI_maxHeliPatrols") then {DZAI_maxHeliPatrols = 0};
|
||||
if (isNil "DZAI_maxLandPatrols") then {DZAI_maxLandPatrols = 0};
|
||||
_centerPos = getMarkerPos 'center';
|
||||
_markerSize = [7000, 7000];
|
||||
_centerMarker = createMarker ["DZAI_centerMarker", _centerPos];
|
||||
_centerMarker setMarkerShape "ELLIPSE";
|
||||
_centerMarker setMarkerType "Empty";
|
||||
_centerMarker setMarkerBrush "Solid";
|
||||
_centerMarker setMarkerAlpha 0;
|
||||
|
||||
_worldname = (toLower worldName);
|
||||
call {
|
||||
if (_worldname == "caribou") exitWith {
|
||||
_centerPos = [3938.9722, 4195.7417];
|
||||
_markerSize = [3500, 3500];
|
||||
};
|
||||
if (_worldname == "chernarus") exitWith {
|
||||
_centerPos = [7652.9634, 7870.8076];
|
||||
_markerSize = [5500, 5500];
|
||||
};
|
||||
if (_worldname == "cmr_ovaron") exitWith {
|
||||
//Proper values needed
|
||||
};
|
||||
if (_worldname == "fallujah") exitWith {
|
||||
_centerPos = [5139.8008, 4092.6797];
|
||||
_markerSize = [4000, 4000];
|
||||
};
|
||||
if (_worldname == "fdf_isle1_a") exitWith {
|
||||
_centerPos = [10771.362, 8389.2568];
|
||||
_markerSize = [2750, 2750];
|
||||
};
|
||||
if (_worldname == "isladuala") exitWith {
|
||||
_centerPos = [4945.3438, 4919.6616];
|
||||
_markerSize = [4000, 4000];
|
||||
};
|
||||
if (_worldname == "lingor") exitWith {
|
||||
_centerPos = [5166.5581, 5108.8301];
|
||||
_markerSize = [4500, 4500];
|
||||
};
|
||||
if (_worldname == "mbg_celle2") exitWith {
|
||||
_centerPos = [6163.52, 6220.3984];
|
||||
_markerSize = [6000, 6000];
|
||||
};
|
||||
if (_worldname == "namalsk") exitWith {
|
||||
_centerPos = [5880.1313, 8889.1045];
|
||||
_markerSize = [3000, 3000];
|
||||
};
|
||||
if (_worldname == "napf") exitWith {
|
||||
_centerPos = [10725.096, 9339.918];
|
||||
_markerSize = [8500, 8500];
|
||||
};
|
||||
if (_worldname == "oring") exitWith {
|
||||
_centerPos = [5191.1069, 5409.1938];
|
||||
_markerSize = [4750, 4750];
|
||||
};
|
||||
if (_worldname == "panthera2") exitWith {
|
||||
_centerPos = [5343.6953, 4366.2534];
|
||||
_markerSize = [3500, 3500];
|
||||
};
|
||||
if (_worldname == "sara") exitWith {
|
||||
_centerPos = [12693.104, 11544.386];
|
||||
_markerSize = [6250, 6250];
|
||||
};
|
||||
if (_worldname == "sauerland") exitWith {
|
||||
_centerPos = [12270.443, 13632.132];
|
||||
_markerSize = [17500, 17500];
|
||||
};
|
||||
if (_worldname == "takistan") exitWith {
|
||||
_centerPos = [6368.2764, 6624.2744];
|
||||
_markerSize = [6000, 6000];
|
||||
};
|
||||
if (_worldname == "tavi") exitWith {
|
||||
_centerPos = [10887.825, 11084.657];
|
||||
_markerSize = [8500, 8500];
|
||||
};
|
||||
if (_worldname == "trinity") exitWith {
|
||||
_centerPos = [7183.8403, 7067.4727];
|
||||
_markerSize = [5250, 5250];
|
||||
};
|
||||
if (_worldname == "utes") exitWith {
|
||||
_centerPos = [3519.8037, 3703.0649];
|
||||
_markerSize = [1000, 1000];
|
||||
};
|
||||
if (_worldname == "zargabad") exitWith {
|
||||
_centerPos = [3917.6201, 3800.0376];
|
||||
_markerSize = [2000, 2000];
|
||||
};
|
||||
if ((_centerPos distance [0,0,0]) < 5) then {
|
||||
_centerPos = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");
|
||||
};
|
||||
};
|
||||
_centerMarker setMarkerPos _centerPos;
|
||||
_centerMarker setMarkerSize _markerSize;
|
||||
|
||||
//Load map-specific configuration file. Config files contain trigger/marker information, addition and removal of items/skins, and/or other variable customizations.
|
||||
//Classname files will overwrite basic settings specified in base_classnames.sqf
|
||||
if (_worldname in ["chernarus","utes","zargabad","fallujah","takistan","tavi","lingor","namalsk","mbg_celle2","oring","panthera2","isladuala","sara","smd_sahrani_a2","trinity","napf","caribou","cmr_ovaron","sauerland","fdf_isle1_a","caribou"]) then {
|
||||
if (DZAI_modAutoDetect) then {
|
||||
if (DZAI_modName in ["epoch","unleashed","overwatch","huntinggrounds"]) then {
|
||||
call compile preprocessFileLineNumbers format ["%1\init\world_classname_configs\dayz_%2.sqf",DZAI_directory,DZAI_modName];
|
||||
} else {
|
||||
call compile preprocessFileLineNumbers format ["%1\init\world_classname_configs\default_classnames\%2.sqf",DZAI_directory,_worldname];
|
||||
};
|
||||
};
|
||||
[] execVM format ["%1\init\world_spawn_configs\world_%2.sqf",DZAI_directory,_worldname];
|
||||
} else {
|
||||
if (DZAI_modAutoDetect) then {
|
||||
if (DZAI_modName == "epoch") then {
|
||||
call compile preprocessFileLineNumbers format ["%1\init\world_classname_configs\dayz_epoch_classnames.sqf",DZAI_directory];
|
||||
};
|
||||
};
|
||||
if (DZAI_staticAI) then {[] execVM format ["%1\scripts\setup_autoStaticSpawns.sqf",DZAI_directory];};
|
||||
};
|
||||
|
||||
//Continue loading required DZAI script files
|
||||
[] execVM format ['%1\scripts\DZAI_startup.sqf',DZAI_directory];
|
||||
|
||||
//Report DZAI startup settings to RPT log
|
||||
diag_log format ["[DZAI] DZAI settings: Debug Level: %1. DebugMarkers: %2. WorldName: %3. ModName: %4 (Ver: %5). DZAI_dynamicWeaponList: %6. VerifyTables: %7.",DZAI_debugLevel,((!isNil "DZAI_debugMarkersEnabled") && {DZAI_debugMarkersEnabled}),_worldname,DZAI_modName,DZAI_modVersion,DZAI_dynamicWeaponList,DZAI_verifyTables];
|
||||
diag_log format ["[DZAI] AI spawn settings: Static: %1. Dynamic: %2. Random: %3. Air: %4. Land: %5.",DZAI_staticAI,DZAI_dynAISpawns,(DZAI_maxRandomSpawns > 0),(DZAI_maxHeliPatrols>0),(DZAI_maxLandPatrols>0)];
|
||||
diag_log format ["[DZAI] AI settings: DZAI_findKiller: %1. DZAI_useHealthSystem: %2. DZAI_weaponNoise: %3. DZAI_zombieEnemy: %4.",DZAI_findKiller,DZAI_useHealthSystem,DZAI_weaponNoise,DZAI_zombieEnemy];
|
||||
diag_log format ["[DZAI] DZAI loading completed in %1 seconds.",(diag_tickTime - _startTime)];
|
@ -0,0 +1,16 @@
|
||||
Explanation for world_classname_configs directory
|
||||
-----------------------------------
|
||||
|
||||
If DZAI_modAutoDetect is enabled in dzai_config.sqf, DZAI will automatically detect if one of the following DayZ mods is active and load additional classnames for skins, weapons, and/or other items:
|
||||
|
||||
- DayZ Epoch (dayz_epoch.sqf)
|
||||
- DayZ Hunting Grounds (dayz_huntinggrounds.sqf)
|
||||
- DayZ Overwatch (dayz_overwatch.sqf)
|
||||
- DayZ Unleashed (dayz_unleashed.sqf)
|
||||
|
||||
Tips:
|
||||
1. If none of the above mods are detected, one of the .sqf files in the default_classnames folder will be read instead, depending on which map is being used.
|
||||
2. If combinations of the above mods are loaded, the last mod in the load order will determine which mod is detected by DZAI.
|
||||
3. The classnames specified in dzai_config.sqf are always loaded first and may be modified or overwritten later if DZAI_modAutoDetect is enabled.
|
||||
4. If fully manual control over classname configuration is wanted, set DZAI_modAutoDetect to false in dzai_config.sqf.
|
||||
With DZAI_modAutoDetect set to false, dzai_config.sqf will be the only source of classname information used by DZAI.
|
@ -0,0 +1,27 @@
|
||||
/*
|
||||
DayZ Epoch configuration
|
||||
|
||||
Description: Adds DayZ Epoch-specific items to DZAI loot tables if Epoch mode is on.
|
||||
|
||||
Last updated: 5:10 PM 9/8/2013
|
||||
|
||||
*/
|
||||
|
||||
DZAI_metalBars = [["ItemSilverBar",0.15],["ItemSilverBar10oz",0.10],["ItemGoldBar",0.075],["ItemGoldBar10oz",0.035]]; //Format: [["Bar1Classname",Bar1Chance],["Bar2Classname",Bar2Chance],["Bar2Classname",Bar2Chance]]
|
||||
DZAI_metalBarNum = 2; //Maximum number of metal bars to generate
|
||||
|
||||
DZAI_banditTypesNew = ["Bandit1_DZ","BanditW1_DZ","BanditW2_DZ","Camo1_DZ","Sniper1_DZ","Soldier1_DZ","Survivor2_DZ","SurvivorW2_DZ","GUE_Soldier_MG_DZ","GUE_Soldier_Sniper_DZ","GUE_Soldier_Crew_DZ","GUE_Soldier_2_DZ","RU_Policeman_DZ","Pilot_EP1_DZ","Haris_Press_EP1_DZ","Ins_Soldier_GL_DZ","GUE_Commander_DZ","Functionary1_EP1_DZ","Priest_DZ","Rocker1_DZ","Rocker2_DZ","Rocker3_DZ","Rocker4_DZ","TK_INS_Warlord_EP1_DZ","TK_INS_Soldier_EP1_DZ","Soldier_Sniper_PMC_DZ","Soldier_TL_PMC_DZ","FR_OHara_DZ","FR_Rodriguez_DZ","CZ_Soldier_Sniper_EP1_DZ","Graves_Light_DZ","Bandit2_DZ","SurvivorWcombat_DZ","CZ_Special_Forces_GL_DES_EP1_DZ","Soldier_Bodyguard_AA12_PMC_DZ","GUE_Soldier_CO_DZ"];
|
||||
DZAI_ediblesNew = ["ItemSodaRabbit","ItemSodaMtngreen","ItemSodaClays","ItemSodaSmasht","ItemSodaDrwaste","ItemSodaLemonade","ItemSodaLvg","ItemSodaMzly","FoodBioMeat","FoodCanGriff","FoodCanBadguy","FoodCanBoneboy","FoodCanCorn","FoodCanCurgon","FoodCanDemon","FoodCanFraggleos","FoodCanHerpy","FoodCanOrlok","FoodCanPowell","FoodCanTylers","FoodPumpkin","FoodSunFlowerSeed"];
|
||||
DZAI_MiscItemSNew = ["ItemZombieParts"];
|
||||
|
||||
DZAI_Backpacks0New = ["TerminalPack_DZE1"]; //Added: DZ_TerminalPack_EP1
|
||||
DZAI_Backpacks1New = ["TerminalPack_DZE1", "CompactPack_DZE1"]; //Added: DZ_TerminalPack_EP1, DZ_CompactPack_EP1
|
||||
DZAI_Backpacks2New = ["CompactPack_DZE1","GunBag_DZE1"]; //Added: DZ_CompactPack_EP1, DZ_GunBag_EP1
|
||||
DZAI_Backpacks3New = ["GunBag_DZE1","LargeGunBag_DZE1"]; //Added: DZ_GunBag_EP1, DZ_LargeGunBag_EP1
|
||||
|
||||
//Do not edit below lines. Replaces standard hatchet and matchbox classnames with Epoch versions.
|
||||
(DZAI_tools0 select 3) set [0,"ItemHatchet"];
|
||||
(DZAI_tools0 select 7) set [0,"ItemMatchbox"];
|
||||
(DZAI_tools1 select 3) set [0,"ItemHatchet"];
|
||||
(DZAI_tools1 select 7) set [0,"ItemMatchbox"];
|
||||
diag_log "[DZAI] Epoch classnames loaded.";
|
@ -0,0 +1,13 @@
|
||||
/*
|
||||
DayZ Hunting Grounds Classname Configuration
|
||||
|
||||
Last updated: 10:50 AM 9/14/2013
|
||||
|
||||
*/
|
||||
|
||||
DZAI_BanditTypesNew = ["Gangman_Blue_DZ","Gangman_Red_DZ","HuntingGrounds1_DZ","HuntingGrounds2_DZ","HuntingGrounds3_DZ","HuntingGrounds4_DZ","HuntingGrounds5_DZ","HuntingGrounds6_DZ","HuntingGrounds7_DZ","SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Camo1_DZ","BanditW1_DZ","Bandit1_DZ","Bandit2_DZ","Bandit3_DZ"];
|
||||
DZAI_Backpacks1New = ["DZ_TerminalPack_EP1"]; //Tier 1 backpacks
|
||||
DZAI_Backpacks2New = ["DZ_GunBag_EP1","DZ_LargeGunBag_EP1"]; //Tier 2 backpacks
|
||||
DZAI_Backpacks3New = ["DZ_GunBag_EP1","DZ_LargeGunBag_EP1"]; //Tier 3 backpacks
|
||||
|
||||
diag_log "[DZAI] DayZ Hunting Grounds classnames loaded.";
|
@ -0,0 +1,10 @@
|
||||
/*
|
||||
DayZ Overwatch Classname Configuration
|
||||
|
||||
Last updated: 10:48 AM 9/14/2013
|
||||
|
||||
*/
|
||||
|
||||
DZAI_BanditTypesNew = ["SurvivorW2_DZ","Survivor2_DZ","Sniper1_DZ","Sniper2_DZ","Sniper3_DZ","Sniper4_DZ","Sniper5_DZ","Sniper6_DZ","Soldier1_DZ","Camo1_DZ","Camo2_DZ","Camo3_DZ","Camo4_DZ","Camo5_DZ","Camo6_DZ","Camo7_DZ","Camo8_DZ","Camo9_DZ","Camo10_DZ","Camo11_DZ","Camo12_DZ","Camo13_DZ","Camo14_DZ","Camo15_DZ","Camo16_DZ","Camo17_DZ","Camo18_DZ","Camo19_DZ","Camo20_DZ","Camo21_DZ","Camo22_DZ","Camo23_DZ","Camo24_DZ","BanditW1_DZ","Bandit1_DZ"];
|
||||
|
||||
diag_log "DayZ Overwatch classnames loaded.";
|
@ -0,0 +1,10 @@
|
||||
/*
|
||||
Napf Classname Configuration
|
||||
|
||||
Last updated: 9:09 PM 1/23/2014
|
||||
|
||||
*/
|
||||
|
||||
DZAI_BanditTypesNew = ["BRT_Commander_DZ", "BRT_Officer_DZ", "BRT_Pilot_DZ", "BRT_Scout_DZ", "BRT_Looter_DZ", "BRT_Grunt_DZ"];
|
||||
|
||||
diag_log "[DZAI] DayZ Unleashed classnames loaded.";
|
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Caribou Classname Configuration
|
||||
|
||||
Last updated: 9:09 PM 1/23/2014
|
||||
|
||||
*/
|
||||
|
||||
diag_log "[DZAI] Caribou classnames loaded.";
|
@ -0,0 +1,8 @@
|
||||
/*
|
||||
DayZ (Default) Classname Configuration
|
||||
|
||||
Last updated: 10:47 AM 9/14/2013
|
||||
|
||||
*/
|
||||
|
||||
diag_log "DayZ (Default) classnames loaded.";
|
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Ovaron Classname Configuration
|
||||
|
||||
Last updated: 9:09 PM 1/23/2014
|
||||
|
||||
*/
|
||||
|
||||
diag_log "[DZAI] Ovaron classnames loaded.";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
Fallujah Classname Configuration
|
||||
|
||||
Last updated:
|
||||
|
||||
*/
|
||||
|
||||
diag_log "[DZAI] Fallujah classnames loaded.";
|
||||
|
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Podagorsk Classname Configuration
|
||||
|
||||
Last updated: 9:09 PM 1/23/2014
|
||||
|
||||
*/
|
||||
|
||||
diag_log "[DZAI] Podagorsk classnames loaded.";
|
@ -0,0 +1,8 @@
|
||||
/*
|
||||
Isladuala Classname Configuration
|
||||
|
||||
Last updated:
|
||||
|
||||
*/
|
||||
|
||||
diag_log "[DZAI] Isladuala classnames loaded.";
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user