本文整理汇总了Python中Ship.approach方法的典型用法代码示例。如果您正苦于以下问题:Python Ship.approach方法的具体用法?Python Ship.approach怎么用?Python Ship.approach使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ship
的用法示例。
在下文中一共展示了Ship.approach方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: import Ship [as 别名]
# 或者: from Ship import approach [as 别名]
def run():
print '--> mission The Rogue Slave Trader (1 of 2)'
if not ship.enableDefense():
return False
if not drones.launchSmall():
return False
overview.seekAndDestory()
if not overview.switchTo('lcs'):
return False
if not overview.lockTarget('slave_pen'):
return False
ship.approach()
ship.enableAfterburn()
time.sleep(10)
if not drones.engage():
return False
while not overview.pickCargo():
pass
if not drones.back():
return False
print '<-- mission The Rogue Slave Trader (1 of 2)\n'
return True
示例2: run
# 需要导入模块: import Ship [as 别名]
# 或者: from Ship import approach [as 别名]
def run():
print '--> mission Deadly Arrival'
if not ship.enableDefense():
return False
if not overview.switchTo('lco'):
return False
if not overview.lockTarget('ruined_structure'):
return False
if not ship.approach():
return False
if not ship.enableAfterburn():
return False
if not general.openMissionDetails():
return False
if not general.missionObjectiveComplete():
return False
print '<-- mission Deadly Arrival\n'
return True
示例3: seekAndDestory
# 需要导入模块: import Ship [as 别名]
# 或者: from Ship import approach [as 别名]
def seekAndDestory():
switchTo('battle')
print '--> seek and destory'
while not findAtMissionDetails('v'):
# if findAtDrones('fighting'):
# time.sleep(5)
# elif lockEnemy():
if lockEnemy():
mouse.moveTo(200, 200)
time.sleep(10)
ship.approach()
ship.fireOnce()
time.sleep(5)
else:
break
print '<-- seek and destory\n'
return True
示例4: run
# 需要导入模块: import Ship [as 别名]
# 或者: from Ship import approach [as 别名]
def run():
print '--> mission New Frontiers - Raw Materials (4 of 7)'
if not ship.enableDefense():
return False
if not overview.switchTo('battle'):
return False
if not overview.lockTarget('l', 10):
return False
ship.enableAfterburn()
ship.approach()
if not drones.launchSmall():
return False
ship.fireOnce()
drones.engage()
overview.seekAndDestory()
while not overview.pickCargo():
time.sleep(5)
while overview.pickCargo():
pass
if not drones.back():
return False
print '<-- mission New Frontiers - Raw Materials (4 of 7)\n'
return True
示例5: run
# 需要导入模块: import Ship [as 别名]
# 或者: from Ship import approach [as 别名]
def run():
print '--> mission The Damsel In Distress'
if not ship.enableDefense():
return False
if not overview.switchTo('lcs'):
return False
if not overview.lockTarget('pleasure_hub'):
return False
if not ship.approach():
return False
if not ship.enableAfterburn():
return False
if not drones.launchSmall():
return False
if not ship.fireOnce():
return False
if not drones.engage():
return False
#there are two cargos
count = 0;
while count < 2:
if overview.pickCargo():
count += 1
time.sleep(2)
if not drones.back():
return False
print '<-- mission The Damsel In Distress\n'
return True
示例6: run
# 需要导入模块: import Ship [as 别名]
# 或者: from Ship import approach [as 别名]
def run():
print '--> mission Pick Your Position'
if not overview.activateAccelerationGate():
return False
if not overview.switchTo('battle'):
return False
# pocket 1
result = None
while not result:
time.sleep(0.5)
result = findAtFull('close')
mouse.leftClickAtP(result)
if not overview.pickTarget('minmatar_emissary_1'):
return False
result = None
while not result:
time.sleep(0.5)
result = findAtFull('close')
mouse.leftClickAtP(result)
if not overview.activateAccelerationGate():
return False
if not overview.switchTo('battle'):
return False
# back to pocket 0
# double click will not open it!
result = overview.findTarget('cargo')
if not result:
return False
mouse.leftClickAtP(result)
ship.approach()
result = findAtSelectedItem('cargo_small')
if not result:
result = findAtSelectedItem('cargo_big')
if not result:
return False
mouse.leftClickAtP(result)
print 'wait until cargo open'
while not findAtFull('loot_all'):
time.sleep(0.2)
mouse.leftClickAtP(result)
result = findAtFull('ship')
while not result:
result = findAtFull('ship')
mouse.leftClickAtP(result)
result = findAtFull('minmatar_emissary')
while not result:
result = findAtFull('minmatar_emissary')
mouse.leftDownAtP(result)
result = findAtFull('ship_hl')
while not result:
result = findAtFull('ship_hl')
mouse.moveTo(result[0] + 40, result[1] + 60)
mouse.leftUp()
result = findAtFull('close')
while not result:
result = findAtFull('close')
mouse.leftClickAtP(result)
time.sleep(1)
result = findAtFull('ship_hl')
if not result:
result = findAtFull('ship')
if result:
mouse.moveToP(result)
result = findAtFull('x')
if result:
mouse.leftClickAtP(result)
print '<-- mission Pick Your Position\n'
return True