log reports this (the rest is snipped):
Code: Select all
[script.javaScript.warning.undefinedProp]: ----- JavaScript warning ("Blackjacksbullion witness death actions" 1.2 javascript version): reference to undefined property this.ship
[script.javaScript.warning.undefinedProp]: ../AddOns/BlackJack's Bullion v1.21.oxp/Scripts/witness.js, line 10.
[script.javaScript.exception.noProperties]: ***** JavaScript exception ("Blackjacksbullion witness death actions" 1.2 javascript version): TypeError: this.ship has no properties
[script.javaScript.exception.noProperties]: ../AddOns/BlackJack's Bullion v1.21.oxp/Scripts/witness.js, line 10.
blackjacks.js
Code: Select all
this.name = "Blackjacksbullion"
this.author = "Rustybolts"
this.copyright = "Do with as you wish"
this.description = "Starts in Galaxy 2 at Telace."
this.version = "1.2 javascript version"
this.shipDockedWithStation = function()
{
if (guiScreen != "GUI_SCREEN_MISSION" && player.ship.dockedStation.isMainStation && galaxyNumber==1 && !missionVariables.bolts && system.ID==241)
{
mission.runMissionScreen('revengebolts_briefing','pod.png')
mission.setInstructionsKey ('bolts1')
missionVariables.bolts='STAGE1'
}
if (guiScreen != "GUI_SCREEN_MISSION" && galaxyNumber==1 && player.ship.dockedStation.isMainStation && missionVariables.bolts == 'STAGE2')
{
mission.runMissionScreen('revengebolts_firearms','firearms.png')
mission.setInstructionsKey ("bolts2")
missionVariables.bolts='STAGE3'
}
if (guiScreen != "GUI_SCREEN_MISSION" && galaxyNumber==1 && player.ship.dockedStation.isMainStation && missionVariables.bolts == 'STAGE3' && system.ID==233)
{
mission.runMissionScreen('revengebolts_robbery', null)
player.ship.awardCargo("Firearms",1)
missionVariables.bolts='STAGE4'
mission.setInstructionsKey ('bolts3')
}
if (guiScreen != "GUI_SCREEN_MISSION" && galaxyNumber==1 && player.ship.dockedStation.isMainStation && missionVariables.bolts == 'STAGE4' && system.ID==127)
{
mission.runMissionScreen('revengebolts_flee','vipers.png')
player.ship.bounty = 64
missionVariables.bolts='STAGE5'
mission.setInstructionsKey ('bolts4')
}
if (missionVariables.bolts=='STAGE5')
{
player.ship.bounty = 64
}
if (missionVariables.bolts=='STAGE6')
{
player.ship.bounty = 64
}
if (guiScreen != "GUI_SCREEN_MISSION" && galaxyNumber==1 && player.ship.dockedStation.isMainStation && missionVariables.bolts == 'STAGE6' && system.ID==67)
{
mission.runMissionScreen('revengebolts_finnish','end.png')
player.credits+=9500
missionVariables.bolts='STAGE99'
player.ship.bounty = 0
mission.setInstructionsKey(null)
}
}
this.shipExitedWitchspace = function()
{
if (system.ID==99 && galaxyNumber==1 && missionVariables.bolts=='STAGE5')
{
system.legacy_addSystemShips("witness", 1, 0.10)
}
if (system.ID==88 && galaxyNumber==1 && missionVariables.bolts=='STAGE1')
{
system.legacy_addSystemShips("bolts", 1, 0.10)
}
}
this.tickle = function()
{
if (missionVariables.bolts=='STAGE6')
{
mission.setInstructionsKey ('bolts5')
}
}
Code: Select all
this.name = "Blackjacksbullion death actions"
this.author = "Rustybolts"
this.copyright = "Do with as you wish"
this.description = "Runs script for death of bolts"
this.version = "1.2 javascript version"
this.shipDied = function()
{
if (system.ID==88 && galaxyNumber==1 && missionVariables.bolts=='STAGE1')
{
player.ship.awardCargo("Gold",20)
player.consoleMessage("20 Gold Scooped")
missionVariables.bolts='STAGE2'
}
}
Code: Select all
this.name = "Blackjacksbullion witness death actions"
this.author = "Rustybolts"
this.copyright = "Do with as you wish"
this.description = "Runs script for death of witness"
this.version = "1.2 javascript version"
this.shipDied = function()
{
missionVariables.bolts='STAGE6'
this.ship.commsMessage("Nooooooooooooo!!")
}
Also, you should know that I am more-or-less definite noob to JS and I don't fully understand the script structure. (If I did, I wouldn't be posting this I guess)
P.S. This is more of educatonal purpose, than anything else. That's why I'm not bugging the author. Hey, what can I do? I like to learn as I go.
P.P.S. it is 1.73.0.2309 on 32-bit XP.