Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def implode($vector, $adder)
- {
- $returnString = "";
- $index = 1;
- while($index <= length($vector))
- {
- $at = at($vector, $index);
- $toAdd = $adder;
- if($index == 1)
- {
- $toAdd = "";
- }
- $returnString = $returnString + $toAdd + $at;
- $index += 1;
- }
- return $returnString;
- }
- def makebig()
- {
- content_e = explode($content);
- big_font = "<font style=font-weight:bold >";
- big_font_end = "</font>";
- content = big_font + $content + big_font_end;
- return content;
- }
- def makeverybig()
- {
- content_e = explode($content);
- big_font = "<font size=20>";
- big_font_end = "</font>";
- content = big_font + $content + big_font_end;
- return content;
- }
- def checkforadmin() {
- admin = vector("your damm name here");
- if(find(admin,$source)) {
- return 1;
- }
- }
- def checkforai() {
- if (find(explode($content," "),"ai")) {
- return 1;
- }
- if (find(explode($content," "),"Ai")) {
- return 1;
- }
- if (find(explode($content," "),"AI")) {
- return 1;
- }
- }
- def checkforcommand() {
- command = vector("Cyborg","AI","Captain","Chief Medical Officer","Research Director","Chief Engineer","Head of Personnel","Head of Security");
- if (find(command,$job)) {
- return 1;
- }
- }
- def handlebroadcast() {
- if(checkforcommand()) {
- if (at(explode($content, " "),1) == "/comm") {
- $pass = 0;
- if (at(explode($content, " "),2) == "all") {
- var = vector(explode($content, " "));
- cut(var, 0,3);
- mess = implode(var, " ");
- broadcast(mess, 1353, $source);
- broadcast(mess, 1359, $source);
- broadcast(mess, 1357, $source);
- broadcast(mess, 1355, $source);
- broadcast(mess, 1351, $source);
- broadcast(mess, 1349, $source);
- broadcast(mess, 1347, $source);
- broadcast(mess, 1459, $source);
- broadcast("Message Transmitted", 1353, "Script");
- }
- if (at(explode($content, " "),2) == "com") {
- var = vector(explode($content, " "));
- cut(var, 0,3);
- mess = implode(var, " ");
- broadcast(mess, 1353, $source);
- broadcast("Message Transmitted", 1353, "Script");
- }
- if (at(explode($content, " "),2) == "sec") {
- var = vector(explode($content, " "));
- cut(var, 0,3);
- mess = implode(var, " ");
- broadcast(mess, 1359, $source);
- broadcast("Message Transmitted", 1353, "Script");
- }
- if (at(explode($content, " "),2) == "eng") {
- var = vector(explode($content, " "));
- cut(var, 0,3);
- mess = implode(var, " ");
- broadcast(mess, 1357, $source);
- broadcast("Message Transmitted", 1353, "Script");
- }
- if (at(explode($content, " "),2) == "med") {
- var = vector(explode($content, " "));
- cut(var, 0,3);
- mess = implode(var, " ");
- broadcast(mess, 1355, $source);
- broadcast("Message Transmitted", 1353, "Script");
- }
- if (at(explode($content, " "),2) == "sci") {
- var = vector(explode($content, " "));
- cut(var, 0,3);
- mess = implode(var, " ");
- broadcast(mess, 1351, $source);
- broadcast("Message Transmitted", 1353, "Script");
- }
- if (at(explode($content, " "),2) == "ser") {
- var = vector(explode($content, " "));
- cut(var, 0,3);
- mess = implode(var, " ");
- broadcast(mess, 1349, $source);
- broadcast("Message Transmitted", 1353, "Script");
- }
- if (at(explode($content, " "),2) == "sup") {
- var = vector(explode($content, " "));
- cut(var, 0,3);
- mess = implode(var, " ");
- broadcast(mess, 1347, $source);
- broadcast("Message Transmitted", 1353, "Script");
- }
- }
- }
- }
- //if(checkforadmin()) {
- // muted = mem(muted);
- // broadcast(muted, 1353, "Script");
- // ex = explode($content,"_");
- // if(at(ex,1) == "mute") {
- // name = at(ex,2);
- // mem(muted,name);
- //broadcast($source + " muted " + name, 1353, "Script");
- // }
- //}
- //if($source == mem(muted)) {
- // $pass = 0;
- //}
- if(checkforadmin()) {
- if ($content == "restore comms") {
- mem("kill",0);
- $pass = 0;
- }
- if ($content == "kill comms") {
- mem("kill",1);
- $pass = 0;
- }
- }
- if (mem("kill") == 1) {
- $pass = 0;
- }
- handlebroadcast();
- if(checkforai()) {
- big_text = makebig();
- broadcast(big_text,134.3,$source,$job);
- }
- // English To Pirate Translator Script - By Giacom
- // Helper Functions
- def implode($vector, $adder)
- {
- $returnString = "";
- $index = 1;
- while($index <= length($vector))
- {
- $at = at($vector, $index);
- $toAdd = $adder;
- if($index == 1)
- {
- $toAdd = "";
- }
- $returnString = $returnString + $toAdd + $at;
- $index += 1;
- }
- return $returnString;
- }
- def Initialize()
- {
- // Our words! Format: real word / pirate word
- $words = vector("gun", "cannon",
- "heaven", "davy jones' locker",
- "I", "aye",
- "my", "meh",
- "yes", "aye",
- "are", "argh",
- "yeah", "yarh",
- "captain", "Cap'n",
- "hos", "First Mate",
- "hop", "Crewmaster",
- "ai", "Navigator",
- "money", "treasure",
- "friend", "matey",
- "station", "vessel",
- "shuttle", "rowboat",
- "engine", "sails",
- "space", "sea");
- //broadcast("Starting Initialization...");
- $index = 1;
- while($index <= length($words))
- {
- $key = at($words, $index);
- $key = lower($key);
- $value = at($words, $index+1);
- mem($key, $value);
- $index += 2;
- }
- //broadcast("Initialization Complete!");
- }
- // Script Begin
- if(mem("initialized") != 1)
- {
- Initialize();
- mem("initialized", 1);
- }
- $newContent = explode($content, " ");
- $index = 1;
- while($index <= length($newContent))
- {
- $entry = at($newContent, $index);
- $value = mem(lower($entry));
- if($value)
- {
- at($newContent, $index, $value);
- }
- $index += 1;
- }
- $content = implode($newContent, " ");
- // Script End
- if(checkforcommand()) {
- $content = makebig();
- }
- if ($job != "No id") {
- $source = $job + " " + $source;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement