Advertisement
Guest User

Untitled

a guest
Aug 30th, 2018
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function main(string _sPilotName)
  2. {
  3.     variable index:item MyDroneBayCargo
  4.     variable iterator MyDroneBayCargo_Iterator
  5.     variable index:int64 _inCombatDrones
  6.     variable index:int64 _inActiveDrones
  7.    
  8.     if ${_sPilotName.Equal[""]} || ${_sPilotName.Equal[NULL]}
  9.     {
  10.         echo ${Time}: ERROR: You must supply a pilot name to assign drones to.
  11.         return
  12.     }  
  13.    
  14.     ;//Check to see if we have active drones already.
  15.     Me:GetActiveDroneIDs[_inActiveDrones]
  16.        
  17.     if ${_inActiveDrones.Used} == 0
  18.     {
  19.         ;//We do not have active drones in space so we should launch combat drones.
  20.         MyShip:GetDrones[MyDroneBayCargo]
  21.         MyDroneBayCargo:GetIterator[MyDroneBayCargo_Iterator]
  22.        
  23.         if ${MyDroneBayCargo_Iterator:First(exists)}
  24.         {      
  25.             do
  26.             {          
  27.                 if ${MyDroneBayCargo_Iterator.Value.GroupID} == 100 && ${_inCombatDrones.Used} < 5
  28.                     _inCombatDrones:Insert[${MyDroneBayCargo_Iterator.Value.ID}]
  29.             }
  30.             while ${MyDroneBayCargo_Iterator:Next(exists)} 
  31.                                    
  32.             EVE:LaunchDrones[_inCombatDrones]
  33.         }
  34.        
  35.         wait 20
  36.        
  37.         Me:GetActiveDroneIDs[_inActiveDrones]
  38.     }  
  39.    
  40.     ;//Assign our drones to the desired pilot.
  41.     Eve:DronesAssist[_inActiveDrones,${Local["${_sPilotName}"].ID}]
  42.    
  43.     wait 20
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement