Hi pagroovepagroove wrote:On a side note: I also made a new breakpattern.ogg
You hear the tunnel and it's quite cool. If anyone wants to have then let me know.
I would like to have it!
Moderators: winston, another_commander
Code: Select all
this.name = "Famous Planets Launch Script";
this.author = "PAGroove and Thargoid";
this.copyright = "© 2008 the Oolite team.";
this.description = "Play selected music files and displays greetings when the player witchspaces into or undocks from the main station in a Famous Planet system.";
this.version = "0.2";
/* this.logging, this.audio, this.extraA and this.extraB are for compatability with OXPConfig.oxp.
this.logging - turns logging to stderr.txt and JSConsole on and off (off by default).
this.audio - turns the tunes at witchspace entry and undocking from the main station in FP locations on and off (on by default).
this.extraA - turns on/off welcome console messages after witchspace arrival in FP location (on by default).
this.extraB - turns on/off departure console messages main station undocking in FP location (on by default).
*/
this.startUp = function()
{
this.logging = false; this.audio = true; this.extraA = true; this.extraB = true;
}
this.shipExitedWitchspace = function()
{
if(this.logging) {log("Player in galaxy " + (galaxyNumber+1) + " at " + system.name + " (" + system.ID + ")."); };
if(galaxyNumber == 0)
{
switch(system.ID)
{
case 7:
{
if(this.audio) {Sound.playMusic('LaveWitch.ogg'); } else {Sound.stopMusic(); };
if(this.logging && this.audio) {log("Playing Lave witchspace music."); };
if(this.extraA) {player.consoleMessage("Welcome to " + system.name + " Commander " + player.name) };
break;
}
case 147:
{
if(this.audio) {Sound.playMusic('DisoWitch.ogg'); } else {Sound.stopMusic(); };
if(this.logging && this.audio) {log("Playing Diso witchspace music."); };
if(this.extraA) {player.consoleMessage("Welcome to " + system.name + " Commander " + player.name) };
break;
}
case 246:
{
if(this.audio) {Sound.playMusic('TianveWitch.ogg'); } else {Sound.stopMusic(); };
if(this.logging && this.audio) {log("Playing Tianve witchspace music."); };
if(this.extraA) {player.consoleMessage("Welcome to " + system.name + " Commander " + player.name) };
break;
}
}
}
}
this.shipLaunchedFromStation = function()
{
if(galaxyNumber == 0 && system.mainStation)
{
switch(system.ID)
{
case 7:
{
if(this.audio) {Sound.playMusic('LaveLaunch.ogg'); } else {Sound.stopMusic(); };
if(this.logging && this.audio) {log("Playing Lave launch music."); };
if(this.extraB) {player.consoleMessage("We hope you enjoyed " + system.name + " station Commander " + player.name) };
break;
}
case 147:
{
if(this.audio) {Sound.playMusic('DisoLaunch.ogg'); } else {Sound.stopMusic(); };
if(this.logging && this.audio) {log("Playing Diso launch music."); };
if(this.extraB) {player.consoleMessage("We hope you enjoyed " + system.name + " station Commander " + player.name) };
break;
}
case 246:
{
if(this.audio) {Sound.playMusic('TianveLaunch.ogg'); } else {Sound.stopMusic(); };
if(this.logging && this.audio) {log("Playing Tianve launch music."); };
if(this.extraB) {player.consoleMessage("We hope you enjoyed " + system.name + " station Commander " + player.name) };
break;
}
}
}
}
For adding it into OXPConfig I need a fixed script-name (e.g. this.name = "Famous Planets") and a short description for the switches. Then it's done within 3 minutes :-) I'm already planning the next version, so it is better to wait till pagroove has released his next version.Thargoid wrote:I've tested it as far as I can, but of course I don't have the music. As it's not yet built into OXPConfig (talk to Svengali about that), my tests were via the JS console and the worldScripts command (worldScripts ["Famous Planets Launch Script"].logging = true and variations thereon).
Code: Select all
OXPCONFIG_OVERALLB = "3";
Code: Select all
OXPCONFIG2_INFO0 = "Famous Planets Launch Script";
OXPCONFIG2_INFO1 = "15";
OXPCONFIG2_INFO2 = "Audio - Switch on/off music in FP systems\nExtraA - Switch on/off exiting witchspace message in FP systems\nExtraB - Switch on/off launching message in FP systems";
Code: Select all
OXPCONFIG_PAGEA2 = "Configure Famous Planets";