def Lose(self, terminate):
     VS.IOmessage(0, "plunder mission", self.mplay, "#ff0000You have failed this mission and will not be rewarded.")
     if len(self.donevar):
         quest.removeQuest(int(self.mplay[1:]), self.donevar, -1)
     if terminate:
         print "lose plunder mission"
         VS.terminateMission(0)
Exemple #2
0
 def Execute(self):
     escort_mission.escort_mission.Execute(self)
     sys = self.escortee.getUnitSystemFile()
     if sys in self.alternatesystems:
         for i in range(len(self.alternatesystems)):
             if sys==self.alternatesystems[i]:
                 import quest
                 quest.removeQuest(self.cp,self.alternatevariable,i)
                 quest.removeQuest(self.cp,self.var_to_set,-1)
                 import VS
                 import launch
                 L = launch.Launch()
                 L.fg="Escorts"
                 L.faction=self.alternatefactions[i]
                 L.dynfg=self.alternateflightgroups[i]
                 L.type=self.alternatetypes[i]
                 L.ai="default"
                 L.num=6
                 L.minradius=3000.0
                 L.maxradius=4000.0
                 try:
                     L.minradius*=faction_ships.launch_distance_factor
                     L.minradius*=faction_ships.launch_distance_factor
                 except:
                     pass
                 launched=L.launch(self.escortee)
                 self.escortee.setFgDirective('f')
                 self.escortee.setFlightgroupLeader(launched)
                 self.escortee.setFactionName(self.alternatefactions[i])
                 import universe
                 universe.greet(self.alternategreeting[i],launched,VS.getPlayerX(self.cp))
                 VS.terminateMission(1)
                 return
 def __init__(self,
              factionname,
              missiondifficulty,
              distance_from_base,
              creds,
              numsysaway,
              jumps=(),
              var_to_set='',
              dynfg='',
              dyntype='',
              alternatesystems=(),
              alternatefactions=(),
              alternateflightgroups=(),
              alternatetypes=(),
              alternategreeting=(),
              alternatevariable='diverted'):
     escort_mission.escort_mission.__init__(self, factionname,
                                            missiondifficulty, 0, 0,
                                            distance_from_base, creds, 0,
                                            numsysaway, jumps, var_to_set,
                                            dynfg, dyntype)
     self.alternatesystems = alternatesystems
     self.alternatevariable = alternatevariable
     self.alternateflightgroups = alternateflightgroups
     self.alternatetypes = alternatetypes
     self.alternategreeting = alternategreeting
     self.alternatefactions = alternatefactions
     import quest
     import VS
     self.cp = VS.getCurrentPlayer()
     quest.removeQuest(self.cp, alternatevariable, -1)
 def Execute(self):
     escort_mission.escort_mission.Execute(self)
     sys = self.escortee.getUnitSystemFile()
     if sys in self.alternatesystems:
         for i in range(len(self.alternatesystems)):
             if sys == self.alternatesystems[i]:
                 import quest
                 quest.removeQuest(self.cp, self.alternatevariable, i)
                 quest.removeQuest(self.cp, self.var_to_set, -1)
                 import VS
                 import launch
                 L = launch.Launch()
                 L.fg = "Escorts"
                 L.faction = self.alternatefactions[i]
                 L.dynfg = self.alternateflightgroups[i]
                 L.type = self.alternatetypes[i]
                 L.ai = "default"
                 L.num = 6
                 L.minradius = 3000.0
                 L.maxradius = 4000.0
                 try:
                     L.minradius *= faction_ships.launch_distance_factor
                     L.minradius *= faction_ships.launch_distance_factor
                 except:
                     pass
                 launched = L.launch(self.escortee)
                 self.escortee.setFgDirective('f')
                 self.escortee.setFlightgroupLeader(launched)
                 self.escortee.setFactionName(self.alternatefactions[i])
                 import universe
                 universe.greet(self.alternategreeting[i], launched,
                                VS.getPlayerX(self.cp))
                 VS.terminateMission(1)
                 return
Exemple #5
0
 def takeCargoAndTerminate(self, you, remove=1):
     global isambushrunning
     if (self.var, self.savedCargo) in isambushrunning:
         del isambushrunning[(self.var, self.savedCargo)]
     if self.var:
         quest.removeQuest(self.you.isPlayerStarship(), self.var, 1)
     VS.terminateMission(1)
     return
Exemple #6
0
 def Lose (self,terminate):
     VS.AdjustRelation(self.you.getFactionName(),self.faction,-.02,1)
     VS.IOmessage(0,"rescue_mission",self.mplay,"#ff0000Credit agency reports that you have failed the mission.")
     if len(self.donevar):
         quest.removeQuest(int(self.mplay[1:]),self.donevar,-1)
     if (terminate):
         debug.info("lose plunder mission")
         VS.terminateMission(0)
 def takeCargoAndTerminate(self,you, remove=1):
     global isambushrunning
     if (self.var, self.savedCargo) in isambushrunning:
         del isambushrunning[(self.var, self.savedCargo)]
     if self.var:
         quest.removeQuest(self.you.isPlayerStarship(), self.var, 1)
     VS.terminateMission(1)
     return
Exemple #8
0
 def SuccessMission (self):
     self.you.addCredits (self.cred)
     if self.donevar!='':
         quest.removeQuest(self.you.isPlayerStarship(),self.donevar,1)
     VS.IOmessage (0,"computer",self.mplay,"[Computer] Transmitting Data..")
     VS.IOmessage (0,"patrol",self.mplay,"Thank you! Patrol Complete.")
     VS.IOmessage (0,"patrol",self.mplay,"We have credited your account.")
     VS.terminateMission(1)
