Jump to content

Can someone help me out with this code?


Recommended Posts

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
Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...