Jump to content

[Release] Wicked AI 2.2.0


f3cuk

Recommended Posts

MatthewK, the line:

 

_vehicle addEventHandler ["GetIn",{_nil = [nil,(_this select 2),"loc",rTITLETEXT,"Warning: This vehicle will disappear on server restart!","PLAIN DOWN",5] call RE;}]; 

 

replaces the _vehicle at the bottom of the file?  Or some place else near the end?  I did the replace but no msg on-screen or error or warning in the .rpt file.

 

oSo, I did see that but wasn't sure whether it left all vehicles on the map, all keyed vehicles on the map, or only keyed vehicles for which a player has the key.  I hadn't actually made the change to test which one it really is.  And will that not display the msg about vehicles disappearing when they have a key? 

 

Bob

Link to comment
Share on other sites

@Bob,

 

Basically it will save all vehicles from the completed missions weather the key is obtained or not. So to unlock the vehicles that get stranded and locked, you can use the findkeycount function along with the unlocknonkey vehicles event to unlock them once a day so they can be taken and sold and arent wasting space in the DB. The event will only unlock vehicles that are locked with no key in existence, so no one who gets the key has to worry about their vehicle unlocking and being stolen.

Link to comment
Share on other sites

A couple of quick question guys.

 

I've got everything running, missions plus one each of the static types. They are all working fine.

I know I can have multiple machinegun placements, but can I have multiples of the others? The static group, paradrop and patrols? And if so, how to I implement them?

 

Also I can't seem to find a way to set the respawn time for the static types. Where would that be?

 

I've searched around and googled, but I guess I'm missing the answers to this.

 

Thanks so much!

 

I dont believe this script supports respawn for static AI, And to add more groups, paradrops etc...Just add another under the existing like so:

	[
		[17472.4,5255.22,0.001],			// Position
		8,									// Number Of units
		"Random",							// Skill level of unit (easy, medium, hard, extreme, Random)
		"Random",						       // Primary gun set number or gun and rocket launcher. Syntax is "Random", for gun only or ["Random","AT"], for gun and launcher
		4,									// Number of magazines
		"Random",							// Backpack classname, use "Random" or classname here
		"Random",							// Skin classname, use "Random" or classname here
		"Random",							// Gearset number. "Random" for random gear set
		"Bandit"							// AI Type, "Hero" or "Bandit".
	] call spawn_group;

	[
		[17472.4,5255.22,0.001],			// Position
		8,									// Number Of units
		"Random",							// Skill level of unit (easy, medium, hard, extreme, Random)
		"Random",						       // Primary gun set number or gun and rocket launcher. Syntax is "Random", for gun only or ["Random","AT"], for gun and launcher
		4,									// Number of magazines
		"Random",							// Backpack classname, use "Random" or classname here
		"Random",							// Skin classname, use "Random" or classname here
		"Random",							// Gearset number. "Random" for random gear set
		"Bandit"							// AI Type, "Hero" or "Bandit".
	] call spawn_group;

You may notice its all the same top and bottom, I just did a quick copy and paste for an example.   Everything in between  /* .. and .. */ is olnly there for guidance and can be removed completely. It really doenst matter where you call you static spawns as the long as the format for each call is correct.

Link to comment
Share on other sites

@ZyGHeliosProtocol   now u know =)

Do you ever post anything useful? Or you just come on the HELP forums to post garbage like the multiple posts you've made on this topic alone? No one cares that OMG you have such hard AI.... Trust me, you're not the only one.. People have rage quit from Ai on my server.. If his players think its hard, good for them.. 

Link to comment
Share on other sites

Do you ever post anything useful? Or you just come on the HELP forums to post garbage like the multiple posts you've made on this topic alone? No one cares that OMG you have such hard AI.... Trust me, you're not the only one.. People have rage quit from Ai on my server.. If his players think its hard, good for them.. 

This as your 1st post says quite a bit about yourself as well.

Link to comment
Share on other sites

Hey there, great job on updating the script.  I am currently having a problem though.  Mission Ai spawn just fine and work perfectly and seem to "Complete" as intended.  My issue is, while testing my server and leaving it online for 10+ hours, the missions that weren't done by players despawn due to inactivity, as intended as well, but the AI do not.  After looking at my map with admin tools, I can see a dozen or more groups of Ai spread across the map.  I am also having an issue where tons of zombies spawn, making it very very difficult to do anything.  I tested this by disabling my antihack (Infistar) and seems to have fixed the issue.. At least what I could see so far.  Not so many zombies and despawned missions are clear of Ai.  My question is, is there anything I need to add/removed from my AH to fix the issue?  Any help would be greatly appreciated.

 

Thank you,

Chris

Link to comment
Share on other sites

I'm running the 2.2.0 beta now but I can't see how to place custom locations in the mission files now. It looks like it's set up differently now.

 

Mission example: http://pastebin.com/M9j2QfuV (Mayor's Mansion)

 

I placed the line: _positionarray = [[856.919,9370.11,0.001],[3468.97,9430.79,0.001],[4721.69,1951.64,0.001],[8586.69,7174.76,0.001],[869.732,5158.03,0.001]];

 

I don't see the findsafeposition line to remove but I tried commenting out the: _position    = [40] call find_position; 

 

That makes the markers not show so I'm lost...

 

 

How do I use custom coords?

 

 

Thank you.

 

 

Link to comment
Share on other sites

I'm running the 2.2.0 beta now but I can't see how to place custom locations in the mission files now. It looks like it's set up differently now.

 

Mission example: http://pastebin.com/M9j2QfuV (Mayor's Mansion)

 

I placed the line: _positionarray = [[856.919,9370.11,0.001],[3468.97,9430.79,0.001],[4721.69,1951.64,0.001],[8586.69,7174.76,0.001],[869.732,5158.03,0.001]];

 

I don't see the findsafeposition line to remove but I tried commenting out the: _position    = [40] call find_position; 

 

That makes the markers not show so I'm lost...

 

 

How do I use custom coords?

 

 

Thank you.

 

To choose from a random set location for all missions check post. Just replace with your coords.

 

To use a static coord for a specific mission, just open the mission file and change

_position		= [80] call find_position;

to

_position       = [coords here];

or change it to

_coord1         = [coords here];
_coord2         = [coords here];
_coord3         = [coords here];
_coord4         = [coords here];
_coord5         = [coords here];
_position       = [_coord1, _coord2, _coord3, _coord4, _coord5] call BIS_fnc_selectRandom;

to select a random from a few set coords, You can add or remove as many as you want. 

Link to comment
Share on other sites

@oSoDirty

 

Thanks! That's kinda what I thought, but didn't want to take the chance getting the syntax messed up. :P 

 

Ah, ok so that's why I can't find the respawn settings, there aren't any. No worries.

Is it possible to put in a request for that to be added at some later date? That would be awesome.