Exemple #9
0
 def Win (self,un,terminate):
     self.SetVar(1)
     quest.removeQuest(self.you.isPlayerStarship(),"quest_drone")
     VS.IOmessage (0,"defend mission",self.mplay,"[Computer] #00ff00Defend Mission Accomplished!")
     un.addCredits(self.cred)
     if (terminate):
         debug.info("you win defend mission!")
         VS.terminateMission(1)
Exemple #10
0
 def Lose(self, terminate):
     VS.IOmessage(
         0, "plunder mission", self.mplay,
         "#ff0000You have failed this mission and will not be rewarded.")
     if len(self.donevar):
         quest.removeQuest(int(self.mplay[1:]), self.donevar, -1)
     if (terminate):
         print "lose plunder mission"
         VS.terminateMission(0)
Exemple #11
0
 def Win(self, un, terminate):
     self.SetVar(1)
     quest.removeQuest(self.you.isPlayerStarship(), "quest_drone")
     VS.IOmessage(0, "defend mission", self.mplay,
                  "[Computer] #00ff00Defend Mission Accomplished!")
     un.addCredits(self.cred)
     if (terminate):
         debug.info("you win defend mission!")
         VS.terminateMission(1)
Exemple #12
0
 def SuccessMission(self):
     self.you.addCredits(self.cred)
     if self.donevar != '':
         quest.removeQuest(self.you.isPlayerStarship(), self.donevar, 1)
     VS.IOmessage(0, "computer", self.mplay,
                  "[Computer] Transmitting Data..")
     VS.IOmessage(0, "patrol", self.mplay, "Thank you! Patrol Complete.")
     VS.IOmessage(0, "patrol", self.mplay, "We have credited your account.")
     VS.terminateMission(1)
Exemple #13
0
 def Win (self,un,terminate):
     VS.IOmessage (0,"Passenger",self.mplay,"#00ff00Excellent work pilot.")
     VS.IOmessage (0,"Passenger",self.mplay,"#00ff00You have been rewarded for your effort as agreed.")
     VS.IOmessage (0,"Passenger",self.mplay,"#00ff00You saved my life. I owe you a drink, pal")
     un.addCredits(self.cred)
     VS.AdjustRelation(self.you.getFactionName(),self.faction,.02,1)
     if len(self.donevar):
         quest.removeQuest(self.you.isPlayerStarship(),self.donevar,1)
     if (terminate):
         VS.terminateMission(1)
 def Win(self, un, terminate):
     VS.IOmessage(0, "plunder mission", self.mplay, "#00ff00Excellent work pilot.")
     VS.IOmessage(0, "plunder mission", self.mplay, "#00ff00You have been rewarded for your effort as agreed.")
     VS.IOmessage(0, "plunder mission", self.mplay, "#00ff00Your contribution to the war effort will be remembered.")
     print "do you win?"
     un.addCredits(self.cred)
     if len(self.donevar):
         quest.removeQuest(self.you.isPlayerStarship(), self.donevar, 1)
     if terminate:
         print "you win plunder mission!"
         VS.terminateMission(1)
Exemple #15
0
 def __init__ (self,factionname,missiondifficulty,distance_from_base,creds,numsysaway,jumps=(),var_to_set='',dynfg='',dyntype='',alternatesystems=(),alternatefactions=(),alternateflightgroups=(),alternatetypes=(),alternategreeting=(),alternatevariable='diverted'):
     escort_mission.escort_mission.__init__(self,factionname,missiondifficulty,0,0,distance_from_base,creds,0,numsysaway,jumps,var_to_set,dynfg,dyntype)
     self.alternatesystems=alternatesystems
     self.alternatevariable=alternatevariable
     self.alternateflightgroups=alternateflightgroups
     self.alternatetypes=alternatetypes
     self.alternategreeting=alternategreeting
     self.alternatefactions=alternatefactions
     import quest
     import VS
     self.cp = VS.getCurrentPlayer()
     quest.removeQuest(self.cp,alternatevariable,-1)
 def Execute(self):
     if (VS.GetGameTime() - self.gametime > 10):
         self.escortee.setFgDirective('F')
     if self.you.isNull():
         VS.IOmessage(
             0, "escort", self.mplay,
             "#ff0000You were to protect your escort. Mission failed.")
         VS.terminateMission(0)
         return
     self.escortee.setFlightgroupLeader(self.you)
     #print 'name: '+self.escortee.getFlightgroupLeader().getName()
     #self.escortee.SetVelocity(self.you.GetVelocity())
     if (self.escortee.isNull()):
         VS.IOmessage(
             0, "escort", self.mplay,
             "#ff0000You were to protect your escort. Mission failed.")
         universe.punish(self.you, self.faction, self.difficulty)
         if (self.var_to_set != ''):
             quest.removeQuest(self.you.isPlayerStarship(), self.var_to_set,
                               -1)
         VS.terminateMission(0)
         return
     if (not self.adjsys.Execute()):
         if (self.arrived):
             self.adjsys.SignificantUnit().setSpeed(0.0)
             self.adjsys.SignificantUnit().SetVelocity((0.0, 0.0, 0.0))
         return
     if (not self.arrived):
         self.arrived = 1
         self.adjsys = go_somewhere_significant(
             self.you, 1, self.distfrombase + 15 * self.escortee.rSize(),
             self.difficulty <= 1, self.faction)
         self.role = self.adjsys.SignificantUnit().getCombatRole()
         self.adjsys.SignificantUnit().setCombatRole("INERT")
         self.adjsys.Print("You must escort your starship to the %s",
                           "defend", "docked around the %s", 0)
     elif (self.you.getDistance(self.escortee) < 2000):
         self.you.addCredits(self.creds)
         VS.AdjustRelation(self.you.getFactionName(), self.faction,
                           self.difficulty * .01, 1)
         VS.IOmessage(
             0, "escort", self.mplay,
             "#00ff00Excellent work! You have completed this mission!")
         self.escortee.setFgDirective('b')
         self.escortee.setFlightgroupLeader(self.escortee)
         self.escortee.performDockingOperations(
             self.adjsys.SignificantUnit(), 0)
         self.adjsys.SignificantUnit().setCombatRole(self.role)
         if (self.var_to_set != ''):
             quest.removeQuest(self.you.isPlayerStarship(), self.var_to_set,
                               1)
         VS.terminateMission(1)
