Jump to content

Basic Telecomms Job Script with Customization!


LightFire53

Recommended Posts

 

 

if($job == "Captain" || $job == "Acting Captain")

{

$source = "Captain " + $source;

}

 

if($job == "Personal AI")

{

$source = "Personal Artificial Intelligence " + $source;

}

 

if($job == "AI")

{

$source = "Artificial Intelligence " + $source;

}

 

if($job == "Cyborg" || $job == "Android" || $job == "Robot")

{

$source = "Cybernetic Unit " + $source;

}

 

if($job == "Head of Security")

{

$source = "Commander " + $source;

}

 

if($job == "Head of Personnel")

{

$source = "Lieutenant " + $source;

}

 

if($job == "Research Director")

{

$source = "Professor " + $source;

}

 

if($job == "Chief Medical Officer")

{

$source = "Surgeon General " + $source;

}

 

if($job == "Chief Engineer")

{

$source = "Engineering Chief " + $source;

}

 

if($job == "Warden")

{

$source = "Warden " + $source;

}

 

if($job == "Detective" || $job == "Forensic Investigator")

{

$source = "Detective " + $source;

}

 

if($job == "Security Officer" || $job == "Security Pod Pilot")

{

$source = "Officer " + $source;

}

 

if($job == "Chef" || $job == "Cook" || $job == "Butcher")

{

$source = "Chef " + $source;

}

 

if($job == "Nanotrasen Representative")

{

$source = "Representative " + $source;

}

 

if($job == "Internal Affairs Agent" || $job == "Lawyer" || $job == "Public Defender" || $job == "Blueshield")

{

$source = "Agent " + $source;

}

 

if($job == "Nurse")

{

$source = "Nurse " + $source;

}

 

if($job == "Magistrate")

{

$source = "Magistrate " + $source;

}

 

if($job == "Quartermaster")

{

$source = "Quartermaster " + $source;

}

 

if($job == "Scientist" || $job == "Psychologist" || $job == "Xenoarcheologist" || $job == "Medical Doctor" || $job == "Psychiatrist" || $job == "Pathologist" || $job == "Pharmacist" || $job == "Surgeon" ||$job == "Xenobiologist" || $job == "Chemical Researcher" || $job == "Anomalist" || $job == "Coroner" || $job == "Brig Physician" || $job == "Virologist" || $job == "Geneticist" || $job == "Chemist" || $job == "Microbiologist"|| $job == "Plasma Researcher"|| $job == "Chemical Researcher")

{

$source = "Doctor " + $source;

}

 

$foo = "";

$joblow = lower($job);

 

if(mem($joblow)) { $foo = mem($joblow); }

else { $foo = substr($job, 1, 6); }

 

if (!find($source, "Unknown") && $job != "No id" && !find($source, " (as ")) {

$source = $source + " (" + $job + ")"; } // Add job next to people's names.

 

 

This is the basic script I use as AI. To change title, all you have to do is select the desired title, and edit it. For example,

 

 

if($job == "Captain" || $job == "Acting Captain")

{

$source = "Captain " + $source;

}

 

 

Can be modified into

 

 

if($job == "Captain" || $job == "Acting Captain")

{

$source = "Comdom " + $source;

}

 

 

I will try to keep this updated as I make more titles. Currently, I lack anything for Cargo Techs, Shaft Miners, ERT, Paramedic, Engineers, Atmos Techs, Bartender, Chaplain, Botanist, Clown, and Mime. I am looking for official sounding titles (Notice how everyone in Medbay and Science are doctors due to their doctorates).

 

Link to comment
Share on other sites

 

...I lack anything for Cargo Techs, Shaft Miners, ERT, Paramedic, Engineers, Atmos Techs, Bartender, Chaplain, Botanist, Clown, and Mime. I am looking for official sounding titles (Notice how everyone in Medbay and Science are doctors due to their doctorates).

 

Cargo Tech = "Shipping Specialist"