I know you guys do this on your spare time and I really do appreciate it! :wub:

 

Thanks again.

Link to comment
Share on other sites

_coord1         = [coords here];
_coord2         = [coords here];
_coord3         = [coords here];
_coord4         = [coords here];
_coord5         = [coords here];
_position       = [_coord1, _coord2, _coord3, _coord4, _coord5] call BIS_fnc_selectRandom;

to select a random from a few set coords, You can add or remove as many as you want. 

 

 

Thanks, that seems to work.

 

 

 

I was also wondering how to use the settings in static spawns for aa units.

 

Here is what I tried for Paradrop: 

 

[

        [2587.17,3761.48,0.000282288],    // Position that units will be dropped by

        [0,0,0],                            // Starting position of the heli

        1000,                                // Radius from drop position a player has to be to spawn chopper

        "UH1H_DZ",                            // Classname of chopper (Make sure it has 2 gunner seats!)

        4,                                    // Number of units to be para dropped

        "Random",                            // Skill level of units (easy, medium, hard, extreme, Random)

        "Random","aa",        // Primary gun set number and rocket launcher. "Random" for random weapon set, "at" for anti-tank, "aa" for anti-air launcher

        4,                                    // Number of magazines

        "Random",                            // Backpack classname, use "Random" or classname here

        "Bandit2_DZ",                        // Skin classname, use "Random" or classname here

        "Random",                            // Gearset number. "Random" for random gear set.

        "Bandit",                            // AI Type, "Hero" or "Bandit".

        true                                // true: Aircraft will stay at position and fight. false: Heli will leave if not under fire.

    ] spawn heli_para;

 

Is the "Random","aa", part right?

 

No units paradrop from heli when I test it.

 

I also tried just "aa"

 

Thanks for the help.

Link to comment
Share on other sites

Thanks, that seems to work.

 

 

 

I was also wondering how to use the settings in static spawns for aa units.

 

Here is what I tried for Paradrop: 

 

[

        [2587.17,3761.48,0.000282288],    // Position that units will be dropped by

        [0,0,0],                            // Starting position of the heli

        1000,                                // Radius from drop position a player has to be to spawn chopper

        "UH1H_DZ",                            // Classname of chopper (Make sure it has 2 gunner seats!)

        4,                                    // Number of units to be para dropped

        "Random",                            // Skill level of units (easy, medium, hard, extreme, Random)

        "Random","aa",        // Primary gun set number and rocket launcher. "Random" for random weapon set, "at" for anti-tank, "aa" for anti-air launcher

        4,                                    // Number of magazines

        "Random",                            // Backpack classname, use "Random" or classname here

        "Bandit2_DZ",                        // Skin classname, use "Random" or classname here

        "Random",                            // Gearset number. "Random" for random gear set.

        "Bandit",                            // AI Type, "Hero" or "Bandit".

        true                                // true: Aircraft will stay at position and fight. false: Heli will leave if not under fire.

    ] spawn heli_para;

 

Is the "Random","aa", part right?

 

No units paradrop from heli when I test it.

 

I also tried just "aa"

 

Thanks for the help.

I haven't messed with that particular option, so TBH I'm not sure.   I always left it     "Random",

 

 

 

 

This is mine.

	[
		[17378.5,5241.66,2.6292224],	// Position that units will be dropped by
		[16273.4,7363.43,30.999],							// Starting position of the heli
		40, 								// Radius from drop position a player has to be to spawn chopper
		"UH1H_DZ",							// Classname of chopper (Make sure it has 2 gunner seats!)
		5,									// Number of units to be para dropped
		"Random",							// Skill level of units (easy, medium, hard, extreme, Random)
		"Random",	                 		// Primary gun set number and rocket launcher. "Random" for random weapon set, "at" for anti-tank, "aa" for anti-air launcher
		4,									// Number of magazines
		"Random",							// Backpack classname, use "Random" or classname here
		"Bandit2_DZ",						// Skin classname, use "Random" or classname here
		"Random",							// Gearset number. "Random" for random gear set.
		"Bandit",							// AI Type, "Hero" or "Bandit".
		true								// true: Aircraft will stay at position and fight. false: Heli will leave if not under fire. 
	] spawn heli_para;
	diag_log "WAI: Static mission loaded";
	

but   "aa",    should work.

Link to comment
Share on other sites

I've been trying to get the Bunny Ranch mission to work but it never shows up.

 

Could someone take a look at the mission & my config to see if it looks ok?

 

I'm running the 2.2.0 beta.

 

 

Bunny Ranch:

 

if(isServer) then {



    private ["_mission","_baserunover","_position","_crate","_crate_type","_girls","_girls1","_girls2","_girls3","_girls4","_dirtyowner"];

    // Get mission number, important we do this early
    _mission         = count wai_mission_data -1;

    
    
_coord1         = [8545.19,2843.71,0.001];
_coord2         = [8283.11,4486.07,0.001];
_coord3         = [4721.69,1951.64,0.001];
_coord4         = [1090.29,9385.47,0.001];
_coord5         = [2123.78,1707.07,0.001];
_position       = [_coord1, _coord2, _coord3, _coord4, _coord5] call BIS_fnc_selectRandom;

    [_mission,_position,"ColorPink","Bunny Ranch","Special",false] call mission_init;
        
    diag_log format    ["WAI: Mission Bunny Ranch Started At %1",_position];

    //Setup the crate
    _crate_type     = crates_large call BIS_fnc_selectRandom;
    _crate             = createVehicle [_crate_type,[(_position select 0),(_position select 1),0],[],0,"CAN_COLLIDE"];

    [_crate,0,0,10,0] call dynamic_crate;
    
    //Ranch & Girls
    _baserunover = createVehicle ["Land_A_Villa_EP1",[(_position select 0), (_position select 1),0],[], 0, "CAN_COLLIDE"];

    _girls1 = [[_position select 0, _position select 1, 0],4,"Extreme","Unarmed",0,"Random","RU_Hooker2","Random",["Hero",80],_mission] call spawn_group;
    _girls2 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker3","Random",["Hero",80],_mission] call spawn_group;
    _girls3 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker4","Random",["Hero",80],_mission] call spawn_group;
    _girls4 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker5","Random",["Hero",80],_mission] call spawn_group;
    _girls = [_girls1,_girls2,_girls3,_girls4];
    
    //Bunny Ranch Owner
    _dirtyowner = [[_position select 0, _position select 1, 0],1,"Extreme","Random",4,"Random","Ins_Lopotev","Random",["Bandit",500],_mission] call spawn_group;

    [
        [_mission,_crate],                                // mission number and crate
        ["assassinate",_dirtyowner],                     // ["crate"], or ["kill"], or ["assassinate", _unitGroup],
        [_baserunover],                                 // cleanup objects
        "The Owner of the Bunny Ranch has been beating his girls again, go give him a taste of his own medicine!",    // mission announcement
        "The Bunny Ranch is YOURS! The Girls want to show their gratitude",                                            // mission success
        "News reports of several women found beaten to death!"                                                        // mission fail
    ] call mission_winorfail;

    diag_log format["WAI: Mission Bunny Ranch Ended At %1",_position];

    s_missionsrunning = s_missionsrunning - 1;
};

 