Exemple #17
0
 def Join(self):
     plr = VS.getPlayer()
     plrnum = plr.isPlayerStarship()
     if self.CanPay():
         quest.removeQuest(plrnum, self.savestring, 1)
         plr.addCredits(-1 * self.membership)
         for tt in self.tech:
             import universe
             universe.addTechLevel(tt)
         self.MakeMissions()
         return ["success"]
     else:
         return ["failure"]
Exemple #18
0
	def Join(self):
		plr=VS.getPlayer()
		plrnum=plr.isPlayerStarship()
		if self.CanPay():
			quest.removeQuest(plrnum,self.savestring,1)
			plr.addCredits(-1*self.membership)
			for tt in self.tech:
				import universe
				universe.addTechLevel(tt)
			self.MakeMissions()
			return ["success"]
		else:
			return ["failure"]
Exemple #19
0
    def Join(self):
        plr=VS.getPlayer()
        plrnum=plr.isPlayerStarship()
        VS.StopAllSounds()
        if self.CanPay():
            quest.removeQuest(plrnum,self.savestring,1)
            plr.addCredits(-1*self.membership)
            for tt in self.tech:
                universe.addTechLevel(tt)

            Base.Message('Thank you for joining the '+str(self.name)+' Guild! Feel free to accept any of our large quantity of high-paying missions.')
            VS.playSound("guilds/"+str(self.name).lower()+"accept.wav",(0,0,0),(0,0,0))
        else:
            Base.Message('We have checked your account and it apperas that you do not have nough credits to join this guild. Please come back and reconsider our offer when you have recieved more credits.')
            VS.playSound("guilds/"+str(self.name).lower()+"notenoughmoney.wav",(0,0,0),(0,0,0))
Exemple #20
0
 def Win(self, un, terminate):
     VS.IOmessage(0, "plunder mission", self.mplay,
                  "#00ff00Excellent work pilot.")
     VS.IOmessage(
         0, "plunder mission", self.mplay,
         "#00ff00You have been rewarded for your effort as agreed.")
     VS.IOmessage(
         0, "plunder mission", self.mplay,
         "#00ff00Your contribution to the war effort will be remembered.")
     print "do you win?"
     un.addCredits(self.cred)
     if len(self.donevar):
         quest.removeQuest(self.you.isPlayerStarship(), self.donevar, 1)
     if (terminate):
         print "you win plunder mission!"
         VS.terminateMission(1)
 def Execute (self):
     if (VS.GetGameTime()-self.gametime>10):
         self.escortee.setFgDirective('F')
     if self.you.isNull():
         VS.IOmessage (0,"escort",self.mplay,"#ff0000You were to protect your escort. Mission failed.")
         VS.terminateMission(0)
         return
     self.escortee.setFlightgroupLeader(self.you)
     #print 'name: '+self.escortee.getFlightgroupLeader().getName()
     #self.escortee.SetVelocity(self.you.GetVelocity())
     if (self.escortee.isNull()):
         VS.IOmessage (0,"escort",self.mplay,"#ff0000You were to protect your escort. Mission failed.")
         universe.punish(self.you,self.faction,self.difficulty)
         if (self.var_to_set!=''):
             quest.removeQuest (self.you.isPlayerStarship(),self.var_to_set,-1)
         VS.terminateMission(0)
         return   
     if (not self.adjsys.Execute()):
         if (self.arrived):
             self.adjsys.SignificantUnit().setSpeed(0.0)
             self.adjsys.SignificantUnit().SetVelocity((0.0,0.0,0.0))
         return
     if (not self.arrived):
         self.arrived=1
         self.adjsys=go_somewhere_significant (self.you,1,self.distfrombase+15*self.escortee.rSize(),self.difficulty<=1,self.faction)
         self.role = self.adjsys.SignificantUnit().getCombatRole()
         self.adjsys.SignificantUnit().setCombatRole("INERT");
         self.adjsys.Print ("You must escort your starship to the %s","defend","docked around the %s", 0)
     elif (self.you.getDistance(self.escortee)<2000):
         self.you.addCredits(self.creds)
         VS.AdjustRelation(self.you.getFactionName(),self.faction,self.difficulty*.01,1)
         VS.IOmessage (0,"escort",self.mplay,"#00ff00Excellent work! You have completed this mission!")
         self.escortee.setFgDirective('b')
         self.escortee.setFlightgroupLeader(self.escortee)
         self.escortee.performDockingOperations(self.adjsys.SignificantUnit(),0)
         self.adjsys.SignificantUnit().setCombatRole(self.role);
         if (self.var_to_set!=''):
             quest.removeQuest (self.you.isPlayerStarship(),self.var_to_set,1)
         VS.terminateMission(1)
