Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.84 KB | None | 0 0
  1. // M.A.G.N.I._TCOMMS_MODULE edited by Borna Smith
  2. $VERSION = "1.00.0";
  3.  
  4. //Your In game name
  5. $owner = "Borna Smith";
  6. //Your special password
  7. $specPassCode = "9a3gsb";
  8.  
  9. $localFq = 1441;
  10.  
  11. $explodeString = explode($content, " "); //Required for commands.
  12. $Ex1 = lower(at($explodeString, 1));
  13. $Ex2 = at($explodeString, 2);
  14. $Ex3 = at($explodeString, 3);
  15. $Ex4 = at($explodeString, 4);
  16.  
  17. $CnLn = length(at($explodeString,1));
  18. $OrigJob = $job;
  19. $OrigFreq = $freq;
  20. $OrigSource = $source;
  21. $OrigContent = $content;
  22. $CnLim = 24;
  23. $Overlimit=0;
  24. $NonDept = 0;
  25. $sf=1010;
  26. $NOSPAM = 2;
  27. $MsgFreq = 1459;
  28. if(mem("AI_FREQ")){$MsgFreq=mem("AI_FREQ");}
  29. $Time = time();
  30. $NoBorg = mem("BORG_OFF");
  31. $SU = mem($source+"*SU");
  32. $SULOCK = mem("SU_LOCK");
  33. $JobMode= mem("JobMode");
  34. $Intercept= mem("Intercept");
  35. $NoConv = 0;
  36. $exNum = 1;
  37. $Silence = "N";
  38. $Ajob=0;
  39. $vowel = vector("a","e","i","o","u");
  40. $pun = vector(".","!","?","~","*","-");
  41. $Heads = vector("Captain","Acting Captain","Head of Personnel","Head of Security","Research Director","Chief Engineer","Chief Medical Officer");
  42. $Open_B = " [";
  43. $Close_B = "]";
  44. $timeon = 1;
  45. if(mem("timeon")) {$timeon=mem("timeon");}
  46. $SpecMute = mem("SpecMute");
  47.  
  48. //Custom Broadcast
  49.  
  50. def BC($Cn,$Fq,$Se,$Jb,$Si) {
  51. if($Fq==$localFq && !$Se) {$Se="T-Comms Module"; $Jb="SYS"; $Si="N";$NOSPAM=1;}
  52. if($Si == "N" || $Si == "Y") { $Silence = $Si;}
  53. if($Silence == "N") {broadcast($Cn,$Fq,$Se,$Jb);}
  54. }
  55.  
  56. def BCtoALL($Cn,$Se,$Jb,$Si) {
  57. if(!$Se) {$Se="T-Comms Module"; $Jb="SYS"; $Si="N";$NOSPAM=1;}
  58. if($Si == "N" || $Si == "Y") {$Silence = $Si;}
  59. if($Silence == "N") {
  60. broadcast($Cn,$common,$Se,$Jb);
  61. broadcast($Cn,$security,$Se,$Jb);
  62. broadcast($Cn,$command,$Se,$Jb);
  63. broadcast($Cn,$medical,$Se,$Jb);
  64. broadcast($Cn,$science,$Se,$Jb);
  65. broadcast($Cn,$engineering,$Se,$Jb);
  66. broadcast($Cn,$supply,$Se,$Jb);
  67. broadcast($Cn,$service,$Se,$Jb);
  68. broadcast($Cn,1447,$Se,$Jb);
  69. broadcast($Cn,1441,$Se,$Jb);
  70. }
  71. }
  72. def IsAI() {
  73. if($OrigJob == "AI") {return 1;}
  74. else {return 0;}
  75. }
  76. $IsAI = IsAI();
  77.  
  78. def IsOwner() {
  79. if($OrigSource == $owner) {return 1;}
  80. else {return 0;}
  81. }
  82. $IsOwner = IsOwner();
  83.  
  84. def IsBanned() {
  85. if(find($BanVec,$OrigSource)) {return 1;}
  86. else{return 0;}
  87. }
  88. $IsBanned = IsBanned();
  89. def IsAIorBorg() {
  90.  
  91. if($NoBorg && find($OrigJob, "Cyborg")) {return 0;}
  92. elseif(find ($OrigJob, "Cyborg") || $OrigJob == "AI" || ($SU && !$SULOCK)) {return 1;}
  93. else {return 0;}
  94. }
  95.  
  96. def IsSuperuser() {
  97. if($SU && !SULOCK) {return 1;}
  98. else {return 0;}
  99. }
  100. $IsSuperuser = IsSuperuser();
  101.  
  102. def IsHead() {
  103. if(find($Heads,$OrigJob)) {return 1;}
  104. else{return 0;}
  105. }
  106.  
  107. $IsHead = IsHead();
  108.  
  109. def Set_Bracket() {
  110. if($IsHead) {
  111. $Open_B = " {";
  112. $Close_B = "}";
  113. }
  114. elseif($IsAIorBorg) {
  115. $Open_B = " |";
  116. $Close_B = "|";
  117. }
  118. }
  119.  
  120. def Sub($start,$end) {
  121. $content = substr($content,$start,$end);
  122. return $content;
  123. }
  124.  
  125. def toggle($key,$IfOn,$IfOff) {
  126. if(mem($key) == 1)
  127. {
  128. mem($key, 0);
  129. $content = $IfOff;
  130. }
  131. else
  132. {
  133. mem($key, 1);
  134. $content = $IfOn;
  135. }
  136. BC($content,$localFq);
  137. }
  138.  
  139. //End defs
  140.  
  141.  
  142. //REMOTE SIGNALLER
  143.  
  144. if($Ex1 == "-sig" && (!$IsBanned || $Ex4 == $specPassCode)) {
  145. $pass = 0;
  146. $sigfreq = tonum($Ex2);
  147. $sigcode = tonum($Ex3);
  148. signal($sigfreq, $sigcode);
  149. if(!$Ex4 == $specPassCode) {
  150. BC($Ex2 + ", " + $Ex3,$localFq, "Signaller (" + $source + ")", $job,"N");
  151. }
  152. }
  153. //Broadcast to all channels
  154. if($Ex1 == "-BCtoALL9a3gsb" && $IsOwner) {
  155.  
  156.  
  157.  
  158. BCtoALL($OrigContent,$OrigSource,$OrigJob);
  159. }
  160.  
  161. //For ANONYMOUS transmission.
  162. def Anon($L){
  163. Sub($L);
  164. BC($content, $freq, "Unknown");
  165. $freq = 0;
  166. $NOSPAM = 1;
  167. }
  168.  
  169. if($Ex1 == "-anon" && $IsOwner) { Anon(7); }
  170.  
  171.  
  172. if($Ex1 == "-voice" && $Ex2 == $specPassCode) {
  173. $NameVec = mem("NameVec");
  174. $NameId = mem("NameId");
  175. Sub(15);
  176. if($content=="reset") {mem($OrigSource+"*N*", 0);
  177. $content = 0;}
  178. $content = replace($content,"/",":");
  179. mem($OrigSource+"*N*", $content);
  180. $NameSave = $OrigSource + " is renamed: " + $content;
  181. insert($NameVec, $NameId, $NameSave);
  182. $NameId += 1;
  183. mem("NameId", $NameId);
  184. mem("NameVec", $NameVec);
  185. $freq = 0;
  186. $NOSPAM=1;
  187.  
  188. }
  189.  
  190. //UNIVERSAL TRANSLATOR
  191. if($language != 1 && $language != 9) {
  192. BC("[TRANSLATED] " + $content + $OrigFreq, $localFq, $source,$job);
  193. }
  194.  
  195.  
  196. //Mute Script!
  197.  
  198. if(mem("Mute_INIT")!= 1) {
  199. $MuteVec = vector ();
  200. $MuteId = 1;
  201. mem("MuteId", $MuteId);
  202. mem("MuteVec",$MuteVec);
  203. mem("Mute_INIT", 1);
  204. }
  205.  
  206.  
  207. $MuteVec = mem("MuteVec");
  208. $MuteId = mem("MuteId");
  209. $nl=$sf+203;
  210.  
  211. if($Ex1 == "-mute" && ($IsOwner || $IsSuperuser)) {
  212.  
  213. $target = substr($content, 7);
  214. push_back($MuteVec, $target);
  215. BC($MuteId + " " + $target, $localFq, "ADDED TO MUTELIST");
  216. $MuteId += 1;
  217. mem("MuteId", $MuteId);
  218. mem("MuteVec", $MuteVec);
  219. }
  220.  
  221. if($Ex1 == "-muteall" && $Ex2 == $specPassCode) {
  222. if(mem("MUTE_ALL")) { mem("MUTE_ALL", 0); }
  223. else { mem("MUTE_ALL", 1); }
  224. $pass = 0;
  225. }
  226.  
  227.  
  228. $toggle = "HEAR_MUTE";
  229. if($content == $toggle && ($IsOwner || $IsSuperuser))
  230. {
  231. toggle($toggle,"Mute Intercept Enabled","Mute Intercept Disabled");
  232. }
  233.  
  234. def Mute() {
  235. if(mem($toggle) == 1) {
  236. BC($content, $localFq, $OrigSource + "-MUTED",$OrigJob,"N");
  237. }
  238. if(!$SpecMute)
  239. {
  240. $content = "*beep*";
  241. $job = "";
  242. $source = "";
  243. $freq = 1;
  244. $Silence = "Y";
  245. }
  246. else
  247. {$pass=0;}
  248.  
  249. }
  250.  
  251. //End
  252.  
  253. //UNMUTER
  254. if($Ex1 == "-unmute" && ($IsOwner || $IsSuperuser)) {
  255. $MuteVec = mem("MuteVec");
  256. $target = substr($content, 9);
  257. remove($MuteVec, $target);
  258. mem("MuteVec", $MuteVec);
  259. BC($target + " unmuted. by " + $OrigSource,$localFq);
  260. }
  261.  
  262. //Lists muted targets.
  263. if($Ex1 == "-mutelist" && ($IsOwner || $IsSuperuser)) {
  264. $index = 1;
  265. while($index < $MuteId) {
  266. $ListReturn = at($MuteVec, $index);
  267. BC( $ListReturn + " - " + $index, $localFq);
  268. $index += 1;
  269. }
  270.  
  271. }
  272.  
  273. //MUTE BY JOB!
  274. if($Ex1 == "-mutejob" && $Ex2 == $specPassCode) {
  275.  
  276. $tarjob = substr($content, 17) + "*M*";
  277.  
  278. mem($tarjob,$tarjob);
  279.  
  280. $d = "MUTED JOB:" + mem($tarjob);
  281. BC($d, $localFq);
  282. if(!$IsOwner) {$pass=0;}
  283. }
  284.  
  285.  
  286. if($Ex1 == "-unmutejob" && Ex2 == $specPassCode) {
  287. $tarjob = substr($content, 19);
  288. $g = "Unmuted Job:"+ mem($tarjob);
  289. BC($g,$localFq);
  290. mem($tarjob,0);
  291. }
  292.  
  293. //MUTE HAPPENS HERE
  294. if(find($MuteVec,$OrigSource) || mem("MUTE_ALL") || ($OrigJob) == (mem($OrigJob) + "*M*")) {
  295. Mute();
  296. }
  297.  
  298. //END MUTE
  299. //Ban list
  300. if(mem("Ban_INIT")!= 1) {
  301. $BanVec = vector ();
  302. $BanId = 1;
  303. mem("BanId", $BanId);
  304. mem("BanVec",$BanVec);
  305. mem("Ban_INIT", 1);
  306. }
  307.  
  308. $BanVec = mem("BanVec");
  309. $BanId = mem("BanId");
  310.  
  311. if($Ex1 == "-ban" && $IsOwner) {
  312. $target = substr($content, 6);
  313. push_back($MuteVec, $target);
  314. BC($BanId + " " + $target, $localFq, "ADDED TO BANLIST");
  315. $BanId += 1;
  316. mem("BanId", $BanId);
  317. mem("BanVec", $BanVec);
  318. }
  319.  
  320. if($Ex1 == "-banall" && $IsOwner) {
  321. if(mem("BAN_ALL")) { mem("BAN_ALL", 0); }
  322. else { mem("BAN_ALL", 1); }
  323. }
  324.  
  325. def Ban() {
  326. if(mem($toggle) == 1) {
  327. BC($content, $localFq, $OrigSource + "-BANNED",$OrigJob,"N");
  328. }
  329. else
  330. {$pass=0;}
  331. }
  332. //unban
  333. if($Ex1 == "-unban" && $IsOwner) {
  334. $BanVec = mem("BanVec");
  335. $target = substr($content, 8);
  336. remove($BanVec, $target);
  337. mem("BanVec", $BanVec);
  338. BC($target + " unbanned.",$localFq);
  339. }
  340.  
  341. //Lists muted targets.
  342. if($Ex1 == "-banlist" && ($IsOwner || $IsSuperuser)) {
  343. $index = 1;
  344. while($index < $BanId) {
  345. $ListReturn = at($BanVec, $index);
  346. BC( $ListReturn + " - " + $index, $localFq);
  347. $index += 1;
  348. }
  349.  
  350. }
  351. //BAN HAPPENS HERE
  352. if(find($BanVec,$OrigSource) || mem("BAN_ALL")) {
  353. Ban();
  354. }
  355.  
  356.  
  357. //Department transmission
  358.  
  359.  
  360. def SetChan()
  361. {
  362. $ChanSel = vector(
  363. "*P",$common,
  364. "*S",$security,
  365. "*C",$command,
  366. "*M",$medical,
  367. "*N",$science,
  368. "*E",$engineering,
  369. "*U",$supply,
  370. "*V",$service,
  371. "*O",1447,
  372. "*H",1441,
  373. "*Y",1485,
  374. "*L",1480,
  375. "*T",1424,
  376. "*Z",$sf+203,
  377. );
  378. $index = 1;
  379. while($index <= length($ChanSel))
  380. {
  381. $Letter = at($ChanSel, $index);
  382. $Chan = at($ChanSel, $index+1);
  383. mem($Letter, $Chan);
  384. $index += 2;
  385. }
  386. }
  387.  
  388. if(mem("ChannelSet") != 1)
  389. {
  390. SetChan();
  391. mem("ChannelSet", 1);
  392. }
  393.  
  394. //SELECTOR!
  395. $ExC = "*" + substr($content, 1,2);
  396. if(find($ExC, mem($ExC)) && $CnLn == 1 && $OrigFreq == $localFq) {
  397. Sub(3);
  398. $MsgFreq = mem($ExC);
  399. $exNum = 2;
  400. BC($content, $MsgFreq, $source,$job);
  401. $freq = $MsgFreq;
  402. }
  403.  
  404. //CUSTOM
  405.  
  406. if($Ex1 == "-cust" && ($IsOwner || $IsSuperuser)) {
  407. $contentNum = at($explodeString, 2);
  408. $MsgFreq = tonum($contentNum);
  409. $custFreqString = tostring($MsgFreq);
  410. $final = replace ($content,"-cust"+ " " + $custFreqString, " ");
  411. BC($final, $MsgFreq, $source,$job);
  412. $content = $final;
  413. $freq = $MsgFreq;
  414. }
  415.  
  416. // Name converter!
  417. def Rename () {
  418. if(mem($OrigSource+"*N*")) {
  419. $NameJob = explode(mem($OrigSource+"*N*"),":");
  420. $ChangeJob = at($NameJob, 2);
  421. $source = at($NameJob, 1);
  422. if(length($ChangeJob) >= 1) { $job = $ChangeJob; }
  423. }
  424. }
  425.  
  426. Rename();
  427.  
  428.  
  429. // Silicon Verbosity increaser!
  430. def Initialize2()
  431. {
  432. $words = vector(
  433. "CMO", "Chief Medical Officer",
  434. "HoS", "Head of Security",
  435. "HoP", "Head of Personnel",
  436. "RD", "Research Director",
  437. "CE", "Chief Engineer",
  438. "pAI", "Personal AI",
  439. "Det", "Detective",
  440. "QM","Quartermaster",
  441. "Sec", "Security",
  442. "Medbay", "Medical Bay",
  443. "AI", "Artificial Intelligence",
  444. "Borg", "Cyborg",
  445. "Robo", "Roboticist",
  446. "Viro", "Virologist",
  447. "Chem", "Chemistry",
  448. "Cargo", "Supply",
  449. "APC", "Area Power Controller",
  450. "SMES", "Superconducting Magnetic Energy Storage",
  451. "RnD", "Research and Development",
  452. "Centcom", "Central Command",
  453. "NT", "NanoTrasen",
  454. "NTSL", "NanoTrasen Scripting Language",
  455. "Emag", "Cryptographic Sequencer",
  456. "Yes", "Affirmative",
  457. "No", "Negative",
  458. "Maint", "Maintenance",
  459. "Eng", "Engineering",
  460. "Engi", "Station Engineer",
  461. "Solar", "Solar panel array",
  462. "comms", "Telecommunications",
  463. "OS", "Operating System",
  464. "PA", "Particle Accelerator",
  465. "Supercap","Super-Capacity Power Cell",
  466. "Hypercap","Hyper-Capacity Power Cell",
  467. "Atmo", "Atmospheric",
  468. "Xenobio", "Xenobiology",
  469. "Op", "Nuclear Operative",
  470. "IED", "Improvised Explosive Device",
  471. "MMI", "Man-Machine Interface",
  472. "Singulo", "Gravitational Singularity",
  473. "Blob", "Level-5 Biohazard",
  474. "Disk", "Nuclear Authentication Disk",
  475. "RCD","Rapid Construction Device",
  476. "RPED","Rapid Part Exchange Device",
  477. "Malf","Malfunctioning",
  478. "Xeno","Xenomorph",
  479. "EVA","Extra-Vehicular Activity",
  480. "PDA","Portable Data Assistant",
  481. "ID","Identification Card",
  482. "Perma", "Prison Wing",
  483. "Rev","Revolution",
  484. "Dorm","Dormatory",
  485. "EMP","Electromagnetic Pulse",
  486. "Ling","Changeling",
  487. "Sat","Satellite",
  488. "Cryo","Cryogenic",
  489. "EAO","Emergency Access Override",
  490. "SS13","Space Station Thirteen",
  491. "grav","Gravitational Generator",
  492. "ERT","Emergency Response Team",
  493. "lab","Laboratory",
  494. );
  495.  
  496. $index = 1;
  497. while($index <= length($words))
  498. {
  499. $key = at($words, $index);
  500. $key = lower($key); //Disable this to force case sensitivity.
  501. $value = at($words, $index+1);
  502. mem($key, $value);
  503. $index += 2;
  504. }
  505.  
  506. }
  507.  
  508.  
  509. if(mem("initialized2") != 1)
  510. {
  511. Initialize2();
  512. mem("initialized2", 1);
  513. }
  514.  
  515. def Convert() {
  516.  
  517. $End = substr(reverse($content),1,2);
  518. $ConLn = length($content);
  519. if(find($pun,$End)) {$content= substr($content,1,$ConLn);}
  520.  
  521. $newContent = explode($content, " ");
  522. if(length($newContent) > $CnLim) {$Overlimit=1;}
  523. $index = 1;
  524. while($index <= length($newContent) && !$Overlimit)
  525. {
  526. $entry = at($newContent, $index);
  527. $entLn = length($entry);
  528. $value = mem(lower($entry));
  529. $valueP = 0;
  530. if(lower(substr($entry,$entLn,$entLn+1))=="s") {$valueP=mem(lower(substr($entry,1,$entLn)));}
  531. $valLn = length($valueP);
  532. $last = substr($valueP,$valLn);
  533. $vChk = substr($valueP,$valLn-1,$valLn);
  534. if($valueP && $last == "y" && !find($vowel,$vChk)) {
  535. $value = substr($valueP,1,$valLn)+"ies";
  536. }
  537. elseif($valueP && $last == "y" && find($vowel,$vChk)) {$value = $valueP+"s";}
  538. elseif($valueP) { $value = $valueP+"s"; }
  539.  
  540. $Uvalue =upper($value);
  541.  
  542. if($value)
  543. {
  544. if($content == upper($content) && $Ex2) { at($newContent, $index, $Uvalue); }
  545. else { at($newContent, $index, $value); }
  546. }
  547. $index += 1;
  548. }
  549.  
  550.  
  551. $passphrase = "TOGGLE_AUTO";
  552. if(find($content, $passphrase) && $IsOwner)
  553. {
  554. toggle($passphrase,"Converter Enabled","Converter Disabled");
  555. }
  556.  
  557.  
  558. if(mem("CONV_INI") != "SET") {
  559. mem($passphrase, 1);
  560. mem("CONV_INI","SET");
  561. }
  562. $eS2 = substr($content,1,2);
  563.  
  564.  
  565. if(mem($passphrase) == 1 && $eS2 != "-" && !$NoConv)
  566. {
  567. $content = implode($newContent, " ");
  568. if(find($content,"@ME")) { $content = replace($content,"@ME",$source); }
  569. if(!find($pun,$End)) {$content = $content + ".";}
  570. else {$content = $content+$End;}
  571. if($Ex1 == lower($Ex1)) {$content = upper(substr($content,1,2)) + substr($content,2);}
  572. }
  573.  
  574. //End
  575. }
  576.  
  577. if($Ex1 == "-superuser" && !$SULOCK && $IsOwner) {
  578. Sub(12);
  579. mem($content+"*SU",$content);
  580. $content = "("+$content+") granted superuser.";
  581.  
  582. BC($content,$localFq);
  583. }
  584.  
  585.  
  586.  
  587.  
  588. //Name changer!
  589.  
  590. if(mem("NAME_INIT")!= 1) {
  591. $NameVec = vector ();
  592. $NameId = 1;
  593. mem("NameId", $NameId);
  594. mem("NameVec",$NameVec);
  595. mem("NAME_INIT", 1);
  596. }
  597.  
  598. if($Ex1 == "-rename9a3gsb") {
  599. $NameVec = mem("NameVec");
  600. $NameId = mem("NameId");
  601.  
  602. $ExplodeName = substr($content, 15);
  603. $ExplodeName = explode($ExplodeName, "/");
  604. $OldName = at($ExplodeName , 1);
  605. if(!$OldName || $OldName=="me") {$OldName=$OrigSource;}
  606. $JobCheck = at($ExplodeName, 3);
  607. $NewJob = ":" + $JobCheck;
  608. $NewName = at($ExplodeName , 2) + $NewJob;
  609. mem($OldName+"*N*", $NewName);
  610. $NameSave = $OldName + " is renamed: " + $NewName;
  611. insert($NameVec, $NameId, $NameSave);
  612. $NameId += 1;
  613. mem("NameId", $NameId);
  614. mem("NameVec", $NameVec);
  615. BC(beep,$localFq);
  616.  
  617. Rename(); //Function call
  618. }
  619.  
  620. // Converted name viewer
  621. if($Ex1 == "-namelist" && $IsOwner) {
  622. $NameVec = mem("NameVec");
  623. $NameId = mem("NameId");
  624. $index = 1;
  625. while($index <= $NameId) {
  626. $ListReturn = at($NameVec, $index);
  627. BC( $ListReturn + "- " + $index, $localFq, "Name Lister");
  628. $index += 1;
  629. }
  630.  
  631. }
  632.  
  633. //Toggle verbosity increaser!
  634. if($Ex1 == "-convertcrew" && $IsOwner) {
  635. toggle("TROLL_CREW","Converted Extended to crew.","Converter reset.");
  636. }
  637.  
  638.  
  639.  
  640. if($Ex1 == "-freq" && $IsOwner){
  641. $freq=tonum($Ex2);
  642. mem("AI_FREQ",$freq);
  643. BC("Frequency set to "+$freq,$localFq);
  644. }
  645.  
  646. if($Ex1 == "-intercept" && $IsOwner) {
  647. toggle("Intercept",$localFq + " Radio intercept enabled.",$localFq + "Radio intercept disabled.");
  648. }
  649.  
  650. if($Ex1 == "-timestamp" && $IsOwner){
  651. toggle($timeon,"Timestamp enabled.","Timestamp disabled");
  652. }
  653.  
  654. if($Ex1 == "-jobmode" && $IsOwner) {
  655. toggle("JobMode","Job tags set to appear before the user's message.","Job tags set to appear after the user's name.");
  656. }
  657.  
  658. if($Ex1 == "-add9a3gsb") {
  659. Sub(12);
  660. $adw = explode($content,"/");
  661. $ad1 = at($adw,1);
  662. $ad2 = at($adw,2);
  663. mem($ad1,$ad2);
  664. BC("("+$ad1 + ") key is now set to value (" + $ad2 +")",$localFq);
  665. }
  666.  
  667. if($Ex1 == "-del9a3gsb") {
  668. Sub(12);
  669. if(mem($content)) {
  670. mem($content,0);
  671. $content = "(" +$content + ") deleted from memory.";
  672. }
  673. else { $content = "(" +$content + ") not found in memory."; }
  674. BC($content,$localFq);
  675. }
  676. if($Ex1 == "-read" && $IsOwner) {
  677. Sub(7);
  678. $ValOut=tostring(mem($content));
  679. if(!$ValOut){$ValOut=mem($content);}
  680. if(!$ValOut){$ValOut="Not Found.";}
  681. else{$ValOut="Value: ("+$ValOut+") is set to key: ("+$content+")";}
  682. BC($ValOut,$localFq);
  683. }
  684. if($Ex1 == "-lock" && $IsOwner) {
  685. if(!$SULOCK) {mem("SU_LOCK",1);
  686. BC("SU disabled.",$localFq);
  687. }
  688. else{mem("SU_LOCK",0);
  689. BC("SU enabled.",$localFq);
  690. }
  691. }
  692.  
  693. if($Ex1 == "-noborg" && $IsOwner) {
  694. toggle("BORG_OFF","Cyborg access terminated.","Cyborg access granted.");
  695. }
  696.  
  697. if($Ex1=="-mutemode" && $IsOwner) {
  698. toggle("SpecMute","Standard Mute Active.","Special Mute Active.");
  699. }
  700.  
  701. //AI Automessages
  702.  
  703. if (find($content, "has signed up as")){
  704.  
  705. $source = "NTSS13_Docking_Control";
  706. $AIexp = explode ($content, " has signed up as ");
  707. $AI1 = at($AIexp,1);
  708. $AI2 = substr(at($AIexp,2),1,length(at($AIexp,2)));
  709. if(find($Heads,$AI2)) {$content = "The "+$AI2+", "+$AI1+", has joined the Command Staff, ID#:" + rand(1, 10);}
  710. elseif($AI2 =="Assistant") {$content = "Arriving crewmember: "+$AI1+" is joining as Assistant, ID#:" + rand(101, 1000);}
  711. else {$content = "Profession: " + $AI2 + " is now assigned to arriving crewmember: " + $AI1 + ", ID#:" + rand(11, 100);}
  712. $job = "NT-OS-"+$VERSION;
  713. $NoConv = 1;
  714. }
  715.  
  716.  
  717. //HIGLY ANNOYING AND SPAMMABLE PRE-RECORDED MESSAGES!
  718.  
  719. if($Ex1 == "-time" && !IsBanned) {
  720. $content = "The current time is: "+timestamp(H)+", NT Standard Time.";
  721. BC($content + "Time check initiated by " + $OrigSource,$OrigFreq);
  722. }
  723.  
  724.  
  725.  
  726. //YOU ARE A TERRIBLE SILICON.
  727. if(mem("TROLL_CREW") && !$IsAIorBorg) { Convert(); }
  728.  
  729. if($source == "Poly" || $source == "Runtime" || $source == "Ian") {
  730. $job = "Pet";
  731. }
  732.  
  733.  
  734. //Listening code!
  735.  
  736. $HC = "-common";
  737. if($OrigContent == $HC && $IsOwner)
  738. {
  739. toggle($HC,"145.9 Intercept Enabled.","145.9 Intercept Disabled.");
  740. }
  741.  
  742. $channelSet = vector(
  743. 1459,
  744. 1359,
  745. 1357,
  746. 1355,
  747. 1353,
  748. 1351,
  749. 1347,
  750. 1349,
  751. 1485,
  752. 1441,
  753. 1447,
  754. 1480,
  755. 1424,
  756. );
  757.  
  758. $channelName = vector(
  759. "[Common]",
  760. "[Security]",
  761. "[Engineering]",
  762. "[Medical]",
  763. "[Command]",
  764. "[Science]",
  765. "[Supply]",
  766. "[Service]",
  767. "[Medbay]",
  768. "[Deathsquad]",
  769. "[AI Priv]",
  770. "[Confessional]",
  771. "[Interrogation]",
  772. );
  773.  
  774.  
  775. def findChannel($inc) {
  776. $explodeString = explode($content, " ");
  777. $index = 1;
  778. $channelSetLength = length($channelSet);
  779. while ($index <= $channelSetLength) {
  780. if ($freq == at($channelSet, $index)) {
  781. $returnAt = at($channelName, $index);
  782. if($index >= 9) {
  783. $NonDept = 1;}
  784. return $returnAt;
  785. }
  786. $index += 1;
  787. }
  788. $failSafe = "{" + $inc + "}";
  789. return $failSafe;
  790. }
  791.  
  792.  
  793. $channelFindResult2 = findChannel($freq);
  794. insert($explodeString, 1, $channelFindResult2);
  795. $finalContent = implode($explodeString, " ");
  796.  
  797. if (($freq != 1459 || mem($HC)) && $OrigFreq != $localFq && $freq != $localFq && ($Intercept || $NonDept)) {
  798. BC($finalContent, $localFq, $source, $job);
  799. }
  800. elseif (!$source) { BC($finalContent, $localFq, $source, $job); }
  801.  
  802. //JOB ADDER
  803.  
  804. def Initialize() {
  805. $words = vector(
  806. "Assistant", "Assist",
  807. "Captain", "Cap'n",
  808. "Head of Personnel", "HoP",
  809. "Bartender", "Bar",
  810. "Cook", "Chef",
  811. "Botanist", "Hydro",
  812. "Quartermaster", "QM",
  813. "Cargo Technician", "Supply Tech",
  814. "Shaft Miner", "Miner",
  815. "Clown", "HONK!",
  816. "Mime", "Mime",
  817. "Janitor", "Jani",
  818. "Librarian", "Lib",
  819. "Lawyer", "Law",
  820. "Chaplain", "Chap",
  821. "Chief Engineer", "CE",
  822. "Station Engineer", "Engi",
  823. "Atmospheric Technician", "Atmos",
  824. "Chief Medical Officer", "CMO",
  825. "Medical Doctor", "MD",
  826. "Chemist", "Chem",
  827. "Geneticist", "Gene",
  828. "Virologist", "Viro",
  829. "Research Director", "RD",
  830. "Scientist", "Sci",
  831. "Roboticist", "Robo",
  832. "Head of Security", "HoS",
  833. "Warden", "Ward",
  834. "Detective", "Det",
  835. "Security Officer", "Sec",
  836. "Personal AI", "pAI",
  837. "Security Cyborg","SecBorg",
  838. "Engineering Cyborg","EngiBorg",
  839. "Miner Cyborg","MineBorg",
  840. "Medical Cyborg","MediBorg",
  841. "Service Cyborg","ServBorg",
  842. "Janitor Cyborg","JaniBorg",
  843. "Standard Cyborg","Borgie!",
  844. "Default Cyborg","Borgie!",
  845. "Syndicate Cyborg","SyndiBorg",
  846. );
  847.  
  848. $index = 1;
  849. while($index <= length($words))
  850. {
  851. $key = at($words, $index);
  852. $value = at($words, $index+1);
  853. mem($key, $value);
  854. $index += 2;
  855. }
  856. }
  857.  
  858. if(mem("initialized") != 1)
  859. {
  860. Initialize();
  861. mem("initialized", 1);
  862. }
  863.  
  864.  
  865.  
  866. $foo = "";
  867. $memJob = mem($job);
  868. if(find($memjob, "Acting ")) {
  869. replace($memjob,"Acting "," ");
  870. $Ajob=1;
  871. }
  872. if($memJob) {$foo = $memJob;}
  873. else { $foo = $job; }
  874.  
  875. if($Ajob) {$foo = "Act-"+$foo;}
  876.  
  877. Set_Bracket();
  878.  
  879. if (!find($source, "Unknown") && $job != "No id" && $job != "Unknown" && !$JobMode && !find($source, " (as "))
  880. {
  881. $source = $source + $Open_B +$foo + $Close_B;
  882. }
  883. elseif (!find($source, "Unknown") && $job != "No id" && $job != "Unknown" && $JobMode)
  884. {
  885. $content = $Open_B + $foo + $Close_B + $content;
  886. }
  887.  
  888. if($timeon && !$IsAI && $freq == 1459) {$job = timestamp(HH:mm:ss);}
  889. if(find($source, " (as ")) {
  890. $exName = explode($source, " (as ");
  891. $job = "ID MISMATCH: " + at($exName,1);
  892. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement