示例#1
0
    def Execute(self):
        if self.checkDistances() and quest.checkSaveValue(self.playa.isPlayerStarship(),TRIGGER_SAVE,DEFAULT_VALUE):
            VS.IOmessage (0,TRIGGER_MESSAGE[0],"all",TRIGGER_MESSAGE[1])
            Director.eraseSaveData(self.playa.isPlayerStarship(),TRIGGER_SAVE,0)
            Director.pushSaveData(self.playa.isPlayerStarship(),TRIGGER_SAVE,TRIGGER_VALUE)
        elif quest.checkSaveValue(self.playa.isPlayerStarship(),TRIGGER_SAVE,DONE_VALUE):
            Director.eraseSaveData(self.playa.isPlayerStarship(),TRIGGER_SAVE,0)
            fixers.eraseCFixer(self.playa.isPlayerStarship(), FIXER_NAME)
            self.removeQuest()
#You only want to remove the quest once the fixer has finished doing his thing :-)
            return 0
        return 1
def evaluateCondition(condition):
    """Takes a string representing the condition, and returns whether it is
    met or not."""
    if type(condition) != str:
        raise TypeError("The condition is not a valid type.")
    elif condition == str():
        return 1
    elif condition[0] == '#':
        tempd = dict()
        exec condition[1:] in tempd
        print "Custom condition code, returning: " + str(tempd["result"])
        return tempd["result"]
    else:
        con = condition.split('#')
        print "Checking \'%s : %s\'"%(con[0],con[1])
        print "Returning: " + str(checkSaveValue(VS.getCurrentPlayer(),con[0],int(con[1])))
        return checkSaveValue(VS.getCurrentPlayer(),con[0],int(con[1]))
示例#3
0
def evaluateCondition(condition):
    """Takes a string representing the condition, and returns whether it is
    met or not."""
    if type(condition) != str:
        raise TypeError("The condition is not a valid type.")
    elif condition == str():
        return 1
    elif condition[0] == '#':
        tempd = dict()
        exec condition[1:] in tempd
        print "Custom condition code, returning: " + str(tempd["result"])
        return tempd["result"]
    else:
        con = condition.split('#')
        print "Checking \'%s : %s\'" % (con[0], con[1])
        print "Returning: " + str(
            checkSaveValue(VS.getCurrentPlayer(), con[0], int(con[1])))
        return checkSaveValue(VS.getCurrentPlayer(), con[0], int(con[1]))
示例#4
0
def okayDrawJenek():
    """Checks if the player is docked to the right planet, and the fixer is still \'around\'."""
    if not quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),TRIGGER_SAVE,DONE_VALUE):
        iter = VS.getUnitList()
        while iter.notDone():
            if iter.current().isPlanet() and (VS.getPlayer().isDocked(iter.current()) or iter.current().isDocked(VS.getPlayer())):
#Not sure why both have to be checked, it seems to second gives a more consistantly correct response
                return iter.current().getName() == 'Wiley'
            iter.advance()
    return 0
    def Execute (self):
	global drone
        playa=VS.getPlayer()
        if (playa.isNull()):
            return 1
        if not quest.checkSaveValue(playa.isPlayerStarship(),'privateer_drone_active',1):
            return 1
        if playa!=self.savedplaya:
            self.setup()
        global derelict
        if VS.getSystemFile() == "Gemini/Delta_Prime":
            if derelict.isNull():
                generateBase()
        if (not self.stage):
            if (derelict and (VS.getSystemFile()==self.sysfile)):
                if (derelict.getSignificantDistance(playa)<1000):
                    print "launch dron"
                    self.launchNewDrone()
            else:
                print "launch drone"
                self.launchNewDrone()
        else:
            if (drone.isNull()):
                print "no drone"
                self.removeQuest();
                return 0
            sf = VS.getSystemFile();
            if (self.sysfile!=sf and sf!='Gemini/Nitir' and not self.jumping):
                drone.JumpTo(sf);
                self.sysfile=sf
#                self.setDroneNear(playa)
                self.lastdist=10000
                self.jumping=1
                print "jumping"
            else:
                if (self.jumping):
                    if (playa.getUnitSystemFile()==drone.getUnitSystemFile()):
                        drone.SetTarget (playa)
                        self.jumping=0
                        self.setDroneNear(playa)

        return 1
def GetBartenderText(str):
    global speaklimit
    global speaktimes
    speaktimes+=1
    if (speaktimes>speaklimit):
        return GetOutOfInfo(str)
    txt = tender.get (str)
    rf_campaign_txt=()
    import VS
    cp=VS.getCurrentPlayer()
    import quest
    if (quest.getQuestLength(cp,"rf_campaign")):
        tmp=tender.get(str+"_rf")
        if (tmp):
            rf_campaign_txt=tmp
    if (quest.checkSaveValue(cp,"menesch_dead",1.0)):
        rf_campaign_txt=rf_campaign_txt+("Did you hear the news? Governor Menesch is dead! They say he was making deals between the Retros and Kilrathi. Just a little while ago, he got taken out by some privateer. I bet that privateer?s got a lot of bounty money coming.","It looks like the Confeds have just about had it here in Gemini. Things are getting way too dangerous. I?ve already started packing my bags. I wonder where I'll go? Maybe the Magellan sector. I just hope I can find some kind of transportation.")
    if (txt):
        return txt+rf_campaign_txt
    return GetDefaultBartenderText()+rf_campaign_txt
示例#7
0
def GetBartenderText(str):
    global speaklimit
    global speaktimes
    speaktimes+=1
    if (speaktimes>speaklimit):
        return GetOutOfInfo(str)
    txt = tender.get (str)
    rf_campaign_txt=()
    cp=VS.getCurrentPlayer()
    plrun=VS.getPlayerX(cp)
    plr=plrun.isPlayerStarship()

    import quest
    if (quest.getQuestLength(cp,"rf_campaign")):
        tmp=tender.get(str+"_rf")
        if (tmp):
            rf_campaign_txt=tmp
    if (quest.checkSaveValue(cp,"menesch_dead",1.0)):
        rf_campaign_txt=rf_campaign_txt+("Did you hear the news? Governor Menesch is dead! They say he was making deals between the Retros and Kilrathi. Just a little while ago, he got taken out by some privateer. I bet that privateer's got a lot of bounty money coming.","It looks like the Confeds have just about had it here in Gemini. Things are getting way too dangerous. I've already started packing my bags. I wonder where I'll go? Maybe the Magellan sector. I just hope I can find some kind of transportation.")
    if (txt):
        return txt+rf_campaign_txt
    return GetDefaultBartenderText()+rf_campaign_txt
