Darihon

Untitled

Oct 17th, 2014
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.01 KB | None | 0 0
  1. private ["_random","_random2","_silver","_silver10oz","_gold","gold10oz","_briefcase"];
  2. _AI = "rob\ai.sqf";
  3. //Define the box that we will be using to put loot in from Bank robbery Mission.
  4. _box = createVehicle ["BAF_VehicleBox", [7091.11,7658.73,0], [], 0, "CAN_COLLIDE"];
  5. // Checks if script is active, thanks Halvhjearne <3
  6. if(isNil "script_in_progress")then{
  7. script_in_progress = false;
  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. cutText [format["You are about to rob the bank, your have 30 percent chance to get loot."], "PLAIN DOWN"];
  15. sleep 5;
  16. // Currency //
  17. _silver = "ItemSilverBar";
  18. _silver10oz = ["ItemSilverBar10oz",2];
  19. _gold = ["ItemGoldBar",2];
  20. _gold10oz = ["ItemGoldBar10oz",5];
  21. _briefcase = ["ItemBriefcase100oz",2];
  22. // Makes sure that the game checks for the 30 percent.
  23. _random = floor(random 11); //0-10
  24. if (_random <= 3) then {
  25. cutText [format["You are robbing the bank, the police has been warned. It takes 5 minutes before the bank robbery is successful."], "PLAIN DOWN"];
  26. sleep 5;
  27. [nil,nil,rTitleText,"The bank is getting robbed!", "PLAIN",10] call RE;
  28. sleep 55;
  29. cutText [format["4 minutes left.."], "PLAIN DOWN"];
  30. sleep 20;
  31. cutText [format["The police has arrived! Protect yourself!"], "PLAIN DOWN"];
  32. execVM _AI;
  33. sleep 40;
  34. cutText [format["3 minutes left.."], "PLAIN DOWN"];
  35. sleep 60;
  36. cutText [format["2 minutes left.."], "PLAIN DOWN"];
  37. sleep 60;
  38. cutText [format["1 minute left.."], "PLAIN DOWN"];
  39. sleep 60;
  40. player playActionNow "Medic";
  41. sleep 8;
  42. [nil,nil,rTitleText,"The bank has been robbed succesfully!", "PLAIN",10] call RE;
  43. _random2 = floor(random 6);
  44. // Makes an another random section, which chooses the loot randomly.
  45. if (_random2 == 0) then {
  46. _box setPos [4891.1533, 2406.1135];
  47. cutText [format["The vault was emptied recently, no big loot, except some silver."], "PLAIN DOWN"];
  48. clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;
  49. _box addMagazineCargoGlobal _silver;
  50. systemChat "The robber got: 2x Silver10oz and 1x Silver";
  51. };
  52. if (_random2 == 1) then {
  53. _box setPos [4891.1533, 2406.1135];
  54. cutText [format["Some gold, not much."], "PLAIN DOWN"];
  55. clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;
  56. _box addMagazineCargoGlobal _gold;
  57. systemChat "The robber got: 2x gold";
  58. };
  59. if (_random2 == 2) then {
  60. _box setPos [4891.1533, 2406.1135];
  61. cutText [format["Nice job!"], "PLAIN DOWN"];
  62. clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;
  63. _box addMagazineCargoGlobal _gold10oz;
  64. systemChat "The robber got: 5x gold10oz";
  65. };
  66. if (_random2 == 3) then {
  67. _box setPos [4891.1533, 2406.1135];
  68. cutText [format["Some gold, not much."], "PLAIN DOWN"];
  69. clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;
  70. _box addMagazineCargoGlobal _gold;
  71. systemChat "The robber got: 2x gold and 1x Gold10oz";
  72. };
  73. if (_random2 == 4) then {
  74. _box setPos [4891.1533, 2406.1135];
  75. cutText [format["The vault was emptied recently, no big loot, except some silver."], "PLAIN DOWN"];
  76. clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;
  77. _box addMagazineCargoGlobal _silver10oz;
  78. systemChat "The robber got: 2x Silver10oz and 1x Silver";
  79. };
  80. if (_random2 == 5) then {
  81. _box setPos [4891.1533, 2406.1135];
  82. cutText [format["Jack.. Jack.. Pot!!"], "PLAIN DOWN"];
  83. clearMagazineCargoGlobal _box; clearWeaponCargoGlobal _box;
  84. _box addMagazineCargoGlobal _briefcase;
  85. systemChat "Ting ting ting... The jackpot has been stolen! Bye bye 2 briefcases";
  86. };
  87. // Output if above is not activated.
  88. } else {
  89. cutText [format["Bank robbery failed.."], "PLAIN DOWN"];
  90. systemChat "Bank robbery failed!";
  91. deletevehicle _box;
  92. };
  93. sleep 60;
  94. deletevehicle _box;
  95. script_in_progress = false;
  96. /* Remove the // to enable the script to able to be used again.
  97. By "sleep seconds:" i.e: sleep 60; (able to use script after 60 seconds again).
  98. */
Advertisement
Add Comment
Please, Sign In to add comment