| Path |
| Scripts/assassins_rebooted_assassins_main_script.js |
notYetParsed |
| Scripts/assassins_rebooted_assassins_populator.js |
"use strict";
this.name = "assassins_rebooted_assassins_populator.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Custom Populators (attached in PlanetInfo) for certain systems in G7 modified by the Assassins Guild";
this.licence = "CC BY-NC-SA 3.0";
// This script defines custom populators for the systems modified by Assassins. At these systems the police (and who the are loyal to) and the
// ships appearing in the spacelanes are customised. Most of the additions are done by the main script. However, where customised ships appear
// in place of the normal police, pirates, traders or shuttles, the assassins versions of this ships are called by customised roles and no
// ships are added by the standard Oolite populator at these systems. OXZ ships and stations (including mission ships) will still appear.
// Orramor Populator
this.assassins_rebooted_orramor_systemWillPopulate = function() {
this.systemWillPopulate();
}
// Orramor Re-Populator
this.assassins_rebooted_orramor_systemWillRepopulate = function() {
this.systemWillRepopulate();
} |
| Scripts/assassins_rebooted_augeas_hunter_conditions.js |
"use strict";
this.name = "assassins_rebooted_augeas_hunter_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing hunters in the Beatle System";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the assassins phantom ships only replace hunters in the Beatle system (rather than in the game generally).
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 203) return true;
return false;
} |
| Scripts/assassins_rebooted_battlebot_ateslete_police_conditions.js |
"use strict";
this.name = "assassins_rebooted_battlebot_ateslete_police_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing hunters in the Beatle System";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that BattleBots only replace police ships in the Ateslete system (rather than in the game generally) and only once the development level variable
// has reached at least 3.
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 39 && missionVariables.assassins_rebooted_battlebot_development_level === 3) return true;
if (galaxyNumber === 6 && system.ID === 39 && missionVariables.assassins_rebooted_battlebot_development_level === "Complete") return true;
return false;
} |
| Scripts/assassins_rebooted_black_mesa.js |
"use strict";
this.name = "assassins_rebooted_black_mesa.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and spawn an asteroid field.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Spawn an asteroid field of glowing asteroids.
var pos = this.ship.position;
system.addShips("assassins_rebooted_miner_rock",45,pos,25000);
// Add a distress beacon 10 kms ahead of the station to broadcast periodic distress messeges once the player comes within range.
system.legacy_addShipsAtPrecisely("assassins_rebooted_rebel_distress_beacon", 1, "abs", this.ship.position.add(this.ship.heading.multiply(10000)))
// Add two groups of 3 Mongoose fighters with an AI to go to the witchpoint. If the player is flying in from the witchpoint they may encounter one or both groups on their
// way to the Reble Facility. The imperial ships will attack the player if encountered.
system.addShips("assassins_rebooted_mongoose_imperial_outlaw_mission_witchpoint",1,pos,25000);
system.legacy_addShipsAtPrecisely("assassins_rebooted_mongoose_imperial_outlaw_mission_witchpoint", 1, "abs", this.ship.position.add(this.ship.heading.multiply(50000)))
// Three Groups of 5 Mongoose fighters are added in a line between the Facility and the Main Station at 250, 500 and 750kms from the Facility. These ships will fly to the
// main station and attack the player if they encounter them. If the player is flying to the Facility from the main station, it is likley that they will encounter some of these ships.
system.legacy_addShipsAtPrecisely("assassins_rebooted_mongoose_imperial_outlaw_mission_main_station", 1, "abs", this.ship.position.add(this.ship.heading.multiply(250000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_mongoose_imperial_outlaw_mission_main_station", 1, "abs", this.ship.position.add(this.ship.heading.multiply(500000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_mongoose_imperial_outlaw_mission_main_station", 1, "abs", this.ship.position.add(this.ship.heading.multiply(750000)))
delete this.shipSpawned;
}
// The Station is normally invunerable to attack, but at the end of the text adventure the damaged station's reactor goes critical and the station is attacked by imperial ships
// with unique roles. As soon as the station's AI detects the special ships spawned as the player launches at the end of the text adventure, it will switch states to pause for
// ten seconds before executing becomeExplosion. It will also be sent to this 10 second countdown as soon as any of the imperial ships land a hit on it. Either way, the station
// blows up 10 seconds after the player launched. Once the station blows up, the imperials will attack the player or if the player has left scanner range they will fly to the
// main planet looking for the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_demon_text_adventure") > -1 || whom.roles.indexOf("assassins_rebooted_shuttle_text_adventure_station_attacker") > -1
|| whom.roles.indexOf("assassins_rebooted_mongoose_text_adventure_station_attacker") > -1)
{
this.ship.reactToAIMessage("SPECIAL_IMPERIAL_ATTACK");
return;
}
// End of this.shipBeingAttacked
}
|
| Scripts/assassins_rebooted_chaotic_ship.js |
"use strict";
this.name = "assassins_rebooted_chaotic_ship.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to prevent friendly fire between chaotic alligned ships and give each ship a random boost to their starting bounty.";
this.shipSpawned = function()
{
// Random Boost to the base bounty.
this.ship.bounty += Math.random()*7+2;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another chaotic ship
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_corpse_bride_station.js |
"use strict";
this.name = "assassins_rebooted_corpse_bride_station.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime.";
// Code borrowed from "Anarchies" via "Fuel Station" for convenience.
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
// If the player attacks the Corpse Bride then it will refuse docking permission although normally it will permit all ships to dock regardless of legal status.
// If the player has attacked the station then they will be thrown out with a forcable launch if they dock manually.
// If the stage variable is 3 (the meet the guidmaster at the Corpse Bride, the the mission screen is given preference and no arrival message is shown and the player
// will be allowed to dock normally on this occasion.
// The hostile status is re-set on making a jump, so the Corpse Bride will cease being hostile if it is returned to later.
missionVariables.assassins_rebooted_corpse_bride_hostile = "Yes";
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_democratic_control_conditions.js |
"use strict";
this.name = "assassins_rebooted_democratic_control_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing police ships at Eszausve depending on mission variables setting the stage the civil war is at.";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the Eszausve democratic rebels only replace police ships at Eszausve (rather than in the game generally).
// And only when the rebels are in control of the system.
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 13 && missionVariables.assassins_rebooted_civil_war === 2) return true;
if (galaxyNumber === 6 && system.ID === 13 && missionVariables.assassins_rebooted_civil_war === 3) return true;
if (galaxyNumber === 6 && system.ID === 13 && missionVariables.assassins_rebooted_civil_war === "Over") return true;
return false;
} |
| Scripts/assassins_rebooted_echo_of_hoth.js |
"use strict";
this.name = "assassins_rebooted_echo_of_hoth.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns associated ships and mission ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
var pos = this.ship.position;
// Add an asteroid field around the Former Prison.
system.addShips("assassins_rebooted_miner_rock",45,pos,25000);
// Add a group of 5 Imperial Mongoose Fighters with AIs to go to the Base and attack both the Base and non-imperial ships.
system.addShips("assassins_rebooted_imperial_mongoose_outlaw_prison_attacker",1,pos,5000);
// Add a flight of 2 flights of Reble Sonorans (6 ships in total) with AIs to patrol around the Base.
system.addShips("assassins_rebooted_local_patrol_rebel_sonoran_leader",1,pos,10000);
system.addShips("assassins_rebooted_local_patrol_rebel_sonoran_leader",1,pos,15000);
// Add a group of 3 Imperial Scorpions with AIs to go to the Base and attack both the Base and non-imperial ships.
system.addShips("assassins_rebooted_imperial_scorpion_outlaw_prison_attacker",1,pos,18000);
// Add another group of 5 Imperial Mongoose Fighters with AIs to go to the Base and attack both the Base and non-imperial ships.
system.addShips("assassins_rebooted_imperial_mongoose_outlaw_prison_attacker",1,pos,20000);
// Add a group of 3 Imperial Shuttles with AIs to go to the Base and attack both the Base and non-imperial ships.
system.addShips("assassins_rebooted_imperial_shuttle_outlaw_prison_attacker",1,pos,22000);
// Add another group of 5 Imperial Mongoose Fighters with AIs to go to the Base and attack both the Base and non-imperial ships.
system.addShips("assassins_rebooted_imperial_mongoose_outlaw_prison_attacker",1,pos,24000);
// Add a second wave of imperial mongoose fighters approaching the base, starting 50kms from the base.
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_mongoose_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(50000)))
// Set up some battles in the lane between the base and the main station Surviving imperial ships will go to the base. Surviving rebles will pick a random destination and go to it.
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(79000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_scorpion_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(80000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(81000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_shuttle_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(110000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_shuttle_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(150000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(155000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_mongoose_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(190000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(200000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_scorpion_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(230000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(235000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(240000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_mongoose_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(270000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_shuttle_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(300000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_mongoose_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(330000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(335000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(340000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_mongoose_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(370000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(375000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(400000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_shuttle_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(410000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_mongoose_outlaw_witchpoint_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(450000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_shuttle_outlaw_witchpoint_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(475000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(480000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(490000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_mongoose_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(500000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_mongoose_outlaw_station_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(525000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(530000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_scorpion_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(560000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(565000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(570000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(575000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_mongoose_outlaw_station_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(610000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_shuttle_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(630000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_scorpion_outlaw_station_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(650000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(655000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(660000)))
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(665000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_imperial_shuttle_outlaw_prison_attacker", 1, "abs", this.ship.position.add(this.ship.heading.multiply(695000)))
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_estiri_conditions.js |
"use strict";
this.name = "assassins_rebooted_estiri_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing shuttles and traders in the Orramaor System";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the assassins Naval Sidewinders only replace police ships in the Estiri system (rather than in the game generally).
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 82) return true;
return false;
} |
| Scripts/assassins_rebooted_geteve_control_drone1.js |
"use strict";
this.name = "assassins_rebooted_geteve_control_drone1.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Give it a name.
var bot_name = expandDescription("[assassins-battlebot_type11_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_geteve_control_drone2.js |
"use strict";
this.name = "assassins_rebooted_geteve_control_drone2.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Give it a name.
var bot_name = expandDescription("[assassins-battlebot_type12_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_graviton_missile.js |
"use strict";
this.name = "assassins_rebooted_graviton_missile.js";
this.author = "LittleBear - modified version of phkb's script from Missiles & Bombs OXZ";
this.copyright = "2017 / 2025";
this.description = "Runs deal energy damage function";
this.version = "1.0";
this.perform_damage_missile = function() {
this.ship.dealEnergyDamage(999999, 25.0, 0.10);
}
|
| Scripts/assassins_rebooted_griff_hunter_conditions.js |
"use strict";
this.name = "assassins_rebooted_griff_hunter_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing hunters in the Ateslete System";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the assassins tourist ships only replace hunters in the Ateslete system (rather than in the game generally).
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 39) return true;
return false;
} |
| Scripts/assassins_rebooted_griff_research_orbital_base.js |
"use strict";
this.name = "assassins_rebooted_griff_research_orbital_base.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also Spawns its associated ships nearby.";
// Code borrowed from "Anarchies" via "Fuel Station" for convenience.
this.shipSpawned = function()
{
// Turn the Station's dock to face the main system station.
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Add the prototype battlebots and control node if the development level variable is at 0 (ie they havent built the working type yet in the OXZ's story).
if (missionVariables.assassins_rebooted_battlebot_development_level === 0) {
system.legacy_addShipsAtPrecisely("assassins_rebooted_prototype_battlebot_node", 1, "abs", this.ship.position.add(this.ship.heading.multiply(9000)))
system.addShips("assassins_rebooted_prototype_battlebot", 15, this.ship.position, 10000);
}
// When the variable is at 1, Unarmed Naval BattleBots are being tested
if (missionVariables.assassins_rebooted_battlebot_development_level === 1) {
system.legacy_addShipsAtPrecisely("assassins_rebooted_prototype_battlebot_node", 1, "abs", this.ship.position.add(this.ship.heading.multiply(9000)))
system.addShips("assassins_rebooted_prototype_battlebot_type2", 15, this.ship.position, 10000);
}
// When the variable is at 2, a Military Control Drone with Military BattleBot escorts patrols the base and will attack thargoids and criminals.
// An alternative version of the Positronic Brain also appears when the development level is at 2. It will now be testing Unarmed BattleBot Interceptors, who along with the working
// drone and BattleBots are immune to being shut down by ECM.
if (missionVariables.assassins_rebooted_battlebot_development_level === 2) {
system.legacy_addShipsAtPrecisely("assassins_rebooted_navy_control_drone_local_patrol", 1, "abs", this.ship.position.add(this.ship.heading.multiply(15000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_prototype_battlebot_node_alt", 1, "abs", this.ship.position.add(this.ship.heading.multiply(9000)))
system.addShips("assassins_rebooted_prototype_battlebot_type3", 10, this.ship.position, 10000);
}
// When the variable is at 3, or the development is complete, the Control Drone with BattleBot escorts appears as before. The Brain no longer appears and instead
// a squad of BattleBot Intercepters patrol the base along with the Control Drone and BattleBot escorts..
if (missionVariables.assassins_rebooted_battlebot_development_level === 3 || missionVariables.assassins_rebooted_battlebot_development_level ==="Complete") {
system.legacy_addShipsAtPrecisely("assassins_rebooted_navy_control_drone_local_patrol_alt", 1, "abs", this.ship.position.add(this.ship.heading.multiply(15000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_interceptor_battlebot_local_patrol_leader", 1, "abs", this.ship.position.add(this.ship.heading.multiply(20000)))
// Add a group of 3 BattleBots 750kms out from the Base with an AI to return to the Base.
system.legacy_addShipsAtPrecisely("assassins_rebooted_police-battlebot_homebound_patrol_leader", 1, "abs", this.ship.position.add(this.ship.heading.multiply(750000)))
// Add a group of 3 BattleBots 1,500kms out from the Base with an AI to go to the Witchpoint
system.legacy_addShipsAtPrecisely("assassins_rebooted_police-battlebot_witchpoint_patrol_leader", 1, "abs", this.ship.position.add(this.ship.heading.multiply(1500000)))
// Add a group of 3 BattleBots 2,000kms out from the Base with an AI to go to the Main Planet.
system.legacy_addShipsAtPrecisely("assassins_rebooted_police-battlebot_planet_patrol_leader", 1, "abs", this.ship.position.add(this.ship.heading.multiply(2000000)))
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_hades_hotel_democratic.js |
"use strict";
this.name = "assassins_rebooted_hades_hotel_democratic.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns associated ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Add a group of three Sonorans (Leader and 2 escorts) to patrol the area around the Hotel.
// This version of the Hotel only appears when the Rebels are in charge so no need to check the civil war variable here.
var pos = this.ship.position;
system.addShips("assassins_rebooted_local_patrol_rebel_sonoran_leader_hades",1,pos,10000);
// The Liners only return however once the civil war is over.
if (missionVariables.assassins_rebooted_civil_war === "Over") {
// Add a Liner escorted by two Asps to fly around near the hotel unless or until the player arrives and then dock with the hotel.
system.addShips("assassins_rebooted_democratic_hades_local_liner",1,pos,20000);
// Add a Liner escorted by two Kraits about 4,800kms from the Main Station.
// This liner has an AI to fly to the main station and dock with it, so may be encountered if travelling from
// the main station to Hades.
system.legacy_addShipsAtPrecisely("assassins_rebooted_democratic_mainstationbound_liner_type2", 1, "abs", this.ship.position.add(this.ship.heading.multiply(21000000)))
// Add a Liner escorted by two Wolf Mark Is with an AI to go to the witchpoint and dock with the closest station to the witchpoint.
// If there are no stations near the witchpoint, it will go to the main station or one of the hotels.
system.addShips("assassins_rebooted_democratic_witchpoint_liner",1,pos,30000);
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_hades_hotel_imperial.js |
"use strict";
this.name = "assassins_rebooted_hades_hotel_imperial.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns associated ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Add a group of three Lictors (Leader and 2 escorts) to patrol the area around the Hotel.
// This version of the Hotel only appears when the Imperials are in charge so no need to check the civil war variable here.
var pos = this.ship.position;
system.addShips("assassins_rebooted_lictor_local_patrol_leader",1,pos,10000);
// Add a Liner with two Guardian Escorts to wait by the hotel until the player arrives and then dock.
system.addShips("assassins_rebooted_hades_local_liner",1,pos,15000);
// Add a Liner and Escorts 2,500kms from the Hotel with an AI to go to the main station and dock.
system.legacy_addShipsAtPrecisely("assassins_rebooted_planetbound_liner", 1, "abs", this.ship.position.add(this.ship.heading.multiply(2500000)))
// Add a Liner and Escorts 7,500kms from the Hotel with an AI to go to the Hades Hotel and dock
system.legacy_addShipsAtPrecisely("assassins_rebooted_hadesbound_liner", 1, "abs", this.ship.position.add(this.ship.heading.multiply(7500000)))
// Add a Liner and Escorts 15,000kms from the Hotel with an AI to go to the Hades Hotel and dock
system.legacy_addShipsAtPrecisely("assassins_rebooted_hadesbound_liner", 1, "abs", this.ship.position.add(this.ship.heading.multiply(15000000)))
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_hocky_fan_ship.js |
"use strict";
this.name = "assassins_rebooted_hocky_fan_ship.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to prevent friendly fire incidents. Ships flown by vengeful hocky fans all have this script, so won't respond to an accidental hit by their own side.";
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// If the attacker is another hocky fan ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Both the attacker and the attacked ships lose their current targets (of each other) and each gets an AI message to break off.
// The attacked ship also gets a custom AI message for fiendly fire, so it will idel for 1.5 seconds before going back to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_hocky_fan") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_hocky_fan") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_hocky_fan") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom){
this.ship.commsMessage(expandDescription("[assassins-hocky-fan-death]"), player.ship);
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_hostile_triad_spawner.js |
"use strict";
this.name = "assassins_rebooted_hostile_triad_spawner.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn a group of hostile Triad Wasps within a radius of the spawner.";
this.shipSpawned = function()
{
var pos = this.ship.position;
system.addShips("assassins_rebooted_triad_wasp_hostile_pirate_replacement",5,pos,90000);
}
|
| Scripts/assassins_rebooted_imperial_control_conditions.js |
"use strict";
this.name = "assassins_rebooted_imperial_control_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing police ships at Eszausve depending on mission variables setting the stage the civil war is at.";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the Eszausve Imperial dictatorship ships only replace police ships at Eszausve (rather than in the game generally).
// And only when the Imperials are in control of the system.
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 13 && missionVariables.assassins_rebooted_civil_war < 2) return true;
return false;
} |
| Scripts/assassins_rebooted_imperial_deamon1_imperial_control.js |
"use strict";
this.name = "assassins_rebooted_imperial_deamon1_imperial_control.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Adds groups of rebels near it's own position when spawned.
var pos = this.ship.position;
system.addShips("assassins_rebooted_rebel_outlaw_sonoran_type2",1,pos,10000);
// Name the Ship
var ship_name = expandDescription("[assassins-battlebot_type13_name]");
this.ship.displayName = this.ship.name + ": " +ship_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_imperial_deamon1_rebel_control.js |
"use strict";
this.name = "assassins_rebooted_imperial_deamon1_rebel_control.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to prevent friendly fire between chaotic alligned ships and give each ship a random boost to their starting bounty.";
this.shipSpawned = function()
{
// Random Boost to the base bounty.
this.ship.bounty += Math.random()*7+2;
// Name the Ship
var ship_name = expandDescription("[assassins-battlebot_type13_name]");
this.ship.displayName = this.ship.name + ": " +ship_name;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another chaotic ship
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_imperial_deamon2_imperial_control.js |
"use strict";
this.name = "assassins_rebooted_imperial_deamon2_imperial_control.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Adds groups of rebels near it's own position when spawned.
var pos = this.ship.position;
system.addShips("assassins_rebooted_rebel_outlaw_sonoran_type2",1,pos,10000);
system.addShips("assassins_rebooted_weak_outlaw_rebel",4,pos,20000);
// Name the Ship
var ship_name = expandDescription("[assassins-battlebot_type14_name]");
this.ship.displayName = this.ship.name + ": " +ship_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_imperial_deamon2_rebel_control.js |
"use strict";
this.name = "assassins_rebooted_imperial_deamon2_rebel_control.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to prevent friendly fire between chaotic alligned ships and give each ship a random boost to their starting bounty.";
this.shipSpawned = function()
{
// Random Boost to the base bounty.
this.ship.bounty += Math.random()*7+2;
// Name the Ship
var ship_name = expandDescription("[assassins-battlebot_type14_name]");
this.ship.displayName = this.ship.name + ": " +ship_name;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another chaotic ship
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_imperial_deamon3_imperial_control.js |
"use strict";
this.name = "assassins_rebooted_imperial_deamon3_imperial_control.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Adds groups of rebels near it's own position when spawned.
var pos = this.ship.position;
system.addShips("assassins_rebooted_weak_outlaw_rebel",4,pos,20000);
// Name the Ship
var ship_name = expandDescription("[assassins-battlebot_type15_name]");
this.ship.displayName = this.ship.name + ": " +ship_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_imperial_deamon3_rebel_control.js |
"use strict";
this.name = "assassins_rebooted_imperial_deamon3_rebel_control.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to prevent friendly fire between chaotic alligned ships and give each ship a random boost to their starting bounty.";
this.shipSpawned = function()
{
// Random Boost to the base bounty.
this.ship.bounty += Math.random()*7+2;
// Adds a single Rebel Sonoran near the ship's spawn position.
var pos = this.ship.position;
system.addShips("police",1,pos,5000);
// Name the Ship
var ship_name = expandDescription("[assassins-battlebot_type15_name]");
this.ship.displayName = this.ship.name + ": " +ship_name;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another chaotic ship
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_imperial_deamon4_imperial_control.js |
"use strict";
this.name = "assassins_rebooted_imperial_deamon4_imperial_control.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Adds groups of rebels near it's own position when spawned.
var pos = this.ship.position;
system.addShips("assassins_rebooted_weak_outlaw_rebel",4,pos,20000);
// Name the Ship
var ship_name = expandDescription("[assassins-battlebot_type16_name]");
this.ship.displayName = this.ship.name + ": " +ship_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_imperial_deamon4_rebel_control.js |
"use strict";
this.name = "assassins_rebooted_imperial_deamon4_rebel_control.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to prevent friendly fire between chaotic alligned ships and give each ship a random boost to their starting bounty.";
this.shipSpawned = function()
{
// Random Boost to the base bounty.
this.ship.bounty += Math.random()*7+2;
// Add a Rebel Sonoran near the ship's spawn position.
var pos = this.ship.position;
system.addShips("police",1,pos,10000);
// Name the Ship
var ship_name = expandDescription("[assassins-battlebot_type16_name]");
this.ship.displayName = this.ship.name + ": " +ship_name;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another chaotic ship
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_imperial_outlaw_conditions.js |
"use strict";
this.name = "assassins_rebooted_imperial_outlaw_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing pirate ships at Eszausve depending on mission variables setting the stage the civil war is at.";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the Eszausve democratic rebels only replace police ships at Eszausve (rather than in the game generally).
// And only when the rebels are in control of the system.
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 13 && missionVariables.assassins_rebooted_civil_war === 2) return true;
return false;
} |
| Scripts/assassins_rebooted_imperial_scorpion_imperial_control.js |
"use strict";
this.name = "assassins_rebooted_imperial_scorpion_imperial_control.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Adds groups of rebels near it's own position when spawned.
var pos = this.ship.position;
system.addShips("assassins_rebooted_weak_outlaw_rebel",1,pos,10000);
system.addShips("assassins_rebooted_weak_outlaw_rebel",1,pos,12000);
system.addShips("assassins_rebooted_weak_outlaw_rebel",1,pos,15000);
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_infected_ateslete_conditions.js |
"use strict";
this.name = "assassins_rebooted_infected_ateslete_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing pirates in the Ateslete System";
this.licence = "CC BY-NC-SA 3.0";
// Replaces Pirates with Malfunctioning BattleBots during their escape.
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 39 && missionVariables.assassins_rebooted_stage === 23) return true;
if (galaxyNumber === 6 && system.ID === 39 && missionVariables.assassins_rebooted_stage === 24) return true;
if (galaxyNumber === 6 && system.ID === 39 && missionVariables.assassins_rebooted_stage === 25) return true;
return false;
} |
| Scripts/assassins_rebooted_infected_nearbysystems_conditions.js |
"use strict";
this.name = "assassins_rebooted_infected_nearbysystems_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing pirates with Malfunctioning BattleBots at the 6 Systems within 7 light years of Ateslete once they escape.";
this.licence = "CC BY-NC-SA 3.0";
// Replaces Pirates with Malfunctioning BattleBots during their escape.
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 181 && missionVariables.assassins_rebooted_battlebot_escape_level > 1) return true;
if (galaxyNumber === 6 && system.ID === 181 && missionVariables.assassins_rebooted_battlebot_escape_level === "Complete") return true;
if (galaxyNumber === 6 && system.ID === 20 && missionVariables.assassins_rebooted_battlebot_escape_level > 2) return true;
if (galaxyNumber === 6 && system.ID === 20 && missionVariables.assassins_rebooted_battlebot_escape_level === "Complete") return true;
if (galaxyNumber === 6 && system.ID === 171 && missionVariables.assassins_rebooted_battlebot_escape_level > 3) return true;
if (galaxyNumber === 6 && system.ID === 171 && missionVariables.assassins_rebooted_battlebot_escape_level === "Complete") return true;
if (galaxyNumber === 6 && system.ID === 185 && missionVariables.assassins_rebooted_battlebot_escape_level > 4) return true;
if (galaxyNumber === 6 && system.ID === 185 && missionVariables.assassins_rebooted_battlebot_escape_level === "Complete") return true;
if (galaxyNumber === 6 && system.ID === 65 && missionVariables.assassins_rebooted_battlebot_escape_level > 5) return true;
if (galaxyNumber === 6 && system.ID === 65 && missionVariables.assassins_rebooted_battlebot_escape_level === "Complete") return true;
if (galaxyNumber === 6 && system.ID === 44 && missionVariables.assassins_rebooted_battlebot_escape_level === "Complete") return true;
return false;
} |
| Scripts/assassins_rebooted_lawful_ship.js |
"use strict";
this.name = "assassins_rebooted_lawful_ship.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_lawful_station.js |
"use strict";
this.name = "assassins_rebooted_lawful_station.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime.";
// Code borrowed from "Anarchies" via "Fuel Station" for convenience.
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_lernean_hotel_democratic.js |
"use strict";
this.name = "assassins_rebooted_lernean_hotel_democratic.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns associated ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Add a group of three Sonorans (Leader and 2 escorts) to patrol the area around the Hotel.
// This version of the Hotel only appears when the Rebels are in charge so no need to check the civil war variable here.
var pos = this.ship.position;
system.addShips("assassins_rebooted_local_patrol_rebel_sonoran_leader_lernean",1,pos,10000);
// The liners only return when the civil war is over however.
if (missionVariables.assassins_rebooted_civil_war === "Over") {
// Add a Liner escorted by two Cobra Mk IIIs to fly around near the hotel unless or until the player arrives and then dock
// with the hotel.
system.addShips("assassins_rebooted_democratic_lernean_local_liner",1,pos,20000);
// Add a Liner escorted by two Cobra Mark Is about 7,500kms from the Hotel.
// This liner has an AI to fly to the hotel and dock with it, so may be encountered if travelling from
// the main station to Lernean.
system.legacy_addShipsAtPrecisely("assassins_rebooted_democratic_lerneanbound_liner_type2", 1, "abs", this.ship.position.add(this.ship.heading.multiply(750000)))
// Add a Liner escorted by two Wolf Mark Is with an AI to go to the witchpoint and dock with the closest station to the witchpoint.
// If there are no stations near the witchpoint, it will go to the main station or one of the hotels.
system.addShips("assassins_rebooted_democratic_witchpoint_liner",1,pos,30000);
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_lernean_hotel_imperial.js |
"use strict";
this.name = "assassins_rebooted_lernean_hotel_imperial.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns associated ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Add a group of three Guardians (Leader and 2 escorts) to patrol the area around the Hotel.
// This version of the Hotel only appears when the Imperials are in charge so no need to check the civil war variable here.
var pos = this.ship.position;
system.addShips("assassins_rebooted_guardian_local_patrol_leader",1,pos,10000);
// Add a Liner with two Guardian Escorts to wait by the hotel until the player arrives and then dock.
system.addShips("assassins_rebooted_lernean_local_liner",1,pos,15000);
// Add a Liner and Escorts 10,000kms from the Hotel with an AI to go to the main station and dock.
system.legacy_addShipsAtPrecisely("assassins_rebooted_planetbound_liner", 1, "abs", this.ship.position.add(this.ship.heading.multiply(10000000)))
// Add a Liner and Escorts 20,000kms from the Hotel with an AI to go to the Hades Hotel and dock
system.legacy_addShipsAtPrecisely("assassins_rebooted_lerneanbound_liner", 1, "abs", this.ship.position.add(this.ship.heading.multiply(20000000)))
// Add a Liner and Escorts 30,000kms from the Hotel with an AI to go to the Hades Hotel and dock
system.legacy_addShipsAtPrecisely("assassins_rebooted_lerneanbound_liner", 1, "abs", this.ship.position.add(this.ship.heading.multiply(30000000)))
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_mad_battlebot_type1.js |
"use strict";
this.name = "assassins_rebooted_mad_battlebot_type1.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
// Give each Malfunctioning BattleBot a Callsign.
this.shipSpawned = function()
{
var bot_name = expandDescription("[assassins-battlebot_type1_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
// Random Boost to the base bounty of 5.
this.ship.bounty += Math.random()*3+1;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another battlebot.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_mad_battlebot_type2.js |
"use strict";
this.name = "assassins_rebooted_mad_battlebot_type2.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to name BattleBots and prevent friendly fire.";
// Give each Malfunctioning BattleBot a Callsign.
this.shipSpawned = function()
{
var bot_name = expandDescription("[assassins-battlebot_type2_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
// Random Boost to the base bounty of 4.
this.ship.bounty += Math.random()*4+2;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another battlebot.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_mad_battlebot_type3.js |
"use strict";
this.name = "assassins_rebooted_mad_battlebot_type3.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to name BattleBots and prevent friendly fire.";
// Give each Malfunctioning BattleBot a Callsign.
this.shipSpawned = function()
{
var bot_name = expandDescription("[assassins-battlebot_type3_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
// Random Boost to the base bounty of 4.
this.ship.bounty += Math.random()*4+2;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another battlebot.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_mad_battlebot_type4.js |
"use strict";
this.name = "assassins_rebooted_mad_battlebot_type4.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to name BattleBots and prevent friendly fire.";
// Give each Malfunctioning BattleBot a Callsign.
this.shipSpawned = function()
{
var bot_name = expandDescription("[assassins-battlebot_general_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
// Random Boost to the base bounty of 8.
this.ship.bounty += Math.random()*7+2;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another battlebot.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_mafia_conditions.js |
"use strict";
this.name = "assassins_rebooted_mafia_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing shuttles and traders in the Orramaor System";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the assassins Mafia Sidewinders and Anacondas only replace police and traders in the Quandixe system (rather than in the game generally).
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 53) return true;
return false;
} |
| Scripts/assassins_rebooted_mafia_target_dummy_type1.js |
"use strict";
this.name = "assassins_rebooted_mafia_target_dummy_type1.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn attacking triad ships near its location.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Add attacking Triad Ships.
var pos = this.ship.position;
system.addShips("assassins_rebooted_triad_gecko1",1,pos,1000);
system.addShips("assassins_rebooted_triad_krait1",1,pos,2000);
system.addShips("assassins_rebooted_triad_mamba1",1,pos,3000);
system.addShips("assassins_rebooted_triad_moray1",1,pos,4000);
// Add Target Dummy 2 (this ships script also spawns Triad Ships near its position to attack it.
system.addShips("assassins_rebooted_mafia_target_dummy_type2",1,pos.add([5000,0,0]), 2000)[0];
// Add 2 normal mafia Annaconda with an AI to join the battle once the player arrives.
system.addShips("assassins_rebooted_mafia_protector",1,pos.add([8000,0,0]), 1000)[0];
system.addShips("assassins_rebooted_mafia_protector",1,pos.add([6000,0,0]), 1000)[0];
// Add Target Dummy 3 (attacked by Victim 7 and its escorts until the player arrives).
system.addShips("assassins_rebooted_mafia_target_dummy_type3",1,pos.add([10000,0,0]), 1000)[0];
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_mafia_target_dummy_type2.js |
"use strict";
this.name = "assassins_rebooted_mafia_target_dummy_type2.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn attacking triad ships near its location.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Add attacking Triad Ships.
var pos = this.ship.position;
system.addShips("assassins_rebooted_triad_cobra2",1,pos,1000);
system.addShips("assassins_rebooted_triad_adder2",1,pos,2000);
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_mafia_waystation.js |
"use strict";
this.name = "assassins_rebooted_mafia_waystation_station.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also adds ships depending on the mission stage";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
var pos = this.ship.position;
// Add 2 Annacondas each with 2 Sidewinder escorts near the Mafia Waystation for a scripted event.
// Both these varients of the ship will orbit within 10 to 15kms of the Waystation unless or until the player comes within 25km.
// When they detect the player, the first ship will check that there isn't already another Mafia Anaconda docking with the Waystation. If there isn't then it will dock.
// If there is, then it will start flying towards either the Main Station and dock with it or fly to the Witchpoint and dock with the nearest OXZ station to the witchpoint.
// If there are no OXZ stations in the system then it will go to the Main Station once it reaches the Witchpoint or Jump Out.
system.addShips("assassins_rebooted_mafia_base_drugship",1,pos,10000);
// The second ship will also orbit until the player arrives. It will then either fly out of blocking range of the station and jump out or start flying to the main station and dock
// with it or fly to the witchpoint beacon and dock with the nearest OXZ station to the witchpoint.
system.addShips("assassins_rebooted_mafia_base_drugship_alt",1,pos,15000);
// Add another Anaconda with two Sidewinder Escorts 30kms from the Waystation. This ship will go to the Waystation and dock with it.
system.legacy_addShipsAtPrecisely("assassins_rebooted_mafia_homebound_drugship", 1, "abs", this.ship.position.add(this.ship.heading.multiply(30000)))
// Add another Anaconda with two Sidewinder Escorts 50kms from the Waystation. This ship will go to the Witchpoint and dock with the nearest station there.
system.legacy_addShipsAtPrecisely("assassins_rebooted_mafia_outbound_drugship", 1, "abs", this.ship.position.add(this.ship.heading.multiply(50000)))
// Add an Anaconda with two Sidewinder Escorts near the Main Station just out of Scanner range. This ship will go to the Main Station and dock.
system.legacy_addShipsAtPrecisely("assassins_rebooted_mafia_planet_drugship", 1, "abs", this.ship.position.add(this.ship.heading.multiply(235000)))
// Ships Spawned when the mission is running.
if (missionVariables.assassins_rebooted_stage === 35) {
// Spawn the target dummy. The dummy's own script spawns 4 Triads Ships to attack it and also spawns target dummies 2 and 3.
// Dummy in turn spawns 2 Triad Ships around its position. Dummy 3 is targeted by the Mission Ship - Victim 7.
system.legacy_addShipsAtPrecisely("assassins_rebooted_mafia_target_dummy_type1", 1, "abs", this.ship.position.add(this.ship.heading.multiply(145000)))
// Add an invisible minsweeper in the center of the group of ships. This is static and so if your fight with the boss takes you more than 25kms from his starting position,
// then you will be able to try to q-mine him (he will almost certainly escape on injectors however and so you may well lose track of him), but you won't be able to deploy
// a q-mine in the middle of the triads v mafia anaconda battle. This is handwaved as the slow annacondas deploying a dampening field to stop a single triad Mamba with
// a mine wiping them all out (otherwise there woudn't be much of a mission to play)!
system.legacy_addShipsAtPrecisely("assassins_rebooted_minesweeper_hidden", 1, "abs", this.ship.position.add(this.ship.heading.multiply(150000)))
// Add Victim 7 - Boss Yankisona flying an armoured Boa by Griff (Escorted by 2 Sonorans by Robin).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim7", 1, "abs", this.ship.position.add(this.ship.heading.multiply(155000)))
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_micro_hunter_spawner.js |
"use strict";
this.name = "assassins_rebooted_micro_hunter_spawner.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn a group of Soin Clan Micro Mambas, Geckos, Kraits, Sidewinders and Morays within a radius of the spawner.";
this.shipSpawned = function()
{
var pos = this.ship.position;
system.addShips("assassins_rebooted_micro_hunter_replacement_additional",1,pos,20000);
system.addShips("assassins_rebooted_micro_hunter_replacement_additional",1,pos,40000);
system.addShips("assassins_rebooted_micro_hunter_replacement_additional",1,pos,60000);
system.addShips("assassins_rebooted_micro_hunter_replacement_additional",1,pos,80000);
}
|
| Scripts/assassins_rebooted_miner_conditions.js |
"use strict";
this.name = "assassins_rebooted_miner_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing miners and scavengers in the Ataneris System";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the assassins Bug Miners ships only replace scavengers and miners in the Ataneris system (rather than in the game generally).
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 81) return true;
return false;
} |
| Scripts/assassins_rebooted_miner_depot.js |
"use strict";
this.name = "assassins_rebooted_miner_depot.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also adds adds ships and mission ships depending on the stage";
// Code borrowed from "Anarchies" via "Fuel Station" for convenience.
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
var pos = this.ship.position;
// Add an asteroid field around the Depot.
system.addShips("assassins_rebooted_miner_rock",40,pos,18000);
// Add 3 Bug Miners with an AI to mine stuff.
system.addShips("assassins_rebooted_bug_miner",1,pos,10000);
system.addShips("assassins_rebooted_bug_miner",1,pos,12000);
system.addShips("assassins_rebooted_bug_miner",1,pos,14000);
// Add a group of 3 Bug Fighters (Leader and 2 Wingmen) to patrol the asteroid field.
system.legacy_addShipsAtPrecisely("assassins_rebooted_bug_patrol", 1, "abs", this.ship.position.add(this.ship.heading.multiply(10000)))
delete this.shipSpawned;
// Closing Bracket for this ship spawned.
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_miner_rock_replacement.js |
"use strict";
this.name = "assassins_rebooted_miner_rock_replacement.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to repopulate the glowing asteroids around the mining depot.";
this.shipSpawned = function() {
// On Spawning save the position of the asteroid.
this.pos = this.ship.position;
}
this.shipDied = function (whom)
{
// When an glowing asteroid is destroyed by a miner, replace it by spawning another one within 25kms.
system.addShips("assassins_rebooted_miner_rock",1,pos,25000);
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_minesweeper.js |
"use strict";
this.name = "assassins_rebooted_minesweeper";
this.author = "LittleBear, Eric Walch & Thargoid";
this.copyright = "November 2008 - But do what you like with it in your OXPs!";
this.description = "Stops the use of Quirium Weapons within scanning range of a Minesweeper and makes the player a fugitive for attacking it";
this.version = "2.2";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
delete this.shipSpawned;
}
this.quirium = ["EQ_QC_MINE", "EQ_CASCADE_MISSILE", "EQ_LAW_MISSILE", "EQ_OVERRIDE_MISSILE", "energy-bomb", "RANDOM_HITS_MINE", "EQ_MEGA_DEATH_MISSILE"];
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
this.doScan = function ()
{
// create an array with all weapons in range.
function allShips(entity) {return entity.isShip && entity.isWeapon};
var missiles = system.filteredEntities(this, allShips, this.ship, this.ship.scannerRange);
for (var i = 0; i < missiles.length; i++)
{
if (this.quirium.indexOf(missiles[i].primaryRole) > -1)
{
missiles[i].explode();
this.ship.fireECM();
break; // found one
}
}
}
this.thargoidScan = function ()
{
// create an array with all thargoids in range.
function allShips(entity) {return entity.isShip && entity.isThargoid};
var thargoids = system.filteredEntities(this, allShips, this.ship, this.ship.scannerRange);
for (var i = 0; i < thargoids.length; i++)
{
if (thargoids[i].hasRole("secondWave_mineTharglet"))
{
thargoids[i].explode();
this.ship.fireECM();
break; // found one
}
}
}
|
| Scripts/assassins_rebooted_minesweeper_type2.js |
"use strict";
this.name = "assassins_rebooted_minesweeper";
this.author = "LittleBear, Eric Walch & Thargoid";
this.copyright = "November 2008 - But do what you like with it in your OXPs!";
this.description = "Stops the use of Quirium Weapons within scanning range of a Minesweeper.";
this.version = "2.2";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
delete this.shipSpawned;
}
this.quirium = ["EQ_QC_MINE", "EQ_CASCADE_MISSILE", "EQ_LAW_MISSILE", "EQ_OVERRIDE_MISSILE", "energy-bomb", "RANDOM_HITS_MINE", "EQ_MEGA_DEATH_MISSILE"];
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
}
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
}
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
}
}
this.doScan = function ()
{
// create an array with all weapons in range.
function allShips(entity) {return entity.isShip && entity.isWeapon};
var missiles = system.filteredEntities(this, allShips, this.ship, this.ship.scannerRange);
for (var i = 0; i < missiles.length; i++)
{
if (this.quirium.indexOf(missiles[i].primaryRole) > -1)
{
missiles[i].explode();
this.ship.fireECM();
break; // found one
}
}
}
this.thargoidScan = function ()
{
// create an array with all thargoids in range.
function allShips(entity) {return entity.isShip && entity.isThargoid};
var thargoids = system.filteredEntities(this, allShips, this.ship, this.ship.scannerRange);
for (var i = 0; i < thargoids.length; i++)
{
if (thargoids[i].hasRole("secondWave_mineTharglet"))
{
thargoids[i].explode();
this.ship.fireECM();
break; // found one
}
}
}
|
| Scripts/assassins_rebooted_navy_battlebot.js |
"use strict";
this.name = "assassins_rebooted_navy_battlebot.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Give it a name.
var bot_name = expandDescription("[assassins-battlebot_general_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_navy_control_drone.js |
"use strict";
this.name = "assassins_rebooted_navy_control_drone.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Give it a name.
var bot_name = expandDescription("[assassins-battlebot_type8_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_navy_station.js |
"use strict";
this.name = "assassins_rebooted_navy_station.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns assosciated ships and mission ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Normally, the Base is open to civilians and will not be hostile to the player as long as they are clean.
// At the time of the 8th Hit the base is in lock-down, so during lockdown a different version of the station and ships are used which have AIs hostile to non-military ships.
if (missionVariables.assassins_rebooted_navy_base_lockdown === "No" || !missionVariables.assassins_rebooted_navy_base_lockdown) {
// Add 4 groups of 3 Navy Sidewinders with AIs to patrol around the base.
system.addShips("assassins_rebooted_navy_local_patrol_leader", 2, this.ship.position, 10000);
system.addShips("assassins_rebooted_navy_local_patrol_leader", 2, this.ship.position, 12000);
// Add the Carrier Antiphates with an AI to patrol around the base.
// It can be docked with by Clean ships and will stop to allow the player (if Clean) or NPC shuttles to dock with it.
system.addShips("assassins_rebooted_antiphates", 1, this.ship.position, 15000);
// Add the Carrier Damasen. This ship is added near the base but with an AI to go to the witchpoint. It will attack thargoids and non-clean ships.
system.legacy_addShipsAtPrecisely("assassins_rebooted_damasen", 1, "abs", this.ship.position.add(this.ship.heading.multiply(30000)))
// Add the Carrier Elatrreus. This ship is also added near the base, but with an AI to go to the main planet. It will attack thargoids and non-clean ships.
system.legacy_addShipsAtPrecisely("assassins_rebooted_elatreus", 1, "abs", this.ship.position.add(this.ship.heading.multiply(50000)))
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_navy_station_lockdown.js |
"use strict";
this.name = "assassins_rebooted_navy_station_lockdown.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns assosciated ships and mission ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// This version of the Naval Outpost is only added when the base is in lockdown and the mission is running, so no need for a separate conditions check.
// Add a field of static mines. Each is a hardened but fairly slow missile which will lock onto the player if they come within 10kms of it.
system.addShips("assassins_rebooted_missile_silo", 15, this.ship.position, 26000);
// Add the three carriers Antiphates, Damasen and Elatreus each with an AI to patrol around the base between 5 and 25kms and to attack the player and launch
// Naval Sidewinders to attack the player, once the player enters the exclusion zone.
system.addShips("assassins_rebooted_antiphates_hostile", 1, this.ship.position, 15000);
system.addShips("assassins_rebooted_damasen_hostile", 1, this.ship.position, 20000);
system.addShips("assassins_rebooted_elatreus_hostile", 1, this.ship.position, 25000);
// Add 3 Naval BattleBots within 25kms of the base. These ships will hold position and attack the player once they detect them.
// If they lose contact with the player they will return to the base and wait around the base for the player to return.
system.addShips("assassins_rebooted_navy_battlebot_hostile", 3, this.ship.position, 25000);
// Add Victim 8 - Bi Xea'nu abord an Aeron Class Frigate by Griff
system.addShips("assassins_rebooted_victim8", 1, this.ship.position, 7500);
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_neutral_triad_spawner.js |
"use strict";
this.name = "assassins_rebooted_neutral_triad_spawner.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn a group of neutral Triad Wasps within a radius of the spawner.";
this.shipSpawned = function()
{
var pos = this.ship.position;
system.addShips("assassins_rebooted_triad_wasp_neutral_pirate_replacement",5,pos,90000);
}
|
| Scripts/assassins_rebooted_orbital_stadium.js |
"use strict";
this.name = "assassins_rebooted_orbital_stadium.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns associated ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Add a patrol group of 3 Nemesis Stadium Security Ships (Leader with 2 escorts) with an AI to patrol around the Stadium and attack offenders and fugitives.
var pos = this.ship.position;
system.addShips("assassins_rebooted_orbital_stadium_patrol_leader",1,pos,10000);
// Add the second Victim - the Zarausxian Zero-G Hockey Team in Armoured Passenger Liner with Nemesis escorts, when their mission is running.
// The ship is added 100kms from the Stadium with an AI to fly to the Main Station. If it gets there it will return to the Stadium and repeat the loop.
if (missionVariables.assassins_rebooted_stage === 6) {
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim2", 1, "abs", this.ship.position.add(this.ship.heading.multiply(150000)))
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_outlaw_rebel_ship.js |
"use strict";
this.name = "assassins_rebooted_outlaw_rebel_ship.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to prevent friendly fire incidents. Ships in the rebel faction all have this script, so won't respond to an accidental hit by their own side.";
this.shipSpawned = function()
{
// Random Boost to the base bounty.
this.ship.bounty += Math.random()*3+1;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// If the attacker is another rebel ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Both the attacker and the attacked ships lose their current targets (of each other) and each gets an AI message to break off.
// The attacked ship also gets a custom AI message for fiendly fire, so it will idel for 1.5 seconds before going back to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_outlaw_rebel_character") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_outlaw_rebel_character") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_outlaw_rebel_character") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom){
this.ship.commsMessage(expandDescription("[assassins-rebel-death]"), player.ship);
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_police_control_drone.js |
"use strict";
this.name = "assassins_rebooted_police_control_drone.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// Give it a name.
var bot_name = expandDescription("[assassins-battlebot_type10_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_positronic_brain.js |
"use strict";
this.name = "assassins_rebooted_positronic_brain.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
// Same as the standard Lawful Ship Script, but with an addition to give the Positronic Brain a name from descriptions.
// A different Positronic Brain is on duty therefore at each vist and if destroyed a new Positronic Brain takes over the next time the system is visited.
this.shipSpawned = function()
{
var brain_name = expandDescription("[assassins-brain-name]");
this.ship.displayName = this.ship.name + ": " +brain_name;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// If a lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.bounty = 0;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.bounty = 0;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.bounty = 0;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_prototype_battlebot.js |
"use strict";
this.name = "assassins_rebooted_lawful_ship.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
// Tweaked Version of the standard Lawful Ship script for the Prototype BattleBot.
// Shooting at them with lasers or missiles will still attract a Fugitive rating as they are Navy Ships.
// But if they are rammed (or they ram into they player) then there is no legal penalty.
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// If a lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.bounty = 0;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.bounty = 0;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.bounty = 0;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_rebel_control_conditions.js |
"use strict";
this.name = "assassins_rebooted_rebel_control_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing the main station at Eszausve depending on mission variables setting the stage the civil war is at.";
this.licence = "CC BY-NC-SA 3.0";
// This version of the main station only appears when the rebels take control of it.
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 13 && missionVariables.assassins_rebooted_civil_war === 2) return true;
if (galaxyNumber === 6 && system.ID === 13 && missionVariables.assassins_rebooted_civil_war === 3) return true;
return false;
} |
| Scripts/assassins_rebooted_rebel_lawful_ship.js |
"use strict";
this.name = "assassins_rebooted_rebel_lawful_ship.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to make attacking certain ships a crime and prevent friendly fire.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
// If the civil war is still going on, add the word Rebel to the ship's name.
if (missionVariables.assassins_rebooted_civil_war !== "Over") {
this.ship.displayName = "Rebel "+this.ship.name;
}
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
this.ship.commsMessage(expandDescription("[assassins-rebel-death]"), player.ship);
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_red_wing.js |
"use strict";
this.name = "assassins_rebooted_red_wing.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns associated ships and mission ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
var pos = this.ship.position;
// Add an asteroid field around the Prison.
system.addShips("assassins_rebooted_miner_rock",45,pos,25000);
// At the start of the OXZ to dictatorship is a member of GalCop so its's ships are the official police and have police scan class
if (missionVariables.assassins_rebooted_civil_war < 2) {
// Add a Group of 3 Censor patrol ships with an AI to patrol around the prison.
system.addShips("assassins_rebooted_local_patrol_censor_leader",1,pos,10000);
// Add a Group of 3 Enforcer patrol ships with an AI to patrol around the prison.
system.addShips("assassins_rebooted_local_patrol_enforcer_leader",1,pos,15000);
// Add a Prison Ship with 2 Quaestor escorts. Its AI will patrol near the Prison until the player arrives and then will dock with the prison to unload its prisoners.
system.addShips("assassins_rebooted_local_prison_ship_docking",1,pos,20000)
// Add a Prison Ship with 2 Enforcer escorts with an AI to travel to the main station and dock with it.
system.legacy_addShipsAtPrecisely("assassins_rebooted_planet_prison_ship", 1, "abs", this.ship.position.add(this.ship.heading.multiply(35000)))
}
// When Civil War breaks out, add groups of rebel ships with AIs to go to the prison and attack the imperial ships there.
if (missionVariables.assassins_rebooted_deamons === "Lawful") {
// Add 4 rebels in weak ships armed with pulse lasers to attack the imperial ships at the prison.
system.addShips("assassins_rebooted_weak_outlaw_rebel",4,pos,5000);
// Better equipped rebels flying Sonoran fighters (Group of 3 - Leader and 2 Wingmen) with an AI to fly to the prison and attack imperial ships are added 10kms out.
system.legacy_addShipsAtPrecisely("assassins_rebooted_rebel_outlaw_sonoran_type1", 1, "abs", this.ship.position.add(this.ship.heading.multiply(10000)))
// A second group is added near the Prison Ship's position. They will probabley win and any surviving rebles will go to the prison.
system.legacy_addShipsAtPrecisely("assassins_rebooted_rebel_outlaw_sonoran_type1", 1, "abs", this.ship.position.add(this.ship.heading.multiply(40000)))
// The Rebles recieve reinforcements after the 14th News Broadcast is seen.
if (missionVariables.assassins_rebooted_stage > 49) {
system.legacy_addShipsAtPrecisely("assassins_rebooted_rebel_outlaw_sonoran_type1", 1, "abs", this.ship.position.add(this.ship.heading.multiply(13000)))
system.legacy_addShipsAtPrecisely("assassins_rebooted_rebel_outlaw_sonoran_type1", 1, "abs", this.ship.position.add(this.ship.heading.multiply(18000)))
}
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_repair_defender.js |
"use strict";
this.name = "assassins_rebooted_repair_defender.js";
this.author = "Montana05 - Modiified by LittleBear";
this.description = "Event handler for the Phantom Mark I (Nephthys Space Station)";
this.version = "1.02";
this.copyright = "2022 Montana05";
this.licence = "CC BY-NC-SA 4.0";
// Identical to Montana's original but also adds the code below to make the player a fugitive for attacking this version of the ship and preventing friendly fire.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.bounty = 0;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.bounty = 0;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.bounty = 0;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
// End of Modification.
this.shipSpawned = function(ship)
{
// makes sure that loaded missiles and subents are ident
if(this.ship.missiles.length != (this.ship.subEntities.length - 2))
{
this.$checkMissile();
};
};
this.shipWillLaunchFromStation = function(station)
{
// checks if any missiles were added while docking
if(this.ship.missiles.length != (this.ship.subEntities.length - 2))
{
this.$checkMissile();
};
};
this.shipScoopedOther = function(whom)
{
// checks if any OXP awarded a missile in flight
if(this.ship.missiles.length != (this.ship.subEntities.length - 2))
{
this.$checkMissile();
};
};
this.shipFiredMissile = function(missile, target)
{
// removes subents for fired missiles
this.$checkMissile();
};
// this.equipmentAdded will not be triggered if this.ship.awardEquipment is used, a workaround is needed
this.$checkMissile = function()
{
var shipMmissile = this.$findSubEntity("nephthys_phantom_mark_I_missile");
if(this.ship.missiles.length > (this.ship.subEntities.length - 2))
{
this.ship.restoreSubEntities();
};
while((this.ship.subEntities.length - 2) > this.ship.missiles.length)
{
shipMmissile.remove();
};
};
this.$findSubEntity = function(key)
{
for(var i = this.ship.subEntities.length - 1 ; i >=0 ; --i)
{
if (this.ship.subEntities[i].dataKey == key)
{
return this.ship.subEntities[i];
};
};
return null; // couldn't find it.
};
|
| Scripts/assassins_rebooted_repair_facility.js |
"use strict";
this.name = "assassins_rebooted_repair_facility.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns a mission ship when the mission is running.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Add the Fair Wind Mission Ship at the time of the mission.
if (missionVariables.assassins_rebooted_stage === 14) {
var pos = this.ship.position;
system.addShips("assassins_rebooted_victim3",1,pos,10000);
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_repair_facility_docking.js |
"use strict";
this.name = "assassins_rebooted_repair_facility_docking.js";
this.author = "Montana05 - Modified by LittleBear";
this.description = "Event handler for the Nephthys Space Station Dock";
this.version = "1.02";
this.copyright = "2022 Montana05";
this.licence = "CC BY-NC-SA 4.0";
// The version used in Assassins will not grant access to the player (as in plot the Repair Facility only allows its own - NPC - Customers to dock).
// This version of the script will always refuse docking permission to the player regardless of how many credits the player has.
// It will grant NPCs docking permission to dock and launch it's own private craft.
// default, while defined in the shipdata.plist another specify is needed here
this.ship.allowsDocking = false;
this.ship.disallowedDockingCollides = true;
this.acceptDockingRequestFrom = function(ship)
{
if(ship.isPlayer)
{
this.ship.allowsDocking = false;
this.ship.disallowedDockingCollides = true;
return false;
}
else
{
this.ship.allowsDocking = true;
this.ship.disallowedDockingCollides = false;
return true;
};
};
|
| Scripts/assassins_rebooted_retirement_home.js |
"use strict";
this.name = "assassins_rebooted_retirement_home.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also spawns asscociated ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
var pos = this.ship.position;
// Add a Tourist Transporter with an AI to wait by the Retirement Home until the player arrives and then fly to the main station and dock with it.
system.addShips("assassins_rebooted_sunset_local_transporter_type1",1,pos,10000);
// Add a Tourist Shuttle with an AI to wait by the Retirement Home until the player arrives and then fly to the planet Appollodrus and land on it.
system.addShips("assassins_rebooted_sunset_local_shuttle_type1",1,pos,11000);
// Add a Tourist Worm Lander with an AI to wait by the Retirement Home until the player arrives and then fly to the planet Appollodrus and land on it.
system.addShips("assassins_rebooted_sunset_local_worm_type1",1,pos,12000);
// Add a Tourist Ophidian Yacht with an AI to wait by the Retirement Home until the player arrives and then dock with the Retirement Home.
system.addShips("assassins_rebooted_sunset_local_yacht",1,pos,13000);
// Add a Tourist Ophidian Yacht with an AI to wait by the Retirement Home until the player arrives and then fly to the main station and dock with it.
system.addShips("assassins_rebooted_sunset_local_yacht_type2",1,pos,14000);
// Add a Tourist Ophidian Yacht with an AI to wait by the Retirement Home until the player arrives and then fly to the wichpoint and dock with the nearest station there.
system.addShips("assassins_rebooted_sunset_local_yacht_type3",1,pos,15000);
// Add a grpup of 3 Yatchs in a 50km Sphere of the spawn point with an AI to go to the main station and dock with it.
system.legacy_addShipsAtPrecisely("assassins_rebooted_tourist_yacht_planet_spawner", 1, "abs", this.ship.position.add(this.ship.heading.multiply(50000)))
// Add a grpup of 3 Yatchs in a 50km Sphere of the spawn point, with an AI to go to the Retirement Home and dock with it.
system.legacy_addShipsAtPrecisely("assassins_rebooted_tourist_yacht_homebound_spawner", 1, "abs", this.ship.position.add(this.ship.heading.multiply(100000)))
// Add a grpup of 3 Yatchs in a 50km Sphere of the spawn point, with an AI to go to the Retirement Home and dock with it.
system.legacy_addShipsAtPrecisely("assassins_rebooted_tourist_yacht_homebound_spawner", 1, "abs", this.ship.position.add(this.ship.heading.multiply(150000)))
// Add a Yacht 300 kms from the Retirement Home in a line with the main station, with an AI to go to the nearest OXZ station within 500kms and dock. If there are none
// then it will go to either the main station or the Retirement Home.
system.legacy_addShipsAtPrecisely("assassins_rebooted_sunset_outbound_yacht", 1, "abs", this.ship.position.add(this.ship.heading.multiply(300000)))
// Add Victim 1 - Be Soin in a Vintage Adder. Added within 20kms of the Retirement Home when the mission to kill him is running.
if (missionVariables.assassins_rebooted_stage === 1) {
system.addShips("assassins_rebooted_victim1",1,pos,20000);
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_rock_field_spawner.js |
"use strict";
this.name = "assassins_rebooted_rock_field_spawner.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn an asteroid field of griff's glowing rocks";
this.shipSpawned = function()
{
// Add an asteroid field around the former location of the Prison.
// The Prison itself was destroyed in the civil war, but the asteroid field is still present.
var pos = this.ship.position;
system.addShips("assassins_rebooted_miner_rock",45,pos,25000);
if (system.ID === 13) {
// Add 2 rebel police ships with AIs to patrol the system.
system.addShips("police",1,pos,15000);
system.addShips("police",1,pos,45000);
}
if (system.ID !== 13) {
// Add 2 miners.
system.addShips("miner",1,pos,15000);
system.addShips("miner",1,pos,45000);
}
}
|
| Scripts/assassins_rebooted_soin_clan_inno_soin.js |
"use strict";
this.name = "assassins_rebooted_soin_clan_inno_soin.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to prevent friendly fire incidents and advance mission states when the ship dies.";
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// If the attacker is another soin clan ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Both the attacker and the attacked ships lose their current targets (of each other) and each gets an AI message to break off.
// The attacked ship also gets a custom AI message for fiendly fire, so it will idel for 1.5 seconds before going back to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_soin_clan") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_soin_clan") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_soin_clan") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom){
missionVariables.assassins_rebooted_stage = 12;
missionVariables.assassins_rebooted_interlude = "No";
mission.setInstructionsKey("assassins_rebooted_mission_description_10", "AssassinsRebooted");
this.ship.commsMessage(expandDescription("[assassins-inno-soin-death]"), player.ship);
// Add 5 invisible q-mines with a 0.5 second countdown between 5 and 25kms from the player's position.
var pos = player.ship.position;
system.addShips("assassins_rebooted_inno_soin_bomb",1,pos,5000);
system.addShips("assassins_rebooted_inno_soin_bomb",1,pos,10000);
system.addShips("assassins_rebooted_inno_soin_bomb",1,pos,15000);
system.addShips("assassins_rebooted_inno_soin_bomb",1,pos,20000);
system.addShips("assassins_rebooted_inno_soin_bomb",1,pos,25000);
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_soin_clan_ship.js |
"use strict";
this.name = "assassins_rebooted_soin_clan_ship.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to prevent friendly fire incidents. Ships in the soin faction all have this script, so won't respond to an accidental hit by their own side.";
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// If the attacker is another soin clan ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Both the attacker and the attacked ships lose their current targets (of each other) and each gets an AI message to break off.
// The attacked ship also gets a custom AI message for fiendly fire, so it will idel for 1.5 seconds before going back to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_soin_clan") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_soin_clan") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_soin_clan") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom){
this.ship.commsMessage(expandDescription("[assassins-soin-sister-death]"), player.ship);
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_special_branch_conditions.js |
"use strict";
this.name = "assassins_rebooted_special_branch_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing police ships in the Geteve System";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the assassins Special Branch Asps only replace the police in the Geteve system (rather than in the game generally).
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 18) return true;
return false;
} |
| Scripts/assassins_rebooted_special_branch_orbital_base.js |
"use strict";
this.name = "assassins_rebooted_special_branch_orbital_base.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the station towards the main station and make attacking it a crime. Also Spawns its associated ships nearby.";
this.shipSpawned = function()
{
// Turn the Station's dock to face the main system station.
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// A Thargoid Invasion of Geteve takes place and at different stages of the war, different types of ships will be present around the Outpost depending on the variable.
// At 0 the invasion hasn't started yet.
// In peacetime add two wings (a leader each with two escorts) of Special Branch Asps with AIs to patrol the area around to outpost to about 20kms out.
system.addShips("assassins_rebooted_special_branch_asp_base_patrol", 2, this.ship.position, 15000);
// When the Invasion starts the Main Scripts adds thargoids to the spacelanes. Further Thargoids and Special Branch Asps are added near and approaching the Outpost.
if (missionVariables.assassins_rebooted_thargoid_invasion === 1) {
// Add a group of 12 Thargoids within 20kms of the Outpost. (There are 6 Asps on Patrol and the Outpost will launch more Asps up to its maximum of 10, so initally
// the battle will be 12 v 16, but it will take Special Branch a while to get all their birds in the air.
system.addShips("assassins_rebooted_thargoid_raider_type5", 8, this.ship.position, 20000);
// Group of Special Branch Asps to defend the outpost
system.addShips("assassins_rebooted_special_branch_base_defender", 6, this.ship.position, 30000);
// Group of Thargoids with an AI to go to the Witchpoint and attack any ships the come across are are added 35kms from the Outpost.
system.legacy_addShipsAtPrecisely("assassins_rebooted_thargoid_raider_type1", 4, "abs", this.ship.position.add(this.ship.heading.multiply(35000)))
// Second Wave of Thargoids with an AI to go to the Outpost and attack it are added 40kms from the Outpost
system.legacy_addShipsAtPrecisely("assassins_rebooted_thargoid_raider_type5", 4, "abs", this.ship.position.add(this.ship.heading.multiply(40000)))
// Group of Thargoids with an AI to go to the Main Station and attack it are added 50kms from the Outpost.
system.legacy_addShipsAtPrecisely("assassins_rebooted_thargoid_raider_type6", 5, "abs", this.ship.position.add(this.ship.heading.multiply(50000)))
// Group of 3 Special Branch Asps with an AI to go to the Outpost and defend it are added 60kms from the Outpost.
system.legacy_addShipsAtPrecisely("assassins_rebooted_special_branch_base_defender", 3, "abs", this.ship.position.add(this.ship.heading.multiply(60000)))
// Group of Thargoids with an AI to go to the Main Station and attack it are added 100kms from the Outpost.
system.legacy_addShipsAtPrecisely("assassins_rebooted_thargoid_raider_type6", 5, "abs", this.ship.position.add(this.ship.heading.multiply(100000)))
// Group of Thargoids with an AI to go to the Witchpoint and attack any ships the come across are are added 125kms from the Outpost.
system.legacy_addShipsAtPrecisely("assassins_rebooted_thargoid_raider_type1", 3, "abs", this.ship.position.add(this.ship.heading.multiply(125000)))
// Third Wave of Thargoids with an AI to go to the Outpost and attack it are added 125kms from the Outpost
system.legacy_addShipsAtPrecisely("assassins_rebooted_thargoid_raider_type5", 3, "abs", this.ship.position.add(this.ship.heading.multiply(150000)))
// Group of 3 Special Branch Asps with an AI to go to the Outpost and defend it are added 200kms from the Outpost.
system.legacy_addShipsAtPrecisely("assassins_rebooted_special_branch_base_defender", 3, "abs", this.ship.position.add(this.ship.heading.multiply(200000)))
// Group of Thargoids with an AI to go to the Main Station and attack it are added 250kms from the Outpost.
system.legacy_addShipsAtPrecisely("assassins_rebooted_thargoid_raider_type6", 5, "abs", this.ship.position.add(this.ship.heading.multiply(250000)))
// Group of Thargoids with an AI to go to the Main Station and attack it are added 280kms from the Outpost.
system.legacy_addShipsAtPrecisely("assassins_rebooted_thargoid_raider_type6", 5, "abs", this.ship.position.add(this.ship.heading.multiply(280000)))
// Closing Bracket for Invasion Variable at 1.
}
// Add addition ships for the Battle Bot Phase.
// At the time of the mission, the 4th Victim - Inspector Thorstan in a well equipped Special Branch Asp with two Asp Wingmen - is added near to the Outpost.
if (missionVariables.assassins_rebooted_stage === 20) {
system.addShips("assassins_rebooted_victim4",1,this.ship.position.add([1000,0,0]),8560)[0];
}
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_thargoid_raider.js |
"use strict";
this.name = "assassins_rebooted_thargoid_raider.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to prevent friendly fire incidents. Ships in the thargoid faction all have this script, so won't respond to an accidental hit by their own side.";
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// If the attacker is another thargoid, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Both the attacker and the attacked ships lose their current targets (of each other) and each gets an AI message to break off.
// The attacked ship also gets a custom AI message for fiendly fire, so it will idel for 1.5 seconds before going back to its normal AI.
if (whom.roles.indexOf("thargoid") > -1 || whom.roles.indexOf("assassins_rebooted_non_target") > -1)
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("thargoid") > -1 || whom.roles.indexOf("assassins_rebooted_non_target") > -1)
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("thargoid") > -1 || whom.roles.indexOf("assassins_rebooted_non_target") > -1)
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom){
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_tourist_conditions.js |
"use strict";
this.name = "assassins_rebooted_tourist_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing shuttles and traders in the Orramaor System";
this.licence = "CC BY-NC-SA 3.0";
// This script ensures that the assassins tourist ships only replace traders and shuttles in the Orramaor system (rather than in the game generally).
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 73) return true;
return false;
} |
| Scripts/assassins_rebooted_tourist_homebound_spawner.js |
"use strict";
this.name = "assassins_rebooted_tourist_homebound_spawner.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn a group of Tourist Yatchs within a radius of the spawner.";
this.shipSpawned = function()
{
var pos = this.ship.position;
system.addShips("assassins_rebooted_sunset_homebound_yacht",1,pos,20000);
system.addShips("assassins_rebooted_sunset_homebound_yacht",1,pos,30000);
system.addShips("assassins_rebooted_sunset_homebound_yacht",1,pos,50000);
}
|
| Scripts/assassins_rebooted_tourist_outbound_spawner.js |
"use strict";
this.name = "assassins_rebooted_tourist_outbound_spawner.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn a group of Tourist Yatchs within a radius of the spawner.";
this.shipSpawned = function()
{
var pos = this.ship.position;
system.addShips("assassins_rebooted_sunset_outbound_yacht",1,pos,20000);
system.addShips("assassins_rebooted_sunset_outbound_yacht",1,pos,30000);
system.addShips("assassins_rebooted_sunset_outbound_yacht",1,pos,50000);
}
|
| Scripts/assassins_rebooted_tourist_planet_spawner.js |
"use strict";
this.name = "assassins_rebooted_tourist_planet_spawner.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn a group of Tourist Yatchs within a radius of the spawner.";
this.shipSpawned = function()
{
var pos = this.ship.position;
system.addShips("assassins_rebooted_sunset_planet_yacht",1,pos,20000);
system.addShips("assassins_rebooted_sunset_planet_yacht",1,pos,30000);
system.addShips("assassins_rebooted_sunset_planet_yacht",1,pos,50000);
}
|
| Scripts/assassins_rebooted_tourist_shuttle_spawner.js |
"use strict";
this.name = "assassins_rebooted_tourist_shuttle_spawner.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to spawn a group of Tourist Shuttles, Transports and Landers within a radius of the spawner.";
this.shipSpawned = function()
{
var pos = this.ship.position;
system.addShips("assassins_rebooted_tourist_shuttle_replacement_additional",1,pos,10000);
system.addShips("assassins_rebooted_tourist_shuttle_replacement_additional",1,pos,20000);
system.addShips("assassins_rebooted_tourist_shuttle_replacement_additional",1,pos,30000);
system.addShips("assassins_rebooted_tourist_shuttle_replacement_additional",1,pos,40000);
system.addShips("assassins_rebooted_tourist_shuttle_replacement_additional",1,pos,50000);
}
|
| Scripts/assassins_rebooted_triad_hit_ship.js |
"use strict";
this.name = "assassins_rebooted_triad_hit_ship.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to prevent friendly fire between chaotic alligned ships and give each ship a random boost to their starting bounty.";
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another chaotic ship.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom){
this.ship.commsMessage(expandDescription("[assassins-triad-hitship-death]"), player.ship);
// End of this.shipDied
} |
| Scripts/assassins_rebooted_triad_hostile_pirate_conditions.js |
"use strict";
this.name = "assassins_rebooted_triad_hostile_pirate_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing pirates in the Esreates System";
this.licence = "CC BY-NC-SA 3.0";
// Replaces pirates in the Esreates system with Triad Wasps.
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 100 && missionVariables.assassins_rebooted_stage <41) return true;
return false;
} |
| Scripts/assassins_rebooted_triad_neutral_pirate_conditions.js |
"use strict";
this.name = "assassins_rebooted_triad_neutral_pirate_conditions.js";
this.author = "LittleBear";
this.copyright = "This script is hereby placed in the public domain";
this.description = "Condition script for replacing pirates in the Esreates System";
this.licence = "CC BY-NC-SA 3.0";
// Replaces pirates in the Esreates system with Triad Wasps.
// Once the player is allied with the Triads, the triad pirates will not attack the player unless attacked first, but will attack NPC ships as normal.
this.allowSpawnShip = function(shipKey) {
if (galaxyNumber === 6 && system.ID === 100 && missionVariables.assassins_rebooted_stage >40) return true;
if (galaxyNumber === 6 && system.ID === 100 && missionVariables.assassins_rebooted_stage === "Complete") return true;
return false;
} |
| Scripts/assassins_rebooted_victim1.js |
"use strict";
this.name = "assassins_rebooted_victim1.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the first Mission Ship - Be Soin in a Vintage Adder";
this.shipSpawned = function()
{
this.ship.bounty = 0;
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 5;
return;
}
// As Victim 1 is a clean ship and none of the Assassins Victims ever attack NPC ships, lawful ships such as the police, bounty hunters and Assassins ships with a lawful
// Alignment will only have hit a Victim by accident. The Victim won't respond to an NPC hit except to move out of the way and breaking the target lock of the NPC which hit
// the Victim stops it shooting for a few seconds whilst it finds a new traget. If the Victim accidently hit a police ship, it's bounty is set back to 0, so it won't be attacked again
// by police or other ships which attack ships with bounties. If the lawful ship which hit the Victim got a bounty added to it for hitting a clean ship, its bounty is also set back to
// 0, so a hunter doesn't get attacked by other hunters or police ships for the fiendly fire incident.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// In the native game the only ship which could deliberatly find and target an assassins Victim ship would be a Thargoid. If the ship whitch hit the Victim ship is anything other
// than a police, hunter or lawful ship then it's AI is set to a customAI to flee 26kms from the Victim Ship, then return to its normal AI. If it is attacked by another ship whilst
// it is fleeing from the Victim Ship then it will fight that ship instead and exit the fleeingAI if it destroys its attacker.
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 5;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
player.bounty |= 5;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 10;
missionVariables.assassins_rebooted_stage = 2;
mission.setInstructionsKey("assassins_rebooted_mission_description_02", "AssassinsRebooted");
mission.unmarkSystem(73);
this.ship.commsMessage(expandDescription("[assassins-death-victim1]"), player.ship);
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim10.js |
"use strict";
this.name = "assassins_rebooted_victim10.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the 10th (and Final) Mission Ship - Governor Tarkin in a Balrog Class Dreadnaught";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Checks to see that the equipment is working. If it is damaged then it isn't removed, so you don't get a free repair
if (player.ship.equipmentStatus("EQ_CLOAKING_DEVICE") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_CLOAKING_DEVICE");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
}
if (player.ship.equipmentStatus("EQ_ENERGY_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ENERGY_BOMB");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
}
// Add an asteroid field as the ship is spawned at the co-ordinatles of the former rebel held prison.
var pos = this.ship.position;
system.addShips("assassins_rebooted_miner_rock",45,pos,25000);
// Add an Areon Class Friggate Target Dummy for the Dreadnaught to attack and keep the Dreadnaught in place until the player arrives.
// The Target Dummy and the Dreadnaught are both indestructable until the player arrives. Once the player comes within scanner range, the next attack on the target
// dummy will cause it to explode.
system.addShips("assassins_rebooted_victim10_target_dummy",1,pos,2000);
// Add a squad of 5 Imperial Shuttles to attack the target dummy.
system.addShips("assassins_rebooted_victim10_shuttle_squad",1,pos,3000);
// Add a second target dummy again with an AI to attack the Dreadnaught, but this one will jump out shortly after detecting the player.
system.addShips("assassins_rebooted_victim10_target_dummy_type2",1,pos,4000);
// Add a squad of 3 Mongoose Fighters to attack the target dummy.
system.addShips("assassins_rebooted_victim10_mongoose_squad",1,pos,5000);
// Add a third target dummy also with an AI to attack the Dreadnaught, when this one detects the player it will flee to 30kms from the player's position.
// When it reaches 30kms, it will jump out.
system.addShips("assassins_rebooted_victim10_target_dummy_type3",1,pos,6000);
// Add a squad of 3 Scorpion Frigates to attack the dummy.
system.addShips("assassins_rebooted_victim10_scorpion_squad",1,pos,7000);
// Add three groups of three Mongoose Fighters with AIs to patrol the asteroid field and attack the player.
system.addShips("assassins_rebooted_victim10_mongoose_player_killer_squad",1,pos,10000);
system.addShips("assassins_rebooted_victim10_mongoose_player_killer_squad",1,pos,15000);
system.addShips("assassins_rebooted_victim10_mongoose_player_killer_squad",1,pos,20000);
// Add three groups of three Imperial Shuttles with AIs to patrol the asteroid field and attack the player.
system.addShips("assassins_rebooted_victim10_shuttle_player_killer_squad",1,pos,8000);
system.addShips("assassins_rebooted_victim10_shuttle_player_killer_squad",1,pos,12000);
system.addShips("assassins_rebooted_victim10_shuttle_player_killer_squad",1,pos,18000);
// Add three indivual Imperial Scorpion Frigates with AIs to patrol the asteroid field and attack the player.
system.addShips("assassins_rebooted_victim10_scorpion_player_killer_squad",1,pos,10000);
system.addShips("assassins_rebooted_victim10_scorpion_player_killer_squad",1,pos,15000);
system.addShips("assassins_rebooted_victim10_scorpion_player_killer_squad",1,pos,25000);
// Add groups of ships to intercept the player flying from the Witchpoint.
system.addShips("assassins_rebooted_victim10_mongoose_player_killer_squad_witchpoint",3,pos,40000);
system.addShips("assassins_rebooted_victim10_scorpion_player_killer_squad_witchpoint",3,pos,45000);
system.addShips("assassins_rebooted_victim10_mongoose_player_killer_squad_witchpoint",3,pos,50000);
// Add groups of ships with AIs to go to either the witchpoint, main planet / main station looking for the player.
// Groups of three Mongoose Fighters. (12 in total)
system.addShips("assassins_rebooted_victim10_mongoose_player_killer_squad_witchpoint",1,pos,35000);
system.addShips("assassins_rebooted_victim10_mongoose_player_killer_squad_planet",1,pos,45000);
system.addShips("assassins_rebooted_victim10_mongoose_player_killer_squad_witchpoint",1,pos,55000);
system.addShips("assassins_rebooted_victim10_mongoose_player_killer_squad_planet",1,pos,65000);
// Groups of three Imperial Shuttles (6 in total)
system.addShips("assassins_rebooted_victim10_shuttle_player_killer_squad_witchpoint",1,pos,75000);
system.addShips("assassins_rebooted_victim10_shuttle_player_killer_squad_planet",1,pos,85000);
// Two Scorpions.
system.addShips("assassins_rebooted_victim10_scorpion_player_killer_squad_witchpoint",1,pos,95000);
system.addShips("assassins_rebooted_victim10_scorpion_player_killer_squad_planet",1,pos,105000);
// Add groups of Imperial Ships between the Dreadnaught's position and the main station with AIs to patrol and look for the player.
// These ships are added on the edge of the 105km sphere around the Dreadnaught and are likley to be encountered if the player is
// flying from the Main Station (other ships are added in the spacelane and witchpoint routes
// Add a group of 3 Mongoose fighters with AIs to fly to the planet or main station (125kms from the Dreadnaught).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim10_mongoose_player_killer_squad_planet", 1, "abs", this.ship.position.add(this.ship.heading.multiply(125000)))
// Add a group of 3 Imperial Shuttles with AIs to fly to the planet or main station (175kms from the Dreadnaught).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim10_shuttle_player_killer_squad_planet", 1, "abs", this.ship.position.add(this.ship.heading.multiply(175000)))
// Add a Scorpion with an AI to fly to the planet or main station (225kms from the Dreadnaught).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim10_scorpion_player_killer_squad_planet", 1, "abs", this.ship.position.add(this.ship.heading.multiply(225000)))
// Add another group of 3 Mongoose fighters with AIs to fly to the planet or main station (300kms from the Dreadnaught).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim10_mongoose_player_killer_squad_planet", 1, "abs", this.ship.position.add(this.ship.heading.multiply(300000)))
// Add a Deamon Class Cruiser with 4 Mongoose Escorts with AIs to fly to the planet or main station (400kms from the Dreadnaught).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim10_demon_player_killer_squad_planet", 1, "abs", this.ship.position.add(this.ship.heading.multiply(400000)))
// Add another group of 3 Imperial Shuttles with AIs to fly to the planet or main station (500kms from the Dreadnaught).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim10_shuttle_player_killer_squad_planet", 1, "abs", this.ship.position.add(this.ship.heading.multiply(500000)))
// Add another group of 3 Mongoose fighters with AIs to fly to the planet or main station (600kms from the Dreadnaught).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim10_mongoose_player_killer_squad_planet", 1, "abs", this.ship.position.add(this.ship.heading.multiply(600000)))
// Single Rebel ship to help the player.
system.legacy_addShipsAtPrecisely("police", 1, "abs", this.ship.position.add(this.ship.heading.multiply(605000)))
// Add another Scorpion with an AI to fly to the planet or main station (700kms from the Dreadnaught).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim10_scorpion_player_killer_squad_planet", 1, "abs", this.ship.position.add(this.ship.heading.multiply(700000)))
// Closing Bracket for This Ship Spawned.
}
// Will break off from its current target if the new attacker is the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// Does not respond to accidental hits by its own side
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// Does not respond to accidental hits by its own side
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
missionVariables.assassins_rebooted_stage = 56;
missionVariables.assassins_rebooted_civil_war = 3;
mission.setInstructionsKey("assassins_rebooted_mission_description_37", "AssassinsRebooted");
mission.unmarkSystem(13);
System.infoForSystem(6,13).inhabitants = "Liberated Harmless Fat Birds";
System.infoForSystem(6,13).description = "Eszausve is famous for its rocky moon and the twin gas giants Hades and Lernean. The death of Governor Tarkin has left the People's Popular Front victorious in the recent civil war, with demoralised imperial troops surrendering in droves. The interim government will shortly be organising free and fair elections and petitioning GalCop for formal recognition as a democratic system in the Galactic Registry.";
System.infoForSystem(6,71).description = "The red lizards of Angeriri are fiercely democratic. Hatchlings are fitted with brain implants upon emerging from the egg permitting citizens to telepathically vote on all government decisions in real time. The inhabitants are known for assisting others to achieve democratic enlightenment, providing significant military aid to democratic forces during the recent Eszausveian civil war.";
this.ship.commsMessage(expandDescription("[assassins-death-victim10]"), player.ship);
// Re-Award the Cloak and / or Energy Bomb if either or both were disabled (You don't get em back if you didn't have them in the first place).
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
player.ship.awardEquipment("EQ_CLOAKING_DEVICE");
}
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
player.ship.awardEquipment("EQ_ENERGY_BOMB");
}
// Add 21 Navy Frigates (in seven wings of three) near the player's position to assist with the remaining imperial ships.
// These ships will go to the co-ordinates of the Dreadnaught's position and attack imperial ships. But they only jump in when the player has already succeeded!
system.addShips("assassins_rebooted_aeron_cavalry_type1",1,player.ship.position.add([27000,0,0]),1000)[0];
system.addShips("assassins_rebooted_aeron_cavalry_type1",1,player.ship.position.add([28000,0,0]),1000)[0];
system.addShips("assassins_rebooted_aeron_cavalry_type1",1,player.ship.position.add([29000,0,0]),1000)[0];
system.addShips("assassins_rebooted_aeron_cavalry_type1",1,player.ship.position.add([35000,0,0]),1000)[0];
system.addShips("assassins_rebooted_aeron_cavalry_type1",1,player.ship.position.add([40000,0,0]),1000)[0];
system.addShips("assassins_rebooted_aeron_cavalry_type1",1,player.ship.position.add([60000,0,0]),1000)[0];
system.addShips("assassins_rebooted_aeron_cavalry_type1",1,player.ship.position.add([80000,0,0]),1000)[0];
// Add more reinforcements at the main station with AIs to patrol around the main station.
system.addShips("assassins_rebooted_aeron_cavalry_type2",1,system.mainStation.position.add([5000,0,0]), 1000)[0];
system.addShips("assassins_rebooted_aeron_cavalry_type2",1,system.mainStation.position.add([10000,0,0]), 1000)[0];
system.addShips("assassins_rebooted_aeron_cavalry_type2",1,system.mainStation.position.add([15000,0,0]), 1000)[0];
// Add more reinforcements at the witchpoint with AIs to patrol the witchpoint and then patrol the system.
system.legacy_addShipsAt("assassins_rebooted_aeron_cavalry_type3", 3, "wpu", [0, 0, 0.0])
// Add more reinforcements in the spacelanes with AIs to patrol the system.
system.legacy_addShipsAt("assassins_rebooted_aeron_cavalry_type4", 1, "wpu", [0, 0, 0.10])
system.legacy_addShipsAt("assassins_rebooted_aeron_cavalry_type4", 1, "wpu", [0, 0, 0.30])
system.legacy_addShipsAt("assassins_rebooted_aeron_cavalry_type4", 1, "wpu", [0, 0, 0.60])
system.legacy_addShipsAt("assassins_rebooted_aeron_cavalry_type4", 1, "wpu", [0, 0, 0.90])
// Clear any bounty the player had in reward for taking out the Dreadnaught.
player.bounty = 0;
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim2.js |
"use strict";
this.name = "assassins_rebooted_victim2.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the second Mission Ship - The Zarausxian Hockey Team in an Armoured Passenger Liner";
this.shipSpawned = function()
{
this.ship.bounty = 0;
// All Victims (except the first one) are offered as targets after the player recieves the Mark Transponder Scanner.
// Victims are marked in flashing red and blue, but you cannot use your cloak or energy bomb (if you have them) whilst you are in the same system as the victim.
// As the victims only appear at their respective system at the time their mission is running, their own script tests to see if the player has either item of equipment
// and replaces it with a dummy (which just appears adds the words '(Unavailable)' on the items F5 screen description, so that you no longer have a useable cloak or
// energy bomb. The dummy equipment is tested for under death actions and by the main script and rewards the real equipment and removes the dummy. The main script
// doesn't need to check for the presence of the victim as if he is there, his script disables the equipment when he spawns. The effect is that you can't use your cloak
// whilst you are in the victim's system and he is alive, but you get them back as soon as he dies or you leave his system.
// Checks to see that the equipment is working. If it is damaged then it isn't removed, so you don't get a free repair
if (player.ship.equipmentStatus("EQ_CLOAKING_DEVICE") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_CLOAKING_DEVICE");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
}
if (player.ship.equipmentStatus("EQ_ENERGY_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ENERGY_BOMB");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
}
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
// As Victim 2 is a clean ship and none of the Assassins Victims ever attack NPC ships, lawful ships such as the police, bounty hunters and Assassins ships with a lawful
// Alignment will only have hit a Victim by accident. The Victim won't respond to an NPC hit except to move out of the way and breaking the target lock of the NPC which hit
// the Victim stops it shooting for a few seconds whilst it finds a new traget. If the Victim accidently hit a police ship, it's bounty is set back to 0, so it won't be attacked again
// by police or other ships which attack ships with bounties. If the lawful ship which hit the Victim got a bounty added to it for hitting a clean ship, its bounty is also set back to
// 0, so a hunter doesn't get attacked by other hunters or police ships for the fiendly fire incident.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// In the native game the only ship which could deliberatly find and target an assassins Victim ship would be a Thargoid. If the ship which hit the Victim ship is anything other
// than a police, hunter or lawful ship then it's AI is set to a customAI to flee 26kms from the Victim Ship, then return to its normal AI. If it is attacked by another ship whilst
// it is fleeing from the Victim Ship then it will fight that ship instead and exit the fleeingAI if it destroys its attacker.
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 65;
missionVariables.assassins_rebooted_stage = 7;
mission.setInstructionsKey("assassins_rebooted_mission_description_06", "AssassinsRebooted");
mission.unmarkSystem(194);
this.ship.commsMessage(expandDescription("[assassins-death-victim2]"), player.ship);
// Re-Award the Cloak and / or Energy Bomb if either or both were disabled (You don't get em back if you didn't have them in the first place).
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
player.ship.awardEquipment("EQ_CLOAKING_DEVICE");
}
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
player.ship.awardEquipment("EQ_ENERGY_BOMB");
}
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim3.js |
"use strict";
this.name = "assassins_rebooted_victim3.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the third Mission Ship - The Annaconda Trader - The Fair Wind.";
this.shipSpawned = function()
{
this.ship.bounty = 0;
// All Victims (except the first one) are offered as targets after the player recieves the Mark Transponder Scanner.
// Victims are marked in flashing red and blue, but you cannot use your cloak or energy bomb (if you have them) whilst you are in the same system as the victim.
// As the victims only appear at their respective system at the time their mission is running, their own script tests to see if the player has either item of equipment
// and replaces it with a dummy (which just appears adds the words '(Unavailable)' on the items F5 screen description, so that you no longer have a useable cloak or
// energy bomb. The dummy equipment is tested for under death actions and by the main script and rewards the real equipment and removes the dummy. The main script
// doesn't need to check for the presence of the victim as if he is there, his script disables the equipment when he spawns. The effect is that you can't use your cloak
// whilst you are in the victim's system and he is alive, but you get them back as soon as he dies or you leave his system.
// Checks to see that the equipment is working. If it is damaged then it isn't removed, so you don't get a free repair
if (player.ship.equipmentStatus("EQ_CLOAKING_DEVICE") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_CLOAKING_DEVICE");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
}
if (player.ship.equipmentStatus("EQ_ENERGY_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ENERGY_BOMB");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
}
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
// As Victim 3 is a clean ship and none of the Assassins Victims ever attack NPC ships, lawful ships such as the police, bounty hunters and Assassins ships with a lawful
// Alignment will only have hit a Victim by accident. The Victim won't respond to an NPC hit except to move out of the way and breaking the target lock of the NPC which hit
// the Victim stops it shooting for a few seconds whilst it finds a new traget. If the Victim accidently hit a police ship, it's bounty is set back to 0, so it won't be attacked again
// by police or other ships which attack ships with bounties. If the lawful ship which hit the Victim got a bounty added to it for hitting a clean ship, its bounty is also set back to
// 0, so a hunter doesn't get attacked by other hunters or police ships for the fiendly fire incident.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// In the native game the only ship which could deliberatly find and target an assassins Victim ship would be a Thargoid. If the ship which hit the Victim ship is anything other
// than a police, hunter or lawful ship then it's AI is set to a customAI to flee 26kms from the Victim Ship, then return to its normal AI. If it is attacked by another ship whilst
// it is fleeing from the Victim Ship then it will fight that ship instead and exit the fleeingAI if it destroys its attacker.
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 70;
missionVariables.assassins_rebooted_stage = 15;
mission.setInstructionsKey("assassins_rebooted_mission_description_13", "AssassinsRebooted");
mission.unmarkSystem(203);
this.ship.commsMessage(expandDescription("[assassins-death-victim3]"), player.ship);
// Re-Award the Cloak and / or Energy Bomb if either or both were disabled (You don't get em back if you didn't have them in the first place).
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
player.ship.awardEquipment("EQ_CLOAKING_DEVICE");
}
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
player.ship.awardEquipment("EQ_ENERGY_BOMB");
}
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim4.js |
"use strict";
this.name = "assassins_rebooted_victim4.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the 4th Mission Ship - Inspector Thorstan flying a Special Branch Asp";
this.shipSpawned = function()
{
this.ship.bounty = 0;
// All Victims (except the first one) are offered as targets after the player recieves the Mark Transponder Scanner.
// Victims are marked in flashing red and blue, but you cannot use your cloak or energy bomb (if you have them) whilst you are in the same system as the victim.
// As the victims only appear at their respective system at the time their mission is running, their own script tests to see if the player has either item of equipment
// and replaces it with a dummy (which just appears adds the words '(Unavailable)' on the items F5 screen description, so that you no longer have a useable cloak or
// energy bomb. The dummy equipment is tested for under death actions and by the main script and rewards the real equipment and removes the dummy. The main script
// doesn't need to check for the presence of the victim as if he is there, his script disables the equipment when he spawns. The effect is that you can't use your cloak
// whilst you are in the victim's system and he is alive, but you get them back as soon as he dies or you leave his system.
// Checks to see that the equipment is working. If it is damaged then it isn't removed, so you don't get a free repair
if (player.ship.equipmentStatus("EQ_CLOAKING_DEVICE") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_CLOAKING_DEVICE");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
}
if (player.ship.equipmentStatus("EQ_ENERGY_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ENERGY_BOMB");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
}
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
// As Victim 4 is a police ship and none of the Assassins Victims ever attack NPC ships, lawful ships such as the police, bounty hunters and Assassins ships with a lawful
// Alignment will only have hit a Victim by accident. The Victim won't respond to an NPC hit except to move out of the way and breaking the target lock of the NPC which hit
// the Victim stops it shooting for a few seconds whilst it finds a new traget. If the Victim accidently hit a police ship, it's bounty is set back to 0, so it won't be attacked again
// by police or other ships which attack ships with bounties. If the lawful ship which hit the Victim got a bounty added to it for hitting a clean ship, its bounty is also set back to
// 0, so a hunter doesn't get attacked by other hunters or police ships for the fiendly fire incident.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// In the native game the only ship which could deliberatly find and target an assassins Victim ship would be a Thargoid. If the ship which hit the Victim ship is anything other
// than a police, hunter or lawful ship then it's AI is set to a customAI to flee 26kms from the Victim Ship, then return to its normal AI. If it is attacked by another ship whilst
// it is fleeing from the Victim Ship then it will fight that ship instead and exit the fleeingAI if it destroys its attacker.
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 75;
missionVariables.assassins_rebooted_stage = 21;
mission.setInstructionsKey("assassins_rebooted_mission_description_16", "AssassinsRebooted");
mission.unmarkSystem(18);
this.ship.commsMessage(expandDescription("[assassins-death-victim4]"), player.ship);
// Re-Award the Cloak and / or Energy Bomb if either or both were disabled (You don't get em back if you didn't have them in the first place).
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
player.ship.awardEquipment("EQ_CLOAKING_DEVICE");
}
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
player.ship.awardEquipment("EQ_ENERGY_BOMB");
}
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim4_escort.js |
"use strict";
this.name = "assassins_rebooted_victim4_escort.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to prevent friendly fire and stop the Victim's escort ships getting involved in fights with Thargoids.";
this.shipSpawned = function()
{
// In case the ship has been called as a standard role and has thus had a bounty added by the populater, set the bounty back to zero for lawful ships.
this.ship.bounty = 0;
}
// Ships and Stations added by the OXZ have the roles lawful or chaotic in addition to their normal roles.
// Lawful ships will never target each other, so will only hit each other by accident when shooting at another target
// All the lawful ships have zero bountys so also won't be targeted by police ships either.
// If hit by a police ship or a member of it's own faction then the scipt messages the AI not to attack the other ship and instead wait for 2 seconds before returing to what
// it was doing before it was hit. If the player is the attacker then attacking a lawful ship will make the player a fugertive. The ship which hit the ship will also get a friendly fire
// warning and its AI will stop firing to for a few seconds. The special Thargoids appearing during the Victim 4 mission have special AIs and scripts which means they will
// not attack victim 4 or his escorts. The escorts will also not respond to accidental hits by the Thargoids.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// Target lock is still broken in case the attacker deliberitly targeted a ship on its own side due to it being awarded a bounty.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker was a Thargoid, stop it fireing back.
if (whom.roles.indexOf("assassins_rebooted_non_target") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.bounty = 0;
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker was a Thargoid, stop it fireing back.
if (whom.roles.indexOf("assassins_rebooted_non_target") > -1 )
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.bounty = 0;
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful station with turrets and it is accidently pelting one of it's own defenders with plasma, the defender will perform a short flee to get out of the way.
if (whom.roles.indexOf("assassins_rebooted_lawful_gunner") > -1 )
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("AVOID_LAWFUL_GUNNER");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim5.js |
"use strict";
this.name = "assassins_rebooted_victim5.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the 5th Mission Ship - the Malfunctioning BattleBot Control Drone";
this.shipSpawned = function()
{
// Random Boost to the base bounty of 125.
this.ship.bounty += Math.random()*12+1;
// All Victims (except the first one) are offered as targets after the player recieves the Mark Transponder Scanner.
// Victims are marked in flashing red and blue, but you cannot use your cloak or energy bomb (if you have them) whilst you are in the same system as the victim.
// As the victims only appear at their respective system at the time their mission is running, their own script tests to see if the player has either item of equipment
// and replaces it with a dummy (which just appears adds the words '(Unavailable)' on the items F5 screen description, so that you no longer have a useable cloak or
// energy bomb. The dummy equipment is tested for under death actions and by the main script and rewards the real equipment and removes the dummy. The main script
// doesn't need to check for the presence of the victim as if he is there, his script disables the equipment when he spawns. The effect is that you can't use your cloak
// whilst you are in the victim's system and he is alive, but you get them back as soon as he dies or you leave his system.
// Checks to see that the equipment is working. If it is damaged then it isn't removed, so you don't get a free repair
if (player.ship.equipmentStatus("EQ_CLOAKING_DEVICE") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_CLOAKING_DEVICE");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
}
if (player.ship.equipmentStatus("EQ_ENERGY_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ENERGY_BOMB");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
}
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// Does not respond either to NPC attacks or accidental friendly fire from it's own side.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// As Victim 5 is a fugitive, police ships and bounty hunters will attack it. The attacking ship will be forced to break off however and the Victim won't respond to the attack.
// This makes Victim 5 effectively unkillable by NPCs as any NPC which hits the ships is forced to flee 26kms from it.
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
missionVariables.assassins_rebooted_stage = 25;
mission.setInstructionsKey("assassins_rebooted_mission_description_19", "AssassinsRebooted");
mission.unmarkSystem(39);
this.ship.commsMessage(expandDescription("[assassins-death-victim5]"), player.ship);
// Re-Award the Cloak and / or Energy Bomb if either or both were disabled (You don't get em back if you didn't have them in the first place).
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
player.ship.awardEquipment("EQ_CLOAKING_DEVICE");
}
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
player.ship.awardEquipment("EQ_ENERGY_BOMB");
}
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim5_escort.js |
"use strict";
this.name = "assassins_rebooted_victim5_escort.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for Escorts of Victims 5 - the Malfunctioning Control Drone";
this.shipSpawned = function()
{
// Give the Escort a Callsign.
var bot_name = expandDescription("[assassins-battlebot_type4_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
// Random Boost to the base bounty of 7.
this.ship.bounty += Math.random()*6+1;
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// Does not respond either to NPC attacks or accidental friendly fire from it's own side.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// As Victim 5 is a fugitive, police ships and bounty hunters will attack it. The attacking ship will be forced to break off however and the Victim won't respond to the attack.
// This makes Victim 5 effectively unkillable by NPCs as any NPC which hits the ships is forced to flee 26kms from it.
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_victim5_support_escort.js |
"use strict";
this.name = "assassins_rebooted_victim5_support_escort.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to name BattleBots and prevent friendly fire.";
// Give each Malfunctioning BattleBot a Callsign.
this.shipSpawned = function()
{
var bot_name = expandDescription("[assassins-battlebot_type6_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
// Random Boost to the base bounty..
this.ship.bounty += Math.random()*4+1;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another battlebot.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_victim5_support_type1.js |
"use strict";
this.name = "assassins_rebooted_victim5_support_type1.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to name BattleBots and prevent friendly fire.";
// Give each Malfunctioning BattleBot a Callsign.
this.shipSpawned = function()
{
var bot_name = expandDescription("[assassins-battlebot_type5_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
// Random Boost to the base bounty..
this.ship.bounty += Math.random()*7+1;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another battlebot.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_victim5_support_type2.js |
"use strict";
this.name = "assassins_rebooted_victim5_support_type2.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to name BattleBots and prevent friendly fire.";
// Give each Malfunctioning BattleBot a Callsign.
this.shipSpawned = function()
{
var bot_name = expandDescription("[assassins-battlebot_type7_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
// Random Boost to the base bounty..
this.ship.bounty += Math.random()*7+1;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another battlebot.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_victim6.js |
"use strict";
this.name = "assassins_rebooted_victim6.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the 6th Mission Ship - O-Ren Ishii in a Cobra Mark IX";
this.shipSpawned = function()
{
// All Victims (except the first one) are offered as targets after the player recieves the Mark Transponder Scanner.
// Victims are marked in flashing red and blue, but you cannot use your cloak or energy bomb (if you have them) whilst you are in the same system as the victim.
// As the victims only appear at their respective system at the time their mission is running, their own script tests to see if the player has either item of equipment
// and replaces it with a dummy (which just appears adds the words '(Unavailable)' on the items F5 screen description, so that you no longer have a useable cloak or
// energy bomb. The dummy equipment is tested for under death actions and by the main script and rewards the real equipment and removes the dummy. The main script
// doesn't need to check for the presence of the victim as if he is there, his script disables the equipment when he spawns. The effect is that you can't use your cloak
// whilst you are in the victim's system and he is alive, but you get them back as soon as he dies or you leave his system.
// Checks to see that the equipment is working. If it is damaged then it isn't removed, so you don't get a free repair
if (player.ship.equipmentStatus("EQ_CLOAKING_DEVICE") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_CLOAKING_DEVICE");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
}
if (player.ship.equipmentStatus("EQ_ENERGY_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ENERGY_BOMB");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
}
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// Does not respond either to NPC attacks or accidental friendly fire from it's own side.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// As Victim 6 is a fugitive, police ships and bounty hunters will attack it. The attacking ship will be forced to break off however and the Victim won't respond to the attack.
// This makes Victim 6 effectively unkillable by NPCs as any NPC which hits the ships is forced to flee 26kms from it.
// As Victim 6 is fought way out of the space lane, it is very unlikley to be found by a police or hunter ship, but the code is included just in case.
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
missionVariables.assassins_rebooted_stage = 31;
mission.setInstructionsKey("assassins_rebooted_mission_description_23", "AssassinsRebooted");
mission.unmarkSystem(81);
this.ship.commsMessage(expandDescription("[assassins-death-victim6]"), player.ship);
// Re-Award the Cloak and / or Energy Bomb if either or both were disabled (You don't get em back if you didn't have them in the first place).
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
player.ship.awardEquipment("EQ_CLOAKING_DEVICE");
}
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
player.ship.awardEquipment("EQ_ENERGY_BOMB");
}
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim6_beacon.js |
"use strict";
this.name = "assassins_rebooted_victim6_beacon.js";
this.author = "LittleBear, Eric Walch & Thargoid";
this.copyright = "November 2008 - But do what you like with it in your OXPs!";
this.description = "Stops the use of Quirium Weapons within scanning range and spawns mission ships for the 6th Assassination";
this.version = "2.2";
// This version of the script also spawns the 6th Victim and a small asteroid field as this version is used by the Guild Duelling Beacon.
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
// Add an asteroid field around the Beacon
system.addShips("assassins_rebooted_miner_rock",40,this.ship.position,40000);
// Add O-Ren Ishi flying a Cobra IX at the time of the mission. No separate check for mission stage is needed as the beacon is spawned by the main script only when
// the stage is at 30. (Spawns Victim 6 and escorts 10 kms ahead of the Beacon).
system.legacy_addShipsAtPrecisely("assassins_rebooted_victim6", 1, "abs", this.ship.position.add(this.ship.heading.multiply(10000)))
// Add Mining Drones with Pulse Lasers and an AI to patrol the asteroid field and attack the player.
system.addShips("assassins_rebooted_victim6_support",1,this.ship.position,5000);
system.addShips("assassins_rebooted_victim6_support",1,this.ship.position,10000);
system.addShips("assassins_rebooted_victim6_support",1,this.ship.position,15000);
delete this.shipSpawned;
}
this.quirium = ["EQ_QC_MINE", "EQ_CASCADE_MISSILE", "EQ_LAW_MISSILE", "EQ_OVERRIDE_MISSILE", "energy-bomb", "RANDOM_HITS_MINE", "EQ_MEGA_DEATH_MISSILE"];
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
}
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
}
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
}
}
this.doScan = function ()
{
// create an array with all weapons in range.
function allShips(entity) {return entity.isShip && entity.isWeapon};
var missiles = system.filteredEntities(this, allShips, this.ship, this.ship.scannerRange);
for (var i = 0; i < missiles.length; i++)
{
if (this.quirium.indexOf(missiles[i].primaryRole) > -1)
{
missiles[i].explode();
this.ship.fireECM();
break; // found one
}
}
}
this.thargoidScan = function ()
{
// create an array with all thargoids in range.
function allShips(entity) {return entity.isShip && entity.isThargoid};
var thargoids = system.filteredEntities(this, allShips, this.ship, this.ship.scannerRange);
for (var i = 0; i < thargoids.length; i++)
{
if (thargoids[i].hasRole("secondWave_mineTharglet"))
{
thargoids[i].explode();
this.ship.fireECM();
break; // found one
}
}
}
|
| Scripts/assassins_rebooted_victim6_escort.js |
"use strict";
this.name = "assassins_rebooted_victim6_escort.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for Escorts of Victims 6 - Reprogrammed Mining Drones escorting O-Ren Ishi's Cobra IX";
this.shipSpawned = function()
{
// Give the Escort a Callsign.
var bot_name = expandDescription("[assassins-battlebot_type9_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
this.ship.bounty = 0;
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// Does not respond either to NPC attacks or accidental friendly fire from it's own side.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// As Victim 5 is a fugitive, police ships and bounty hunters will attack it. The attacking ship will be forced to break off however and the Victim won't respond to the attack.
// This makes Victim 5 effectively unkillable by NPCs as any NPC which hits the ships is forced to flee 26kms from it.
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_victim6_support.js |
"use strict";
this.name = "assassins_rebooted_victim6_support.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Used to name Mining Drones and prevent friendly fire.";
// Give each Drone a Callsign.
this.shipSpawned = function()
{
var bot_name = expandDescription("[assassins-battlebot_general_name]");
this.ship.displayName = this.ship.name + ": " +bot_name;
this.ship.bounty = 0;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
// Doesn't respond to an accidental hit by another battlebot.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1 )
{
this.ship.target = null;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|
| Scripts/assassins_rebooted_victim7.js |
"use strict";
this.name = "assassins_rebooted_victim7.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the 7th Mission Ship - Boss Yankisona flying a gold plated Boa by Griff.";
this.shipSpawned = function()
{
// Random Boost to the base bounty of 725.
this.ship.bounty += Math.random()*23+3;
// All Victims (except the first one) are offered as targets after the player recieves the Mark Transponder Scanner.
// Victims are marked in flashing red and blue, but you cannot use your cloak or energy bomb (if you have them) whilst you are in the same system as the victim.
// As the victims only appear at their respective system at the time their mission is running, their own script tests to see if the player has either item of equipment
// and replaces it with a dummy (which just appears adds the words '(Unavailable)' on the items F5 screen description, so that you no longer have a useable cloak or
// energy bomb. The dummy equipment is tested for under death actions and by the main script and rewards the real equipment and removes the dummy. The main script
// doesn't need to check for the presence of the victim as if he is there, his script disables the equipment when he spawns. The effect is that you can't use your cloak
// whilst you are in the victim's system and he is alive, but you get them back as soon as he dies or you leave his system.
// Checks to see that the equipment is working. If it is damaged then it isn't removed, so you don't get a free repair
if (player.ship.equipmentStatus("EQ_CLOAKING_DEVICE") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_CLOAKING_DEVICE");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
}
if (player.ship.equipmentStatus("EQ_ENERGY_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ENERGY_BOMB");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
}
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
// Does not respond either to NPC attacks or accidental friendly fire from it's own side.
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// As Victim 7 is a fugitive, police ships and bounty hunters will attack it. The attacking ship will be forced to break off however and the Victim won't respond to the attack.
// This makes Victim 7 effectively unkillable by NPCs as any NPC which hits the ships is forced to flee 26kms from it.
// As Victim 7 is fought way out of the space lane, it is very unlikley to be found by an police or hunter ships, but the code is included just in case.
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
return;
}
if (whom.roles.indexOf("assassins_rebooted_chaotic_character") > -1)
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.target = null;
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
missionVariables.assassins_rebooted_stage = 36;
mission.setInstructionsKey("assassins_rebooted_mission_description_26", "AssassinsRebooted");
mission.unmarkSystem(53);
this.ship.commsMessage(expandDescription("[assassins-death-victim7]"), player.ship);
// Re-Award the Cloak and / or Energy Bomb if either or both were disabled (You don't get em back if you didn't have them in the first place).
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
player.ship.awardEquipment("EQ_CLOAKING_DEVICE");
}
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
player.ship.awardEquipment("EQ_ENERGY_BOMB");
}
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim8.js |
"use strict";
this.name = "assassins_rebooted_victim8.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the 8th Mission Ship - Bi Xea'nu abord an Aeron Class Frigate";
this.shipSpawned = function()
{
this.ship.bounty = 0;
// All Victims (except the first one) are offered as targets after the player recieves the Mark Transponder Scanner.
// Victims are marked in flashing red and blue, but you cannot use your cloak or energy bomb (if you have them) whilst you are in the same system as the victim.
// As the victims only appear at their respective system at the time their mission is running, their own script tests to see if the player has either item of equipment
// and replaces it with a dummy (which just appears adds the words '(Unavailable)' on the items F5 screen description, so that you no longer have a useable cloak or
// energy bomb. The dummy equipment is tested for under death actions and by the main script and rewards the real equipment and removes the dummy. The main script
// doesn't need to check for the presence of the victim as if he is there, his script disables the equipment when he spawns. The effect is that you can't use your cloak
// whilst you are in the victim's system and he is alive, but you get them back as soon as he dies or you leave his system.
// Checks to see that the equipment is working. If it is damaged then it isn't removed, so you don't get a free repair
if (player.ship.equipmentStatus("EQ_CLOAKING_DEVICE") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_CLOAKING_DEVICE");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
}
if (player.ship.equipmentStatus("EQ_ENERGY_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ENERGY_BOMB");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
}
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
// As Victim 8 is a military ship and none of the Assassins Victims ever attack NPC ships, lawful ships such as the police, bounty hunters and Assassins ships with a lawful
// Alignment will only have hit a Victim by accident. The Victim won't respond to an NPC hit except to move out of the way and breaking the target lock of the NPC which hit
// the Victim stops it shooting for a few seconds whilst it finds a new traget. If the Victim accidently hit a police ship, it's bounty is set back to 0, so it won't be attacked again
// by police or other ships which attack ships with bounties. If the lawful ship which hit the Victim got a bounty added to it for hitting a clean ship, its bounty is also set back to
// 0, so a hunter doesn't get attacked by other hunters or police ships for the fiendly fire incident.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// In the native game the only ship which could deliberatly find and target an assassins Victim ship would be a Thargoid. If the ship which hit the Victim ship is anything other
// than a police, hunter or lawful ship then it's AI is set to a customAI to flee 26kms from the Victim Ship, then return to its normal AI. If it is attacked by another ship whilst
// it is fleeing from the Victim Ship then it will fight that ship instead and exit the fleeingAI if it destroys its attacker.
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 80;
missionVariables.assassins_rebooted_stage = 42;
missionVariables.assassins_rebooted_navy_base_lockdown = "No";
mission.setInstructionsKey("assassins_rebooted_mission_description_29", "AssassinsRebooted");
mission.unmarkSystem(82);
this.ship.commsMessage(expandDescription("[assassins-death-victim8]"), player.ship);
// Re-Award the Cloak and / or Energy Bomb if either or both were disabled (You don't get em back if you didn't have them in the first place).
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
player.ship.awardEquipment("EQ_CLOAKING_DEVICE");
}
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
player.ship.awardEquipment("EQ_ENERGY_BOMB");
}
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim9.js |
"use strict";
this.name = "assassins_rebooted_victim9.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for the 9th Mission Ship - Sky Marshal Claudius Maximus in a Deamon Class Cruiser";
this.shipSpawned = function()
{
this.ship.bounty = 0;
// All Victims (except the first one) are offered as targets after the player recieves the Mark Transponder Scanner.
// Victims are marked in flashing red and blue, but you cannot use your cloak or energy bomb (if you have them) whilst you are in the same system as the victim.
// As the victims only appear at their respective system at the time their mission is running, their own script tests to see if the player has either item of equipment
// and replaces it with a dummy (which just appears adds the words '(Unavailable)' on the items F5 screen description, so that you no longer have a useable cloak or
// energy bomb. The dummy equipment is tested for under death actions and by the main script and rewards the real equipment and removes the dummy. The main script
// doesn't need to check for the presence of the victim as if he is there, his script disables the equipment when he spawns. The effect is that you can't use your cloak
// whilst you are in the victim's system and he is alive, but you get them back as soon as he dies or you leave his system.
// Checks to see that the equipment is working. If it is damaged then it isn't removed, so you don't get a free repair
if (player.ship.equipmentStatus("EQ_CLOAKING_DEVICE") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_CLOAKING_DEVICE");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
}
if (player.ship.equipmentStatus("EQ_ENERGY_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ENERGY_BOMB");
player.ship.awardEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
}
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
// As Victim 9 is a police ship and none of the Assassins Victims ever attack NPC ships, lawful ships such as the police, bounty hunters and Assassins ships with a lawful
// Alignment will only have hit a Victim by accident. The Victim won't respond to an NPC hit except to move out of the way and breaking the target lock of the NPC which hit
// the Victim stops it shooting for a few seconds whilst it finds a new traget. If the Victim accidently hit a police ship, it's bounty is set back to 0, so it won't be attacked again
// by police or other ships which attack ships with bounties. If the lawful ship which hit the Victim got a bounty added to it for hitting a clean ship, its bounty is also set back to
// 0, so a hunter doesn't get attacked by other hunters or police ships for the fiendly fire incident.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// In the native game the only ship which could deliberatly find and target an assassins Victim ship would be a Thargoid. If the ship which hit the Victim ship is anything other
// than a police, hunter or lawful ship then it's AI is set to a customAI to flee 26kms from the Victim Ship, then return to its normal AI. If it is attacked by another ship whilst
// it is fleeing from the Victim Ship then it will fight that ship instead and exit the fleeingAI if it destroys its attacker.
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 85;
missionVariables.assassins_rebooted_stage = 48;
missionVariables.assassins_rebooted_reinforcements = "Outlaw";
delete missionVariables.assassins_rebooted_escort_counter;
mission.setInstructionsKey("assassins_rebooted_mission_description_32", "AssassinsRebooted");
mission.unmarkSystem(13);
System.infoForSystem(6,13).description = "Eszausve is famous for its rocky moon and the twin gas giants Hades and Lernean but cursed by one of the most oppressive governments in the Galaxy. The People's Popular Front has made substantial gains in surface battles but remains out gunned by the imperial fleet in the spacelanes. The recent destruction of the Imperial Flagship by a mysterious Commander has however rallied the rebels.";
this.ship.commsMessage(expandDescription("[assassins-death-victim9]"), player.ship);
// Re-Award the Cloak and / or Energy Bomb if either or both were disabled (You don't get em back if you didn't have them in the first place).
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_CLOAK");
player.ship.awardEquipment("EQ_CLOAKING_DEVICE");
}
if (player.ship.equipmentStatus("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB") === "EQUIPMENT_OK") {
player.ship.removeEquipment("EQ_ASSASSINS_REBOOTED_REMOVED_BOMB");
player.ship.awardEquipment("EQ_ENERGY_BOMB");
}
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim9_escort.js |
"use strict";
this.name = "assassins_rebooted_victim9_escort.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for Escorts of Lawful Victims.";
this.shipSpawned = function()
{
this.ship.bounty = 0;
// A temporary variable is set at zero and then deleted once all ships in the Group have spawned.
// This just ensures that each ship in the Group gets a different name.
missionVariables.assassins_rebooted_escort_counter++;
var name = "Prometheus"; // Fallback not used.
if (missionVariables.assassins_rebooted_escort_counter === 1) {
var name = "Pestilence";
}
if (missionVariables.assassins_rebooted_escort_counter === 2) {
var name = "Famine";
}
if (missionVariables.assassins_rebooted_escort_counter === 3) {
var name = "Death";
}
if (missionVariables.assassins_rebooted_escort_counter === 4) {
var name = "War";
}
this.ship.displayName = this.ship.name + ": " +name;
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 5;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
player.bounty |= 5;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_victim_lawful_escort.js |
"use strict";
this.name = "assassins_rebooted_victim_lawful_escort.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script for Escorts of Lawful Victims.";
this.shipSpawned = function()
{
this.ship.bounty = 0;
// Closing Bracket for This Ship Spawned.
}
// Only react to attacks from the player.
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 51;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
// Same Tests as for being attacked above.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_ATTACK");
player.bounty |= 5;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
// Same Tests as for being attacked above, but whilst the Victim will ignore a laser attack (as it won't be hit again), if an NPC has fired a missile at it, it will send
// a script message to the AI to flee the incoming missile and use ECM, but not to attack the other ship.
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("PLAYER_MISSILE");
player.bounty |= 5;
return;
}
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1 || whom.roles.indexOf("hunter") > -1
|| whom.roles.indexOf("assassins_rebooted_lawful_character") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
else
{
whom.reactToAIMessage("TARGET_LOST");
whom.setAI("assassins_rebooted_break_offAI.plist");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("NPC_MISSILE");
return;
}
// End of this.shipAttackedWithMissile
}
this.shipDied = function (whom)
{
if (whom && whom.isPlayer)
{
player.bounty |= 51;
// End of Killed by the Player.
}
// End of this.shipDied
}
|
| Scripts/assassins_rebooted_war_memorial.js |
"use strict";
this.name = "assassins_rebooted_war_memorial.js";
this.author = "LittleBear";
this.copyright = "CC-by-nc-sa-3.0";
this.version = "1.0";
this.description = "Script to rotate the memorial towards the main station and make attacking it a crime. Also spawns associated ships and mission ships.";
this.shipSpawned = function()
{
var targetVector = system.mainStation.position.subtract(this.ship.position).direction();
var angle = this.ship.heading.angleTo(targetVector);
var cross = this.ship.heading.cross(targetVector).direction();
this.ship.orientation = this.ship.orientation.rotate(cross, -angle);
var pos = this.ship.position;
// Add an asteroid field around the Memorial.
system.addShips("assassins_rebooted_miner_rock",45,pos,25000);
// Add a group of 3 Sonoran police patrol ships with AIs to patrol around the asteroid field. They will attack offenders and
// fugitives and any ship fireing at the War Memorial.
system.addShips("assassins_rebooted_local_patrol_rebel_sonoran_leader",1,pos,15000);
// Add a Liner with two Fer-de-lance escorts and an AI to remain near in the asteroid field unless or until the player arrives.
// When the player arrives it will fly towards the Monument and broadcast a prayer when it gets there. It will then go to the
// Main Station and dock with it.
system.addShips("assassins_rebooted_democratic_memorial_liner",1,pos,20000);
delete this.shipSpawned;
}
this.shipBeingAttacked = function (whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipBeingAttacked
}
this.shipBeingAttackedUnsuccessfully = function(whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of shipBeingAttackedUnsuccessfully
}
this.shipAttackedWithMissile = function(missile, whom)
{
if (!whom) return;
this.ship.bounty = 0;
if (whom.isPlayer)
{
this.ship.reactToAIMessage("ATTACKED");
player.bounty |= 51;
}
// Cause a police ship attacking a lawful ship to break off. If the lawful ship or attacking ship gained a bounty, both are reset to zero.
if (whom.roles.indexOf("police") > -1 || whom.roles.indexOf("wingman") > -1 || whom.roles.indexOf("interceptor") > -1)
{
whom.target = null;
whom.bounty = 0;
whom.reactToAIMessage("TARGET_LOST");
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// If the attacker is another lawful ship, then it will only have hit by accident and the ship will not have been the attacker's current target.
// No need to break the attacker's target, but the ship will not respond to the accidental hit except by Idleing for 1.5 seconds before returning to its normal AI.
if (whom.roles.indexOf("assassins_rebooted_lawful_character") > -1 )
{
whom.bounty = 0;
this.ship.target = null;
this.ship.bounty = 0;
this.ship.reactToAIMessage("FRIENDLY_FIRE");
return;
}
// End of this.shipAttackedWithMissile
}
|