My config:

 

if(isServer) then {



    /* GENERAL CONFIG */

        debug_mode                    = false;        // enable debug
        use_blacklist                = true;            // use blacklist
        blacklist                    = [
            [[0,16000,0],[1000,-0,0]],                // Left
            [[0,16000,0],[16000.0,14580.3,0]]        // Top
        ];

    /* END GENERAL CONFIG */

    /* AI CONFIG */

        ai_clear_body                 = false;        // instantly clear bodies
        ai_clean_dead                 = true;            // clear bodies after certain amount of time
        ai_cleanup_time             = 7200;            // time to clear bodies in seconds
        ai_clean_roadkill            = false;         // clean bodies that are roadkills
        ai_roadkill_damageweapon    = 0;            // percentage of chance a roadkill will destroy weapon AI is carrying

        ai_bandit_combatmode        = "YELLOW";        // combatmode of bandit AI
        ai_bandit_behaviour            = "COMBAT";        // behaviour of bandit AI

        ai_hero_combatmode            = "YELLOW";        // combatmode of hero AI
        ai_hero_behaviour            = "COMBAT";        // behaviour of hero AI

        ai_friendly_behaviour        = false;        // make ai friendly towards comrades

        player_bandit                = -5000;        // this is the amount you declare someone to be a bandit on your server, bandit AI will not attack you if ai_friendly_behaviour is true
        player_hero                    = 5000;            // this is the amount you declare someone to be a hero on your server, hero AI will not attack you if ai_friendly_behaviour is true

        ai_share_info                = true;            // AI share info on player position
        ai_share_distance            = 500;            // distance from killed AI for AI to share your rough position

        ai_kills_gain                = true;            // add kill to bandit/human kill score
        ai_humanity_gain            = true;            // gain humanity for killing AI
        ai_add_humanity                = 50;            // amount of humanity gained for killing a bandit AI
        ai_remove_humanity            = 0;            // amount of humanity lost for killing a hero AI
        ai_special_humanity            = 150;            // amount of humanity gain or loss for killing a special AI dependant on player alignment
        
        ai_skill_extreme            = [["aimingAccuracy",1.00],["aimingShake",1.00],["aimingSpeed",1.00],["endurance",1.00],["spotDistance",1.00],["spotTime",1.00],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]];     // Extreme
        ai_skill_hard                = [["aimingAccuracy",0.80],["aimingShake",0.80],["aimingSpeed",0.80],["endurance",1.00],["spotDistance",0.80],["spotTime",0.80],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]];     // Hard
        ai_skill_medium                = [["aimingAccuracy",0.60],["aimingShake",0.60],["aimingSpeed",0.60],["endurance",1.00],["spotDistance",0.60],["spotTime",0.60],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]];    // Medium
        ai_skill_easy                = [["aimingAccuracy",0.40],["aimingShake",0.50],["aimingSpeed",0.50],["endurance",1.00],["spotDistance",0.50],["spotTime",0.50],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]];    // Easy
        ai_skill_random                = [ai_skill_extreme,ai_skill_hard,ai_skill_hard,ai_skill_hard,ai_skill_hard,ai_skill_medium,ai_skill_medium,ai_skill_medium,ai_skill_medium,ai_skill_easy];

        ai_static_useweapon            = true;    // Allows AI on static guns to have a loadout     
        ai_static_weapons            = ["KORD_high_TK_EP1","DSHKM_Ins","M2StaticMG"];    // static guns

        ai_static_skills            = false;    // Allows you to set custom array for AI on static weapons. (true: On false: Off)
        ai_static_array                = [["aimingAccuracy",0.20],["aimingShake",0.70],["aimingSpeed",0.75],["endurance",1.00],["spotDistance",0.70],["spotTime",0.50],["courage",1.00],["reloadSpeed",1.00],["commanding",1.00],["general",1.00]];

        ai_gear0                    = [["ItemBandage","ItemBandage","ItemPainkiller"],["ItemKnife","ItemFlashlight"]];
        ai_gear1                    = [["ItemBandage","ItemBandage","ItemPainkiller"],["ItemKnife","ItemFlashlight"]];
        ai_gear_random                = [ai_gear0,ai_gear1];    // Allows the possibility of random gear

        ai_wep_assault                = ["M16A4_ACG","Sa58V_RCO_EP1","SCAR_L_STD_Mk4CQT","M8_sharpshooter","M4A1_HWS_GL_camo","SCAR_L_STD_HOLO","M4A3_CCO_EP1","M4A3_CCO_EP1","M4A1_AIM_SD_camo","M16A4","m8_carbine","BAF_L85A2_RIS_Holo","Sa58V_CCO_EP1"];    // Assault
        ai_wep_machine                = ["RPK_74","MK_48_DZ","M249_EP1_DZ","Pecheneg_DZ","M240_DZ"];    // Light machine guns
        ai_wep_sniper                = ["M14_EP1","SCAR_H_LNG_Sniper_SD","M110_NVG_EP1","SVD_CAMO","VSS_Vintorez","DMR_DZ","M40A3"];    // Sniper rifles
        ai_wep_random                = [ai_wep_assault,ai_wep_assault,ai_wep_assault,ai_wep_sniper,ai_wep_machine];    // random weapon 60% chance assault rifle,20% light machine gun,20% sniper rifle
        ai_wep_launchers_AT            = ["M136","RPG18","JAVELIN"];
        ai_wep_launchers_AA            = ["Strela","Igla","STINGER"];
        
        ai_packs                    = ["DZ_Czech_Vest_Puch","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_British_ACU","DZ_GunBag_EP1","DZ_CivilBackpack_EP1","DZ_Backpack_EP1","DZ_LargeGunBag_EP1"];
        ai_hero_skin                = ["FR_AC","FR_AR","FR_Corpsman","FR_GL","FR_Marksman","FR_R","FR_Sapper","FR_TL"];
        ai_bandit_skin                = ["Ins_Soldier_GL_DZ","TK_INS_Soldier_EP1_DZ","TK_INS_Warlord_EP1_DZ","GUE_Commander_DZ","GUE_Soldier_Sniper_DZ","GUE_Soldier_MG_DZ","GUE_Soldier_Crew_DZ","GUE_Soldier_2_DZ","GUE_Soldier_CO_DZ","BanditW1_DZ","BanditW2_DZ","Bandit1_DZ","Bandit2_DZ"];
        ai_special_skin                = ["Functionary1_EP1_DZ"];
        ai_all_skin                    = [ai_hero_skin,ai_bandit_skin,ai_special_skin];

        ai_add_skin                    = true;            // adds unit skin to inventory on death
        
    /* END AI CONFIG */

    /* WAI MISSIONS CONFIG */
        wai_mission_system            = true;    // use built in mission system

        wai_mission_markers            = ["DZMSMajMarker","DZMSMinMarker","DZMSBMajMarker","DZMSBMinMarker"];
        wai_avoid_missions            = 750;                                // avoid spawning missions this close to other missions, these are defined in wai_mission_markers
        wai_avoid_traders            = 750;                                // avoid spawning missions this close to traders
        wai_avoid_town                = 0;                                // avoid spawning missions this close to towns, *** doesn't function with infiSTAR enabled ***
        wai_avoid_road                = 0;                                // avoid spawning missions this close to roads
        wai_avoid_water                = 50;                                // avoid spawning missions this close to water

        
        wai_mission_timer            = [900,1800];                        // time between missions 5-15 minutes
        wai_mission_timeout            = [900,1800];                         // time each missions takes to despawn if inactive 15-30 minutes
        wai_timeout_distance        = 1000;                                // if a player is this close to a mission then it won't time-out
        
        wai_clean_mission            = true;                                // clean all mission buildings after a certain period
        wai_clean_mission_time        = 1800;                                // time after a mission is complete to clean mission buildings

        wai_mission_fuel            = [5,60];                            // fuel inside mission spawned vehicles [min%,max%]
        wai_vehicle_damage            = [20,70];                            // damages to spawn vehicles with [min%,max%]
        wai_keep_vehicles            = true;                                // save vehicles to database and keep them after restart
        wai_lock_vehicles            = true;                                // lock mission vehicles and add keys to random AI bodies (be careful with ai_clean_dead if this is true)
        
        wai_crates_smoke            = true;                                // pop smoke on crate when mission is finished during daytime
        wai_crates_flares            = true;                                // pop flare on crate when mission is finished during nighttime
        
        wai_players_online            = 1;                                 // number of players online before mission starts
        wai_server_fps                = 5;                                 // missions only starts if server FPS is over wai_server_fps
        
        wai_kill_percent            = 30;                                // percentage of AI players that must be killed at "crate" missions to be able to trigger completion

        wai_high_value                = true;                                // enable the possibility of finding a high value item (defined below crate_items_high_value) inside a crate
        wai_high_value_chance        = 1;                                // chance in percent you find above mentioned item

        wai_enable_minefield        = true;                                // enable minefields to better defend missions
        wai_use_launchers            = true;                                // add a rocket launcher to each spawned AI group
        wai_remove_launcher            = true;                                // remove rocket launcher from AI on death

        // Missions
        wai_radio_announce            = true;                                // Setting this to true will announce the missions to those that hold a radio only
        wai_hero_limit                = 1;                                // define how many hero missions can run at once
        wai_bandit_limit            = 1;                                // define how many bandit missions can run at once
        wai_special_limit            = 1;                                // define how many special missions can run at once */
        wai_hero_missions            = [                                 // ["mission filename",% chance of picking this mission],Make sure the chances add up to 100,or it will not be accurate percentages
                                        ["black_hawk_crash",11],
                                        ["armed_vehicle",12],
                                        ["bandit_base",7],
                                        ["captured_mv22",6],
                                        ["ikea_convoy",7],
                                        ["destroyed_ural",16],
                                        ["disabled_milchopper",9],
                                        ["mayors_mansion",9],
                                        ["weapon_cache",12],
                                        ["bandit_patrol",11]
                                        
                                        
                                    ];
        wai_bandit_missions            = [
                                        ["armed_vehicle",10],
                                        ["black_hawk_crash",10],
                                        ["captured_mv22",6],
                                        ["broken_down_ural",10],
                                        ["hero_base",6],
                                        ["ikea_convoy",8],
                                        ["medi_camp",16],
                                        ["presidents_mansion",6],
                                        ["sniper_extraction",8],
                                        ["weapon_cache",10],
                                        ["weed",10]
                                    ];
        wai_special_missions        = [
                                        ["bunny_ranch",100]
                                    
                                    ];
        
        // Vehicle arrays
        armed_vehicle                 = ["ArmoredSUV_PMC_DZE","GAZ_Vodnik_DZE","HMMWV_M1151_M2_CZ_DES_EP1_DZE","HMMWV_M998A2_SOV_DES_EP1_DZE","LandRover_MG_TK_EP1_DZE","LandRover_Special_CZ_EP1_DZE","Offroad_DSHKM_Gue_DZE","Pickup_PK_GUE_DZE","Pickup_PK_INS_DZE","Pickup_PK_TK_GUE_EP1_DZE","UAZ_MG_TK_EP1_DZE"];
        armed_chopper                 = ["CH_47F_EP1_DZE","UH1H_DZE","Mi17_DZE","UH60M_EP1_DZE","UH1Y_DZE","MH60S_DZE"];
        civil_chopper                 = ["AH6X_DZ","BAF_Merlin_DZE","MH6J_DZ","Mi17_Civilian_DZ"];
        military_unarmed             = ["GAZ_Vodnik_MedEvac","HMMWV_Ambulance","HMMWV_Ambulance_CZ_DES_EP1","HMMWV_DES_EP1","HMMWV_DZ","HMMWV_M1035_DES_EP1","LandRover_CZ_EP1","LandRover_TK_CIV_EP1","UAZ_CDF","UAZ_INS","UAZ_RU","UAZ_Unarmed_TK_CIV_EP1","UAZ_Unarmed_TK_EP1","UAZ_Unarmed_UN_EP1"];
        cargo_trucks                 = ["Kamaz","MTVR_DES_EP1","Ural_CDF","Ural_TK_CIV_EP1","Ural_UN_EP1","V3S_Open_TK_CIV_EP1","V3S_Open_TK_EP1"];
        refuel_trucks                = ["KamazRefuel_DZ","MtvrRefuel_DES_EP1_DZ","UralRefuel_TK_EP1_DZ","V3S_Refuel_TK_GUE_EP1_DZ"];
        civil_vehicles                 = ["hilux1_civil_1_open","hilux1_civil_2_covered","hilux1_civil_3_open_EP1","SUV_Blue","SUV_Camo","SUV_Charcoal","SUV_Green","SUV_Orange","SUV_Pink","SUV_Red","SUV_Silver","SUV_TK_CIV_EP1","SUV_White","SUV_Yellow"];

        // Dynamic box array
        crates_large                = ["USVehicleBox","RUVehicleBox","TKVehicleBox_EP1"];
        crates_medium                = ["USBasicWeaponsBox","RUBasicWeaponsBox","USSpecialWeaponsBox","USSpecialWeapons_EP1","RUSpecialWeaponsBox","SpecialWeaponsBox","TKSpecialWeapons_EP1","CZBasicWeapons_EP1","UNBasicWeapons_EP1"];
        crates_small                = ["GuerillaCacheBox","RULaunchersBox","RUBasicAmmunitionBox","RUOrdnanceBox","USBasicAmmunitionBox","USLaunchersBox","USOrdnanceBox","USOrdnanceBox_EP1","USLaunchers_EP1","USBasicWeapons_EP1","USBasicAmmunitionBox_EP1","UNBasicAmmunitionBox_EP1","TKOrdnanceBox_EP1","TKLaunchers_EP1","TKBasicAmmunitionBox_EP1","GuerillaCacheBox_EP1","GERBasicWeapons_EP1"];

        crate_weapons_buildables    = ["ChainSaw","ChainSawB","ChainSawG","ChainSawP","ChainSawR"];
        
        crate_tools                    = ["ItemKeyKit","Binocular","Binocular_Vector","ItemCompass","ItemCrowbar","ItemEtool","ItemFishingPole","ItemFlashlightRed","ItemGPS","ItemHatchet_DZE","ItemKnife","ItemMachete","ItemMatchbox_DZE","ItemToolbox","NVGoggles"];
        crate_tools_buildable        = ["ItemToolbox","ItemEtool","ItemCrowbar","ItemKnife"];
        crate_tools_sniper            = ["ItemCompass","Binocular","Binocular_Vector","NVGoggles","ItemGPS"];

        crate_items                    = ["FoodNutmix","FoodPistachio","FoodMRE","ItemSodaOrangeSherbet","ItemSodaRbull","ItemSodaR4z0r","ItemSodaMdew","ItemSodaPepsi","ItemBandage","ItemSodaCoke","FoodbaconCooked","FoodCanBakedBeans","FoodCanFrankBeans","FoodCanPasta","FoodCanSardines","FoodchickenCooked","FoodmuttonCooked","FoodrabbitCooked","ItemTroutCooked","ItemTunaCooked","ItemSeaBassCooked","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemHeatPack","ItemMorphine","ItemGoldBar","ItemGoldBar10oz","CinderBlocks","ItemCanvas","ItemComboLock","ItemLightBulb","ItemLockbox","ItemSandbag","ItemTankTrap","ItemWire","MortarBucket","PartEngine","PartFueltank","PartGeneric","PartGlass","PartPlankPack","PartVRotor","PartWheel","PartWoodPile"];
        crate_items_high_value        = ["ItemBriefcase100oz","ItemVault","30m_plot_kit","ItemHotwireKit"];
        crate_items_food            = ["ItemWaterbottle","FoodNutmix","FoodPistachio","FoodMRE","ItemSodaOrangeSherbet","ItemSodaRbull","ItemSodaR4z0r","ItemSodaMdew","ItemSodaPepsi","ItemSodaCoke","FoodbaconCooked","FoodCanBakedBeans","FoodCanFrankBeans","FoodCanPasta","FoodCanSardines","FoodchickenCooked","FoodmuttonCooked","FoodrabbitCooked","ItemTroutCooked","ItemTunaCooked","ItemSeaBassCooked"];
        crate_items_buildables        = ["forest_large_net_kit","cinder_garage_kit",["PartPlywoodPack",5],"ItemSandbagExLarge5X","park_bench_kit","ItemComboLock",["CinderBlocks",10],"ItemCanvas","ItemComboLock",["ItemLightBulb",5],"ItemLockbox",["ItemSandbag",10],["ItemTankTrap",10],["ItemWire",10],["MortarBucket",10],["PartPlankPack",5],"PartWoodPile"];
        crate_items_vehicle_repair    = ["PartEngine","PartFueltank","PartGeneric","PartGlass","PartVRotor","PartWheel"];
        crate_items_medical            = ["ItemWaterbottle","ItemAntibiotic","ItemBloodbag","ItemEpinephrine","ItemHeatPack","ItemMorphine","ItemBandage","FoodCanFrankBeans","FoodCanPasta"];
        crate_items_chainbullets    = ["2000Rnd_762x51_M134","200Rnd_762x51_M240","100Rnd_127x99_M2","150Rnd_127x107_DSHKM"];
        crate_items_sniper            = [["ItemPainkiller",5],"Skin_Sniper1_DZ","Skin_CZ_Soldier_Sniper_EP1_DZ","Skin_GUE_Soldier_Sniper_DZ"];
        crate_items_president        = ["ItemKiloHemp","ItemDocument","ItemGoldBar10oz"];

        crate_backpacks_all            = ["DZ_Patrol_Pack_EP1","DZ_Assault_Pack_EP1","DZ_Czech_Vest_Puch","DZ_TerminalPack_EP1","DZ_ALICE_Pack_EP1","DZ_TK_Assault_Pack_EP1","DZ_CompactPack_EP1","DZ_British_ACU","DZ_GunBag_EP1","DZ_CivilBackpack_EP1","DZ_Backpack_EP1","DZ_LargeGunBag_EP1"];
        crate_backpacks_large        = ["DZ_GunBag_EP1","DZ_Backpack_EP1","DZ_LargeGunBag_EP1","DZ_CivilBackpack_EP1"];

        crate_random                = [crate_items,crate_items_food,crate_items_buildables,crate_items_vehicle_repair,crate_items_medical,crate_items_chainbullets];

    /* END WAI MISSIONS CONFIG */

    /* STATIC MISSIONS CONFIG */

        static_missions                = true;        // use static mission file
        custom_per_world            = false;        // use a custom mission file per world

    /* END STATIC MISSIONS CONFIG */

    WAIconfigloaded = true;

};

 