Shaft Miner = "Mineral Extraction Specialist"

ERT = "Response Team [rank]"

Paramedic = "Emergency Medical Technician" or "EMT"

Atmos Tech = "Enviromental Specialist"

Chaplain = "Clergyman"

Botanist = "Herbalist"

 

Clown = "Target Practice"

Mime = "Quiet Target Practice"

 

Link to comment
Share on other sites

  • 1 month later...

 

Update, now with colours!

 

 

if($job == "Captain" || $job == "Acting Captain")

{

$source = "Captain " + $source;

}

 

if($job == "Personal AI")

{

$source = "Personal Artificial Intelligence " + $source;

}

 

if($job == "AI")

{

$source = "Artificial Intelligence " + $source;

}

 

if($job == "Cyborg" || $job == "Android" || $job == "Robot")

{

$source = "Cybernetic Unit " + $source;

}

 

if($job == "Head of Security")

{

$source = "Commander " + $source;

}

 

if($job == "Head of Personnel")

{

$source = "Lieutenant " + $source;

}

 

if($job == "Research Director")

{

$source = "Professor " + $source;

}

 

if($job == "Chief Medical Officer")

{

$source = "Surgeon General " + $source;

}

 

if($job == "Botanist" || $job == "Hydroponicist" || $job == "Botanical Researcher")

{

$source = "Herbologist " + $source;

}

 

if($job == "Life Support Specialist" || $job == "Atmospheric Technician")

{

$source = "Atmospheric Specialist " + $source;

}

 

if($job == "Chief Engineer")

{

$source = "Engineering Chief " + $source;

}

 

if($job == "Warden")

{

$source = "Warden " + $source;

}

 

 

if($job == "Detective" || $job == "Forensic Investigator")

{

$source = "Detective " + $source;

}

 

if($job == "Security Officer" || $job == "Security Pod Pilot")

{

$source = "Officer " + $source;

}

 

if($job == "Chef" || $job == "Cook" || $job == "Butcher")

{

$source = "Chef " + $source;

}

 

if($job == "Nanotrasen Representative")

{

$source = "Representative " + $source;

}

 

if($job == "Internal Affairs Agent" || $job == "Lawyer" || $job == "Public Defender" || $job == "Blueshield")

{

$source = "Agent " + $source;

}

 

if($job == "Nurse")

{

$source = "Nurse " + $source;

}

 

if($job == "Magistrate")

{

$source = "Magistrate " + $source;

}

 

if($job == "Paramedic")

{

$source = "EMT " + $source;

}

 

if($job == "Clown")

{

$source = $source +" The Clown";

}

 

if($job == "Mime")

{

$source = $source + " The Mime";

}

 

if($job == "Chaplain")

{

$source = "Clergyman " + $source;

}

 

if($job == "Cargo Technician")

{

$source = "Shipping Specialist " + $source;

}

 

if($job == "Spelunker" || $job == "Shaft Miner")

{

$source = "Mineral Extractor " + $source;

}

 

if($job == "Quartermaster")

{

$source = "Quartermaster " + $source;

}

 

if($job == "Emergency Response Team Member")

{

$source = "Emergency Responder " + $source;

}

 

if($job == "Emergency Response Team Leader")

{

$source = "Emergency Response Leader " + $source;

}

 

if($job == "Scientist" || $job == "Psychologist" || $job == "Xenoarcheologist" || $job == "Medical Doctor" || $job == "Psychiatrist" || $job == "Pathologist" || $job == "Pharmacist" || $job == "Surgeon" ||$job == "Xenobiologist" || $job == "Chemical Researcher" || $job == "Anomalist" || $job == "Coroner" || $job == "Brig Physician" || $job == "Virologist" || $job == "Geneticist" || $job == "Chemist" || $job == "Microbiologist"|| $job == "Plasma Researcher"|| $job == "Chemical Researcher")

{

$source = "Doctor " + $source;

}

 

