Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
52
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;///////////////
  2. ;Takes 1 parameter:
  3. ;;Combat for combat drones
  4. ;;Mining for mining drones
  5. ;///////////////
  6. ;runscript "BJScripts/EVE/Test Scripts/Drone_Engage.iss"
  7.  
  8. variable index:int64 _inActiveDrones
  9.  
  10. function main(string _sDroneType)
  11. {
  12. echo ${Time}: \ag Starting Drone Test...
  13.  
  14. call launch_drones "${_sDroneType.Escape}"
  15. wait 20
  16. if ${_sDroneType.Equal[Combat]}
  17. {
  18. echo ${Time}: Sending drones to attack!
  19. EVE:DronesEngageMyTarget[_inActiveDrones]
  20. }
  21. elseif ${_sDroneType.Equal[Mining]}
  22. {
  23. echo ${Time}: Sending drones to mine!
  24. EVE:DronesMineRepeatedly[_inActiveDrones]
  25. }
  26. }
  27.  
  28. function launch_drones(string _sDroneType)
  29. {
  30. variable index:item MyDroneBayCargo
  31. variable iterator MyDroneBayCargo_Iterator
  32. variable int DroneGroupID
  33.  
  34. MyShip:GetDrones[MyDroneBayCargo]
  35. MyDroneBayCargo:GetIterator[MyDroneBayCargo_Iterator]
  36.  
  37. if ${_sDroneType.Equal[Combat]}
  38. {
  39. DroneGroupID:Set[100]
  40. }
  41. elseif ${_sDroneType.Equal[Mining]}
  42. {
  43. DroneGroupID:Set[101]
  44. }
  45.  
  46. if ${MyDroneBayCargo_Iterator:First(exists)}
  47. {
  48. do
  49. {
  50. if ${MyDroneBayCargo_Iterator.Value.GroupID} == ${DroneGroupID} && ${_inActiveDrones.Used} < 5
  51. _inActiveDrones:Insert[${MyDroneBayCargo_Iterator.Value.ID}]
  52. }
  53. while ${MyDroneBayCargo_Iterator:Next(exists)}
  54.  
  55. echo ${Time}: Active Drone Index equals 5? [${_inActiveDrones.Used}] -- Launching [${_sDroneType}] Drones!
  56. EVE:LaunchDrones[_inActiveDrones]
  57. }
  58. }
  59.  
  60. function atexit()
  61. {
  62. echo ${Time}: \ar Stopping Drone Test...
  63. }
Advertisement
RAW Paste Data Copied
Advertisement