I'm also trying to get Weed mission to work.

 

Weed:

 

if(isServer) then {



private ["_complete","_mission","_baserunover","_position","_crate","_crate_type","_girls","_girls1","_girls2","_girls3","_girls4","_dirtyowner"];

// Get mission number, important we do this early
    _mission         = count wai_mission_data -1;
    
_position = [50] call find_position;
_mission = [_position,"Extreme","Weed","MainBandit",true] call mission_init;

diag_log format ["WAI: Mission weed Started At %1",_position];

//Setup the crate
_crate_type = crates_small call BIS_fnc_selectRandom;
_crate = createVehicle ["BAF_VehicleBox",[(_position select 0),(_position select 1),.1], [], 0, "CAN_COLLIDE"];

[_crate,0,0,[40,crate_items_president],2] call dynamic_crate;

//Ranch & Girls
_baserunover1 = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];
_baserunover2 = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];
_baserunover3 = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];
_baserunover4 = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];
_baserunover5 = createVehicle ["fiberplant",[(_position select 0) + 4,(_position select 1) + 4,0], [], 0, "CAN_COLLIDE"];
_baserunover = [_baserunover1,_baserunover2,_baserunover3,_baserunover4,_baserunover5];

//Troops
[[_position select 0,_position select 1,0],4,"Extreme","Random",4,"Random","Hero","Random","Hero",_mission] call spawn_group;
[[_position select 0,_position select 1,0],4,"Extreme","Random",4,"Random","Hero","Random","Hero",_mission] call spawn_group;
[[_position select 0,_position select 1,0],4,"Extreme","Random",4,"Random","Hero","Random","Hero",_mission] call spawn_group;
[[_position select 0,_position select 1,0],4,"Extreme","Random",4,"Random","Hero","Random","Hero",_mission] call spawn_group;