$foo = "";

$joblow = lower($job);

 

if(mem($joblow)) { $foo = mem($joblow); }

else { $foo = substr($job, 1, 6); }

 

 

underline = 0;

if(find("Captain Chief Engineer Head of Security Chief Medical Officer Research Director Head of Personnel Quartermaster",$job))

{

underline = 1; // heads

}

color = 0;

if(find("Captain Head of Personnel NanoTrasen Representative Magistrate Blueshield Officer",$job))

{

color = "193a7a"; // .comradio

}

if(find("NanoTrasen Representative Magistrate Blueshield Officer",$job))

{

color = "5C5C8A"; // .centradio

}

if(find("Quartermaster Cargo Technician Shaft Miner Spelunker",$job))

{

color = "5f4519"; // .supradio

}

if(find("Chief Engineer Maintenance Technician Engine Technician Electrician Life Support Specialist Atmospheric Technician Mechanic Station Engineer",$job))

{

color = "a66300"; // .engradio

}

if(find("Chief Medical Officer Medical Doctor Surgeon Nurse Coroner Chemist Pharmacologist Pharmacist Geneticist Virologist Pathologist Psychiatrist Therapist Psychologist Paramedic",$job))

{

color = "008160"; // .medradio

}

if(find("Head of Security Warden Forensic Technician Detective Security Officer Brig Physician Security Pod Pilot",$job))

{

color = "a30000"; // .secradio

}

if(find("Research Director Scientist Xenoarcheologist Anomalist Plasma Researcher Xenobiologist Chemical Researcher Roboticist Mechatronic Engineer Biomechanical Engineer",$job))

{

color = "993399"; // .sciradio

}

if ($job == "AI")

{

underline = 1;

color = "193a7a"; // command

color = "193a7a"; // pink

}

 

if ($source == "Traitor McTraitorton")

{

color = "6D3F40";

$job = "Traitor";

}

 

$source = $source + " (";

if (underline)

{

$source = $source + "";

}

if (color)

{

$source = $source + "";

}

$source = $source + $job;

if (color)

{

$source = $source + "";

}

if (underline)

{

$source = $source + "";

}

$source = $source + ")";

 

 

Link to comment
Share on other sites

 

Script I use:

 

if ($source == "Poly")

{

$pass = 0;

}

 

underline = 0;

if(find("Captain Chief Engineer Head of Security Chief Medical Officer Research Director Head of Personnel Quartermaster",$job))

{

underline = 1; // heads

}

color = 0;

if(find("Captain Head of Personnel",$job))

{

color = "193a7a"; // .comradio

}

if(find("NanoTrasen Representative Magistrate Blueshield Officer Emergency Response Team",$job))

{

color = "5C5C8A"; // .centradio

}

if(find("Quartermaster Cargo Technician Shaft Miner Spelunker",$job))

{

color = "5f4519"; // .supradio

}

if(find("Chief Medical Officer Medical Doctor Surgeon Nurse Coroner Chemist Pharmacologist Pharmacist Geneticist Virologist Pathologist Psychiatrist Therapist Psychologist Paramedic",$job))

{

color = "008160"; // .medradio

}

if(find("Head of Security Warden Forensic Technician Detective Security Officer Brig Physician Security Pod Pilot",$job))

{

color = "a30000"; // .secradio

}

if(find("Research Director Scientist Xenoarcheologist Anomalist Plasma Researcher Xenobiologist Chemical Researcher Roboticist Mechatronic Engineer Biomechanical Engineer",$job))

{

color = "993399"; // .sciradio

}

if(find("Chief Engineer Maintenance Technician Engine Technician Electrician Life Support Specialist Atmospheric Technician Mechanic Station Engineer",$job))

{

color = "a66300"; // .engradio

}

if ($job == "AI")

{

underline = 1;

color = "193a7a"; // command

color = "FF00FF"; // pink

}

 

if ($source == "Traitor McTraitorton")

