def run(): print '--> mission Technological Secrets 2' # this is a transport mission if not (station.openInventory() \ and station.loadItem('dna_sample') \ and station.closeInventory()): return False if not station.undock(): return False pilot.autopilot() if not general.setMissionWaypoint(): return False if not station.startConversation(agent): return False if not station.completeMission(): return False if not station.undock(): return False pilot.autopilot() print '<-- mission Technological Secrets 2\n' return True
def run(): print '--> mission New Frontiers - Raw Materials (6 of 7)' if not station.openInventory(): return False if not station.loadItem('mission_cargo'): return False if not station.closeInventory(): return False if not station.undock(): return False pilot.autopilot() if not general.setMissionWaypoint(): return False if not station.startConversation(agent): return False if not station.completeMission(): return False if not station.undock(): return False pilot.autopilot() print '<-- mission New Frontiers - Raw Materials (6 of 7)\n' return True
def setup(self): self.stack = StackList.StackList() self.pilot = Pilot.Pilot() self.robot.move('reset') self.tree = Tree.Tree() self.tree.build('contrasenyes.txt') self.doors = {}
def setup(self): # Adding functionality for recording the map self.cols = 12 #same as world cols self.rows = 12 #same as world rows self.__map = [[0 for y in range(self.cols)] for x in range(self.rows)] yx = self.robot.getItem('location') self.__map[self.rows - yx[1]][yx[0] - 1] = 1 #fill in self.stack = StackList.StackList() self.pilot = Pilot.Pilot() self.robot.move('reset')
def setup(self): self.stack = StackList.StackList() self.pilot = Pilot.Pilot() self.robot.move('reset') self.tree = Tree.Tree() #Per algunes rutes, el Python no troba la ruta de l'arxiu 'contrasenyes.txt'. #self.tree.build('contrasenyes.txt') self.tree.build( os.path.dirname(os.path.realpath(__file__)) + '/contrasenyes.txt') self.doors = {} self.listaNueva = []
def setup(self): self.counter = 0 self.inverse = { 'right': 'left', 'left': 'right', 'up': 'down', 'down': 'up' } self.actions = ['left', 'up', 'up', 'left'] self.backtrace = [] self.pilot = Pilot.Pilot() self.robot.move('reset')
def run(): print '--> mission New Frontiers - Raw Materials (3 of 7)' if not station.activateShip('shuttle'): return False if not station.undock(): return False pilot.autopilot() if not station.openInventory(): return False if not station.loadItem('datacore'): return False if not station.closeInventory(): return False if not general.setMissionWaypoint(): return False if not station.undock(): return False pilot.autopilot() if not station.startConversation(agent): return False if not station.completeMission(): return False if not station.activateShip('dominix'): return False print '<-- mission New Frontiers - Raw Materials (3 of 7)\n' return True
def runBattle(mission): print 'battle mission' bot = battle[mission] # bot = the_damsel_in_distress if bot == pick_your_position: if not station.activateShip('shuttle'): return False if not station.undock(): return False pilot.autopilot() if not general.warpToMissionLocation(): return False if not bot.run(): return False if not general.backToAgentStation(): return False if not station.startConversation(agent): return False if not station.completeMission(): return False if not station.repair(): print 'Error: repair faild' return False if bot == pick_your_position: if not station.activateShip('dominix'): return False return True
def backToAgentStation(): print '--> back to agent station' if setMissionWaypoint(): pilot.autopilot() else: result = findAtInfo('dock') while not result: result = findAtInfo('dock') time.sleep(0.5) mouse.leftClickAtP(result) exitStarMap() print 'wait until reach station' time.sleep(10) while not findAtMenu('undock'): time.sleep(1) time.sleep(4) print '<-- back to agent station\n' return True
def setup(self): self.stack = StackList.StackList() self.pilot = Pilot.Pilot() self.robot.move('reset')