示例#8
0
 def Execute(self):
     global drone
     playa = VS.getPlayer()
     if (playa.isNull()):
         return 1
     if not quest.checkSaveValue(playa.isPlayerStarship(),
                                 "privateer_drone_active", 1):
         return 1
     global derelict
     if VS.getSystemFile() == "Gemini/Delta_Prime":
         if derelict.isNull():
             generateBase()
     if (not self.stage):
         if (derelict and (VS.getSystemFile() == self.sysfile)):
             if (derelict.getSignificantDistance(playa) < 200):
                 self.launchNewDrone()
         else:
             self.launchNewDrone()
     else:
         if (drone.isNull()):
             self.removeQuest()
             return 0
         sf = VS.getSystemFile()
         if (self.sysfile != sf and not self.jumping):
             drone.JumpTo(sf)
             self.sysfile = sf
             #self.setDroneNear(playa)
             self.lastdist = 10000
             self.jumping = 1
             debug.info("jumping")
         else:
             if (self.jumping):
                 if (playa.getUnitSystemFile() == drone.getUnitSystemFile()
                     ):
                     drone.SetTarget(playa)
                     self.jumping = 0
                     self.setDroneNear(playa)
     return 1
示例#9
0
 def Execute (self):
     global drone
     playa = VS.getPlayer()
     if (playa.isNull()):
         return 1
     if not quest.checkSaveValue(playa.isPlayerStarship(), "privateer_drone_active", 1):
         return 1
     global derelict
     if VS.getSystemFile() == "Gemini/Delta_Prime":
         if derelict.isNull():
             generateBase()
     if (not self.stage):
         if (derelict and (VS.getSystemFile() == self.sysfile)):
             if (derelict.getSignificantDistance(playa) < 200):
                 self.launchNewDrone()
         else:
             self.launchNewDrone()
     else:
         if (drone.isNull()):
             self.removeQuest()
             return 0
         sf = VS.getSystemFile()
         if (self.sysfile != sf and not self.jumping):
             drone.JumpTo(sf)
             self.sysfile = sf
             #self.setDroneNear(playa)
             self.lastdist = 10000
             self.jumping = 1
             debug.info("jumping")
         else:
             if (self.jumping):
                 if (playa.getUnitSystemFile() == drone.getUnitSystemFile()):
                     drone.SetTarget(playa)
                     self.jumping = 0
                     self.setDroneNear(playa)
     return 1
示例#10
0
 def HasJoined(self):
     if (self.membership <= 0):
         return True
     else:
         plr = VS.getPlayer().isPlayerStarship()
         return quest.checkSaveValue(plr, self.savestring)
示例#11
0
Base.Texture (room, 'sh0', 'bases/perry/Perry_Concourse_sh0'+time_of_day+'.spr', 0, 0)
Base.Texture (room, 'background', 'bases/perry/Perry_Concourse'+time_of_day+'.spr', 0, 0)
Base.Texture (room, 'car', 'bases/perry/Perry_Concourse_car'+time_of_day+'.spr', 0, 0)

# add links between pad and concourse
Base.Link (room0, 'my_link_id', -1, -1, 2, 0.2, 'Main_Concourse', room1)
Base.Link (room0, 'my_link_id', -0.415, -0.13, 0.2875, 0.383333, 'Main_Concourse', room1)
Base.Link (room1, 'my_link_id', -0.98, -0.923333, 0.27, 0.856667, 'Landing_Pad', room0)

# Create the Quine 4000 screens
import computer_lib
room_personal_computer = computer_lib.MakePersonalComputer(room0, room1)

# add Admiral Terrel's office
import campaign_lib
terrell_entry=(not quest.checkSaveValue(VS.getCurrentPlayer(),"terrell_no_entry",1.0)) and len(campaign_lib.getActiveCampaignNodes(room1))
if terrell_entry:
	room = Base.Room ('Admiral_Terrells_Office')
	room2 = room
	Base.Texture (room, 'background', 'bases/perry/Perry_AdmTerrelOffice'+time_of_day+'.spr', 0.582, -0.2716)
	Base.Texture (room, 'ltt', 'bases/perry/Perry_AdmTerrelOffice_ltt'+time_of_day+'.spr', -0.5053125, -0.1908)
	Base.Texture (room, 'trl', 'bases/perry/Perry_AdmTerrelOffice_trl'+time_of_day+'.spr', 0.5616875, -0.162)
	Base.Link (room1, 'my_link_id', 0.0625, -0.22, 0.0975, 0.12, 'Admiral_Terrell\'s_Office', room2)
	Base.Link (room2, 'my_link_id', -0.9675, -0.98, 0.3975, 0.48, 'Main_Concourse', room1)
	Base.Python (room2, 'my_link_id', 0.48, -0.24375, 0.1953125, 0.1953125, 'Talk_To_Admiral_Terrell', '#\nimport campaign_lib\nimport campaign_lib\ncampaign_lib.AddConversationStoppingSprite("Admiral_Terrell","bases/heads/terrell.spr",(.582,-.2716),(3.104,2.4832),"Return_To_Office").__call__('+str(room2)+',None)\ncampaign_lib.clickFixer('+str(room2)+')\n',False)