Exemple #22
0
    def Join(self):
        plr = VS.getPlayer()
        plrnum = plr.isPlayerStarship()
        VS.StopAllSounds()
        if self.CanPay():
            quest.removeQuest(plrnum, self.savestring, 1)
            plr.addCredits(-1 * self.membership)
            for tt in self.tech:
                universe.addTechLevel(tt)

            Base.Message(
                'Thank you for joining the ' + str(self.name) +
                ' Guild! Feel free to accept any of our large quantity of high-paying missions.'
            )
            VS.playSound("guilds/" + str(self.name).lower() + "accept.wav",
                         (0, 0, 0), (0, 0, 0))
        else:
            Base.Message(
                'We have checked your account and it apperas that you do not have nough credits to join this guild. Please come back and reconsider our offer when you have recieved more credits.'
            )
            VS.playSound(
                "guilds/" + str(self.name).lower() + "notenoughmoney.wav",
                (0, 0, 0), (0, 0, 0))
Exemple #23
0
def LoadTroyCampaign():
    STAHL_SPRITE  = ("stahl.spr","Talk_to_Captain_Stahl","bases/heads/stahl.spr") #sprite file for the fixer
    StahlMission1 = CampaignClickNode() # Initialize each node
    StahlMission2 = CampaignClickNode() # Initialize each node
    StahlMission3 = CampaignClickNode() # Initialize each node
    StahlMission4 = CampaignClickNode() # Initialize each node
    StahlMission5 = CampaignClickNode() # Initialize each node
    StahlMission6 = CampaignClickNode() # Initialize each node
    StahlMission7 = CampaignClickNode() # Initialize each node
    StahlMission8 = CampaignClickNode() # Initialize each node

    priv=Campaign("troy_campaign") # Name of the save game variable for the entire campaign. Can't contain spaces
    priv.Init(StahlMission1) # the first node.

    mission_desc="Stahl_1:_Deliver_gems_past_pirate_ship"
    MakeCargoMission(priv, # Creates a cargo mission
        STAHL_SPRITE, # Campaign, sprite
        [InSystemCondition("Gemini/Troy","Achilles")], # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy","Helen")], # Where the mission ends. Usually the same as starting point for next fixer.
        None, # Script to be run as you click on the fixer. A common use is to AddCredits() for the previous mission.
        LoadMission(mission_desc,'ambush',(priv.name+"_mission",('Gemini/Troy'),25,'pirates_',1,'talon','Pirate_interceptor',[("Hailing merchant craft!",False),"These gems will never reach Helen!","Stop your engines and dump your cargo!"],['Gemini/Troy'], 'Helen')), # Script to be run to start the mission (usually None if you don't have a script, but ambush is also common.)
        ("Gems",10), # Mission arguments.
        priv.name+"_mission", # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech1, # Dictionary containing what the fixer says.
        None, # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv), # If you lose the mission
        StahlMission2, # If you win the mission. Usually points to the next mission
        StahlMission1) # The current mission node.

    mission_desc="Stahl_2:_Find_pirate_spy"
    MakeMission(priv, # Creates any type of mission
        STAHL_SPRITE, # Campaign, sprite
        [InSystemCondition("Gemini/Troy","Achilles")], # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy","Achilles")], # Where the mission ends.
        AddCredits(2500), # Script to add your credits
        None, # Script to be run to start the mission (usually None if you don't have a script. Do NOT load an ambush mission here.)
        'bounty_leader',(0,0,0,False,0,'merchant_',(),priv.name+"_mission",'Pirate_spy','tarsus.begin',False,'Pirate_spy_escort','',["So you've finally found me.","But I'm afraid your employer will never find YOU again!"]), # Mission arguments.
        priv.name+"_mission", # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech2, # Dictionary containing what the fixer says.
        None, # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv), # If you lose the mission
        StahlMission3, # If you win the mission. Usually points to the next mission
        StahlMission2, # The current mission node.
        mission_desc # Name that describes the mission in flight and in the mission computer.
        )

    mission_desc="Stahl_3:_Defend_Helen"
    MakeMission(priv, # Creates any type of mission
        STAHL_SPRITE, # Campaign, sprite
        [InSystemCondition("Gemini/Troy","Achilles")], # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy","Achilles")], # Where the mission ends.
        AddCredits(8000), # Script to add your credits
        LaunchWingmen("merchant__","gladius",1), # Script to be run to start the mission (usually None if you don't have a script. Do NOT load an ambush mission here.)
        'defend',('pirates_',0,1,5000,123456.789,0,False,True,'merchant',(),priv.name+"_mission",'Pirate_reinforcement','talon','Helen',3), # Mission arguments.
        priv.name+"_mission", # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech3, # Dictionary containing what the fixer says.
        None, # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv), # If you lose the mission
        StahlMission4, # If you win the mission. Usually points to the next mission
        StahlMission3, # The current mission node.
        mission_desc # Name that describes the mission in flight and in the mission computer.
        )

    mission_desc="Stahl_4:_Rescue_freighter_carrying_TarsusMk2"
    MakeMission(priv, # Creates any type of mission
        STAHL_SPRITE, # Campaign, sprite
        [InSystemCondition("Gemini/Troy","Achilles")], # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy","Achilles")], # Where the mission ends.
        AddCredits(12000), # Script to add your credits
        None, # Script to be run to start the mission (usually None if you don't have a script. Do NOT load an ambush mission here.)
        'escort_local',('pirates_',0,1,1,3000,0,True,'merchant__',(),priv.name+"_mission",'Pirate_interceptor','talon','TarsusMk2_freighter','drayman',[("We are to prevent this ship from unloading its cargo. Get out of our way!")]), # Mission arguments.
        priv.name+"_mission", # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech4, # Dictionary containing what the fixer says.
        None, # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv), # If you lose the mission
        StahlMission5, # If you win the mission. Usually points to the next mission
        StahlMission4, # The current mission node.
        mission_desc # Name that describes the mission in flight and in the mission computer.
        )

    mission_desc="Stahl_5:_Find_and_destroy_pirate_commander"
    MakeMission(priv, # Creates any type of mission
        STAHL_SPRITE, # Campaign, sprite
        [InSystemCondition("Gemini/Troy","Achilles")], # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy","Achilles")], # Where the mission ends.
        AddCredits(10000), # Script to add your credits
        LaunchWingmen("confed__","broadsword",1), # Script to be run to start the mission (usually None if you don't have a script. Do NOT load an ambush mission here.)
        'bounty_leader',(0,0,0,False,1,'pirates_',(),priv.name+"_mission",'Pirate_flagship','tarsus',False,'Pirate_escort','talon',["You've made your final mistake, flyboy!","We will blast you away like...","What's that?","Escort, break and distract the confed ship!"]), # Mission arguments.
        priv.name+"_mission", # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech5, # Dictionary containing what the fixer says.
        None, # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv), # If you lose the mission
        StahlMission6, # If you win the mission. Usually points to the next mission
        StahlMission5, # The current mission node.
        mission_desc # Name that describes the mission in flight and in the mission computer.
        )

    mission_desc="Stahl_6:_Deliver_gems_and_seal_the_deal"
    MakeCargoMission(priv, # Creates a cargo mission
        STAHL_SPRITE, # Campaign, sprite
        [InSystemCondition("Gemini/Troy","Achilles")], # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy","Helen")], # Where the mission ends. Usually the same as starting point for next fixer.
        AddCredits(15000), # Script to be run as you click on the fixer. A common use is to AddCredits() for the previous mission.
        LoadMission(mission_desc,'ambush',(priv.name+"_mission",('Gemini/Troy'),25,'pirates_',2,'talon','Pirate_interceptor',[("Enough of this!",False),"You've disturbed our operations for the longest time!","Those ships must not be assembled! Prepare to die!"],['Gemini/Troy'], 'Helen')), # Script to be run to start the mission (usually None if you don't have a script, but ambush is also common.)
        ("Gems",20), # Mission arguments.
        priv.name+"_mission", # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech6, # Dictionary containing what the fixer says.
        None, # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv), # If you lose the mission
        StahlMission7, # If you win the mission. Usually points to the next mission
        StahlMission6) # The current mission node.

    mission_desc="Stahl_7:_One_more_gem_delivery"
    MakeCargoMission(priv, # Creates a cargo mission
        STAHL_SPRITE, # Campaign, sprite
        [InSystemCondition("Gemini/Troy","Achilles")], # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy","Helen")], # Where the mission ends. Usually the same as starting point for next fixer.
        AddCredits(20000,AddTechnology("troy")), # Script to be run as you click on the fixer. A common use is to AddCredits() for the previous mission.
        LoadMission(mission_desc,"directions_mission",(priv.name+"_mission",["Gemini/Troy"],"Helen")), # Script to be run to start the mission (usually None if you don't have a script, but ambush is also common.)
        ("Gems",10), # Mission arguments.
        priv.name+"_mission", # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech7, # Dictionary containing what the fixer says.
        None, # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv), # If you lose the mission
        StahlMission8, # If you win the mission. Usually points to the next mission
        StahlMission7) # The current mission node.

    mission_desc="Stahl:_Yet_another_gem_delivery"
    MakeCargoMission(priv, # Creates a cargo mission
        STAHL_SPRITE, # Campaign, sprite
        [InSystemCondition("Gemini/Troy","Achilles")], # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy","Helen")], # Where the mission ends. Usually the same as starting point for next fixer.
        AddCredits(1200,quest.removeQuest(VS.getPlayer().isPlayerStarship(),priv.name+"_mission",0)), # Script to be run as you click on the fixer. A common use is to AddCredits() for the previous mission.
        LoadMission(mission_desc,"directions_mission",(priv.name+"_mission",["Gemini/Troy"],"Helen")), # Script to be run to start the mission (usually None if you don't have a script, but ambush is also common.)
        ("Gems",10), # Mission arguments.
        priv.name+"_mission", # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech8, # Dictionary containing what the fixer says.
        None, # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv), # If you lose the mission
        StahlMission8, # If you win the mission. Usually points to the next mission
        StahlMission8) # The current mission node.
    return priv #return the newly created campaign back.
