SHARE
TWEET

Bank Robbery v1.1

Darihon Jun 6th, 2014 863 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private ["_silver","_silver10oz","_gold","_gold10oz","_briefcase","_random","_random2"];
  2.  
  3. _AI = "rob\ai.sqf";
  4. // Checks if script is active, thanks Halvhjearne <3
  5. if(isNil "script_in_progress")then{
  6.         script_in_progress = false;
  7. };
  8.  
  9. if(script_in_progress)exitwith{
  10.         systemChat "This script is only useable once (untill restart)!";
  11. };
  12. script_in_progress = true;
  13. // End Checks if Script is active
  14.  
  15.  
  16. cutText [format["You are about to rob the bank, your have 30 percent chance to get loot."], "PLAIN DOWN"];
  17. sleep 5;
  18.  
  19. // Currency //
  20. _silver = "ItemSilverBar";
  21. _silver10oz = "ItemSilverBar10oz";
  22. _gold = "ItemGoldBar";
  23. _gold10oz = "ItemGoldBar10oz";
  24. _briefcase = "ItemBriefcase100oz";
  25.  
  26. // Makes sure that the game checks for the 30 percent.
  27. _random = floor(random 11); //0-10
  28. if (_random <= 3) then {
  29.         cutText [format["You are robbing the bank, the police has been warned. It takes 5 minutes before the bank robbery is successful."], "PLAIN DOWN"];
  30.         sleep 5;
  31.         [nil,nil,rTitleText,"The bank is getting robbed!", "PLAIN",10] call RE;
  32.         sleep 55;
  33.         cutText [format["4 minutes left.."], "PLAIN DOWN"];
  34.         sleep 20;
  35.         cutText [format["The police has arrived! Protect yourself!"], "PLAIN DOWN"];
  36.         execVM _AI;
  37.         sleep 40;
  38.         cutText [format["3 minutes left.."], "PLAIN DOWN"];
  39.         sleep 60;
  40.         cutText [format["2 minutes left.."], "PLAIN DOWN"];
  41.         sleep 60;
  42.         cutText [format["1 minute left.."], "PLAIN DOWN"];
  43.         sleep 60;
  44.         player playActionNow "Medic";
  45.         sleep 8;
  46.         [nil,nil,rTitleText,"The bank has been robbed succesfully!", "PLAIN",10] call RE;
  47.         _random2 = floor(random 6);
  48.         // Makes an another random section, which chooses the loot randomly.
  49.                 if (_random2 == 0) then {
  50.                         cutText [format["The vault was emptied recently, no big loot, except some silver."], "PLAIN DOWN"];
  51.                         player addMagazine _silver10oz;
  52.                         player addMagazine _silver10oz;
  53.                         player addMagazine _silver;
  54.                         systemChat "The robber got: 2x Silver10oz and 1x Silver";
  55.                 };
  56.                 if (_random2 == 1) then {
  57.                         cutText [format["Some gold, not much."], "PLAIN DOWN"];
  58.                         player addMagazine _gold;
  59.                         player addMagazine _gold;
  60.                         systemChat "The robber got: 2x gold";
  61.                 };     
  62.                 if (_random2 == 2) then {
  63.                         cutText [format["Nice job!"], "PLAIN DOWN"];
  64.                         player addMagazine _gold10oz;
  65.                         player addMagazine _gold10oz;
  66.                         player addMagazine _gold10oz;
  67.                         player addMagazine _gold10oz;
  68.                         player addMagazine _gold10oz;
  69.                         systemChat "The robber got: 5x gold10oz";
  70.                 };
  71.                 if (_random2 == 3) then {
  72.                         cutText [format["Some gold, not much."], "PLAIN DOWN"];
  73.                         player addMagazine _gold;
  74.                         player addMagazine _gold;
  75.                         player addMagazine _gold10oz;
  76.                         systemChat "The robber got: 2x gold and 1x Gold10oz";
  77.                 };             
  78.                 if (_random2 == 4) then {
  79.                         cutText [format["The vault was emptied recently, no big loot, except some silver."], "PLAIN DOWN"];
  80.                         player addMagazine _silver10oz;
  81.                         player addMagazine _silver10oz;
  82.                         player addMagazine _silver;
  83.                         systemChat "The robber got: 2x Silver10oz and 1x Silver";
  84.                 };
  85.                 if (_random2 == 5) then {
  86.                         cutText [format["Jack.. Jack.. Pot!!"], "PLAIN DOWN"];
  87.                         player addMagazine _briefcase;
  88.                         player addMagazine _briefcase;
  89.                         systemChat "Ting ting ting... The jackpot has been stolen! Bye bye 2 briefcases";
  90.                 };     
  91.                 // Output if above is not activated.
  92.                         } else {
  93.                                 cutText [format["Bank robbery failed.."], "PLAIN DOWN"];
  94.                                 systemChat "Bank robbery failed!";
  95.                         };
  96. // sleep seconds;
  97. // script_in_progress = false;
  98. /* Remove the // to enable the script to able to be used again.
  99. By "sleep seconds:" i.e: sleep 60; (able to use script after 60 seconds again).
  100. */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top