| Config/script.js | this.name					= "PopuDracoscript";
this.author					= "Rorschachhamster";
this.copyright				= "Creative Commons Attribution - Non-Commercial - Share Alike 4.0 license";
this.description			= "Populator for Pirategroups with a Draco and several Dragonettes and wyrms";
this.version				= "1.0.4";
"use strict";
// Custom role for this.ship.spawned in ship script
this.role1 = "draco_pirate_mother"; 
this.shipWillExitWitchspace = function()
{
   var myRND = Math.random();
   
   if(system.isInterstellarSpace || myRND <= 0.90) 
      return;
   if(system.countShipsWithRole(this.role1) > 0) 
      return;
   if(system.population < 25 || system.government <= 2) 
      return;
   system.addShipsToRoute(this.role1, 1,  Math.random(), "wp");
};
this.shipWillLaunchFromStation = function()
{
   var myRND = Math.random();
   if(system.isInterstellarSpace || myRND <= 0.90)
      return;
   if(system.countShipsWithRole(this.role1) > 0)
      return;
   if(system.population < 25 || system.government <= 2)
      return;
   
   system.addShipsToRoute(this.role1, 1, Math.random(), "wp");
};
 | 
                
                    | Scripts/dracoaltpirate.old | this.name					= "dracoaltpirate.js";
this.author					= "Rorschachhamster";
this.copyright				= "Creative Commons: attribution, non-commercial, sharealike.";
this.description			= "Draco Pirate Mother";
this.version				= "1.00";
"use strict";
this.shipSpawned = function()
	{
	this.dracoPiratesGroup = new ShipGroup("Draco_Pirates", this.ship);
	this.ship.group = this.dracoPiratesGroup;
	this.dracoPiratesGroup.mother = this.ship;
	this.dragonetteCount = Math.round(Math.random() * 3);
	this.wyrmCount = Math.round(Math.random() * 3);
	var addDracoGroupShip;
	var num;
	for(var dragonCounter = 0;dragonCounter<this.dragonetteCount;dragonCounter++)
     {
        addDracoGroupShip = this.ship.spawnOne("rsdragonette_pirate_escort");
        this.dracoPiratesGroup.addShip(addDracoGroupShip);
        addDracoGroupShip.group = this.dracoPiratesGroup;
        num = dragonCounter+1;
        this.coordinatesForEscortPosition = function(num)
            {
            if (this.target!==null || this.target.scanClass!== "CLASS_CARGO")
                {var dracoGroupShipZ = this.target.z;} //If a viable target, surround it
            else
                {var dracoGroupShipZ = this.z;};//if not, surround the mother
        switch (num) {
   
        case 1:
        escort_position=new Vector(2500,0,dracoGroupShipZ-2500);
        break;
        case 2:
        escort_position=new Vector(-2500,0,dracoGroupShipZ-2500);
        break;
        case 3:
        escort_position=new Vector(-4500,0,dracoGroupShipZ);
        break;
        default: 
        escort_position=new Vector(-4500,0,dracoGroupShipZ); 
   
                };
            return escort_position;
	       };
    };
	for(var wyrmCounter = 0;wyrmCounter<this.wyrmCount;wyrmCounter++)
	{
    addDracoGroupShip = this.ship.spawnOne("rswyrmalt_npc_pirate_escort");
	this.dracoPiratesGroup.addShip(addDracoGroupShip);
	addDracoGroupShip.group = this.dracoPiratesGroup;
	if(dragonCounter==0)dragonCounter++;
	num = wyrmCounter+dragonCounter;
	this.coordinatesForEscortPosition = function(num)
    {
    if (this.target!==null || this.target.scanClass!== "CLASS_CARGO")
                {var dracoGroupShipZ = this.target.z;} //If a viable target, surround it
            else
                {var dracoGroupShipZ = this.z;};//if not, sorround the mother
        switch (num) {
   
   case 1:
        escort_position=new Vector(2500,0,dracoGroupShipZ+2500);
        break;
    case 2:
        escort_position=new Vector(-2500,0,dracoGroupShipZ+2500);
        break;
    case 3:
        escort_position=new Vector(4500,0,dracoGroupShipZ);
        break;
    case 4:
        escort_position=new Vector(-4500,0,dracoGroupShipZ);
        break;
    case 5:
        escort_position=new Vector(-2500,0,dracoGroupShipZ+2500);
        break;
    case 6:
        escort_position=new Vector(2500,0,dracoGroupShipZ+2500);
        break;
     default:
        escort_position=new Vector(2500,0,dracoGroupShipZ+2500); 
   
    };
    return escort_position;
    };
	};
    };
	
 | 
                
                    | Scripts/rsdracoaltpirate.js | this.name					= "rsdracoaltpirate.js";