import Base
import VS
import Director
import quest
plyr=VS.getPlayer().isPlayerStarship()
if VS.numActiveMissions()<=1:
    if quest.findQuest(plyr,'gemini_sector/gamma_navpoint',1):
        VS.getPlayer().addCredits(10000)
        quest.removeQuest(plyr,'gemini_sector/gamma_navpoint',2)
    Base.Message(_('''Congratulations on your third mission! We have decided to go to the next system.
Based on the data that you have collected, it appears that the other jump point should go
to a system that we have named #55ffffdelta prime#000000. Again, collect info
on six objects there and report back to me with your info.  You will earn 25000 credits.'''))
    VS.LoadMission('patrol/explore_delta_prime.mission')
else:
    Base.Message(_('''Hi. Our records indicate that you are already completing another mission.  Finish
that and then come back to me.'''))
 def SetVar (self,val):
     if (self.var_to_set!=''):
         quest.removeQuest (self.you.isPlayerStarship(),self.var_to_set,val)
import Base
import VS
import Director
import quest
import fixers

plyr = VS.getPlayer().isPlayerStarship()
if quest.findQuest(plyr, "quest_drone", -1):
    Base.Message(
        """There is an alien vessel let loose on confed territory. We are offering 30,000 credits to anyone who manages to take it out. Be warned, however, our scans reveal armor and shielding that we do not know how to penetrate. Good luck and godspeed!"""
    )
