Exemple #1
0
    def __init__ (self):
        self.sysfile = VS.getSystemFile()
        playa = VS.getPlayer()
        difficulty = 4
        self.stage = 0
        self.gametime = VS.GetGameTime()
        self.aera = []
        aer=faction_ships.factions[faction_ships.aera]
        conf=faction_ships.factions[faction_ships.confed]
        for i in range(difficulty):
            self.aera += [launch.launch_wave_around_unit("Recon_Lead",
                        aer, faction_ships.getRandomFighterInt(faction_ships.aera),
		        "default",1,500,2000,playa)]
        self.devil = launch.launch_wave_around_significant('Devils_Fort',
	             aer,'starfortress','default',1,50000,100000,4)
        launch.launch_wave_around_significant('terran_rescue_fleet', conf,
                                              faction_ships.getRandomCapitolInt(faction_ships.confed),
					      'default',1,10000,100000,4)
        launch.launch_wave_around_significant('terran_rescue_fleet', conf,
                                              faction_ships.getRandomCapitolInt(faction_ships.confed),
					      'default',1,10000,100000,4)
        launch.launch_wave_around_significant('terran_rescue_fleet', conf,
                                              faction_ships.getRandomCapitolInt(faction_ships.confed),
					      'default',1,10000,100000,4)
        VS.IOmessage(0, "game", "all", "[Aera] Scanning for terran capships... [ping] [ping]")
        VS.IOmessage(3, "game", "all", "[Computer] Analysis of pattern focuses on scan for attacks on Devils Fort...")
        VS.IOmessage(4, "game", "all", "[Computer] Area class fighter vessels outfitted with powerful radar appear to be used as scouts in the aera...")
def GenerateFgShips (shipinfg,factionnr,friendly):
    lst=[]
    capship=()
    fac = faction_ships.intToFaction(factionnr)
    fpr=XProductionRate(fac,faction_ships.fighterProductionRate)
    cpr=XProductionRate(fac,faction_ships.capitalProductionRate)
    if cpr>0 and (friendly==2 or (friendly==1 and vsrandom.random()<cpr/fpr)):
        capship=((faction_ships.getRandomCapitolInt(factionnr),1),)
        debug.debug("Generating capital "+str(capship))
    return ((faction_ships.getRandomFighterInt(factionnr),shipinfg),)+capship
