|
|
Line 10: |
Line 10: |
| Jobs will appear in brackets after names. | | Jobs will appear in brackets after names. |
|
| |
|
| <pre>sig.source+=" ("+sig.job+")";</pre> | | <pre> |
| | sig.source+=" ("+sig.job+")"; |
| | </pre> |
|
| |
|
| === Arrivals Alert Modification === | | === Abbr. Job Indicator === |
| Separates the automated arrivals messages from the AI's deliberate messages.
| | Gives abbreviations instead of full titles. |
| | |
| | <pre> |
| | //Abbr. Job Indicator - by TheDL |
| | jobs=list("Admiral", "Adm", "Assistant", "Ass", "Atmospheric Technician", "Atmo", "Bartender", "Bar", "Botanist", "Hydr", "Captain", "Cap", "Cargo Technician", "Carg", "Chaplain", "Chap", "Chemist", "Chem", "Chief Engineer", "CE", "Chief Medical Officer", "CMO", "Clerk", "Clrk", "Clown", "Clwn", "Curator", "Cura", "Detective", "Det", "Geneticist", "Gene", "Head of Personnel", "HoP", "Head of Security", "HoS", "Janitor", "Jani", "Lawyer", "Law", "Librarian", "Lib", "Medical Doctor", "MD", "Mining Medic", "Medi", "Paramedic", "Para", "Psychiatrist", "Psyc", "Quartermaster", "QM", "Research Director", "RD", "Roboticist", "Robo", "Scientist", "Sci", "Security Officer", "Sec", "Shaft Miner", "Mine", "Signal Technician", "Sig", "Station Engineer", "Engi", "Tourist", "Tour", "Unassigned", "Unas", "Unknown", "Unkn", "Virologist", "Viro", "Warden", "Ward", "Personal AI", "pAI", "Default Cyborg", "DefB", "Engineering Cyborg", "EngB", "Janitor Cyborg", "JanB", "Medical Cyborg", "MedB", "Miner Cyborg", "MnrB", "Peacekeeper Cyborg", "PceB", "Security Cyborg", "SecB", "Service Cyborg", "SrvB", "Standard Cyborg", "StnB"); |
| | |
| | if(find(jobs,sig.job)){ sig.job=jobs[find(jobs,sig.job)+1]; } |
| | sig.source+="["+sig.job+"]"; |
| | </pre> |
| | |
| | === Spam Jammer === |
| | Blocks hulkouts and tourettes ticks. |
| | |
| | <pre> |
| | if(find(list("RAAAAAAAARGH!!!", "HNNNNNNNNNGGGGGGH!!!", |
| | "GWAAAAAAAARRRHHH!!!", "NNNNNNNNGGGGGGGGHH!!!", |
| | "AAAAAAARRRGH!!!", "CUNT", "FUCK", "PISS", "SHIT", "TITS", |
| | "COCKSUCKER", "MOTHERFUCKER"), sig.content)){ sig.pass=0;} |
| | </pre> |
|
| |
|
| <pre>if (find($content, "has signed up as")) { //Is the message an arrival message?
| |
| if ($job == "AI") { //Is it sent by the AI?
| |
| $source = "Arrivals Alert System"; //Change the source of the message
| |
| }
| |
| }</pre>
| |
|
| |
|
| === Anonymous Messages === | | === Anonymous Messages === |
| Messages prefixed with "/anon" will hide their sender's identity. | | Messages starting with '''/anon''' will broadcast under the name "Anonymous". |
|
| |
|
| <pre>$explodeString = explode($content, " "); | | <pre> |
| if(at($explodeString, 1) == "/anon")
| | // Anonymous Messages - by TheDL |
| {
| |
| $pass = false;
| |
| $content = substr($content, 6, length($content)+1);
| |
| broadcast($content, $freq, "Anonymous");
| |
| }</pre>
| |
|
| |
|
| === Less Annoying Job Indicator === | | x=explode(sig.content," "); |
| Only shows abbreviations of job titles instead of full titles.
| | if(x[1]=="/anon"){ sig.pass=0; |
| | broadcast(signal(implode(x-x[1]," "), sig.freq, "Anonymous")); } |
|
| |
|
| <pre>def Initialize() {
| | // This one preserves language... |
| $words = vector(
| |
| "assistant", "Assnt",
| |
| "captain", "Capt",
| |
| "head of personnel", "HoP",
| |
| "bartender", "Bar",
| |
| "chef", "Chef",
| |
| "botanist", "Hydro",
| |
| "quartermaster", "QM",
| |
| "cargo technician", "Cargo",
| |
| "shaft miner", "Miner",
| |
| "clown", "Clown",
| |
| "mime", "Mime",
| |
| "janitor", "Jan-r",
| |
| "librarian", "Lib-n",
| |
| "lawyer", "Law",
| |
| "chaplain", "Chapl",
| |
| "chief engineer", "CE",
| |
| "station engineer", "Engi",
| |
| "atmospheric technician", "Atmos",
| |
| "chief medical officer", "CMO",
| |
| "medical doctor", "MD",
| |
| "chemist", "Chem",
| |
| "geneticist", "G-tic",
| |
| "virologist", "Viro",
| |
| "research director", "RD",
| |
| "scientist", "Sci",
| |
| "roboticist", "Robo",
| |
| "head of security", "HoS",
| |
| "warden", "Ward",
| |
| "detective", "D-tiv",
| |
| "security officer", "Sec",
| |
| "ai", "AI",
| |
| "cyborg", "Borg",
| |
| "personal ai", "pAI",
| |
| );
| |
|
| |
| $index = 1;
| |
| while($index <= length($words))
| |
| {
| |
| $key = at($words, $index);
| |
| $value = at($words, $index+1);
| |
| mem($key,$value);
| |
| $index += 2;
| |
| }
| |
| }
| |
|
| |
|
| if(mem("initialized") != 1)
| | x=explode(sig.content," "); |
| { | | if(x[1]=="/anon"){ sig.pass=0; |
| Initialize(); | | anon=signal(implode(x-x[1]," "), sig.freq, "Anonymous"); |
| mem("initialized", 1); | | anon.language=sig.language; broadcast(anon); } |
| } | |
|
| |
|
| $foo = "";
| | // ...this one randomizes filters, too. |
| $joblow = lower($job);
| |
|
| |
|
| if(mem($joblow)) { $foo = mem($joblow); } | | x=explode(sig.content," "); |
| else { $foo = substr($job, 1, 6); }
| | if(x[1]=="/anon"){ sig.pass=0; a=list("italics", "robot", "sans", "yell"); |
| | anon=signal(implode(x-x[1]," "), sig.freq, "Anonymous"); |
| | n=1; while(n<length(a)){ if(prob(50)){ anon.filters+=a[n]; } n+=1; } |
| | anon.language=sig.language; broadcast(anon); } |
| | </pre> |
|
| |
|
| if (!find($source, "Unknown") && $job != "No id" && !find($source, " (as ")) {
| |
| $source = $source + " [" + $foo + "]"; }</pre>
| |
|
| |
|
| ===Selective Mute === | | ===Selective Mute === |
Line 448: |
Line 414: |
| }</pre> | | }</pre> |
|
| |
|
| === Spam Removal ===
| |
| To remove radio clutter when there's too many hulks and/or tourettes. Filters them out.
| |
|
| |
| <pre>$npass = 1;
| |
|
| |
| if ($content == "GWAAAAAAAARRRHHH!!!" || $content == "HNNNNNNNNNGGGGGGH!!!" || $content == "RAAAAAAAARGH!!!" || $content == "AAAAAAARRRGH!!!" || $content == "NNNNNNNNGGGGGGGGHH!!!") {
| |
| $npass = 0;
| |
|
| |
| }
| |
| if ($content == "CUNT" || $content == "SHIT" || $content == "FUCK" || $content == "COCKSUCKER" || $content == "TITS" || $content == "MOTHERFUCKER") {
| |
| $npass = 0;
| |
| }
| |
| if (mem($source) == $content) {
| |
| $npass = 0;
| |
| }
| |
| if (mem($source) != $content) {
| |
| mem($source, $content);
| |
| }
| |
|
| |
| $space = 1;
| |
| while ($space) {
| |
| $space = 0;
| |
| $init = substr($content, 1, 2);
| |
| if ($init == " ") {
| |
| $space = 1;
| |
| $content = substr($content, 2, length($content)+1);
| |
| }
| |
| }
| |
| $firstchar = substr($content, 1, 2);
| |
| if ($firstchar == lower($firstchar)) {
| |
| $firstchar = upper($firstchar);
| |
| }
| |
| $content = $firstchar + substr($content, 2, length($content)+1);
| |
|
| |
| $end = substr($content, length($content), length($content)+1);
| |
| if ($end != "." && $end != "!" && $end != "?") {
| |
| $content += ".";
| |
| }
| |
|
| |
| if ($content == upper($content)) {
| |
| $content = lower($content);
| |
| $init = upper(substr($content, 1, 2));
| |
| $seq = substr($content, 2, length($content)+1);
| |
| $content = $init + $seq;
| |
| }
| |
| $pass = 0;
| |
| if ($npass && $job != "Cyborg" && $job != "AI") {
| |
| broadcast($content, $freq, $source, $job);
| |
| }</pre>
| |
|
| |
|
| === All Channel Communication for the AI === | | === All Channel Communication for the AI === |