else:
	room = Base.Room ('Exit_Admirals_Office')
	room2 = room
	# No access to Admeral Ofise
	Base.Texture(room2, 'goodin','bases/heads/goodindoor.spr',.582,-.2716)
	Base.LinkPython (room1, 'my_link_id', '''#
# add landing pad
room_landing_pad = Base.Room ('')
Base.Texture (room_landing_pad, 'sta00', 'bases/derelict/derelict'+time_of_day+'_sta00.spr', 0, 0)
Base.Texture (room_landing_pad, 'background', 'bases/derelict/derelict'+time_of_day+'.spr', 0, 0)

PlayerShip.InitPlayerShips()
PlayerShip.AddPlayerShips('derelict',room_landing_pad,'landship')

Base.LaunchPython (room_landing_pad, 'my_launch_id', 'bases/launch_hooks.py', -0.53, -0.423333, 0.35, 0.276667, 'Launch')

# add main concourse
room_concourse = Base.Room ('')
Base.Texture (room_concourse, 'sta00', 'bases/derelict/derelict'+time_of_day+'_sta00.spr', 0, 0)
Base.Texture (room_concourse, 'background', 'bases/derelict/derelictship_noweapon'+time_of_day+'.spr', 0, 0)
if not quest.checkSaveValue(VS.getCurrentPlayer(),'have_the_gun'):
	Base.Texture (room_concourse, 'weapon', 'bases/derelict/derelict'+time_of_day+'_sta00.spr', 0, 0)
	Base.Texture (room_concourse, 'weapon', 'bases/derelict/derelictship_weapon'+time_of_day+'.spr', 0, 0)
	Base.Python (room_concourse, 'weapon', -0.605, -0.78, 0.2975, 0.423333, 'Remove Derelict Weapon', '''#
import Base
import VS
plr=VS.getPlayer()
if plr:
	if not quest.checkSaveValue(VS.getCurrentPlayer(),'have_the_gun'):
		if plr.upgrade('steltek_gun',0,0,True,True):
			quest.removeQuest(VS.getCurrentPlayer(),'have_the_gun',1)
			Base.EraseObj('''+str(room_concourse)+''', 'weapon')
			Base.EraseLink('''+str(room_concourse)+''', 'weapon')
	else:
		Base.EraseObj('''+str(room_concourse)+''', 'weapon')
		Base.EraseLink('''+str(room_concourse)+''', 'weapon')
示例#13
0
time_of_day = ''
bar = -1
weap = -1
room0 = -1
dynamic_mission.CreateMissions()
import pleasure_land
room0 = pleasure_land.MakePleasureAgriculturalLanding(time_of_day)

room = Base.Room('Temple')
room1 = room
Base.Link(room0, 'my_link_id', 0.6025, -0.463333, 0.29, 0.633333,
          'Holy_Temple', room1)
import quest
done_comp = False
if quest.checkSaveValue(VS.getCurrentPlayer(), "jones_dead", 1.0):
    Base.Texture(room, 'background', 'bases/church_of_man/GaeaDead.spr', 0, 0)
    Base.Texture(room, 'smk', 'bases/church_of_man/smk.spr', 0.6, -0.25)
    plist = VS.musicAddList('church_of_man_dead.m3u')
    Base.Comp(room1, 'my_comp_id', -0.155, 0.576667, 0.425, 0.243333,
              'Save/Load', 'Info ')
    done_comp = True
else:
    Base.Texture(room, 'background', 'bases/church_of_man/Gaea.spr', 0, 0)
    Base.Texture(room, 'fr0', 'bases/church_of_man/fr0.spr', -0.61875,
                 0.521484375)
    Base.Texture(room, 'fr1', 'bases/church_of_man/fr1.spr', 0.6875, 0.6875)
    Base.Texture(room, 'eye', 'bases/church_of_man/eye.spr', 0, 0.560546875)
    Base.Texture(room, 'lgo', 'bases/church_of_man/lgo.spr', -0.075,
                 -0.357421875)
    Base.Texture(room, 'sn0', 'bases/church_of_man/sn0.spr', -0.6, -0.50390625)
示例#14
0
 def terminate(self):
     if (quest.checkSaveValue(self.cp, self.var, 0)
             or quest.checkSaveValue(self.cp, self.var, -1)):
         ambush.ambush.terminate(self)
 def checkCargo(self, un):
     import quest
     return not (quest.checkSaveValue(self.cp, self.var, 0)
                 or quest.checkSaveValue(self.cp, self.var, 1)
                 or quest.checkSaveValue(self.cp, self.var, -1)
                 or self.getCargo(un) != self.savedCargo)
示例#16
0
 def SuccessMission (self):  
     if (quest.checkSaveValue(self.cp,self.var,0) or quest.checkSaveValue(self.cp,self.var,-1) or quest.checkSaveValue(self.cp,self.var,1)):
         VS.getPlayerX(self.cp).addCredits (self.cred)
         VS.terminateMission(0)
示例#17
0
 def terminate(self):
     if (quest.checkSaveValue(self.cp,self.var,0) or quest.checkSaveValue(self.cp,self.var,-1)):
         ambush.ambush.terminate(self)
示例#18
0
 def SuccessMission(self):
     if (quest.checkSaveValue(self.cp, self.var, 0)
             or quest.checkSaveValue(self.cp, self.var, -1)
             or quest.checkSaveValue(self.cp, self.var, 1)):
         VS.getPlayerX(self.cp).addCredits(self.cred)
         VS.terminateMission(0)
示例#19
0
def MakeUniversity(time_of_day='_day'):
    bar = -1
    weap = -1
    room0 = -1

    campaign_lib.masterson_extraspeech = ""
    plist = VS.musicAddList('oxford.m3u')
    VS.musicPlayList(plist)
    dynamic_mission.CreateMissions()
    room = Base.Room('Landing_Pad')
    room0 = room
    Base.Texture(room, 'background', 'bases/university/Landing_Pad.spr', 0.0,
                 0.0)
    Base.Texture(room, 'tnl00000', 'bases/university/Landing_Pad_tnl00000.spr',
                 0.6, 0.375)
    Base.Ship(room, 'my_ship', (0.2, -0.375, 5.75), (0.05, 0.988746, 0.141),
              (-0.7, 0.141, -0.7))

    room = Base.Room('Landing_Pad')
    room0train = room
    Base.Texture(room, 'background', 'bases/university/Landing_Pad.spr', 0.0,
                 0.0)
    Base.Ship(room, 'my_ship', (0.2, -0.375, 5.75), (0.05, 0.988746, 0.141),
              (-0.7, 0.141, -0.7))

    room = Base.Room('Campus_Quad')
    room1 = room
    Base.Texture(room, 'background', 'bases/university/Main_Quad.spr', 0.0,
                 0.0)
    Base.Texture(room, 'tnc', 'bases/university/Main_Quad_tnc.spr', -0.8,
                 -0.943359375)
    Base.Texture(room, 'wk0', 'bases/university/Main_Quad_wk0.spr', 0.3125,
                 -0.015625)
    Base.Texture(room, 'brd', 'bases/university/Main_Quad_brd.spr', 0.13125,
                 -0.38671875)
    room2 = -1
    room = Base.Room('Library_Stacks')
    room2 = room
    denied = False
    if quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),
                            "access_to_library", 2):
        denied = True
    the_campaigns = campaign_lib.getActiveCampaignNodes(room2)
    if quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),
                            "access_to_library", 2):
        denied = True
    if quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),
                            "access_to_library", 1):  # access granted
        Base.Texture(room, 'background', 'bases/university/Library_Main.spr',
                     0, 0)
        room = Base.Room('Computer_Console')
        room3 = room
        Base.Texture(room, 'background', 'bases/university/ComputerMain.spr',
                     0, 0)

        room = Base.Room('Library_Terminal')
        room4 = room
        Base.Texture(room, 'background',
                     'bases/university/ComputerAnalysing.spr', 0, 0)
        room = Base.Room('Library_Terminal')
        room5 = room
        Base.Texture(room, 'background', 'bases/university/Monkhouse.spr', 0,
                     0)
        Base.Link(room2, 'my_link_id', -0.9875, -0.743333, 0.11, 1.71,
                  'Campus_Quad', room1)
        Base.Link(room2, 'my_link_id', -0.155, -0.913333, 0.405, 0.286667,
                  'Library_Console', room3)
        Base.Link(room3, 'my_link_id', 0.105, -0.756667, 0.77, 0.8,
                  'Computer_Analysis', room4)
        Base.Link(room3, 'my_link_id', -0.9725, -0.97, 0.5325, 1.95,
                  'Library_Stacks', room2)
        Base.Link(room4, 'my_link_id', 0.1025, -0.75, 0.77, 0.783333,
                  'Read_Computer_Screen', room5)
        Base.Link(room4, 'my_link_id', -0.9775, -0.96, 0.3, 1.95333,
                  'Library_Stacks', room2)
        Base.Link(room5, 'my_link_id', -1, -1, 2, 2, 'Turn_Off_Computer',
                  room3)
        if denied:
            Base.Texture(room2, 'masterson_access',
                         'bases/university/masterson.spr', 0, 0)
            ##campaign_lib.clickFixer(room2)
            Base.Python(
                room2, 'masterson_access', -1, -1, 2, 2, 'Enter_Library',
                "#\nimport Base\nBase.EraseLink(" + str(room2) +
                ", 'masterson_access')\nBase.EraseObj(" + str(room2) +
                ", 'masterson_access')\n", False)
            campaign_lib.masterson_extraspeech = "barspeech/campaign/mastersonfinal.wav"
    else:
        Base.Texture(room, 'background', 'bases/university/masterson.spr', 0,
                     0)
        ##campaign_lib.clickFixer(room2)
        if len(the_campaigns) and denied:  # mission in progress.
            Base.LinkPython(
                room2, 'masterson_return',
                '#\nimport campaign_lib\n##campaign_lib.clickFixer(' +
                str(room2) + ')\n', -1, -1, 2, 2, 'Exit_Library', room1)
        else:  # Access denied. Come back after Lynch missions
            campaign_lib.displayText(room2, [
                ("Masterson", "Excuse me, where do you think you're going?"),
                ("Burrows",
                 "I have some personal research I need to conduct."),
                ("Masterson",
                 "I'm sorry, sir, but access to the Oxford library files is restricted to students."
                 ), ("Burrows", "Look, couldn't I just buy a library card?"),
                ("Masterson", "I'm afraid not. Good day to you, sir.")
            ])
            campaign_lib.masterson_extraspeech = "campaign/onlyforstudents-priv.ogg"
            Base.LinkPython(room2, 'masterson_return',
                            '#\nimport VS\nVS.StopAllSounds()\n', -1, -1, 2, 2,
                            'Exit_Library', room1)

    Base.LaunchPython(room0, 'my_launch_id', 'bases/launch_music.py', -0.0075,
                      -0.59, 0.4725, 0.31, 'Launch')
    Base.LinkPython(
        room0, 'my_link_id', '''#
import Base
Base.Texture (''' + str(room0train) +
        ''', "tnl", "bases/university/Landing_Pad_tnl.spr", 0.6, 0.375) #0.582, 0.3492)
Base.RunScript(''' + str(room0train) + ''', "trainleave", """#
import Base
Base.SetCurRoom(''' + str(room1) + ''')
Base.EraseObj(''' + str(room0train) + ''',"tnl")
Base.EraseObj(''' + str(room0train) + ''',"trainleave")
""", 3.2)
''', 0.4225, -0.103333, 0.5425, 0.466667, 'Train_To_University_Campus',
        room0train)
    Base.Link(room1, 'my_link_id', -0.9675, -0.97, 0.595, 0.923333,
              'Train_To_Landing_Pad', room0)
    Base.Comp(room1, 'my_comp_id', -0.5925, 0.293333, 0.09, 0.213333,
              'Mission_Computer', 'Missions News Info ')
    import weapons_lib
    weap = weapons_lib.MakeWeapon(room1, time_of_day,
                                  "bases/university/Oxford_Shipdealer")
    Base.Link(room1, 'weapon_room', 0.695, -0.88, 0.2875, 0.913333,
              'Ship_Dealer', weap)
    import commodity_lib
    commodity = commodity_lib.MakeCommodity(room1, time_of_day)
    Base.Link(room1, 'commodity', 0.09, -0.973333, 0.5275, 0.34,
              'Commodity_Exchange', commodity)
    import bar_lib
    bar = bar_lib.MakeBar(room1, time_of_day, "oxford", "bases/university/Bar",
                          False, False, None, False, [], "oxford")
    Base.Link(room1, 'bar', -0.9725, 0.0966667, 0.2325, 0.666667, 'Campus_Bar',
              bar)
    import mercenary_guild
    merchant = mercenary_guild.MakeMercenaryGuild(room1, time_of_day)
    Base.Link(room1, 'mercenary', -0.53, 0.516667, 0.2, 0.456667,
              'Mercenary_Guild', merchant)
    import merchant_guild
    merchant = merchant_guild.MakeMerchantGuild(room1, time_of_day)
    Base.Link(room1, 'merchant', -0.2625, 0.593333, 0.1375, 0.39,
              'Merchant_Guild', merchant)
    Base.LinkPython(
        room1, 'my_link_id',
        '#\nimport campaign_lib\ncampaign_lib.clickFixer(' + str(room2) +
        ')\nif campaign_lib.masterson_extraspeech!="":\n\timport VS\n\tVS.playSound(campaign_lib.masterson_extraspeech,(0.,0.,0.),(0.,0.,0.,))\n\tcampaign_lib.masterson_extraspeech=""\n',
        0.34, 0.45, 0.6375, 0.513333, 'Library', room2)
    #Base.Link (room1, 'my_link_id', 0.36, 0.696667, 0.0625, 0.0966667, 'Talk_To_Masterson', room5)
    return room1
