Jump to content

Fuchs

Member
  • Posts

    406
  • Joined

  • Days Won

    5

Posts posted by Fuchs

  1. Definitely a YES ! 

     

    Preview

    //Weapon Cache ported from EMS 1st Testpreview
    
    private ["_position","_box","_missiontimeout","_cleanmission","_playerPresent","_starttime","_currenttime","_cleanunits","_rndnum","_vehname","_veh","_position","_vehclass","_vehdir","_objPosition"];
    _vehclass = "SUV_Camo";
    _vehclass = "UAZ_Unarmed_UN_EP1";
    
    _vehname	= getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");
    _position = [getMarkerPos "center",0,5800,10,0,2200,0] call BIS_fnc_findSafePos;
    diag_log format["WAI: Mission Weapon Cache Started At %1",_position];
    
    
    _box = createVehicle ["US_VehicleBox",[(_position select 0),(_position select 1),0], [], 0, "CAN_COLLIDE"];
    [_box] call Medium_Gun_Box;
    
    //SUV_Camo/UAZ_Unarmed_UN_EP1
    _veh = createVehicle [_vehclass,_position, [], 0, "CAN_COLLIDE"];
    _vehdir = round(random 360);
    _veh setDir _vehdir;
    clearWeaponCargoGlobal _veh;
    clearMagazineCargoGlobal _veh;
    _veh setVariable ["ObjectID","1",true];
    PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_veh];
    diag_log format["WAI: EMS ported Mission Weapon Cache spawned a %1",_vehname];
    
    _objPosition = getPosATL _veh;
    //[_veh,[_vehdir,_objPosition],_vehclass,true,"0"] call custom_publish;
    
    //Troops
    _rndnum = round (random 3) + 4;
    [[_position select 0, _position select 1, 0],                  //position
    _rndnum,						  //Number Of units
    1,					      //Skill level 0-1. Has no effect if using custom skills
    "Random",			      //Primary gun set number. "Random" for random weapon set.
    6,						  //Number of magazines
    "",						  //Backpack "" for random or classname here.
    "Bandit2_DZ",			  //Skin "" for random or classname here.
    "Random",				  //Gearset number. "Random" for random gear set.
    true
    ] call spawn_group;
    
    [[_position select 0, _position select 1, 0],                  //position
    4,						  //Number Of units
    1,					      //Skill level 0-1. Has no effect if using custom skills
    "Random",			      //Primary gun set number. "Random" for random weapon set.
    4,						  //Number of magazines
    "",						  //Backpack "" for random or classname here.
    "Bandit2_DZ",			  //Skin "" for random or classname here.
    "Random",				  //Gearset number. "Random" for random gear set.
    true
    ] call spawn_group;
    
    [[[(_position select 0), (_position select 1) + 10, 0],[(_position select 0) + 10, (_position select 1), 0]], //position(s) (can be multiple).
    "M2StaticMG",             //Classname of turret
    0.8,					  //Skill level 0-1. Has no effect if using custom skills
    "Bandit2_DZ",			  //Skin "" for random or classname here.
    2,						  //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
    2,						  //Number of magazines. (not needed if ai_static_useweapon = False)
    "",						  //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
    "Random",				  //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
    true
    ] call spawn_static;
    
    
    [_position,"Weapon cache"] execVM "\z\addons\dayz_server\WAI\missions\compile\markers.sqf";
    [nil,nil,rTitleText,"Bandits have obtained a weapon crate! Check your map for the location!", "PLAIN",10] call RE;
    
    _missiontimeout = true;
    _cleanmission = false;
    _playerPresent = false;
    _starttime = floor(time);
    while {_missiontimeout} do {
    	sleep 5;
    	_currenttime = floor(time);
    	{if((isPlayer _x) AND (_x distance _position <= 150)) then {_playerPresent = true};}forEach playableUnits;
    	if (_currenttime - _starttime >= wai_mission_timeout) then {_cleanmission = true;};
    	if ((_playerPresent) OR (_cleanmission)) then {_missiontimeout = false;};
    };
    if (_playerPresent) then {
    	waitUntil
    	{
    		sleep 5;
    		_playerPresent = false;
    		{if((isPlayer _x) AND (_x distance _position <= 30)) then {_playerPresent = true};}forEach playableUnits;
    		(_playerPresent)
    	};
    	diag_log format["WAI: Mission Weapon cache Ended At %1",_position];
    	[nil,nil,rTitleText,"Survivors have secured the Weapon Cache!", "PLAIN",10] call RE;
    } else {
    	clean_running_mission = True;
    	deleteVehicle _box;
    	{_cleanunits = _x getVariable "missionclean";
    	if (!isNil "_cleanunits") then {
    		switch (_cleanunits) do {
    			case "ground" :  {ai_ground_units = (ai_ground_units -1);};
    			case "air" :     {ai_air_units = (ai_air_units -1);};
    			case "vehicle" : {ai_vehicle_units = (ai_vehicle_units -1);};
    			case "static" :  {ai_emplacement_units = (ai_emplacement_units -1);};
    		};
    		deleteVehicle _x;
    		sleep 0.05;
    	};	
    	} forEach allUnits;
    	
    	diag_log format["WAI: Mission Weapon cache timed out At %1",_position];
    	[nil,nil,rTitleText,"Survivors did not secure the Weapon Cache in time!", "PLAIN",10] call RE;
    };
    
    missionrunning = false;
    

    PREVIEW

  2. http://tactical.nekromantix.com/wiki/doku.php?id=arma2:scripting:bis_fnc_findsafepos

     

    1 Position

    2 Minimum distance

    3 Maximum distance

    4 Maximum distance from nearest object

    5 0 - cant be in water, 1 - ?

    6 Terrain gradient (how steep terrain)

    7 0 - shore mode; does not have to be in shore

    _newPos = [_pos, 0, 500, 30, 0, 20, 0] call BIS_fnc_findSafePos;

     

    Look at nr5 if zero it wont spawn in water hence no SafePos

     

    and 6 for mountain sloop

     

     

    @Fubar

     

    If you look at the server_spawnCarshSite.sqf at line 40 see:

        diag_log(format["CRASHSPAWNER: %1%2 chance to spawn '%3' with loot table '%4' in %5 secounds", round(_spawnChance * 100), '%', _crashName, _lootTable, _timeToSpawn]);

     

    Its harmless its a comment line from diag_log(ging) aka what u see in the server.RPT

     

     

    i posted the link u posted a few dayz on the first line ,but forgot on git ^^

  3. hm jsut updating my entire server to 1.0.4 ! 

    server_checkHackers = {
    	if (DZE_DYN_AntiStuck2nd > 3) then { DZE_DYN_HackerCheck = nil; DZE_DYN_AntiStuck2nd = 0; };
    	if(!isNil "DZE_DYN_HackerCheck") exitWith {  DZE_DYN_AntiStuck2nd = DZE_DYN_AntiStuck2nd + 1;};
    	DZE_DYN_HackerCheck = true;
    	{
    		if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle)) then {
    			diag_log ("CLEANUP: KILLING A HACKER " + (name _x) + " " + str(_x) + " IN " + (typeOf vehicle _x));
    			(vehicle _x) setDamage 1;
    			_x setDamage 1;
    			sleep 0.25;
    		};
    		sleep 0.001;
    	} forEach allUnits;
    	DZE_DYN_HackerCheck = nil;
    

    found in server functions thx for the hint ritualmsry!

  4. @ bodyclean.sqf

     

    delete this part 

    _aikiller = _this select 1;
    _aikiller_name = name _aikiller;
    _humanityBoost = 200; //Set this to whatever you want the humanity to increase by
    
    _humanity = _aikiller getVariable ["humanity",0];
    _humanity = _humanity + _humanityBoost;
    _aikiller setVariable["humanity", _humanity,true];
    
    _killsB = _aikiller getVariable["banditKills",0];
    _killsB = _killsB + 1;
    _aikiller setVariable["banditKills",_killsB,true];
    
    diag_log format ["EMS: AI %1 was killed by %2 (+%3 humanity, new total %4)",_ai_type,_aikiller_name,_humanityBoost,_humanity];
    
×
×
  • Create New...