You are on page 1of 1

import sys

import base
import const
import service
import destiny
import blue
import util
from eve import eve
class AutopilotEx:
def __init__(self):
self.KillTimer()
self.StartTimer()
def KillTimer(self):
self.updateTimer = None
def StartTimer(self):
self.updateTimer = base.AutoTimer(300, self.Update)
def Update(self):
if (sm.services['autoPilot'].GetState() == 1):
if (not eve.session.IsItSafe()):
return
if (not eve.session.rwlock.IsCool()):
return
bp = sm.GetService('michelle').GetBallpark()
if (not bp):
return
ship = bp.GetBall(eve.session.shipid)
if (ship is None):
return
if (ship.mode != destiny.DSTBALL_WARP):
starmapSvc = sm.GetService('starmap')
waypoints = starmapSvc.GetWaypoints()
destinationPath = starmapSvc.GetDestinationPath(
)
for ballID in bp.balls.iterkeys():
slimItem = bp.GetInvItem(ballID)
if (slimItem == None):
pass
elif ((slimItem.groupID == const.groupSt
argate) and (destinationPath[0] in map(lambda x:x.locationID, slimItem.jumps))):
gateID = ballID
shipGateDistance = bp.GetSurface
Dist(ship.id, gateID)
if (shipGateDistance > 150000):
sm.services["space"].War
pDestination(gateID, None, None)
sm.services["michelle"].
GetRemotePark().WarpToStuff("item", gateID, minRange=0)
break
Timer = AutopilotEx()

You might also like