_complete = [
[_mission,_crate], // mission number and crate
["crate"], // ["crate"], or ["kill"], or ["assassinate", _unitGroup],
[_baserunover], // cleanup objects
"The Frito Bandito and his bandits have started harvesting a marijuana field! Take them out to gather the crop yourself!! Better Bring a machette. Check your map for the location!", // mission announcement
"The marijuana has been secured by survivors!", // mission success
"The Bandits made off with the Marijuana, Next time stop those bastards!!" // mission fail
] call mission_winorfail;

if(_complete) then {
[_crate,0,0,[20,crate_items_president],2] call dynamic_crate;
};

diag_log format["WAI: Mission weed Ended At %1",_position];

h_missionrunning = false;
};

 

Thank you.

Link to comment
Share on other sites

Pretty sure special missions are disabled in beta. But you could try to add it as a hero and or bandit mission. Not to sure about the weed script tho. Looks right to me. I think if you ditch the bunny ranch mission, the weed should work just fine.

The special mission to the best of my knowledge was removed due to it breaking the mission limits and letting countless missions spawn every where. 

Link to comment
Share on other sites

I've got the Bunny Ranch to kind of work.  It spawns in, I added a few more, and different hookers, changed the guy to a more pimp-like outfit, etc.  But the logic doesn't seem to work right for the success or failure of the mission and the crates are always empty.    But it doesn't seem to let other missions spawn endlessly.  

 