elif quest.findQuest(plyr, "quest_drone", 1):
    Base.Message(
        """Thank you! Your effort saved the lives of trillions of civilians. That drone was terrorizing our people and our space force!"""
    )
    if fixers.checkSaveValue(plyr, "quest_drone_cash", 0):
        VS.getPlayer().addCredits(30000)
        quest.removeQuest(plyr, "gemini_sector/quest_drone_cash", 1)
Exemple #27
0
import Base
import VS
import Director
import quest

plyr=VS.getPlayer().isPlayerStarship()
if quest.findQuest(plyr,'gemini_sector/delta_prime_navpoint',1):
    VS.getPlayer().addCredits(20000)
    quest.removeQuest(plyr,'gemini_sector/delta_prime_navpoint',2)
Base.Message("Congratulations on giving us the data on the last sector! We seem to have found a passage deep into Aera territory. Perhaps even the aera haven't completely civilized that sector of space.  Rumor has it that an unknown vessel has emerged from the jump point you discovered.  If you have any scans or information please take them to one of my former associates in the Enigma system.  Thank you for working with me, and I hope you have found it to be a profitable and worthwhile venture.")
import Base
import VS
import Director
import quest
import fixers
plyr=VS.getPlayer().isPlayerStarship()
if quest.findQuest(plyr,'quest_drone',-1):
	Base.Message("""There is an alien vessel let loose on confed territory. We are offering 30,000 credits to anyone who manages to take it out. Be warned, however, our scans reveal armor and shielding that we do not know how to penetrate. Good luck and godspeed!""")
elif quest.findQuest(plyr,'quest_drone',1):
	Base.Message("""Thank you! Your effort saved the lives of trillions of civilians. That drone was terrorizing our people and our space force!""")
	if fixers.checkSaveValue(plyr,'quest_drone_cash',0):
		VS.getPlayer().addCredits(30000)
		quest.removeQuest(plyr,'gemini_sector/quest_drone_cash',1)
