Example #1
0
def findEnteringStation():
    x, y = image.findImgR(panel.ProcessBar,
        'img/entering_station.bmp')
    if x != -1 and y != -1:
        mouse.moveTo(x, y)
        return True
    return False
Example #2
0
def findUndock():
    x, y = image.findImgR(panel.Menu, 
        'img/undock.bmp', 0.2)
    if x > 0 and y > 0:
        mouse.moveTo(x, y)
        return True
    return False
Example #3
0
def findRequestMission():
    x, y = image.findImgR(panel.Mission,
        'img/request_mission.bmp')
    if x != -1 and y != -1:
        mouse.moveTo(x, y)
        return True
    return False
Example #4
0
def findX():
    x, y = image.findImgR(panel.Mission,
        'img/x.bmp')
    if x != -1 and y != -1:
        mouse.moveTo(x, y)
        return True
    return False
Example #5
0
def findCompleteMission():
    x, y = image.findImgR(panel.MissionRight,
        'img/complete_mission.bmp')
    if x != -1 and y != -1:
        mouse.moveTo(x, y)
        return True
    return False
Example #6
0
def findAgent(agentPicSource):
    x, y = image.findImgR(panel.StationServices,
        agentPicSource)
    if x != -1 and y != -1:
        mouse.moveTo(x + 10, y + 10)
        return True
    return False
Example #7
0
def findAccept():
    x, y = image.findImgR(panel.MissionRight,
        'img/accept.bmp')
    if x != -1 and y != -1:
        mouse.moveTo(x, y)
        return True
    return False
Example #8
0
def declineMission():
    print '--> decline mission'

    x, y = image.findImgR(panel.MissionRight, 'img/decline.bmp')
    mouse.moveTo(x, y)
    mouse.leftClick()

    time.sleep(5)
    x, y = image.findImgR(panel.Full, 'img/yes.bmp')
    if x > 0:
        mouse.moveTo(x, y)
        mouse.leftClick()

    print 'wait until decline'

    while not findRequestMission():
        time.sleep(0.5)
    mouse.leftClick()

    while not findX():
        time.sleep(0.2)
    mouse.leftClick()

    time.sleep(1)

    print '<-- decline mission\n'
    return True
Example #9
0
def openInventory():
    print '--> open inventory'

    x, y = image.findImgR(panel.Menu, 'img/inventory.bmp', 0.2)
    if x < 0:
        return False
    mouse.moveTo(x, y)
    mouse.leftClick()
    time.sleep(1)

    print '<-- open inventory\n'
    return True
Example #10
0
def closeInventory():
    print '--> close inventory'

    mouse.moveToP(panel.middle(panel.Inventory))
    x, y = image.findImgR(panel.Inventory, 'img/x.bmp')
    if x < 0:
        return False
    mouse.moveTo(x, y)
    mouse.leftClick()
    time.sleep(1)
    
    print '<-- close inventory\n'
    return True
def run():
    print "--> mission Eliminate the Pirate Campers"

    if not station.undock():
        return False

    pilot.autopilot()

    if not space.warpToMissionLocation():
        return False

    if not space.enableAllLowSlot():
        return False

    if not space.launchDrones():
        return False

    if not space.openMissionDetail():
        return False

    x = -1
    while x < 0:
        x, y = image.findImgR(panel.Full, "img/close.bmp")
        time.sleep(0.1)
    mouse.moveTo(x, y)
    mouse.leftClick()

    if not space.missionObjectiveComplete():
        return False

    if not space.dronesReturn():
        return False

    if space.setMissionWaypoint():
        pilot.autopilot()
    else:
        mouse.leftClick()
        space.exitStartMap()
        space.backToAgentStation()

    print "<-- mission Eliminate the Pirate Campers\n"
    return True
Example #12
0
def unloadItem(item):
    print '--> unload item ' + item

    x, y = image.findImgR(panel.Inventory, 'img/ship.bmp', 0.2)
    if x > 0:
        mouse.moveTo(x, y)
        mouse.leftClick()
        time.sleep(1.5)

    x = -1
    x, y = image.findImgR(panel.Inventory, item)
    while x < 0:
        mouse.moveToP(panel.middle(panel.Inventory))
        mouse.leftClick()
        mouse.wheel(-12)
        mouse.move(300, 0)
        x, y = image.findImgR(panel.Inventory, item)

    mouse.moveTo(x, y)
    mouse.leftDown()
    x, y = image.findImgR(panel.Inventory, 'img/item_hangar.bmp', 0.2)
    if x < 0:
        mouse.leftUp()
        return False
    mouse.moveTo(x, y)
    mouse.leftUp()
    time.sleep(1)

    print '<-- unload item ' + item + '\n'
    return True
def run():
	print '--> mission Deadly Arrival'

	if not station.undock():
		return False

	if not space.warpToMissionLocation():
		return False

	if not space.enableAllLowSlot():
		return False

	# in this mission we should approach a Large Collidable Object
	x, y = image.findImgR(panel.Overview, 'img/overview.bmp')
	if x < 0 or y < 0:
		return False
	mouse.moveTo(x, y)
	mouse.leftClick()

	x, y = image.findImgR(panel.Overview,
		'img/load_lco.bmp')
	if x < 0 or y < 0:
		return False
	mouse.moveTo(x, y)
	mouse.leftClick()

	if not space.lockTarget('img/ruined_structure.bmp'):
		return False

	if not space.approach():
		return False

	if not space.openAfterBurn():
		return False

	if not space.openMissionDetail():
		return False

	if not space.missionObjectiveComplete():
		return False

	# reset overview
	x, y = image.findImgR(panel.Overview,
		'img/overview.bmp')
	if x < 0 or y < 0:
		return False
	mouse.moveTo(x, y)
	mouse.leftClick()

	x, y = image.findImgR(panel.Overview,
		'img/load_kid.bmp')
	if x < 0 or y < 0:
		return False
	mouse.moveTo(x, y)
	mouse.leftClick()

	if not space.backToAgentStation():
		return False

	print '<-- mission Deadly Arrival\n'
	return True