One thing to note, the numbers in each of the mission types are supposed to add up to 100 - the number being the % chance of that mission starting.  He made a statement in the installation section that they have to add up to 100.  So being as the Bunny Ranch is my only special mission, it's set at 100%.  But then it spawns over and over since it is the only special.  Kinda defeats the intent of it being a rare mission.  I haven't played around with setting it at less than 100 to see if that decreases the spawn frequency.

Link to comment
Share on other sites

Here's my  Bunny Ranch:

 

if(isServer) then {



private ["_mission","_baserunover","_position","_crate","_crate_type","_girls","_girls1","_girls2","_girls3","_girls4","_dirtyowner"];

// Get mission number, important we do this early
_mission = count wai_mission_data -1;

_position = [10] call find_position;
[_mission,_position,"ColorPink","Bunny Ranch","Special",false] call mission_init;

diag_log format ["WAI: Mission Bunny Ranch Started At %1",_position];

//Setup the crate
_crate_type = crates_large call BIS_fnc_selectRandom;
_crate = createVehicle [_crate_type,[(_position select 0),(_position select 1),0],[],0,"CAN_COLLIDE"];

[_crate,0,0,10,0] call dynamic_crate;

//Ranch & Girls
_baserunover = createVehicle ["Land_A_Villa_EP1",[(_position select 0), (_position select 1),0],[], 0, "CAN_COLLIDE"];

_girls1 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker2","Random",["Hero",80],_mission] call spawn_group;
_girls2 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker3","Random",["Hero",80],_mission] call spawn_group;
_girls3 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker4","Random",["Hero",80],_mission] call spawn_group;
_girls4 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker5","Random",["Hero",80],_mission] call spawn_group;
_girls5 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","ValentinaVictim","Random",["Hero",80],_mission] call spawn_group;
_girls6 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker1","Random",["Hero",80],_mission] call spawn_group;

_girls = [_girls1,_girls2,_girls3,_girls4,_girls5,_girls6];

//Bunny Ranch Owner
_dirtyowner = [[_position select 0, _position select 1, 0],1,"Extreme","Random",4,"Random","RU_Rocker4","Random",["Bandit",500],_mission] call spawn_group;

[
[_mission,_crate], // mission number and crate
["assassinate",_dirtyowner], // ["crate"], or ["kill"], or ["assassinate", _unitGroup],
[_baserunover], // cleanup objects
"The Owner of the Bunny Ranch has been beating his girls again, go give him a taste of his own medicine!", // mission announcement
"The Bunny Ranch is YOURS! The Girls want to show their gratitude. Woo woo!", // mission success
"News reports of several women found beaten to death!" // mission fail
] call mission_winorfail;

diag_log format["WAI: Mission Bunny Ranch Ended At %1",_position];

s_missionsrunning = s_missionsrunning - 1;
};

 

And here's missions/init.sqf since that needed a few changes, too:

 

