Back to Index Page generated: May 8, 2024, 6:16:03 AM

Expansion Trident Down

Content

Warnings

  1. Found XML equipment list
  2. XML script list found

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Contains a series of Galaxy 4 missions investigating a vicious attack on a Trident Shuttle. Depends on Commies, Executive Spaceways and Saleza Aeronautics. Contains a series of Galaxy 4 missions investigating a vicious attack on a Trident Shuttle. Depends on Commies, Executive Spaceways and Saleza Aeronautics.
Identifier oolite.oxp.Ramirez.TridentDown oolite.oxp.Ramirez.TridentDown
Title Trident Down Trident Down
Category Missions Missions
Author Ramirez Ramirez
Version 2.5.2 2.5.2
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
  • oolite.oxp.DrNil.Commies:2.11
  • oolite.oxp.Ramirez.ExecutiveSpaceWays:2.4
  • oolite.oxp.Ramirez.SalezaAeronautics:2.3
  • oolite.oxp.DrNil.Commies:2.11
  • oolite.oxp.Ramirez.ExecutiveSpaceWays:2.4
  • oolite.oxp.Ramirez.SalezaAeronautics:2.3
  • Optional Expansions
    Conflict Expansions
    Information URL http://wiki.alioth.net/index.php/Trident_Down n/a
    Download URL https://wiki.alioth.net/img_auth.php/8/85/Trident_Down_2.5.2.oxz n/a
    License CC BY-NC-SA 3 CC BY-NC-SA 3
    File Size n/a
    Upload date 1610873352

    Documentation

    Also read http://wiki.alioth.net/index.php/Trident%20Down

    Trident Down readme.rtf

    {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
    {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
    {\colortbl;\red255\green255\blue255;}
    \paperw11900\paperh16840\margl1440\margr1440\vieww27720\viewh14760\viewkind0
    \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
    
    \f0\fs24 \cf0 Trident Down\
    ------------------\
    \
    A Mission OXP for Giles Williams' Oolite\
    \
    v2.5.2\
    \
    Ramirez, December 2013\
    \
    Trident Down takes place in Galaxy 4 and builds on some of the fiction behind my earlier Executive SpaceWays OXP.  It consists of a large number of non-linear missions involving plenty of intrigue, combat and basic problem-solving.  All in all there are nine different ways of completing the mission, not all of which result in a successful outcome.\
    \
    The mission will begin once the player docks in Galaxy 4 with an Elite rating greater than Dangerous.\
    \
    Installation Requirements\
    -----------------------------------\
    Trident Down requires at least Oolite v1.77 to run properly.\
    \
    In addition to the items contained within the Trident Down package itself, to avoid too much unnecessary duplication this version of the mission makes use of ships or elements of ships (models, AIs or shipdata) from the following OXPs and so requires them to be installed:\
    \
    * Executive SpaceWays and Saleza Aeronautics (Ramirez)\
    * Commies (Dr Nil)\
    \
    Make sure to download the latest versions available for each of these OXPs; they can be found via the Elite Wiki.\
    \
    Installation Recommendations\
    -----------------------------------------\
    This mission involves quite a lot of travelling and so for those who wish to speed up the proceedings I can recommend making use of my Fuel Tank OXP.  It is not usually essential to the mission, however, and note that most of the major news updates will only be received at main space stations.  Make sure you dock every now and then to check for updates.\
    \
    Hints & Tips\
    ----------------\
    * While the mission screens will provide you with most of the relevant information, you will occasionally be contacted during flight, so keep any eye on your comms logs (especially when exiting witchspace) for any urgent messages.  Remember you can use the tilde (~) key to show the most recent messages\
    * The status of the mission and your current objectives are displayed on the manifest screen (F5 x 2).\
    * Some of the planet descriptions have been altered and so may provide you with additional clues on where to go next.\
    * Occasionally you be offered special weapons for use in the mission.  These will appear as special entries to purchase for free on the F3 equipment screen.\
    * As things progress your instructions will become less detailed, and you will have to work out exactly what you need to do. \
    * In this mission set, failure is often an option and in fact, some of the more interesting events only take place when things don't go to plan.  Wait and see how things turn out before reaching for a saved game.\
    * When saving a game, it's generally best to do so before jumping into a mission critical destination.\
    \
    Replays\
    -----------\
    If you've completed the mission in one way you may like to try out some of the other options.  To go back to the initial branching point of the mission, edit your save game as follows:\
    * delete the 'mission_trident_down_completed' variable, which will currently be set to 'TRUE'\
    * modify the 'mission_trident_down' variable to "REPLAY"\
    If you'd like to go back to a different point and want to avoid spoilers by looking at the script, send me a PM via the Oolite Bulletin Board.\
    \
    Acknowledgments\
    -------------------------\
    In addition to the other OXPs listed above, this mission makes use of the following:\
    \
    * Minesweepers and battlebots from Assassins by LittleBear\
    * Ad board models and textures from Your Ad Here and also models and textures based on the Pi-42 Convenience Store from Oo-Haul, both by Dr Nil\
    * iNews logo from Deposed by Cmdr. Wombat (never got round to making my own!)\
    * Casino models, textures and AI from HoOpy Casino by Murgh\
    * NuViper and Mussurana models by Aegidean\
    * Adder Mk2 model by Ramon\
    * Bandy-Bandy Courier model by Murgh  \
    * Models and textures from Gritty Coriolis\
    * Thanks also to Griff for the use of his trading post from Busy Ports and generally to any authors from whom I've cribbed little bits of script\
    \
    Testing\
    ----------\
    This OXP has been tested on Oolite v1.75.3 using a Mac installed with OS X 10.5.8.\
    \
    Thanks to Hoopy, LittleBear, j f gearing, FSOneblin, Screet, Thargoid, Lestradae, Kaks, GrahamIC and Mauiby de Fug for help in identifying bugs.  Big thanks to Eric Walch for the help with the javascript in the move to v1.0.  \
    \
    Version History\
    ---------------------\
    \
    \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\li2060\fi-2060\ql\qnatural\pardirnatural
    \cf0 v2.5.2 11/12/13		Improved reliability of correct Jenssen ship appearance in Ergeso\
    \
    v2.5.1 18/10/13		Fixed bug that prevents Bodarenko mission from continuing\
    				Corrected radio messages that were giving incorrect player instructions\
    \
    v2.5 28/01/13		Compatibility fixes for Oolite v1.77\
    				Improved Bellatrix missile launch and escape AIs \
    				Replaced some NPC military lasers with beam lasers for better balance\
    				Fixed problem with transit station not becoming main station when required\
    				Fixed bomb countdown overrunning when player ship not present\
    				Improved reliability of ESW beacon and tweaked AIs of ESW fleet ships\
    				Added a Playfair nav-buoy in Cebitiza to help player navigation\
    				New script for EMP bomb\
    				Various corrections to missiontext typos\
    				Slight adjustments to the Suslov hunt\
    \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
    \cf0 			\
    \
    v2.4 27/04/12		Improved Delaney set piece for better game balancing\
    \
    v2.3 19/04/12		Fixed an early looping mission screen bug\
    				Improved the Batkov set piece to provide clearer instructions to the player and reduce risk of target crashing into the planet\
    				Improved the Bodarenko set piece to provide more guidance to players, an alternative failure state and better AI for the target ship\
    				Suppressed the native Nova mission while Trident Down is running\
    			\
    \
    v2.2 07/01/12		Fixed a problem with the radio mine not not being available and improved the mechanisms for its use in the Bodarenko set-piece\
    				Fixed alignment of nav buoys with custom stations; moved planetinfo overrides into the main script.\
    \
    v2.1 22/08/11		Added use of HoOpy Casino script where that OXP is present; fixed problem with missing dock at Raceedat station\
    				Improved the Delaney set-piece to use hyperspace functions added in Oolite v1.75  \
    \
    v2.0.3 31/12/10		Further minor fixes\
    \
    v2.0.2 17/10/10		Additional fixes\
    \
    v2.0.1 27/09/10		Applied some minor corrections and bugfixes.\
    \
    v2.0 04/07/10		Full translation into javascript for compatibility with Oolite v1.74\
    				Incorporated most of the additional ship models into the Trident Down OXP package; only Executive SpaceWays, Saleza Aeronautics and Commies are required as external dependencies.\
    				Modified various elements to use improved script techniques\
    \
    v1.5	07/06/10		Improved dependencies with external OXPs, some fixes to mission text\
    \
    v1.4 30/10/09		Fixed problems with mission text, minor script errors and missing model issues\
    \
    v1.3	30/04/09		Fixed a bug with frag particles, which should stop them appearing randomly when not required\
    \
    v1.2	19/01/09		Fixed bugs which made some mission-specific ships/stations appear in other systems, and corrected some minor script errors\
    \
    v1.1	25/11/08		Minor fixes for compatibility with Oolite v1.72 and some redundant resources removed\
    \
    v1.0	24/06/08		Introduced compatibility with Oolite v1.71.2, minor fixes and general reliability improvements\
    \
    v0.6	04/03/08		Raised starting requirements from Competent to Dangerous, improved enemy AI, added some further mini-quests, and modified reward amounts to provide more balance\
    \
    v0.5	08/01/08		Various fixes to minor script errors, improved bomber and escort AI\
    \
    v0.4	29/09/07		Full release with all story threads completed\
    \
    v0.3	21/06/07		Corrected various bits and pieces in the plists, including some AI routines\
    \
    v0.2	19/06/07		Second version released with many more stages added\
    \
    v0.1	12/04/07		Initial version released\
    \
    }

    Equipment

    Name Visible Cost [deci-credits] Tech-Level
    **MVD CLASSIFIED** yes 0 3+
    **ESW SECURITY RESTRICTED** yes 0 1+
    **ATU CLASSIFIED** yes 0 3+
    **ATU CLASSIFIED** yes 0 3+

    Ships

    Name
    ATU Viper MkII
    ATU Viper MkII
    Escape Capsule
    Escape Capsule
    Prisoner Transport DK-332
    Yuri Batkov
    Thorn Prototype Shielding Component
    Thorn Prototype
    Ball Turret
    Ball Turret
    Colonel Bodarenko
    Communications Station
    Timon Delaney
    Disruptor Missile
    Docking Slit
    Bellatrix Cruiser
    CoachWhip hOopy Casino
    Mussurana
    ESW Beacon
    Gemini Escort
    Strelka Cruiseliner
    exec-ad
    ezra-ad
    Ezra Athesdottir
    Flowers 4 You Escort
    flare
    Navigation Buoy
    Griff Outpost Subents
    Griff Outpost
    Docking Slit
    Navy BattleBot MkII
    BattleBot Control Drone
    ISS Imperator
    imperator-dock
    Ball Turret
    janes-ad
    Lars Jenssen
    korshkov-ad
    Korshkov Test Facility
    Cargo container
    Mine Sweeper Satellite Radar Dish
    Mine Sweeper Satellite
    Cascade Missile
    EMP Mine
    ESW Beacon Launcher
    Bellatrix Leader
    playfair-ad
    playfair-ad-alt
    Benedict Playfair
    Sidewinder Playfair Escort
    Raceedat Penal Colony
    Raceedat Station
    Radio Bomb
    Saiph Interceptor
    Sidewinder Casino Security
    Captain Suslov
    Communications Station
    Communications Station
    Communications Station
    Communications Station
    Communications Station
    Tourist Dock
    Tourist Information Centre
    Transit Station
    Captain Suslov
    Navigation Buoy
    Witchpoint Beacon

    Models

    This expansion declares no models. This may be related to warnings.

    Scripts

    Path
    Scripts/trident-down-EMP-commstation.js
    this.name = "trident-down-EMP-commstation";
    this.author = "Ramirez";
    this.copyright = "January 2013";
    this.description = "Sets the mission variable when the EMP mine detonates near communications station";
    this.version = "2.0";
    
    this.disableStation = function()
    {if(system.shipsWithRole("commstation") != 0)
    	{var commstation = system.shipsWithRole("commstation")[0]
    	this.detonationDistance = commstation.position.distanceTo(this.ship.position)
    	if(this.detonationDistance < 5000)
    	{commstation.setAI("commstationAI.plist")}
    	}
    
    }
    
    this.sendMessage = function()
    {player.commsMessage("Well done, Commander - that's the station disabled.  The ATU fleet will now proceed to Aarza - you should meet us there.", 10)
    missionVariables.trident_down = "COMMSTATIONDISABLED"
    mission.setInstructionsKey("trident_down_ATUrendezvous", "trident_down")
    }
    Scripts/trident-down-bellatrix.js
    this.name = "trident-down-bellatrix";
    this.author = "Ramirez"
    this.copyright = "January 2013"
    this.description = "Actions for Bellatrix bomber"
    this.version = "3.0";
    
    this.launchMissile = function()
    
    {this.ship.commsMessage("Target in range.  Releasing weapon.")
    this.ship.spawn("MISSION_CASCADE_MISSILE",1)}
    
    this.shipDied = function() 
    
    {
      ++missionVariables.trident_down_bombercount
      if(missionVariables.trident_down_bombercount > 4 )
      
      {
        if(missionVariables.trident_down == "DEFENDRACEEDAT2")
          {player.commsMessage("Captain Suslov: Well done, Commander - we've managed to repulse the attack!  Now we should destroy their flagship and stop this once and for all!")
          missionVariables.trident_down = "ATTACKIMPERATOR"
          missionVariables.trident_down_bombercount = null}     
      
      
      if(missionVariables.trident_down == "DEFENDIMPERATORDEAD")
        {player.commsMessage("Captain Suslov: The enemy has been destroyed - we have saved the system! All units are cleared to return to base.")
        missionVariables.trident_down = "DEFENDRACEEDATSUCCESS"
        missionVariables.trident_down_bombercount = null}  
         
      if(missionVariables.trident_down == "ESWBRIEFB")
        {player.commsMessage("Amon Ghal'ut: Well done, Commander - we've managed to neutralise the ATU attack!  You'd better get yourself to safety while we sort things out.  We'll be in touch.")
        missionVariables.trident_down = "INTERVENTIONSUCCESSFUL"
        missionVariables.trident_down_bombercount = null
        missionVariables.trident_down_jumpcount = 0}
        
      }
    }
    Scripts/trident-down-casino.js
    this.name = "trident-down-casino.js";
    this.author = "Ramirez";
    this.copyright = "August 2011";
    this.description = "Script for Ergeso Casino";
    this.version = "1.0";
    
    this.shipSpawned = function()
    {
    	if(system.countShipsWithRole("casinoship") > 1)
    	{
    	//log('ship removed')
    	this.ship.remove(true)}
    }
    Scripts/trident-down-death-actions.js
    this.name = "trident-down-death-actions";
    this.author = "Ramirez"
    this.copyright = "April 2012"
    this.description = "Script for various ship death actions not covered by other scripts"
    this.version = "3.0";
    
    
    
    this.shipDied = function() 
    
    {	if(this.ship.primaryRole == "ATU" || this.ship.primaryRole == "ATU-leader")
    	this.ship.commsMessage(expandDescription("[ATU-death]"))
    
    	if(this.ship.primaryRole == "batkov-shuttle")
    	{this.ship.spawn("machinery-cargo", 3)
        	worldScripts.trident_down.startBatkovTimer()}
    	
    	if(this.ship.primaryRole == "ezra-ship")
    	{++missionVariables.trident_down_agent
    	missionVariables.trident_down_ezra = "DEAD"}
    	
    	if(this.ship.primaryRole == "jenssen-ship")
    	{++missionVariables.trident_down_agent
    	missionVariables.trident_down_jenssen = "DEAD"}
    	
    	if(this.ship.primaryRole == "playfair-ship")
    	{++missionVariables.trident_down_agent
    	missionVariables.trident_down_playfair = "DEAD"}
    	
    	if(this.ship.primaryRole == "ambassador-ship")
    	this.ship.spawn("ambassador-pod", 1)
    	
    	if(this.ship.primaryRole == "guarddrone")
    	this.ship.spawn("guardbot", 1)
    	
    	if(this.ship.primaryRole == "imperator")
    	{	if(missionVariables.trident_down == "DEFENDRACEEDAT2")
    		{player.commsMessage("Captain Suslov: Well done - you've destroyed the ATU's flagship.  But still have to stop the bombers!")
    		missionVariables.trident_down = "DEFENDIMPERATORDEAD"}
    
    		if(missionVariables.trident_down == "ATTACKIMPERATOR")
    		{player.commsMessage("The enemy has been destroyed - we have saved the system! All units are cleared to return to base.")
    		missionVariables.trident_down = "DEFENDRACEEDATSUCCESS"}
    	}
    	
    	if(this.ship.primaryRole == "esw-assassin")
    	{this.ship.spawn("energy-bomb", 1)
    	missionVariables.trident_down = "ESWASSASSINDEAD"
    	missionVariables.trident_down_jumpcount = 0}
    	
    	if(this.ship.primaryRole == "suslov-ship")
    	missionVariables.trident_down = "SUSLOVDEAD"
    		
    }
    
    this.soundExplosion = function()
    
    {var td_bomb = new SoundSource;
    td_bomb.sound = "td_bang.ogg";
    td_bomb.loop = false;
    td_bomb.play();}
    Scripts/trident-down-disruptor-delaney.js
    this.name = "trident-down-disruptor-delaney";
    this.author = "Ramirez";
    this.copyright = "October 2011";
    this.description = "Ship script for the Disruptor missile set-piece";
    this.version = "2.0";
    
    this.checkTarget = function() 
    { 
      if(this.ship.target.primaryRole == "delaney-ship")
      {this.ship.target.scriptedMisjump = true;
      this.ship.target.exitSystem();}
    }
      
    this.shipDied = function()
    {
      
      if(this.ship.primaryRole == "delaney-ship")
      
      {	if(system.ID == -1)
    	{this.ship.commsMessage("Nooooooo!")
    	missionVariables.trident_down = "DELANEYDEADSECRET"
    	}
    	
    	else
    	{this.ship.commsMessage("You won't get away with this!")
    	missionVariables.trident_down = "DELANEYDEADOPEN"
    	}
    	
    	worldScripts["trident_down"].resetJumpcount()
        mission.setInstructionsKey("trident_down_delaneydebrief", "trident_down")
      }
    }
    
    Scripts/trident-down-eswbeacon.js
    this.name = "trident-down-eswbeacon";
    this.author = "Ramirez";
    this.copyright = "January 2013";
    this.description = "Script actions relating to ESW beacon";
    this.version = "1.0";
    
    
    this.shipSpawned = function()
    {this.ship.commsMessage("Broadcasting coordinates...")}
    
    this.addESWShips = function()
    {this.ship.spawn("esw-leader", 1)
    this.ship.spawn("esw-gemini", 4)
    this.ship.remove();
    }
    
    
    
    Scripts/trident-down-raceedat-station.js
    this.name = "trident-down-raceedat-station";
    this.author = "Ramirez"
    this.copyright = "October 2010"
    this.description = "Death actions for the main station in Raceedat"
    this.version = "2.0";
    
    
    
    this.shipDied = function() 
    
    {
      if(missionVariables.trident_down == "ASSAULTBRIEFB")
        {missionVariables.trident_down = "ATUASSAULTSUCCESS"
        missionVariables.trident_down_jumpcount = 0
        player.commsMessage("Commodore Delaney: Well done!  We've destroyed Raceedat Station and the system is under our control.  Make your way to the Transit Station for debriefing.", 10)
        player.bounty = 0
        System.infoForSystem(3,135).station = "transit-station"
        }
      if(missionVariables.trident_down == "DEFENDRACEEDAT2" || missionVariables.trident_down == "DEFENDIMPERATORDEAD")
        {missionVariables.trident_down = "DEFENDRACEEDATFAILDEBRIEF"
        player.commsMessage("Captain Suslov: We have lost the battle - Raceedat Station has been destroyed!  All units, evacuate immediately to Usisis!", 10)
        mission.setInstructionsKey("trident_down_evacuate", "trident_down");
        System.infoForSystem(3,135).station = "transit-station"
        player.bounty = 0
        }
      if(missionVariables.trident_down == "ESWBRIEFB")
        {missionVariables.trident_down = "INTERVENTIONFAILED"
        player.commsMessage("Amon Ghal'ut: We were too late! Raceedat Station has been destroyed by the ATU!", 10)
        mission.setInstructionsKey(null, "trident_down");
    System.infoForSystem(3,135).station = "transit-station"
        player.bounty = 0
        }   
    }
    Scripts/trident-down-radio-mine.js
    this.name = "trident-down-radio-mine";
    this.author = "Ramirez";
    this.copyright = "January 2012";
    this.description = "Script actions relating to Bodarenko radio bomb quest";
    this.version = "2.1";
    
    this.initiateCountdown = function()
    {
      
    if(missionVariables.trident_down == "BODARENKOBOMBB")
      {if(system.countShipsWithRole("bodarenko-ship") == 0)
            {player.consoleMessage("Detonator out of range")
            this.ship.reactToAIMessage("NOTHING_FOUND")
            player.ship.awardEquipment("EQ_RADIO_MINE")}
            
      if(system.countShipsWithRole("bodarenko-ship") == 1)
            {this.ship.reactToAIMessage("TARGET_FOUND")
            worldScripts.trident_down.startCountdown()}
      }
      else
            {this.ship.reactToAIMessage("TARGET_FOUND")
            worldScripts.trident_down.startCountdown()}
      
    }
    
    
    
    Scripts/trident-down-scoop-actions.js
    this.name = "trident-down-scoop-actions";
    this.author = "Ramirez"
    this.copyright = "June 2010"
    this.description = "Script for various scooping actions"
    this.version = "1.0";
    
    
    
    this.shipWasScooped = function(scooper) 
    
    {	if(scooper.isPlayer)
    	{	if(this.ship.primaryRole == "machinery-cargo")
    		missionVariables.trident_down = "MACHINERYSCOOPEDA"
    		
    		if(this.ship.primaryRole == "abandoned-escape-pod")
    		missionVariables.trident_down = "ESCAPEPODSCOOPEDA"
    		
    		if(this.ship.primaryRole == "ambassador-pod")
    		missionVariables.trident_down = "ATURESCUESUCCESS"
    	}
    }
    
    Scripts/trident_down.js
    this.name = "trident_down";
    this.author = "Ramirez";
    this.copyright = "December 2013";
    this.description = "Main script for Trident Down mission";
    this.version = "5.0";
    
    
    this.startUp = function ()
    {
        // search for presence of OXP dependencies
        if (!worldScripts["executivespaceways.js"])
        {
            this.missing = "Executive Spaceways";
        }
        if (!worldScripts["saleza.js"])
        {
            if (this.missing) this.missing += ", Saleza Aeronautics";
            else this.missing = "Saleza Aeronautics";
        }
        if (!worldScripts["communist_population"])
        {
            if (this.missing) this.missing += ", Commies";
            else this.missing = "Commies";
        }
        if (this.missing)
        {
            this.missing = " The following OXP(s) are missing: "+this.missing+". Please install them and restart Oolite. ";
            this.missing += "They are essentional for the correct functioning of the Trident Down mission.";
        }
    	
    
    if(!missionVariables.trident_down_planetinfo)
    this.setPlanetInfo()
    }
    
    this.missionScreenOpportunity = function ()
    {
        if(this.missing)
        {
            mission.runScreen({title: "Trident Down", message: this.missing, background: "whexeclogo.png"});
            delete this.missing;
        }
    	
    	if(player.ship.docked) this.missionScreens();
    }
    
    
    
    this.resetJumpcount = function()
    {missionVariables.trident_down_jumpcount = 0}
    
    this.missionScreens = function()
    
    {
      if(guiScreen == "GUI_SCREEN_MISSION" || !player.ship.docked) return;
    
      if(galaxyNumber == 3 && player.ship.dockedStation.isMainStation)
      
        {   if(missionVariables.trident_down == null && player.score > 511)
      
                {   mission.runScreen({messageKey: "trident_down_newswire1A", choicesKey: "trident_down_cont", background: "iNews.png"},
    				function(choice)
    				{if(choice == 1)
    			    {mission.runScreen({messageKey: "trident_down_newswire1B", background: "iNews.png"});
    			    missionVariables.trident_down = "NEWSWIRE1B"
                    this.resetJumpcount()}
                        });			
                }			
    	
            if(missionVariables.trident_down == "NEWSWIRE1B" && missionVariables.trident_down_jumpcount > 3)
    	    {   mission.runScreen({messageKey: "trident_down_newswire2", background: "iNews.png"});
    			missionVariables.trident_down = "NEWSWIRE2"
    			this.resetJumpcount()}
    	 
    		if(missionVariables.trident_down == "NEWSWIRE2" && missionVariables.trident_down_jumpcount > 3)
    	    {   mission.runScreen({messageKey: "trident_down_request", background: "whexeclogo.png"});
    			missionVariables.trident_down = "REQUEST"
    			this.resetJumpcount()
    	    }
    	 
    		if(missionVariables.trident_down == "DOINGNOTHING1" && missionVariables.trident_down_jumpcount > 8)
    	    {   mission.runScreen({messageKey: "trident_down_raceedatcoup", background: "iNews.png"});
    			missionVariables.trident_down = "DOINGNOTHING2"
    			this.resetJumpcount()}
    			
    		if(missionVariables.trident_down == "DOINGNOTHING2" && missionVariables.trident_down_jumpcount > 6)
    	    {   mission.runScreen({messageKey: "trident_down_raceedatterror", background: "iNews.png"});
    			missionVariables.trident_down = "DOINGNOTHING3"
    			this.resetJumpcount()}
    			
    		if(missionVariables.trident_down == "DOINGNOTHING3" && missionVariables.trident_down_jumpcount > 7)
    	    {   mission.runScreen({messageKey: "trident_down_raceedattakeover1", background: "iNews.png"});
    			missionVariables.trident_down = "DOINGNOTHING4"
    			this.resetJumpcount()}
    			
    		if(missionVariables.trident_down == "DOINGNOTHING4" && missionVariables.trident_down_jumpcount > 3)
    	    {   mission.runScreen({messageKey: "trident_down_raceedattakeover2", background: "bianti.png"});
    			missionVariables.trident_down = "DOINGNOTHING5"
    			System.infoForSystem(3,135).description = "Raceedat is currently under the protection of the ATU and has elected Timon Delaney as its new President.  Pilots are advised that previous entry restrictions to the system have now been lifted."
    			System.infoForSystem(3,135).station = "coriolis"
    			System.infoForSystem(3,135).government = 6
    			this.resetJumpcount()}
    			
    		if(missionVariables.trident_down == "DOINGNOTHING5" && missionVariables.trident_down_jumpcount > 3)
    	    {   mission.runScreen({messageKey: "trident_down_raceedattakeover3alt"});
    			player.credits += 10000
    			missionVariables.trident_down = "DOINGNOTHING6"
    			this.resetJumpcount()}
    			
    		if(missionVariables.trident_down == "DOINGNOTHING6" && missionVariables.trident_down_jumpcount > 7)
    	    {   mission.runScreen({messageKey: "trident_down_commthreat"});
    			missionVariables.trident_down = "COMMTHREAT"
    			mission.setInstructionsKey("trident_down_suslov")}	
    			
    		if(missionVariables.trident_down == "SUSLOVESCAPE" && missionVariables.trident_down_jumpcount > 3)
    	    {   mission.runScreen({messageKey: "trident_down_eswscandal", background: "bianti.png"});
    			missionVariables.trident_down = "ESWSCANDAL1"
    			mission.setInstructionsKey(null)
    			this.resetJumpcount()}
    	
    	    if(missionVariables.trident_down == "ESWSCANDAL1" && missionVariables.trident_down_jumpcount > 3)
    		{   mission.runScreen({messageKey: "trident_down_eswcollapse", choicesKey: "trident_down_cont", background: "iNews.png"},
    				function(choice)
    				{if(choice == 1)
    			    {mission.runScreen({messageKey: "trident_down_completed"});
    			    missionVariables.trident_down = "COMPLETED_ESWCOLLAPSE"
    				missionVariables.trident_down_completed = "TRUE"
                    this.resetJumpcount()}
                    });			
                }
    			
    		if(missionVariables.trident_down == "SUSLOVDEAD")
    		{   mission.runScreen({messageKey: "trident_down_suslovdead", choicesKey: "trident_down_cont"},
    				function(choice)
    				{if(choice == 1)
    			    {mission.runScreen({messageKey: "trident_down_completed"});
    			    missionVariables.trident_down = "COMPLETED_ESWSAVED"
    				player.credits += 150000
    				mission.setInstructionsKey(null)
                    this.resetJumpcount()
    				missionVariables.trident_down_completed = "TRUE"}
                    });			
                }	
    	 
    		if(missionVariables.trident_down == "RACEEDAT1B" && missionVariables.trident_down_jumpcount > 0)
    	    
    	    {   if(system.ID == 197 || system.ID == 85 || system.ID == 118)
                    {mission.runScreen({messageKey: "trident_down_search_fail"})
    		this.resetJumpcount()}
                    
                    if(system.ID == 132 || system.ID == 223 || system.ID == 244)
                    {mission.runScreen({messageKey: "trident_down_search_fail_comm"})
    		this.resetJumpcount()}
    
                    
                    if(system.ID == 195)
                    {mission.runScreen({messageKey: "trident_down_search_fail_anarchy"})
    		this.resetJumpcount()}
    
                    
                    if(system.ID == 187)
                    {mission.runScreen({messageKey: "trident_down_leenor"});
                    missionVariables.trident_down = "LEENOR1"
    		mission.setInstructionsKey("trident_down_search2")
                    this.resetJumpcount()} // used to trigger an in-space communication
            }
                
            if(missionVariables.trident_down == "LEENOR2") //this should be a main Galcop station
                    {mission.runScreen({messageKey: "trident_down_leenor2", background: "ATU.png"});
                    missionVariables.trident_down = "LEENOR3"
                    this.resetJumpcount()} 
                
            if(missionVariables.trident_down == "LEENOR3" && missionVariables.trident_down_jumpcount > 3)
                    {mission.runScreen({messageKey: "trident_down_newswire3", background: "bianti.png"});
                    missionVariables.trident_down = "LEENOR4"
                    this.resetJumpcount()} 
                
            if(missionVariables.trident_down == "LEENOR5")
                {   missionVariables.trident_down = "LEENOR6"
    				mission.runScreen(				  		  
                    {messageKey: "trident_down_execupdate1a", choicesKey: "trident_down_cont"},
    			function(choice)
    		    {	if(choice == 1)	
    			    {mission.runScreen({messageKey: "trident_down_execupdate1b"});
    			    missionVariables.trident_down = "LEENOR7"}
    		    });
    	    }
    		
    		
    		if(missionVariables.trident_down == "ESCAPEPODSCOOPEDA")
            {mission.runScreen({messageKey: "trident_down_scoopeda", background: "td-manifest.png", choicesKey: "trident_down_cont"},
    		function(choice)
    		    {
    			if(choice == 1)
    				
    			    {mission.runScreen({messageKey: "trident_down_scoopedb"});
    			    missionVariables.trident_down = "DICEBE1"
                    player.credits += 20000
                    mission.setInstructionsKey("trident_down_search6")
                    this.resetJumpcount()}
    		    });
    	    }
                
            if(missionVariables.trident_down == "DICEBE2")
                        {mission.runScreen({messageKey: "trident_down_execupdate2"});
                        missionVariables.trident_down = "DICEBE3"
                        this.resetJumpcount()
                        }
    					
    		if(missionVariables.trident_down == "ASSAULTAFTERMATH1" && missionVariables.trident_down_jumpcount > 4)
                        {mission.runScreen({messageKey: "trident_down_raceedatcoupalt", background: "bianti.png"});
                        missionVariables.trident_down = "ASSAULTAFTERMATH2"
                        this.resetJumpcount()
    					System.infoForSystem(3,135).description = "Raceedat is currently subject to a security lockdown maintained by order of the ATU.  Only vessels with appropriate authorisation are permitted to enter the system."
                        }
    					
    		if(missionVariables.trident_down == "ASSAULTAFTERMATH2" && missionVariables.trident_down_jumpcount > 6)
                        {mission.runScreen({messageKey: "trident_down_raceedattakeover1alt", background: "iNews.png"});
                        missionVariables.trident_down = "ASSAULTAFTERMATH3"
                        this.resetJumpcount()
    					System.infoForSystem(3,135).description = "Raceedat is currently being held under the control of the ATU.  Pilots are advised that Raceedat's Coriolis Station remains out of action, and should request docking instructions from the Orbital Transit Station run by the Agricultural Engineering Enterprise."
                        }
    					
    		if(missionVariables.trident_down == "BODARENKODEAD" && missionVariables.trident_down_jumpcount > 4)
                        {mission.runScreen({messageKey: "trident_down_bodarenkonews", background: "bianti.png"});
                        missionVariables.trident_down = "BODARENKONEWS"
                        this.resetJumpcount()
                        }
    					
    		if(missionVariables.trident_down == "BODARENKONEWS" && missionVariables.trident_down_jumpcount > 7)
                        {mission.runScreen({messageKey: "trident_down_raceedattakeover2", background: "bianti.png"});
                        missionVariables.trident_down = "BODARENKODEBRIEFA"
    					System.infoForSystem(3,135).description = "Raceedat is currently under the protection of the ATU and has elected Timon Delaney as its new President.  Pilots are advised that Raceedat Station has now returned to operation and previous entry restrictions to the system have now been lifted."
    					System.infoForSystem(3,135).station = "coriolis"
    					System.infoForSystem(3,135).government = 6
    					this.resetJumpcount()}
    		
    		if(missionVariables.trident_down == "BODARENKODEBRIEFB" && missionVariables.trident_down_jumpcount > 8)
                {mission.runScreen({messageKey: "trident_down_newworldnews", background: "iNews.png"});
                missionVariables.trident_down = "BODARENKODEBRIEFC"
    			System.infoForSystem(3,135).description = "Raceedat has recently been officially reclassified as an Industrial Dictatorship.  Visitors should be aware of the local laws and trading regulations before entering this system."
    			System.infoForSystem(3,135).government = 3
    			this.resetJumpcount()}
    					
    		if(missionVariables.trident_down == "BODARENKODEBRIEFC" && missionVariables.trident_down_jumpcount > 6)
                {mission.runScreen({messageKey: "trident_down_eswthreat", background: "whexeclogo.png"});
                missionVariables.trident_down = "BODARENKODEBRIEFD"
    			this.resetJumpcount()}
    					
    		if(missionVariables.trident_down == "ESWASSASSINDEAD")
                {mission.runScreen({messageKey: "trident_down_delaneymessage"});
                missionVariables.trident_down = "HEYSELTHREAT"
    			this.resetJumpcount()}
    		
    		if(missionVariables.trident_down == "HEYSELTHREAT" && missionVariables.trident_down_jumpcount > 5)
                {mission.runScreen({messageKey: "trident_down_heyseldeath", background: "iNews.png", choicesKey: "trident_down_cont"},
    			function(choice)
    				{
    					if(choice == 1)
    					{mission.runScreen({messageKey: "trident_down_completed"});
    					missionVariables.trident_down = "ATUHERO"        
                        this.resetJumpcount()
    					mission.setInstructionsKey(null)
    					missionVariables.trident_down_completed = "TRUE"}
    					});				   
    				}
    		if(missionVariables.trident_down == "RACEEDATCHOICEREFUSE" && missionVariables.trident_down_jumpcount > 6)
    				{mission.runScreen({messageKey: "trident_down_raceedatcoup", background: "iNews.png"});
                     missionVariables.trident_down = "RACEEDATCOUP"
    				this.resetJumpcount()}
    				
    		if(missionVariables.trident_down == "RACEEDATCOUP" && missionVariables.trident_down_jumpcount > 5)
    				{mission.runScreen({messageKey: "trident_down_raceedatterror", background: "bianti.png"});
                    missionVariables.trident_down = "RACEEDATTAKEOVER1"
    				this.resetJumpcount()}
    				
    		if(missionVariables.trident_down == "RACEEDATTAKEOVER1" && missionVariables.trident_down_jumpcount > 4)
    				{mission.runScreen({messageKey: "trident_down_raceedattakeover1", background: "iNews.png"});
                     missionVariables.trident_down = "RACEEDATTAKEOVER2"
    				this.resetJumpcount()}
    				
    		if(missionVariables.trident_down == "RACEEDATTAKEOVER2" && missionVariables.trident_down_jumpcount > 5)
    				{mission.runScreen({messageKey: "trident_down_raceedattakeover2", background: "bianti.png"});
                     missionVariables.trident_down = "RACEEDATTAKEOVER3"
    				this.resetJumpcount()
    				System.infoForSystem(3,135).description = "Raceedat is currently under the protection of the ATU and has elected Timon Delaney as its new President.  Pilots are advised that Raceedat Station has now returned to operation and previous entry restrictions to the system have now been lifted."
    				System.infoForSystem(3,135).station = "coriolis"
    				System.infoForSystem(3,135).government = 6}
    				
    		if(missionVariables.trident_down == "RACEEDATTAKEOVER3" && missionVariables.trident_down_jumpcount > 5)
    				{mission.runScreen({messageKey: "trident_down_raceedattakeover3", background: "whexeclogo.png", choicesKey: "trident_down_cont"},function(choice)
    				{
    					if(choice == 1)
    					{mission.runScreen({messageKey: "trident_down_completed"});
    					missionVariables.trident_down = "COMPLETED_COMMFAILURE"        
                        this.resetJumpcount()
    					mission.setInstructionsKey(null)
    					missionVariables.trident_down_completed = "TRUE"}
    					});				   
    				}
                    
    		if(missionVariables.trident_down == "CRACKDOWN1" && missionVariables.trident_down_jumpcount > 1)
    				{mission.runScreen({messageKey: "trident_down_crackdown1", background: "iNews.png"});
                     missionVariables.trident_down = "CRACKDOWN2"
    				this.resetJumpcount()}		
    				
    		if(missionVariables.trident_down == "CRACKDOWN2" && missionVariables.trident_down_jumpcount > 5)
    				{mission.runScreen({messageKey: "trident_down_crackdown2", background: "iNews.png"});
                    missionVariables.trident_down = "CRACKDOWN3"
    				this.resetJumpcount()}
    				
    		if(missionVariables.trident_down == "DELANEYOFFERREJECT1" && missionVariables.trident_down_jumpcount > 6)
    				{mission.runScreen({messageKey: "trident_down_delaneydeadalternate", background: "iNews.png"});
                    missionVariables.trident_down = "DELANEYOFFERREJECT2"
    				this.resetJumpcount()}
    		
    		if(missionVariables.trident_down == "DELANEYOFFERREJECT2" && missionVariables.trident_down_jumpcount > 3)
    				{mission.runScreen({messageKey: "trident_down_bodarenkoplea", choicesKey: "trident_down_bodarenkopleachoice"}, function(choice)			  
    					{
    					if(choice == 1)
    					{mission.runScreen({messageKey: "trident_down_bodarenkopleaaccept"});
    					missionVariables.trident_down = "DEFENDRACEEDAT1"        
                        this.resetJumpcount()
    					mission.setInstructionsKey("trident_down_defendraceedat")}
    					
    					if(choice == 2)
    					{mission.runScreen({messageKey: "trident_down_bodarenkopleareject"});
    					missionVariables.trident_down = "DELANEYOFFERREJECT4"
    					mission.setInstructionsKey(null)
                        this.resetJumpcount()}
    					});
    				
    				}
    		
    		if(missionVariables.trident_down == "DELANEYOFFERREJECT4" && missionVariables.trident_down_jumpcount > 6)
    				{mission.runScreen({messageKey: "trident_down_raceedatdefeated", background: "iNews.png"});
                    missionVariables.trident_down = "DELANEYOFFERREJECT5"
    				this.resetJumpcount()
    				System.infoForSystem(3,135).description = "Raceedat is currently being held under the protection of the ATU."
    				System.infoForSystem(3,135).government = 6
    				}
    				
    		if(missionVariables.trident_down == "DELANEYOFFERREJECT5" && missionVariables.trident_down_jumpcount > 5)
    				{mission.runScreen({messageKey: "trident_down_raceedatdefeatedeswdebrief", choicesKey: "trident_down_cont"}, function(choice)
    					{
    					if(choice == 1)
    					{mission.runScreen({messageKey: "trident_down_completed"});
    					missionVariables.trident_down = "COMPLETED_COMMABANDON"        
                        this.resetJumpcount()
    					mission.setInstructionsKey(null)
    					missionVariables.trident_down_completed = "TRUE"}			   
    					});
                    }		
    		
    		if(missionVariables.trident_down == "DELANEYDEADOPEN" && missionVariables.trident_down_jumpcount > 2)
    				{mission.runScreen({messageKey: "trident_down_delaneydeadopennews", background: "iNews.png"});
                    missionVariables.trident_down = "DELANEYFAILDEBRIEF"}
    				
    		if(missionVariables.trident_down == "DELANEYDEADSECRET" && missionVariables.trident_down_jumpcount > 2)
    				{mission.runScreen({messageKey: "trident_down_delaneydeadsecretnews", background: "iNews.png"});
                    missionVariables.trident_down = "DELANEYSUCCESSDEBRIEFA"}		
    		
    		if(missionVariables.trident_down == "DEFENDRACEEDATSUCCESSNEWS1" && missionVariables.trident_down_jumpcount > 4)
    				{mission.runScreen({messageKey: "trident_down_defendraceedatsuccessnews1", background: "bianti.png"});
                    missionVariables.trident_down = "DEFENDRACEEDATSUCCESSNEWS2"
    				this.resetJumpcount()}
    		
    		if(missionVariables.trident_down == "DEFENDRACEEDATSUCCESSNEWS2" && missionVariables.trident_down_jumpcount > 6)
    				{mission.runScreen({messageKey: "trident_down_defendraceedatsuccessnews2", background: "newswire.png"});
                    missionVariables.trident_down = "DEFENDRACEEDATSUCCESSNEWS3"
    				System.infoForSystem(3,197).description = "Dicebe is administered by a Communist government with close trade and defence ties with its neighbour, Raceedat.  Together they represent two of the most advanced Communist systems in the galaxy."
    				System.infoForSystem(3,197).government = 4
    				this.resetJumpcount()}
    				
    		if(missionVariables.trident_down == "DEFENDRACEEDATSUCCESSNEWS3" && missionVariables.trident_down_jumpcount > 6)
    				{mission.runScreen({messageKey: "trident_down_defendraceedatsuccessnews1", background: "bianti.png"});
                    missionVariables.trident_down = "DEFENDRACEEDATSUCCESSDEBRIEF1"
    				this.resetJumpcount()}
    		
    		if(missionVariables.trident_down == "DEFENDRACEEDATSUCCESSESWDEBRIEFA" && missionVariables.trident_down_jumpcount > 6)
    				{mission.runScreen({messageKey: "trident_down_defendraceedatsuccesseswdebriefa", choicesKey: "trident_down_cont"}, function(choice)
                        {
                        if(choice == 1)
                        mission.runScreen({messageKey: "trident_down_defendraceedatsuccesseswdebriefb", choicesKey: "trident_down_cont"},
                                              
                            function(choice)                             
                            {   if(choice == 1)
                                {mission.runScreen({messageKey: "trident_down_completed"});			
    							missionVariables.trident_down = "COMPLETED_COMMHERO"
    							mission.setInstructionsKey(null)
    							player.credits += 20000
    							missionVariables.trident_down_completed = "TRUE"}	
                            });
                        }); 
    			}
    			
    		if(missionVariables.trident_down == "DEFENDRACEEDATFAILNEWS" && missionVariables.trident_down_jumpcount > 4)
    				{mission.runScreen({messageKey: "trident_down_raceedatdefeated", background: "iNews.png"});
                    missionVariables.trident_down = "DEFENDRACEEDATFAILESWDEBRIEFALT"
    				System.infoForSystem(3,135).government = 6
    				this.resetJumpcount()}
    				
    				
    				
    				
    		if(missionVariables.trident_down == "DEFENDRACEEDATFAILESWDEBRIEFALT" && missionVariables.trident_down_jumpcount > 2)
    				{mission.runScreen({messageKey: "trident_down_defendraceedatfaileswdebriefalt", background: "iNews.png"});
                    missionVariables.trident_down = "DEFENDRACEEDATFAILESWDEBRIEFALT2"
    				player.credits += 60000
    				this.resetJumpcount()}
    			
    		if(missionVariables.trident_down == "DEFENDRACEEDATFAILISANLAC" && missionVariables.trident_down_jumpcount > 5)
    				{mission.runScreen({messageKey: "trident_down_bodarenkonews", background: "bianti.png", choicesKey: "trident_down_cont"},
    					 function(choice)                             
                            {   if(choice == 1)
                                {mission.runScreen({messageKey: "trident_down_completed"});			
    							missionVariables.trident_down = "COMPLETED_COMMCOURAGE"
    							System.infoForSystem(3,135).description = "Raceedat is currently being held under the control of the ATU.  Pilots are advised that Raceedat Station has now returned to operation and previous entry restrictions to the system have now been lifted."
    				System.infoForSystem(3,135).station = "coriolis"
    							mission.setInstructionsKey(null)
    							missionVariables.trident_down_completed = "TRUE"}		
                            }); 
    				}	
    				
    		
    		
    		if(missionVariables.trident_down == "BIANTICOMMSTORYDELIVERED" && missionVariables.trident_down_jumpcount > 4)
    		{mission.runScreen({messageKey: "trident_down_bianticommstorybreak1", background: "bianti.png"});
    		missionVariables.trident_down = "BIANTICOMMSTORYBREAK1"
    		this.resetJumpcount()}
    		
    		if(missionVariables.trident_down == "BIANTICOMMSTORYBREAK1" && missionVariables.trident_down_jumpcount > 4)
    		{mission.runScreen({messageKey: "trident_down_bianticommstorybreak2", background: "iNews.png"});
    		missionVariables.trident_down = "BIANTICOMMSTORYBREAK2"
    		this.resetJumpcount()}
    		
    		if(missionVariables.trident_down == "BIANTICOMMSTORYBREAK2" && missionVariables.trident_down_jumpcount > 4)
    		{mission.runScreen({messageKey: "trident_down_bianticommstorybreak3", background: "bianti.png"});
    		missionVariables.trident_down = "BIANTICOMMSTORYBREAK3"
    		this.resetJumpcount()}
    		
    		if(missionVariables.trident_down == "BIANTICOMMSTORYBREAK3" && missionVariables.trident_down_jumpcount > 5)
    		{mission.runScreen({messageKey: "trident_down_bianticommstorybreak4A", choicesKey: "trident_down_cont"},
    					 function(choice)                             
                            {   if(choice == 1)
                                {mission.runScreen({messageKey: "trident_down_bianticommstorybreak4B"});			
    							missionVariables.trident_down = "BIANTICOMMSTORYBREAK4B"
    							player.credits += 200000
    							mission.setInstructionsKey(null)
    							this.resetJumpcount()}		
                            }); 
    				}
    				
    		if(missionVariables.trident_down_rumours == 3 && missionVariables.trident_down_jumpcount > 2)
    		{mission.runScreen({messageKey: "trident_down_gotobianti"});
    		missionVariables.trident_down = "BIANTIESWSTORY"
    		mission.setInstructionsKey("trident_down_bianti")
    		this.resetJumpcount()
    		missionVariables.trident_down_rumours = null
    		missionVariables.trident_down_leenor = null
    		missionVariables.trident_down_lequteor = null
    		missionVariables.trident_down_leisera = null}		
    		
    		if(missionVariables.trident_down == "BIANTIESWSTORYBREAK1" && missionVariables.trident_down_jumpcount > 5)
    		{mission.runScreen({messageKey: "trident_down_biantieswstorybreak1", background: "bianti.png"});
    		missionVariables.trident_down = "BIANTIESWSTORYBREAK2"
    		this.resetJumpcount()
    		}
    		
    		if(missionVariables.trident_down == "BIANTIESWSTORYBREAK2" && missionVariables.trident_down_jumpcount > 5)
    		{mission.runScreen({messageKey: "trident_down_biantieswstorybreak2", background: "iNews.png"});
    		missionVariables.trident_down = "BIANTIESWSTORYBREAK3"
    		this.resetJumpcount()
    		}
    		
    		if(missionVariables.trident_down == "BIANTIESWSTORYBREAK3" && missionVariables.trident_down_jumpcount > 6)
    		{mission.runScreen({messageKey: "trident_down_eswbriefA", choicesKey: "trident_down_cont"},
    					 function(choice)                             
                            {   if(choice == 1)
                                {mission.runScreen({messageKey: "trident_down_eswbriefB"});			
    							missionVariables.trident_down = "ESWBRIEFB"
    							mission.setInstructionsKey("trident_down_raceedatsquadron")
    							this.resetJumpcount()
    							missionVariables.trident_down_bombercount = 0}		
                            }); 
    				
    		}
    		
    		if(missionVariables.trident_down == "INTERVENTIONSUCCESSFUL" && missionVariables.trident_down_jumpcount > 6)
    		{mission.runScreen({messageKey: "trident_down_interventionsuccess", background: "iNews.png"});
    		missionVariables.trident_down = "INTERVENTIONDEBRIEF"
    		this.resetJumpcount()
    		mission.setInstructionsKey(null)
    		}
    		
    		if(missionVariables.trident_down == "INTERVENTIONDEBRIEF" && missionVariables.trident_down_jumpcount > 7)
    		{mission.runScreen({messageKey: "trident_down_interventiondebrief"});
    		missionVariables.trident_down = "INTERVENTIONAWARDA"
    		mission.setInstructionsKey("trident_down_lavebe")
    		this.resetJumpcount()
    		}
    			
    		//end of general area events; the rest are location-specific
    		   
    		if(system.government == 4)
    		{	if(missionVariables.trident_down == "CRACKDOWN4")
                {mission.runScreen({messageKey: "trident_down_delaneyoffer", background: "sovcoat.png", choicesKey: "trident_down_delaneyofferchoice"},
    			function(choice)
    				{
    					if(choice == 1)
    					mission.runScreen({messageKey: "trident_down_delaneyofferacceptA", background: "sovcoat.png", choicesKey: "trident_down_cont"},
    							function(choice)
    							{if(choice == 1)
    							mission.runScreen({messageKey: "trident_down_delaneyofferacceptB", background: "sovcoat.png", choicesKey: "trident_down_cont"},
    								function(choice)
    								{if(choice == 1)
    								mission.runScreen({messageKey: "trident_down_delaneyofferacceptC", background: "sovcoat.png", choicesKey: "trident_down_cont"},
    									function(choice)
    									{if(choice == 1)
    										{mission.runScreen({messageKey: "trident_down_delaneyofferacceptD", background: "sovcoat.png"});			  
    										missionVariables.trident_down = "DELANEYOFFERACCEPTD"
    										mission.setInstructionsKey("trident_down_delaneylaquused")}	  
    										});
    								
    								});		
    							});
    					
    					
    			
    					if(choice == 2)
    					{mission.runScreen({messageKey: "trident_down_delaneyofferreject", background: "sovcoat.png"});
    					missionVariables.trident_down = "DELANEYOFFERREJECT1"        
                        this.resetJumpcount()
    					mission.setInstructionsKey("trident_down_waitforinfo")}
    				});
    					
    				}
    				
    			
    			if(missionVariables.trident_down == "BIANTICOMMSTORYBREAK5")
                {mission.runScreen({messageKey: "trident_down_bianticommstorybreak5A", background: "sovcoat.png", choicesKey: "trident_down_cont"},
    			function(choice)
    				{
    					if(choice == 1)
    					mission.runScreen({messageKey: "trident_down_friendshipmedal", background: "friendshipmedal.png", choicesKey: "trident_down_cont"},
    							function(choice)
    							{if(choice == 1)
    							mission.runScreen({messageKey: "trident_down_bianticommstorybreak5C", background: "sovcoat.png", choicesKey: "trident_down_cont"},
    								function(choice)
    								{if(choice == 1)
    									{mission.runScreen({messageKey: "trident_down_completed"});
    									missionVariables.trident_down = "COMPLETED_COMMFRIENDSHIP"
    									mission.setInstructionsKey(null)
    									this.resetJumpcount
    									player.credits += 150000
    									missionVariables.trident_down_completed = "TRUE"}
    								});			
    							});	
    				});
    				}
    		
    		
    			if(missionVariables.trident_down == "DEFENDRACEEDATSUCCESSDEBRIEF2A")
    	    
    			{   mission.runScreen({messageKey: "trident_down_defendraceedatsuccessdebrief2a", background: "sovcoat.png", choicesKey: "trident_down_cont"},
                    function(choice)
                        {
                        if(choice == 1)
                        mission.runScreen({messageKey: "trident_down_glorymedal", background: "glorymedal.png", choicesKey: "trident_down_cont"},
                                              
                            function(choice)                             
                            {   if(choice == 1)
                                { mission.runScreen({messageKey: "trident_down_defendraceedatsuccessdebrief2c"});
                                missionVariables.trident_down = "DEFENDRACEEDATSUCCESSESWDEBRIEFA"
    							mission.setInstructionsKey(null)
    							this.resetJumpcount()
    							player.credits += 300000
    							}
                            });  
                        }); 
    	    }
    		
    		
    		}
    		
    		
    		
    		
    		if(system.ID == 2) //Lavebe
    		{if(missionVariables.trident_down == "REQUEST")
    	    {   mission.runScreen(				  		  
    				{messageKey: "trident_down_lavebe_offer", choicesKey: "trident_down_lavebe_offerchoice", background: "whexeclogo.png"},
    		
    		
    		function(choice)
    		    {
    			if(choice == 1)
    				
    			    {mission.runScreen({messageKey: "trident_down_lavebe_offer_accepted"});
    			    missionVariables.trident_down = "ACCEPTED"
    			    player.credits += 1000
    			    mission.setInstructionsKey("trident_down_Raceedat")
                    this.resetJumpcount()}
    			    
    			if(choice == 2)
    				
    			    {mission.runScreen({messageKey: "trident_down_lavebe_offer_rejected"});
    			    missionVariables.trident_down = "COMPLETED_REJECTED"
                    this.resetJumpcount
    				missionVariables.trident_down_completed = "TRUE"}
    			    
    			if(choice == 3)
    				
    			    {mission.runScreen({messageKey: "trident_down_lavebe_offer_deferred"});
    			    missionVariables.trident_down = "DEFERRED"
                    this.resetJumpcount()}
    		      });			
    	    }
    	    
    		if(missionVariables.trident_down == "DEFERRED")
    	    
    	    {   mission.runScreen({messageKey: "trident_down_lavebe_repeat_offer", choicesKey: "trident_down_repeat_offerchoice", background: "whexeclogo.png"},
    		
    			function(choice)
    		    {
    			if(choice == 1)
    				
    			    {mission.runScreen({messageKey: "trident_down_lavebe_offer_accepted"});
    			    missionVariables.trident_down = "ACCEPTED"
    			    player.credits += 1000
    			    mission.setInstructionsKey("trident_down_Raceedat")
                    this.resetJumpcount()}
    			    
    			if(choice == 2)
    				
    			    {mission.runScreen({messageKey: "trident_down_lavebe_offer_rejected"});
    			    missionVariables.trident_down = "COMPLETED_REJECTED"
                    this.resetJumpcount
    				missionVariables.trident_down_completed = "TRUE"}
    		      });			
    	    }
    		
    		
    		if(missionVariables.trident_down == "INTERVENTIONAWARDA")
    				{mission.runScreen({messageKey: "trident_down_interventionawardA", choicesKey: "trident_down_cont"}, function(choice)
                        {
                        if(choice == 1)
                        mission.runScreen({messageKey: "trident_down_interventionawardB", background: "treaty.png", choicesKey: "trident_down_cont"}, function(choice)     
                            {   if(choice == 1)
                                mission.runScreen({messageKey: "trident_down_interventionawardC", choicesKey: "trident_down_cont"}, function(choice)			
    							{if(choice == 1)
    								mission.runScreen({messageKey: "trident_down_freedommedal", background: "freedommedal.png", choicesKey: "trident_down_cont"}, function(choice)
    									{if(choice == 1)
    										mission.runScreen({messageKey: "trident_down_interventionawardE", choicesKey: "trident_down_cont"}, function(choice)
    											{if(choice == 1)
    												{mission.runScreen({messageKey: "trident_down_completed"});
    												player.credits += 200000
    												missionVariables.trident_down = "COMPLETED_GALHERO"
    												missionVariables.trident_down_completed = "TRUE"}
    											});
    									});
    							});
                            });
       
                        }); 
    			}
    		
    		}
    		
    		
    		    
            if(system.ID == 34)   //Leenor 34
            {   if(missionVariables.trident_down == "LEENOR3" || missionVariables.trident_down == "LEENOR7")
                    {   mission.runScreen(				  		  
                        {messageKey: "trident_down_lequteor1a", choicesKey: "trident_down_cont"}, function(choice)
    		    {
    			if(choice == 1)
    			mission.runScreen({messageKey: "trident_down_lequteor1b", choicesKey: "trident_down_lequteor_offerchoice"},
                                              
                                function(choice)
                                            
                                    {   if(choice == 1 && player.credits >= 10000)
                                            {mission.runScreen({messageKey: "trident_down_lequteor_accepted1"});
                                            player.credits -= 10000
                                            mission.setInstructionsKey("trident_down_search3")
                                            this.resetJumpcount
                                            missionVariables.trident_down = "LEQUTEOR_ACCEPTED1"}
                                                        
                                        if(choice == 1 && player.credits <= 10000)
                                            {mission.runScreen({messageKey: "trident_down_lequteor_cash"});
                                            mission.setInstructionsKey("trident_down_search2-deferred")
                                            this.resetJumpcount
                                            missionVariables.trident_down = "LEQUTEOR_DEFERRED"}
                                            
                                        if(choice == 2)
                                            {mission.runScreen({messageKey: "trident_down_lequteor_rejected"});
                                            mission.setInstructionsKey("trident_down_search2-rejected")
                                            this.resetJumpcount
                                            missionVariables.trident_down = "LEQUTEOR_REJECTED"}    
                                            
                                        if(choice == 3)
                                            {mission.runScreen({messageKey: "trident_down_lequteor_deferred"});
                                            mission.setInstructionsKey("trident_down_search2-deferred")
                                            this.resetJumpcount
                                            missionVariables.trident_down = "LEQUTEOR_DEFERRED"}     
                                    });		    
    						});        
                    }
                
                if(missionVariables.trident_down == "LEQUTEOR_DEFERRED" && missionVariables.trident_down_jumpcount > 0)
            
                {mission.runScreen({messageKey: "trident_down_lequteor_repeat_offer", choicesKey: "trident_down_lequteor_offerchoice"}, function(choice)
    		    {
    			if(choice == 1 && player.credits >= 10000)
    			{mission.runScreen({messageKey: "trident_down_lequteor_accepted1"});
    			player.credits -= 10000
                            mission.setInstructionsKey("trident_down_search3")
                            this.resetJumpcount
                            missionVariables.trident_down = "LEQUTEOR_ACCEPTED1"}
                            
                            if(choice == 1 && player.credits <= 10000)
                            {mission.runScreen({messageKey: "trident_down_lequteor_cash"});
                            mission.setInstructionsKey("trident_down_search2-deferred")
                            this.resetJumpcount
                            missionVariables.trident_down = "LEQUTEOR_DEFERRED"}
                                            
                            if(choice == 2)
                            {mission.runScreen({messageKey: "trident_down_lequteor_rejected"});
                            mission.setInstructionsKey("trident_down_search2-rejected")
                            this.resetJumpcount
                            missionVariables.trident_down = "LEQUTEOR_REJECTED"}    
                                            
                            if(choice == 3)
                            {mission.runScreen({messageKey: "trident_down_lequteor_deferred"});
                            mission.setInstructionsKey("trident_down_search2-deferred")
                            this.resetJumpcount
                            missionVariables.trident_down = "LEQUTEOR_DEFERRED"}     
    				});
    			}   
                
                if(missionVariables.trident_down == "LEQUTEOR_ACCEPTED1" && missionVariables.trident_down_jumpcount > 0)
                
                {   missionVariables.trident_down = "LEQUTEOR_ACCEPTED2"
    				mission.runScreen({messageKey: "trident_down_lequteor_accepted2", choicesKey: "trident_down_cont"}, function(choice)
    				{
    				if(choice == 1)
                                mission.runScreen({background: "krabspec.png", choicesKey: "trident_down_cont"},
                                              
                                function(choice)
                                            
                                    {   if(choice == 1)
                                            {mission.runScreen({messageKey: "trident_down_lequteor_accepted3"});
                                            mission.setInstructionsKey("trident_down_search4")
                                            this.resetJumpcount
                                            missionVariables.trident_down = "LEISERA1"}
                                });
                                              		    
    				});
    			}
    		
    			if(missionVariables.trident_down == "INTERVENTION" && !missionVariables.trident_down_lequteor)
    			{mission.runScreen({messageKey: "trident_down_lequteorrumour"});
    			missionVariables.trident_down_lequteor = "SET"
    			++missionVariables.trident_down_rumours}
            
    		}
            
            if(system.ID == 247) //LEISERA
                {   if(missionVariables.trident_down == "LEISERA1" )
                        {mission.runScreen({messageKey: "trident_down_leisera1"});
                        missionVariables.trident_down = "LEISERA2A"    
                        }
                        
                    if(missionVariables.trident_down == "LEQUTEOR_REJECTED" )
                        {mission.runScreen({messageKey: "trident_down_leisera1alt"});
                        missionVariables.trident_down = "LEISERA2A"    
                        }
    					
    					
    				if(missionVariables.trident_down == "INTERVENTION" && !missionVariables.trident_down_leisera)
    				{mission.runScreen({messageKey: "trident_down_leiserarumour"});
    				missionVariables.trident_down_leisera = "SET"
    				++missionVariables.trident_down_rumours}	
    					
                }                   
            
            if(system.ID == 197) //DICEBE
    	
    		{if(missionVariables.trident_down == "DICEBE3")      
    			{
                missionVariables.trident_down = "DICEBE4"
                mission.runScreen(				  		  
    			    {
    			    messageKey: "trident_down_dicebe",
    			    choicesKey: "trident_down_cont"
    			    },
                    function(choice)
                        {
                        if(choice == 1)
                        mission.runScreen({messageKey: "trident_down_dicebeflee", choicesKey: "trident_down_launch"},
                                              
                            function(choice)                             
                            {   if(choice == 1)
                                {player.ship.fuel = 7.0
                                missionVariables.trident_down = "RACEEDAT2"
    			    player.bounty = 150
    			    mission.setInstructionsKey("trident_down_search7")
    			    player.ship.launch()	
    							}
                            });  
                        }); 
    			}
    		if(missionVariables.trident_down == "RACEEDAT2")
                {	
    			mission.runScreen(		  		  
                    {
    				messageKey: "trident_down_diceberepeatflee",
    				choicesKey: "trident_down_launch",
                    background: "ATU.png"
                    },
    							
                    function(choice)
    			    {
    				if(choice == 1)		
    			    {player.ship.fuel = 7.0
    			    player.ship.launch()}
                        });			
                }
    	    
    		if(missionVariables.trident_down == "CONFRONTATU")
    			{   missionVariables.trident_down = "CONFRONTATU2"
    			    mission.runScreen({messageKey: "trident_down_confrontATU2A", background: "ATU.png", choicesKey: "trident_down_cont"},
                    function(choice)
                        {
                        if(choice == 1)
                        mission.runScreen({messageKey: "trident_down_confrontATU2B", background: "ATU.png", choicesKey: "trident_down_cont"},
                                              
                            function(choice)                             
                            {   if(choice == 1)
                                mission.runScreen({messageKey: "trident_down_confrontATU2C", background: "ATU.png", choicesKey: "trident_down_confrontATUchoice"},
                                
    								function(choice)
    								{	if(choice == 1)
    								{mission.runScreen({messageKey: "trident_down_confrontATU2D", background: "ATU.png"});
    								missionVariables.trident_down = "HELPINGATU"
    								mission.setInstructionsKey("trident_down_deliverweapons")
    								player.ship.useSpecialCargo("ATU Weapons Shipment")
    								player.bounty = 0}
    								});
                            });
                        }); 
    			}  
    	
    		if(missionVariables.trident_down == "WEAPONSDELIVERED")
    		{   mission.runScreen({messageKey: "trident_down_ATUbrief1", background: "ATU.png"});
    		    missionVariables.trident_down = "ATURESCUE"
    		    mission.setInstructionsKey("trident_down_ATUrescue")
    		}
    	}
    	
    	
    	
    	if(system.ID == 135)  //RACEEDAT (should be 135)
    	
    	{	if(missionVariables.trident_down == "ACCEPTED")
    	    
    	    {   missionVariables.trident_down = "RACEEDAT1A"
    			mission.runScreen(				  		  
                    {
    				messageKey: "trident_down_raceedat1A",
    				choicesKey: "trident_down_cont",
                    background: "krabvideo.png"
                    },
    			function(choice)
    		    {
    			if(choice == 1)
    				
    			    {mission.runScreen({messageKey: "trident_down_raceedat1B"});
    			    missionVariables.trident_down = "RACEEDAT1B"
    			    mission.setInstructionsKey("trident_down_search")}
    		    });
    	    }
    		
    		
    		if(missionVariables.trident_down == "RACEEDAT2")  
    			{mission.runScreen({messageKey: "trident_down_raceedat4"});
                missionVariables.trident_down = "RACEEDAT5"
                player.bounty = 0}   
    		    
    		if(missionVariables.trident_down == "INFORMRACEEDAT")
    			{mission.runScreen({messageKey: "trident_down_helpraceedat2", choicesKey: "trident_down_raceedathelpchoice"},
    							
                    function(choice)
    				{
    				if(choice == 1)
    				
    			    {mission.runScreen({messageKey: "trident_down_raceedatchoiceagree"});
    			    mission.setInstructionsKey("trident_down_temage")
    			    missionVariables.trident_down = "HELPINGRACEEDAT"
    			    }
    				if(choice == 2)
    				
    			    {mission.runScreen({messageKey: "trident_down_raceedatchoicerefuse"});
    			    this.resetJumpcount()
    			    missionVariables.trident_down = "RACEEDATCHOICEREFUSE"
    				mission.setInstructionsKey(null)}    	
                        });			
    			}
    		
    		if(missionVariables.trident_down == "HELPINGATU")
    			{mission.runScreen({messageKey: "trident_down_raceedatquestion", choicesKey: "trident_down_raceedatquestionchoice"},
    							
                    function(choice)
    			    {
    				if(choice == 1)
    				
    			    {mission.runScreen({messageKey: "trident_down_helpraceedat2alt", choicesKey: "trident_down_raceedathelpchoice"},
    					       
    			    function(choice)
    			    {
    			    if(choice == 1)	
    			    {mission.runScreen({messageKey: "trident_down_raceedatchoiceagree"});
    			    mission.setInstructionsKey("trident_down_temage")
    			    missionVariables.trident_down = "HELPINGRACEEDAT"
    			    }
    			    if(choice == 2)	
    			    {mission.runScreen({messageKey: "trident_down_raceedatchoicerefuse"});
    			    this.resetJumpcount()
    			    missionVariables.trident_down = "RACEEDATCHOICEREFUSE"
    			    }   	
    			    });			       		       
    			    
    			    }
    				if(choice == 2)
    			    mission.runScreen({messageKey: "trident_down_raceedatkeepquiet"});	        	
                    missionVariables.trident_down = "HELPINGATUALT"});			
    		}
    		
    		
    		if(missionVariables.trident_down == "BODARENKODEBRIEFA" || missionVariables.trident_down == "BODARENKONEWS")
    			{
                mission.runScreen(				  		  
    			    {messageKey: "trident_down_bodarenkodebriefA", choicesKey: "trident_down_cont"},
                    function(choice)
                        {
                        if(choice == 1)
                            { mission.runScreen({messageKey: "trident_down_bodarenkodebriefB"});
                            missionVariables.trident_down = "BODARENKODEBRIEFB"
    						mission.setInstructionsKey(null)
    						this.resetJumpcount()
    						player.credits += 200000
    						System.infoForSystem(3,135).description = "Raceedat is currently under the protection of the ATU and has elected Timon Delaney as its new President.  Pilots are advised that Raceedat Station has now returned to operation and previous entry restrictions to the system have now been lifted."
    						System.infoForSystem(3,135).station = "coriolis"
    						System.infoForSystem(3,135).government = 6
    							}
                            });  
                        
    			}
    			
    		if(missionVariables.trident_down == "DEFENDRACEEDAT1")
    		
    			{mission.runScreen({messageKey: "trident_down_defendraceedatbrief"});
    		    missionVariables.trident_down = "DEFENDRACEEDAT2"
    			missionVariables.trident_down_bombercount = 0
    		    mission.setInstructionsKey(null)
    		    this.resetJumpcount()}
    			
    				
    		if(missionVariables.trident_down == "DEFENDRACEEDATSUCCESS")
    		
    			{mission.runScreen({messageKey: "trident_down_defendraceedatsuccess"});
    		    missionVariables.trident_down = "DEFENDRACEEDATSUCCESSNEWS1"
    			missionVariables.trident_down_bombercount = null
    		    mission.setInstructionsKey("trident_down_waitforinfo")
    		    this.resetJumpcount()}
    		
    		
    		
    		
    		
    	}
    	
    	if(system.ID == 42) //Zadige 42
    	{	if(missionVariables.trident_down == "COMMSTATIONBRIEFA")
    			{mission.runScreen({messageKey: "trident_down_commstationbriefA", background: "ATU.png", choicesKey: "trident_down_cont"},
    				
    			function(choice)
    			{
    			    if(choice == 1)
    				
    			    {mission.runScreen({messageKey: "trident_down_commstationbriefB", background: "ATU.png"});
    			    mission.setInstructionsKey("trident_down_commstation")
    				missionVariables.trident_down = "COMMSTATIONBRIEFC"}
    			});			
    		    
    			}
    	}
    	
    	if(system.ID == 223) //Temage 223
    	{	if(missionVariables.trident_down == "HELPINGRACEEDAT")
               {  	mission.runScreen({messageKey: "trident_down_agentbriefA", choicesKey: "trident_down_cont"},
                    function(choice)
                        {
                        if(choice == 1)
                        mission.runScreen({messageKey: "trident_down_jenssenbrief", background: "jenssen.png", choicesKey: "trident_down_cont"},
                                              
                            function(choice)                             
                            {   if(choice == 1)
                                mission.runScreen({messageKey: "trident_down_ezrabrief", background: "ezra.png", choicesKey: "trident_down_cont"},                           
    								function(choice)
    								{	if(choice == 1)
    								{mission.runScreen({messageKey: "trident_down_playfairbrief", background: "playfair.png"});
    								missionVariables.trident_down = "FINDAGENTS"
    								mission.setInstructionsKey("trident_down_agents")
    								missionVariables.trident_down_agent = 0
    								}
    							});
                            }); 
                        }); 
    			} 
    	}
    	
    	if(system.ID == 157) //Reinus
    	{	if(missionVariables.trident_down == "FINDAGENTS" && !missionVariables.trident_down_ezra)
    			{mission.runScreen({messageKey: "trident_down_ezrasearch"});
    		    missionVariables.trident_down_ezra = "ARRIVAL"}
    	}
    	
    	if(system.ID == 36) //Rilaan - Soviet HQ
    	{	if(missionVariables.trident_down == "DELANEYSUCCESSDEBRIEFA" || missionVariables.trident_down == "DELANEYDEADSECRET")
    			{mission.runScreen({messageKey: "trident_down_delaneysuccessdebriefA", background: "sovcoat.png", choicesKey: "trident_down_cont"},
    			function(choice)                             
                            {   if(choice == 1)
                                mission.runScreen({messageKey: "trident_down_delaneysuccessdebriefB", background: "sovcoat.png", choicesKey: "trident_down_cont"},
                                
    								function(choice)
    								{	if(choice == 1)
    								{mission.runScreen({messageKey: "trident_down_delaneysuccessdebriefC", background: "sovcoat.png"});
    								missionVariables.trident_down = "BIANTICOMMSTORY"
    								mission.setInstructionsKey("trident_down_bianti")
    								missionVariables.trident_down_agent = 0
    								}
    							});
                        }); 
    			}
    		if(missionVariables.trident_down == "DELANEYFAILDEBRIEF" || missionVariables.trident_down == "DELANEYDEADOPEN")
    		{mission.runScreen({messageKey: "trident_down_delaneyfaildebrief", background: "sovcoat.png"});
    		missionVariables.trident_down = "DEFENDRACEEDAT1"
    		mission.setInstructionsKey("trident_down_defendraceedat")}
    	}
    	
    	if(system.ID == 244) //Usisis - evacuation point
    	{if(missionVariables.trident_down == "DEFENDRACEEDATFAILDEBRIEF")
    		{mission.runScreen({messageKey: "trident_down_defendraceedatfaildebrief"});
    		missionVariables.trident_down = "DEFENDRACEEDATFAILNEWS"
    		mission.setInstructionsKey("trident_down_isanla")
    		System.infoForSystem(3,135).description = "Raceedat is currently being held under the control of the ATU.  Pilots are advised that Raceedat's Coriolis Station remains out of action, and should request docking instructions from the Orbital Transit Station run by the Agricultural Engineering Enterprise."
    		System.infoForSystem(3,135).station = "transit-station"
    		this.resetJumpcount()}
    	}
    	
    	if(system.ID == 15) //Isanla
    	{if(missionVariables.trident_down == "BODARENKOC")
    		
    	{if(player.ship.equipmentStatus("EQ_RADIO_MINE") == "EQUIPMENT_OK")
    		
    		{
    		mission.runScreen({messageKey: "trident_down_bodarenkobombA", choicesKey: "trident_down_cont"},
    		function(choice)
    					{	if(choice == 1)
    						{mission.runScreen({messageKey: "trident_down_bodarenkobombB"});
    						missionVariables.trident_down = "BODARENKOBOMBB"}
    					});	
    		}
    		
    	else
    	if(missionVariables.trident_down_jumpcount > 0)
    		{mission.runScreen({messageKey: "trident_down_bodarenkobombalt"})
    		missionVariables.trident_down_jumpcount = 0}
    	}
    		
    		
    		
    	if(missionVariables.trident_down == "DEFENDRACEEDATFAILESWDEBRIEFALT2")
    		{mission.runScreen({messageKey: "trident_down_defendraceedatfailisanlaA", choicesKey: "trident_down_cont"},
    		function(choice)
    					{	if(choice == 1)
    					mission.runScreen({messageKey: "trident_down_couragemedal", background: "couragemedal.png", choicesKey: "trident_down_cont"},
    						function(choice)
    						{	if(choice == 1)
    							{mission.runScreen({messageKey: "trident_down_defendraceedatfailisanlaC"});
    							this.resetJumpcount()
    							missionVariables.trident_down = "DEFENDRACEEDATFAILISANLAC"
    							mission.setInstructionsKey(null)}
    							});
                        }); 
    			}		
    	}
    	
    	if(system.ID == 65) //Bianti
    	{if(missionVariables.trident_down == "BIANTICOMMSTORY")
    		{mission.runScreen({messageKey: "trident_down_bianticommstory", background: "bianti.png"});
    		missionVariables.trident_down = "BIANTICOMMSTORYDELIVERED"
    		this.resetJumpcount()
    		mission.setInstructionsKey(null)}
    		
    	if(missionVariables.trident_down == "BIANTIESWSTORY")
    		{mission.runScreen({messageKey: "trident_down_biantieswstory", background: "bianti.png"});
    		missionVariables.trident_down = "BIANTIESWSTORYBREAK1"
    		mission.setInstructionsKey(null)
    		this.resetJumpcount()
    		}
    	}
    	
    	if(system.ID == 187) //Leenor
    	{if(missionVariables.trident_down == "INTERVENTION" && !missionVariables.trident_down_leenor)
    		{mission.runScreen({messageKey: "trident_down_leenorrumour"});
    		missionVariables.trident_down_leenor = "SET"
    		++missionVariables.trident_down_rumours
    		this.resetJumpcount()
    		}
    	}
    	
    	if(missionVariables.trident_down == "MACHINERYSCOOPEDA" || missionVariables.trident_down == "REPLAY")  //setup for the big four-way choice; can be any location
    	
                {   
                        mission.runScreen(				  		  
                        {
                        messageKey: "trident_down_machineryscoopeda",
                        choicesKey: "trident_down_cont"
                        },
    		
    		
                        function(choice)
    		    {
    			if(choice == 1)
    			mission.runScreen({messageKey: "trident_down_machineryscoopedb", choicesKey: "trident_down_fourway"},
                                              
                                function(choice)
                                            
                                    {   if(choice == 1)
    				
    					{mission.runScreen({messageKey: "trident_down_helpraceedat1"});
    					missionVariables.trident_down = "INFORMRACEEDAT"
    					mission.setInstructionsKey("trident_down_informraceedat")}
                                            // player now needs to head to main raceedat station if not already there
                                        	    
    				    if(choice == 2)	//confront the ATU
                                            {mission.runScreen({messageKey: "trident_down_confrontATU1"});
                                            mission.setInstructionsKey("trident_down_confrontATU")
                                            this.resetJumpcount
                                            missionVariables.trident_down = "CONFRONTATU"}    
                                            
                        if(choice == 3)	//intervene
                                            {mission.runScreen({messageKey: "trident_down_intervention"});
                                            mission.setInstructionsKey("trident_down_rumours")
    										missionVariables.trident_down_rumours = 0
                                            this.resetJumpcount
                                            missionVariables.trident_down = "INTERVENTION"}
    					
    				    if(choice == 4)	//do nothing
                                            {mission.runScreen({messageKey: "trident_down_donothing"});
                                            mission.setInstructionsKey(null)
                                            this.resetJumpcount
                                            missionVariables.trident_down = "DOINGNOTHING1"}	
                                    });  
    		    });    
    		}
            
            
            //keep this last bracket
            }
    		
    	//some bits for non-main station stuff
    	
    	
    	if(player.ship.dockedStation.hasRole("korshkov-station"))
                       
    		{if(missionVariables.trident_down == "LEISERA2A" || missionVariables.trident_down == "LEISERA1")
                {mission.runScreen({messageKey: "trident_down_leisera2a", choicesKey: "trident_down_cont", background: "korshlogo.png"}, function(choice)
                    {   if(choice == 1)
                        {mission.runScreen({messageKey: "trident_down_leisera2b", background: "korshlogo.png"});
                        mission.setInstructionsKey("trident_down_search5")
                        missionVariables.trident_down = "WITCHSPACE"
                        this.resetJumpcount()}
                    });                           
                }
            if(missionVariables.trident_down == "INTERVENTION" && !missionVariables.trident_down_leisera)
    			{mission.runScreen({messageKey: "trident_down_leiserarumour"});
    			missionVariables.trident_down_leisera = "SET"
    			++missionVariables.trident_down_rumours}
    		}
    		
    	
    	
    	
    	if(player.ship.dockedStation.hasRole("transit-station"))
    		
    		{	if(missionVariables.trident_down == "RACEEDAT5")
    		    {mission.runScreen({messageKey: "trident_down_transit_station", choicesKey: "trident_down_launch"},
    							
    			function(choice)
    			{
    			    if(choice == 1)
    				
    			    {missionVariables.trident_down = "RACEEDAT7"
    			    player.ship.launch()}
    			});			
    		    }
    			if(missionVariables.trident_down == "HELPINGATU" || missionVariables.trident_down == "HELPINGATUALT")
    		
    		    {mission.runScreen({messageKey: "trident_down_weaponsdelivered"});
    		    missionVariables.trident_down = "WEAPONSDELIVERED"
    		    mission.setInstructionsKey(null)
    		    player.ship.removeAllCargo()}
    			
    			if(missionVariables.trident_down == "ATUASSAULTSUCCESS")
    		
    			{mission.runScreen({messageKey: "trident_down_ATUassaultdebrief"});
    		    missionVariables.trident_down = "ASSAULTAFTERMATH1"
    		    mission.setInstructionsKey("trident_down_ATUwait")
    			System.infoForSystem(3,135).station = "transit-station"
    		    this.resetJumpcount()}
    			
    			if(missionVariables.trident_down == "ASSAULTAFTERMATH4")
                {
                mission.runScreen(				  		  
    			    {messageKey: "trident_down_bodarenkobriefA", background: "ATU.png", choicesKey: "trident_down_cont"},
                    function(choice)
                        {
                        if(choice == 1)
                        mission.runScreen({messageKey: "trident_down_bodarenkobriefB", background: "ATU.png", choicesKey: "trident_down_cont"},
                                              
                            function(choice)                             
                            {   if(choice == 1)
                                { mission.runScreen({messageKey: "trident_down_bodarenkobriefC", background: "ATU.png"});
                                missionVariables.trident_down = "BODARENKOC"
    							mission.setInstructionsKey("trident_down_bodarenko")
    							this.resetJumpcount()
    							
    							}
                            });  
                        }); 
    			}
    			
    		}
    		
    	if(system.ID == 85 && player.ship.dockedStation.hasRole("ergeso-casino"))
    	{	if(missionVariables.trident_down == "ATURESCUESUCCESS")
    			{mission.runScreen({messageKey: "trident_down_ATUrescuesuccess"});
    		    missionVariables.trident_down = "ASSAULTBRIEFA"
    		    mission.setInstructionsKey("trident_down_ATUrescuedebrief")
    			this.resetJumpcount()}
    	
    		if(missionVariables.trident_down == "ATURESCUEFAIL")
    			{mission.runScreen({messageKey: "trident_down_ATUrescuefail"});
    		    missionVariables.trident_down = "COMMSTATIONBRIEFA"
    		    mission.setInstructionsKey("trident_down_ATUrescuedebrief")
    			this.resetJumpcount()}
    			
    		else
    		if(!this.casinoVisit)
    		{mission.runScreen({messageKey: "trident_down_casino_out"})
    		this.casinoVisit = true
    		return;}
    		
    	}
    		
    	if(player.ship.dockedStation.hasRole("imperator")) // this ship only spawned in specific circumstances
    	{
    		if(missionVariables.trident_down == "ASSAULTBRIEFA" || missionVariables.trident_down == "COMMSTATIONDISABLED")
    		{mission.runScreen({messageKey: "trident_down_ATUassaultbrief", background: "ATU.png"});
    		missionVariables.trident_down = "ASSAULTBRIEFB"
    		mission.setInstructionsKey("trident_down_ATUraceedatrendezvous")} 	  	
    	}	
      
    }
    
    //ship appearances after witchspace
    
    this.shipExitedWitchspace = function()
    {
        if(galaxyNumber == 3)
    	{
    	if(!missionVariables.trident_down_completed)
        {++missionVariables.trident_down_jumpcount
    	missionVariables.novacount = 0}
    	
    	this.setupSystems()
        
        if(missionVariables.trident_down == "LEENOR1" && missionVariables.trident_down_jumpcount > 2)
        {   player.commsMessage("Incoming Message: please report to the nearest GalCop station as soon as possible.", 10)
            missionVariables.trident_down = "LEENOR2"}
            
            
        if(missionVariables.trident_down == "LEENOR4" && missionVariables.trident_down_jumpcount > 0)
        {   player.commsMessage("Urgent Message: please make contact with Security Chief Amon Ghal'ut as soon as possible.", 10)
            missionVariables.trident_down = "LEENOR5"}
            
        if(missionVariables.trident_down == "LEISERA1" && missionVariables.trident_down_jumpcount == 3)
        {   system.legacy_addShips("ATU-leader", 1)
            system.legacy_addShips("ATU", 4)}        
        
        if(system.ID == -1 && missionVariables.trident_down == "WITCHSPACE")
        {   system.legacy_addShips("wreckage", 10)
            system.legacy_addShips("abandoned-escape-pod", 1)}
    		
    	
        if(missionVariables.trident_down == "DICEBE1" && missionVariables.trident_down_jumpcount == 4)
        {   player.commsMessage("Commander, you have a message from Security Chief Ghal'ut.  Please report to the nearest spaceport as soon as possible.", 10)
            missionVariables.trident_down = "DICEBE2"}
    	
        if(system.ID == 197 && missionVariables.trident_down == "CONFRONTATU")
    	player.commsMessage("ATTENTION: You are under arrest on the order of the ATU.  You are required to Dicebe Station immediately.")
    	
    	if(system.ID == 135)
    	{	if(missionVariables.trident_down == "ATURESCUE")
    		{	system.legacy_addSystemShips("ambassador-ship", 1, 1.0)
    			player.commsMessage("Prisoner Transport DK-322: You are cleared for launch.")
    			this.resetJumpcount()
    		}
    		if(missionVariables.trident_down == "ASSAULTBRIEFB")
    		{system.legacy_addShipsAt("imperator", 1, "pwm", [7696.39, 40254.17, 175973.12])
    		system.legacy_addShipsWithinRadius("enemybellabomber", 5, "pwm", [7696.39, 40254.17, 175973.12], 10000)
    		system.legacy_addSystemShips("police", 10, 0.85)
    		system.legacy_addSystemShips("comgrc", 1, 0.85)
    		player.bounty = 500
    		player.commsMessage("Commodore Delaney: Commander, we're just about to launch our assault.  Join the bomber formations and protect them from enemy fighters", 10)
    		}
    		
    		if(missionVariables.trident_down == "ESWBRIEFB")
    		{system.legacy_addShipsAt("imperator", 1, "pwm", [7696.39, 40254.17, 175973.12])
    		system.legacy_addShipsWithinRadius("enemybellabomber", 5, "pwm", [7696.39, 40254.17, 175973.12], 10000)
    		system.legacy_addSystemShips("police", 5, 0.8)
    		system.legacy_addSystemShips("saiph-escort", 10, 0.75)
    		player.bounty = 500
    		player.commsMessage("Amon Ghal'ut: OK, Commander.  Locate the ATU fleet and then call in the squadron using the homing beacon.", 10)
    		}
    				
    	}
    	
    	if(system.ID == 179 && missionVariables.trident_down == "COMMSTATIONBRIEFC")
    	player.commsMessage("Commander, you should be able to pick up the comms station on your compass - look for an X-beacon.  Good luck!")
    	
    	if((system.ID == 91 && missionVariables.trident_down == "COMMSTATIONDISABLED") || (system.ID == 42 && missionVariables.trident_down == "ASSAULTBRIEFA"))
    		{system.legacy_addSystemShips("imperator", 1, 0.1)
    		system.legacy_addSystemShips("saiph-escort", 8, 0.1)
    
    		player.commsMessage("Commodore Delaney: Commander, I am on board the ISS Imperator.  Send a request for docking instructions once you are in range.", 10)	
    		}
    		
    	if(system.ID == 85) // Ergeso  
    		{
            if(system.countShipsWithRole("jenssen-ship") == 0)
    		  {
    		  if(missionVariables.trident_down == "FINDAGENTS" && !missionVariables.trident_down_jenssen)
    		   {system.legacy_addShipsWithinRadius("jenssen-ship", 1, "pwm", [-28713.0, -31711.0, 9742.0], 5000)
    		   this.resetJumpcount()}
    		}}
    
    	if(system.ID == 130) // Cebitiza 
    		{if(missionVariables.trident_down == "FINDAGENTS" && !missionVariables.trident_down_playfair)
    		   {system.legacy_addShipsWithinRadius("playfair-ship", 1, "pwm", [91714.0, 10790.0, -43113.0], 5000)
    		   this.resetJumpcount()}
    		}
    		
    	if(system.ID == 147 && missionVariables.trident_down == "DELANEYOFFERACCEPTD")
        system.legacy_addSystemShips("delaney-ship", 1, 0.1)   
    		
    	if(missionVariables.trident_down == "ATUASSAULTSUCCESS")
    	{System.infoForSystem(3,135).station = "transit-station"}
    	
    	if(missionVariables.trident_down == "ASSAULTAFTERMATH3" && missionVariables.trident_down_jumpcount > 6)
    	{player.commsMessage("Commander, you are required by Commodore Delaney.  Please make your way to Raceedat as quickly as possible.", 10)
    	missionVariables.trident_down = "ASSAULTAFTERMATH4"}
    	
    	if(system.ID == 15) // Isanla 
    		{if(missionVariables.trident_down == "BODARENKOBRIEFC")
    		   {player.commsMessage("Incoming message: Warning - this is a restricted system.  No unauthorised entry is permitted.  All vessels must immediately report to Isanla Station for security clearance.")}
    		}
    	
    	if(missionVariables.trident_down == "BODARENKODEBRIEFD")
    	{	this.randomNumber = (Math.random())
    		if(randomNumber < 0.2)
    			system.legacy_addShips("esw-assassin", 1)
    	}
    	
    	if(missionVariables.trident_down_agent == 3)
    	{player.commsMessage("Well done, Commander,  That's the three agents dealt with.  We can now go ahead and arrest the dissidents - we'll make further contact with you soon.", 10)
    	missionVariables.trident_down = "CRACKDOWN1"
    	missionVariables.trident_down_jenssen = null
    	missionVariables.trident_down_playfair = null
    	missionVariables.trident_down_ezra = null
    	missionVariables.trident_down_agent = null
    	this.resetJumpcount()
    	mission.setInstructionsKey("trident_down_waitforinfo")
    	}
    	
    	
    	if(missionVariables.trident_down == "CRACKDOWN3" && missionVariables.trident_down_jumpcount == 2)
    	{player.commsMessage("Incoming message: Commander, you are required by Colonel Bodarenko of the Ministry of Internal Affairs.  Please make your way to the nearest Security Police station as soon as possible.", 10)
    	missionVariables.trident_down = "CRACKDOWN4"
    	this.resetJumpcount()
    	mission.setInstructionsKey("trident_down_securityrendezvous")
    	}
    	
    	if(missionVariables.trident_down == "DELANEYDEADOPEN" || missionVariables.trident_down == "DELANEYDEADSECRET")
    	{if(missionVariables.trident_down_jumpcount == 3)
    	{player.commsMessage("iNews bulletin available now at your nearest station.")}
    	}
    	
    	if(missionVariables.trident_down == "DEFENDRACEEDATSUCCESSDEBRIEF1" && missionVariables.trident_down_jumpcount == 4)
    	{player.commsMessage("Incoming message: Commander, please make your way to the nearest Security Police station as soon as possible.", 10)
    	missionVariables.trident_down = "DEFENDRACEEDATSUCCESSDEBRIEF2A"
    	this.resetJumpcount()
    	mission.setInstructionsKey("trident_down_securityrendezvous")
    	}    
    	
    	if(missionVariables.trident_down == "BIANTICOMMSTORY" && missionVariables.trident_down_jumpcount == 3)
    	system.legacy_addShips("ATU", 4)
    	
    	if(missionVariables.trident_down == "BIANTICOMMSTORYBREAK4B" && missionVariables.trident_down_jumpcount == 6)
    	{player.commsMessage("Incoming message: Commander, please make your way to the nearest Security Police station as soon as possible.", 10)
    	missionVariables.trident_down = "BIANTICOMMSTORYBREAK5"
    	this.resetJumpcount()
    	mission.setInstructionsKey("trident_down_securityrendezvous")
    	}
    	
    	if(missionVariables.trident_down == "COMMTHREAT")
    	
    	{	if(system.ID == 25 || system.ID == 243 || system.ID == 186 || system.ID == 80 || system.ID == 65)
    		{system.legacy_addSystemShips("suslov-ship", 1, 0.05)
    		this.resetJumpcount()}
    		
    		if(missionVariables.trident_down_jumpcount == 1)
    		{missionVariables.trident_down = "SUSLOVESCAPE"
    		player.commsMessage("The Communist agent has escaped!  He will soon be reaching Bianti!")
    		this.resetJumpcount()}
    	}
    	
    	}
    }
    
    this.shipWillLaunchFromStation = function()
    {
      
        if(galaxyNumber == 3)
    	{
    		
    	this.setupSystems()
    	
    	if(missionVariables.trident_down == "RACEEDAT2" && system.ID == 197)
        {   if(system.countShipsWithRole("ATU") == 0)
            system.legacy_addSystemShips("ATU", 4, 1.0)
        }
        
        if(system.ID == 135)
    	{	if(missionVariables.trident_down == "RACEEDAT5")
    		{   if(system.countShipsWithRole("transitpatrol-leader") == 0)
    		    system.legacy_addShipsAtPrecisely("transitpatrol-leader", 1, "pwm", [40880, 59822, 34566])
    		}
    	
    		if(missionVariables.trident_down == "RACEEDAT7")
    		{   if(system.countShipsWithRole("batkov-shuttle") == 0)
    			system.legacy_addShipsWithinRadius("batkov-shuttle", 1, "pwm", [35673, -7394, -34644], 10000)
    		}
    		
    		if(missionVariables.trident_down == "DEFENDRACEEDAT2")
    		{   if(system.countShipsWithRole("enemybellabomber") == 0)
    			system.legacy_addShipsAt("imperator", 1, "pwm", [8198.31, 50200.91, 123632.41])
    			system.legacy_addShipsWithinRadius("enemybellabomber", 5, "pwm", [8198.31, 50200.91, 123632.41], 10000)
    			system.legacy_addSystemShips("saiph-escort", 10, 0.75)
    			system.legacy_addSystemShips("police", 10, 0.9)
    			system.legacy_addSystemShips("comgrc", 1, 0.9)
    			player.commsMessage("Captain Suslov: Attention all ships - we have the enemy fleet on our radar.  Check your compass for X-beacons.")	
    		}
    		
        }
    	
    	if(system.ID == 157)
        {   if(missionVariables.trident_down_ezra == "ARRIVAL")
            {   if(system.countShipsWithRole("ezra-ship") == 0)
    		    system.legacy_addShips("ezra-ship", 1)
    		}
        }
    	
    	
    	
    	if(system.ID == 130) // Cebitiza 
    		{if(missionVariables.trident_down == "FINDAGENTS" && !missionVariables.trident_down_playfair)
    		   {if(system.countShipsWithRole("playfair-ship") == 0)
    		   system.legacy_addShipsWithinRadius("playfair-ship", 1, "pwm", [91714.0, 10790.0, -43113.0], 5000)
    		   }
    		}
    		
    		
    	if(system.ID == 85) // Ergeso  
    		{
    		if(system.countShipsWithRole("jenssen-ship") == 0)
    		   {if(missionVariables.trident_down == "FINDAGENTS" && !missionVariables.trident_down_jenssen)
    		   system.legacy_addShipsWithinRadius("jenssen-ship", 1, "pwm", [-28713.0, -31711.0, 9742.0], 5000)
    		   this.resetJumpcount()}
    		  
    		  }
    		
    	
    	
    	
    
    	
    	
    	
    	if(system.ID == 135)
    	{if(missionVariables.trident_down == "BODARENKOC")
    	{if(player.ship.equipmentStatus("EQ_RADIO_MINE") !== "EQUIPMENT_OK")
    		player.commsMessage("Commander, you still have equipment to pick up at the Transit Station.")
    	}}
    	
    	
    	
    	if(system.ID == 15)
        {   if(missionVariables.trident_down == "BODARENKOBOMBB")
            {   if(system.countShipsWithRole("bodarenko-ship") == 0)
    		    system.legacy_addSystemShips("bodarenko-ship", 1, 1.0)}
        }
    	
    	}
        
    }
    
    this.shipWillEnterWitchspace = function()
    {
    	if(missionVariables.trident_down == "ATURESCUE")
    	{if(system.ID == 135 && missionVariables.trident_down_jumpcount == 0)
    	{missionVariables.trident_down = "ATURESCUEFAIL"
    	player.commsMessage("You have failed to rescue the ambassador. Debrief at the Ergeso Casino.")}
    	}
    }
    
    
    
    this.startBatkovTimer = function()
    
    {
    if(!this.batkovTimer)
    
      {this.batkovTimer = new Timer(this, this.batkov, null, 1)
      this.batkov_count = 0}
      else 
      this.batkovTimer.start();
    	
    }
    
    this.batkov = function()
    
    
    {++this.batkov_count
    	if(this.batkov_count == 10)
    	player.commsMessage("Captain Suslov: Good work, Commander.  Make sure to sieze the cargo - we may need it as evidence")
    	if(this.batkov_count == 30)
    	{player.commsMessage("Captain Suslov: Once you're done, return to Raceedat Station.")
    	this.batkovTimer.stop();
    	delete this.batkovTimer}
    	
    }
    
    
    this.startCountdown = function()
    
    { if(!this.bodarenkoTimer)
    
      {this.bodarenkoTimer = new Timer(this, this.countdown, null, 1)
      this.bodarenko_count = 11}
      else 
      this.bodarenkoTimer.start();
    }
    
    this.countdown = function()
    { --this.bodarenko_count
      if(this.bodarenko_count >= 0)
      {player.consoleMessage("Detonation in "+this.bodarenko_count+" seconds")
      var td_countdown = new SoundSource;
    	td_countdown.sound = "td_countdown.ogg";
    	td_countdown.loop = false;
    	td_countdown.play();}
      if(this.bodarenko_count == 0)
      { player.consoleMessage("Detonating...")
    	
    	if(missionVariables.trident_down == "BODARENKOBOMBB")
    	{if(system.countShipsWithRole("bodarenko-ship") == 1)
    	{var bodarenko = system.shipsWithRole("bodarenko-ship")[0]
    	bodarenko.spawn("flare", 40)
    	bodarenko.explode()
    	var td_bomb = new SoundSource;
    	td_bomb.sound = "td_bang.ogg";
    	td_bomb.loop = false;
    	td_bomb.play();
        missionVariables.trident_down = "BODARENKODEAD"
        mission.setInstructionsKey("trident_down_bodarenkoreturn", "trident_down")
        missionVariables.trident_down_jumpcount = 0}}
    	else
    	{player.ship.spawn("flare",40)
    	var td_bomb = new SoundSource;
    	td_bomb.sound = "td_bang.ogg";
    	td_bomb.loop = false;
    	td_bomb.play();
    	player.ship.explode()
    	this.bodarenkoTimer.stop();
    	delete this.bodarenkoTimer}
      }
    	
    	
    	if(this.bodarenko_count == -5)
    	player.commsMessage("Help! The Colonel's been killed!  Quick, find the assassin!")
    	
    	if(this.bodarenko_count == -10)
    	{player.bounty = 500
    	this.wingmanTargetPlayer()
    	this.bodarenkoTimer.stop();
    	delete this.bodarenkoTimer}
    	
    }
    
    this.wingmanTargetPlayer = function()
    {
    	this.wingman = system.shipsWithRole("wingman")
    	for(var i=0; i<this.wingman.length; i++)
    	{wingman[i].target = player.ship
    	wingman[i].setAI("policeInterceptAI.plist")}
    }
    
    this.setPlanetInfo = function()
    
    {System.infoForSystem(3,65).description = "Bianti is home to The Bianti Telegraph, the leading independent news agency in the galaxy."
    System.infoForSystem(3,2).description = "Lavebe is  famous for its inhabitants' ancient loathing of casinos but plagued by occasional solar activity.  It is also home to the headquarters of Executive SpaceWays."
    System.infoForSystem(3,34).description = "Lequteor is a major shipbuilding centre and home to many leading design and engineering firms.  The well-respected Jane's Shipyard Intelligence also has its regional headquarters here."
    System.infoForSystem(3,187).description = "Leenor is a highy-unstable system and is rumoured to be the main operational base of the notorious League of Anarchists."
    System.infoForSystem(3,247).description = "This world is mildly famous for its pink oceans and mud tennis.  The highly-secretive Korshkov design bureau is believed to maintain an advanced research and test facility here."
    System.infoForSystem(3,197).description = "Dicebe is one of the most technologically-advanced systems in the galaxy, and is leading the drive to spread democracy throughout the Galactic Co-Operation of Planets."
    System.infoForSystem(3,135).description = "Raceedat is the galaxy's leading Communist system, and is in fierce economic rivalry with its democratic neighbour, Dicebe."
    System.infoForSystem(3,135).station = "raceedat-station"
    missionVariables.trident_down_planetinfo = "SET"}
    
    this.setupSystems = function()
    
    {	if(system.ID == 2) //Lavebe
    	{if(system.countShipsWithRole("strelka") < 2)
    	system.legacy_addSystemShips("strelka", 1, 1.0)}	
    	
    	if(system.ID == 247) //Korshkov
    	{if(system.countShipsWithRole("korshkov-station") == 0)
    	{system.legacy_addShipsAtPrecisely("korshkov-station", 1, "pwm", [179319.22, 88588.67, 81225.60])
    	system.shipsWithRole("korshkov-station")[0].orientation = [1,0,0,0]
    	system.legacy_addShipsAtPrecisely("korshkov-ad", 1, "pwm", [179319.22, 88588.67, 71225.60])
    	system.shipsWithRole("korshkov-ad")[0].orientation = [1,0,0,0]}
    	}
    	
    	if(system.ID == 135) //Raceedat
    	{if(system.countShipsWithRole("transit-station") == 0)
    		{system.legacy_addShipsAtPrecisely("transit-station", 1, "pwm", [35673.0, -7394.0, -34644.0])
    		system.legacy_addShipsAtPrecisely("griff_buoy", 1, "pwm", [35673.0, -7394.0, -44644.0])
    		system.shipsWithRole("transit-station")[0].orientation = [1,0,0,0]}
    	
    	this.astromine = system.shipsWithRole("astromine")
    	for (var i=0; i<this.astromine.length; i++)
    		{astromine[i].remove()}
    		 		 
    	if(system.countShipsWithRole("raceedat-astromine") == 0)
    	system.legacy_addShipsAt("raceedat-astromine", 1, "pwm", [-10424.80, -1980.55, -320651.47])}
    	
    	if(system.ID == 130) //Cebitiza
    	{if(system.countShipsWithRole("tourist-info") == 0)
    	system.legacy_addShipsAtPrecisely("tourist-info", 1, "pwm", [91714.0, 10790.0, -43113.0])}
    	
    	if(system.ID == 179)
    	{if(system.countShipsWithRole("commstation") == 0)
    	{system.legacy_addShipsAtPrecisely("commstation", 1, "pwm", [132178.52, -177615.34, 698054.56])
    	system.legacy_addShipsWithinRadius("guarddrone", 6, "pwm", [132178.52, -177615.34, 698054.56], 15000)
    	system.legacy_addShipsWithinRadius("minesweeper", 6, "pwm", [132178.52, -177615.34, 698054.56], 25000)}
    	}
    	
    	if(system.ID == 85)
        { 
            if(system.countShipsWithRole("ergeso-casino") == 0)
    			system.legacy_addShipsAtPrecisely("ergeso-casino", 1, "pwm", [-28713.0, -31711.0, 9742.0])
    			
        }	
    }