Darihon Posted June 6, 2014 Report Share Posted June 6, 2014 Current state: V3 [W.I.P] Hello, I've been working on this script for atleast a few days now and it's ready for it's release. It is still a work in progress and gets updated on people's feedback and/or problems. The script works very easy: Whenever a player looks at a laptop an option shows up: "Rob Bank". Whenever they activate the script they have a 30% chance for it to go succesfully. If the bank robbery goes succesful, the script picks a random number and a random loot based on the random number. The script is only runable once per restart! Installation: Add to if(isServer) { in init.sqf: execVM "rob\bank_building.sqf"; Add in the 'fn_selfactions.sqf' file (around line 100): // Bank Robbery _bankrobbery = cursorTarget isKindOf "Notebook"; if ((speed player <= 1) && _bankrobbery && (player distance cursorTarget < 5)) then { if (s_player_bankrob < 0) then { s_player_bankrob = player addAction ["Rob the bank","rob\robbank.sqf",cursorTarget, 0, false, true, "",""]; }; } else { player removeAction s_player_bankrob; s_player_bankrob = -1; }; // Bank Robbery END Add the AI: Just add the "ai.sqf" inside of the "robbank.sqf" folder and the AI will spawn :) Configuration options: Change the object which activates the script: _bankrobbery = cursorTarget isKindOf "Notebook"; Change "Notebook" to another classname i.e "Land_Chair_EP1" Allow the script to run multiple times: I've add something that allows that inside of the "robbank.sqf". At the bottom of the script is the following located: // sleep seconds; // script_in_progress = false; Remove the // in front of those 2, so it should look like this: sleep seconds; script_in_progress = false; Change the "seconds" in your wanted time (in seconds) Different loot: Let's take the jackpot for example: if (_random2 == 5) then { cutText [format["Jack.. Jack.. Pot!!"], "PLAIN DOWN"]; player addMagazine _briefcase; player addMagazine _briefcase; systemChat "Ting ting ting... The jackpot has been stolen! Bye bye 2 briefcases"; }; It's not that hard to change the loot. All u want to do is the following: add/edit the "player addMagazine" code, so if u want to add another briefcase, then it should like this: player addMagazine _briefcase; Download: Version 2.5 [DROPBOX] Version 2.9 [DROPBOX] [not working correctly] Feedback, problems: Everything is appreciated. Feedback can make this script better and improves the fun of it. Thanks to: Halvhjearne Boyd Peipo118 Ebayn.0.0b UKSS, Mr.Exodus, CJHouston and 5 others 8 Link to comment Share on other sites More sharing options...
Darihon Posted June 6, 2014 Author Report Share Posted June 6, 2014 Reserved for further updates.. The bank is located inside of Novy Sobor: http://pastebin.com/5GW6ALby Installation: Make a folder in your dayz_server.pbo called "maps" or something like that. Open ur server_functions.sqf (dayz_server.pbo --> init --> server_funtions.sqf) Open the file and scroll down to the bottom and add the following: execVM "\z\addons\dayz_server\path\bank.sqf"; So it should look like this: diag_log format["SAFE LOCKED: ID:%1 UID:%2 BY %3(%4)", _objectID, _objectUID, (name _player), (getPlayerUID _player)]; }; execVM "\z\addons\dayz_server\path\bank.sqf"; Link to comment Share on other sites More sharing options...
Csus Posted June 6, 2014 Report Share Posted June 6, 2014 very nice :) though, i do have an idea :P how about having AI spawning during a 5 minute countdown timer that the player has to defend against, like an 'everlasting' stream of AI. of course, everlasting is too many ai but you could have 20 maybe and every time one dies it gets replaced. if the person who activates the robbery gets killed then the whole robbery is cancelled. then whole groups of people could work together to get some awesome loot. just an idea :) Darihon 1 Link to comment Share on other sites More sharing options...
Darihon Posted June 6, 2014 Author Report Share Posted June 6, 2014 Interesting idea, Csus! I'll see if I am able to implement that in the next version. The bank has been added and it is located at Novy Sobor. Link to comment Share on other sites More sharing options...
boyd Posted June 6, 2014 Report Share Posted June 6, 2014 Nice addition Darihon :D Darihon 1 Link to comment Share on other sites More sharing options...
Darihon Posted June 7, 2014 Author Report Share Posted June 7, 2014 Nice addition Darihon :D Thanks, Boyd! I forgot to add the bank.sqf, so it's added now! ( http://pastebin.com/5GW6ALby ) Link to comment Share on other sites More sharing options...
karamell Posted June 7, 2014 Report Share Posted June 7, 2014 if u close the game and come bk in u can rob the bank again and if u fire 1 shot with a dmr when ur standing next to the table in the bank the table starts dancing around and same with the laptop Link to comment Share on other sites More sharing options...
Darihon Posted June 7, 2014 Author Report Share Posted June 7, 2014 if u close the game and come bk in u can rob the bank again and if u fire 1 shot with a dmr when ur standing next to the table in the bank the table starts dancing around and same with the laptop Aha, never tested that. Will take a look at it and the next version (1.1) will include hard AI, so I don't think u want to rob the bank multiple times since the chance is high that u die. About the DMR shot, not sure about that one, could be caused because the object are placed inside of a building, I will try changing "CAN_COLLIDE" to "NONE". I will update you within an hour. Link to comment Share on other sites More sharing options...
Halvhjearne Posted June 7, 2014 Report Share Posted June 7, 2014 instead of all these if's you should rather use a switch case ... Link to comment Share on other sites More sharing options...
MGT Posted June 7, 2014 Report Share Posted June 7, 2014 Just spawn some Arma infantry, you don't need any AI script to do that. Link to comment Share on other sites More sharing options...
Darihon Posted June 7, 2014 Author Report Share Posted June 7, 2014 instead of all these if's you should rather use a switch case ... Possible, my personal preference goes to the "if", but I'll take a look at it.. if u close the game and come bk in u can rob the bank again and if u fire 1 shot with a dmr when ur standing next to the table in the bank the table starts dancing around and same with the laptop About the Notebook and Desk flying around. "NONE" hasn't worked either. Probally because they are an object, they have a basic physic and that allows them to fly away when u shoot at them, but that's just a thought. I'll take a further look at it later today. Thanks for reporting! Just spawn some Arma infantry, you don't need any AI script to do that. I'm working on that, you probally took a look at my pastebin profile which contains a file called "AI.sqf". That is only a WIP and I will put it inside of the "robbank.sqf" once it is ready. So, it's basicly a testing script so I don't have to do the whole process of robbing the bank. Link to comment Share on other sites More sharing options...
lmapper Posted June 7, 2014 Report Share Posted June 7, 2014 Video ? Screen-shots ? Link to comment Share on other sites More sharing options...
Darihon Posted June 7, 2014 Author Report Share Posted June 7, 2014 Video ? Screen-shots ? I will release a video shortly. Working on some other (cool) scripts. Link to comment Share on other sites More sharing options...
lmapper Posted June 7, 2014 Report Share Posted June 7, 2014 if(script_in_progress)exitwith{ systemChat "This script is only useable once (untill restart)!"; }; It exits the loop only, not the script. if (_random2 == 0) then if (_random2 == 3) then if (_random2 == 6) then if (_random2 == 1) then if (_random2 == 4) then if (_random2 == 2) then if (_random2 == 5) then Better use: swith {_random2 } do {}; // Checks if script is active, thanks Halvhjearne <3 if(isNil "script_in_progress")then{ script_in_progress = false; }; if(script_in_progress)exitwith{ systemChat "This script is only useable once (untill restart)!"; }; script_in_progress = true; // End Checks if Script is active Are you sure what it working ? You attach importance to, and then immediately check it out. What's the point? "script_in_progress" - what is it ? Where are you find it ? if (_random2 == 5) then { Chance to _random be equal "5": You think: 1/6 Real: 0.16666666666666669 % Link to comment Share on other sites More sharing options...
lmapper Posted June 7, 2014 Report Share Posted June 7, 2014 double post Link to comment Share on other sites More sharing options...
Csus Posted June 7, 2014 Report Share Posted June 7, 2014 hey darihon, to stop people relogging to use it agaun you could setVariable something onto the laptop or object itself, cause that can't relog ;) Link to comment Share on other sites More sharing options...
Darihon Posted June 7, 2014 Author Report Share Posted June 7, 2014 Wow.. That's a lot of useful tips and critic. About the "switch" way, if u've read the topic, then u'd have seen this: "Possible, my personal preference goes to the "if", but I'll take a look at it.." About the "loop", I'm working on that, trying to find a better way, no luck so far.. About the random part, I am no math man. If I'm honest, I hate math + 1/6 seems to be the same as 0,16? Thanks for the useful tips, lmapper. I'll take a look at them. Video will come up later tonight or tomorrow <3. EDIT: Thanks for the tip, Csus. I'll take a look at it. Link to comment Share on other sites More sharing options...
lmapper Posted June 7, 2014 Report Share Posted June 7, 2014 About the random part, I am no math man. If I'm honest, I hate math + 1/6 0,16? 1/6 = 1/6 0.16 = 1/625 just change floor(random 6) to floor(random 6.99) Link to comment Share on other sites More sharing options...
karamell Posted June 7, 2014 Report Share Posted June 7, 2014 the dmr shot was a zombie i shot coming in to the door so i never shot the laptop or desk Link to comment Share on other sites More sharing options...
Darihon Posted June 7, 2014 Author Report Share Posted June 7, 2014 Alright, thanks Lmapper. Will change in the next patch. Karamell, really strange. I haven't had time yet to test it, but when I shot it with a stanag gun, it started dancing once and then stayed static (laptop), the desk was moveable when u shoot at it. Link to comment Share on other sites More sharing options...
Dew Posted June 8, 2014 Report Share Posted June 8, 2014 thank you very much ... ;) Darihon 1 Link to comment Share on other sites More sharing options...
CartoonrBOY Posted June 8, 2014 Report Share Posted June 8, 2014 I just added this script and I can confirm the laptop and desk fidgeting after gunfire. My attempt to rob da bank failed, but I am interested to see where this goes. Nice addition Darihon. Keep at it, much appreciated. Darihon 1 Link to comment Share on other sites More sharing options...
Darihon Posted June 9, 2014 Author Report Share Posted June 9, 2014 thank you very much ... ;) I just added this script and I can confirm the laptop and desk fidgeting after gunfire. My attempt to rob da bank failed, but I am interested to see where this goes. Nice addition Darihon. Keep at it, much appreciated. Thanks for the positive feedback, I haven't had time yet to take a look at a fix for the dancing table and laptop :). v1.1 will be out soon, which contains AI (spawns whenever the bank robbery has started succesfully) and they are hard (+ dancing table fix) Link to comment Share on other sites More sharing options...
Csus Posted June 9, 2014 Report Share Posted June 9, 2014 I can't wait to try this out with the AI spawns! I have high hopes :D Darihon 1 Link to comment Share on other sites More sharing options...
Darihon Posted June 11, 2014 Author Report Share Posted June 11, 2014 Working on the lastest stuff, right now! New update contains (extremly) hard AI which spawn after a minute in the robbery. Release: today or tomorrow. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now