Jump to content

Can someone help me out with this code?


Recommended Posts

Posted (edited)

def Initialize() {
$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);
$val = at($words, $index+1);
 mem($key, $val);
 $index += 2;
}
}

if(mem("initialized") != 1)
{
Initialize();
mem("initialized", 1);
}

$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 + " (" + $foo + ")"; }

 







This is the code I found on another site ad I added it to the common server but it doesnt seem to work....it compiles and executes but nothing happens?

Edited by Guest
Posted

The script is supposed to check to see what job you have and then attach "(job name)" to the end of what you say. I'm busy with an update at the moment so I can't really check it over.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...