Exemple #3
0
def GenerateFgShips(shipinfg, factionnr, friendly):
    lst = []
    capship = ()
    fac = faction_ships.intToFaction(factionnr)
    fpr = XProductionRate(fac, faction_ships.fighterProductionRate)
    cpr = XProductionRate(fac, faction_ships.capitalProductionRate)
    if cpr > 0 and (friendly == 2 or
                    (friendly == 1 and vsrandom.random() < cpr // fpr)):
        capship = ((faction_ships.getRandomCapitolInt(factionnr), 1), )
        debug.debug("Generating capital " + str(capship))
    return (
        (faction_ships.getRandomFighterInt(factionnr), shipinfg), ) + capship
 def __init__ (self):
     self.sysfile = VS.getSystemFile()
     playa=VS.getPlayer()
     difficulty=4
     self.stage=0
     self.mark=VS.GetGameTime()
     self.gametime = VS.GetGameTime()
     self.militia = []
     for i in range(difficulty):
         self.militia += [launch.launch_wave_around_unit("Extortionist","pirates",faction_ships.getRandomFighterInt(faction_ships.homeland_security),"default",1,100,150,playa)]
     #        self.distractMilitia()
     VS.IOmessage (0,"Extortionist","all","This is the milita: You must pay toll to pass through these parts")
     VS.IOmessage (0,"Extortionist","all","Power down your engines for 10 seconds and allow us to remove 2000 credits")
     VS.IOmessage (5,"Extortionist","all","Those pirates who do not reduce speed will be shot")
Exemple #5
0
    def Preprocess(self):
        debug.debug("Entering Preprocess()")
        self._preprocess = 1
        self._dyn_nr_ships = []
        self._nr_ships = self.num
        import faction_ships
        if self.dynfg != '':
            import fg_util
            tn = fg_util.ShipsInFG(self.dynfg, self.faction)
            debug.info('Dynamically launching from SaveString flightgroup ' +
                       self.dynfg + ' with ships: ' + str(tn) + ' faction ' +
                       self.faction)
            knum = 0
            if (tn != [] and self.type != ''):
                for i in range(len(tn)):
                    if (tn[i][0] == self.type):
                        knum = tn[i][1]
                        if (knum > self.num):
                            knum = self.num
                        self._dyn_nr_ships = [(self.type, knum)]
                        del tn[i]
                        break
##          if (tn==[]):
##          print 'Dyn-Launch: tn==[]'
##          self.dynfg=''
            elif (tn == []):
                debug.info("Dyn-Launch: tn==" + str(tn) + ", dynfg=='" +
                           str(self.dynfg) + "' getting random fighter")
                self.type = faction_ships.getRandomFighterInt(
                    faction_ships.factionToInt(self.faction))
                self.fg = self.dynfg
                self.dynfg = ''
            if self.forcetype and len(
                    self._dyn_nr_ships) == 0 and self.type != '':
                self._dyn_nr_ships = [(self.type, 1)]
                knum = 1
            for i in tn:
                if (knum >= self.num):
                    break
                if (self.capitalp or (not faction_ships.isCapital(i[0]))):
                    if (i[1] > self.num - knum):
                        i = (i[0], self.num - knum)
                    self._dyn_nr_ships += [i]
                    knum += i[1]
            self._nr_ships = self.num - knum
    def Preprocess(self):
        self._preprocess = 1
        self._dyn_nr_ships = []
        self._nr_ships = self.num
        import faction_ships

        if self.dynfg != "":
            import fg_util

            tn = fg_util.ShipsInFG(self.dynfg, self.faction)
            debug.debug(
                "dynamic launching from " + str(tn) + " from flightgroup " + self.dynfg + " faction " + self.faction
            )
            knum = 0
            if tn != [] and self.type != "":
                for i in range(len(tn)):
                    if tn[i][0] == self.type:
                        knum = tn[i][1]
                        if knum > self.num:
                            knum = self.num
                        self._dyn_nr_ships = [(self.type, knum)]
                        del tn[i]
                        break
            ##        if (tn==[]):
            ##          print 'Dyn-Launch: tn==[]'
            ##          self.dynfg=''

            elif tn == []:
                debug.error("Dyn-Launch: tn==[], dynfg=='' Error 47")
                self.type = faction_ships.getRandomFighterInt(faction_ships.factionToInt(self.faction))
                self.fg = self.dynfg
                self.dynfg = ""
            if self.forcetype and len(self._dyn_nr_ships) == 0 and self.type != "":
                self._dyn_nr_ships = [(self.type, 1)]
                knum = 1
            for i in tn:
                if knum >= self.num:
                    break
                if self.capitalp or (not faction_ships.isCapital(i[0])):
                    if i[1] > self.num - knum:
                        i = (i[0], self.num - knum)
                    self._dyn_nr_ships += [i]
                    knum += i[1]
            self._nr_ships = self.num - knum
Exemple #7
0
 def SignificantsNear(self, significant):
     if (significant.isJumppoint()):
         import faction_ships
         VS.IOmessage(
             0, "game", "all",
             "[Computer] Target detected matching engine signature reported for rlaan spy in %s"
             % self.sysfile)
         VS.IOmessage(0, "game", "all",
                      "[Computer] Confed was hunting this target...")
         self.spy = launch.launch_wave_around_unit(
             "Spy", faction_ships.factions[faction_ships.rlaan],
             faction_ships.getRandomFighterInt(faction_ships.rlaan),
             "default", 1, 30000, 50000, significant)
         self.spy.ActivateJumpDrive(0)
         self.spy.SetTarget(significant)
         VS.getPlayer().SetTarget(self.spy)
         self.spy.setFgDirective('B')
         self.sig = significant
         self.stage = 1
Exemple #8
0
 def __init__(self):
     self.sysfile = VS.getSystemFile()
     playa = VS.getPlayer()
     difficulty = 4
     self.stage = 0
     self.gametime = VS.GetGameTime()
     self.aera = []
     aer = faction_ships.factions[faction_ships.aera]
     conf = faction_ships.factions[faction_ships.confed]
     for i in range(difficulty):
         self.aera += [
             launch.launch_wave_around_unit(
                 "Recon_Lead", aer,
                 faction_ships.getRandomFighterInt(faction_ships.aera),
                 "default", 1, 500, 2000, playa)
         ]
     self.devil = launch.launch_wave_around_significant(
         'Devils_Fort', aer, 'starfortress', 'default', 1, 50000, 100000, 4)
     launch.launch_wave_around_significant(
         'terran_rescue_fleet', conf,
         faction_ships.getRandomCapitolInt(faction_ships.confed), 'default',
         1, 10000, 100000, 4)
     launch.launch_wave_around_significant(
         'terran_rescue_fleet', conf,
         faction_ships.getRandomCapitolInt(faction_ships.confed), 'default',
         1, 10000, 100000, 4)
     launch.launch_wave_around_significant(
         'terran_rescue_fleet', conf,
         faction_ships.getRandomCapitolInt(faction_ships.confed), 'default',
         1, 10000, 100000, 4)
     VS.IOmessage(0, "game", "all",
                  "[Aera] Scanning for terran capships... [ping] [ping]")
     VS.IOmessage(
         3, "game", "all",
         "[Computer] Analysis of pattern focuses on scan for attacks on Devils Fort..."
     )
     VS.IOmessage(
         4, "game", "all",
         "[Computer] Area class fighter vessels outfitted with powerful radar appear to be used as scouts in the aera..."
     )
Exemple #9
0
    def Preprocess (self):
        debug.debug("Entering Preprocess()")
        self._preprocess=1
        self._dyn_nr_ships=[]
        self._nr_ships=self.num
        import faction_ships
        if self.dynfg != '':
            import fg_util
            tn=fg_util.ShipsInFG(self.dynfg,self.faction)
            debug.info('Dynamically launching from SaveString flightgroup '+self.dynfg + ' with ships: '+str(tn)+' faction '+ self.faction)
            knum=0
            if (tn!=[] and self.type!=''):
                for i in range (len(tn)):
                    if (tn[i][0]==self.type):
                        knum=tn[i][1]
                        if (knum>self.num):
                            knum=self.num
                        self._dyn_nr_ships=[(self.type,knum)]
                        del tn[i]
                        break
##          if (tn==[]):
##          print 'Dyn-Launch: tn==[]'
##          self.dynfg=''
            elif (tn==[]):
                debug.info("Dyn-Launch: tn=="+str(tn)+", dynfg=='"+str(self.dynfg)+"' getting random fighter")
                self.type=faction_ships.getRandomFighterInt(faction_ships.factionToInt(self.faction))
                self.fg = self.dynfg
                self.dynfg=''
            if self.forcetype and len(self._dyn_nr_ships)==0 and self.type!='':
                self._dyn_nr_ships=[(self.type,1)]
                knum=1
            for i in tn:
                if (knum>=self.num):
                    break
                if (self.capitalp or (not faction_ships.isCapital(i[0])) ):
                    if (i[1]>self.num-knum):
                        i = (i[0],self.num-knum)
                    self._dyn_nr_ships+=[i]
                    knum+=i[1]
            self._nr_ships=self.num-knum
    def Preprocess (self):
        self._preprocess=1
        self._dyn_nr_ships=[]
        self._nr_ships=self.num
        import faction_ships
        if self.dynfg!='':
            import fg_util
            tn=fg_util.ShipsInFG(self.dynfg,self.faction)
            print 'dynamic launching from '+str(tn)+' from flightgroup '+self.dynfg + ' faction '+ self.faction
            knum=0
            if (tn!=[] and self.type!=''):
                for i in range (len(tn)):
                    if (tn[i][0]==self.type):
                        knum=tn[i][1]
                        if (knum>self.num):
                            knum=self.num
                        self._dyn_nr_ships=[(self.type,knum)]
                        del tn[i]
                        break
##        if (tn==[]):
##          print 'Dyn-Launch: tn==[]'
##          self.dynfg=''
          
            elif (tn==[]):
                print "Dyn-Launch: tn==[], dynfg==\'\' Error 47"
                self.type=faction_ships.getRandomFighterInt(faction_ships.factionToInt(self.faction))
                self.fg = self.dynfg        
                self.dynfg=''
            if self.forcetype and len(self._dyn_nr_ships)==0 and self.type!='':
                self._dyn_nr_ships=[(self.type,1)]
                knum=1
            for i in tn:
                if (knum>=self.num):
                    break
                if (self.capitalp or (not faction_ships.isCapital(i[0])) ):
                    if (i[1]>self.num-knum):
                        i = (i[0],self.num-knum)
                    self._dyn_nr_ships+=[i]
                    knum+=i[1]
            self._nr_ships=self.num-knum
Exemple #11
0
 def Execute(self):
     if (self.player):
         #print str(self.player.Position())
         # launch the actors
         if (self.stage <= self.groups and VS.GetGameTime() >= self.timer):
             #print "group: " +str(self.stage)
             self.names = fg_util.GetRandomFGNames(self.groups, "confed")
             shiptype = faction_ships.getRandomCapitolInt(
                 faction_ships.confed)
             #print "group/name: " + str(self.stage) + "/"+names[self.stage-1]
             # launch capital ships
             number = vsrandom.randrange(2, 4)
             #print ">capital/type: " +str(number)+"/"+shiptype
             location = Vector.Add(self.object.Position(),
                                   (vsrandom.uniform(-10000, 10000),
                                    vsrandom.uniform(-10000, 10000),
                                    vsrandom.uniform(-10000, 10000)))
             offset = (vsrandom.uniform(1000,
                                        2000), vsrandom.uniform(1000, 2000),
                       vsrandom.uniform(1000, 2000))
             for i in range(number):
                 #self.capital += [launch.launch_wave_around_unit(names[self.stage-1],'confed',shiptype,'sitting_duck',1,5000,20000,self.object)]
                 # launch(name,type,faction,unittype,ai,nr,nrwaves,pos,squadlogo)
                 pos = Vector.Add(location, Vector.Scale(offset, i))
                 self.capital += [
                     VS.launch(self.names[self.stage - 1], shiptype,
                               'confed', 'unit', 'sitting_duck', 1, 1, pos,
                               '')
                 ]
             # launch fighters
             number = number * vsrandom.randrange(3, 6)
             # test: Lancelot, Schroedinger, Quicksilver, Convolution
             shiptype = faction_ships.getRandomFighterInt(
                 faction_ships.confed)
             #print ">fighters/type: " + str(number) + "/" + shiptype
             ship = self.capital[0]
             for i in range(number):
                 self.fighter += [
                     launch.launch_wave_around_unit(
                         self.names[self.stage - 1], 'confed', shiptype,
                         'sitting_duck', 1, 1000, 2000, ship)
                 ]
             # change orders for capital ships
             for ship in self.capital:
                 ship.PrimeOrders()
                 unit.faceTaget(ship, self.object)
             # change orders for fighter ships
             for ship in self.fighter:
                 #unit.faceTaget(ship, self.capital[0])
                 ship.PrimeOrders()
                 #ship.SetTarget(self.capital[0])
                 ship.SetTarget(self.object)
                 #ship.UnFire()
                 #ship.setFgDirective("E.") # escort
                 ship.LoadAIScript("modules/ai_escortpatrol.py")
             # time between spawning the groups
             self.timer = VS.GetGameTime()  #+10
             self.stage += 1
         if (self.stage == self.groups + 1
                 and VS.GetGameTime() > self.timer):
             self.stage = 10
         # publish news
         if (self.stage == 10 and VS.GetGameTime() > self.timer):
             text = "JUMP POINT BLOCKADE IN " + self.system + " SYSTEM\\\Intelligence has uncovered Aeran plans to invade Confederation space."
             text += "As a preventive measure " + str(
                 self.groups
             ) + " flight groups were dispatched and stationed near the Nethuuleil jump point. "
             text += "Multiple capital vessels are guarding the jump point while a multitude of fighter escorts is patrolling nearby space."
             news.publishNews(text)
             self.timer = VS.GetGameTime() + 5
             self.stage = 11
         #make some random chatter
         if (self.stage == 11 and VS.GetGameTime() > self.timer):
             # select two pilots to chatter
             flightgroup = 1  #vsrandom.randrange(1,self.groups)
             numchatters = 0
             chatters = []
             while (numchatters < 2):
                 chatter = vsrandom.randrange(0, len(self.fighter) - 1)
                 if (self.fighter[chatter].getFlightgroupName() ==
                         self.names[flightgroup - 1]):
                     chatters += [chatter]
                     numchatters += 1
             VS.IOmessage(
                 0, unit.getUnitFullName(self.fighter[chatters[0]]), "all",
                 self.msgColor[0] + "... lousy bar on our mothership?")
             VS.IOmessage(
                 5, unit.getUnitFullName(self.fighter[chatters[1]]), "all",
                 self.msgColor[1] +
                 "Yeah, bad lighting, and no bar company besides your dull face."
             )
             VS.IOmessage(
                 10, unit.getUnitFullName(self.fighter[chatters[0]]), "all",
                 self.msgColor[0] +
                 "The drinks selection is not the best I have seen.")
             VS.IOmessage(
                 15, unit.getUnitFullName(self.fighter[chatters[1]]), "all",
                 self.msgColor[1] +
                 "And this bartender droid really gets on my nerves.")
             VS.IOmessage(
                 20, unit.getUnitFullName(self.fighter[chatters[1]]), "all",
                 self.msgColor[1] +
                 "He never stops talking for an instant.")
             VS.IOmessage(
                 25, unit.getUnitFullName(self.fighter[chatters[0]]), "all",
                 self.msgColor[0] + "Guess, we've got to live with that.")
             VS.IOmessage(30,
                          unit.getUnitFullName(self.fighter[chatters[1]]),
                          "all", self.msgColor[1] + "Yeah.")
             self.timer = VS.GetGameTime() + 240
             self.stage = 12
         if (self.stage == 12 and VS.GetGameTime() > self.timer):
             # select two pilots to chatter
             flightgroup = 2  #vsrandom.randrange(1,self.groups)
             numchatters = 0
             chatters = []
             while (numchatters < 2):
                 chatter = vsrandom.randrange(0, len(self.fighter) - 1)
                 if (self.fighter[chatter].getFlightgroupName() ==
                         self.names[flightgroup - 1]):
                     chatters += [chatter]
                     numchatters += 1
             VS.IOmessage(0,
                          unit.getUnitFullName(self.fighter[chatters[0]]),
                          "all", self.msgColor[0] + "Phil?")
             VS.IOmessage(10,
                          unit.getUnitFullName(self.fighter[chatters[1]]),
                          "all", self.msgColor[1] + "What's up, buddy?")
             VS.IOmessage(
                 15, unit.getUnitFullName(self.fighter[chatters[0]]), "all",
                 self.msgColor[0] +
                 "The rumor is the Aera are planning an invasion.")
             VS.IOmessage(
                 25, unit.getUnitFullName(self.fighter[chatters[1]]), "all",
                 self.msgColor[1] +
                 "Maybe no rumor anymore. Probably it's all over the news now."
             )
             VS.IOmessage(
                 35, unit.getUnitFullName(self.fighter[chatters[0]]), "all",
                 self.msgColor[0] +
                 "That's why we are here? Will we have to fight?")
             VS.IOmessage(40,
                          unit.getUnitFullName(self.fighter[chatters[1]]),
                          "all", self.msgColor[1] + "Calm down, youngling.")
             VS.IOmessage(
                 45, unit.getUnitFullName(self.fighter[chatters[1]]), "all",
                 self.msgColor[1] + "The war hasn't quite started yet.")
             VS.IOmessage(
                 50, unit.getUnitFullName(self.fighter[chatters[1]]), "all",
                 self.msgColor[1] +
                 "I tell ya. This operation is to prepare the worlds for the war."
             )
             VS.IOmessage(55,
                          unit.getUnitFullName(self.fighter[chatters[1]]),
                          "all",
                          self.msgColor[1] + "All staged by the higherups.")
             VS.IOmessage(
                 65, unit.getUnitFullName(self.fighter[chatters[0]]), "all",
                 self.msgColor[0] +
                 "You think so? And what if you're not right? Will you take care of my 'lil sister if I die?"
             )
             VS.IOmessage(
                 75, unit.getUnitFullName(self.fighter[chatters[1]]), "all",
                 self.msgColor[1] +
                 "Ho, ho. Now stop that blubber. Nobody's gonna die here.")
             VS.IOmessage(
                 80, unit.getUnitFullName(self.fighter[chatters[1]]), "all",
                 self.msgColor[1] +
                 "Just stick to your orders and by dinner time we'll have a big jar of Pilsner and a nice long talk."
             )
             self.timer = VS.GetGameTime() + 300
             self.stage = 13
         # just a temporary backup
         if (self.stage == 99):
             #for ship in self.fighter:
             #    ship = VS.getUnit(i)
             #    if (ship.getFlightgroupName()==names[flightgroup]):
             #        print "shipname: " + ship.getFullName()
             #        #ship.setFgDirective("E.") # escort
             #        #VS.PythonAI.XMLScript("++evade.xml")
             self.stage = 98
         #if (self.stage==99 and not VS.getSystemName()==self.system):
         if (not VS.getSystemName() == self.system):
             self.stage += 1  # don't enter this loop anymore
             self.playernum = -1
             self.name = "quest_capital"
             self.removeQuest()
             return 0
 def Execute (self):
     if (self.player):
         #print str(self.player.Position())
         # launch the actors
         if (self.stage<=self.groups and VS.GetGameTime()>=self.timer):
             #print "group: " +str(self.stage)
             self.names = fg_util.GetRandomFGNames(self.groups,"confed")
             shiptype = faction_ships.getRandomCapitolInt(faction_ships.confed)
             #print "group/name: " + str(self.stage) + "/"+names[self.stage-1]
             # launch capital ships
             number = vsrandom.randrange(2,4)
             #print ">capital/type: " +str(number)+"/"+shiptype
             location = Vector.Add (self.object.Position(),(vsrandom.uniform(-10000,10000),
                                    vsrandom.uniform(-10000,10000),
                                    vsrandom.uniform(-10000,10000)))
             offset = (vsrandom.uniform(1000,2000),vsrandom.uniform(1000,2000),vsrandom.uniform(1000,2000))
             for i in range(number):
                 #self.capital += [launch.launch_wave_around_unit(names[self.stage-1],'confed',shiptype,'sitting_duck',1,5000,20000,self.object)]
                 # launch(name,type,faction,unittype,ai,nr,nrwaves,pos,squadlogo)
                 pos = Vector.Add (location,Vector.Scale(offset,i))
                 self.capital += [VS.launch(self.names[self.stage-1],shiptype,'confed','unit','sitting_duck',1,1,pos,'')]
             # launch fighters
             number = number*vsrandom.randrange(3,6)
             # test: Lancelot, Schroedinger, Quicksilver, Convolution
             shiptype = faction_ships.getRandomFighterInt(faction_ships.confed)
             #print ">fighters/type: " + str(number) + "/" + shiptype
             ship = self.capital[0]
             for i in range(number):
                 self.fighter += [launch.launch_wave_around_unit(self.names[self.stage-1],'confed',shiptype,'sitting_duck',1,1000,2000,ship)]
             # change orders for capital ships
             for ship in self.capital:
                 ship.PrimeOrders()
                 unit.faceTaget(ship, self.object)
             # change orders for fighter ships
             for ship in self.fighter:
                 #unit.faceTaget(ship, self.capital[0])
                 ship.PrimeOrders()
                 #ship.SetTarget(self.capital[0])
                 ship.SetTarget(self.object)
                 #ship.UnFire()
                 #ship.setFgDirective("E.") # escort
                 ship.LoadAIScript("modules/ai_escortpatrol.py")
             # time between spawning the groups
             self.timer = VS.GetGameTime() #+10
             self.stage += 1
         if (self.stage==self.groups+1 and VS.GetGameTime()>self.timer):
             self.stage = 10
         # publish news
         if (self.stage==10 and VS.GetGameTime()>self.timer):
             text = "JUMP POINT BLOCKADE IN " + self.system + " SYSTEM\\\Intelligence has uncovered Aeran plans to invade Confederation space."
             text += "As a preventive measure " + str(self.groups) + " flight groups were dispatched and stationed near the Nethuuleil jump point. "
             text += "Multiple capital vessels are guarding the jump point while a multitude of fighter escorts is patrolling nearby space."
             news.publishNews(text)
             self.timer = VS.GetGameTime()+5
             self.stage = 11
         #make some random chatter
         if (self.stage==11 and VS.GetGameTime()>self.timer):
             # select two pilots to chatter
             flightgroup = 1 #vsrandom.randrange(1,self.groups)
             numchatters = 0
             chatters = []
             while (numchatters<2):
                 chatter = vsrandom.randrange(0,len(self.fighter)-1)
                 if (self.fighter[chatter].getFlightgroupName()==self.names[flightgroup-1]):
                     chatters += [chatter]
                     numchatters += 1
             VS.IOmessage (0,unit.getUnitFullName(self.fighter[chatters[0]]),"all",self.msgColor[0]+"... lousy bar on our mothership?")
             VS.IOmessage (5,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"Yeah, bad lighting, and no bar company besides your dull face.")
             VS.IOmessage (10,unit.getUnitFullName(self.fighter[chatters[0]]),"all",self.msgColor[0]+"The drinks selection is not the best I have seen.")
             VS.IOmessage (15,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"And this bartender droid really gets on my nerves.")
             VS.IOmessage (20,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"He never stops talking for an instant.")
             VS.IOmessage (25,unit.getUnitFullName(self.fighter[chatters[0]]),"all",self.msgColor[0]+"Guess, we've got to live with that.")
             VS.IOmessage (30,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"Yeah.")
             self.timer = VS.GetGameTime()+240
             self.stage = 12
         if (self.stage==12 and VS.GetGameTime()>self.timer):
             # select two pilots to chatter
             flightgroup = 2 #vsrandom.randrange(1,self.groups)
             numchatters = 0
             chatters = []
             while (numchatters<2):
                 chatter = vsrandom.randrange(0,len(self.fighter)-1)
                 if (self.fighter[chatter].getFlightgroupName()==self.names[flightgroup-1]):
                     chatters += [chatter]
                     numchatters += 1
             VS.IOmessage (0,unit.getUnitFullName(self.fighter[chatters[0]]),"all",self.msgColor[0]+"Phil?")
             VS.IOmessage (10,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"What's up, buddy?")
             VS.IOmessage (15,unit.getUnitFullName(self.fighter[chatters[0]]),"all",self.msgColor[0]+"The rumor is the Aera are planning an invasion.")
             VS.IOmessage (25,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"Maybe no rumor anymore. Probably it's all over the news now.")
             VS.IOmessage (35,unit.getUnitFullName(self.fighter[chatters[0]]),"all",self.msgColor[0]+"That's why we are here? Will we have to fight?")
             VS.IOmessage (40,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"Calm down, youngling.")
             VS.IOmessage (45,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"The war hasn't quite started yet.")
             VS.IOmessage (50,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"I tell ya. This operation is to prepare the worlds for the war.")
             VS.IOmessage (55,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"All staged by the higherups.")
             VS.IOmessage (65,unit.getUnitFullName(self.fighter[chatters[0]]),"all",self.msgColor[0]+"You think so? And what if you're not right? Will you take care of my 'lil sister if I die?")
             VS.IOmessage (75,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"Ho, ho. Now stop that blubber. Nobody's gonna die here.")
             VS.IOmessage (80,unit.getUnitFullName(self.fighter[chatters[1]]),"all",self.msgColor[1]+"Just stick to your orders and by dinner time we'll have a big jar of Pilsner and a nice long talk.")
             self.timer = VS.GetGameTime()+300
             self.stage = 13
         # just a temporary backup
         if (self.stage==99):
             #for ship in self.fighter:
             #    ship = VS.getUnit(i)
             #    if (ship.getFlightgroupName()==names[flightgroup]):
             #        print "shipname: " + ship.getFullName()
             #        #ship.setFgDirective("E.") # escort
             #        #VS.PythonAI.XMLScript("++evade.xml")
             self.stage = 98
         #if (self.stage==99 and not VS.getSystemName()==self.system):
         if (not VS.getSystemName()==self.system):
             self.stage += 1 # don't enter this loop anymore
             self.playernum = -1
             self.name = "quest_capital"
             self.removeQuest()
             return 0
 def SignificantsNear(self,significant):
     if (significant.isJumppoint()):
         import faction_ships
         VS.IOmessage (0,"game","all","[Computer] Target detected matching engine signature reported for rlaan spy in %s" % self.sysfile)
         VS.IOmessage (0,"game","all","[Computer] Confed was hunting this target...");
         self.spy=launch.launch_wave_around_unit("Spy",faction_ships.factions[faction_ships.rlaan],faction_ships.getRandomFighterInt(faction_ships.rlaan),"default",1,30000,50000,significant)
         self.spy.ActivateJumpDrive(0)
         self.spy.SetTarget(significant)
         VS.getPlayer().SetTarget(self.spy)
         self.spy.setFgDirective('B')
         self.sig=significant
         self.stage=1