Advertisement
Guest User

Untitled

a guest
Feb 24th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. if (_hasBriefs >= _cost) then {
  2.  
  3. for "_i" from 0 to _cost - 1 do {
  4. player removeMagazine _itemUse;
  5. };
  6.  
  7. disableSerialization;
  8. _display = findDisplay 24;
  9. (_display) closeDisplay 0;
  10.  
  11. _position = [_this select 0, (_this select 1) + 15, _height];
  12. _chute = createVehicle ["ParachuteMediumEast", _position, [], 0, "FLY"];
  13. _chutePos = getPosATL _chute;
  14. _chute setVariable ["ObjectID", ""];
  15. _box = createVehicle [_boxtype, _chutePos, [], 0, "FLY"];
  16. _box attachTo [_chute, [0,0,3]];
  17. _box setVariable ["Mission",1,true];
  18. _box setVariable ["ObjectID", ""];
  19. _box setVariable ["permaLoot",true];
  20. _smoke = "SmokeShellBlue" createVehicle (getPos _box);
  21. _smoke attachTo [_box, [0,0,0]];
  22. _var = floor((random 2) + 1);
  23. lastpack = time;
  24.  
  25. //display text to alert user
  26. _textt = format ["\nCarepackage has spawned!",10];
  27. titleText [_textt,"PLAIN DOWN"];
  28.  
  29. while {getPos _box select 2 > 4} do
  30. {
  31. _chute SetVelocity [0,0,_downspeed];
  32. uiSleep 0.1;
  33. };
  34. detach _box;
  35. _box setPos [getPos _box select 0, getPos _box select 1, 0];
  36. deleteVehicle _chute;
  37.  
  38. // create extra box where old box was, possible loot fix?
  39. waitUntil {getPos _box select 2 < 1};
  40. _posATL = getPosATL _box;
  41. deleteVehicle _box;
  42. _boxx = _boxtype createvehicle _posATL;
  43. _smoke attachTo [_boxx, [0,0,0]];
  44. _boxx setVariable ["Mission",1,true];
  45. _boxx setVariable ["ObjectID", ""];
  46. _boxx setVariable ["permaLoot",true];
  47.  
  48.  
  49. clearweaponcargoglobal _boxx;
  50. clearmagazinecargoglobal _boxx;
  51.  
  52. {_boxx addMagazineCargoGlobal [_x, _var];} forEach _givesupplies;
  53. {_boxx addMagazineCargoGlobal [_x, 1];} forEach _items;
  54. {_boxx addMagazineCargoGlobal [_x, 1];} forEach _givejackpot;
  55. {_boxx addWeaponCargoGlobal [_x, 1];} forEach _tools;
  56. //_boxx addMagazineCargoGlobal [_mag, _var];
  57. //_boxx addWeaponCargoGlobal [_giveWep, 1];
  58. {_boxx addWeaponCargoGlobal [_x, 1];} forEach _giveWep;
  59.  
  60. uisleep _timeToDelete;
  61. deleteVehicle _boxx;
  62.  
  63.  
  64. } else {
  65. _text = format ["\nYou need an Amethyst gem to call a care package!\nAnd you cannot call for a care package in a safe zone!",10];
  66. titleText [_text,"PLAIN DOWN"];
  67. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement