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])
}
}
|