Darihon

Untitled

Jul 18th, 2014
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. /*
  2. Medical Crate by lazyink (Full credit for original code to TheSzerdi & TAW_Tonic)
  3. Updated to new format by Vampire
  4. */
  5.  
  6. private ["_missName","_coords","_randomnumber","_randomnumber2","_coord1","_coord2","_coord3","_randomcoord","_hint","_crash","_net","_crate"];
  7.  
  8. //Name of the Mission
  9. _missName = "Medical Cache";
  10.  
  11. //DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
  12. _coords = call DZMSFindPos;
  13. _randomnumber = floor(random 35);
  14. _randomnumber2 = floor(random 25);
  15. _coord1 = [(_coords select 0) + _randomnumber, (_coords select 1) + _randomnumber2];
  16. _coord2 = [(_coords select 0) + _randomnumber, (_coords select 1) + _randomnumber];
  17. _coord3 = [(_coords select 0) + _randomnumber, (_coords select 1) + _randomnumber2];
  18. _randomcoord = [_coord1,_coord2,_coord3] call BIS_fnc_selectRandom;
  19.  
  20. // Send Top Right message to users , requires Remote message script
  21. _hint = parseText format["<t align='left' color='#ffa953' shadow='2' size='1.50'>Construction mission</t><br/><t align='left' color='#FFFFF9F'>Bandits are trying to set up a IKEA resupply in the RED circle of the map. Locate the circle, find them, and take their stuff!</t>"];
  22. customRemoteMessage = ['hint', _hint];
  23. publicVariable "customRemoteMessage";
  24.  
  25. //DZMSAddMajMarker is a simple script that adds a marker to the location
  26. [_coords,_missname] ExecVM DZMSAddMajMarker;
  27.  
  28. //Lets add the scenery
  29. _crash = createVehicle ["UralWreck",_randomcoord,[], 10, "CAN_COLLIDE"];
  30. _net = createVehicle ["Land_CamoNetB_NATO",[(_coords select 0) - 0.0649, (_coords select 1) + 0.6025,0],[], 0, "CAN_COLLIDE"];
  31. [_net] call DZMSProtectObj;
  32.  
  33. _crate = createVehicle ["TKVehicleBox_EP1",_randomcoord,[], 0, "CAN_COLLIDE"];
  34.  
  35. //DZMSBoxFill fills the box, DZMSProtectObj prevents it from disappearing
  36. [_crate,"construction"] ExecVM DZMSBoxSetup;
  37.  
  38. //DZMSAISpawn spawns AI to the mission.
  39. //Usage: [_coords, count, skillLevel, unitArray]
  40. [_coord1,6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
  41. sleep 5;
  42. [_coord1,6,1,"DZMSUnitsMajor"] call DZMSAISpawn;
  43. sleep 5;
  44. [_coord1,4,1,"DZMSUnitsMajor"] call DZMSAISpawn;
  45. sleep 5;
  46.  
  47. //Let the timer know the mission is over
  48. DZMSMajDone = true;
Advertisement
Add Comment
Please, Sign In to add comment