Advertisement
Guest User

Untitled

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