Exemple #29
0
def LoadTroyCampaign():
    STAHL_SPRITE = ("stahl.spr", "Talk_to_Captain_Stahl",
                    "bases/heads/stahl.spr")  #sprite file for the fixer
    StahlMission1 = CampaignClickNode()  # Initialize each node
    StahlMission2 = CampaignClickNode()  # Initialize each node
    StahlMission3 = CampaignClickNode()  # Initialize each node
    StahlMission4 = CampaignClickNode()  # Initialize each node
    StahlMission5 = CampaignClickNode()  # Initialize each node
    StahlMission6 = CampaignClickNode()  # Initialize each node
    StahlMission7 = CampaignClickNode()  # Initialize each node
    StahlMission8 = CampaignClickNode()  # Initialize each node

    priv = Campaign(
        "troy_campaign"
    )  # Name of the save game variable for the entire campaign. Can't contain spaces
    priv.Init(StahlMission1)  # the first node.

    mission_desc = "Stahl_1:_Deliver_gems_past_pirate_ship"
    MakeCargoMission(
        priv,  # Creates a cargo mission
        STAHL_SPRITE,  # Campaign, sprite
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where fixer meets you to start the mission
        [
            InSystemCondition("Gemini/Troy", "Helen")
        ],  # Where the mission ends. Usually the same as starting point for next fixer.
        None,  # Script to be run as you click on the fixer. A common use is to AddCredits() for the previous mission.
        LoadMission(
            mission_desc, 'ambush',
            (priv.name + "_mission", ('Gemini/Troy'), 25, 'pirates_', 1,
             'talon', 'Pirate_interceptor', [
                 ("Hailing merchant craft!", False),
                 "These gems will never reach Helen!",
                 "Stop your engines and dump your cargo!"
             ], ['Gemini/Troy'], 'Helen')
        ),  # Script to be run to start the mission (usually None if you don't have a script, but ambush is also common.)
        ("Gems", 10),  # Mission arguments.
        priv.name +
        "_mission",  # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech1,  # Dictionary containing what the fixer says.
        None,  # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv),  # If you lose the mission
        StahlMission2,  # If you win the mission. Usually points to the next mission
        StahlMission1)  # The current mission node.

    mission_desc = "Stahl_2:_Find_pirate_spy"
    MakeMission(
        priv,  # Creates any type of mission
        STAHL_SPRITE,  # Campaign, sprite
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where the mission ends.
        AddCredits(2500),  # Script to add your credits
        None,  # Script to be run to start the mission (usually None if you don't have a script. Do NOT load an ambush mission here.)
        'bounty_leader',
        (0, 0, 0, False, 0, 'merchant_', (), priv.name + "_mission",
         'Pirate_spy', 'tarsus.begin', False, 'Pirate_spy_escort', '', [
             "So you've finally found me.",
             "But I'm afraid your employer will never find YOU again!"
         ]),  # Mission arguments.
        priv.name +
        "_mission",  # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech2,  # Dictionary containing what the fixer says.
        None,  # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv),  # If you lose the mission
        StahlMission3,  # If you win the mission. Usually points to the next mission
        StahlMission2,  # The current mission node.
        mission_desc  # Name that describes the mission in flight and in the mission computer.
    )

    mission_desc = "Stahl_3:_Defend_Helen"
    MakeMission(
        priv,  # Creates any type of mission
        STAHL_SPRITE,  # Campaign, sprite
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where the mission ends.
        AddCredits(8000),  # Script to add your credits
        LaunchWingmen(
            "merchant__", "gladius", 1
        ),  # Script to be run to start the mission (usually None if you don't have a script. Do NOT load an ambush mission here.)
        'defend',
        ('pirates_', 0, 1, 5000, 123456.789, 0, False, True, 'merchant',
         (), priv.name + "_mission", 'Pirate_reinforcement', 'talon', 'Helen',
         3),  # Mission arguments.
        priv.name +
        "_mission",  # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech3,  # Dictionary containing what the fixer says.
        None,  # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv),  # If you lose the mission
        StahlMission4,  # If you win the mission. Usually points to the next mission
        StahlMission3,  # The current mission node.
        mission_desc  # Name that describes the mission in flight and in the mission computer.
    )

    mission_desc = "Stahl_4:_Rescue_freighter_carrying_TarsusMk2"
    MakeMission(
        priv,  # Creates any type of mission
        STAHL_SPRITE,  # Campaign, sprite
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where the mission ends.
        AddCredits(12000),  # Script to add your credits
        None,  # Script to be run to start the mission (usually None if you don't have a script. Do NOT load an ambush mission here.)
        'escort_local',
        ('pirates_', 0, 1, 1, 3000, 0, True, 'merchant__',
         (), priv.name + "_mission", 'Pirate_interceptor', 'talon',
         'TarsusMk2_freighter', 'drayman',
         [("We are to prevent this ship from unloading its cargo. Get out of our way!"
           )]),  # Mission arguments.
        priv.name +
        "_mission",  # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech4,  # Dictionary containing what the fixer says.
        None,  # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv),  # If you lose the mission
        StahlMission5,  # If you win the mission. Usually points to the next mission
        StahlMission4,  # The current mission node.
        mission_desc  # Name that describes the mission in flight and in the mission computer.
    )

    mission_desc = "Stahl_5:_Find_and_destroy_pirate_commander"
    MakeMission(
        priv,  # Creates any type of mission
        STAHL_SPRITE,  # Campaign, sprite
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where fixer meets you to start the mission
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where the mission ends.
        AddCredits(10000),  # Script to add your credits
        LaunchWingmen(
            "confed__", "broadsword", 1
        ),  # Script to be run to start the mission (usually None if you don't have a script. Do NOT load an ambush mission here.)
        'bounty_leader',
        (0, 0, 0, False, 1, 'pirates_', (), priv.name + "_mission",
         'Pirate_flagship', 'tarsus', False, 'Pirate_escort', 'talon', [
             "You've made your final mistake, flyboy!",
             "We will blast you away like...", "What's that?",
             "Escort, break and distract the confed ship!"
         ]),  # Mission arguments.
        priv.name +
        "_mission",  # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech5,  # Dictionary containing what the fixer says.
        None,  # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv),  # If you lose the mission
        StahlMission6,  # If you win the mission. Usually points to the next mission
        StahlMission5,  # The current mission node.
        mission_desc  # Name that describes the mission in flight and in the mission computer.
    )

    mission_desc = "Stahl_6:_Deliver_gems_and_seal_the_deal"
    MakeCargoMission(
        priv,  # Creates a cargo mission
        STAHL_SPRITE,  # Campaign, sprite
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where fixer meets you to start the mission
        [
            InSystemCondition("Gemini/Troy", "Helen")
        ],  # Where the mission ends. Usually the same as starting point for next fixer.
        AddCredits(
            15000
        ),  # Script to be run as you click on the fixer. A common use is to AddCredits() for the previous mission.
        LoadMission(
            mission_desc, 'ambush',
            (priv.name + "_mission", ('Gemini/Troy'), 25, 'pirates_', 2,
             'talon', 'Pirate_interceptor', [
                 ("Enough of this!", False),
                 "You've disturbed our operations for the longest time!",
                 "Those ships must not be assembled! Prepare to die!"
             ], ['Gemini/Troy'], 'Helen')
        ),  # Script to be run to start the mission (usually None if you don't have a script, but ambush is also common.)
        ("Gems", 20),  # Mission arguments.
        priv.name +
        "_mission",  # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech6,  # Dictionary containing what the fixer says.
        None,  # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv),  # If you lose the mission
        StahlMission7,  # If you win the mission. Usually points to the next mission
        StahlMission6)  # The current mission node.

    mission_desc = "Stahl_7:_One_more_gem_delivery"
    MakeCargoMission(
        priv,  # Creates a cargo mission
        STAHL_SPRITE,  # Campaign, sprite
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where fixer meets you to start the mission
        [
            InSystemCondition("Gemini/Troy", "Helen")
        ],  # Where the mission ends. Usually the same as starting point for next fixer.
        AddCredits(
            20000, AddTechnology("troy")
        ),  # Script to be run as you click on the fixer. A common use is to AddCredits() for the previous mission.
        LoadMission(
            mission_desc, "directions_mission",
            (priv.name + "_mission", ["Gemini/Troy"], "Helen")
        ),  # Script to be run to start the mission (usually None if you don't have a script, but ambush is also common.)
        ("Gems", 10),  # Mission arguments.
        priv.name +
        "_mission",  # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech7,  # Dictionary containing what the fixer says.
        None,  # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv),  # If you lose the mission
        StahlMission8,  # If you win the mission. Usually points to the next mission
        StahlMission7)  # The current mission node.

    mission_desc = "Stahl:_Yet_another_gem_delivery"
    MakeCargoMission(
        priv,  # Creates a cargo mission
        STAHL_SPRITE,  # Campaign, sprite
        [InSystemCondition("Gemini/Troy", "Achilles")
         ],  # Where fixer meets you to start the mission
        [
            InSystemCondition("Gemini/Troy", "Helen")
        ],  # Where the mission ends. Usually the same as starting point for next fixer.
        AddCredits(
            1200,
            quest.removeQuest(VS.getPlayer().isPlayerStarship(),
                              priv.name + "_mission", 0)
        ),  # Script to be run as you click on the fixer. A common use is to AddCredits() for the previous mission.
        LoadMission(
            mission_desc, "directions_mission",
            (priv.name + "_mission", ["Gemini/Troy"], "Helen")
        ),  # Script to be run to start the mission (usually None if you don't have a script, but ambush is also common.)
        ("Gems", 10),  # Mission arguments.
        priv.name +
        "_mission",  # Script to be set on completion. -1=Failure, 0=Not Accepted, 1=Succeed, 2=In progress
        stahlspeech8,  # Dictionary containing what the fixer says.
        None,  # If you reject the mission twice. "None" means that he continues asking you forever until you accept
        CampaignEndNode(priv),  # If you lose the mission
        StahlMission8,  # If you win the mission. Usually points to the next mission
        StahlMission8)  # The current mission node.
    return priv  #return the newly created campaign back.
