def TalkToReceptionist(guildname,introtext): text=introtext import campaign_lib if campaign_lib.doTalkingHeads(): campaign_lib.AddConversationStoppingSprite("Receptionist","bases/heads/"+guildname.lower()+".spr",(.582,-.2716),(3.104,2.4832),"Return_To_Guild").__call__(Base.GetCurRoom(),None) print('start ('+str(guildname)+','+str(introtext)+')') if guildname in guilds: guild=guilds[guildname] if not guild.HasJoined(): text+=' Membership is '+str(guild.membership)+' credits. Please consider joining our guild' if not guild.CanPay(): text+=' when you have more money' text+='.' Base.Message (text) if not guild.HasJoined(): VS.StopAllSounds() if guild.CanPay(): fixers.CreateChoiceButtons(Base.GetCurRoom(),[ fixers.Choice("bases/fixers/yes.spr","#G#\nimport guilds\nguilds.JoinGuild('"+guildname+"')","Accept This Agreement"), fixers.Choice("bases/fixers/no.spr","bases/fixers/no.py","Decline This Agreement")]) VS.playSound("guilds/"+str(guild.name).lower()+"invite.wav",(0,0,0),(0,0,0)) else: VS.playSound("guilds/"+str(guild.name).lower()+"notenoughmoney.wav",(0,0,0),(0,0,0)) return
def AssignMission(): fixers.DestroyActiveButtons() fixers.CreateChoiceButtons(Base.GetCurRoom(), [ fixers.Choice("bases/fixers/yes.spr", "bases/fixers/iso_mission.py", "Accept This Agreement"), fixers.Choice("bases/fixers/no.spr", "bases/fixers/iso_decline.py", "Decline This Agreement") ])
def exploremission(part, filename, sysfile, creditnum): fixers.DestroyActiveButtons() if part == 1: plyr = VS.getPlayer().isPlayerStarship() if quest.findQuest(plyr, (sysfile + "_nav"), 1) or quest.findQuest( plyr, (sysfile + "_nav"), 2): part = 3 if part == 1: fixers.CreateChoiceButtons(Base.GetCurRoom(), [ fixers.Choice("bases/fixers/yes.spr", filename, "Accept This Mission"), fixers.Choice("bases/fixers/no.spr", "bases/fixers/no.py", "Decline This Mission") ]) Base.Message( """Hi. Our researchers have found a new signal similar to that of a jump point coming from an area in the #55ffff%s#000000 system. This mission will require that you own a jump drive. We hope that you will accept this mission. You will earn %.2f credits when you explore the area.""" % (sysfile.split('/')[-1], creditnum)) elif part == 2: Base.Message( """Excellent! Go to the unknown energy source that we have uploaded to your ship computer as a navpoint in #55ffff%s#000000. Once next to the energy source, jump into the energy source and get close to all of the planets in the connecting system.""" % sysfile.split('/')[-1]) Base.EnqueueMessage( """You will earn %.2f credits when this is completed""" % creditnum) plyr = VS.getPlayer().isPlayerStarship() if Director.getSaveDataLength(plyr, (sysfile + "_nav")) == 0: Director.pushSaveData(plyr, (sysfile + "_nav"), 1) else: Director.putSaveData(plyr, (sysfile + "_nav"), 0, 1) else: Base.Message( """Go to the unknown energy source that we have uploaded to your ship computer as a navpoint in #55ffff%s#000000. Once next to the energy source, jump into the energy source and get close to all of the planets in the connecting system.""" % sysfile.split('/')[-1])
def ShipPurchase(shipname): """ Allow the player to purchase a ship. If the player has enough funds, present a choice and play a dialogue. Otherwise, inform the player that he hasn't got enough funds. """ import fixers import campaign_lib campaign_lib.AddConversationStoppingSprite( "Ship_Dealer", "bases/heads/shipdealer.spr", (0, 0), (3.2, 2.0), "Return_To_Showroom").__call__(Base.GetCurRoom(), None) VS.StopAllSounds() if (VS.getPlayer().getName() == shipname or VS.getPlayer().getName() == shipname + ".blank" or VS.getPlayer().getName() + ".blank" == shipname): VS.playSound("sales/pitch" + shipname + "duplicate.wav", (0, 0, 0), (0, 0, 0)) elif CanBuyShip(shipname + ".blank"): fixers.CreateChoiceButtons(Base.GetCurRoom(), [ fixers.Choice( "bases/fixers/yes.spr", "#\nimport fixers\nfixers.DestroyActiveButtons ()\nimport weapons_lib\nimport VS\nVS.StopAllSounds()\nweapons_lib.BuyShip('" + shipname + ".blank')\n", "Purchase " + shipname.capitalize()), fixers.Choice( "bases/fixers/no.spr", "#\nimport fixers\nfixers.DestroyActiveButtons ()\nimport VS\nVS.StopAllSounds()\nVS.playSound('sales/pitch" + shipname + "reject.wav',(0,0,0),(0,0,0))\n", "Decline Purchasing") ]) VS.playSound("sales/pitch" + shipname + ".wav", (0, 0, 0), (0, 0, 0)) else: VS.playSound("sales/pitchnotenoughmoney.wav", (0, 0, 0), (0, 0, 0)) Base.Message( "I hate to break it to you, but we've checked your account, and you don't have enough credits to buy this ship. She sure is a fine ship though, isn't she? Listen, I want to make a sale, you want to make a purchase, lets look at the facts. You know the retail of this ship--we can use your ship for tradeins, plus extras--including your cash on hand, that still leaves you short. Go get some more cash, and come back when you have more cash, and don't feel embarrassed: these things happen!" )
import fixers import mission_lib import Base import VS fixers.DestroyActiveButtons() if VS.numActiveMissions() > 1: Base.Message('You are already doing a mission. Finish that instead.') else: fixers.CreateChoiceButtons(Base.GetCurRoom(), [ fixers.Choice("bases/fixers/yes.spr", "bases/fixers/generic1b.py", "Accept This Agreement"), fixers.Choice("bases/fixers/no.spr", "bases/fixers/no.py", "Decline This Agreement") ]) mission_lib.BriefLastMission(1, 0)