this.author					= "Rorschachhamster";
this.copyright				= "Creative Commons Attribution - Non-Commercial - Share Alike 4.0 license";
this.description			= "Draco Pirate Mother";
this.version				= "1.0.4";
"use strict";
this.shipSpawned = function()
{
	this.dracoPiratesGroup = new ShipGroup("Draco_Pirates", this.ship);
	this.ship.group = this.dracoPiratesGroup;
	this.dracoPiratesGroup.mother = this.ship;
	this.dragonetteCount = Math.round(Math.random() * 3);
	this.wyrmCount = Math.round(Math.random() * 3);
	var addDracoGroupShip;
	var num;
	
    for(var dragonCounter = 0; dragonCounter < this.dragonetteCount; dragonCounter++)
    {
        addDracoGroupShip = this.ship.spawnOne("rsdragonette_pirate_escort");
        this.dracoPiratesGroup.addShip(addDracoGroupShip);
        addDracoGroupShip.group = this.dracoPiratesGroup;
        num = dragonCounter + 1;
        
        this.coordinatesForEscortPosition = function(num)
        {
            if(this.target !== null || this.target.scanClass !== "CLASS_CARGO")
            {
                var dracoGroupShipZ = this.target.z; // If a viable target, surround it
            }    
            else
            {
                var dracoGroupShipZ = this.z; // if not, surround the mother
            };    
        
            switch(num)
            {
                case 1:
                    escort_position = new Vector(2500,0,dracoGroupShipZ-2500);
                    break;
                case 2:
                    escort_position = new Vector(-2500,0,dracoGroupShipZ-2500);
                    break;
                case 3:
                    escort_position = new Vector(-4500,0,dracoGroupShipZ);
                    break;
                default: 
                    escort_position = new Vector(-4500,0,dracoGroupShipZ);
                    break; 
            };
            return escort_position;
	    };
    };
	
    for(var wyrmCounter = 0; wyrmCounter < this.wyrmCount; wyrmCounter++)
	{
        addDracoGroupShip = this.ship.spawnOne("rswyrmalt_npc_pirate_escort");
        this.dracoPiratesGroup.addShip(addDracoGroupShip);
        addDracoGroupShip.group = this.dracoPiratesGroup;
        
        if(dragonCounter == 0)
            dragonCounter++;
        num = wyrmCounter + dragonCounter;
	
        this.coordinatesForEscortPosition = function(num)
        {
            if(this.target !== null || this.target.scanClass !== "CLASS_CARGO")
            {
                var dracoGroupShipZ = this.target.z; // If a viable target, surround it
            }    
            else
            {
                var dracoGroupShipZ = this.z; // if not, sorround the mother
            };
            
            switch(num) 
            {
                case 1:
                    escort_position = new Vector(2500,0,dracoGroupShipZ+2500);
                    break;
                case 2:
                    escort_position = new Vector(-2500,0,dracoGroupShipZ+2500);
                    break;
                case 3:
                    escort_position = new Vector(4500,0,dracoGroupShipZ);
                    break;
                case 4:
                    escort_position = new Vector(-4500,0,dracoGroupShipZ);
                    break;
                case 5:
                    escort_position = new Vector(-2500,0,dracoGroupShipZ+2500);
                    break;
                case 6:
                    escort_position = new Vector(2500,0,dracoGroupShipZ+2500);
                    break;
                default:
                    escort_position = new Vector(2500,0,dracoGroupShipZ+2500);
                    break; 
            };
            return escort_position;
        };
	};
};
	
 |