{

color = "6D3F40";

$job = "Traitor";

}

 

$source = $source + " (";

if (underline)

{

$source = $source + "";

}

if (color)

{

$source = $source + "";

}

$source = $source + $job;

if (color)

{

$source = $source + "";

}

if (underline)

{

$source = $source + "";

}

$source = $source + ")";

 

 

Link to comment
Share on other sites

  • 3 weeks later...

 

Tzo, I've stolend you script and use it every time I can, how do I credit you or whoever came up with it ICly?

 

Also, this is the robust translation script everyone loves.

 

 

 

//translation script. Don't use with vulpkanin or you get lynched.

if($language != "Galactic Common" && $language != "Unknown" && $language != "Noise")

{

$pass = false;

$content = $content + " [translated from " + $language + "]";

broadcast($content, $freq, $source, $job);

}

 

 

 

I'm pretty sure crediting people in your scripts should be a standard, but who knows...

 

Link to comment
Share on other sites

 

Because I prefer modular code that I can patch together according to round usage. I'll give you several of my functions. Naturally, a few secrets have to stay with me, such as the sentient server trick, and the explosion button. Now then, on to my code dumping:

 

A simple Translation script with built in toggle:

 

 

$translate = mem("translate");

if ($content == "/translate" && find("Captain Head of Security Research Director AI", $job)) {

if ($translate == false) {

$translate = true;

} else {

$translate = false;

}

$pass = false;

}

 

mem("translate", $translate);

 

if ($language != "Galactic Common" && $translate && $job != "AI") {

$pass=0;

broadcast($content, $freq, $source + " [in: " + $language +"]", $job);

}

 

 

 

My advanced mute-script with customizable authlist and reporting system:

 

 

// Rd code snipet

$tsource = $source;

// end snipet

 

 

// ***************OTHER CODE**********************

 

 

// Begin RD Code --------------------------------------------------------------

 

// functions -----------------------------

def initialize() { // does what it says

$mutelist = vector();

$authlist = vector("AI", "Captain", "Research Director", "Head of Security");

$initialized = true;

mem("mutelist", $mutelist);

mem("authlist", $authlist);

mem("initialized", $initialized);

}

 

def vectostr($vec) { // condenses a vector into a string

$str = "";

$count = 1;

$size = length($vec);

while ($count <= $size) {

str += at($vec, $count);

if ($count != $size) {

$str += ", ";

}

}

return $str;

}

 

// initialization and parsing -----------------------------------

 

if (!(mem("initialized"))) {

initialize();

}

 

$authlist = mem("authlist");

$mutelist = mem("mutelist");

 

$expcont = length(at(explode($content, " "), 1));

$pcontent = vector(substr($content, 1, $expcont + 1), substr($content, $expcont + 2, length($content) + 1));

 

if (at($pcontent, 1) == "/addauth" && find($authlist, $job)) { // adds a user to the authlist

$strng = at($pcontent, 2);

if (!find($authlist, $strng)) {

$authlist += $strng;

$strng += " now authorized user";

} else {

$strng += " already authorized user";

}

broadcast($strng, 1461);

$pass = false;

}

 

if (at($pcontent, 1) == "/revokeauth" && find($authlist, $job)) { // removes a user from the authlist

$strng = at($pcontent, 2);

if (find($authlist, $strng) && !find("Captain AI Research Director Head of Security", $pcontent)) {

$authlist = remove($authlist, $strng);

$strng += " no longer authorized user";

} else {

$strng += " either not authorized user, or unrevokeable privledge";

}

broadcast($strng, 1461);

$pass = false;

}

 

// mute functions --------------------------------------

 

if (at($pcontent, 1) == "/mute" && find($authlist, $job)) {

$strng = at($pcontent, 2);

if (!find($mutelist, $strng)) {

$mutelist += $strng;

$strng += " muted";

} else {

$strng += " already muted";

}

broadcast($strng, 1461);

$pass = false;

}

 

