diff --git a/SQF/dayz_code/compile/client_plantSpawner.sqf b/SQF/dayz_code/compile/client_plantSpawner.sqf index c8783c936..17afa2947 100644 --- a/SQF/dayz_code/compile/client_plantSpawner.sqf +++ b/SQF/dayz_code/compile/client_plantSpawner.sqf @@ -62,6 +62,7 @@ _insideloop = { }; for "_i" from 1 to 2048 do { + if (!dayz_townGenerator or {toLower worldName != "chernarus"}) exitWith {}; _pos = _a call psrnd; _pos call _insideloop; if (_plantcount >= dayz_maxGlobalPlants) exitWith {}; diff --git a/SQF/dayz_code/compile/local_spawnTraderCities.sqf b/SQF/dayz_code/compile/local_spawnTraderCities.sqf new file mode 100644 index 000000000..ce2472a74 --- /dev/null +++ b/SQF/dayz_code/compile/local_spawnTraderCities.sqf @@ -0,0 +1,25 @@ +private ["_fires","_object","_type"]; + +_fires = [ + "Base_Fire_DZ", + "flamable_DZ", + "Land_Camp_Fire_DZ", + "Land_Campfire", + "Land_Campfire_burning", + "Land_Fire", + "Land_Fire_burning", + "Land_Fire_DZ", + "Land_Fire_barrel", + "Land_Fire_barrel_burning", + "Misc_TyreHeap" +]; + +{ + _type = _x select 0; + _object = _type createVehicleLocal (_x select 1); + _object setDir (_x select 2); + _object setPos (_x select 1); + _object allowDamage false; + if !(_type in _fires) then {_object enableSimulation false;}; + _object setVariable ["", true]; // stops global setVariable by sched_townGenerator +} count _this; \ No newline at end of file diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 85aab56ea..837d44613 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -11,6 +11,8 @@ dayz_sellDistance_vehicle = 10; // Max distance players can sell land vehicles f dayz_sellDistance_boat = 30; // Max distance players can sell boats from at traders dayz_sellDistance_air = 40; // Max distance players can sell air vehicles from at traders dayz_tameDogs = true; // Allow taming dogs with raw meat +dayz_townGenerator = false; // Spawn vanilla map junk in addition to Epoch DynamicDebris. Only works on Chernarus. +dayz_townGeneratorBlackList = [[4053,11668,0],[11463,11349,0],[6344,7806,0],[1606,7803,0],[12944,12766,0],[5075,9733,0],[12060,12638,0]]; // Town generator will not spawn junk within 150m of these positions. DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with DynamicVehicleDamageHigh = 100; // Max damage random vehicles can spawn with diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 802042f2d..4a0f8d103 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -1,6 +1,7 @@ if (isServer) then { call compile preprocessFileLineNumbers "\z\addons\dayz_server\init\server_functions.sqf"; pvs_processSetAccessCode = compile preprocessFile "\z\addons\dayz_code\eventHandlers\processSetAccessCode.sqf"; + server_spawnTraders = compile preprocessFile "\z\addons\dayz_server\compile\server_spawnTraders.sqf"; }; if (!isDedicated) then { @@ -559,6 +560,7 @@ call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\psrnd.sqf"; // EPOCH ADDITIONS local_lockUnlock = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_lockUnlock.sqf"; //When vehicle is local to unit perform locking vehicle local_gutObjectZ = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_gutObjectZ.sqf"; //Generated on the server (or local to unit) when gutting an object +local_spawnTraderCities = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\local_spawnTraderCities.sqf"; FNC_GetPlayerUID = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_getPlayerUID.sqf"; FNC_GetSetPos = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_getSetPos.sqf"; FNC_GetPos = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fnc_getPos.sqf"; diff --git a/SQF/dayz_code/system/mission/caribou.sqf b/SQF/dayz_code/system/mission/caribou.sqf index 191a90e40..1828234e8 100644 --- a/SQF/dayz_code/system/mission/caribou.sqf +++ b/SQF/dayz_code/system/mission/caribou.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Land_HouseV2_04_interier",[3176.62,3084.62,3.8147e-006],232.688], ["Land_deutshe_mini",[3064.41,3019.06,1.90735e-005],52.1384], ["Land_deutshe_mini",[3267,3095.55,0.00289536],201.515], @@ -271,4 +263,4 @@ private ["_object","_type"]; ["Land_Panelak",[3205.56,3115.54,4.57764e-005],22.4148], ["Land_Panelak",[2701.28,2857.08,-0.00298309],2.37132], ["Land_Panelak2",[2833.77,2849.69,-0.0144768],3.58606] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/chernarus11.sqf b/SQF/dayz_code/system/mission/chernarus11.sqf index d7e9ea522..f91eb8f0b 100644 --- a/SQF/dayz_code/system/mission/chernarus11.sqf +++ b/SQF/dayz_code/system/mission/chernarus11.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Land_Toilet",[11467.2,11341.8,-0.000213623],305.487], ["ClutterCutter_EP1",[11467,11364.1,-3.05176e-005],352.588], ["ClutterCutter_EP1",[11459.2,11355.8,6.10352e-005],352.588], @@ -177,4 +169,4 @@ private ["_object","_type"]; ["MAP_R2_RockWall",[13881,11792.8,-14.3209],142.299], ["MAP_R2_RockTower",[13827.3,11770.9,-13.6761],0], ["MAP_R2_Rock1",[13817.8,11746.1,-27.2185],68.5491] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/chernarus17.sqf b/SQF/dayz_code/system/mission/chernarus17.sqf index 30e559313..c0dbc93a7 100644 --- a/SQF/dayz_code/system/mission/chernarus17.sqf +++ b/SQF/dayz_code/system/mission/chernarus17.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["TK_GUE_WarfareBLightFactory_base_EP1",[6391.96,7790.32,-0.287811],127.766], ["USMC_WarfareBHeavyFactory",[6334.75,7787.43,-0.344269],301.11], ["Land_HBarrier_large",[6314.71,7784.7,-0.201874],303.427], @@ -323,4 +315,4 @@ private ["_object","_type"]; ["MAP_R2_RockWall",[13881,11792.8,-14.3209],142.299], ["MAP_R2_RockTower",[13827.3,11770.9,-13.6761],0], ["MAP_R2_Rock1",[13817.8,11746.1,-27.2185],68.5491] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/fapovo.sqf b/SQF/dayz_code/system/mission/fapovo.sqf index fdc9777ee..3c3d3ad15 100644 --- a/SQF/dayz_code/system/mission/fapovo.sqf +++ b/SQF/dayz_code/system/mission/fapovo.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Land_HBarrier3",[4497.23,500.156,1.62125e-005],90.5858], ["Land_HBarrier3",[4497.18,496.827,1.62125e-005],91.2531], ["HeliHCivil",[4534.61,484.35,9.53674e-007],0], @@ -177,4 +169,4 @@ private ["_object","_type"]; ["Land_Fire_barrel",[4353.02,3655.65,0],48.8184], ["Land_Fire_barrel",[3390.93,4098.64,-1.52588e-005],153.856], ["Land_A_Hospital",[3307.93,1509.43,-1.14441e-005],0.916192] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/fdf_isle1_a.sqf b/SQF/dayz_code/system/mission/fdf_isle1_a.sqf index 5b653d6ff..1cf12806a 100644 --- a/SQF/dayz_code/system/mission/fdf_isle1_a.sqf +++ b/SQF/dayz_code/system/mission/fdf_isle1_a.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Land_Panelak",[10814.4,6847.01,7.62939e-006],9.06501], ["Land_Panelak2",[10773.3,6853.5,0.00943375],9.27016], ["Land_Panelak",[8601.17,7745.84,-0.00204086],5.46415e-005], @@ -164,4 +156,4 @@ private ["_object","_type"]; ["Info_Board_EP1",[9761.01,4032.71,-3.52859e-005],57.3271], ["Info_Board_EP1",[13575.6,7499.29,0.000282288],90.123], ["HeliHCivil",[7990.66,10591.1,2.47955e-005],0] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/isladuala.sqf b/SQF/dayz_code/system/mission/isladuala.sqf index 997d0e6cf..5c3d67e6d 100644 --- a/SQF/dayz_code/system/mission/isladuala.sqf +++ b/SQF/dayz_code/system/mission/isladuala.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Land_CamoNetVar_NATO_EP1",[4968.55,5115.17,-0.000116348],269.665], ["AmmoCrates_NoInteractive_Large",[4972.43,5108.36,1.90735e-005],0], ["AmmoCrates_NoInteractive_Large",[4970.84,5108.35,0],0], @@ -308,4 +300,4 @@ private ["_object","_type"]; ["MAP_Barbedwire",[8410.45,3359.27,6.77109e-005],342.125], ["ASC_EU_LHSOld",[8410.74,3380.06,6.67572e-006],0], ["ASC_EU_LHSOld",[8418.09,3380.07,4.76837e-006],0] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/lingor.sqf b/SQF/dayz_code/system/mission/lingor.sqf index a08fbddb7..4f674df62 100644 --- a/SQF/dayz_code/system/mission/lingor.sqf +++ b/SQF/dayz_code/system/mission/lingor.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["HeliHEmpty",[4259.78,4481.99,3.8147e-006],0], ["ClutterCutter_small_EP1",[4259.84,4482,7.62939e-006],0], ["ClutterCutter_small_EP1",[4260.19,4479.8,0],0], @@ -251,4 +243,4 @@ private ["_object","_type"]; ["HeliHEmpty",[9297.45,3854.4,1.33514e-005],0.000364386], ["HeliHCivil",[4210.44,1480.93,0],0], ["Land_HBarrier_large",[4148.3,1479.76,0.0176926],92.8137] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/namalsk.sqf b/SQF/dayz_code/system/mission/namalsk.sqf index 3b6df5da5..67fe6fd6b 100644 --- a/SQF/dayz_code/system/mission/namalsk.sqf +++ b/SQF/dayz_code/system/mission/namalsk.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Land_nam_container",[5814.85,10756.1,0.0605183],22.2716], ["sad_target",[5761.08,10776,1.90735e-006],3.09283], ["Land_bags_EP1",[5777.86,10773.9,1.90735e-006],287.546], @@ -122,4 +114,4 @@ private ["_object","_type"]; ["Land_Fire_barrel_burning",[6294.21,9927.04,0.573409],0], ["FlagCarrierTFKnight_EP1",[6276.49,9401.92,-0.090519],82.954], ["Land_Fire_barrel_burning",[6275.86,9406.17,0],358.888] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/napf.sqf b/SQF/dayz_code/system/mission/napf.sqf index 65972b582..c10ee7a4c 100644 --- a/SQF/dayz_code/system/mission/napf.sqf +++ b/SQF/dayz_code/system/mission/napf.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Base_WarfareBBarrier10xTall",[5144.42,4891.09,-0.0578766],348.934], ["Base_WarfareBBarrier10xTall",[5131.46,4883.35,-7.62939e-006],308.557], ["Base_WarfareBBarrier10xTall",[5124.51,4870.26,1.52588e-005],96.6995], @@ -268,4 +260,4 @@ private ["_object","_type"]; ["Land_HBarrier3",[15473.1,13212.3,-0.00374699],106.213], ["Land_HBarrier3",[15455.8,13214.6,0.00995064],297.611], ["Land_HBarrier3",[15507,13213.2,0.228428],99.1406] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/panthera2.sqf b/SQF/dayz_code/system/mission/panthera2.sqf index 3da1f9696..2406567ca 100644 --- a/SQF/dayz_code/system/mission/panthera2.sqf +++ b/SQF/dayz_code/system/mission/panthera2.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["FoldTable",[5228.67,8228.66,0.042855],79.4854], ["Misc_cargo_cont_net1",[5230.59,8226.28,0.0813622],316.626], ["FoldTable",[8682.76,3144.95,-2.38419e-007],93.7729], @@ -123,4 +115,4 @@ private ["_object","_type"]; ["Land_Fire_barrel",[7223.86,733.89,0.000946999],0.0379978], ["Land_Fire_barrel",[4409.02,1627.98,0.000356674],122.863], ["Land_Fire_barrel",[3794.43,7652.93,3.1340871],0] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/provinggrounds_pmc.sqf b/SQF/dayz_code/system/mission/provinggrounds_pmc.sqf index 64ba92d0e..e335f7452 100644 --- a/SQF/dayz_code/system/mission/provinggrounds_pmc.sqf +++ b/SQF/dayz_code/system/mission/provinggrounds_pmc.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["CinderWallDoorway_DZ",[976.984,1215.27,-0.443199],39.1121], ["CinderWallDoorway_DZ",[945.555,1214.62,-0.101315],313.555], ["CinderWall_DZ",[972.241,1216.92,-3.8147e-006],359.214], @@ -298,4 +290,4 @@ private ["_object","_type"]; ["FlagCarrierOPFOR_EP1",[931.994,1211.14,0.0169449],198.708], ["FlagCarrierOPFOR_EP1",[944.925,1178.76,5.71742],198.708], ["FlagCarrierOPFOR_EP1",[948.911,1174.81,5.66268],198.708] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/sauerland.sqf b/SQF/dayz_code/system/mission/sauerland.sqf index dc09373eb..31269d22d 100644 --- a/SQF/dayz_code/system/mission/sauerland.sqf +++ b/SQF/dayz_code/system/mission/sauerland.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Land_Misc_Cargo1E_EP1",[24774.1,21743.7,-6.10352e-005],0], ["Misc_Cargo1B_military",[24753.7,21727.4,6.10352e-005],89.2352], ["Misc_Cargo1Bo_military",[24743,21765.8,9.15527e-005],190.701], @@ -435,4 +427,4 @@ private ["_object","_type"]; ["Misc_cargo_cont_net3",[2445.79,3894.76,0.0341797],264.582], ["FoldChair",[2446.56,3898.81,0.000793457],103.739], ["FoldTable",[2444.96,3899.14,0.000640869],267.556] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/shapur_baf.sqf b/SQF/dayz_code/system/mission/shapur_baf.sqf index 7fa8405fa..c8de2dbfc 100644 --- a/SQF/dayz_code/system/mission/shapur_baf.sqf +++ b/SQF/dayz_code/system/mission/shapur_baf.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Hhedgehog_concreteBig",[511.733,1114.73,6.48499e-005],55.9089], ["Land_fort_rampart",[483.471,1123.38,0.0291862],119.365], ["Land_HBarrier5",[471.117,1086.12,0.0186958],37.8488], @@ -69,4 +61,4 @@ private ["_object","_type"]; ["BMP2Wreck",[472.932,1069.16,0.0105076],54.1738], ["Misc_palletsfoiled_heap",[496.077,1082.61,-0.00848007],62.6169], ["Info_Board_EP1",[505.839,1120,0.00104141],40.2667] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/smd_sahrani_a2.sqf b/SQF/dayz_code/system/mission/smd_sahrani_a2.sqf index 3c59e8edf..f89351bf4 100644 --- a/SQF/dayz_code/system/mission/smd_sahrani_a2.sqf +++ b/SQF/dayz_code/system/mission/smd_sahrani_a2.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["ZavoraAnim",[17198.7,13588.3,-0.0541573],251.772], ["Land_CncBlock",[17193,13565.5,0.00304031],160.854], ["Land_CncBlock",[17195.3,13598.9,0.00148773],243.816], @@ -153,4 +145,4 @@ private ["_object","_type"]; ["Misc_cargo_cont_small2",[13246.9,11188.1,7.62939e-006],88.3989], ["AmmoCrate_NoInteractive_",[13244.1,11192.5,7.62939e-006],0], ["AmmoCrates_NoInteractive_Large",[13247.3,11189.7,-1.90735e-006],0] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/takistan.sqf b/SQF/dayz_code/system/mission/takistan.sqf index 2c1a3d4a7..117817a63 100644 --- a/SQF/dayz_code/system/mission/takistan.sqf +++ b/SQF/dayz_code/system/mission/takistan.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["ZavoraAnim",[1962.88,12543.4,-0.0574036],135.301], ["Land_CncBlock",[1960.52,12541.7,-0.0318298],141.538], ["Land_CncBlock",[1957.36,12539.9,0.000232697],161.408], @@ -316,4 +308,4 @@ private ["_object","_type"]; ["LADAWreck",[10867.4,6319.59,0.00982666],359.859], ["FoldTable",[422.854,5589.3,0.00149536],17.7976], ["Misc_cargo_cont_net1",[428.667,5574.01,0.000213623],323.529] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/tavi.sqf b/SQF/dayz_code/system/mission/tavi.sqf index 19d700c2f..43f7fabe4 100644 --- a/SQF/dayz_code/system/mission/tavi.sqf +++ b/SQF/dayz_code/system/mission/tavi.sqf @@ -3,15 +3,7 @@ Date: 12/11/13 If modified and released give credits where due thank you ---------------------------------------------------------------------------*/ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ // Bandit Vendor Seven ["Land_GuardShed",[10938.7,651.071,0.00558376],214.567], ["HeliHEmpty",[10930.3,639.621,3.91006e-005],214.506], @@ -731,4 +723,4 @@ private ["_object","_type"]; ["MAP_R2_RockWall",[7440.15,5567.71,-20.5011],112.729], ["MAP_R2_RockWall",[7494.54,5608.71,-20.677],290.173], ["MAP_R2_RockWall",[7512.41,5583.7,-12.2722],171.501] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/utes.sqf b/SQF/dayz_code/system/mission/utes.sqf index a8f7953cb..0bec37a1a 100644 --- a/SQF/dayz_code/system/mission/utes.sqf +++ b/SQF/dayz_code/system/mission/utes.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["CDF_WarfareBVehicleServicePoint",[4025.69,2908.12,0.00863075],258.143], ["LADAWreck",[4012.5,2916.29,0.0180664],197.347], ["Land_Misc_Well_C_EP1",[4021.45,2896.22,0.00671959],218.011], @@ -66,4 +58,4 @@ private ["_object","_type"]; ["Fort_StoneWall_EP1",[4022.83,2882.98,0.0588207],342.867], ["T72Wreck",[4022.61,2917.04,0.0561008],339.954], ["Info_Board_EP1",[4012.73,2897.31,0.00329018],262.568] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/mission/zargabad.sqf b/SQF/dayz_code/system/mission/zargabad.sqf index 11459b38a..4590f671b 100644 --- a/SQF/dayz_code/system/mission/zargabad.sqf +++ b/SQF/dayz_code/system/mission/zargabad.sqf @@ -1,12 +1,4 @@ -private ["_object","_type"]; -{ - _type = _x select 0; - _object = _type createVehicleLocal (_x select 1); - _object setDir (_x select 2); - _object setPos (_x select 1); - _object allowDamage false; - if !(_type in ["Land_Campfire","Land_Campfire_burning","Land_Fire","Land_Fire_burning","Land_Fire_barrel","Land_Fire_barrel_burning"]) then {_object enableSimulation false;}; -} count [ +[ ["Land_HBarrier_large",[3619.65,6807.09,-0.222103],351.175], ["Land_HBarrier_large",[3611.36,6805.53,0.000356674],351.138], ["Land_HBarrier_large",[3603.07,6803.98,0.000679016],351.144], @@ -92,4 +84,4 @@ private ["_object","_type"]; ["Land_Fire_barrel",[3577.17,6830.6,0.000236511],359.997], ["Info_Board_EP1",[3612.99,6829.27,0.000593185],86.5122], ["Land_Fire_barrel",[4723.34,833.238,0.000152588],0.00214848] -]; \ No newline at end of file +] call local_spawnTraderCities; \ No newline at end of file diff --git a/SQF/dayz_code/system/scheduler/sched_towngenerator.sqf b/SQF/dayz_code/system/scheduler/sched_towngenerator.sqf index 6c5db23d1..732ab195e 100644 --- a/SQF/dayz_code/system/scheduler/sched_towngenerator.sqf +++ b/SQF/dayz_code/system/scheduler/sched_towngenerator.sqf @@ -89,7 +89,7 @@ sched_townGenerator_ready = { sched_townGenerator = { HIDE_FSM_VARS private ["_character","_position","_y","_velocity","_iy","_i","_j","_jx", - "_index","_cell","_imax","_object","_onFire", "_x"]; + "_index","_cell","_imax","_object","_onFire", "_x", "_blocked"]; switch true do { case (sched_tg_state == 0): { // look for new cells to show and old cells to hide @@ -159,15 +159,19 @@ sched_townGenerator = { _x = _cell select _i; //sched_tg_newSpawned = sched_tg_newSpawned + 1; if ("" != (_x select 1)) then { - _object = (_x select 1) createVehicleLocal [0,0,0]; + _blocked = if (!dayz_townGenerator or {toLower worldName != "chernarus"}) then {true} else {false}; _position = _x select 2; - _object setDir (_x select 3); - _object setPos [_position select 0,_position select 1,0]; - _object setPosATL _position; - _object allowDamage false; - //_onFire ... - _object setVariable ["", true]; // SV used by player_spawnCheck, exists if object is local - _x set [ 0, _object ]; // object reference for faster delete + {if (_position distance _x < 150) exitWith {_blocked = true;};} forEach dayz_townGeneratorBlackList; + if (!_blocked) then { + _object = (_x select 1) createVehicleLocal [0,0,0]; + _object setDir (_x select 3); + _object setPos [_position select 0,_position select 1,0]; + _object setPosATL _position; + _object allowDamage false; + //_onFire ... + _object setVariable ["", true]; // SV used by player_spawnCheck, exists if object is local + _x set [ 0, _object ]; // object reference for faster delete + }; }; }; sched_tg_var2 = _imax; diff --git a/SQF/dayz_server/compile/server_spawnEvent.sqf b/SQF/dayz_server/compile/server_spawnEvent.sqf index b89755a03..ffafc9077 100644 --- a/SQF/dayz_server/compile/server_spawnEvent.sqf +++ b/SQF/dayz_server/compile/server_spawnEvent.sqf @@ -50,6 +50,7 @@ while {1 == 1} do { //diag_log ("EVENTS: Local Time is: " + _datestr); { + if (!EpochUseEvents) exitWith {}; if([[(_x select 0),(_x select 1),(_x select 2),(_x select 3),(_x select 4)],_date] call epoch_eventIsAny) then { diag_log ("RUNNING EVENT: " + (_x select 5) + " on " + _datestr); _handle = [] execVM "\z\addons\dayz_server\modules\" + (_x select 5) + ".sqf"; diff --git a/SQF/dayz_server/compile/server_spawnTraders.sqf b/SQF/dayz_server/compile/server_spawnTraders.sqf new file mode 100644 index 000000000..1216e5c5a --- /dev/null +++ b/SQF/dayz_server/compile/server_spawnTraders.sqf @@ -0,0 +1,23 @@ +private "_trader"; +{ + _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; + {_trader removeMagazine _x;} count magazines _trader; + removeAllItems _trader; + removeAllWeapons _trader; + removeBackpack _trader; + _trader switchMove ""; + _trader setDir (_x select 2); + _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; + _trader setUnitAbility 0.6; + _trader disableAI "ANIM"; + _trader disableAI "AUTOTARGET"; + _trader disableAI "FSM"; + _trader disableAI "MOVE"; + _trader disableAI "TARGET"; + _trader setBehaviour "CARELESS"; + _trader forceSpeed 0; + _trader allowDamage false; + _trader enableSimulation false; +} count _this; + +processInitCommands; \ No newline at end of file diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf index 254a899d2..394e7f8d4 100644 --- a/SQF/dayz_server/system/server_monitor.sqf +++ b/SQF/dayz_server/system/server_monitor.sqf @@ -376,7 +376,7 @@ if (_hiveLoaded) then { }; }; -if (EpochUseEvents) then {[] spawn server_spawnEvents;}; +[] spawn server_spawnEvents; _debugMarkerPosition = getMarkerPos "respawn_west"; _debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition select 1),1]; _vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"]; diff --git a/SQF/dayz_server/traders/caribou.sqf b/SQF/dayz_server/traders/caribou.sqf index 12a2bec8c..ca329570c 100644 --- a/SQF/dayz_server/traders/caribou.sqf +++ b/SQF/dayz_server/traders/caribou.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["Ins_Woodlander3",[1390.53,6944.12,0],91.0347], ["Ins_Worker2",[1394.03,6980.33,0],184.047], ["Ins_Soldier_Sapper",[1399.69,6932.11,0],294.801], @@ -39,6 +19,4 @@ private "_trader"; ["RU_Farmwife4",[3945.8,879.502,0.474328],318.246], ["CIV_Contractor1_BAF",[3932.26,883.862,0],299.434], ["GUE_Soldier_GL",[5345.35,2304.45,0],45.3277] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/chernarus11.sqf b/SQF/dayz_server/traders/chernarus11.sqf index dc8ffdb51..cfc478343 100644 --- a/SQF/dayz_server/traders/chernarus11.sqf +++ b/SQF/dayz_server/traders/chernarus11.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["Profiteer4",[11449.5,11341,0],34.5259], ["RU_Villager3",[7996.1,2899.08,0.669153],86.8589], ["Worker3",[4041.62,11668.9,0],24.9128], @@ -45,6 +25,4 @@ private "_trader"; ["HouseWife1",[13468.4,5439.58,2.55675],268.259], ["Doctor",[4059.44,11660.4,0],24.2669], ["GUE_Woodlander2",[6321.04,7781.03,0],9.66389] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/chernarus17.sqf b/SQF/dayz_server/traders/chernarus17.sqf index af0ece876..f0b0f86ed 100644 --- a/SQF/dayz_server/traders/chernarus17.sqf +++ b/SQF/dayz_server/traders/chernarus17.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["FR_Sykes",[1100.26,2854.37,0],179.651], ["GUE_Villager4",[8387.1,2369.31,0],171.998], ["GUE_Soldier_CO",[13246.2,6071.39,0],5.43464], @@ -45,6 +25,4 @@ private "_trader"; ["BAF_Soldier_EN_MTP",[11460.6,11395.9,0],151.445], ["Herrera_Light",[11468,11394.9,0],197.338], ["US_Delta_Force_Medic_EP1",[11474.3,11389.6,3.05176e-005],243.732] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/fapovo.sqf b/SQF/dayz_server/traders/fapovo.sqf index 31e35cfef..f2d9dc436 100644 --- a/SQF/dayz_server/traders/fapovo.sqf +++ b/SQF/dayz_server/traders/fapovo.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["GUE_Soldier_Pilot",[4492.61,497.43,0],91.0957], ["Dr_Annie_Baker_EP1",[3692.96,2407.95,0],68.8732], ["GUE_Villager3",[3714.29,2411.41,0],197.464], @@ -37,6 +17,4 @@ private "_trader"; ["UN_CDF_Soldier_Crew_EP1",[3524.35,3132.55,2.04632],203.272], ["GUE_Soldier_Scout",[3702.17,2414.24,0],134.771], ["FR_Assault_R",[4677.69,1880.11,0],235.28] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/fdf_isle1_a.sqf b/SQF/dayz_server/traders/fdf_isle1_a.sqf index 0d0f8b94a..e36030aa5 100644 --- a/SQF/dayz_server/traders/fdf_isle1_a.sqf +++ b/SQF/dayz_server/traders/fdf_isle1_a.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["GUE_Soldier_Pilot",[8150.32,4332.67,0],200.831], ["Soldier_MG_PKM_PMC",[9652.11,10879.6,0],351.272], ["Soldier_GL_M16A2_PMC",[9655.04,10879.7,0],0], @@ -38,6 +18,4 @@ private "_trader"; ["GUE_Soldier_3",[14834.7,7661,0],185.512], ["GUE_Soldier_1",[10033.4,5945.52,0],181.422], ["Soldier_TL_PMC",[7978.67,10585,0.100001],255.138] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/isladuala.sqf b/SQF/dayz_server/traders/isladuala.sqf index 2b8ef5406..5d581cd53 100644 --- a/SQF/dayz_server/traders/isladuala.sqf +++ b/SQF/dayz_server/traders/isladuala.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["Worker2",[5976.3,6163.73,0],220], ["GUE_Soldier_MG",[8414.86,3368.66,0],332.222], ["Soldier_GL_M16A2_PMC",[7222.37,2132.95,0],66.7588], @@ -45,6 +25,4 @@ private "_trader"; ["Doctor",[1998.78,1197.31,0],9.42608], ["UN_CDF_Soldier_Pilot_EP1",[1988.5,1124.82,0],78.2134], ["TK_CIV_Takistani04_EP1",[1999,1207.14,0],189.798] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/lingor.sqf b/SQF/dayz_server/traders/lingor.sqf index 6b515c6c7..395425acf 100644 --- a/SQF/dayz_server/traders/lingor.sqf +++ b/SQF/dayz_server/traders/lingor.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["RU_Worker1",[4250.4,4481.94,3.83037],13.247], ["Citizen2_EP1",[3011.97,5934.86,3.83121],7.30765], ["Worker1",[3005.1,5931.66,0.280014],267.201], @@ -50,6 +30,4 @@ private "_trader"; ["RU_Doctor",[6678.15,4294.7,0.559301],15.4701], ["TK_CIV_Takistani04_EP1",[4099.89,9243.42,0],170.867], ["Functionary1",[4144.02,1478.63,0],107.247] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/namalsk.sqf b/SQF/dayz_server/traders/namalsk.sqf index 168b5720f..7532eabfa 100644 --- a/SQF/dayz_server/traders/namalsk.sqf +++ b/SQF/dayz_server/traders/namalsk.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["GUE_Villager4",[5764.49,10776.7,0],357.216], ["RU_Farmwife4",[5776.19,10776,0],0], ["Soldier_Sniper_PMC",[4700.25,8918.91,3.90547],78.7732], @@ -37,6 +17,4 @@ private "_trader"; ["UN_CDF_Soldier_MG_EP1",[8885.9,10755.4,0],84.4804], ["RU_Farmwife3",[4297.91,4782.7,0.180385],302.864], ["UN_CDF_Soldier_Pilot_EP1",[6280.84,9403.42,0.170948],124.436] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/napf.sqf b/SQF/dayz_server/traders/napf.sqf index 91fbe86b1..05a82e6d3 100644 --- a/SQF/dayz_server/traders/napf.sqf +++ b/SQF/dayz_server/traders/napf.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["Soldier_MG_PKM_PMC",[8264.54,15495.9,3.55006],56.1028], ["GUE_Woodlander3",[8266.67,15482.2,0.123269],218.236], ["GUE_Woodlander2",[8254.95,15509.6,0.250067],189.353], @@ -45,6 +25,4 @@ private "_trader"; ["Drake_Light",[15128.7,16420.9,0.0772419],134.335], ["Damsel5",[15536.5,13224.5,0],0], ["pook_Doc_Bell47",[8269.49,15490.6,0.250063],255.248] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/panthera2.sqf b/SQF/dayz_server/traders/panthera2.sqf index 098835df7..88c63c34f 100644 --- a/SQF/dayz_server/traders/panthera2.sqf +++ b/SQF/dayz_server/traders/panthera2.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["GUE_Soldier_Pilot",[4767.63,7481.72,0],339.697], ["UN_CDF_Soldier_MG_EP1",[5229.55,8228.63,0],228.41], ["GUE_Woodlander3",[8681.8,3145.08,0],108.462], @@ -46,6 +26,4 @@ private "_trader"; ["Dr_Hladik_EP1",[4430.79,1627.1,0],353.988], ["Soldier_PMC",[4422.88,1619.82,0],283.135], ["RU_Villager1",[3794.38,7651.18,3.35373],122.195] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/sauerland.sqf b/SQF/dayz_server/traders/sauerland.sqf index b14476b26..60170c460 100644 --- a/SQF/dayz_server/traders/sauerland.sqf +++ b/SQF/dayz_server/traders/sauerland.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["Damsel4",[24732.8,21743.2,0],64.5643], ["Rocker2",[24754.1,21753.2,0],233.194], ["Dr_Hladik_EP1",[24729.2,21755.9,0.016571],104.384], @@ -43,6 +23,4 @@ private "_trader"; ["MVD_Soldier_Marksman",[16890.6,1780.76,0],31.9086], ["Soldier_MG_PMC",[223.627,22712.1,0],129.516], ["GUE_Soldier_MG",[2446.07,3899.76,0],262.573] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/smd_sahrani_a2.sqf b/SQF/dayz_server/traders/smd_sahrani_a2.sqf index 5cff9e1c4..e4dd22183 100644 --- a/SQF/dayz_server/traders/smd_sahrani_a2.sqf +++ b/SQF/dayz_server/traders/smd_sahrani_a2.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["Profiteer4",[17176.2,13586.9,0],73.4977], ["RU_Villager3",[19245.6,13587,2.55686],275.413], ["Worker3",[14280.5,12382.6,0],345.399], @@ -45,6 +25,4 @@ private "_trader"; ["HouseWife1",[13488.9,6891.06,3.55589],268.259], ["Doctor",[14263.7,12434.9,0],95.8567], ["Soldier_GL_PMC",[13243.8,11189.8,0],260.76] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/takistan.sqf b/SQF/dayz_server/traders/takistan.sqf index 4eb9bac9b..94e6f7e7e 100644 --- a/SQF/dayz_server/traders/takistan.sqf +++ b/SQF/dayz_server/traders/takistan.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["TK_CIV_Takistani03_EP1",[1963.87,12560.5,0],44.3217], ["TK_CIV_Woman03_EP1",[1957.42,12568.2,0],39.6604], ["TK_CIV_Woman02_EP1",[1953.5,12571.8,0],40.8509], @@ -39,6 +19,4 @@ private "_trader"; ["RU_Citizen4",[11127.3,12662.9,0],198.318], ["TK_GUE_Soldier_Sniper_EP1",[748.843,10485.5,0],138.185], ["Soldier_MG_PKM_PMC",[8030.74,2005.81,0],175.928] -]; - -processInitCommands; +] call server_spawnTraders; diff --git a/SQF/dayz_server/traders/tavi.sqf b/SQF/dayz_server/traders/tavi.sqf index 9eb14321a..b28b53e21 100644 --- a/SQF/dayz_server/traders/tavi.sqf +++ b/SQF/dayz_server/traders/tavi.sqf @@ -3,27 +3,7 @@ Date: 12/11/13 If modified and released give credits where due thank you ---------------------------------------------------------------------------*/ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ // Branibor ["GUE_Soldier_3",[7344.24,4301.96,0],70.4169], // Hero @@ -80,6 +60,4 @@ private "_trader"; ["GUE_Commander",[4073.06,7257.97,0],323.041], ["GUE_Soldier_CO",[4074.76,7260.08,0],276.96], ["GUE_Soldier_2",[13340.8,8610.9,0.466263],38.7793] -]; - -processInitCommands; \ No newline at end of file +] call server_spawnTraders; \ No newline at end of file diff --git a/SQF/dayz_server/traders/zargabad.sqf b/SQF/dayz_server/traders/zargabad.sqf index 06b94cf36..f1e1306b5 100644 --- a/SQF/dayz_server/traders/zargabad.sqf +++ b/SQF/dayz_server/traders/zargabad.sqf @@ -1,24 +1,4 @@ -private "_trader"; -{ - _trader = createAgent [_x select 0,_x select 1,[],0,"CAN_COLLIDE"]; - {_trader removeMagazine _x;} count magazines _trader; - removeAllItems _trader; - removeAllWeapons _trader; - removeBackpack _trader; - _trader switchMove ""; - _trader setDir (_x select 2); - _trader setVehicleInit "this disableAI 'ANIM'; this disableAI 'AUTOTARGET'; this disableAI 'FSM'; this disableAI 'MOVE'; this disableAI 'TARGET'; this setBehaviour 'CARELESS'; this forceSpeed 0; this allowDamage false;"; - _trader setUnitAbility 0.6; - _trader disableAI "ANIM"; - _trader disableAI "AUTOTARGET"; - _trader disableAI "FSM"; - _trader disableAI "MOVE"; - _trader disableAI "TARGET"; - _trader setBehaviour "CARELESS"; - _trader forceSpeed 0; - _trader allowDamage false; - _trader enableSimulation false; -} count [ +[ ["Worker1",[3566.8,6822.43,0],93.1203], ["Dr_Hladik_EP1",[3574.53,6826.01,0],59.3184], ["CIV_EuroWoman01_EP1",[3567.5,6825.62,0],129.565], @@ -31,6 +11,4 @@ private "_trader"; ["Tanny_PMC",[3569.91,6818.85,1.90735e-006],36.4783], ["Profiteer4",[3573.85,6817.57,0],42.3124], ["TK_CIV_Takistani04_EP1",[4722.18,825.216,0],0] -]; - -processInitCommands; +] call server_spawnTraders;