It works just as it should! Thanks for being there and saving me from failure.Alnivel wrote: ↑Sun Jul 10, 2022 5:23 pmYep, there is no closing bracket for if after last $createMessage call. But also with this code this.shipSpawned will be overwrited and only "Insist on slave offering" will be displayed on top level of conversation.
this._IDcounter also shouldn't be reasigned again - this will not break anything (the code inside the functions is executed after the entire script top level code), but it confusing.
To add an option after a previous response, add a call to $createMessage right inside the callback.
Could you also see if you spot a way to include the xpatesc role in my naming script? My attempts aren't doing it because it eh.. this format is different from the other script.
Code: Select all
this.name = "xpatNamer";
this.startUp = function() {
var rsn = worldScripts.randomshipnames;
if (rsn) {
rsn.$externalNameEngine(this.name, "xpat", 1);
// the "1" in the function all above is the probability that the routine will be called. 1 means always.
}
}
this.$randomName = function(ship) {
var shipName = ["Xpat Adder: Tears of Diusreza", "Xpat Adder: The Struggle", "Xpat Adder: Promised Land", "Xpat Adder: Freedom from Torture", "Xpat Adder: Untamed Flowers", "Xpat Adder: Dare to Dream", "Xpat Adder: Freedom's Endeavour", "Xpat Adder: Out of Darkness", "Xpat Adder: Elusive Liberty", "Xpat Adder: The Bearable Tomorrow", "Xpat Adder: Broken Chain", "Xpat Adder: Fleeing Angel", "Xpat Adder: Agile Dissident", "Xpat Adder: Righteous Trespasser", "Xpat Adder: The Growling Resistance", "Xpat Adder: Salvation", "Xpat Adder: Destined Deliverance", "Xpat Adder: Rusty Redeemer", "Xpat Adder: Oppressor Evader", "Xpat Adder: The Miracle of Inus", "Xpat Adder: The Slip Away", "Xpat Adder: Bailer", "Xpat Adder: The Cut and Run", "Xpat Adder: The Last Resort", "Xpat Adder: Sanctuary", "Xpat Adder: The Scoot", "Xpat Adder: Emancipator", "Xpat Adder: Unyielding Spirit", "Xpat Adder: Sufferer No More", "Xpat Adder: Freedom Quest", "Xpat Adder: Lack-of-Option", "Xpat Adder: Servitude No More", "Xpat Adder: Bygone Oppression", "Xpat Adder: Unforgiving Mule", "Xpat Adder: Blameless Babe", , "Xpat Adder: Resolute Peasant"];
// end of xpatnames
//
return shipName[Math.floor(Math.random() * shipName.length)];
}