if (at($pcontent, 1) == "/unmute" && find($authlist, $job)) {

$strng = at($pcontent, 2);

if (find($mutelist, $strng)) {

$mutelist = remove($mutelist, $strng);

$strng += " unmuted";

} else {

$strng += " not muted";

}

broadcast($strng, 1461);

$pass = false;

}

 

if (at($pcontent, 1) == "/mutelist" && find($authlist, $job)) {

$strng = "currently muted: " + vectostr($mutelist);

broadcast($strng, 1461);

$pass = false;

}

 

mem("mutelist",$mutelist);

 

if (find($mutelist, $tsource) || $tsource == "unknown") { // the actual mute function

$pass = false;

}

 

 

 

And finally, the debugging script for writing new commands:

 

 

$expcont = length(at(explode($content, " "), 1));

$pcontent = vector(substr($content, 1, $expcont + 1), substr($content, $expcont + 2, length($content) + 1)) + 1;

 

 

$broad = "";

 

if ($job == "Research Director") {

$broad = $content;

$content = substr($content, $expcont + 2, length($content) + 1);

broadcast($content, 1461);

$content = $broad;

}

 

if (at($pcontent, 1) == "/test") {

$content = at($pcontnet, 2);

broadcast("test", 1461);

$pass = false;

}

 

 

 

Link to comment
Share on other sites

  • 5 months later...

 

New script, borrowed from CarlenWhite. More interesting, people seemed to enjoy it.

 

 

//sets the underline and color, depending on the speaker's job by @CarlenWhite based off an Unknown person's code.

if(mem("first_run") == FALSE){

broadcast("Enhanced Telecoms Enabled. Enjoy!");

mem("first_run", 1);

}

 

underline = 0;

color = 0;

bold = 0;

color = "3b3b3b";

cardcolor = "4f6a4d";

alt = $job;

 

blacklisted = vector();

 

if(find(blacklisted, $source)){

$pass = 0;

}

 

