Jump to content

salival

Moderator
  • Posts

    1455
  • Joined

  • Last visited

  • Days Won

    89

Reputation Activity

  1. Like
    salival got a reaction from juandayz in [Outdated] [release] 1.0.6 - Deploy Anything 2.8.2 - Now with Epoch building! | Customizable: DB saving | Plot | Vehicles/Buildings | Packing   
    Hey, it's working fine on my server so I guess you need to go over your script again and check everything. 
  2. Like
    salival got a reaction from juandayz in Epoch 1.0.6   
    @juandayzWAI works fine for me. just make sure you go through the changelog and change the variables/functions that need to be changed.
  3. Like
    salival reacted to _Lance_ in Epoch 1.0.6   
    Downloaded to my test server :)
    Thanks SO MUCH to the Epoch team for all their hard work on this, as well as the absolutely incredible community mod/content creators. Your hard work is appreciated and enjoyed by so many people around the world, Thank you!! 
    Sending 1.0.5.1 to pasture isn't easy but I'm excited for this new build. For me it's always going to be Arma2 > Arma3 so it's great to see continuing mod development for the more "content-filled" game.
  4. Like
    salival reacted to Shak in Epoch 1.0.6   
    Ebay, icomrade, Zupa and anybody else involved in this marvellous creation - Thank you so so much.
    You guys have done an amazing job, and so many people are going to get enjoyment out of your hard work.
    I'd love to buy each of you a beer, as a sign of my appreciation. Please PM me your paypal details so I can make that happen.
    And props to the original A2 epoch guys for letting the community continue this great mod.
  5. Like
    salival reacted to icomrade in Arma 2: DayZ Epoch 1.0.6   
    Hello all,
    We are pleased to announce the release of ArmA 2 DayZ Epoch 1.0.6, available for download at: http://epochmod.com/a2dayzepoch.php
    This release introduces the integration of some of the most common Epoch community modifications from prior epoch release, DayZ Mod 1.8.8, and a new group system that persists in the database.  Most of the highlights can be found in the change log below, which is fairly comprehensive, but by no means exhaustive.
    Please note that community addons/expansions for previous Epoch release WILL NOT work on Epoch 1.0.6, be sure to review the change log for which mods are now included. In addition, the loot table format has completely changed, you must base your loot table modifications on the new format, which can be found by evaluating the stock loot tables: https://github.com/EpochModTeam/DayZ-Epoch/tree/Release_1.0.6/SQF/dayz_code/Configs/CfgLoot
    1.0.5.1 and older Single Currency scripts are NOT compatible with 1.0.6, there is no included single currency script in this release. However, because we are so wonderful, we have chosen to integrate single currency saving to the DB, so a third-party HiveEXT is not necessary and the SQF is all that needs to be written/updated.
     
  6. Like
    salival reacted to Joeyy in starting humanity   
    `Humanity` int(11) NOT NULL DEFAULT '2500',
     
    It's in the SQL.
  7. Like
    salival reacted to HollowAddiction in Need help setting up BEC Auto restarts.   
    This is my Scheduler, 3 hour restarts, as well as 5 messages(replace the text with your message)
    Use if you like.
    <?xml version="1.0"?> <Scheduler> <!-- Repeating messages every 5 minutes --> <job id="0"> <time>002500</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>1</loop> <cmd>say -1 REPLACE THIS TEXT</cmd> <cmdtype>0</cmdtype> </job> <job id="1"> <time>002500</time> <delay>000500</delay> <day>1,2,3,4,5,6,7</day> <loop>1</loop> <cmd>say -1 REPLACE THIS TEXT</cmd> <cmdtype>0</cmdtype> </job> <job id="2"> <time>002500</time> <delay>001000</delay> <day>1,2,3,4,5,6,7</day> <loop>1</loop> <cmd>say -1 REPLACE THIS TEXT</cmd> <cmdtype>0</cmdtype> </job> <job id="3"> <time>002500</time> <delay>001500</delay> <day>1,2,3,4,5,6,7</day> <loop>1</loop> <cmd>say -1 REPLACE THIS TEXT</cmd> <cmdtype>0</cmdtype> </job> <job id="4"> <time>002500</time> <delay>002000</delay> <day>1,2,3,4,5,6,7</day> <loop>1</loop> <cmd>say -1 REPLACE THIS TEXT</cmd> <cmdtype>0</cmdtype> </job> <!-- End repeat messages --> <!-- 06:00 restart --> <job id="5"> <time>05:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="6"> <time>05:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="7"> <time>06:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <!-- End 06:00 restart --> <!-- 09:00 restart --> <job id="8"> <time>08:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="9"> <time>08:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="10"> <time>09:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <!-- End 09:00 restart --> <!-- 12:00 restart --> <job id="11"> <time>11:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="12"> <time>11:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="13"> <time>12:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <!-- End 12:00 restart --> <!-- 15:00 restart --> <job id="14"> <time>14:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="15"> <time>14:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="16"> <time>15:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <!-- End 15:00 restart --> <!-- 18:00 restart --> <job id="17"> <time>17:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="18"> <time>17:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="19"> <time>18:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <!-- End 18:00 restart --> <!-- 21:00 restart --> <job id="20"> <time>20:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="21"> <time>20:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="22"> <time>21:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <!-- End 21:00 restart --> <!-- 00:00 restart --> <job id="23"> <time>23:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="24"> <time>23:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="25"> <time>00:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <!-- End 00:00 restart --> <!-- 03:00 restart --> <job id="26"> <time>02:45:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 15 minutes</cmd> <cmdtype>0</cmdtype> </job> <job id="27"> <time>02:59:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>say -1 This server will restart in 1 minute, Log out now!</cmd> <cmdtype>0</cmdtype> </job> <job id="28"> <time>03:00:00</time> <delay>000000</delay> <day>1,2,3,4,5,6,7</day> <loop>0</loop> <cmd>#shutdown</cmd> <cmdtype>0</cmdtype> </job> <!-- End 03:00 restart --> </Scheduler>
  8. Like
    salival reacted to Antichrist in Want to change humanity needed for bandit trader   
    You can change humanity values in fn_selfActions.sqf, obviously a custom file is needed unless you have one already.
     
    Just find this part of the file and change it as you see fit
    _low_high = "low"; _humanity_logic = false; if((_traderMenu select 2) == "friendly") then { _humanity_logic = (_humanity < -5000); }; if((_traderMenu select 2) == "hostile") then { _low_high = "high"; _humanity_logic = (_humanity > -5000); }; if((_traderMenu select 2) == "hero") then { _humanity_logic = (_humanity < 5000); };
  9. Like
    salival reacted to juandayz in [Release] Advanced Trading 2.1 !UPDATED!   
    *******For player who have issues with install guide.********
    *If you cant see advanced trade menu:
    1-First u need add a custom fn_selfActions.sqf in MPmissions\yourinstance can be chernarus11 or other\custom\
    find fn_selfactions in : \@DayZ_Epoch\addons\dayz_code\compile\
    2- u need add a custom  compiles.sqf in MPmissions\yourinstance can be chernarus11 or other\custom\
    find compiles.sqf in : @DayZ_Epoch\addons\dayz_code\init\
     
    3-now open your init.sqf and change for lines in blue if yours dsnt look like this: (this means you need make a new call for fn_selfaction & compiles.slqf located in your custom folder)
    4-Now go to your CUSTOM compiles.sqf and coment or delete lines in blue. (dsnt matter if ure calling fn_selfActions.sqf from custom folder or dayz_server folder, just remove it, must be called from init.sqf u will see in preview step)  
    5-then goes to your CUSTOM fn_SelfActions.sqf and place it if u dont have: (like zupa say in install guide)
    above
    6-Onces you make it.. goes to your description.ext and in very bottom add: (Note.  ZSCdefines.hpp are into ZSC folder (coins system) if ure using coins..then u dont need add this include. just add the second "advancedTrading.hpp")
    Example for Gold System
    For Coin System
    7-**remember:  in  \MPMissions\DayZ_Epoch_11.Chernarus\zupa\advancedTrading\config.sqf  and change false by true.. in this line:
    IF YOU ARE USING GOLD ,SILVER SYSTEM AND ITEMS DSNT SHOW IN ADV TRADE MENU then:
    1-extract from dayz_epoch_b.pbo  your CfgServerTrader folder and place it on mpmissions\yourinstance\  
     path to Category folder:  \@DayZ_Epoch\addons\dayz_epoch_b\CfgServerTrader
    2-Then in description.ext add 
    #include "CfgServerTrader\cfgServerTrader.hpp"
     
     
  10. Like
    salival reacted to Albertus Smythe in Andre Aerial Patrol - [Coconut Release] - Any Map   
    Putting the rest of Salivals changes into my test server.
    Donnovan: This prolly now needs to be moved to github so it has proper version control.
    I'm now happy with the loot system, moved to my live servers.
     
  11. Like
    salival got a reaction from Albertus Smythe in Andre Aerial Patrol - [Coconut Release] - Any Map   
    This is my replacement andre_heliConvoy_items.sqf.
     
    You need to make sure whatever crate you have (_crate) that it is whitelisted in your battleeye filters, it will kick you otherwise. You can do so by adding !="USOrdnanceBox" to a line that starts with 5. i.e 5 !="USOrdnanceBox" in your battleye/createvehicle.txt
     
    Copy paste the following code block into andre_heliConvoy_items.sqf and you're done (as long as you have this mod installed obviously)
     
    //Original by Donnavan //Modified by salival for better loot control //find_suitable_ammunition from WAI, uses the same variables (but in this file instead since these are clientside) //Edit the variables to suit your needs, the crate will spawn behind the player. find_suitable_ammunition = { private["_weapon","_result","_ammoArray"]; _result = false; _weapon = _this; _ammoArray = getArray (configFile >> "cfgWeapons" >> _weapon >> "magazines"); if (count _ammoArray > 0) then { _result = _ammoArray select 0; call { if(_result == "20Rnd_556x45_Stanag") exitWith { _result = "30Rnd_556x45_Stanag"; }; if(_result == "30Rnd_556x45_G36") exitWith { _result = "30Rnd_556x45_Stanag"; }; if(_result == "30Rnd_556x45_G36SD") exitWith { _result = "30Rnd_556x45_StanagSD"; }; }; }; _result }; private ["_crate_type","_crate","_num_weapons","_weapon","_ammo"]; //Edit the variables below to suit your needs _crate_type = "USOrdnanceBox"; //this needs to be whitelisted in your battleye filters (createvehicle.txt) - you can do so by adding !="USOrdnanceBox" to a line that starts with 5. i.e 5 !="USOrdnanceBox" _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","ItemBriefcase100oz","ItemBriefcase100oz","ItemBriefcase100oz","ItemBriefcase100oz"]; _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 = ["MK_48_DZ","M249_EP1_DZ","Pecheneg_DZ","M240_DZ"]; // Light machine guns _ai_wep_sniper = ["M14_EP1","HUNTINGRIFLE","M4SPR","M24","M24_DES_EP1","SCAR_H_LNG_Sniper_SD","M110_NVG_EP1","SVD_CAMO","VSS_Vintorez","DMR_DZ","M40A3","KSVK_DZE","BAF_LRR_SCOPED"]; // Sniper rifles _ai_wep_random = _ai_wep_assault + _ai_wep_assault + _ai_wep_sniper + _ai_wep_machine; _motor = _this select 3; player playActionNow "Medic"; uisleep 10; _position = [(position player select 0) - (sin(getdir player)*2), (position player select 1) - (cos(getdir player)*2), (position player select 2)]; _dir = getDir player; _crate = createVehicle [_crate_type,_position,[],0,"CAN_COLLIDE"]; _crate setVariable ["ObjectID","1",true]; _crate setVariable ["permaLoot",true]; _num_weapons = 6; _num_items = 14; _item_array = _crate_items; PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_crate]; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; if(_num_weapons > 0) then { _num_weapons = (ceil((_num_weapons) / 2) + floor(random (_num_weapons / 2))); for "_i" from 1 to _num_weapons do { _weapon = _ai_wep_random call BIS_fnc_selectRandom; _ammo = _weapon call find_suitable_ammunition; _crate addWeaponCargoGlobal [_weapon,1]; _crate addMagazineCargoGlobal [_ammo, (1 + floor(random 5))]; }; }; if(_num_items > 0) then { _num_items = (ceil((_num_items) / 2) + floor(random (_num_items / 2))); for "_i" from 1 to _num_items do { _item = _item_array call BIS_fnc_selectRandom; if(typeName (_item) == "ARRAY") then { _crate addMagazineCargoGlobal [_item select 0,_item select 1]; } else { _crate addMagazineCargoGlobal [_item,1]; }; }; }; _motor setVariable ["dnishpq",0,true]; if (alive _motor) then { systemChat "You manage to find a loot crate in the cargo hold"; } else { systemChat "You manage to find a loot crate in the wreckage of the chopper"; };  
  12. Like
  13. Like
    salival reacted to Albertus Smythe in Andre Aerial Patrol - [Coconut Release] - Any Map   
    I've just been staring at the line
    if ({alive _x} count units group _unit == 0) then {donn_heliGrps = donn_heliGrps - [group _unit];}; and realised it removes the group (and therefore the convoy) from the array donn_heliGrps if all the units (AI) in the convoy are dead.
    As a new group is created and inserted into donn_heliGrps for each convoy, it seems to me that we could use count donn_heliGrps to limit the number of convoys active at any one time by surrounding everything between while (1 ==1)  do { and the bottom uisleep (40*15); inside an if (count donn_heliGrps) < _maxConvoys then {}; statement, then every 15 minutes it will only create a new convoy if there are less than _maxConvoys active.
     
     
  14. Like
    salival got a reaction from Albertus Smythe in Andre Aerial Patrol - [Coconut Release] - Any Map   
    Hey,
     
    I went back and updated the script based on Albertus's points, I have updated my previous post with the latest script that adds fly height and speed randomization.
    Let me know what you guys think of it.
     
    Cheers,
    Scott
  15. Like
    salival reacted to Albertus Smythe in Andre Aerial Patrol - [Coconut Release] - Any Map   
    Like the changes you've made to the AI but I'm not so sure about using one height and speed for all the convoys, each to his own though.
    I'm going to make the AI changes to my servers but personally I'm going to stick with the varied height/speed of the convoys (might even randomise them up a bit).
    <THINKS> Wonder if this could be converted into a full WAI mission?</THINKS>
  16. Like
    salival got a reaction from Albertus Smythe in Andre Aerial Patrol - [Coconut Release] - Any Map   
    // ********************************* // Airpatrol.sqf // Author: Donnavan // Creates Airbourne convoys // Modifications: // Random Weapon selection by Tang0 - redacted // Random crew skins by Albertus Smythe - redacted // Random convoy selection by Albertus Smythe // Bigger spawn area radius by Albertus Smythe // Below modifications are done by salival // Full credit for the AI gear/pack/skin/weapon selection goes to WAI, I used this system because it works amazingly and it gives me a single configuration to make loot changes to. - salival // Random gear selection (ai_gear_random from WAI - WAI MUST BE INSTALLED) // Random weapon selection (ai_wep_random from WAI - WAI MUST BE INSTALLED) // Random backpack selection (ai_packs from WAI - WAI MUST BE INSTALLED) // Random skill selection (ai_skill_random from WAI - WAI MUST BE INSTALLED) // Random skin selection (variable: _aiskins contains arrays from WAI (ai_hero_skin,ai_bandit_skin) - WAI MUST BE INSTALLED) // Enemy will now pull parachute 100% of the time to stop players from getting free loot. Make the buggers work for it! // Enemies will now share information about players to other AI when a unit is killed (variable _aisharedistance) // Humanity is now given/lost dependant on alignment, - humanity if player is bandit, + humanity if player is hero // Chopper will now correctly spawn at the right height based on _spawn (setPosATL) // Chopper will now fly at a height of (_fh_lower + random(_fh_random). // Chopper will randomly select a speed from _convoyspeeds. You can sway the chance of a particular speed being selected by upping the number in the second field. Make sure it all adds up to 100. // ********************************* //diag_log format ["Heli Convoy: debug: %1 ",_debugvariable]; //place holder for debugging. if (isServer) then { // Add 5min delay to alow DZAI etc to sort itself out otherwise 1st heli seems to be created without a pilot // so it immedietly crashes and then there are no waypoints set for the convoy so it just hovers above // the create point uiSleep (60*5); _convoyspeed = []; _flyspeed = ""; _fh_random = 80; // This number here gets randomized and then added to the below number to form the _flyheight variable. _fh_lower = 70; // This is the lowest number that flyheight can be, the above number gets randomized and added to it to form the _flyheight variable. _aisharedistance = 600; _aiskins = ai_hero_skin + ai_bandit_skin; _spawn = [50,50,300]; // Spawn location of chopper, x, y and z for height. //_spawn = [100,1500,0]; //debug spawn location for testing _gridN = 15; _mapSize = 15360; //CHERNARUS // ["SPEED",% chance of picking this speed], Make sure the chances add up to 100 or it will not be an accurate percentage. _convoyspeeds = [ ["LIMITED",10], ["NORMAL",50], ["FULL",40] ]; _heliFormation =[ [5,0], [10,6], [4,3], [0,4], [8,1,7], [0], [1], [2], [3], [4], [5], [6], [7], [8], [10] ]; // define a list of heli's to make up convoys from. // [ Vehicle_name,Passenger count,[ammo for each gunpoint],number of Loot points] // Passenger count is in addition to the pilot and gunners on the heli's gun points. // Empty ammo array means the Heli is unarmed and won't shoot but will land and disembark crew. donn_heliConvy = [ /*0*/["UH1H_DZ",0,["100Rnd_762x51_M240","100Rnd_762x51_M240"],3], /*1*/["UH1H_DZ",4,[],4], /*2*/["Mi17_UN_CDF_EP1",5,["100Rnd_762x54_PK","100Rnd_762x54_PK"],5], /*3*/["CH_47F_EP1_DZE",6,["100Rnd_762x51_M240","4000Rnd_762x51_M134","4000Rnd_762x51_M134"],6], /*4*/["AH6J_EP1_DZ",1,[],2], //ARMED (PILOT) /*5*/["UH60M_EP1_DZE",0,["2000Rnd_762x51_M134","2000Rnd_762x51_M134"],3], /*6*/["UH1Y_DZE",0,["2000Rnd_762x51_M134","2000Rnd_762x51_M134"],3], /*7*/["UH1H_TK_EP1",0,["100Rnd_762x51_M240","100Rnd_762x51_M240"],3], /*8*/["BAF_Merlin_DZE",4,[],4], /*9*/["pook_H13_amphib_CIV",1,[],1], /*10*/["pook_H13_transport_UNO",2,["100Rnd_762x51_M240"],2] ]; { for "_i" from 1 to (_x select 1) do { _convoyspeed set [count _convoyspeed, _x select 0]; }; } count _convoyspeeds; donn_hwps = []; for "_i" from 1 to (_gridN - 1) do { _wpx = (_i/_gridN)*_mapSize; for "_y" from 1 to (_gridN - 1) do { _wpy = (_y/_gridN)*_mapSize; if !(surfaceIsWater [_wpx,_wpy]) then {donn_hwps = donn_hwps + [[_wpx,_wpy,0]];}; }; }; _heliGroupTot = count _heliFormation; donn_heli_HD = { _heliHurt = _this select 0; _damage = _this select 2; if !(canMove _heliHurt) then { if (_heliHurt getVariable "dncmv") then { _heliHurt setVariable ["dncmv",false,false]; { _x action ["Eject",_heliHurt]; } forEach crew _heliHurt; }; }; _damage }; donn_heli_unit_HD = { // Put group into combat RED mode if heli damaged by player _hurtedOne = _this select 0; _damage = _this select 2; _ofender = _this select 3; _grp = group _hurtedOne; if (combatMode _grp != "RED" && isPlayer _ofender) then { {_x enableAi "TARGET";} forEach units _grp; {_x enableAi "AUTOTARGET";} forEach units _grp; _grp reveal [_ofender,4]; _grp setCombatMode "RED";_grp setBehaviour "COMBAT"; }; _damage }; donn_heli_unitKill = { _unit = _this select 0; _player = _this select 1; _humanity = _player getVariable["humanity",0]; //Reads the player's current humanity count _gain = _unit getVariable ["humanity",50]; //Sets Humanity reward value. 50 humanity per AI kill. _role = assignedVehicleRole _unit; if ((assignedVehicleRole _unit) select 0 == "Driver") then { // If driver is killed eject the crew. _vehEject = assignedVehicle _unit; { _x action ["Eject",_vehEject]; } forEach crew _vehEject; }; if ({alive _x} count units group _unit == 0) then {donn_heliGrps = donn_heliGrps - [group _unit];}; //coins reward //_unit setVariable ["cashMoney",12500 + (round random 5) * 1000,true]; //Humanity Reward - this gives - humanity for bandit player and + humanity for hero player if (_humanity < 0) then { _player setVariable ["humanity",(_humanity - _gain),true]; } else { _player setVariable ["humanity",(_humanity + _gain),true]; }; { if (((position _x) distance (position _unit)) <= _aisharedistance) then { _x reveal [_player, 4.0]; } } forEach allUnits; }; donn_makeAeroRoute = { // Set route for convoy _origin = _this select 0; _heli_group = _this select 1; _speed = _this select 2; _posBefore = _origin; _posNow = _origin; _wp = _heli_group addWaypoint [_posNow,0,0]; _wp setWaypointCompletionRadius 65; _wp setWaypointType "MOVE"; _wp setWaypointSpeed _speed; _posNext = [0,0,0]; for "_c" from 1 to 5 do { _distToBefore = 0; _distToNext = 0; _found = false; for "_x" from 1 to 200 do { _posNext = donn_hwps call BIS_fnc_selectRandom; _distToNext = _posNow distance _posNext; _distToBefore = _posNext distance _posBefore; if (_distToNext > 3000 && _distToBefore > 4000) exitWith {}; uiSleep 0.001; }; if (!_found) then {_posNext = donn_hwps call BIS_fnc_selectRandom;}; _wp = _heli_group addWaypoint [_posNext,0,_c]; _wp setWaypointCompletionRadius 65; _wp setWaypointType "MOVE"; _wp setWaypointSpeed _speed; _posNow = _posNext; }; _wp = _heli_group addWaypoint [_origin,0,6]; _wp setWaypointCompletionRadius 65; _wp setWaypointType "CYCLE"; _wp setWaypointSpeed _speed; }; donn_heliGrps = []; [] spawn { while {{!isNull _x} count donn_heliGrps > 0} do { { _grp = _x; _forceIn = true; {if (_grp knowsAbout _x >= 1.5) then {_grp reveal [_x,4];_forceIn = false;};} forEach playableUnits; if (_forceIn) then { if (combatMode _grp != "BLUE") then { {_x disableAi "TARGET";uiSleep 0.001;} forEach units _grp; {_x disableAi "AUTOTARGET";uiSleep 0.001;} forEach units _grp; _grp setCombatMode "BLUE";_grp setBehaviour "CARELESS"; }; {if (vehicle _x == _x) then {[_x] orderGetIn true;uiSleep 0.001;};} forEach units _grp; }; } forEach donn_heliGrps; uiSleep 10; }; diag_log "[HELI CONVOY] Finished convoy rotation."; }; while {1 == 1} do { _cs = floor( random _heliGroupTot); diag_log ("[HELI CONVOY] Initialized Spawn! " + str _cs); _flyheight = round(_fh_lower + random(_fh_random)); _heli_group = createGroup EAST; donn_heliGrps = donn_heliGrps + [_heli_group]; _convoy = _heliFormation select (_cs); _qtd = count _convoy; _helis = []; {_helis = _helis + [donn_heliConvy select _x];} forEach _convoy; for "_n" from 1 to _qtd do { _heli = _helis select (_n-1); _motor = createVehicle [_heli select 0,_spawn,[],150,"FLY"]; _motor setPosATL _spawn; _crew =[]; _motor removeAllEventHandlers "handleDamage"; _motor addEventHandler ["handleDamage",{_this call donn_heli_HD}]; _motor setVariable ["dncmv",true,false]; _motor setVariable ["dnishp",true,true]; _motor setVariable ["dnishpq",_heli select 3,true]; _motor setFuel 1; _motor setVehicleLock "LOCKED"; _motor flyInHeight _flyHeight; _ammos = _heli select 2; {_ammo = _x;for "_a" from 1 to 8 do {_motor addMagazineTurret [_ammo,[_forEachIndex]];};} forEach _ammos; _driverCount = 1; _turreterCount = count _ammos; _cargorsCount = _heli select 1; _crewCount = _driverCount + _turreterCount + _cargorsCount; _gunnerPos = 0; for "_y" from 1 to _crewCount do { private "_unit","_aiweapon","_weapon","_magazine","_aipack","_aigear","_gearmagazines","_geartools","aicskill","aiskin"; _aiweapon = []; _aigear = []; _aipack = ""; _aiskin = ""; _aicskill = []; if (_y == 1) then { //Skin for pilot _aiskin = _aiskins call BIS_fnc_selectRandom; _unit = _heli_group createUnit [_aiskin,_spawn,[],50,"PRIVATE"]; }; if (_y > 1) then { // Selection of skins for other crew. _aiskin = _aiskins call BIS_fnc_selectRandom; _unit = _heli_group createUnit [_aiskin,_spawn,[],50,"PRIVATE"]; }; _unit removeAllEventHandlers "killed"; _unit removeAllEventHandlers "handleDamage"; _unit addEventHandler ["killed",{_this call donn_heli_unitKill;}]; _unit addEventHandler ["handleDamage",{_this call donn_heli_unit_HD}]; [_unit] joinSilent _heli_group; _unit setSkill 0.85; // remove default gear/weapons from crew man removeAllWeapons _unit; removeAllItems _unit; _aigear = ai_gear_random call BIS_fnc_selectRandom; _gearmagazines = _aigear select 0; _geartools = _aigear select 1; _aiweapon = ai_wep_random call BIS_fnc_selectRandom; _weapon = _aiweapon call BIS_fnc_selectRandom; _magazine = _weapon call find_suitable_ammunition; _aipack = ai_packs call BIS_fnc_selectRandom; for "_i" from 1 to 4 do { _unit addMagazine _magazine; }; _unit addweapon _weapon; _unit selectWeapon _weapon; _unit addBackpack _aipack; { _unit addMagazine _x } count _gearmagazines; { _unit addweapon _x } count _geartools; _crew set [_y-1,_unit]; }; {deleteVehicle _x;} forEach crew _motor; // moved in order to delete any default crew immediatly before adding the new crew. for "_y" from 1 to _crewCount do { _unit = _crew select (_y-1); if (_y == 1) then { //First crewman is pilot _unit assignAsDriver _motor; _unit moveInDriver _motor; _aicskill = ai_skill_random call BIS_fnc_selectRandom; { _unit setSkill [(_x select 0),(_x select 1)] } count _aicskill; }; if (_y > 1 && _y <= 1 + _turreterCount) then { // Assign a crewman to each turret. _unit assignAsGunner _motor; _unit moveInTurret [_motor,[_gunnerPos]]; _gunnerPos = _gunnerPos + 1; _aicskill = ai_skill_random call BIS_fnc_selectRandom; { _unit setSkill [(_x select 0),(_x select 1)] } count _aicskill; }; if (_y > 1 + _turreterCount) then { //Assign the rest of the crew as passengers _unit assignAsCargo _motor; _unit moveInCargo _motor; _aicskill = ai_skill_random call BIS_fnc_selectRandom; { _unit setSkill [(_x select 0),(_x select 1)] } count _aicskill; }; }; {_x disableAi "TARGET";uiSleep 0.001;} forEach units _heli_group; {_x disableAi "AUTOTARGET";uiSleep 0.001;} forEach units _heli_group; _heli_group setCombatMode "BLUE";_heli_group setBehaviour "CARELESS"; }; _flyspeed = _convoyspeed call BIS_fnc_selectRandom; [donn_hwps call BIS_fnc_selectRandom,_heli_group,_flyspeed] call donn_makeAeroRoute; uiSleep (60*15); }; };  
  17. Like
    salival got a reaction from Albertus Smythe in Andre Aerial Patrol - [Coconut Release] - Any Map   
    Hey,
     
    We are running your code at present (have been for a bit) and we have been fiddling with the code to get it working better which it is.
    It's no longer dumping AI into the ocean in such great amounts, maybe once or twice per restart, I'll keep an eye on it and see what it does
    Cheers for the reply
  18. Like
    salival reacted to Basti890 in [Request] Disabling salvaging for Locked Vehicles   
    got this working on my epoch 1.0.5.1
    salvage_vehicle.sqf:
    private ["_part","_cancel","_color","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"]; _vehicle = _this select 3; {dayz_myCursorTarget removeAction _x} count s_player_repairActions; s_player_repairActions = []; _hitpoints = _vehicle call vehicle_getHitpoints; { _damage = [_vehicle,_x] call object_getHit; _part = "PartGeneric"; //change "HitPart" to " - Part" rather than complicated string replace _cmpt = toArray (_x); _cmpt set [0,20]; _cmpt set [1,toArray ("-") select 0]; _cmpt set [2,20]; _cmpt = toString _cmpt; if(["Engine",_x,false] call fnc_inString) then { _part = "PartEngine"; }; if(["HRotor",_x,false] call fnc_inString) then { _part = "PartVRotor"; //yes you need PartVRotor to fix HRotor LOL }; if(["Fuel",_x,false] call fnc_inString) then { _part = "PartFueltank"; }; if(["Wheel",_x,false] call fnc_inString) then { _part = "PartWheel"; }; if(["Glass",_x,false] call fnc_inString) then { _part = "PartGlass"; }; // allow removal of any lightly damaged parts if (_damage < 1) then { // Do not allow removal of engine or fueltanks if( _part == "PartGlass" || _part == "PartWheel" || _part == "PartEngine" || _part == "PartVRotor" || _part == "PartFueltank" || _part == "PartGeneric" ) then { _color = "color='#00ff00'"; // green if (_damage >= 0.1) then {_color = "color='#bfff00'";}; //light-green if (_damage >= 0.35) then {_color = "color='#ffff00'";}; //yellow if (_damage >= 0.65) then {_color = "color='#ff8800'";}; //orange if (_damage >= 0.9) then {_color = "color='#ff0000'";}; //red _percent = round(_damage*100); _string = format["<t %2>Remove%1 (%3 %4)</t>",_cmpt,_color,_percent,"%"]; //Remove - Part _handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\salvage.sqf",[_vehicle,_part,_x], 0, false, true, "",""]; s_player_repairActions set [count s_player_repairActions,_handle]; }; }; } count _hitpoints; if(count _hitpoints > 0 ) then { _cancel = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_CANCEL", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_cancel]; s_player_repair_crtl = 1; };fn_selfActions.sqf (particular):
    //Repairing Vehicles if ((dayz_myCursorTarget != _cursorTarget) && _isVehicle && !_isMan && _hasToolbox && (damage _cursorTarget < 1) && !_isDisallowRepair) then { if (s_player_repair_crtl < 0) then { dayz_myCursorTarget = _cursorTarget; _menu = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_REPAIRV", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_menu]; if(!locked _cursorTarget) then { _menu1 = dayz_myCursorTarget addAction [localize "STR_EPOCH_PLAYER_SALVAGEV", "custom\salvage_vehicle.sqf",_cursorTarget, 0, true, false, "",""]; s_player_repairActions set [count s_player_repairActions,_menu1]; }; s_player_repair_crtl = 1; } else { {dayz_myCursorTarget removeAction _x} count s_player_repairActions;s_player_repairActions = []; s_player_repair_crtl = -1; }; }; 
  19. Like
    salival reacted to DirtyGranny in Enhanced Spawn Selection V2 -   
    Hi Ebay,
    Wow.. you were bang on, that fixed it!
    This was my error  i deleted those markers for some unknown reason during install (face palm!).. must be losing my marbles. 
    Hey thankyou for such a great script and thanks again for being such an active and supportive member - there's an awful lot of knowledgeable and friendly people on these forums and the support and guidance is priceless and very much appreciated! 
    Cheers!
    DG
  20. Like
    salival reacted to Greevir in Show Off Your Base   
    By shooting them in the face.
×
×
  • Create New...