This commit is contained in:
fallingsheep 2015-02-15 10:38:24 +11:00
parent 8b85a7555f
commit 1abf4508ee
37 changed files with 0 additions and 9304 deletions

View File

@ -1,22 +0,0 @@
==========================================================================================================================
CHANGE LOG:
-Added Spawn Players OnMap click, (OpFor, BluFor)
-Added Teleport to me Function.
Future Changes:
-We will just move on from here, Please if you have suggestions for the menu add me on skype: fusionquinny!
==========================================================================================================================
Hello, Thanks for downloading my tool! All Feedback is welcome on my fourm post over at Armaholic (http://www.armaholic.com/forums.php?m=posts&p=155485#155485)
==========================================================================================================================
==========================================================================================================================
Please all I ask is that you do NOT abuse this, Do NOT take credit for this, and please if possible give me credit somewhere in the mission!
Thanks,
Fusion
==========================================================================================================================
==========================================================================================================================

View File

@ -1,6 +0,0 @@
waituntil {!alive player ; !isnull (finddisplay 46)};
if ((getPlayerUID player) in [ADMIN_LIST]) then {
;
act = player addaction [("<t color=""#0074E8"">" + ("Admin Menu") +"</t>"),"adminmenu\tools.sqf","",5,false,true,"",""];
};

View File

@ -1,2 +0,0 @@
cutText ["Marker for current spawns Deleted, Select a new one", "PLAIN"];
deleteMarker 'bluspawner';

View File

@ -1,2 +0,0 @@
cutText ["Marker for current spawns Deleted, Select a new one", "PLAIN"];
deleteMarker 'spawnop';

View File

@ -1 +0,0 @@
onMapSingleClick {createMarker ["spawnop", _pos];};

View File

@ -1 +0,0 @@
grp = [getMarkerPos "spawnop", east, ["O_Soldier_lite_F", "O_Soldier_lite_F", "O_Soldier_lite_F", "O_Soldier_lite_F", "O_Soldier_lite_F"],[], ["SERGEANT", "PRIVATE", "PRIVATE", "PRIVATE", "PRIVATE"],[0.3,0.1,0.1,0.1,0.1],[],[],round (random 360)] call BIS_fnc_spawnGroup; null=[grp,(getMarkerPos "spawnop"),500]

View File

@ -1 +0,0 @@
onMapSingleClick {createMarker ["bluspawner", _pos];};

View File

@ -1 +0,0 @@
grp = [getMarkerPos "bluspawner", west, ["B_Soldier_F", "B_Soldier_F", "B_Soldier_F", "B_Soldier_F", "B_Soldier_F"],[], ["SERGEANT", "PRIVATE", "PRIVATE", "PRIVATE", "PRIVATE"],[0.3,0.1,0.1,0.1,0.1],[],[],round (random 360)] call BIS_fnc_spawnGroup; null=[grp,(getMarkerPos "bluspawner"),500]

View File

@ -1,95 +0,0 @@
_pathtotools = "adminmenu\tools\";
_pathtoweapon = "adminmenu\weapons\";
_pathtovehicles = "adminmenu\veh\";
_pathtosoldier= "adminmenu\spawn\";
_EXECscript1 = 'player execVM "'+_pathtotools+'%1"';
_EXECscript3 = 'player execVM "'+_pathtoweapon+'%1"';
_EXECscript5 = 'player execVM "'+_pathtovehicles+'%1"';
_EXECscript6 = 'player execVM "'+_pathtosoldier+'%1"';
if ((getPlayerUID player) in ["76561198083039115"]) then { //all admins
if ((getPlayerUID player) in ["76561198083039115"]) then { //Admins Go Here aswell
adminmenu =
[
["Fusions Menu",true],
["Tools", [4], "#USER:ToolsMenu", -5, [["expression", ""]], "1", "1"],
["Cars", [4], "#USER:VehicleMenu", -5, [["expression", ""]], "1", "1"],
["Weapons", [5], "#USER:WeaponMenu", -5, [["expression", ""]], "1", "1"],
["Spawn Groups", [5], "#USER:Soldier", -5, [["expression", ""]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];};
} else {
adminmenu =
[
["",true],
//["Toggle Debug", [2], "", -5, [["expression", format[_execdebug,"playerstats.sqf"]]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];};
ToolsMenu =
[
["Tools",true],
["Teleport", [2], "", -5, [["expression", format[_EXECscript1,"teleport.sqf"]]], "1", "1"],
["Teleport Player To Me", [3], "", -5, [["expression", format[_EXECscript1,"tptome.sqf"]]], "1", "1"],
["God Mode", [4], "", -5, [["expression", format[_EXECscript1,"god.sqf"]]], "1", "1"],
["Car God Mode", [5], "", -5, [["expression", format[_EXECscript1,"cargod.sqf"]]], "1", "1"],
["Heal Self", [6], "", -5, [["expression", format[_EXECscript1,"heal.sqf"]]], "1", "1"],
["Heal Player(s)", [7], "", -5, [["expression", format[_EXECscript1,"healp.sqf"]]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
WeaponMenu =
[
["Weapons",true],
//Add Weapons Here Gave some examples :D
["MX", [2], "", -5, [["expression", format[_EXECscript3,"mx.sqf"]]], "1", "1"],
["MK 200", [3], "", -5, [["expression", format[_EXECscript3,"mk200.sqf"]]], "1", "1"],
["LRR", [4], "", -5, [["expression", format[_EXECscript3,"lrr.sqf"]]], "1", "1"],
["EBR", [5], "", -5, [["expression", format[_EXECscript3,"ebr.sqf"]]], "1", "1"],
["GM6", [6], "", -5, [["expression", format[_EXECscript3,"gm6.sqf"]]], "1", "1"],
["P07", [7], "", -5, [["expression", format[_EXECscript3,"phgun.sqf"]]], "1", "1"],
["Next page", [12], "#USER:WeaponMenu2", -5, [["expression", ""]], "1", "1"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
WeaponMenu2 =
[
["Weapons 2",true],
//Add Weapons Here Gave another page because it could get a little confusing :P
["MX", [2], "", -5, [["expression", format[_EXECscript3,"mx.sqf"]]], "1", "1"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
VehicleMenu =
[
["Vehicles",true],
["ATV", [2], "", -5, [["expression", format[_EXECscript5,"ATV.sqf"]]], "1", "1"],
["Hunter Armed", [3], "", -5, [["expression", format[_EXECscript5,"hunter.sqf"]]], "1", "1"],
["Offroad Truck HMG .50", [4], "", -5, [["expression", format[_EXECscript5,"offroad.sqf"]]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Next page", [12], "#USER:VehicleMenu2", -5, [["expression", ""]], "1", "1"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
VehicleMenu2 =
[
["Vehicles 2",true],
["Example", [2], "", -5, [["expression", format[_EXECscript5,"Example.sqf"]]], "1", "1"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
Soldier =
[
["Spawner", true],
["Select Spawn Position (OpFor)", [2], "", -5, [["expression", format[_EXECscript6,"east.sqf"]]], "1", "1"],
["Delete Previous Spawn Area (OpFor)", [3], "", -5, [["expression", format[_EXECscript6,"deleteop.sqf"]]], "1", "1"],
["Spawn(OpFor)", [4], "", -5, [["expression", format[_EXECscript6,"eastsp.sqf"]]], "1", "1"],
["Select Spawn Position (BluFor)", [5], "", -5, [["expression", format[_EXECscript6,"west.sqf"]]], "1", "1"],
["Delete Previous Spawn Area (BluFor)", [6], "", -5, [["expression", format[_EXECscript6,"deletebl.sqf"]]], "1", "1"],
["Spawn(BluFor)", [7], "", -5, [["expression", format[_EXECscript6,"westsp.sqf"]]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
showCommandingMenu "#USER:adminmenu";

View File

@ -1,17 +0,0 @@
titleText ["Cargod enabled","PLAIN DOWN"]; titleFadeOut 4;
player removeAction line1;
player removeAction line2;
player removeAction godmode;
player removeAction tele;
player removeAction guns;
player removeAction mainveh;
player removeAction cgod;
player removeAction hplay;
while {alive ( vehicle player )} do
{
vehicle player setfuel 1;
vehicle player setvehicleammo 1;
vehicle player setdammage 0;
sleep 0.001;
};

View File

@ -1,11 +0,0 @@
cutText ["Godmode activated.", "PLAIN"];
player removeAllEventHandlers "handleDamage";
player addEventHandler ["handleDamage", {false}];
player removeAction line1;
player removeAction line2;
player removeAction godmode;
player removeAction tele;
player removeAction guns;
player removeAction mainveh;
player removeAction cgod;
player removeAction hplay;

View File

@ -1,4 +0,0 @@
hint format ["Healing..."];
sleep 2;
player setDamage 0;
hint format ["Done"];

View File

@ -1,33 +0,0 @@
//Healing Others Script
_max = 10; snext = false; plist = []; pselect5 = "";
{if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach entities "CAManBase";
{if ((count crew _x) > 0) then {{if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach crew _x;};} foreach (entities "LandVehicle" + entities "Air" + entities "Ship");
smenu =
{
_pmenu = [["Heal Other Player",true]];
for "_i" from (_this select 0) to (_this select 1) do
{_arr = [format['%1', plist select (_i)], [12], "", -5, [["expression", format ["pselect5 = plist select %1;", _i]]], "1", "1"]; _pmenu set [_i + 2, _arr];};
if (count plist > (_this select 1)) then {_pmenu set [(_this select 1) + 2, ["Next", [13], "", -5, [["expression", "snext = true;"]], "1", "1"]];}
else {_pmenu set [(_this select 1) + 2, ["", [-1], "", -5, [["expression", ""]], "1", "0"]];};
_pmenu set [(_this select 1) + 3, ["Exit", [13], "", -5, [["expression", "pselect5 = 'exit';"]], "1", "1"]];
showCommandingMenu "#USER:_pmenu";
};
_j = 0; _max = 10; if (_max>9) then {_max = 10;};
while {pselect5 == ""} do
{
[_j, (_j + _max) min (count plist)] call smenu; _j = _j + _max;
WaitUntil {pselect5 != "" or snext};
snext = false;
};
if (pselect5 != "exit") then
{
_name = pselect5;
{
if(name _x == _name) then
{
hint format ["Healing %1", _name];
_x setDamage 0;
sleep 0.25;
};
} forEach entities "CAManBase";
};

View File

@ -1,2 +0,0 @@
cutText ["Click somewhere on the map to move there", "PLAIN"];
onMapSingleClick "vehicle player setPos _pos; onMapSingleClick '';true;";

View File

@ -1,34 +0,0 @@
//AlPMaker
_max = 10; snext = false; plist = []; pselect5 = "";
{if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach entities "CAManBase";
{if ((count crew _x) > 0) then {{if ((_x != player) && (getPlayerUID _x != "")) then {plist set [count plist, name _x];};} forEach crew _x;};} foreach (entities "LandVehicle" + entities "Air" + entities "Ship");
smenu =
{
_pmenu = [["Teleport To Me",true]];
for "_i" from (_this select 0) to (_this select 1) do
{_arr = [format['%1', plist select (_i)], [12], "", -5, [["expression", format ["pselect5 = plist select %1;", _i]]], "1", "1"]; _pmenu set [_i + 2, _arr];};
if (count plist > (_this select 1)) then {_pmenu set [(_this select 1) + 2, ["Next", [13], "", -5, [["expression", "snext = true;"]], "1", "1"]];}
else {_pmenu set [(_this select 1) + 2, ["", [-1], "", -5, [["expression", ""]], "1", "0"]];};
_pmenu set [(_this select 1) + 3, ["Exit", [13], "", -5, [["expression", "pselect5 = 'exit';"]], "1", "1"]];
showCommandingMenu "#USER:_pmenu";
};
_j = 0; _max = 10; if (_max>9) then {_max = 10;};
while {pselect5 == ""} do
{
[_j, (_j + _max) min (count plist)] call smenu; _j = _j + _max;
WaitUntil {pselect5 != "" or snext};
snext = false;
};
if (pselect5 != "exit") then
{
_name = pselect5;
{
if(name _x == _name) then
{
hint format ["Teleporting %1", _name];
_x attachTo [vehicle player, [2, 2, 0]];
sleep 0.25;
detach _x;
};
} forEach entities "CAManBase";
};

View File

@ -1,37 +0,0 @@
===================================================================================================================================================
Instructions on how to add more vehicles to the list.
===================================================================================================================================================
Okay so first lets get what kind of vehicle you want, Go here to get them
http://forums.bistudio.com/showthread.php?169226-Arma-3-Assets-Objects-Weapons-Magazines-and-much-more
===================================================================================================================================================
Okay so now what you do is make a addAction so that it actually comes up in the menu.
car2 = player addAction ["Name Of Vehicle",{execVM "fusionsmenu\admin\veh\CARNAME.sqf";}]; // Change the car2 to what ever car it is
Make sure that the actual removeAction in the vehicles sqf file is declared!!!!!!!
NOW TO MAKE THE ACTUAL VEHICLE
_spawn = "REPLACE ME WITH CAR CLASS NAME";
_posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];
player removeAction car;
player removeAction car1;
player removeAction car2;
player removeAction line1;
player removeAction line2;
player removeAction godmode;
player removeAction tele;
player removeAction guns;
player removeAction mainveh;
player removeAction cgod;
player removeAction hplay; // Keep adding these for how many you have in ALL of the vehicle sqfs :D
I will be continually updating this to make a better menu <3
===================================================================================================================================================
===================================================================================================================================================

View File

@ -1,15 +0,0 @@
_spawn = "B_G_Quadbike_01_F";
_posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];
player removeAction car;
player removeAction car1;
player removeAction line1;
player removeAction line2;
player removeAction godmode;
player removeAction tele;
player removeAction guns;
player removeAction mainveh;
player removeAction cgod;
player removeAction hplay;

View File

@ -1,11 +0,0 @@
_spawn = "B_MRAP_01_hmg_F";
_posplr = [((getPos player) select 0) - 3, ((getPos player) select 1) + 3, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];
laptop removeAction car1;
laptop removeAction car2;
laptop removeAction car3;
laptop removeAction car4;
laptop removeAction car5;
laptop removeAction car6;

View File

@ -1,11 +0,0 @@
_spawn = "B_G_Offroad_01_armed_F";
_posplr = [((getPos player) select 0) - 3, ((getPos player) select 1) + 3, 0];
_dirplr = getDir player;
_spwnveh = _spawn createVehicle (_posplr);
_spwnveh setVariable ["Sarge",1,true];
laptop removeAction car1;
laptop removeAction car2;
laptop removeAction car3;
laptop removeAction car4;
laptop removeAction car5;
laptop removeAction car6;

View File

@ -1,36 +0,0 @@
===================================================================================================================================================
Instructions on how to add more guns to the list.
===================================================================================================================================================
Okay so first lets get what kind of gun you want, Go here to get them
http://forums.bistudio.com/showthread.php?169226-Arma-3-Assets-Objects-Weapons-Magazines-and-much-more
===================================================================================================================================================
Okay so now what you do is make a addAction so that it actually comes up in the menu.
gun1 = player addAction ["Name Of GUN",{execVM "fusionsmenu\admin\weapons\WEAPONNAME.sqf";}]; // Change the car2 to what ever car it is
Make sure that the actual removeAction in the vehicles sqf file is declared!!!!!!!
NOW TO MAKE THE ACTUAL VEHICLE
GearAdd = (vehicle player);
GearAdd addWeapon 'REPLACE WITH GUN CLASSNAME';
GearAdd addMagazine '30Rnd_65x39_caseless_mag'; // CHANGE FOR MAG NAME
GearAdd addMagazine '30Rnd_65x39_caseless_mag'; // CHANGE FOR MAG NAME
GearAdd addMagazine '30Rnd_65x39_caseless_mag'; // CHANGE FOR MAG NAME ALSO ADD MORE OF THESE TO GET MORE WEAPONS
player removeAction gun;
player removeAction gun1;
player removeAction line1;
player removeAction line2;
player removeAction godmode;
player removeAction tele;
player removeAction guns;
player removeAction mainveh;
player removeAction cgod;
player removeAction hplay; // Keep adding these for how many you have in ALL of the vehicle sqfs :D
I will be continually updating this to make a better menu <3
===================================================================================================================================================
===================================================================================================================================================

View File

@ -1,5 +0,0 @@
GearAdd = (vehicle player);
GearAdd addWeapon 'srifle_EBR_F';
GearAdd addMagazine '20Rnd_762x51_Mag';
GearAdd addMagazine '20Rnd_762x51_Mag';
GearAdd addMagazine '20Rnd_762x51_Mag';

View File

@ -1,5 +0,0 @@
GearAdd = (vehicle player);
GearAdd addWeapon 'srifle_GM6_F';
GearAdd addMagazine '5Rnd_127x108_Mag';
GearAdd addMagazine '5Rnd_127x108_Mag';
GearAdd addMagazine '5Rnd_127x108_Mag';

View File

@ -1,5 +0,0 @@
GearAdd = (vehicle player);
GearAdd addWeapon 'srifle_LRR_SOS_F';
GearAdd addMagazine '7Rnd_408_Mag';
GearAdd addMagazine '7Rnd_408_Mag';
GearAdd addMagazine '7Rnd_408_Mag';

View File

@ -1,5 +0,0 @@
GearAdd = (vehicle player);
GearAdd addWeapon 'LMG_Mk200_F';
GearAdd addMagazine '200Rnd_65x39_cased_Box_Tracer';
GearAdd addMagazine '200Rnd_65x39_cased_Box_Tracer';
GearAdd addMagazine '200Rnd_65x39_cased_Box_Tracer';

View File

@ -1,5 +0,0 @@
GearAdd = (vehicle player);
GearAdd addWeapon 'arifle_MX_F';
GearAdd addMagazine '30Rnd_65x39_caseless_mag'; // I didnt look up the mag name
GearAdd addMagazine '30Rnd_65x39_caseless_mag'; // I didnt look up the mag name
GearAdd addMagazine '30Rnd_65x39_caseless_mag'; // I didnt look up the mag name

View File

@ -1,5 +0,0 @@
GearAdd = (vehicle player);
GearAdd addWeapon 'hgun_P07_F';
GearAdd addMagazine '16Rnd_9x21_Mag';
GearAdd addMagazine '16Rnd_9x21_Mag';
GearAdd addMagazine '16Rnd_9x21_Mag';

View File

@ -1,67 +0,0 @@
// Lootspawner deleter script to remove old loot
// Author: Na_Palm (BIS forums)
//-------------------------------------------------------------------------------------
private["_objlT","_countdel","_timedel","_objempty","_playersnear","_objisContainer","_objVar","_obj","_objlocked","_objclass"];
_objlT = _this;
while {true} do {
_countdel = 0;
//_timedel = time;
{
{
_objempty = false;
_playersnear = false;
_objisContainer = false;
//try to get local server Var "Lootready"
_objVar = (_x getVariable "Lootready");
//if "Lootready" NOT present then its not spawned by LS or in creation
if (!isNil "_objVar") then {
//check if lifetime is expired
if ((time - _objVar) > _objlT) then {
//if object has the var. "objectLocked", it belongs now to a player and therefor bad idea to delete it
_objlocked = (_x getVariable "objectLocked");
if(isNil "_objlocked") then {
//case-insensitive
_objclass = typeOf _x;
if (({_x == _objclass} count exclcontainer_list) > 0) then {
_objisContainer = true;
if ((count ((getWeaponCargo _x) select 0)) == 0) then {
if ((count ((getMagazineCargo _x) select 0)) == 0) then {
if ((count ((getItemCargo _x) select 0)) == 0) then {
if ((count ((getBackpackCargo _x) select 0)) == 0) then {
_objempty = true;
};
};
};
};
};
_obj = _x;
//check if any alive player is near
{
if ((isPlayer _x) && (alive _x)) then {
if (((getPosATL _x) distance (getPosATL _obj)) < 500) then {
_playersnear = true;
};
};
sleep 0.001;
}forEach playableUnits;
//if (_objempty AND !_playersnear) OR (!_objisContainer AND !_playersnear) then delete
if (((_objempty) && (!_playersnear)) || ((!_objisContainer) && (!_playersnear))) then {
//diag_log format["-- DEBUG LOOTSPAWNER Delete item: %1:%2:%3 %4vLT%5v%6v for %7 v%8v%9%10v%11v --", _objisContainer, _objempty, _playersnear, _objVar, (time - _objVar), _objlT, (typeOf _x), ((getWeaponCargo _x) select 0), ((getMagazineCargo _x) select 0), ((getItemCargo _x) select 0), ((getBackpackCargo _x) select 0)];
deleteVehicle _x;
_countdel = _countdel + 1;
};
};
};
};
_objVar = Nil;
_objlocked = Nil;
sleep 0.001;
}forEach allMissionObjects _x;
sleep 0.001;
}forEach LSusedclass_list;
if (_countdel > 0) then {
diag_log format["-- LOOTSPAWNER deleted %1 objects --", _countdel];
};
sleep 60;
};

View File

@ -1,81 +0,0 @@
// Lootspawner junction list for buildings to classes
// Author: Na_Palm (BIS forums)
//-------------------------------------------------------------------------------------
//"Buildingstoloot_list" array of [buildingname, class]
// buildingname: building class name (in editor debug console use "typeof BIS_fnc_camera_target"
// to monitor and then copy/paste or any other method you know...)
// class: 0-civil, 1-military, ... (add more as you wish)
//
//!!!EVERY building must have only ONE entry here AND been in ONE class!!!
//-------------------------------------------------------------------------------------
Buildingstoloot_list = [
["Land_A_BuildingWIP", 2],
["Land_A_FuelStation_Build", 2],
["Land_A_GeneralStore_01", 0],
["Land_A_GeneralStore_01a", 0],
["Land_A_Hospital", 0],
["Land_A_Pub_01", 0],
["Land_a_stationhouse", 1],
["Land_A_TVTower_Base", 1],
["Land_Barn_Metal", 2],
["Land_Barn_W_01", 0],
["Land_Church_03", 0],
["Land_Farm_Cowshed_a", 0],
["Land_Farm_Cowshed_b", 0],
["Land_Farm_Cowshed_c", 0],
["Land_Hangar_2", 2],
["Land_Hlidac_budka", 1],
["Land_HouseBlock_A1", 0],
["Land_HouseB_Tenement", 0],
["Land_HouseV2_01A", 0],
["Land_HouseV2_02_Interier", 0],
["Land_HouseV2_04_interier", 0],
["Land_HouseV_1I1", 0],
["Land_HouseV_1I4", 0],
["Land_HouseV_1L1", 0],
["Land_HouseV_1L2", 0],
["Land_HouseV_2L", 0],
["Land_IndPipe2_bigBuild2_L", 2],
["Land_IndPipe2_big_18", 2],
["Land_IndPipe2_big_9", 2],
["Land_IndPipe2_big_ground2", 2],
["Land_Ind_Expedice_1", 2],
["Land_Ind_Expedice_3", 2],
["Land_Ind_Garage01", 2],
["Land_Ind_IlluminantTower", 1],
["Land_Ind_Mlyn_01", 2],
["Land_Ind_Pec_01", 2],
["Land_Ind_Vysypka", 2],
["Land_Ind_Workshop01_01", 2],
["Land_Ind_Workshop01_02", 2],
["Land_Ind_Workshop01_04", 2],
["Land_Ind_Workshop01_L", 2],
["Land_kulna", 0],
["Land_Mil_Barracks_i", 1],
["Land_Mil_ControlTower", 1],
["Land_Misc_deerstand", 1],
["Land_Panelak", 0],
["Land_Panelak2", 0],
["Land_Rail_House_01", 0],
["Land_rail_station_big", 0],
["Land_Shed_Ind02", 2],
["Land_Shed_W01", 0],
["Land_SS_hangar", 1],
["Land_stodola_old_open", 0],
["Land_Tovarna2", 2],
["Land_vez", 1],
//custom buildings
["Land_Airport_left_F", 0],
["Land_Airport_center_F", 0],
["Land_Airport_right_F", 0],
["Land_i_Barracks_V1_F", 1],
["Land_i_Barracks_V2_F", 1],
["Land_Cargo_Tower_V1_F", 1],
["Land_Airport_Tower_F", 1],
["Land_Mil_Barracks_i_EP1", 1],
["Land_MilOffices_V1_F", 1],
["C130J_wreck_EP1", 1],
["Land_Offices_01_V1_F", 0]
];

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,250 +0,0 @@
// Lootspawner setup and control script
// Author: Na_Palm (BIS forums)
// credit to: Ed! (404Forums) and [GoT] JoSchaap (GoT2DayZ.nl) for initial script
//-------------------------------------------------------------------------------------
if (!isServer) exitwith {};
private["_buildingname","_chfullfuel","_chperSpot","_class","_dbgloopTime","_dbgloopTimeplU","_dbgTime","_dbgTurns","_dbgTurnsplU","_endloop","_genZadjust","_hndl","_item","_nearLootdist","_pos","_posAdjustZ","_posAdjustZlist","_poscount","_posIdxlist","_posnew","_posOrg","_posViable","_randomweapontestint","_spawnradius","_spInterval","_testpos","_tmpBuild","_tmpPoslist","_tmpTstPlace","_z"];
//-------------------------------------------------------------------------------------
//Switch
swDebugLS = false; //Debug messages on/off
swSpZadjust = false; //needed for ArmA 2 and older Maps/Buildings -> true
//-------------------------------------------------------------------------------------
//Variables
//local
_spawnradius = 80; //Radius (in meter) around players to spawn loot
_spInterval = 1800; //Time (in sec.) to pass before an building spawns new loot
_chfullfuel = 35; //Chance (in %) of a spawned fuelcan to be full instead of empty
_genZadjust = -0.1; //High adjustment (in engine units) thats generally added to every spawnpoint
_tmpTstPlace = [14730, 16276, 0]; //Coord's, in [x,y,z] of a preferably flat and unocupied piece of land
_chperSpot = 75; //Chance (in %) if a spot gets loot. Will be considered before 'spawnClassChance_list'
//"spawnClassChance_list" array of [class, %weapon, %magazine, %ICV, %backpack, %object]
// class : same classname as used in "Buildingstoloot_list"
// %weapon : % chance to spawn a weapon on spot
// %magazine : % chance to spawn magazines on spot
// %ICV : % chance to spawn item/cloth/vests on spot
// %backpack : % chance to spawn a backpack on spot
// %object : % chance to spawn an world object on spot
//-------------- A VALUE OF '-1' RESULTS IN NO LOOT FOR THIS CLASS AND TYPE ----------------
spawnClassChance_list = [
[0, 13, 21, 24, 18, 22], // civil
[1, 22, 36, 28, 26, 18], // military
[2, 10, 21, 28, 26, 36], // industrial
[3, 12, 36, 36, -1, -1] // research
];
//"exclcontainer_list" single array of container classnames to NOT to delete if filled
exclcontainer_list = [
"Box_East_Ammo_F", "Box_East_AmmoOrd_F", "Box_East_AmmoVeh_F", "Box_East_Grenades_F", "Box_East_Support_F",
"Box_East_Wps_F", "Box_East_WpsLaunch_F", "Box_East_WpsSpecial_F",
"Box_IND_Ammo_F", "Box_IND_AmmoOrd_F", "Box_IND_AmmoVeh_F", "Box_IND_Grenades_F", "Box_IND_Support_F",
"Box_IND_Wps_F", "Box_IND_WpsLaunch_F", "Box_IND_WpsSpecial_F",
"Box_NATO_Ammo_F", "Box_NATO_AmmoOrd_F", "Box_NATO_AmmoVeh_F", "Box_NATO_Grenades_F", "Box_NATO_Support_F",
"Box_NATO_Wps_F", "Box_NATO_WpsLaunch_F", "Box_NATO_WpsSpecial_F"
];
//-------------------------------------------------------------------------------------
//DONT change these, will be filled in MAIN -------------------------------------------
spawnBuilding_list = [];
Buildingpositions_list = [];
LSusedclass_list = ["WeaponHolderSimulated"];
//DONT change these, will be filled in MAIN -------------------------------------------
//-------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------
//Buildings that can spawn loot go in this list
#include "LSlootBuildings.sqf"
//Loot goes in these lists
#include "LSlootLists.sqf"
//-------------------------------------------------------------------------------------
//function only runs once on beginning of mission, not really needs a compile
//fill spawnBuilding_list with buildingnames only
getListBuildingnames = {
{
spawnBuilding_list set [count spawnBuilding_list, (_x select 0)];
//diag_log format["-- LOOTSPAWNER DEBUG add to spawnBuilding_list: %1 ", (_x select 0)];
}forEach Buildingstoloot_list;
};
//-------------------------------------------------------------------------------------
//function only runs once on beginning of mission, not really needs a compile
//get list of all Lootspawner generatable 'Worldobjects'
getUsedclasses = {
for "_class" from 0 to ((count lootworldObject_list) - 1) do {
for "_item" from 0 to ((count ((lootworldObject_list select _class) select 1)) - 1) do {
if !((((lootworldObject_list select _class) select 1) select _item) in LSusedclass_list) then {
LSusedclass_list set [count LSusedclass_list, (((lootworldObject_list select _class) select 1) select _item)];
};
sleep 0.001;
};
sleep 0.001;
};
};
//-------------------------------------------------------------------------------------
//function only runs once on beginning of mission, not really needs a compile
//fill Buildingpositions_list with [_buildingname, [_posIdxlist], [_posAdjustZlist]]
getListBuildingPositionjunction = {
_tmpTstPlace = _this select 0;
_randomweapontestint = 0.01; //Sets the highintervals in which weaponpositions are tested. (Lower = slower, but more accurate. Higher = faster, but less accurate.)
_nearLootdist = 0.5;
{
_buildingname = _x;
_tmpBuild = _buildingname createVehicleLocal _tmpTstPlace;
//check if the creation was successful
if (isNil {_tmpBuild}) then {
diag_log format["--!!ERROR!! LOOTSPAWNER in Buildingstoloot_list: %1 no viable object !!ERROR!!--", _buildingname];
} else {
//get spawnpositions from building
_poscount = 0;
_posAdjustZlist = [];
_posIdxlist = [];
_tmpPoslist = [];
_endloop = false;
while {!_endloop} do {
if((((_tmpBuild buildingPos _poscount) select 0) != 0) && (((_tmpBuild buildingPos _poscount) select 1) != 0)) then {
//counter loot piling
_pos = _tmpBuild buildingPos _poscount;
_posOrg = _pos;
_posViable = false;
if (_poscount != 0) then {
{
if ((_pos distance _x) > _nearLootdist) exitWith {
_posViable = true;
};
}forEach _tmpPoslist;
} else {
_posViable = true;
};
_tmpPoslist set [count _tmpPoslist, _pos];
//get Z adjustment for position
if (_posViable) then {
_posIdxlist set [count _posIdxlist, _poscount];
_posAdjustZ = 0;
if (swSpZadjust) then {
if(_pos select 2 < 0) then {
_pos = [_pos select 0, _pos select 1, 1];
};
_z = 0;
_posnew = _pos;
_testpos = true;
while {_testpos} do
{
if((!lineIntersects[ATLtoASL(_pos), ATLtoASL([_pos select 0, _pos select 1, (_pos select 2) - (_randomweapontestint * _z)])]) && (!terrainIntersect[(_pos), ([_pos select 0, _pos select 1, (_pos select 2) - (_randomweapontestint * _z)])]) && (_pos select 2 > 0)) then {
_posnew = [_pos select 0, _pos select 1, (_pos select 2) - (_randomweapontestint * _z)];
_z = _z + 1;
} else {
_testpos = false;
};
};
_posnew = [_posnew select 0, _posnew select 1, (_posnew select 2) + 0.05];
_posAdjustZ = (_posOrg select 2) - (_posnew select 2);
// diag_log format["-- LOOTSPAWNER DEBUG adjusted %1 times", _z];
_posAdjustZlist set [count _posAdjustZlist, _posAdjustZ];
} else {
_posAdjustZlist set [count _posAdjustZlist, _posAdjustZ];
};
};
_poscount = _poscount + 1;
} else {
_endloop = true;
};
};
//save final position Index & adjustments to list
if (_poscount != 0) then {
//diag_log format["-- LOOTSPAWNER DEBUG add to Buildingpositions_list: v%1v v%2v v%3v added", _buildingname, _posIdxlist, _posAdjustZlist];
Buildingpositions_list set [count Buildingpositions_list, [_buildingname, _posIdxlist, _posAdjustZlist]];
} else {
diag_log format["-- !!LOOTSPAWNER WARNING!! in Buildingstoloot_list: %1 has no building positions --", _buildingname];
Buildingpositions_list set [count Buildingpositions_list, [_buildingname, [0], [0]]];
};
};
deleteVehicle _tmpBuild;
}forEach spawnBuilding_list;
};
//-------------------------------------------------------------------------------------
// MAIN
//-------------------------------------------------------------------------------------
diag_log format["-- LOOTSPAWNER initialise ------------------------"];
if ((count Buildingstoloot_list) == 0) then {
diag_log format["--!!ERROR!! LOOTSPAWNER Buildingstoloot_list in lootBuildings.sqf MUST have one entry at least !!ERROR!!--"];
diag_log format["-- LOOTSPAWNER disabled --"];
} else {
_dbgTime = time;
_hndl = [] spawn getListBuildingnames;
waitUntil{scriptDone _hndl};
diag_log format["-- LOOTSPAWNER spawnBuilding_list ready, d: %1s", (time - _dbgTime)];
_dbgTime = time;
_hndl = [_tmpTstPlace] spawn getListBuildingPositionjunction;
waitUntil{scriptDone _hndl};
diag_log format["-- LOOTSPAWNER Buildingpositions_list ready, d: %1s", (time - _dbgTime)];
_dbgTime = time;
_hndl = [] spawn getUsedclasses;
waitUntil{scriptDone _hndl};
diag_log format["-- LOOTSPAWNER LSusedclass_list ready, d: %1s", (time - _dbgTime)];
//run loot deleter continously
null = _spInterval spawn LSdeleter;
diag_log format["-- LOOTSPAWNER LSDer started..."];
if (swDebugLS) then {
dbgTime = time;
dbgTurns = 0;
dbgTurnsplU = 0;
dbgloopTime = 0;
dbgloopTimeplU = 0;
};
diag_log format["-- LOOTSPAWNER ready and waiting for players -----"];
//go into mainloop till mission ends
while {true} do {
_playersalive = false;
{
if (swDebugLS) then {
dbgTimeplU = time;
};
//is Player online and alive?
if ((isPlayer _x) && (alive _x)) then {
_playersalive = true;
//jogging has 4.16..., sprinting has 5.5... so if player velocity is < 6 spawn loot
//works for players in vehicles too
if (((velocity _x) distance [0,0,0]) < 6) then {
//if ((vehicle _x isKindOf "Land") || (vehicle _x isKindOf "Ship")) then {
_posPlayer = getPos _x;
//get list of viable buildings around player
_BaP_list = nearestObjects [_posPlayer, spawnBuilding_list, _spawnradius];
if ((count _BaP_list) > 0) then {
//give to spawn function
_hndl = [_BaP_list, _spInterval, _chfullfuel, _genZadjust, _chperSpot] spawn fn_getBuildingstospawnLoot;
waitUntil{scriptDone _hndl};
};
};
};
sleep 0.001;
if (swDebugLS) then {
dbgloopTimeplU = dbgloopTimeplU + (time - dbgTimeplU);
dbgTurnsplU = dbgTurnsplU + 1;
};
}forEach playableUnits;
if (swDebugLS) then {
dbgloopTime = dbgloopTime + dbgloopTimeplU;
dbgloopTimeplU = 0;
dbgTurns = dbgTurns + 1;
//every 30 sec. give stats out
if ((time - dbgTime) > 30) then {
if (dbgTurnsplU > 0) then {
diag_log format["-- DEBUG LOOTSPAWNER MAIN turns (spawned): %1(%2), duration: %3sec, average: %4sec.",dbgTurns ,dbgTurnsplU , dbgloopTime, (dbgloopTime / dbgTurnsplU)];
} else {
diag_log format["-- DEBUG LOOTSPAWNER MAIN waiting for players"];
};
dbgTime = time;
dbgTurns = 0;
dbgTurnsplU = 0;
dbgloopTime = 0;
};
};
//if no players online wait a bit
if (!_playersalive) then {
sleep 2;
};
};
};

View File

@ -1,247 +0,0 @@
// Lootspawner setup and control script
// Author: Na_Palm (BIS forums)
// credit to: Ed! (404Forums) and [GoT] JoSchaap (GoT2DayZ.nl) for initial script
//-------------------------------------------------------------------------------------
private["_buildingname","_chfullfuel","_chperSpot","_class","_dbgloopTime","_dbgloopTimeplU","_dbgTime","_dbgTurns","_dbgTurnsplU","_endloop","_genZadjust","_hndl","_item","_nearLootdist","_pos","_posAdjustZ","_posAdjustZlist","_poscount","_posIdxlist","_posnew","_posOrg","_posViable","_randomweapontestint","_spawnradius","_spInterval","_testpos","_tmpBuild","_tmpPoslist","_tmpTstPlace","_z"];
//-------------------------------------------------------------------------------------
//Switch
swDebugLS = false; //Debug messages on/off
swSpZadjust = false; //needed for ArmA 2 and older Maps/Buildings -> true
//-------------------------------------------------------------------------------------
//Variables
//local
_spawnradius = 80; //Radius (in meter) around players to spawn loot
_spInterval = 1800; //Time (in sec.) to pass before an building spawns new loot
_chfullfuel = 35; //Chance (in %) of a spawned fuelcan to be full instead of empty
_genZadjust = -0.1; //High adjustment (in engine units) thats generally added to every spawnpoint
_tmpTstPlace = [14730, 16276, 0]; //Coord's, in [x,y,z] of a preferably flat and unocupied piece of land
_chperSpot = 75; //Chance (in %) if a spot gets loot. Will be considered before 'spawnClassChance_list'
//"spawnClassChance_list" array of [class, %weapon, %magazine, %ICV, %backpack, %object]
// class : same classname as used in "Buildingstoloot_list"
// %weapon : % chance to spawn a weapon on spot
// %magazine : % chance to spawn magazines on spot
// %ICV : % chance to spawn item/cloth/vests on spot
// %backpack : % chance to spawn a backpack on spot
// %object : % chance to spawn an world object on spot
//-------------- A VALUE OF '-1' RESULTS IN NO LOOT FOR THIS CLASS AND TYPE ----------------
spawnClassChance_list = [
[0, 13, 21, 24, 18, 22], // civil
[1, 22, 36, 28, 26, 18], // military
[2, 10, 21, 28, 26, 36], // industrial
[3, 12, 36, 36, -1, -1] // research
];
//"exclcontainer_list" single array of container classnames to NOT to delete if filled
exclcontainer_list = [
"Box_East_Ammo_F", "Box_East_AmmoOrd_F", "Box_East_AmmoVeh_F", "Box_East_Grenades_F", "Box_East_Support_F",
"Box_East_Wps_F", "Box_East_WpsLaunch_F", "Box_East_WpsSpecial_F",
"Box_IND_Ammo_F", "Box_IND_AmmoOrd_F", "Box_IND_AmmoVeh_F", "Box_IND_Grenades_F", "Box_IND_Support_F",
"Box_IND_Wps_F", "Box_IND_WpsLaunch_F", "Box_IND_WpsSpecial_F",
"Box_NATO_Ammo_F", "Box_NATO_AmmoOrd_F", "Box_NATO_AmmoVeh_F", "Box_NATO_Grenades_F", "Box_NATO_Support_F",
"Box_NATO_Wps_F", "Box_NATO_WpsLaunch_F", "Box_NATO_WpsSpecial_F"
];
//-------------------------------------------------------------------------------------
//DONT change these, will be filled in MAIN -------------------------------------------
spawnBuilding_list = [];
Buildingpositions_list = [];
LSusedclass_list = ["GroundWeaponHolder"];
//DONT change these, will be filled in MAIN -------------------------------------------
//-------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------
//Buildings that can spawn loot go in this list
#include "LSlootBuildings.sqf"
//Loot goes in these lists
#include "LSlootLists.sqf"
//-------------------------------------------------------------------------------------
//function only runs once on beginning of mission, not really needs a compile
//fill spawnBuilding_list with buildingnames only
getListBuildingnames = {
{
spawnBuilding_list set [count spawnBuilding_list, (_x select 0)];
//diag_log format["-- LOOTSPAWNER DEBUG add to spawnBuilding_list: %1 ", (_x select 0)];
}forEach Buildingstoloot_list;
};
//-------------------------------------------------------------------------------------
//function only runs once on beginning of mission, not really needs a compile
//get list of all Lootspawner generatable 'Worldobjects'
getUsedclasses = {
for "_class" from 0 to ((count lootworldObject_list) - 1) do {
for "_item" from 0 to ((count ((lootworldObject_list select _class) select 1)) - 1) do {
if !((((lootworldObject_list select _class) select 1) select _item) in LSusedclass_list) then {
LSusedclass_list set [count LSusedclass_list, (((lootworldObject_list select _class) select 1) select _item)];
};
sleep 0.001;
};
sleep 0.001;
};
};
//-------------------------------------------------------------------------------------
//function only runs once on beginning of mission, not really needs a compile
//fill Buildingpositions_list with [_buildingname, [_posIdxlist], [_posAdjustZlist]]
getListBuildingPositionjunction = {
_tmpTstPlace = _this select 0;
_randomweapontestint = 0.01; //Sets the highintervals in which weaponpositions are tested. (Lower = slower, but more accurate. Higher = faster, but less accurate.)
_nearLootdist = 0.5;
{
_buildingname = _x;
_tmpBuild = _buildingname createVehicleLocal _tmpTstPlace;
//check if the creation was successful
if (isNil {_tmpBuild}) then {
diag_log format["--!!ERROR!! LOOTSPAWNER in Buildingstoloot_list: %1 no viable object !!ERROR!!--", _buildingname];
} else {
//get spawnpositions from building
_poscount = 0;
_posAdjustZlist = [];
_posIdxlist = [];
_tmpPoslist = [];
_endloop = false;
while {!_endloop} do {
if((((_tmpBuild buildingPos _poscount) select 0) != 0) && (((_tmpBuild buildingPos _poscount) select 1) != 0)) then {
//counter loot piling
_pos = _tmpBuild buildingPos _poscount;
_posOrg = _pos;
_posViable = false;
if (_poscount != 0) then {
{
if ((_pos distance _x) > _nearLootdist) exitWith {
_posViable = true;
};
}forEach _tmpPoslist;
} else {
_posViable = true;
};
_tmpPoslist set [count _tmpPoslist, _pos];
//get Z adjustment for position
if (_posViable) then {
_posIdxlist set [count _posIdxlist, _poscount];
_posAdjustZ = 0;
if (swSpZadjust) then {
if(_pos select 2 < 0) then {
_pos = [_pos select 0, _pos select 1, 1];
};
_z = 0;
_posnew = _pos;
_testpos = true;
while {_testpos} do
{
if((!lineIntersects[ATLtoASL(_pos), ATLtoASL([_pos select 0, _pos select 1, (_pos select 2) - (_randomweapontestint * _z)])]) && (!terrainIntersect[(_pos), ([_pos select 0, _pos select 1, (_pos select 2) - (_randomweapontestint * _z)])]) && (_pos select 2 > 0)) then {
_posnew = [_pos select 0, _pos select 1, (_pos select 2) - (_randomweapontestint * _z)];
_z = _z + 1;
} else {
_testpos = false;
};
};
_posnew = [_posnew select 0, _posnew select 1, (_posnew select 2) + 0.05];
_posAdjustZ = (_posOrg select 2) - (_posnew select 2);
// diag_log format["-- LOOTSPAWNER DEBUG adjusted %1 times", _z];
_posAdjustZlist set [count _posAdjustZlist, _posAdjustZ];
} else {
_posAdjustZlist set [count _posAdjustZlist, _posAdjustZ];
};
};
_poscount = _poscount + 1;
} else {
_endloop = true;
};
};
//save final position Index & adjustments to list
if (_poscount != 0) then {
//diag_log format["-- LOOTSPAWNER DEBUG add to Buildingpositions_list: v%1v v%2v v%3v added", _buildingname, _posIdxlist, _posAdjustZlist];
Buildingpositions_list set [count Buildingpositions_list, [_buildingname, _posIdxlist, _posAdjustZlist]];
} else {
diag_log format["-- !!LOOTSPAWNER WARNING!! in Buildingstoloot_list: %1 has no building positions --", _buildingname];
Buildingpositions_list set [count Buildingpositions_list, [_buildingname, [0], [0]]];
};
};
deleteVehicle _tmpBuild;
}forEach spawnBuilding_list;
};
//-------------------------------------------------------------------------------------
// MAIN
//-------------------------------------------------------------------------------------
diag_log format["-- LOOTSPAWNER initialise ------------------------"];
if ((count Buildingstoloot_list) == 0) then {
diag_log format["--!!ERROR!! LOOTSPAWNER Buildingstoloot_list in lootBuildings.sqf MUST have one entry at least !!ERROR!!--"];
diag_log format["-- LOOTSPAWNER disabled --"];
} else {
_dbgTime = time;
_hndl = [] spawn getListBuildingnames;
waitUntil{scriptDone _hndl};
diag_log format["-- LOOTSPAWNER spawnBuilding_list ready, d: %1s", (time - _dbgTime)];
_dbgTime = time;
_hndl = [_tmpTstPlace] spawn getListBuildingPositionjunction;
waitUntil{scriptDone _hndl};
diag_log format["-- LOOTSPAWNER Buildingpositions_list ready, d: %1s", (time - _dbgTime)];
_dbgTime = time;
_hndl = [] spawn getUsedclasses;
waitUntil{scriptDone _hndl};
diag_log format["-- LOOTSPAWNER LSusedclass_list ready, d: %1s", (time - _dbgTime)];
//run loot deleter continously
null = _spInterval spawn LSdeleter;
diag_log format["-- LOOTSPAWNER LSDer started..."];
if (swDebugLS) then {
dbgTime = time;
dbgTurns = 0;
dbgTurnsplU = 0;
dbgloopTime = 0;
dbgloopTimeplU = 0;
};
diag_log format["-- LOOTSPAWNER ready and waiting for players -----"];
//go into mainloop till mission ends
while {true} do {
_playersalive = false;
if (swDebugLS) then {
dbgTimeplU = time;
};
//is Player online and alive?
if (alive player) then {
_playersalive = true;
//jogging has 4.16..., sprinting has 5.5... so if player velocity is < 6 spawn loot
//works for players in vehicles too
if (((velocity player) distance [0,0,0]) < 6) then {
//if ((vehicle _x isKindOf "Land") || (vehicle _x isKindOf "Ship")) then {
_posPlayer = getPos player;
//get list of viable buildings around player
_BaP_list = nearestObjects [_posPlayer, spawnBuilding_list, _spawnradius];
if ((count _BaP_list) > 0) then {
//give to spawn function
_hndl = [_BaP_list, _spInterval, _chfullfuel, _genZadjust, _chperSpot] spawn fn_getBuildingstospawnLoot;
waitUntil{scriptDone _hndl};
};
};
};
sleep 0.001;
if (swDebugLS) then {
dbgloopTimeplU = dbgloopTimeplU + (time - dbgTimeplU);
dbgTurnsplU = dbgTurnsplU + 1;
};
if (swDebugLS) then {
dbgloopTime = dbgloopTime + dbgloopTimeplU;
dbgloopTimeplU = 0;
dbgTurns = dbgTurns + 1;
//every 30 sec. give stats out
if ((time - dbgTime) > 30) then {
if (dbgTurnsplU > 0) then {
diag_log format["-- DEBUG LOOTSPAWNER MAIN turns (spawned): %1(%2), duration: %3sec, average: %4sec.",dbgTurns ,dbgTurnsplU , dbgloopTime, (dbgloopTime / dbgTurnsplU)];
} else {
diag_log format["-- DEBUG LOOTSPAWNER MAIN waiting for players"];
};
dbgTime = time;
dbgTurns = 0;
dbgTurnsplU = 0;
dbgloopTime = 0;
};
};
//if no players online wait a bit
if (!_playersalive) then {
sleep 2;
};
};
};

View File

@ -1,177 +0,0 @@
// Lootspawner spawn script
// Author: Na_Palm (BIS forums)
//-------------------------------------------------------------------------------------
//local to Server Var. "BuildingLoot" array of [state, time], placed on buildings that can spawn loot
// state: 0-not assigned, 1-has loot, 2-currently in use/blockaded
// time : timestamp of last spawn
//
//local to Server Var. "Lootready" time, placed on generated lootobject, needed for removing old loot
// time: timestamp of spawn, object is ready for use by player and loot deleter
//-------------------------------------------------------------------------------------
private["_begintime","_BaP_list","_spInterval","_chfullfuel","_chpSpot","_genZadjust","_BaPname","_lootClass","_buildPosViable_list","_buildPosZadj_list","_lBuildVar","_posviablecount","_spwnPos","_lootspawned","_randChance","_lootholder","_selecteditem","_loot","_chfullf","_idx_sBlist","_chperSpot","_tmpPos"];
//BaP - Buildings around Player
_BaP_list = _this select 0;
_spInterval = _this select 1;
_chfullfuel = _this select 2;
_genZadjust = _this select 3;
_chpSpot = _this select 4;
_begintime = time;
{
_BaPname = "";
_lootClass = 0;
_buildPosViable_list = [];
_buildPosZadj_list = [];
_lBuildVar = (_x getVariable ["BuildingLoot", [0, 0]]);
//diag_log format["-- LOOTSPAWNER DEBUG BaP _lBuildVar: v%1v v%2v --", _lBuildVar ,_x];
if ((_lBuildVar select 0) < 2) then {
//flag immediately as in use
_x setVariable ["BuildingLoot", [2, (_lBuildVar select 1)]];
if (((_lBuildVar select 1) == 0) || ((time - (_lBuildVar select 1)) > _spInterval)) then {
//get building class
_BaPname = typeOf _x;
//here an other _x
{
//if junction found, get lists and -> exit forEach
if (_BaPname == (_x select 0)) exitWith {
_lootClass = (_x select 1);
//get viable positions Idx
_buildPosViable_list set [count _buildPosViable_list, ((Buildingpositions_list select _forEachIndex) select 1)];
if (swSpZadjust) then {
//get position adjustments
_buildPosZadj_list set [count _buildPosZadj_list, ((Buildingpositions_list select _forEachIndex) select 2)];
};
};
sleep 0.001;
}forEach Buildingstoloot_list;
//diag_log format["-- LOOTSPAWNER DEBUG BaP: v%1v%2v :: v%3v :: v%4v --", _BaPname, _lootClass, _buildPosViable_list, _buildPosZadj_list];
//get spawn position, here the former _x
_posviablecount = 0;
for "_poscount" from 0 to 100 do {
//check if position is viable
if (_poscount == ((_buildPosViable_list select 0) select _posviablecount)) then {
_posviablecount = _posviablecount +1;
//consider chance per Slot
if ((floor random 100) < _chpSpot) then {
_spwnPos = (_x buildingPos _poscount);
_tmpPos = [(_spwnPos select 0), (_spwnPos select 1), 60000];
if ((_spwnPos select 0) == 0 && (_spwnPos select 1) == 0) then {
_spwnPos = getPosATL _x;
_tmpPos = [(_spwnPos select 0), (_spwnPos select 1), 60000];
};
if (swSpZadjust) then {
_spwnPos = [_spwnPos select 0, _spwnPos select 1, (_spwnPos select 2) + ((_buildPosZadj_list select 0) select _poscount)];
};
//generally add 0.1 on z
_spwnPos = [_spwnPos select 0, _spwnPos select 1, (_spwnPos select 2) + _genZadjust];
//check if position has old loot
if ((count (nearestObjects [_spwnPos, LSusedclass_list, 0.5])) == 0) then {
sleep 0.001;
//check what type of loot to spawn
_lootspawned = false;
for "_lootType" from 1 to 5 do {
//get chance for loot every time, so all combos in spawnClassChance_list are viable
_randChance = floor(random(100));
if (((spawnClassChance_list select _lootClass) select _lootType) > _randChance) then {
_lootspawned = true;
//special for weapons
if(_lootType == 1) exitWith {
_lootholder = createVehicle ["GroundWeaponHolder", _tmpPos, [], 0, "CAN_COLLIDE"];
_selecteditem = (floor(random(count((lootWeapon_list select _lootClass) select 1))));
_loot = (((lootWeapon_list select _lootClass) select 1) select _selecteditem);
_lootholder addWeaponCargoGlobal [_loot, 1];
_lootholder setdir (random 360);
_lootholder setPosATL _spwnPos;
};
//special for magazines: spawn 1-6
if(_lootType == 2) exitWith {
_lootholder = createVehicle ["GroundWeaponHolder", _tmpPos, [], 0, "CAN_COLLIDE"];
_randChance = 1 + floor(random(5));
for "_rm" from 0 to _randChance do {
_selecteditem = (floor(random(count((lootMagazine_list select _lootClass) select 1))));
_loot = (((lootMagazine_list select _lootClass) select 1) select _selecteditem);
_lootholder addMagazineCargoGlobal [_loot, 1];
};
_lootholder setdir (random 360);
_lootholder setPosATL _spwnPos;
};
//special for item/cloth/vests
if(_lootType == 3) exitWith {
_lootholder = createVehicle ["GroundWeaponHolder", _tmpPos, [], 0, "CAN_COLLIDE"];
_selecteditem = (floor(random(count((lootItem_list select _lootClass) select 1))));
_loot = (((lootItem_list select _lootClass) select 1) select _selecteditem);
_lootholder addItemCargoGlobal [_loot, 1];
_lootholder setdir (random 360);
_lootholder setPosATL _spwnPos;
};
//special for backpacks
if(_lootType == 4) exitWith {
_lootholder = createVehicle ["GroundWeaponHolder", _tmpPos, [], 0, "CAN_COLLIDE"];
_selecteditem = (floor(random(count((lootBackpack_list select _lootClass) select 1))));
_loot = (((lootBackpack_list select _lootClass) select 1) select _selecteditem);
_lootholder addBackpackCargoGlobal [_loot, 1];
_lootholder setdir (random 360);
_lootholder setPosATL _spwnPos;
};
//special for world objects: account for Wasteland and other items
if(_lootType == 5) exitWith {
_selecteditem = (floor(random(count((lootworldObject_list select _lootClass) select 1))));
_loot = (((lootworldObject_list select _lootClass) select 1) select _selecteditem);
_lootholder = createVehicle [_loot, _tmpPos, [], 0, "CAN_COLLIDE"];
if(_loot == "Land_CanisterFuel_F") then {
_chfullf = (random 100);
if (_chfullfuel > _chfullf) then {
_lootholder setVariable["mf_item_id", "jerrycanfull", true];
} else {
_lootholder setVariable["mf_item_id", "jerrycanempty", true];
};
};
if(_loot == "Land_CanisterOil_F") then {
_lootholder setVariable["mf_item_id", "syphonhose", true];
};
if(_loot == "Land_Can_V3_F") then {
_lootholder setVariable["mf_item_id", "energydrink", true];
};
if(_loot == "Land_Basket_F") then {
_lootholder setVariable["mf_item_id", "cannedfood", true];
};
if(_loot == "Land_CanisterPlastic_F") then {
_lootholder setVariable["mf_item_id", "water", true];
};
if(_loot == "Land_Suitcase_F") then {
_lootholder setVariable["mf_item_id", "repairkit", true];
};
//if container clear its cargo
if (({_x == _loot} count exclcontainer_list) > 0) then {
clearWeaponCargoGlobal _lootholder;
clearMagazineCargoGlobal _lootholder;
clearBackpackCargoGlobal _lootholder;
clearItemCargoGlobal _lootholder;
};
_lootholder setdir (random 360);
_lootholder setPosATL _spwnPos;
};
};
//1 category loot only per place so -> exit For
//no lootpiling
if (_lootspawned) exitWith {
_lootholder setVariable ["Lootready", time];
};
};
};
};
};
//if all viable positions run through -> exit For
if (_posviablecount == (count (_buildPosViable_list select 0))) exitWith {};
};
//release building with new timestamp
_x setVariable ["BuildingLoot", [1, time]];
} else {
//release building with old timestamp
_x setVariable ["BuildingLoot", [1, (_lBuildVar select 1)]];
};
};
sleep 0.001;
}forEach _BaP_list;
//diag_log format["-- LOOTSPAWNER DEBUG BaP: %1 buildings ready, needed %2s, EXIT now --", (count _BaP_list), (time - _begintime)];

View File

@ -1,6 +0,0 @@
_target = cursorTarget;
_isbike = _target isKindOf "ebike_epoch";
if (_isbike) then{
player addaction [("<t color=""#0074E8"">" + ("PackBike") +"</t>"),"custom\packbike2.sqf","",5,false,true,"",""];
};

View File

@ -1,9 +0,0 @@
/*
File: initServer.sqf
Description:
Starts the Initialization of the VEMF Server code.
*/
if (isServer) then {
[] ExecVM "\VEMF\init.sqf";
};

View File

@ -1,131 +0,0 @@
/* KiloSwiss */
diag_log format ["SEM: client loading...", player];
if(isDedicated)exitWith{}; //Everything below this line is only executed on the client (player or local host)
[] spawn { waitUntil{player == player && !isNil "SEM_version"}; sleep 50;
/* This is the advertisement. */
private "_worldName";
_worldName = switch(toLower worldName)do{
case "bootcamp_acr" :{"Bukovina"};
case "woodland_acr" :{"Bystrica"};
case "chernarus_summer" :{"Chernarus (summer)"};
case "mbg_celle2" :{"Celle"};
case "isladuala" :{"Isla-Duala"};
case "panthera2" :{"Panthera"};
case "panthera3" :{"Panthera"};
case "smd_sahrani_a2" :{"Sahrani"};
case "sara" :{"Sahrani"};
case "saralite" :{"Sahrani"};
case "sara_dbe1" :{"Sahrani"};
case "tavi" :{"Taviana"};
default{worldName};
};
titleText [format["\nWelcome to EPOCH %1 survivor %2.", _worldName, name player], "PLAIN DOWN", 2];
sleep 15;
titleText [format["This server is running %1 v%2", str "Simple Epoch Missions", SEM_version], "PLAIN DOWN", 2];
/* End of advertisement */
"SEM_version" addPublicVariableEventHandler {titleText [format["This server is running %1 v%2", str "Simple Epoch Missions", _this select 1], "PLAIN DOWN"]};
};
SEM_client_createMissionMarker = { private ["_create","_markerTimeout","_markerPos","_markerID","_markerA","_markerB","_markerC","_markerC_Pos","_markerName"];
_create = _this select 0;
//Create Marker
if(_create)then[{
_markerPos = _this select 1;
_markerID = _this select 2;
_markerName = _this select 3;
_markerA = createMarkerLocal [format["SEM_MissionMarkerA_%1", _markerID], _markerPos];
_markerB = createMarkerLocal [format["SEM_MissionMarkerB_%1", _markerID], _markerPos];
_markerC = createMarkerLocal [format["SEM_MissionMarkerC_%1", _markerID], _markerPos];
{ _x setMarkerShapeLocal "ELLIPSE"; _x setMarkerSizeLocal [350,350];
_x setMarkerPosLocal _markerPos}forEach [_markerA,_markerB];
_markerA setMarkerBrushLocal "Cross";
_markerA setMarkerColorLocal "ColorYellow";
_markerB setMarkerBrushLocal "Border";
_markerB setMarkerColorLocal "ColorRed";
_markerC_Pos = [(_markerPos select 0) - (count _markerName * 12), (_markerPos select 1) - 370, 0];
_markerC setMarkerShapeLocal "Icon";
_markerC setMarkerTypeLocal "HD_Arrow";
_markerC setMarkerColorLocal "ColorRed";
_markerC setMarkerPosLocal _markerC_Pos;
_markerC setMarkerTextLocal _markerName;
_markerC setMarkerDirLocal 37;
},{ //else delete marker
_this spawn { private ["_markerTimeout","_markerID"];
_markerTimeout = _this select 1;
_markerID = _this select 2;
if(_markerTimeout > 0)then{
format["SEM_MissionMarkerB_%1", _markerID] setMarkerColorLocal "ColorGreen";
format["SEM_MissionMarkerC_%1", _markerID] setMarkerColorLocal "ColorGreen";
sleep _markerTimeout;
};
if (getMarkerColor format["SEM_MissionMarkerA_%1", _markerID] != "")then{ //Only delete existing Marker
deleteMarkerLocal format["SEM_MissionMarkerA_%1", _markerID];
deleteMarkerLocal format["SEM_MissionMarkerB_%1", _markerID];
deleteMarkerLocal format["SEM_MissionMarkerC_%1", _markerID];
};
};
}];
};
if(!isNil "SEM_globalMissionMarker")then{SEM_globalMissionMarker call SEM_client_createMissionMarker};
"SEM_globalMissionMarker" addPublicVariableEventHandler {_this select 1 call SEM_client_createMissionMarker};
SEM_lastEvent = 0;
"SEM_globalHint" addPublicVariableEventHandler {
_this select 1 spawn { private "_sound";
//waitUntil{time - SEM_lastEvent > 20}; SEM_lastEvent = time;
waitUntil{if(time - SEM_lastEvent > 20)exitwith{SEM_lastEvent = time; true}; false};
_sound = _this select 0;
switch(_sound)do{
case 0:{playSound "UAV_05"}; //Mission start
case 1:{playSound "UAV_01"}; //Mission fail (object destroyed)
case 2:{playSound "UAV_04"}; //Mission fail (time out)
case 3:{playsound "UAV_03"}; //Mission success
};
hint parseText format["%1", _this select 1];
};
};
"SEM_vehDamage" addPublicVariableEventHandler { private ["_vk","_vP","_s"];
_vk = _this select 1;
_vP = vehicle player;
if(!local _vk)exitWith{};
if(_vk != _vP)exitWith{};
_s = [ "MOTOR","karoserie","palivo","glass1","glass2","glass3","door1","door2","door3","door4",
"wheel_1_1_steering","wheel_2_1_steering","wheel_1_2_steering","wheel_2_2_steering",
"wheel_1_3_steering","wheel_2_3_steering","wheel_1_4_steering","wheel_2_4_steering"];
{_vk setHit [_x,(_vk getHit _x)+(.2+(random .15))]}count _s;
};
[] spawn {
waitUntil{!isNil "SEM_AIsniperDamageDistance"};
waitUntil{!isNil "SEM_AI_Units"};
while{true}do{ private "_units";
_units = SEM_AI_Units;
{ sleep 0.05;
if(_x distance (vehicle player) > SEM_AIsniperDamageDistance)then[{
if(!isPlayer _x)then{_x allowDamage false};
},{
if(!isPlayer _x)then{_x allowDamage true};
}];
}forEach _units;
};
};
diag_log format ["SEM: client loaded.", player];
//if(!isNil "SEM_AIsniperDamageEH")then{SEM_AI_Units call SEM_client_AIaddDamageEH};
//"SEM_AI_Units" addPublicVariableEventHandler {_this select 1 call SEM_client_AIaddDamageEH};