示例#20
0
VS.musicPlayList(plist)
dynamic_mission.CreateMissions()
room = Base.Room('')
room0 = room
Base.Texture(room, 'background',
             'bases/derelict/derelict' + time_of_day + '.spr', 0, 0)
Base.Ship(room, 'my_ship', (-0.525, -0.341667, 6), (0, 1, 0), (0, -.2, -.93))
Base.Comp(room0, 'my_comp_id', -0.9725, -0.986667, 0.285, 0.553333, 'Save',
          'Info ')

room = Base.Room('')
room1 = room
Base.Texture(room, 'background',
             'bases/derelict/derelictship_noweapon' + time_of_day + '.spr', 0,
             0)
if not quest.checkSaveValue(VS.getCurrentPlayer(), 'have_the_gun'):
    Base.Texture(room1, 'weapon',
                 'bases/derelict/derelictship_weapon' + time_of_day + '.spr',
                 0, 0)
    Base.Python(
        room1, 'weapon', -0.605, -0.78, 0.2975, 0.423333,
        'Mount Weapon On Your Ship', '''#
import Base
import VS
plr=VS.getPlayer()
if plr:
    if not quest.checkSaveValue(VS.getCurrentPlayer(),'have_the_gun'):
        percentage = plr.upgrade('steltek_gun',0,0,True,True)
        if percentage != 1.0:
            quest.removeQuest(VS.getCurrentPlayer(),'have_the_gun',1)
            Base.EraseObj(''' + str(room1) + ''', 'weapon')
示例#21
0
 def HasJoined(self):
     plr = VS.getPlayer().isPlayerStarship()
     return quest.checkSaveValue(plr, self.savestring)
示例#22
0
def MakeUniversity (time_of_day='_day'):
    bar=-1
    weap=-1
    room0=-1

    campaign_lib.masterson_extraspeech=""
    plist=VS.musicAddList('oxford.m3u')
    VS.musicPlayList(plist)
    dynamic_mission.CreateMissions()
    room = Base.Room ('Landing_Pad')
    room0 = room
    Base.Texture (room, 'background', 'bases/university/Landing_Pad.spr', 0.0, 0.0)
    Base.Texture (room, 'tnl00000', 'bases/university/Landing_Pad_tnl00000.spr', 0.6, 0.375)
    Base.Ship (room, 'my_ship', (0.2,-0.375,5.75), (0.05, 0.988746, 0.141), (-0.7, 0.141, -0.7))
    
    room = Base.Room ('Landing_Pad')
    room0train = room
    Base.Texture (room, 'background', 'bases/university/Landing_Pad.spr', 0.0, 0.0)
    Base.Ship (room, 'my_ship', (0.2,-0.375,5.75), (0.05, 0.988746, 0.141), (-0.7, 0.141, -0.7))
    
    room = Base.Room ('Campus_Quad')
    room1 = room
    Base.Texture (room, 'background', 'bases/university/Main_Quad.spr', 0.0, 0.0)
    Base.Texture (room, 'tnc', 'bases/university/Main_Quad_tnc.spr', -0.8, -0.943359375)
    Base.Texture (room, 'wk0', 'bases/university/Main_Quad_wk0.spr', 0.3125, -0.015625)
    Base.Texture (room, 'brd', 'bases/university/Main_Quad_brd.spr', 0.13125, -0.38671875)
    room2 = -1
    room = Base.Room ('Library_Stacks')
    room2 = room
    denied=False
    if quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),"access_to_library",2):
        denied=True
    the_campaigns=campaign_lib.getActiveCampaignNodes(room2)
    if quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),"access_to_library",2):
        denied=True
    if quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),"access_to_library",1): # access granted
        Base.Texture (room, 'background', 'bases/university/Library_Main.spr', 0, 0)
        room = Base.Room ('Computer_Console')
        room3 = room
        Base.Texture (room, 'background', 'bases/university/ComputerMain.spr', 0, 0)
        
        room = Base.Room ('Library_Terminal')
        room4 = room
        Base.Texture (room, 'background', 'bases/university/ComputerAnalysing.spr', 0, 0)
        room = Base.Room ('Library_Terminal')
        room5 = room
        Base.Texture (room, 'background', 'bases/university/Monkhouse.spr', 0, 0)
        Base.Link (room2, 'my_link_id', -0.9875, -0.743333, 0.11, 1.71, 'Campus_Quad', room1)
        Base.Link (room2, 'my_link_id', -0.155, -0.913333, 0.405, 0.286667, 'Library_Console', room3)
        Base.Link (room3, 'my_link_id', 0.105, -0.756667, 0.77, 0.8, 'Computer_Analysis', room4)
        Base.Link (room3, 'my_link_id', -0.9725, -0.97, 0.5325, 1.95, 'Library_Stacks', room2)
        Base.Link (room4, 'my_link_id', 0.1025, -0.75, 0.77, 0.783333, 'Read_Computer_Screen', room5)
        Base.Link (room4, 'my_link_id', -0.9775, -0.96, 0.3, 1.95333, 'Library_Stacks', room2)
        Base.Link (room5, 'my_link_id', -1, -1, 2, 2, 'Turn_Off_Computer', room3)
        if denied:
            Base.Texture(room2,'masterson_access', 'bases/university/masterson.spr', 0, 0)
            ##campaign_lib.clickFixer(room2)
            Base.Python(room2,'masterson_access', -1, -1, 2, 2, 'Enter_Library',
                "#\nimport Base\nBase.EraseLink("+str(room2)+", 'masterson_access')\nBase.EraseObj("+str(room2)+", 'masterson_access')\n", False)
            campaign_lib.masterson_extraspeech="barspeech/campaign/mastersonfinal.wav"
    else:
        Base.Texture (room, 'background', 'bases/university/masterson.spr', 0, 0)
        ##campaign_lib.clickFixer(room2)
        if len(the_campaigns) and denied: # mission in progress.
            Base.LinkPython(room2, 'masterson_return', '#\nimport campaign_lib\n##campaign_lib.clickFixer('+str(room2)+')\n', -1, -1, 2, 2, 'Exit_Library', room1)
        else: # Access denied. Come back after Lynch missions
            campaign_lib.displayText(room2, [("Masterson","Excuse me, where do you think you're going?"),
                ("Burrows","I have some personal research I need to conduct."),
                ("Masterson","I'm sorry, sir, but access to the Oxford library files is restricted to students."),
                ("Burrows","Look, couldn't I just buy a library card?"),
                ("Masterson","I'm afraid not. Good day to you, sir.")])
            campaign_lib.masterson_extraspeech="campaign/onlyforstudents-priv.ogg"
            Base.LinkPython(room2, 'masterson_return','#\nimport VS\nVS.StopAllSounds()\n', -1, -1, 2, 2, 'Exit_Library', room1)
    
    Base.LaunchPython (room0, 'my_launch_id', 'bases/launch_music.py', -0.0075, -0.59, 0.4725, 0.31, 'Launch')
    Base.LinkPython (room0, 'my_link_id', '''#
import Base
Base.Texture ('''+str(room0train)+''', "tnl", "bases/university/Landing_Pad_tnl.spr", 0.6, 0.375) #0.582, 0.3492)
Base.RunScript('''+str(room0train)+''', "trainleave", """#
import Base
Base.SetCurRoom('''+str(room1)+''')
Base.EraseObj('''+str(room0train)+''',"tnl")
Base.EraseObj('''+str(room0train)+''',"trainleave")
""", 3.2)
''', 0.4225, -0.103333, 0.5425, 0.466667, 'Train_To_University_Campus', room0train)
    Base.Link (room1, 'my_link_id', -0.9675, -0.97, 0.595, 0.923333, 'Train_To_Landing_Pad', room0)
    Base.Comp (room1, 'my_comp_id', -0.5925, 0.293333, 0.09, 0.213333, 'Mission_Computer', 'Missions News Info ')
    import weapons_lib
    weap = weapons_lib.MakeWeapon (room1,time_of_day,"bases/university/Oxford_Shipdealer")
    Base.Link (room1, 'weapon_room', 0.695, -0.88, 0.2875, 0.913333, 'Ship_Dealer', weap)
    import commodity_lib
    commodity = commodity_lib.MakeCommodity (room1,time_of_day)
    Base.Link (room1, 'commodity', 0.09, -0.973333, 0.5275, 0.34, 'Commodity_Exchange', commodity)
    import bar_lib
    bar = bar_lib.MakeBar (room1,time_of_day,"oxford","bases/university/Bar",False,False,None,False,[],"oxford")
    Base.Link (room1, 'bar', -0.9725, 0.0966667, 0.2325, 0.666667, 'Campus_Bar', bar)
    import mercenary_guild
    merchant = mercenary_guild.MakeMercenaryGuild (room1,time_of_day)
    Base.Link (room1, 'mercenary', -0.53, 0.516667, 0.2, 0.456667, 'Mercenary_Guild', merchant)
    import merchant_guild
    merchant = merchant_guild.MakeMerchantGuild (room1,time_of_day)
    Base.Link (room1, 'merchant', -0.2625, 0.593333, 0.1375, 0.39, 'Merchant_Guild', merchant)
    Base.LinkPython (room1, 'my_link_id','#\nimport campaign_lib\ncampaign_lib.clickFixer('+str(room2)+')\nif campaign_lib.masterson_extraspeech!="":\n\timport VS\n\tVS.playSound(campaign_lib.masterson_extraspeech,(0.,0.,0.),(0.,0.,0.,))\n\tcampaign_lib.masterson_extraspeech=""\n', 0.34, 0.45, 0.6375, 0.513333, 'Library', room2)
    #Base.Link (room1, 'my_link_id', 0.36, 0.696667, 0.0625, 0.0966667, 'Talk_To_Masterson', room5)
    return room1
示例#23
0
	def HasJoined(self):
		if (self.membership<=0):
			return True;
		else:
			plr=VS.getPlayer().isPlayerStarship()
			return quest.checkSaveValue(plr,self.savestring)
示例#24
0
 def checkCargo(self,un):
     import quest
     return not (quest.checkSaveValue(self.cp,self.var,0) or quest.checkSaveValue(self.cp,self.var,1) or quest.checkSaveValue(self.cp,self.var,-1) or self.getCargo(un)!=self.savedCargo)
def MakeUniversity (time_of_day='_day'):

	# this uses the original coordinate system of Privateer
	import GUI
	GUI.GUIInit(320,200,0.03,0.03)

	campaign_lib.masterson_extraspeech=""

	plist=VS.musicAddList('land.m3u')
	VS.musicPlayList(plist)
	dynamic_mission.CreateMissions()

	plist=VS.musicAddList('oxford.m3u')
	VS.musicPlayList(plist)	

	# add main landing pad
	room0 = Base.Room ('Landing_Pad')
	Base.Texture (room0, 'background', 'bases/university/Landing_Pad.spr', 0, 0)
	Base.Texture (room0, 'tnl00000', 'bases/university/Landing_Pad_tnl00000.spr', 0, 0)

	PlayerShip.InitPlayerShips()
	PlayerShip.AddPlayerShips('university',room0,'landship')

	Base.LaunchPython (room0, 'my_launch_id', 'bases/launch_hooks.py', -0.0075, -0.59, 0.4725, 0.31, 'Launch')

	# add landing pad with moving train
	room0train = Base.Room ('Landing_Pad')
	Base.Texture (room0train, 'background', 'bases/university/Landing_Pad.spr', 0, 0)

	PlayerShip.AddPlayerShips('university',room0train,'landship')
	
	# add main concourse
	room1 = Base.Room ('Campus_Quad')
	Base.Texture (room1, 'background', 'bases/university/Main_Quad.spr', 0.582, -0.2716)
	Base.Texture (room1, 'tnc', 'bases/university/Main_Quad_tnc.spr', -0.776, -0.9603)
	Base.Texture (room1, 'wk0', 'bases/university/Main_Quad_wk0.spr', -0.010125, 0.1)
	Base.Texture (room1, 'brd', 'bases/university/Main_Quad_brd.spr', 0.1273125, -0.4074)

	# Create the Quine 4000 screens
	import computer_lib
	room_personal_computer = computer_lib.MakePersonalComputer(room0, room1)

	# add library
	room2 = Base.Room ('Library_Stacks')
	denied=False
	if quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),"access_to_library",2):
		denied=True
	the_campaigns=campaign_lib.getActiveCampaignNodes(room2)
	if quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),"access_to_library",2):
		denied=True
	if quest.checkSaveValue(VS.getPlayer().isPlayerStarship(),"access_to_library",1): # access granted
		# Library stacks
		Base.Texture (room2, 'background', 'bases/university/Library_Main.spr', 0, 0)

		# Computer
		room3 = Base.Room ('Library_Terminal')
		Base.Texture (room3, 'background', 'bases/university/ComputerMain.spr', 0, 0)
		
		# Computer analyzing artifact
		room4 = Base.Room ('Library_Terminal')
		Base.Texture (room4, 'background', 'bases/university/ComputerMain.spr', 0, 0)
		Base.Texture (room4, 'background', 'bases/university/ComputerAnalysing.spr', 0, 0)

		# computer with Monkhouse text
		room5 = Base.Room ('Library_Terminal')
		Base.Texture (room5, 'background', 'bases/university/Monkhouse.spr', 0, 0)

		# links
		Base.Link (room2, 'my_link_id', 0.5, -0.5, 0.5, 1.5, 'Oxford_Square', room1)
		Base.Link (room2, 'my_link_id', -0.5, -1.0, 1.5, 0.4, 'Research_Computers', room3)
		Base.Link (room3, 'my_link_id', 0.105, -0.756667, 0.77, 0.8, 'Analyze_Artifact', room4)
		Base.Link (room3, 'my_link_id', -1.0, -1.0, 2.0, 1.95, 'Exit', room2)
		Base.Link (room4, 'my_link_id', 0.1025, -0.75, 0.77, 0.783333, 'Read_Computer_Screen', room5)
		Base.Link (room4, 'my_link_id', -1.0, -1.0, 2.0, 0.25, 'Exit', room2)
		Base.Link (room5, 'my_link_id', -1, -1, 2, 2, 'Turn_Off_Computer', room3)
		if denied:
			Base.Texture(room2,'masterson_access', 'bases/university/masterson.spr', 0, 0)
			##campaign_lib.clickFixer(room2)
			Base.Python(room2,'masterson_access', -1, -1, 2, 2, 'Enter_Library',
				"#\nimport Base\nBase.EraseLink("+str(room2)+", 'masterson_access')\nBase.EraseObj("+str(room2)+", 'masterson_access')\n", False)
			campaign_lib.masterson_extraspeech="barspeech/campaign/mastersonfinal.wav"
	else:
		Base.Texture (room2, 'background', 'bases/university/masterson.spr', 0, 0)
		##campaign_lib.clickFixer(room2)
		if len(the_campaigns) and denied: # mission in progress.
			Base.LinkPython(room2, 'masterson_return', '#\nimport campaign_lib\n##campaign_lib.clickFixer('+str(room2)+')\n', -1, -1, 2, 2, 'Exit_Library', room1)
		else: # Access denied. Come back after Lynch missions
			campaign_lib.displayText(room2, [("Masterson","Excuse me, where do you think you're going?"),
				("Burrows","I have some personal research I need to conduct."),
				("Masterson","I'm sorry, sir, but access to the Oxford library files is restricted to students."),
				("Burrows","Look, couldn't I just buy a library card?"),
				("Masterson","I'm afraid not. Good day to you, sir.")])
			campaign_lib.masterson_extraspeech="campaign/onlyforstudents-priv.ogg"
			Base.LinkPython(room2, 'masterson_return','#\nimport VS\nVS.StopAllSounds()\n', -1, -1, 2, 2, 'Exit_Library', room1)

	# add animated link from landing pad to university
	Base.LinkPython (room0, 'my_link_id', '''#
import Base
Base.Texture ('''+str(room0train)+''', "tnl", "bases/university/Landing_Pad_tnl.spr", 0, 0)
Base.RunScript('''+str(room0train)+''', "trainleave", """#
import Base
Base.SetCurRoom('''+str(room1)+''')
Base.EraseObj('''+str(room0train)+''',"tnl")
Base.EraseObj('''+str(room0train)+''',"trainleave")
""", 3.2)
''', 0.4225, -0.103333, 0.5425, 0.466667, 'Train_To_Oxford_University', room0train)
	# add link 
	Base.Link (room1, 'my_link_id', -0.9675, -0.97, 0.595, 0.923333, 'Train_To_Landing_Pad', room0)

	# add mission computer
	import mission_computer
	miscomp = mission_computer.MakeMissionComputer (room1,time_of_day)
	Base.Link (room1, 'my_comp_id', -0.5925, 0.293333, 0.09, 0.213333, 'Mission_Computer', miscomp)
	print "Linked mission computer"

	# add ship dealer
	import weapons_lib
	weapons_lib.basename="university"
	weap = weapons_lib.MakeWeapon (room1,time_of_day,"bases/university/Oxford_Shipdealer")
	Base.Link (room1, 'weapon_room', 0.695, -0.88, 0.2875, 0.913333, 'Ship_Dealer', weap)
	Base.SetLinkArea(weap, 'exit1_to_concourse',  -0.47, 0.50, 0.1725, 0.293333)
	Base.SetLinkArea(weap, 'exit2_to_concourse',  0.315, 0.0533333, 0.3175, 0.24)
	Base.SetLinkArea(weap, 'repair_bay_link', -0.2675, 0.336667, 0.66, 0.45)
	Base.SetLinkText(weap, 'exit1_to_concourse', "Oxford_Square")
	Base.SetLinkText(weap, 'exit2_to_concourse', "Oxford_Square")

	# add commodity exchange
	import commodity_lib
	commodity_lib.MakeCommodityLink (room1, 0.09, -0.973333, 0.5275, 0.34, 'Commodity_Exchange')

	# add bar
	import bar_lib
	bar = bar_lib.MakeBar (room1,time_of_day,"oxford","bases/university/Bar",False,False,None,False,[],"oxford")
	Base.Link (room1, 'bar', -0.9725, 0.0966667, 0.2325, 0.666667, 'Campus_Bar', bar)

	# add guilds
	import mercenary_guild
	merchant = mercenary_guild.MakeMercenaryGuild (room1,time_of_day)
	Base.Link (room1, 'mercenary', -0.53, 0.516667, 0.2, 0.456667, 'Mercenary_Guild', merchant)
	import merchant_guild
	merchant = merchant_guild.MakeMerchantGuild (room1,time_of_day)
	Base.Link (room1, 'merchant', -0.2625, 0.593333, 0.1375, 0.39, 'Merchant_Guild', merchant)

	# add link to library
	Base.LinkPython (room1, 'my_link_id','#\nimport campaign_lib\ncampaign_lib.clickFixer('+str(room2)+')\nif campaign_lib.masterson_extraspeech!="":\n\timport VS\n\tVS.playSound(campaign_lib.masterson_extraspeech,(0.,0.,0.),(0.,0.,0.,))\n\tcampaign_lib.masterson_extraspeech=""\n', 0.34, 0.45, 0.6375, 0.513333, 'Library', room2)
	#Base.Link (room1, 'my_link_id', 0.36, 0.696667, 0.0625, 0.0966667, 'Talk_To_Masterson', room5)

	return room1
import GUI
GUI.GUIInit(320,200,0.03,0.03)

time_of_day=''
dynamic_mission.CreateMissions()

# add landing pad
import pleasure_land
room0 = pleasure_land.MakePleasureAgriculturalLanding(time_of_day)

# add temple
room = Base.Room ('Temple')
room1 = room
import quest
done_comp=False
if quest.checkSaveValue(VS.getCurrentPlayer(),"jones_dead",1.0):
	Base.Texture (room, 'background', 'bases/church_of_man/GaeaDead.spr', .582, -.2716)
	Base.Texture (room, 'smk', 'bases/church_of_man/smk.spr', .582, -.2716)
	plist=VS.musicAddList('church_of_man_dead.m3u')
	done_comp=True
else:
	Base.Texture (room, 'background', 'bases/church_of_man/Gaea.spr', .582, -.2716)
	Base.Texture (room, 'fr0', 'bases/church_of_man/fr0.spr', -0.6001875, 0.4947)
	Base.Texture (room, 'fr1', 'bases/church_of_man/fr1.spr', 0.666875, 0.6596)
	Base.Texture (room, 'eye', 'bases/church_of_man/eye.spr', 0.0, 0.5335)
	Base.Texture (room, 'lgo', 'bases/church_of_man/lgo.spr', -0.07275, -0.3783)
	Base.Texture (room, 'sn0', 'bases/church_of_man/sn0.spr', -0.582, -0.5238)
	Base.Texture (room, 'sn1', 'bases/church_of_man/sn1.spr', 0.7699375, -0.2619)
	plist=VS.musicAddList('church_of_man.m3u')

# play the appropriate music
示例#27
0
Base.Texture(room, 'stt',
             'bases/perry/Perry_Concourse_stt' + time_of_day + '.spr',
             -0.15625, 0.6875)
Base.Texture(room, 'stb',
             'bases/perry/Perry_Concourse_stb' + time_of_day + '.spr',
             -0.15625, 0.0918)
Base.Texture(room, 'sh0',
             'bases/perry/Perry_Concourse_sh0' + time_of_day + '.spr',
             -0.15625, 0.482421875)
Base.Texture(room, 'car',
             'bases/perry/Perry_Concourse_car' + time_of_day + '.spr', 0.6,
             -0.67)

import campaign_lib

terrell_entry = (not quest.checkSaveValue(
    VS.getCurrentPlayer(), "terrell_no_entry", 1.0)) and len(
        campaign_lib.getActiveCampaignNodes(room1))
if terrell_entry:
    room = Base.Room('Admiral_Terrells_Office')
    room2 = room
    Base.Texture(room, 'background',
                 'bases/perry/Perry_AdmTerrelOffice' + time_of_day + '.spr', 0,
                 0)
    Base.Texture(
        room, 'ltt',
        'bases/perry/Perry_AdmTerrelOffice_ltt' + time_of_day + '.spr',
        -0.53125, -0.015625)
    Base.Texture(
        room, 'trl',
        'bases/perry/Perry_AdmTerrelOffice_trl' + time_of_day + '.spr',
        0.56875, -0.03515625)
示例#28
0
def checkSaveValue (playernum,questname, value):
    return quest.checkSaveValue(playernum,questname,value)
示例#29
0
 def HasJoined(self):
     plr=VS.getPlayer().isPlayerStarship()
     return quest.checkSaveValue(plr,self.savestring)