Jump to content

sjd6795

Member
  • Content Count

    107
  • Joined

  • Last visited

About sjd6795

  • Rank
    Hardened

Recent Profile Visitors

594 profile views
  1. Thats nice, thanks for sharing.. your useful reply. Yea.. I know that much. You could reply something useful to the topic or dont reply at all. I dont know where the undefined variable is everything looks fine and line 84 only has that single line of code in the OP.
  2. Good to know, thanks I'll adjust that now. I found another solution that seems to work as well. I added DZE_safeVehicle = ["ArmoredSUV_PMC_DZ","AH6X_EP1"]; to my custom variables and that seemed to do the trick. As for my helicopter not spawning I made some small typos and I got it to spawn but he was wiped out before he could take off by the police lol. I still can't figure out why the ai.sqf and ai_suv.sqf aren't working together they are both set to east but the ai.sqf attacks the ai_suv.sqf however they both attack me like they should.
  3. Getting this error in my RPT for line 84 of my event script. This is line 84 in the script _vehclass = cargo_trucks call BIS_fnc_selectRandom; 6:00:02 Error in expression <all BIS_fnc_selectRandom; _vehclass = cargo_trucks call BIS_fnc_selectRandom; > 6:00:02 Error position: <cargo_trucks call BIS_fnc_selectRandom; > 6:00:02 Error Undefined variable in expression: cargo_trucks 6:00:02 File z\addons\dayz_server\modules\event1.sqf, line 84
  4. Also the SUV that spawns is the version with no ammo. Instead of ArmoredSUV_PMC_DZE it should be ArmoredSUV_PMC_DZ. I added the vehicle to my allowed vehicles in my dynamic_vehicle.sqf but it keeps getting killed by hacker. Also what is the zone_check suppose to do? I thought it was if player gets so many meters from waypoint the bank robbery fails but that doesn't seem to be happening. I can rob the bank run into the woods and avoid the police and still successfully rob the bank. How can I make it to where you have to stay inside the building until robbery is successful? Also the SUV and AI are shooting at each other? I can't seem to get them on the same side, however both the AI and SUV shoot at me. Both are set to center east ai_suv.sqf private ["_suvGroup","_randomPos","_suv","_gunner","_driver","_suvWP","_loadout","_aiwep","_aiammo"]; ///Spawn a SUV with a driver & gunner near the bank./// _suvGroup = createGroup EAST; _randomPos = [[13241, 13962,0.1],[13047, 13974,0.1],[13120, 13932,0.1]] call BIS_fnc_selectRandom; _CENTER = createCenter east; //Creates Center. EAST setFriend [WEST,0]; //Sets West (Survivors) as hostile. _suv = createVehicle ["ArmoredSUV_PMC_DZ",_randomPos, [], 0, "CAN_COLLIDE"]; _suv setDir round random 360; _suv setFuel 1; _suv allowDammage true; _gunner = _suvGroup createUnit ["BAF_Soldier_L_DDPM",getPos _suv, [], 0, "PRIVATE"]; _gunner assignAsGunner _suv; _gunner moveInGunner _suv; _suvGroup selectLeader _gunner; sleep 15; _driver = _suvGroup createUnit ["BAF_Soldier_L_DDPM",getPos _suv, [], 0, "PRIVATE"]; _driver assignAsDriver _suv; _driver moveInDriver _suv; dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_suv]; _suvWP = _suvGroup addWaypoint [[13130, 13958,0],0]; _suvWP setWaypointType "MOVE"; _loadout = ["M4A1_AIM_SD_camo","30Rnd_556x45_StanagSD"]; { _X enableAI "TARGET"; _X enableAI "AUTOTARGET"; _X enableAI "MOVE"; _X enableAI "ANIM"; _X enableAI "FSM"; _X allowDammage true; _X setCombatMode "RED"; _X setBehaviour "COMBAT"; removeAllWeapons [_gunner,_driver] _aiwep = _loadout select 0; _aiammo = _loadout select 1; _X addWeapon _aiwep; _X addMagazine _aiammo; _X addMagazine _aiammo; _X setSkill ["aimingAccuracy",1]; _X setSkill ["aimingShake",1]; _X setSkill ["aimingSpeed",1]; _X setSkill ["endurance",1]; _X setSkill ["spotDistance",0.6]; _X setSkill ["spotTime",1]; _X setSkill ["courage",1]; _X setSkill ["reloadSpeed",1]; _X setSkill ["commanding",1]; _X setSkill ["general",1]; } count (units _suvGroup); ai.sqf ////////////////////////////////////////////////////////////// //New Bank AI by Spodermayt, for Darihon's Bank Raid Script.// /////////////////////////15.10.2014/////////////////////////// private ["_squad1","_squad2","_squad3","_squad4","_squad5","_squad6"]; execVM "rob\bank_config.sqf"; sleep 0.5; if(_debugBank == 1) then { systemChat "[DEBUG] AI successfully executed."; }; //Init (create center etc) _CENTER = createCenter east; //Creates Center. _aiGroup = createGroup east; //Creates a Group. EAST setFriend [WEST,0]; //Sets West (Survivors) as hostile. //Spawn 25 AI's. _squad1 = _aiGroup createUnit ["Policeman",[13185, 13907, 0.1], [], 10, "PRIVATE"]; _squad2 = _aiGroup createUnit ["Policeman",[13109, 13920, 0.1], [], 10, "PRIVATE"]; _squad3 = _aiGroup createUnit ["Policeman",[13107, 13970, 0.1], [], 10, "PRIVATE"]; _squad4 = _aiGroup createUnit ["Policeman",[13130, 14010, 0.1], [], 10, "PRIVATE"]; _squad5 = _aiGroup createUnit ["Policeman",[13190, 13997, 0.1], [], 10, "PRIVATE"]; _squad6 = _aiGroup createUnit ["Policeman",[13249, 13932, 0.1], [], 10, "PRIVATE"]; _target = [13140.3, 13949, 0.0014782]; //Waypoint to Bank. if(_debugBank == 1) then { systemChat "[DEBUG AI] Units Created."; }; //Add everyone to a "master" group. [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] joinSilent _unitGroup; //Give everyone weapons. _squad1 addWeapon "M4A1_Aim"; _squad1 addMagazine "30Rnd_556x45_Stanag"; _squad1 addMagazine "30Rnd_556x45_Stanag"; _squad2 addWeapon "M4A1_Aim"; _squad2 addMagazine "30Rnd_556x45_Stanag"; _squad2 addMagazine "30Rnd_556x45_Stanag"; _squad3 addWeapon "M4A1_Aim"; _squad3 addMagazine "30Rnd_556x45_Stanag"; _squad3 addMagazine "30Rnd_556x45_Stanag"; _squad4 addWeapon "M4A1_Aim"; _squad4 addMagazine "30Rnd_556x45_Stanag"; _squad4 addMagazine "30Rnd_556x45_Stanag"; _squad5 addWeapon "M4A1_Aim"; _squad5 addMagazine "30Rnd_556x45_Stanag"; _squad5 addMagazine "30Rnd_556x45_Stanag"; _squad6 addWeapon "M4A1_Aim"; _squad6 addMagazine "30Rnd_556x45_Stanag"; _squad6 addMagazine "30Rnd_556x45_Stanag"; if(_debugBank == 1) then { systemChat "[DEBUG AI] Gave Weapons to AI."; }; //Set Skills. [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setSkill ["aimingspeed", 0.5]; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setSkill ["spotdistance", 0.5]; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setSkill ["aimingaccuracy", 0.5]; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setSkill ["aimingshake", 0.5]; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setSkill ["spottime", 0.2]; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setSkill ["spotdistance", 0.5]; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setSkill ["commanding", 0.4]; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setSkill ["general", 0.5]; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] enableAI "TARGET"; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] enableAI "AUTOTARGET"; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] enableAI "MOVE"; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] enableAI "ANIM"; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] enableAI "FSM"; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setCombatMode "RED"; [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] setBehaviour "COMBAT"; //Move units to bank. [_squad1,_squad2,_squad3,_squad4,_squad5,_squad6] moveTo _target; if(_debugBank == 1) then { systemChat "[DEBUG AI] Set Units Skills."; }; I'm also trying to add a getaway vehicle by copying how the ai_suv.sqf works but it doesn't seem to be spawning my helicopter. here is my getaway.sqf //get away vehicle private ["_getawayGroup","_spawnPos","_heli","_driver","_flyWP"]; _CENTER = createCenter west; //Ceates center _getawayGroup = createGroup WEST; _spawnPos = [[13122, 13951,0]]; _heli = createVehicle ["AH6J_EP1",_spawnPos, [] ,0 "CAN_COLLIDE"]; _heli setDir round random 360; _heli setFuel 1; _heli allowDamage true; _driver = _getawayGroup createUnit ["Pilot_EP1_DZ".getPos _heli, [], 0, "PRIVATE"]; _driver assignAsDriver _heli; _driver moveInDriver _heli; _getawayGroup selectLeader _driver; sleep 15; dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_heli]; _flyWP = _getawayGroup addWaypoint [[13122, 13951,30,0],0]; _flyWP setWaypointType "MOVE"; { _X enableAI "TARGET"; _X enableAI "AUTOTARGET"; _X enableAI "MOVE"; _X enableAI "ANIM"; _X enableAI "FSM"; _X allowDammage true; _X setCombatMode "GREEN"; _X setBehaviour "AWARE"; _X setSkill ["aimingAccuracy",1]; _X setSkill ["aimingShake",1]; _X setSkill ["aimingSpeed",1]; _X setSkill ["endurance",1]; _X setSkill ["spotDistance",0.6]; _X setSkill ["spotTime",1]; _X setSkill ["courage",1]; _X setSkill ["reloadSpeed",1]; _X setSkill ["commanding",1]; _X setSkill ["general",1]; } count (units _getawayGroup);
  5. The SUV still wasn't spawning when I used those changes so I did a little work myself on trying to fix it. I've relocated the bank to a custom town so I've changed a lot of the waypoints and also removed the ai_suv.sqf from the config as an enable option and added it timer so it spawns with the AI.sqf and it seems to be working fine, except the gunner doesn't shoot he just looks at me and turns the gun. I also had to add the vehicle to my dynamic_vehicle.sqf allowed vehicles so it didn't get removed by killing a hacker. Here is my changed version of the script ai_suv.sqf private ["_suvGroup","_randomPos","_suv","_gunner","_driver","_suvWP","_loadout","_aiwep","_aiammo"]; ///Spawn a SUV with a driver & gunner near the bank./// _suvGroup = createGroup EAST; _randomPos = [[13241, 13962,0.1],[13047, 13974,0.1],[13120, 13932,0.1],[13131, 14120,0.1]] call BIS_fnc_selectRandom; _suv = createVehicle ["ArmoredSUV_PMC_DZE",_randomPos, [], 0, "CAN_COLLIDE"]; _suv setDir round random 360; _suv setFuel 1; _suv allowDammage true; _gunner = _suvGroup createUnit ["BAF_Soldier_L_DDPM",getPos _suv, [], 0, "PRIVATE"]; _gunner assignAsGunner _suv; _gunner moveInGunner _suv; _suvGroup selectLeader _gunner; sleep 15; _driver = _suvGroup createUnit ["BAF_Soldier_L_DDPM",getPos _suv, [], 0, "PRIVATE"]; _driver assignAsDriver _suv; _driver moveInDriver _suv; dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_suv]; _suvWP = _suvGroup addWaypoint [[13130, 13958,0],0]; _suvWP setWaypointType "MOVE"; _loadout = ["M4A1_AIM_SD_camo","30Rnd_556x45_StanagSD"]; { _x enableAI "TARGET"; _x enableAI "AUTOTARGET"; _x enableAI "MOVE"; _x enableAI "ANIM"; _x enableAI "FSM"; _x allowDammage true; _x setCombatMode "RED"; _x setBehaviour "COMBAT"; removeAllWeapons _x _aiwep = _loadout select 0; _aiammo = _loadout select 1; _x addWeapon _aiwep; _x addMagazine _aiammo; _x addMagazine _aiammo; _x setSkill ["aimingAccuracy",1]; _x setSkill ["aimingShake",1]; _x setSkill ["aimingSpeed",1]; _x setSkill ["endurance",1]; _x setSkill ["spotDistance",0.6]; _x setSkill ["spotTime",1]; _x setSkill ["courage",1]; _x setSkill ["reloadSpeed",1]; _x setSkill ["commanding",1]; _x setSkill ["general",1]; } count (units _suvGroup); robbank.sqf private ["_gold","_gold10oz","_briefcase","_loot","_robbing"]; _AI = "rob\ai.sqf"; _SUV = "rob\ai_suv.sqf"; // Checks if script is active, thanks Halvhjearne <3 if(isNil "script_in_progress")then{ script_in_progress = false; }; if(script_in_progress)exitwith{ systemChat "The bank is empty wait for more loot to be delivered!"; }; script_in_progress = true; // End Checks if Script is active execVM "rob\zone_check.sqf"; cutText [format["You are about to attempt to rob the bank."], "PLAIN DOWN"]; sleep 5; // Currency // _gold = "ItemGoldBar"; _gold10oz = "ItemGoldBar10oz"; _briefcase = "ItemBriefcase100oz"; // Makes sure that the game checks for the 30 percent. _random = floor(random 11); //0-10 if (_random <= 10) then { cutText [format["You are robbing the bank, the police has been warned. 5 minutes left.."], "PLAIN DOWN"]; sleep 5; [nil,nil,rTitleText,"The bank is getting robbed!", "PLAIN",10] call RE; sleep 55; cutText [format["4 minutes left.."], "PLAIN DOWN"]; sleep 20; cutText [format["The police has arrived! Protect yourself!"], "PLAIN DOWN"]; execVM _AI; execVM _SUV; sleep 40; cutText [format["3 minutes left.."], "PLAIN DOWN"]; sleep 60; cutText [format["2 minutes left.."], "PLAIN DOWN"]; sleep 60; cutText [format["1 minute left.."], "PLAIN DOWN"]; sleep 60; player playActionNow "Medic"; sleep 8; [nil,nil,rTitleText,"The bank has been robbed successfully!", "PLAIN",10] call RE; _random2 = floor(random 3); // Makes an another random section, which chooses the loot randomly. if (_random2 == 0) then { cutText [format["The vault was emptied recently, no big loot."], "PLAIN DOWN"]; player addMagazine _gold; player addMagazine _gold; player addMagazine _gold; systemChat "The robber got: 3x Gold"; }; if (_random2 == 1) then { cutText [format["A lot of Gold."], "PLAIN DOWN"]; player addMagazine _gold10oz; player addMagazine _gold10oz; player addMagazine _gold10oz; player addMagazine _gold10oz; player addMagazine _gold10oz; systemChat "The robber got: 5x Gold10oz"; }; if (_random2 == 2) then { cutText [format["A small fortune."], "PLAIN DOWN"]; player addMagazine _briefcase; player addMagazine _briefcase; systemChat "The robber got: 2 briefcases!"; }; if (_random2 == 3) then { cutText [format["Jackpot!!!."], "PLAIN DOWN"]; player addMagazine _briefcase; player addMagazine _briefcase; player addMagazine _briefcase; player addMagazine _briefcase; systemChat "The robber got: 4 briefcases!"; }; // Output if above is not activated. } else { cutText [format["Bank robbery failed.."], "PLAIN DOWN"]; systemChat "Bank robbery failed!"; }; sleep 600; //10min script_in_progress = false;
  6. Ok I'll give this a try. Also how does the AI_SUV spawn? I set it to 100 so it always spawns but I haven't seen it yet. I noticed it doesn't have any coordinates in the spawn pos. It's all 0,0,0
  7. Found another problem, when purchasing a vehicle it does not spawn, something with publishvehicle2 in the RPT. I removed the script and vehicles seem to be spawning again.
  8. Ok I will mess around with it, I've noticed selling gold 10oz sometimes sells for double the price you can buy it for.
  9. Hey @Mig So I removed all the other options of loot and only left _random2 = floor(random 1); // Makes an another random section, which chooses the loot randomly. if (_random2 == 1) then { cutText [format["Jackpot!!!."], "PLAIN DOWN"]; player addMagazine _briefcase; player addMagazine _briefcase; player addMagazine _briefcase; player addMagazine _briefcase; systemChat "The robber got: 4 briefcases!"; }; But this isn't giving me briefcase when I rob the bank I still got silver from it, even though I removed anything to do with looting any other currency in the script.
  10. Update 1.2 Added a town on the NE side of the map just above NEAF which has a bank that is able to be robbed at a risk of being caught by the police! Quick select HUD for main/secondary weapon switching and quick bandage/bloodbag keybinds. This can be toggled by TAB key, credits to RLNT.
  11. Seems to be working pretty good, but something I don't like is that the sell price on attachments seem to be way higher then the buy price. Players could literally just buy and sell to make huge profits. Maybe I just catch it at a bad time and always see the sell higher then the buy. I just noticed it the exact opposite just now, so maybe false alarm. Would there be a way to set it so the sell price always matches the last buy price?
  12. So I'm running some events but I'd rather have the event stay active 100% of the time. How would I make the event spawn and stay active until it's complete and then when it's complete it spawns again and everything repeats. My epoch event schedules don't seem to be working how I'd like so I need other options.
  13. Need a little help figuring out my epoch events, some server restarts my events happen other times they don't. They also don't seem to be following my schedule and running every "x" amount of minutes. Is my layout below correct is there any changes I should make to make the scripts run constantly throughout my 6 hour restarts. EpochEvents = [ ["any","any","any","any",5,"event1"], ["any","any","any","any",35,"event1"], ["any","any","any","any",0,"event1"], ["any","any","any","any",5,"event2"], ["any","any","any","any",10,"event2"], ["any","any","any","any",15,"event2"], ["any","any","any","any",20,"event2"], ["any","any","any","any",5,"event3"], ["any","any","any","any",15,"event3"], ["any","any","any","any",25,"event3"], ["any","any","any","any",35,"event3"], ["any","any","any","any",45,"event3"], ["any","any","any","any",0,"event3"], ["any","any","any","any",5,"event4"], ["any","any","any","any",0,"event4"] ];
  14. What does the first set do and what does the last set do? Is it just a random time between them?
  15. Seems to be working pretty good now which value do I adjust to add more time between phases? I see this on all the steps if ((timeleft >= 300) and (timeleft <= 325) do I adjust both of these?
×
×
  • Create New...