def GenerateWingmen(self): if (self.you): if (self.you.getCredits()>=self.price): self.you.addCredits(-self.price) lead=launch.launch_wave_around_unit(self.you.getFlightgroupName(), self.you.getFactionName(), self.wingship, "default", self.numships, 500, 1000, self.you) VS.IOmessage (0,lead.getName(),"all","I am at your service commander. Let us succeed!") else: lead=launch.launch_wave_around_unit("ForHire", self.faction, self.wingship, "default", self.numships, 500, 1000, self.you) if (self.diff>0): lead.SetTarget(self.you) VS.IOmessage (0,lead.getName(),"all","You don't have the agreed money... prepare to DIE!") else: VS.IOmessage (0,lead.getName(),"all","You don't have the money. A fool like you won't last long!")
def Execute(self): if (VS.getPlayer()): iter = 0 for base in self.fac: if (base.getDistance(VS.getPlayer()) < 0): if (VS.GetGameTime() - self.delay > 10): self.delay = VS.GetGameTime() type = faction_ships.getRandomFighter( self.facnames[iter]) if (iter >= len(self.facnames) / 2): type = faction_ships.getRandomCapitol( self.facnames[iter]) launch.launch_wave_around_unit( "Shadow_" + self.facnames[iter], self.facnames[iter], type, "default", 1, 200, 250, VS.getPlayer(), '', 0) VS.getPlayer().upgrade("tungsten", 0, 0, 1, 0) VS.getPlayer().upgrade("tungsten_hull", 0, 0, 1, 0) else: VS.IOmessage( 0, "spawner", "all", "Going to spawn " + self.facnames[iter] + "starships in %d seconds at." % (10 - (VS.GetGameTime() - self.delay))) iter += 1
def __init__(self): playa = VS.getPlayer() if (playa): launch.launch_wave_around_unit( 'AbuDhabi', 'neutral', faction_ships.getRandomCapitolInt(faction_ships.confed), 'default', 1, 1000, 4000, playa)
def launch_new_wave(self): un = VS.getPlayer() if (vsrandom.randrange(0,4)==0): if (un): currentsystem = VS.getSystemFile() numadj=VS.GetNumAdjacentSystems(currentsystem) if (numadj): cursys=VS.GetAdjacentSystem(currentsystem,vsrandom.randrange(0,numadj)) else: cursys = 'enigma_sector/heavens_gate' debug.info("TJ: jumping to "+cursys) un.JumpTo(cursys) else: debug.info("TJ: jumping to [ERROR: you are null]") side = vsrandom.randrange(0,2) faction="confed" ai = vsrandom.randrange(0,6) if (0 and ai==0): ai = "printhello.py" else: ai = "default" if (side==0): faction=faction_ships.get_enemy_of("confed") else: faction=faction_ships.get_friend_of("confed") launched = launch.launch_wave_around_unit ("Shadow",faction,faction_ships.getRandomFighter(faction),ai,vsrandom.randrange(1,10),100.0,2000.0,VS.getPlayer(),'') if (vsrandom.randrange(0,10)==0): launch.launch_wave_around_unit ("ShadowCap",faction,faction_ships.getRandomCapitol(faction),ai,1,2000.0,4000.0,VS.getPlayer(),'')
def setup_all(self): debug.info("Truck Launched") self.truck_pirate = launch.launch_wave_around_unit( "Smuggler", "pirate", "truck", "modules/ai_qct_waitjump.py", 1, 3000, 5000, self.playa) debug.info("Scrap Released") self.cargo_container = launch.launch_wave_around_unit( "Scrap", "aera", "cargo", "default", 1, 7000, 5000, self.playa) debug.info("Aera Released") self.numaera = 4 self.aera_specopp = () for i in range(self.numaera): self.aera_specopp = self.aera_specopp + ( launch.launch_wave_around_unit( "Aera/SpecOpp", "aera", "dagger", "default", 1, 2000, 4000, self.playa), ) debug.info("Aera Cloaked") unit.TfgCloak(1, self.aera_specopp) self.repeat_more = 1 self.repeat_less = 1 self.repeat_end1 = 1 self.repeat_end2 = 1 self.timer1 = 0 self.jumpout = 0 self.quest_exit = 0 global truck_exit truck_exit = 0
def GenerateWingmen(self): if (self.you): if (self.you.getCredits() >= self.price): self.you.addCredits(-self.price) lead = launch.launch_wave_around_unit( self.you.getFlightgroupName(), self.you.getFactionName(), self.wingship, "default", self.numships, 500, 1000, self.you) VS.IOmessage( 0, lead.getName(), "all", "I am at your service commander. Let us succeed!") else: lead = launch.launch_wave_around_unit("ForHire", self.faction, self.wingship, "default", self.numships, 500, 1000, self.you) if (self.diff > 0): lead.SetTarget(self.you) VS.IOmessage( 0, lead.getName(), "all", "You don't have the agreed money... prepare to DIE!") else: VS.IOmessage( 0, lead.getName(), "all", "You don't have the money. A fool like you won't last long!" )
def mission_success(self): self.confed_cruiser=launch.launch_wave_around_unit("Sonorous","confed","corvette","default",1,4000,8000,self.cargo_container) self.confed_epeels=launch.launch_wave_around_unit("Sonorous E1","confed","epeellcat","default",5,1000,1000,self.confed_cruiser) VS.IOmessage (3,"Sonorous Command","all","Attention Private Vessel!") VS.IOmessage (4,"Sonorous Command","all","Under Code 1530 of the Trade Practices Charter, we take posession of this cargo pod.") VS.IOmessage (6,"Sonorous Command","all","Please remove yourself or we will remove you.") self.jumpout = 0 self.quest_exit = 1
def LaunchNav (self,i,playa): print("launching %d" % i) if (i==0): launch.launch_wave_around_unit("BadGuys","aera","lekra","default",3,100,1000,playa) self.moveTrans(self.nav[0]) elif (i==1): if (self.launched[0]): self.moveTrans(self.nav[1]) launch.launch_wave_around_unit("BadGuys","aera","kyta","default",2,100,1000,playa)
def __init__(self): playa = VS.getPlayer() if (playa): confed = faction_ships.factions[faction_ships.confed] pirates = faction_ships.factions[faction_ships.pirates] illustrious = launch.launch_wave_around_unit( 'Illustrious', confed, faction_ships.getRandomCapitol(confed), 'default', 1, 1000, 4000, playa) launch.launch_wave_around_unit( 'Illustrious', confed, faction_ships.getRandomCapitol(confed), 'default', 2, 1000, 2000, illustrious) launch.launch_wave_around_unit( 'Illustrious', confed, faction_ships.getRandomFighter(confed), 'default', 4, 100, 200, illustrious) launch.launch_wave_around_unit( 'SlaverGuild', pirates, faction_ships.getRandomFighter(pirates), 'default', 4, 100, 200, illustrious) launch.launch_wave_around_unit( 'SlaverGuild', pirates, faction_ships.getRandomCapitol(pirates), 'default', 2, 100, 200, illustrious) VS.IOmessage( 3, "game", "all", "[Computer] Scans show the remnants of the Slaver Guild being cleaned up by Special Forces." )
def __init__(self): self.system = VS.getSystemName() playa = VS.getPlayer() self.msgColor = ("#9999FF", "#FF9999") if (playa): confed = faction_ships.factions[faction_ships.confed] pirates = faction_ships.factions[faction_ships.pirates] illustrious = launch.launch_wave_around_unit( 'Illustrious', confed, faction_ships.getRandomCapitol(confed), 'default', 1, 1000, 4000, playa) launch.launch_wave_around_unit( 'Illustrious', confed, faction_ships.getRandomCapitol(confed), 'default', 2, 1000, 2000, illustrious) launch.launch_wave_around_unit( 'Illustrious', confed, faction_ships.getRandomFighter(confed), 'default', 4, 100, 200, illustrious) launch.launch_wave_around_unit( 'SlaverGuild', pirates, faction_ships.getRandomFighter(pirates), 'default', 4, 100, 200, illustrious) launch.launch_wave_around_unit( 'SlaverGuild', pirates, faction_ships.getRandomCapitol(pirates), 'default', 2, 100, 200, illustrious) VS.IOmessage( 3, "[Computer]", "privateer", self.msgColor[0] + "Scans show the remnants of the Slaver Guild being cleaned up by Special Forces." )
def LaunchNav(self, i, playa): debug.info("launching %d" % i) if (i == 0): launch.launch_wave_around_unit("BadGuys", "aera", "lekra", "default", 3, 100, 1000, playa) self.moveTrans(self.nav[0]) elif (i == 1): if (self.launched[0]): self.moveTrans(self.nav[1]) launch.launch_wave_around_unit("BadGuys", "aera", "kyta", "default", 2, 100, 1000, playa)
def __init__(self): playa = VS.getPlayer() if playa: launch.launch_wave_around_unit( "AbuDhabi", "neutral", faction_ships.getRandomCapitolInt(faction_ships.confed), "default", 1, 1000, 4000, playa, )
def stageLaunchActors(self): radius = self.station.rSize() # launch the two freighters self.merchant = launch.launch_wave_around_unit("VulCorp Transport A-5","merchant_guild","Plowshare","ai_sitting_duck.py",1,radius,radius*2,self.station) self.socialist = launch.launch_wave_around_unit("Lenin's Mercy","ISO","Llama","ai_sitting_duck.py",1,radius,radius*2,self.station) # make the ship a real sitting duck, won't accept any other orders self.merchant.PrimeOrders() self.socialist.PrimeOrders() # make the actors oriented towards the station unit.faceTaget(self.merchant, self.station) unit.faceTaget(self.socialist, self.station) # make the actors fly close to the docking port self.merchant.performDockingOperations(self.station,False) self.socialist.performDockingOperations(self.station,False)
def __init__ (self): playa = VS.getPlayer() if (playa): confed = faction_ships.factions[faction_ships.confed] pirates = faction_ships.factions[faction_ships.pirates] illustrious=launch.launch_wave_around_unit ('Illustrious',confed,faction_ships.getRandomCapitol(confed),'default',1,1000,4000,playa) launch.launch_wave_around_unit ('Illustrious',confed,faction_ships.getRandomCapitol(confed),'default',2,1000,2000,illustrious) launch.launch_wave_around_unit ('Illustrious',confed,faction_ships.getRandomFighter(confed),'default',4,100,200,illustrious) launch.launch_wave_around_unit ('SlaverGuild',pirates,faction_ships.getRandomFighter(pirates),'default',4,100,200,illustrious) launch.launch_wave_around_unit ('SlaverGuild',pirates,faction_ships.getRandomCapitol(pirates),'default',2,100,200,illustrious) VS.IOmessage (3,"game","all","[Computer] Scans show the remnants of the Slaver Guild being cleaned up by Special Forces.")
def launch_new_wave(self): side = vsrandom.randrange(0,2) faction="confed" ai = vsrandom.randrange(0,8) if (0 and ai==0): ai = "printhello.py" else: ai = "default" if (side==0): faction=faction_ships.get_enemy_of("confed") else: faction="merchant" launched = launch.launch_wave_around_unit ("Shadow",faction,faction_ships.getRandomFighter(faction),ai,vsrandom.randrange(1,5),100.0,2000.0,VS.getPlayer(),'') if (vsrandom.randrange(0,10)==0 or faction=="luddites"): launch.launch_wave_around_unit ("ShadowCap"+str(vsrandom.randrange(0,10)),faction,faction_ships.getRandomCapitol(faction),ai,1,2000.0,4000.0,VS.getPlayer(),'')
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 Execute(self): if (VS.getPlayer()): iter = 0 for base in self.fac: if (base.getDistance(VS.getPlayer()) < 0): if (VS.GetGameTime() - self.delay > 4): self.delay = VS.GetGameTime() facname = self.facnames[iter] if (facname == "random"): facname = self.facnames[vsrandom.randrange( 0, len(self.facnames))] type = faction_ships.getRandomFighter(facname) if (iter >= len(self.facnames) / 2): type = faction_ships.getRandomCapitol(facname) tmp = launch.launch_wave_around_unit( "Shadow_" + facname, facname, type, "default", 1, 200, 250, VS.getPlayer(), '', 0) # tmp.upgrade("basic_armor",0,0,1,0) # tmp.upgrade("shield_4_Level1",0,0,1,0) # tmp.upgrade("reactor_level_2",0,0,1,0) # tmp.upgrade("add_ablative_hull_coating",0,0,1,0) # tmp.upgrade("add_sublimative_hull_coating",0,0,1,0) VS.getPlayer().upgrade("tungsten", 0, 0, 1, 0) VS.getPlayer().upgrade("tungsten_hull", 0, 0, 1, 0) else: VS.IOmessage( 0, "spawner", "all", "Going to spawn " + self.facnames[iter] + "starships in %d seconds at." % (10 - (VS.GetGameTime() - self.delay))) iter += 1
def launch_dockable_around_unit(fg, faction, ai, radius, myunit, garbage_collection_distance, logo='', fgappend='', skipdj=0): import fg_util for i in fg_util.LandedShipsInFG(fg, faction): if (i[0] == 'Mule.stock' or i[0] == 'Mule' or faction_ships.isCapital(i[0])): un = launch_types_around(fg, faction, [i], ai, radius, myunit, garbage_collection_distance, logo, fgappend, skipdj) if (un.isDockableUnit()): return un if (fgappend == 'Base'): fg = fgappend else: fg = fg + fgappend return launch.launch_wave_around_unit( fg, faction, faction_ships.getRandomCapitol(faction), ai, 1, radius, radius * 1.5, myunit, logo, 1, skipdj)
def __init__ (self): self.system = VS.getSystemName() playa = VS.getPlayer() self.msgColor = ("#9999FF","#FF9999") if (playa): confed = faction_ships.factions[faction_ships.confed] pirates = faction_ships.factions[faction_ships.pirates] illustrious=launch.launch_wave_around_unit ('Illustrious',confed,faction_ships.getRandomCapitol(confed),'default',1,1000,4000,playa) launch.launch_wave_around_unit ('Illustrious',confed,faction_ships.getRandomCapitol(confed),'default',2,1000,2000,illustrious) launch.launch_wave_around_unit ('Illustrious',confed,faction_ships.getRandomFighter(confed),'default',4,100,200,illustrious) launch.launch_wave_around_unit ('SlaverGuild',pirates,faction_ships.getRandomFighter(pirates),'default',4,100,200,illustrious) launch.launch_wave_around_unit ('SlaverGuild',pirates,faction_ships.getRandomCapitol(pirates),'default',2,100,200,illustrious) VS.IOmessage (3,"[Computer]","privateer",self.msgColor[0]+"Scans show the remnants of the Slaver Guild being cleaned up by Special Forces.")
def SpawnShip(self, playa, name): un = launch.launch_wave_around_unit(playa.getFlightgroupName(), playa.getFactionName(), name, "default", 1, playa.rSize() + 100, playa.rSize() + 1000, playa, "") un.setFactionName(self.faction) return un
def Execute (self): if (VS.getPlayer()): iter=0 for base in self.fac: if (base.getDistance(VS.getPlayer())<0): if (VS.GetGameTime()-self.delay>10): self.delay=VS.GetGameTime() type=faction_ships.getRandomFighter(self.facnames[iter]) if (iter>=len(self.facnames)/2): type=faction_ships.getRandomCapitol(self.facnames[iter]) launch.launch_wave_around_unit("Shadow_"+self.facnames[iter],self.facnames[iter],type,"default",1,200,250,VS.getPlayer(),'',0) VS.getPlayer().upgrade("tungsten",0,0,1,0) VS.getPlayer().upgrade("tungsten_hull",0,0,1,0) else: VS.IOmessage(0,"spawner","all","Going to spawn "+self.facnames[iter]+"starships in %d seconds at."%(10-(VS.GetGameTime()-self.delay))) iter+=1
def punish (you,faction,difficulty): VS.AdjustRelation(you.getFactionName(),faction,difficulty*-.01,1) if (difficulty>=2): VS.IOmessage (0,"mission",getMessagePlayer(you),"#ff0000Your idiocy will be punished.") VS.IOmessage (0,"mission",getMessagePlayer(you),"#ff0000You had better run for what little life you have left.") for i in range(difficulty): un=faction_ships.getRandomFighter(faction) newunit=launch.launch_wave_around_unit("shadow", faction, un, "default", 1, 200.0,400.0,you) newunit.setFgDirective("B") newunit.SetTarget(you)
def launch_dockable_around_unit (fg,faction,ai,radius,myunit,garbage_collection_distance,logo='',fgappend=''): for i in fg_util.LandedShipsInFG(fg,faction): if (i[0]=='mule.blank' or i[0]=='mule' or faction_ships.isCapital(i[0])): un=launch_types_around (fg,faction,[i],ai,radius,myunit,garbage_collection_distance,logo,fgappend) if (un.isDockableUnit()): return un if (fgappend=='Base'): fg=fgappend else: fg=fg+fgappend return launch.launch_wave_around_unit(fg,faction,faction_ships.getRandomCapitol(faction),ai,1,radius,radius*1.5,myunit,logo)
def setup_all(self): print print "Truck Launched" print self.truck_pirate = launch.launch_wave_around_unit( "Smuggler", "pirate", "truck", "modules/ai_qct_waitjump.py", 1, 3000, 5000, self.playa ) print print "Scrap Released" print self.cargo_container = launch.launch_wave_around_unit( "Scrap", "aera", "cargo", "default", 1, 7000, 5000, self.playa ) print print "Aera Released" print self.numaera = 4 self.aera_specopp = () for i in range(self.numaera): self.aera_specopp = self.aera_specopp + ( launch.launch_wave_around_unit("Aera/SpecOpp", "aera", "dagger", "default", 1, 2000, 4000, self.playa), ) print print "Aera Cloaked" print unit.TfgCloak(1, self.aera_specopp) self.repeat_more = 1 self.repeat_less = 1 self.repeat_end1 = 1 self.repeat_end2 = 1 self.timer1 = 0 self.jumpout = 0 self.quest_exit = 0 global truck_exit truck_exit = 0
def makeAdversary(self, faction, num): self.adv = [] playa = VS.getPlayer() if (playa): for i in range(num): self.adv += [ launch.launch_wave_around_unit( "Shadow", faction, faction_ships.getRandomFighter(faction), "default", 1, playa.rSize() + 500, playa.rSize() + 2000, playa, "") ]
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
def SpawnShip (self, playa, name): un = launch.launch_wave_around_unit(playa.getFlightgroupName(), playa.getFactionName(), name, "default", 1, playa.rSize() + 100, playa.rSize() + 1000, playa, "") un.setFactionName(self.faction) return un
def __init__(self): self.playa = VS.getPlayer() if (self.playa): VS.IOmessage(3, "The past version of you.", "all", "Daniel, this is your test mission...") self.un0 = launch.launch_wave_around_unit("siege_win", "trigger", "cargo", "default", 1, 1, 3000, self.playa) self.un1 = launch.launch_wave_around_unit("siege_loss", "trigger", "cargo", "default", 1, 1, 2000, self.playa) self.un2 = launch.launch_wave_around_unit("siege_draw", "trigger", "cargo", "default", 1, 1, 1000, self.playa) self.numguard = 4 self.guard = () for i in range(self.numguard): self.guard = self.guard + (launch.launch_wave_around_unit( "Guardians", "neutral", "drone", "default", 1, 1, 4000, self.playa), ) self.triggkey = [1, 1, 1, 1] print "Sending News" Director.pushSaveString( 0, "dynamic_news", "#TEST STORY!\\Will this thing ever work!\\ Dan.a") Director.pushSaveString( 0, "dynamic_news", "siege,start,rlaan,aera,-1,0.8,enigma_sector/boondoggles,all") Director.pushSaveString( 0, "dynamic_news", "siege,end,rlaan,aera,1,0.8,enigma_sector/boondoggles,all") Director.pushSaveString( 0, "dynamic_news", "my,arse,rlaan,aera,-1,0.8,is_sector/sore,all")
def Execute (self): playa=VS.getPlayer() if (playa.isNull()): return 1 if (VS.getSystemFile()!=self.sysfile): self.gametime=VS.GetGameTime() return 1 if (VS.GetGameTime()-self.gametime>10 and self.stage==0): self.stage=1 if (self.ZeroVel(playa)): self.deductToll(playa) self.distractMilitia() return 0 else: self.stage=1 for un in self.militia: un.SetTarget(playa) VS.IOmessage(0,"Extortionist","all","Ok you asked for it! Die scoundrel!") if (self.stage==1): if (len (self.militia)==0): VS.IOmessage (0,"Extortionist","all","*@&* taking work from honest securme($*@") VS.IOmessage(0,"game","news","ROGUE SECURITY FORCES CRUSHED: With the bulk of the Confederate Navy deployed in the war against the Aera, the protection and defense of civilian trade lines have been left to local militias in many systems. Recent events have proven, though, that some of these militias walk a very fine line between enforcing the law and breaking it. In the Heinlein System, the militia began charging outrageous toll fees for passage through the system. On those occasions when their demands weren't met, they opened fire. This prompted the Navy to dispatch the HCS Hangzhou to the system, and today the cruiser finally reported arresting the last member of the rogue security forces.") l = faction_ships.capitols[faction_ships.confed] launch.launch_wave_around_unit("Hangzhou",faction_ships.factions[faction_ships.confed],faction_ships.getRandomCapitolInt(faction_ships.confed),"default",1,1000,2000,playa) self.removeQuest(); return 0 else: if (self.ZeroVel(playa)): tim = VS.GetGameTime() if (tim-self.mark>10): self.mark = tim elif (tim-self.mark>5): self.deductToll(playa) self.distractMilitia() return 0 if (self.militia[0].isNull()): del self.militia[0] return 1
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")
def __init__ (self): self.playa = VS.getPlayer() if (self.playa): VS.IOmessage (3,"The past version of you.","all","Daniel, this is your test mission...") self.un0=launch.launch_wave_around_unit("siege_win","trigger","cargo","default",1,1,3000,self.playa) self.un1=launch.launch_wave_around_unit("siege_loss","trigger","cargo","default",1,1,2000,self.playa) self.un2=launch.launch_wave_around_unit("siege_draw","trigger","cargo","default",1,1,1000,self.playa) self.numguard = 4 self.guard = () for i in range(self.numguard): self.guard = self.guard + (launch.launch_wave_around_unit("Guardians","neutral","drone","default",1,1,4000,self.playa),) self.triggkey = [1,1,1,1] print "Sending News" Director.pushSaveString(0,"dynamic_news","#TEST STORY!\\Will this thing ever work!\\ Dan.a") Director.pushSaveString(0,"dynamic_news","siege,start,rlaan,aera,-1,0.8,enigma_sector/boondoggles,all") Director.pushSaveString(0,"dynamic_news","siege,end,rlaan,aera,1,0.8,enigma_sector/boondoggles,all") Director.pushSaveString(0,"dynamic_news","my,arse,rlaan,aera,-1,0.8,is_sector/sore,all")
def makeAdversary(self, faction, num): self.adv = [] playa = VS.getPlayer() if (playa): for i in range(num): self.adv += [launch.launch_wave_around_unit("Shadow", faction, faction_ships.getRandomFighter(faction), "default", 1, playa.rSize()+500, playa.rSize()+2000, playa, "")]
def punish(you, faction, difficulty): VS.AdjustRelation(you.getFactionName(), faction, difficulty * -.01, 1) if (difficulty >= 2): VS.IOmessage(0, "mission", getMessagePlayer(you), "#ff0000Your idiocy will be punished.") VS.IOmessage( 0, "mission", getMessagePlayer(you), "#ff0000You had better run for what little life you have left.") for i in range(difficulty): un = faction_ships.getRandomFighter(faction) newunit = launch.launch_wave_around_unit("shadow", faction, un, "default", 1, 200.0, 400.0, you) newunit.setFgDirective("B") newunit.SetTarget(you)
def __call__(self,room,subnodes): Script.__call__(self,room,subnodes) import VS if VS.networked(): return True you=VS.getPlayer() import launch wing=launch.launch_wave_around_unit("Wingmen", self.faction, self.shiptype, "default", self.num, 500, 1000, you) wing.setFgDirective('A') wing.setFlightgroupLeader(you)
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
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 Execute (self): if (VS.getPlayer()): iter=0 for base in self.fac: if (base.getDistance(VS.getPlayer())<0): if (VS.GetGameTime()-self.delay>4): self.delay=VS.GetGameTime() facname = self.facnames[iter] if (facname=="random"): facname=self.facnames[vsrandom.randrange(0,len(self.facnames))] type=faction_ships.getRandomFighter(facname) if (iter>=len(self.facnames)/2): type=faction_ships.getRandomCapitol(facname) tmp=launch.launch_wave_around_unit("Shadow_"+facname,facname,type,"default",1,200,250,VS.getPlayer(),'',0) # tmp.upgrade("basic_armor",0,0,1,0) # tmp.upgrade("shield_4_Level1",0,0,1,0) # tmp.upgrade("reactor_level_2",0,0,1,0) # tmp.upgrade("add_ablative_hull_coating",0,0,1,0) # tmp.upgrade("add_sublimative_hull_coating",0,0,1,0) VS.getPlayer().upgrade("tungsten",0,0,1,0) VS.getPlayer().upgrade("tungsten_hull",0,0,1,0) else: VS.IOmessage(0,"spawner","all","Going to spawn "+self.facnames[iter]+"starships in %d seconds at."%(10-(VS.GetGameTime()-self.delay))) iter+=1
def Execute(self): isSig = 0 if (self.you.isNull()): self.Lose(1) return if (self.arrived == 3): self.gosig.Execute() cargquant = self.you.GetCargo(self.content).GetQuantity() if cargquant < self.quantity: # print "ohnooohnoohno!!!!!!!" VS.IOmessage( 0, "plunder mission", self.mplay, 'Not enough of %s cargo... Get more until you have %d.' % (self.quantity)) VS.setCompleteness(self.obj, 0.) elif self.you.isDocked(self.gosig.SignificantUnit( )) or self.gosig.SignificantUnit().isDocked(self.you): # print "du hast gewonnen!" self.you.removeCargo(self.content, self.quantity, 1) self.Win(self.you, 1) # else: # print 'hihohohiho' elif (self.arrived == 2): cargquant = self.you.GetCargo(self.content).GetQuantity() VS.setCompleteness(self.obj, float(cargquant) / float(self.quantity)) if cargquant == self.quantity: self.arrived = 3 self.gosig = go_somewhere_significant(self.you, 1, 3000., 1, "pirates") self.gosig.SignificantUnit().setCombatRole("INERT") VS.IOmessage( 0, "plunder mission", self.mplay, 'Give all of your cargo to the %s unit.' % (unit.getUnitFullName(self.gosig.SignificantUnit()))) elif (self.arrived == 1): if (self.enemy): self.pos = self.enemy.Position() curun = VS.getUnit(self.curiter) self.curiter += 1 if (curun == self.enemy): self.enemy.SetTarget(self.you) elif (curun.isNull()): self.curiter = 0 if (self.enemy.isNull()): VS.setCompleteness(self.obj, 1.) self.arrived = 2 self.enemy = [] for i in range(self.quantity * 2): launch.launch_wave_around_area("shadow", "upgrades", "generic_cargo", "sitting_duck", 1, 5., 10., self.pos, '', 0).setName(self.content) self.obj = VS.addObjective("Pick up %d %s cargo" % (self.quantity, self.content)) VS.IOmessage( 0, "plunder mission", self.mplay, 'You must now pick up at least %d of the %s cargo.' % (self.quantity, self.content)) else: significant = self.gosig.SignificantUnit() if (significant.isNull()): print "sig null" VS.terminateMission(0) return else: if (self.you.getSignificantDistance(significant) < 10000.0): if (self.newship == ""): self.newship = faction_ships.getRandomFighter( 'merchant') carg = VS.getRandCargo(self.quantity, self.category) if (carg.GetQuantity() == 0): carg = VS.getRandCargo( self.quantity, "") #oh no... could be starships... self.content = carg.GetContent() carg.SetQuantity(self.quantity * 2) self.enemy = launch.launch_wave_around_unit( "shadow", "merchant", self.newship, "default", 1, 200.0, 500.0, self.you) self.enemy.addCargo(carg) VS.setCompleteness(self.gosig.obj, 1.) VS.IOmessage( 0, "plunder mission", self.mplay, 'You must now destroy the %s ship.' % self.newship) VS.IOmessage( 0, "plunder mission", self.mplay, 'That fighter contains the wanted %s cargo in its hold.' % self.content) self.obj = VS.addObjective( "Destroy the %s ship." % (unit.getUnitFullName(self.enemy))) if (self.enemy): self.arrived = 1 else: print "enemy null" VS.terminateMission(0) return
def __init__ (self,you, landable_only, distance_away_to_trigger,base_only=0,capshipfaction="", dyn_fg="", showObjective=1, forcestarship=0): self.obj=0 self.showObjective=showObjective self.orbitee="" self.capship=0 self.you = you self.arrivedarea=0 self.distfrombase=distance_away_to_trigger significant=VS.Unit() aroundthe="" self.sysfil=VS.getSystemFile() if (landable_only or base_only): randint=vsrandom.randrange(0,128) lim=1 if landable_only and not base_only: lim=10 for i in xrange(lim): significant = unit.getSignificant (randint,landable_only,base_only) if significant.isPlanet(): break else: randint+=1 if (landable_only and not unit.isLandable(significant)) or forcestarship: self.capship=1 if (capshipfaction==""): capshipfaction="merchant" if (self.capship and capshipfaction!=""): if (significant.isNull()): significant=you self.orbitee="%s" % (significant.getName()) self.capship=1 print "orbitee %s " % self.orbitee if (dyn_fg==""): newship=faction_ships.getRandomCapitol(capshipfaction) found=False near=2000.0 far=5000.0 try: near*=faction_ships.launch_distance_factor far*=faction_ships.launch_distance_factor except: pass i=VS.getUnitList() while i.notDone(): testun = i.current() i.advance() if testun.getFactionName()==capshipfaction and faction_ships.isCapital(testun.getName()): significant=moveUnitTo(testun,significant,near) found=True break if (not found): significant=launch.launch_wave_around_unit("Base",capshipfaction,newship,"sitting_duck",1,near,far,significant,"") else: near=5000.0 try: near*=faction_ships.launch_distance_factor except: pass found=False aroundthe=" near "+unit.getUnitFullName(significant,True); i = VS.getUnitList() while i.notDone(): testun = i.current() i.advance() if testun.getFactionName()==capshipfaction and faction_ships.isCapital(testun.getName()): significant=moveUnitTo(testun,significant,near) found=True break if (not found): significant=launch_recycle.launch_dockable_around_unit(dyn_fg,capshipfaction,"sitting_duck",near,significant,4*near,'','Base') significant.setFullname(dyn_fg) else: significant = universe.getRandomJumppoint () if (significant.isNull()): print "ERROR: no significants found in starsystem %s" % (self.sysfil) self.significantun=VS.getPlayer() else: self.significantun=significant self.significantun.setMissionRelevant() #qualifier="the " #if (significant.isPlanet() and significant.isDockableUnit()): # qualifier="" if (self.showObjective): self.obj=VS.addObjective("Visit %s %s" % (self.getSignificantFullName (),aroundthe)) VS.setOwner(self.obj,VS.getPlayer())
def Execute (self): if (self.player and self.station): # launches the particpating actors if (self.stage==1 and VS.GetGameTime()>self.timer and self.station.getDistance(self.player)<50000): self.stageLaunchActors() self.stage = 2 # checks to see if the self.player is within 10km of the station to initiate the dispute if (self.stage==2 and VS.GetGameTime()>self.timer and self.station.getDistance(self.player)<15000): self.stageDockingDispute() self.talktime = VS.GetGameTime() self.stage = 3 # play the talk animation if (self.stage==3 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime): # check which animation to play for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): # play the animation self.player.commAnimation(self.animations[self.sequence[index][2]][0]) # this is how long one animation takes self.anitime = VS.GetGameTime()+2 if (self.stage==3 and VS.GetGameTime()>=self.timer): self.stage = 4 # get the merchant to attack if (self.stage==4 and VS.GetGameTime()>self.timer): # the two ships start to attack each other self.merchant.SetTarget(self.socialist) VS.AdjustRelation(self.merchant.getFactionName(),self.socialist.getFactionName(),-5,1) self.merchant.LoadAIScript("default") # attack directive - no ai change, no target change self.merchant.setFgDirective("A.") self.timer = VS.GetGameTime()+5 self.stage = 5 # get the socialist to attack if (self.stage==5 and VS.GetGameTime()>self.timer): # the privateer gets involved... or does he? VS.IOmessage (0,"[Lenin's Mercy]","privateer",self.socColor+"Mayday! We are under attack! Privateer, please help us... we are no match for them. We have wounded on board!") VS.IOmessage (6,"[VulCorp Transport A-5]","privateer",self.merColor+"Privateer, if you look the other way... you will be duly compensated.") self.animations = [["com_dispute_socialist.ani",2],["com_dispute_merchant.ani",2]] self.sequence = [[0,6,0],[6,4,1]] self.talktime = VS.GetGameTime() VS.AdjustRelation(self.socialist.getFactionName(),self.merchant.getFactionName(),-5,1) self.socialist.SetTarget(self.merchant) self.socialist.LoadAIScript("default") self.socialist.setFgDirective("A.") self.timer = VS.GetGameTime()+10 self.stage = 6 # play the talk animation if (self.stage==6 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime): for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): self.player.commAnimation(self.animations[self.sequence[index][2]][0]) self.anitime = VS.GetGameTime()+2 if (self.stage==6 and VS.GetGameTime()>=self.timer): self.stage = 7 # we need to refresh the ai during battle since it lasts for only 7 seconds if (self.stage==7 and VS.GetGameTime()>self.timer): self.merchant.LoadAIScript("default") self.socialist.LoadAIScript("default") self.timer = VS.GetGameTime()+2 # evaluate the conflict result if (self.stage==7 and self.merchant.isNull()): VS.IOmessage (0,"[VulCorp Transport A-5]","all",self.merColor+"Oh nooooo...!!!!!") self.player.commAnimation("com_dispute_merchant.ani") self.stage = 11 if (self.stage==7 and self.socialist.isNull()): VS.IOmessage (0,"[Lenin's Mercy]","all",self.socColor+"Liberte! Egalite!! Fraternite...!!!!!") self.player.commAnimation("com_dispute_socialist.ani") self.stage = 21 # if the merchant has died, give player the socialist reward if (self.stage==11 and VS.GetGameTime()>self.timer): self.socialist.PrimeOrders() VS.IOmessage (0,"[Lenin's Mercy]","privateer",self.socColor+"Thank you, Privateer! The Interstellar Socialist Organization is in your debt. We are getting our wounded to the base's medical facility.") VS.IOmessage (5,"[Lenin's Mercy]","privateer",self.socColor+"We have no money... but we are transmitting you the coordinates of the cargo we dumped to make room for the attack victims. Do with it what you will.") VS.IOmessage (10,"[Lenin's Mercy]","privateer",self.socColor+"You have made a friend with the ISO today. Have a safe journey.") self.animations = [["com_dispute_socialist.ani",2]] self.sequence = [[0,15,0]] self.talktime = VS.GetGameTime() # launches various types of cargo as reward # launch_wave_around_unit (fgname, faction, type, ai, nr_ships, minradius, maxradius, my_unit,logo='',useani=1,skipdj=0) self.cargo = launch.launch_wave_around_unit("Cargo",'neutral','iron_ore.cargo',"default",2,3000,6000,self.player) self.cargo = launch.launch_wave_around_unit("Cargo",'neutral','tungsten_ore.cargo',"default",2,3000,6000,self.player) self.cargo = launch.launch_wave_around_unit("Cargo",'neutral','generic_cargo',"default",16,3000,6000,self.player) # reputation with ISO goes up. Not sure of the numbers VS.AdjustRelation(self.player.getFactionName(),self.socialist.getFactionName(),1,5) # publish news text = "PRIVATEER SAVES SHIPLOAD OF WOUNDED\\\Today, an unprecedented dispute about landing priorities took place close to a station in the Regallis system of Sol sector. " text += "A merchant was delivering a priority shipment to a station in the system while an ISO transport vessel requested emergency landing having twelve rescued passengers on board who were previously wounded in a pirate attack. " text += "A privateer approaching that base at the same time, and assisting the dispute, reacted to the situation before security forces could arrive at the scene and promptly removed the capitalist bloodsucker, thus saving many lives. " text += "Presently, the injured are being taken care of at the medical facilities of the station with two heavily wounded remaining under intensive care." news.publishNews(text) # set next stage conditions self.timer = VS.GetGameTime()+15 self.winner = self.socialist self.stage = 12 # play the talk animation if (self.stage==12 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime): for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): self.player.commAnimation(self.animations[self.sequence[index][2]][0]) self.anitime = VS.GetGameTime()+2 if (self.stage==12 and VS.GetGameTime()>=self.timer): self.stage = 30 # if the merchant ship is still alive if (self.stage==21 and VS.GetGameTime()>self.timer): self.merchant.PrimeOrders() # if the merchant is still friends with the self.player, the merchant gives him a nice chunk of cash if (5 > -.1): VS.IOmessage (0,"[VulCorp Transport A-5]","privateer",self.merColor+"Privateer, thank you for your cooperation.") VS.IOmessage (3,"[VulCorp Transport A-5]","privateer",self.merColor+"We will be able to make a killing on this shipment thanks to you. Here are 15000 credits for your trouble.") self.animations = [["com_dispute_merchant.ani",2]] self.sequence = [[0,8,0]] self.talktime = VS.GetGameTime() self.player.addCredits(15000) # rep with merchants goes up VS.AdjustRelation(self.player.getFactionName(),self.merchant.getFactionName(),.1,.5) # publish news text = "MALICIOUS MERCHANT MASSACRES MARXIST MERCY MISSION\\\Today, an unprecedented dispute about landing priorities took place close to a station in the Regallis system of Sol sector. " text += "A merchant was delivering a priority shipment to a station in the system while an ISO transport vessel requested emergency landing having twelve rescued passengers on board who were previously wounded in a pirate attack. " text += "Before security forces could arrive at the scene the merchant pilot promptly applied his own justice scheme thus reducing the other vessel cum content to space dust." news.publishNews(text) # set next stage conditions self.timer = VS.GetGameTime()+8 self.winner = self.merchant self.stage = 22 # play the talk animation if (self.stage==22 and VS.GetGameTime()<self.timer and VS.GetGameTime()>=self.anitime): for index in range (len(self.sequence)): if (VS.GetGameTime()-self.talktime>=self.sequence[index][0] and VS.GetGameTime()-self.talktime<=self.sequence[index][0]+self.sequence[index][1]): self.player.commAnimation(self.animations[self.sequence[index][2]][0]) self.anitime = VS.GetGameTime()+2 if (self.stage==22 and VS.GetGameTime()>=self.timer): self.stage = 30 # let the remaining ship approach the station and dock if (self.stage==30 and VS.GetGameTime()>self.timer): self.timer = VS.GetGameTime()+5 #if (not self.station.isDocked(self.winner)): if (not self.winner.isNull()): # performDockingOperations is unusable # 1st it lets the ship fly through the stations # 2nd it doesn't dock the unit #self.winner.performDockingOperations(self.station,1) unit.approachAndDock(self.winner,self.station) else: self.stage = 99 if (self.stage==99 and VS.GetGameTime()>self.timer): self.playernum = -1 self.name = "quest_dispute" self.removeQuest() self.stage += 1 # don't enter this loop anymore return 0 return 1
def Execute (self): # remove this test self.sysfile = VS.getSystemFile() # if self.truck_pirate.getUnitSystemFile()!= VS.getSystemFile(): # print "Truck has Jumped Away :-)" # else: # print "Truck is still here! :-(" if self.quest_exit == 1: return 0 if (self.playa): if self.jumpout == 1: self.end_destruction() elif self.cargo_container.getMinDis(self.playa.Position()) < 1000: self.start_destruction() elif self.cargo_container.getMinDis(self.playa.Position()) < 2500 and not self.cargo_container.isNull(): if self.repeat_end2 == 1: VS.IOmessage (3,"[Computer]","all","Warning! Annomalous warp echos detected.") print() print("Aera Un-Cloaked") print() unit.TfgCloak(0,self.aera_specopp) self.repeat_end2 = 2 elif self.cargo_container.isNull(): if self.repeat_end2 == 1: print("null activating") VS.IOmessage (3,"[Computer]","all","Warning! De-Cloaking hostiles.") print() print("Aera Un-Cloaked") print() unit.TfgCloak(0,self.aera_specopp) unit.setTfgDirective(self.aera_specopp,self.playa,'A') VS.IOmessage (0,"Aera SpecOpp","all","[Translate: Aernoss -> Englysh] <surprise> Attention all! <anger> Entity/self valueless takes possession away value.") VS.IOmessage (3,"Aera SpecOpp","all","[Translate: Aernoss -> Englysh] <anger> Filthy human procreate entity/self! Death done!") self.repeat_end2 = 0 if unit.TfgisNull(self.aera_specopp): self.mission_success() if self.jumpout == 1: self.end_destruction() if self.truck_pirate.getMinDis(self.playa.Position()) < 200: if self.repeat_end1 == 2: VS.IOmessage (0,"Sonorous E2","all","I am with Confed Special Service.") VS.IOmessage (0,"Sonorous E2","all","You are hampering a priority 0 operation.") self.confed_epeels2=launch.launch_wave_around_unit("Sonorous A3","confed","epeellcat","default",5,1000,5000,self.playa) VS.IOmessage (5,"Sonorous E2","all","You are Terminated.") self.confed_epeels2.SetTarget(self.playa) self.confed_epeels2.setFgDirective('A') self.repeat_end1 = 3 elif self.truck_pirate.getMinDis(self.playa.Position()) < 1000: if self.repeat_end1 == 1: VS.IOmessage (0,"Smuggler:truck","all","Back off mate, if you know what's good for you.") print("My target is...") global truck_exit truck_exit = 1 print(truck_exit) self.repeat_more = 0 self.repeat_less = 0 self.repeat_end1 = 2 elif self.truck_pirate.getMinDis(self.playa.Position()) < 3000: if self.repeat_less == 1: VS.IOmessage (0,"Smuggler:truck","all","Please stay away, we are carrying valuable cargo.") self.repeat_more = 1 self.repeat_less = 0 else: if self.repeat_more == 1: VS.IOmessage (0,"Smuggler:truck","all","Keep your distance.") self.repeat_more = 0 self.repeat_less = 1 # self.makeQuestPersistent() return 1
def Execute(self): isSig = 0 if self.you.isNull(): self.Lose(1) return if self.arrived == 3: self.gosig.Execute() cargquant = self.you.GetCargo(self.content).GetQuantity() if cargquant < self.quantity: # print "ohnooohnoohno!!!!!!!" VS.IOmessage( 0, "plunder mission", self.mplay, "Not enough of %s cargo... Get more until you have %d." % (self.quantity), ) VS.setCompleteness(self.obj, 0.0) elif self.you.isDocked(self.gosig.SignificantUnit()) or self.gosig.SignificantUnit().isDocked(self.you): # print "du hast gewonnen!" self.you.removeCargo(self.content, self.quantity, 1) self.Win(self.you, 1) # else: # print 'hihohohiho' elif self.arrived == 2: cargquant = self.you.GetCargo(self.content).GetQuantity() VS.setCompleteness(self.obj, float(cargquant) / float(self.quantity)) if cargquant == self.quantity: self.arrived = 3 self.gosig = go_somewhere_significant(self.you, 1, 3000.0, 1, "pirates") self.gosig.SignificantUnit().setCombatRole("INERT") VS.IOmessage( 0, "plunder mission", self.mplay, "Give all of your cargo to the %s unit." % (self.gosig.SignificantUnit().getName()), ) elif self.arrived == 1: if self.enemy: self.pos = self.enemy.Position() curun = VS.getUnit(self.curiter) self.curiter += 1 if curun == self.enemy: self.enemy.SetTarget(self.you) elif curun.isNull(): self.curiter = 0 if self.enemy.isNull(): VS.setCompleteness(self.obj, 1.0) self.arrived = 2 self.enemy = [] for i in range(self.quantity * 2): launch.launch_wave_around_area( "shadow", "upgrades", "generic_cargo", "sitting_duck", 1, 5.0, 10.0, self.pos, "", 0 ).setName(self.content) self.obj = VS.addObjective("Pick up %d %s cargo" % (self.quantity, self.content)) VS.IOmessage( 0, "plunder mission", self.mplay, "You must now pick up at least %d of the %s cargo." % (self.quantity, self.content), ) else: significant = self.gosig.SignificantUnit() if significant.isNull(): print "sig null" VS.terminateMission(0) return else: if self.you.getSignificantDistance(significant) < 10000.0: if self.newship == "": self.newship = faction_ships.getRandomFighter("merchant") carg = VS.getRandCargo(self.quantity, self.category) if carg.GetQuantity() == 0: carg = VS.getRandCargo(self.quantity, "") # oh no... could be starships... self.content = carg.GetContent() carg.SetQuantity(self.quantity * 2) self.enemy = launch.launch_wave_around_unit( "shadow", "merchant", self.newship, "default", 1, 200.0, 500.0, self.you ) self.enemy.addCargo(carg) VS.setCompleteness(self.gosig.obj, 1.0) VS.IOmessage(0, "plunder mission", self.mplay, "You must now destroy the %s ship." % self.newship) VS.IOmessage( 0, "plunder mission", self.mplay, "That fighter contains the wanted %s cargo in its hold." % self.content, ) self.obj = VS.addObjective("Destroy the %s ship." % (self.enemy.getName())) if self.enemy: self.arrived = 1 else: print "enemy null" VS.terminateMission(0) return
playa=VS.getPlayer() playernum = playa.isPlayerStarship() #only want this var if you agreed to the quest at some point--so we want it to return fasle if len is 0 if (not Director.getSaveDataLength(playernum,"iso_mission1")): Base.Message(_("Good day, stranger. I do not know you, and I do not wish to know you. However, in the face of our mutual situation, perhaps you could come to an agreement with Rowenna of the ISO. Talk to her. But before you leave, talk to me. I may have an offer that you simply cannot refuse.")) else: fixers.DestroyActiveButtons () if (fixers.checkSaveValue(playernum,"iso_mission1",0)): Base.Message(_("Excellent! You accepted the mission. I will offer you 38,000 credits to do one thing: destroy that vessel. You should have help from a few of my elite force; however, I expect the ISO to put up a fight, so be wary and beware. I trust you will accept my offer, my young....friend")) elif (fixers.checkSaveValue(playernum,"iso_mission1",1) or fixers.checkSaveValue(playernum,"iso_evil2",-1) or fixers.checkSaveValue(playernum,"iso_evil3",-1) or fixers.checkSaveValue(playernum,"iso_evil4",-1)): Base.Message(_("There is only one thing I despise more than a member of the Interplanetary Socialist Organization: and that is one of their mercenary lapdogs. You are not worth the breath I have wasted on you. Leave now, if you dare. My forces will destroy your starship and leave your corpse to boil in vacuum.")) type = faction_ships.getRandomFighter ("confed") fgname="IntelSecElite" fixers.setSaveValue (playernum,"decided_iso_good",1) launch.launch_wave_around_unit (fgname,"confed",type,"default",1,80,100,playa).SetTarget(playa) launch.launch_wave_around_unit (fgname,"confed",type,"default",1,80,100,playa).SetTarget(playa) launch.launch_wave_around_unit (fgname,"confed",type,"default",1,80,100,playa).SetTarget(playa) launch.launch_wave_around_unit (fgname,"confed",type,"default",1,80,100,playa).SetTarget(playa) launch.launch_wave_around_unit (fgname,"confed",type,"default",1,80,100,playa).SetTarget(playa) elif (fixers.checkSaveValue(playernum,"iso_mission1",-1) and fixers.checkSaveValue(playernum,"iso_evil2",0)): msg ='' if (fixers.checkSaveValue(playernum,"iso_mission1_paid",0)): msg+=_('Excellent! Excellent! Without him, the ISO cannot stand against us! Soon Defiance itself will be in my grasp! Here is your pay. ') playa.addCredits(38000) fixers.setSaveValue(playernum,"iso_mission1_paid",1) if (VS.numActiveMissions()>1): msg += _('My next job will be most fit when you have no other contracts. We need your services then.') else: msg += _('My next job will be a simple one. A high ranking ISO official will be enroute to the Adams Sector from this one. I would like you to eliminate her before she leaves this system. This is critical to our success... that is 25000 credits critical--will you do it?') AssignMission()
def processMessage(player, auth, command, args, id=''): if command in aliasinfo: command = aliasinfo[command] #cmdinfo = getCommandInfo(command, auth) if auth<1 and command in authcommandinfo: player.sendMessage("#884400You must be authorized to use "+command) return #if cmdinfo and len(args)<cmdinfo[0]: # processMessage(player,True,"help",[command]) # return if command=='help': if len(args)<1: cmdstr = '#8800cc'+' '.join(commandinfo) if auth>=1: cmdstr += '#cc0088 '+' '.join(authcommandinfo) player.sendMessage('#888800Valid commands: '+cmdstr) else: cmdinfo = getCommandInfo(args[0], True) if cmdinfo and len(cmdinfo)>=3: player.sendMessage("#888800Usage: #880088"+cmdinfo[1]+"#888800 - "+cmdinfo[2]) else: player.sendMessage("#884400/"+args[0]+" does not exist. Use /help for a list of commands.") elif command=='reload': if auth<1: return vsmod=VS reload(__import__('server_lib')) vsmod.IOmessage(0,"game","all","The server python script has been reloaded.") elif command=='userlist': cstr = '#44cc44Users on the server:#888800' print len(serverDirector().playerlist) for x in serverDirector().playerlist: #print x #print x.callsign if x.callsign: cstr += ' '+x.callsign player.sendMessage(cstr) elif command=='shipinfo': response = [] if len(args)>=1: callsign = fixCallsign(args[0]) if Director.getSaveDataLength(0,"bounty_"+callsign): amt = Director.getSaveData(0,"bounty_"+callsign,0) if amt > 1000.: response.append("WANTED for %g credits!"%amt) if callsign=='ai': response.append("* Artifically Intelligent *") if id: custom.respond(response,None,id) else: for msg in response: player.sendMessage(msg) elif command=='shiplist': cnt=0 min=-1 max=-1 cstr='' if 1: #try: page=int(args[0]) cstr = '#44cc44Available ships (#888800'+str(page)+'#44cc44):#888800' num=10 min=(page-1)*num max=page*num else: #except: min=-1 if min<0: processMessage(player,False,"help",[command]) else: shiplist=faction_ships.stattableexp.keys() shiplist.sort() for x in shiplist: cnt+=1 if cnt>=min and cnt<max: cstr+= ' '+x player.sendMessage(cstr) elif command=='launcheach': if auth<1: return shiplist = faction_ships.stattableexp.keys() for x in shiplist: processMessage(player,1,"launchme",[x]) elif command=='setadmin': if len(args)<2: return if auth<1: return playerto = serverDirector().getPlayerByCallsign(args[0]) if not playerto: print args[0] player.sendMessage("#884400Cannot find player "+args[0]) return print args value=0.0 if args[1]=='yes' or args[1]=='1': value=1.0 pnum=playerto.player_num if Director.getSaveDataLength(pnum, 'serveradmin')<1: Director.pushSaveData(pnum, 'serveradmin', value) else: Director.putSaveData(pnum, 'serveradmin', 0, value) playerto.sendMessage("Your admin status set to "+str(value)) elif command=='write': if len(args)<1: return playerto = serverDirector().getPlayerByCallsign(args[0]) if not playerto: player.sendMessage("#884400Cannot find player "+args[0]) return playerto.sendMessage(' '.join(args[1:]), player.callsign) player.sendMessage('Message to '+args[0]+': '+(' '.join(args[1:]))) elif command=='say': VS.IOmessage(0, player.callsign,'all',' '.join(args)) elif command=='launchme' or command=='launchtarg' or command=='launch': if auth<1: return if len(args)<1: return factquan=() if command=="launchtarg" or command=="launchme": if not player.current_un: player.sendMessage("#884400Use /launch <unit> <aroundname> to launch when you are null.") return if len(args)>=3: factquan=(args[1],args[2]) elif len(args)>=2: factquan=(args[1],) targun = player.current_un if command=="launchtarg": metarg=targun.GetTarget() if metarg: targun = metarg else: if len(args)<2: processMessage(player,False,"help",[command]) return if len(args)>=4: factquan=(args[2],args[3]) elif len(args)>=3: factquan=(args[2],) targunname = args[1].lower() iter = VS.getUnitList() while iter.notDone(): targun=iter.current() if targun.getName().lower()==targunname: break if targun.getFullname().lower()==targunname: break iter.advance() faction = targun.getFactionName() type=args[0] quantity=1 for a in factquan: try: int(a) quantity=int(a) print quantity except ValueError: faction=a print faction fgname='AI' ainame='default' launch.launch_wave_around_unit(fgname,faction,type,ainame,quantity,2000.0,4000.0,targun) else: processMessage(player, auth, "help", [command])
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
kills=Director.getSaveData(playernum,"kills",len-1) if (kills<25): Base.Message("Hello Pilot. " + intro_string + " We are actively seeking new members in our organization. However to fly defense runs, you need some more experience. Come back when your record is somewhat more interesting and then together we can overthrow the confederacy!"); elif (VS.numActiveMissions()>1): Base.Message ("It is a pleasure to speak to you; however, if you wish to work with me you must first finish up your other contractual obligations.") else: if (fixers.checkSaveValue (playernum,"iso_mission1",0)): Base.Message("Hello Mercenary. " + intro_string + " We are actively seeking mercenaries to help us defend our supplies and our party members. There is, in this system, a vessel carrying several key party members and some valuable sensor data with them. Comrade, we offer 18000 credits if you will defend these starships! Do you accept our offer?") #And then if you fail....... AssignMission() elif (fixers.checkSaveValue (playernum,"iso_mission1",-1)): Base.Message ("You conspirator! I should have realized you were a kepitalizt pig when I first smelled your foul stench! You probably got paid to destroy our vessel. If I shared in your lack of honor I would kill you where you stand. But instead I shall ask my operatives to rid you of your ship. The next time any of us see your vessel, it will be fired upon. Leave my presence - you nauseate me.") fixers.setSaveValue (playernum,"decided_iso_evil",1) type = faction_ships.getRandomFighter ("ISO") fgname="Lenin'sRevenge" launch.launch_wave_around_unit (fgname,"ISO",type,"default",1,80,300,playa).SetTarget(playa) launch.launch_wave_around_unit (fgname,"ISO",type,"default",1,80,300,playa).SetTarget(playa) type = faction_ships.getRandomFighter ("ISO") launch.launch_wave_around_unit (fgname,"ISO",type,"default",1,80,300,playa).SetTarget(playa) launch.launch_wave_around_unit (fgname,"ISO",type,"default",1,80,300,playa).SetTarget(playa) elif (fixers.checkSaveValue (playernum,"iso_mission2",-1) or fixers.checkSaveValue (playernum,"iso_mission3",-1) or fixers.checkSaveValue (playernum,"iso_mission4",-1)): Base.Message ("You have failed the ISO. I should have known not to entrust a self serving mercenary with the key plans of our organization. Go now... make money for yourself--I know you do not care for the future of those who actually earn their livings.") else: if (fixers.checkSaveValue (playernum,"iso_mission1",1) and fixers.checkSaveValue(playernum,"iso_mission2",0)): if (fixers.checkSaveValue (playernum,"iso_mission1_paid",0)): playa.addCredits(18000) fixers.setSaveValue(playernum,"iso_mission1_paid",1) Base.Message ("Thank you for your help in defending our starship. We had no idea that the Confed was on to us there. It is not safe so far away from the Defiance system... We have a starship in urgent need of escort. It is a small, speedy merchant vessel that hopefully will slip past confeds defenses. We have programmed its flight computer to follow you through jump points and to match your insystem jumps. Its final destination is the Adams system; however, be wary that such a small ship will have trouble navigating throug the black hole in Enigma sector, so I have suggested an alternate route that will take you through a few backwater systems to Adams. Will you assist us?")#assign mis 2 AssignMission() elif (fixers.checkSaveValue (playernum,"iso_mission2",1) and fixers.checkSaveValue(playernum,"iso_mission3",0)): Base.Message ("Thank you for the escort kind comrade. I was personally aboard that starship, and I am quite relieved to be here in one piece. However we have another job we'd like you to help us with. This time the reward is quite sizable. We have some rather vital cargo that needs transportation to our home system in Defiance - discreet transportation unseen by the soulless eyes of the Confederacy. We will offer you 20000 for this milk run. Will you do it? If so I shall meet you there myself.")#assign mis 3:
def Execute(self): if (not self.you): VS.terminateMission(0) return if (not self.adjsys.Execute()): return if (self.arrived==0): self.adjsys=go_somewhere_significant.go_somewhere_significant(self.you,0,10000.) sys = VS.getSystemFile() import dynamic_battle if sys in dynamic_battle.rescuelist: del dynamic_battle.rescuelist[sys] self.arrived=1 elif (self.arrived==1): mymin=2500. mymax=3000. # try: # mymin*=faction_ships.launch_distance_factor # mymax*=faction_ships.launch_distance_factor # except: # pass self.eject = launch.launch_wave_around_unit("Rescue Pilot",self.faction,"eject","printhello.py",1,mymin,mymax,self.adjsys.SignificantUnit()) self.arrived=2 self.eject.setName("Pilot") self.eject.SetHull(25); L = launch.Launch() L.fg = "Shadow" L.faction=self.enfaction L.dynfg = self.enflightgroup L.type = faction_ships.getRandomFighter(self.enfaction) L.ai="default" L.num=self.numenemy L.minradius=5000 L.maxradius=15000 try: L.minradius*=faction_ships.launch_distance_factor L.maxradius*=faction_ships.launch_distance_factor except: pass self.enemy=L.launch(self.adjsys.SignificantUnit()) self.enemy.SetTarget(self.eject) self.enemy.setFgDirective("A.") self.you.SetTarget(self.eject) VS.IOmessage(0,"eject",self.mplay,"This is ejector pod 0x4032 requesting immediate rescue and pickup") self.obj=VS.addObjective("Tractor Ejected Pilot") elif (self.arrived==2): if (self.eject): if (self.enemy): self.enemy.SetTarget(self.eject) self.numejectors=self.you.GetCargo("Pilot").GetQuantity() else: if (self.enemy): self.enemy.SetTarget(self.you) self.enemy.setFgDirective("A.") debug.info("numej "+str(self.numejectors)) if (self.numejectors<self.you.GetCargo("Pilot").GetQuantity()): self.you.removeCargo("Pilot",1,1) carg=VS.getRandCargo(1,"Passengers/Economy") carg.SetMissionFlag(1) VS.setCompleteness(self.obj,1) if (not self.you.addCargo(carg)): self.Win(self.you,1) else: self.arrived=3 self.cargname=carg.GetContent() debug.info("adding "+self.cargname) self.adjsys = go_somewhere_significant.go_somewhere_significant(self.you,1,25000) VS.IOmessage(0,"Passenger",self.mplay,"Please take me to my home base: %s so I may begin to recover. Thank you!"%self.adjsys.SignificantUnit().getName()) else: VS.IOmessage(0,"rescue_mission",self.mplay,"#ff0000You Lost the Pilot before you could drop the Pilot at the base. The Pilot's oxygen is currently empty. You fail.") self.Lose(1) elif (self.arrived==3): #check for dockal if (self.you.GetCargo(self.cargname).GetQuantity()==0): self.Lose(1) elif (self.adjsys.SignificantUnit().isDocked(self.you) or self.you.isDocked(self.adjsys.SignificantUnit()) or self.adjsys.SignificantUnit().getDistance(self.you)<10): if (self.you.removeCargo(self.cargname,1,1)): self.Win(self.you,1) else: self.Lose(1)
def Execute (self): # remove this test self.sysfile = VS.getSystemFile() # if self.truck_pirate.getUnitSystemFile()!= VS.getSystemFile(): # print "Truck has Jumped Away :-)" # else: # print "Truck is still here! :-(" if self.quest_exit == 1: return 0 if (self.playa): if self.jumpout == 1: self.end_destruction() elif self.cargo_container.getMinDis(self.playa.Position()) < 1000: self.start_destruction() elif self.cargo_container.getMinDis(self.playa.Position()) < 2500 and not self.cargo_container.isNull(): if self.repeat_end2 == 1: VS.IOmessage (3,"[Computer]","all","Warning! Annomalous warp echos detected.") print print "Aera Un-Cloaked" print unit.TfgCloak(0,self.aera_specopp) self.repeat_end2 = 2 elif self.cargo_container.isNull(): if self.repeat_end2 == 1: print "null activating" VS.IOmessage (3,"[Computer]","all","Warning! De-Cloaking hostiles.") print print "Aera Un-Cloaked" print unit.TfgCloak(0,self.aera_specopp) unit.setTfgDirective(self.aera_specopp,self.playa,'A') VS.IOmessage (0,"Aera SpecOpp","all","[Translate: Aernoss -> Englysh] <surprise> Attention all! <anger> Entity/self valueless takes possession away value.") VS.IOmessage (3,"Aera SpecOpp","all","[Translate: Aernoss -> Englysh] <anger> Filthy human procreate entity/self! Death done!") self.repeat_end2 = 0 if unit.TfgisNull(self.aera_specopp): self.mission_success() if self.jumpout == 1: self.end_destruction() if self.truck_pirate.getMinDis(self.playa.Position()) < 200: if self.repeat_end1 == 2: VS.IOmessage (0,"Sonorous E2","all","I am with Confed Special Service.") VS.IOmessage (0,"Sonorous E2","all","You are hampering a priority 0 operation.") self.confed_epeels2=launch.launch_wave_around_unit("Sonorous A3","confed","epeellcat","default",5,1000,5000,self.playa) VS.IOmessage (5,"Sonorous E2","all","You are Terminated.") self.confed_epeels2.SetTarget(self.playa) self.confed_epeels2.setFgDirective('A') self.repeat_end1 = 3 elif self.truck_pirate.getMinDis(self.playa.Position()) < 1000: if self.repeat_end1 == 1: VS.IOmessage (0,"Smuggler:truck","all","Back off mate, if you know what's good for you.") print "My target is..." global truck_exit truck_exit = 1 print truck_exit self.repeat_more = 0 self.repeat_less = 0 self.repeat_end1 = 2 elif self.truck_pirate.getMinDis(self.playa.Position()) < 3000: if self.repeat_less == 1: VS.IOmessage (0,"Smuggler:truck","all","Please stay away, we are carrying valuable cargo.") self.repeat_more = 1 self.repeat_less = 0 else: if self.repeat_more == 1: VS.IOmessage (0,"Smuggler:truck","all","Keep your distance.") self.repeat_more = 0 self.repeat_less = 1 # self.makeQuestPersistent() return 1
else: if (fixers.checkSaveValue(playernum, "iso_mission1", 0)): Base.Message( "Hello Mercenary. " + intro_string + " We are actively seeking mercenaries to help us defend our supplies and our party members. There is, in this system, a vessel carrying several key party members and some valuable sensor data with them. Comrade, we offer 18000 credits if you will defend these starships! Do you accept our offer?" ) #And then if you fail....... AssignMission() elif (fixers.checkSaveValue(playernum, "iso_mission1", -1)): Base.Message( "You conspirator! I should have realized you were a kepitalizt pig when I first smelled your foul stench! You probably got paid to destroy our vessel. If I shared in your lack of honor I would kill you where you stand. But instead I shall ask my operatives to rid you of your ship. The next time any of us see your vessel, it will be fired upon. Leave my presence - you nauseate me." ) fixers.setSaveValue(playernum, "decided_iso_evil", 1) type = faction_ships.getRandomFighter("ISO") fgname = "Lenin'sRevenge" launch.launch_wave_around_unit(fgname, "ISO", type, "default", 1, 80, 300, playa).SetTarget(playa) launch.launch_wave_around_unit(fgname, "ISO", type, "default", 1, 80, 300, playa).SetTarget(playa) type = faction_ships.getRandomFighter("ISO") launch.launch_wave_around_unit(fgname, "ISO", type, "default", 1, 80, 300, playa).SetTarget(playa) launch.launch_wave_around_unit(fgname, "ISO", type, "default", 1, 80, 300, playa).SetTarget(playa) elif (fixers.checkSaveValue(playernum, "iso_mission2", -1) or fixers.checkSaveValue(playernum, "iso_mission3", -1) or fixers.checkSaveValue(playernum, "iso_mission4", -1)): Base.Message( "You have failed the ISO. I should have known not to entrust a self serving mercenary with the key plans of our organization. Go now... make money for yourself--I know you do not care for the future of those who actually earn their livings." ) else: if (fixers.checkSaveValue(playernum, "iso_mission1", 1)
fixers.DestroyActiveButtons() if (fixers.checkSaveValue(playernum, "iso_mission1", 0)): Base.Message( "Excellent! You accepted the mission. I will offer you 38,000 credits to do one thing: destroy that vessel. You should have help from a few of my elite force; however, I expect the ISO to put up a fight, so be wary and beware. I trust you will accept my offer, my young....friend" ) elif (fixers.checkSaveValue(playernum, "iso_mission1", 1) or fixers.checkSaveValue(playernum, "iso_evil2", -1) or fixers.checkSaveValue(playernum, "iso_evil3", -1) or fixers.checkSaveValue(playernum, "iso_evil4", -1)): Base.Message( "There is only one thing I despise more than a member of the Interplanetary Socialist Organization: and that is one of their mercenary lapdogs. You are not worth the breath I have wasted on you. Leave now, if you dare. My forces will destroy your starship and leave your corpse to boil in vacuum." ) type = faction_ships.getRandomFighter("confed") fgname = "IntelSecElite" fixers.setSaveValue(playernum, "decided_iso_good", 1) launch.launch_wave_around_unit(fgname, "confed", type, "default", 1, 80, 100, playa).SetTarget(playa) launch.launch_wave_around_unit(fgname, "confed", type, "default", 1, 80, 100, playa).SetTarget(playa) launch.launch_wave_around_unit(fgname, "confed", type, "default", 1, 80, 100, playa).SetTarget(playa) launch.launch_wave_around_unit(fgname, "confed", type, "default", 1, 80, 100, playa).SetTarget(playa) launch.launch_wave_around_unit(fgname, "confed", type, "default", 1, 80, 100, playa).SetTarget(playa) elif (fixers.checkSaveValue(playernum, "iso_mission1", -1) and fixers.checkSaveValue(playernum, "iso_evil2", 0)): msg = '' if (fixers.checkSaveValue(playernum, "iso_mission1_paid", 0)): msg += 'Excellent! Excellent! Without him, the ISO cannot stand against us! Soon Defiance itself will be in my grasp! Here is your pay. ' playa.addCredits(38000) fixers.setSaveValue(playernum, "iso_mission1_paid", 1)
def launchShip(self, type, faction): return launch.launch_wave_around_unit("Shadow", faction, type, "default", 1, 100.0, 2000.0, VS.getPlayer(), '')