$headRadio = vector("Quartermaster", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer");

$commandRadio = vector("Captain", "Head of Personnel");

$centralRadio = vector("Internal Affairs Agent", "Lawyer", "Public Defender", "Magistrate", "Nanotrasen Representative", "Blueshield", "Nanotrasen Navy Officer");

$securityRadio = vector("Head of Security", "Warden", "Detective", "Forensic Technician", "Security Officer", "Brig Physician", "Security Pod Pilot");

$medicalRadio = vector("Chief Medical Officer", "Medical Doctor", "Surgeon", "Nurse", "Coroner", "Chemist", "Pharmacist", "Pharmacologist", "Virologist", "Pathologist", "Microbiologist", "Psychiatrist", "Psychologist", "Therapist", "Paramedic");

$scienceRadio = vector("Research Director", "Geneticist", "Scientist", "Xenoarcheologist", "Anomalist", "Plasma Researcher", "Xenobiologist", "Chemical Researcher", "Roboticist", "Biomechanical Engineer", "Mechatronic Engineer");

$engineeringRadio = vector("Chief Engineer", "Station Engineer", "Maintenance Technician", "Engine Technician", "Electrician", "Life Support Specialist", "Atmospheric Technician", "Mechanic");

$supplyRadio = vector("Quartermaster", "Cargo Technician", "Shaft Miner", "Spelunker");

$supportRadio = vector("Bartender", "Chef", "Cook", "Culinary Artist", "Butcher", "Botanist", "Hydroponicist", "Botanical Researcher", "Clown", "Mime", "Janitor", "Custodial Technician", "Librarian", "Journalist", "Barber", "Hair Stylist", "Beautician", "Chaplain");

$civilianRadio = vector("Civilian", "Tourist", "Businessman", "Trader", "Assistant");

$siliconRadio = vector("AI", "Cyborg", "Android", "Robot");

$ERTRadio = vector("Special Operations Officer");

 

 

if(find($headRadio, $job) + find($commandRadio, $job)){

//underline = 1; // heads

}

if(find($centralRadio, $job)){

color = "e6a84d"; // Central Radio

cardcolor = "4664a0";

}

if(find($medicalRadio, $job)){

color = "3b3b3b"; // Medical Radio

cardcolor = "4d6cae";

}

if($job == "Chief Medical Officer"){

color = "1c1c1c";

cardcolor = "4d6cae";

$job = "CMO";

}

if(find($scienceRadio, $job)){

color = "3b3b3b"; // Science Radio

cardcolor = "cb7cc5";

}

if($job == "Research Director"){

color = "1c1c1c";

cardcolor = "cb7cc5";

$job = "RD";

}

if(find($siliconRadio, $job)){

color = "3a3a3a"; // Silicon Radio

cardcolor = "898f89";

$source = "" + $source + "";

$content = "" + $content + "";

}

if($job == "AI"){

//underline = 1;

color = "c60027";

cardcolor = "898f89";

}

if(find($supportRadio, $job)){

//color = "6eaa2c"; // Support Radio

//cardcolor = "";

}

if(find($civilianRadio, $job)){

//color = "808080"; // Civilian Radio

//cardcolor = "";

}

if(find($securityRadio, $job)){

color = "3b3b3b"; // Security Radio

cardcolor = "ae424a";

}

if($job == "Head of Security"){

color = "ae424a";

cardcolor = "1c1c1c";

$job = "HoS";

}

if(find($commandRadio, $job)){

color = "383838"; // Command Radio

cardcolor = "b9b9b9";

}

if($job == "Captain"){

color = "c6aa00";

cardcolor = "aa9100";

}

if($job == "Head of Personnel"){

//color = "2b63d4";

$job = "HoP";

}

if(find($engineeringRadio, $job)){

color = "3a3a3a"; // Engineering Radio

cardcolor = "e7ea5e";

}

if($job == "Chief Engineer"){

color = "1c1c1c";

cardcolor = "e7ea5e";

$job = "CE";

}

if(find($supplyRadio, $job)){

color = "3b3b3b"; // Supply Radio

cardcolor = "bdaa84";

}

if($job == "Quartermaster"){

//color = "c99336";

//cardcolor = "";

$job = "QM";

}

if ($job == "No id"){

color = "3a3a3a";

cardcolor = "b0593c";

$job = "???";

}

if(find($ERTRadio, $job)){

color = "e6a84d"; // Emergency Radio

cardcolor = "363636";

//underline = 1;

bold = 1;

$job = "ERT";

}

if (find("AI Captain", $job)){

bold = 1;

$content = "" + $content + "";

}

 

if ($source == "Poly"){

$pass = 0; // Mute Poly.

}

 

// Names changed due to size constraints.

// NONE

 

 

//parses the whole thing

//$content = replaceByWord($content, "AI", "AI");

// display: inline-block; max-width: 100px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center;

workspace = " ";

if (underline){

workspace += "";

}

if (bold){

workspace += "";

}

if (color){

workspace += "";

}

workspace += $job;

if (color){

workspace += "";

}

if (bold){

workspace += "";

}

if (underline){

workspace += "";

}

workspace += " ";

$source = workspace + " " + $source;

 

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

I am about to necropost the shit out of this topic.

This section does not work. Undefined variables in NTSL do not equal false in the current version.

if(mem("first_run") == FALSE){

broadcast("Enhanced Telecoms Enabled. Enjoy!");

mem("first_run", 1);

}

 

Instead, it must use

if(mem("first_run") != TRUE){

broadcast("Enhanced Telecoms Enabled. Enjoy!");

mem("first_run", 1);

}

Which DOES work. However, this section will cause every server this script runs on to output "Enhanced Telecoms Enabled. Enjoy!", which is a bit spammy, and to fix that requires some really hacky solutions.

Edited by Anticept
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use