Exemple #30
0
import Base
import VS
import Director
import quest
import fixers
plyr = VS.getPlayer().isPlayerStarship()
if quest.findQuest(plyr, 'quest_drone', -1):
    Base.Message(
        """There is an alien vessel let loose on confed territory. We are offering 30,000 credits to anyone who manages to take it out. Be warned, however, our scans reveal armor and shielding that we do not know how to penetrate. Good luck and godspeed!"""
    )
elif quest.findQuest(plyr, 'quest_drone', 1):
    Base.Message(
        """Thank you! Your effort saved the lives of trillions of civilians. That drone was terrorizing our people and our space force!"""
    )
    if fixers.checkSaveValue(plyr, 'quest_drone_cash', 0):
        VS.getPlayer().addCredits(30000)
        quest.removeQuest(plyr, 'gemini_sector/quest_drone_cash', 1)
Exemple #31
0
 def FailMission (self):
     self.you.addCredits (self.cred)
     if self.donevar!='':
         quest.removeQuest(self.you.isPlayerStarship(),self.donevar,-1)
     VS.IOmessage (0,"patrol",self.mplay,"Mission a failure!")
     VS.terminateMission(0)
Exemple #32
0
 def SetVar(self, val):
     if (self.var_to_set != ''):
         quest.removeQuest(self.cp, self.var_to_set, val)
Exemple #33
0
import Base
import VS
import Director
import quest
plyr = VS.getPlayer().isPlayerStarship()
if VS.numActiveMissions() <= 1:
    if quest.findQuest(plyr, 'gemini_sector/delta_navpoint', 1):
        VS.getPlayer().addCredits(5000)
        quest.removeQuest(plyr, 'gemini_sector/delta_navpoint', 2)
    Base.Message(
        '''Congratulations on your first mission! We have decided to go to the next system.
Based on the data that you have collected, it appears that the other jump point should go
to a system that we have named #55ffffbeta#000000. Again, collect info
on six objects there and report back to me with your info.  You will earn 10000 credits.'''
    )
    VS.LoadMission('patrol/explore_beta.mission')
else:
    Base.Message(
        '''Hi. Our records indicate that you are already completing another mission.  Finish
that and then come back to me.''')
Exemple #34
0
 def SetVar (self,val):
     if (self.var_to_set!=''):
         quest.removeQuest (self.cp,self.var_to_set,val)
Exemple #35
0
 def FailMission(self):
     self.you.addCredits(self.cred)
     if self.donevar != '':
         quest.removeQuest(self.you.isPlayerStarship(), self.donevar, -1)
     VS.IOmessage(0, "patrol", self.mplay, "Mission a failure!")
     VS.terminateMission(0)
Exemple #36
0
def setSaveValue (playernum,name,value):
    quest.removeQuest(playernum,name,value);
Exemple #37
0
 def SetVar(self, val):
     if (self.var_to_set != ''):
         quest.removeQuest(self.you.isPlayerStarship(), self.var_to_set,
                           val)