Darihon

BankRobbery

Aug 16th, 2014
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. private["_humanity","_exHighValue","_lowValue","_medValue","_highValue","_exHighValue","_jackpot","_random2"];
  2. // Bank Robbery Script (Exclusive version for [ISAF]).
  3.  
  4. // Checks if script is active.
  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. cutText [format["You are about to rob the bank, your have 90 percent chance to go succesful."], "PLAIN DOWN"];
  15. sleep 5;
  16.  
  17. _humanity = player getVariable["headShots",0];
  18.  
  19. // Currency
  20. _exLowValue = 50000;
  21. _lowValue = 150000;
  22. _medValue = 500000;
  23. _highValue = 1000000;
  24. _exHighValue = 2000000;
  25. _jackpot = 1000000;
  26. // End Currency
  27.  
  28.  
  29.  
  30. // Script starting D:
  31. cutText [format["You are robbing the bank, the police has been warned. It takes 5 minutes before the bank robbery is successful."], "PLAIN DOWN"];
  32. sleep 5;
  33. [nil,nil,rTitleText,"The bank is getting robbed!", "PLAIN",10] call RE;
  34. sleep 55;
  35. cutText [format["4 minutes left.."], "PLAIN DOWN"];
  36. sleep 20;
  37. cutText [format["The police has arrived! Protect yourself!"], "PLAIN DOWN"];
  38. // execVM _AI; // Executes AI
  39. sleep 40;
  40. cutText [format["3 minutes left.."], "PLAIN DOWN"];
  41. sleep 60;
  42. cutText [format["2 minutes left.."], "PLAIN DOWN"];
  43. sleep 60;
  44. cutText [format["1 minute left.."], "PLAIN DOWN"];
  45. sleep 60;
  46. player playActionNow "Medic";
  47. sleep 8;
  48. [nil,nil,rTitleText,"The bank has been robbed succesfully!", "PLAIN",10] call RE;
  49. _random2 = floor(random 101);
  50. if (_random2 <= 20) exitwith {
  51. cutText [format["The vault was emptied recently, no big loot."], "PLAIN DOWN"];
  52. player setVariable ["headShots",(_humanity + _exLowValue),true];
  53. };
  54. if (_random2 <= 40) exitwith {
  55. cutText [format["You got %1",_lowValue], "PLAIN DOWN"];
  56. player setVariable ["headShots",(_humanity + _lowValue),true];
  57. };
  58. if (_random2 <= 60) exitwith {
  59. cutText [format["You got %1",_medValue], "PLAIN DOWN"];
  60. player setVariable ["headShots",(_humanity + _medValue),true];
  61. };
  62. if (_random2 <= 80) exitwith {
  63. cutText [format["You got %1",_highValue], "PLAIN DOWN"];
  64. player setVariable ["headShots",(_humanity + _highValue),true];
  65. };
  66. if (_random2 <= 90) exitwith {
  67. cutText [format["You got %1",_exHighValue], "PLAIN DOWN"];
  68. player setVariable ["headShots",(_humanity + _exHighValue),true];
  69. };
  70. if (_random2 = 100) exitwith {
  71. cutText [format["You got the jackpot!!! %1",_jackpot], "PLAIN DOWN"];
  72. player setVariable ["headShots",(_humanity + _jackpot),true];
  73. };
  74.  
  75. script_in_progress = false;
Add Comment
Please, Sign In to add comment