if(isServer) then {



private["_marker","_unitGroup","_b_missionTime","_h_missionTime","_h_startTime","_b_startTime","_result","_cnt","_currTime","_mission"];

diag_log "WAI: Initialising missions";

// Mission functions
call compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\position_functions.sqf";
mission_init = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\mission_init.sqf";
mission_winorfail = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\mission_winorfail.sqf";
minefield = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\minefield.sqf";
custom_publish = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\custom_publish_vehicle.sqf";

trader_markers = call get_trader_markers;
markerready = true;
wai_mission_data = [];
wai_hero_mission = [];
wai_bandit_mission = [];
wai_special_mission = [];
h_missionsrunning = 0;
b_missionsrunning = 0;
s_missionsrunning = 0;
_h_startTime = floor(time);
_b_startTime = floor(time);
_s_startTime = floor(time);
_delayTime = floor(time);
_h_missionTime = nil;
_b_missionTime = nil;
_s_missionTime = nil;
_mission = "";
_hresult = 0;
_bresult = 0;
_sresult = 0;

// Set mission frequencies from config
{
for "_i" from 1 to (_x select 1) do {
wai_hero_mission set [count wai_hero_mission, _x select 0];
};
} count wai_hero_missions;

{
for "_i" from 1 to (_x select 1) do {
wai_bandit_mission set [count wai_bandit_mission, _x select 0];
};
} count wai_bandit_missions;

{
for "_i" from 1 to (_x select 1) do {
wai_special_mission set [count wai_special_mission, _x select 0];
};
} count wai_special_missions;

// Start mission monitor
while {true} do
{
_cnt = {alive _x} count playableUnits;
_currTime = floor(time);

if (isNil "_h_missionTime") then { _h_missionTime = ((wai_mission_timer select 0) + random((wai_mission_timer select 1) - (wai_mission_timer select 0))); };
if (isNil "_b_missionTime") then { _b_missionTime = ((wai_mission_timer select 0) + random((wai_mission_timer select 1) - (wai_mission_timer select 0))); };
if (isNil "_s_missionTime") then { _s_missionTime = ((wai_mission_timer select 0) + random((wai_mission_timer select 1) - (wai_mission_timer select 0))); };

if((_currTime - _h_startTime >= _h_missionTime) && (h_missionsrunning < wai_hero_limit)) then { _hresult = 1; };
if((_currTime - _b_startTime >= _b_missionTime) && (b_missionsrunning < wai_bandit_limit)) then { _bresult = 1; };
if((_currTime - _s_startTime >= _s_missionTime) && (s_missionsrunning < wai_special_limit)) then { _sresult = 1; };

if(h_missionsrunning == wai_hero_limit) then { _h_startTime = floor(time); };
if(b_missionsrunning == wai_bandit_limit) then { _b_startTime = floor(time); };
//if(s_missionsrunning == wai_special_limit) then { _s_startTime = floor(time); };

if((_cnt >= wai_players_online) && (diag_fps >= wai_server_fps)) then {

if (_hresult == 1) then {
waitUntil {_currTime = floor(time);(_currTime - _delayTime > 10 && markerready)};
markerready = false;
h_missionsrunning = h_missionsrunning + 1;
_h_startTime = floor(time);
_delayTime = floor(time);
_h_missionTime = nil;
_hresult = 0;
wai_mission_markers set [(count wai_mission_markers), ("MainHero" + str(count wai_mission_data))];
wai_mission_data = wai_mission_data + [[0,"",[],[0,0,0]]];

_mission = wai_hero_mission call BIS_fnc_selectRandom;
execVM format ["\z\addons\dayz_server\WAI\missions\hero\%1.sqf",_mission];
};

if (_bresult == 1) then {
waitUntil {_currTime = floor(time);(_currTime - _delayTime > 10 && markerready)};
markerready = false;
b_missionsrunning = b_missionsrunning + 1;
_b_startTime = floor(time);
_delayTime = floor(time);
_b_missionTime = nil;
_bresult = 0;
wai_mission_markers set [(count wai_mission_markers), ("MainBandit" + str(count wai_mission_data))];
wai_mission_data = wai_mission_data + [[0,"",[],[0,0,0]]];

_mission = wai_bandit_mission call BIS_fnc_selectRandom;
execVM format ["\z\addons\dayz_server\WAI\missions\bandit\%1.sqf",_mission];
};

if (_sresult == 1) then {
waitUntil {_currTime = floor(time);(_currTime - _delayTime > 10 && markerready)};
markerready = false;
s_missionsrunning = s_missionsrunning + 1;
_s_startTime = floor(time);
_delayTime = floor(time);
_s_missionTime = nil;
_sresult = 0;
wai_mission_markers set [(count wai_mission_markers), ("Special" + str(count wai_mission_data))];
wai_mission_data = wai_mission_data + [[0,"",[],[0,0,0]]];

_mission = wai_special_mission call BIS_fnc_selectRandom;
execVM format ["\z\addons\dayz_server\WAI\missions\special\%1.sqf",_mission];
};

};
sleep 1;
};
};

 

My crates don't fly away either.  The colored smoke starts but the crates are empty.

Link to comment
Share on other sites

Here's my  Bunny Ranch:

 

if(isServer) then {

private ["_mission","_baserunover","_position","_crate","_crate_type","_girls","_girls1","_girls2","_girls3","_girls4","_dirtyowner"];

// Get mission number, important we do this early

_mission = count wai_mission_data -1;

_position = [10] call find_position;

[_mission,_position,"ColorPink","Bunny Ranch","Special",false] call mission_init;

diag_log format ["WAI: Mission Bunny Ranch Started At %1",_position];

//Setup the crate

_crate_type = crates_large call BIS_fnc_selectRandom;

_crate = createVehicle [_crate_type,[(_position select 0),(_position select 1),0],[],0,"CAN_COLLIDE"];

[_crate,0,0,10,0] call dynamic_crate;

//Ranch & Girls

_baserunover = createVehicle ["Land_A_Villa_EP1",[(_position select 0), (_position select 1),0],[], 0, "CAN_COLLIDE"];

_girls1 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker2","Random",["Hero",80],_mission] call spawn_group;

_girls2 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker3","Random",["Hero",80],_mission] call spawn_group;

_girls3 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker4","Random",["Hero",80],_mission] call spawn_group;

_girls4 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker5","Random",["Hero",80],_mission] call spawn_group;

_girls5 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","ValentinaVictim","Random",["Hero",80],_mission] call spawn_group;

_girls6 = [[_position select 0, _position select 1, 0],2,"Extreme","Unarmed",0,"Random","RU_Hooker1","Random",["Hero",80],_mission] call spawn_group;

_girls = [_girls1,_girls2,_girls3,_girls4,_girls5,_girls6];

//Bunny Ranch Owner

_dirtyowner = [[_position select 0, _position select 1, 0],1,"Extreme","Random",4,"Random","RU_Rocker4","Random",["Bandit",500],_mission] call spawn_group;

[

[_mission,_crate], // mission number and crate

["assassinate",_dirtyowner], // ["crate"], or ["kill"], or ["assassinate", _unitGroup],

[_baserunover], // cleanup objects

"The Owner of the Bunny Ranch has been beating his girls again, go give him a taste of his own medicine!", // mission announcement

"The Bunny Ranch is YOURS! The Girls want to show their gratitude. Woo woo!", // mission success

"News reports of several women found beaten to death!" // mission fail

] call mission_winorfail;

diag_log format["WAI: Mission Bunny Ranch Ended At %1",_position];

s_missionsrunning = s_missionsrunning - 1;

};

 

And here's missions/init.sqf since that needed a few changes, too:

 

if(isServer) then {

private["_marker","_unitGroup","_b_missionTime","_h_missionTime","_h_startTime","_b_startTime","_result","_cnt","_currTime","_mission"];

diag_log "WAI: Initialising missions";

// Mission functions

call compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\position_functions.sqf";

mission_init = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\mission_init.sqf";

mission_winorfail = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\mission_winorfail.sqf";

minefield = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\minefield.sqf";

custom_publish = compile preprocessFileLineNumbers "\z\addons\dayz_server\WAI\compile\custom_publish_vehicle.sqf";

trader_markers = call get_trader_markers;

markerready = true;

wai_mission_data = [];

wai_hero_mission = [];

wai_bandit_mission = [];

wai_special_mission = [];

h_missionsrunning = 0;

b_missionsrunning = 0;

s_missionsrunning = 0;

_h_startTime = floor(time);

_b_startTime = floor(time);

_s_startTime = floor(time);

_delayTime = floor(time);

_h_missionTime = nil;

_b_missionTime = nil;

_s_missionTime = nil;

_mission = "";

_hresult = 0;

_bresult = 0;

_sresult = 0;

// Set mission frequencies from config

{

for "_i" from 1 to (_x select 1) do {

wai_hero_mission set [count wai_hero_mission, _x select 0];

};

} count wai_hero_missions;

{

for "_i" from 1 to (_x select 1) do {

wai_bandit_mission set [count wai_bandit_mission, _x select 0];

};

} count wai_bandit_missions;

{

for "_i" from 1 to (_x select 1) do {

wai_special_mission set [count wai_special_mission, _x select 0];

};

} count wai_special_missions;

// Start mission monitor

while {true} do

{

_cnt = {alive _x} count playableUnits;

_currTime = floor(time);

if (isNil "_h_missionTime") then { _h_missionTime = ((wai_mission_timer select 0) + random((wai_mission_timer select 1) - (wai_mission_timer select 0))); };

if (isNil "_b_missionTime") then { _b_missionTime = ((wai_mission_timer select 0) + random((wai_mission_timer select 1) - (wai_mission_timer select 0))); };

if (isNil "_s_missionTime") then { _s_missionTime = ((wai_mission_timer select 0) + random((wai_mission_timer select 1) - (wai_mission_timer select 0))); };

if((_currTime - _h_startTime >= _h_missionTime) && (h_missionsrunning < wai_hero_limit)) then { _hresult = 1; };

if((_currTime - _b_startTime >= _b_missionTime) && (b_missionsrunning < wai_bandit_limit)) then { _bresult = 1; };

if((_currTime - _s_startTime >= _s_missionTime) && (s_missionsrunning < wai_special_limit)) then { _sresult = 1; };

if(h_missionsrunning == wai_hero_limit) then { _h_startTime = floor(time); };

if(b_missionsrunning == wai_bandit_limit) then { _b_startTime = floor(time); };

//if(s_missionsrunning == wai_special_limit) then { _s_startTime = floor(time); };

if((_cnt >= wai_players_online) && (diag_fps >= wai_server_fps)) then {

if (_hresult == 1) then {

waitUntil {_currTime = floor(time);(_currTime - _delayTime > 10 && markerready)};

markerready = false;

h_missionsrunning = h_missionsrunning + 1;

_h_startTime = floor(time);

_delayTime = floor(time);

_h_missionTime = nil;

_hresult = 0;

wai_mission_markers set [(count wai_mission_markers), ("MainHero" + str(count wai_mission_data))];

wai_mission_data = wai_mission_data + [[0,"",[],[0,0,0]]];

_mission = wai_hero_mission call BIS_fnc_selectRandom;

execVM format ["\z\addons\dayz_server\WAI\missions\hero\%1.sqf",_mission];

};

if (_bresult == 1) then {

waitUntil {_currTime = floor(time);(_currTime - _delayTime > 10 && markerready)};

markerready = false;

b_missionsrunning = b_missionsrunning + 1;

_b_startTime = floor(time);

_delayTime = floor(time);

_b_missionTime = nil;

_bresult = 0;

wai_mission_markers set [(count wai_mission_markers), ("MainBandit" + str(count wai_mission_data))];

wai_mission_data = wai_mission_data + [[0,"",[],[0,0,0]]];

_mission = wai_bandit_mission call BIS_fnc_selectRandom;

execVM format ["\z\addons\dayz_server\WAI\missions\bandit\%1.sqf",_mission];

};

if (_sresult == 1) then {

waitUntil {_currTime = floor(time);(_currTime - _delayTime > 10 && markerready)};

markerready = false;

s_missionsrunning = s_missionsrunning + 1;

_s_startTime = floor(time);

_delayTime = floor(time);

_s_missionTime = nil;

_sresult = 0;

wai_mission_markers set [(count wai_mission_markers), ("Special" + str(count wai_mission_data))];

wai_mission_data = wai_mission_data + [[0,"",[],[0,0,0]]];

_mission = wai_special_mission call BIS_fnc_selectRandom;

execVM format ["\z\addons\dayz_server\WAI\missions\special\%1.sqf",_mission];

};

};

sleep 1;

};

};

 

My crates don't fly away either.  The colored smoke starts but the crates are empty.

 

Thank you.

Link to comment
Share on other sites

Is there a place to adjust the mission spawns when a player is close?

 

Reason for asking..

 

If a player is within say 500 meters.  The vehicles, crate(no loot), static(dead) and ai(all dead) will spawn.   Is there a setting I can adjust to allow everything to live or not spawn?  

Link to comment
Share on other sites

Back in post 1649 ( ), oSoDirty responded to my question  about vehicles saving vs despawning...

 

So it's an all or nothing thing.  I tried with true and false.  If true, all vehicles are saved to map, whether a player found a key or not.  That means there are a lot of locked vehicles on the map that are unlockable without admin powers.  If false, ALL mission vehicles despawn on reset - whether a player found a key or not, whether they are locked or not.  

 

I'm looking to despawn any mission vehicles where a player did not find a key and only retain those vehicles where a player found a key.

 

Any thoughts?

Link to comment
Share on other sites

Back in post 1649 ( ), oSoDirty responded to my question  about vehicles saving vs despawning...

 

So it's an all or nothing thing.  I tried with true and false.  If true, all vehicles are saved to map, whether a player found a key or not.  That means there are a lot of locked vehicles on the map that are unlockable without admin powers.  If false, ALL mission vehicles despawn on reset - whether a player found a key or not, whether they are locked or not.  

 

I'm looking to despawn any mission vehicles where a player did not find a key and only retain those vehicles where a player found a key.

 

Any thoughts?

I don't use the locked vehicles. I also use a script at restart that will delete an unused vehicle after 7 days.

BEGIN
DELETE FROM object_data WHERE object_data.LastUpdated < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND object_data.CharacterID =0 AND object_data.Inventory ='[]' AND object_data.Hitpoints <> '[]';
DELETE FROM object_data WHERE object_data.LastUpdated < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 7 DAY) AND object_data.CharacterID =0 AND object_data.Inventory ='[[[],[]],[[],[]],[[],[]]]' AND object_data.Hitpoints <> '[]';
END
Link to comment
Share on other sites

can anyone help, my heli dont attack bandit players

   [
        [12266.4,12613.1,0.001],            // Position to patrol
        [13372.2,13780.8,0.002],            // Position to spawn chopper at
        2000,                                // Radius of patrol
        15,                                    // Number of waypoints to give
        "UH1H_DZ",                            // Classname of vehicle (make sure it has driver and two gunners)
        "extreme",                            // Skill level of units (easy, medium, hard, extreme, Random)
        "Random",                            // Skin classname, use "Random" or classname here
        "Hero"                                // AI Type, "Hero" or "Bandit".
    ] spawn heli_patrol;
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Advertisement
×
×
  • Create New...