Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var room = [];
- var clair = '';
- function wat_incoming( event ) {
- var line = ( event );
- var linerem = remascii( event );
- var regex = new RegExp(/\[1;37m\(\[0m\[0m\[37m (?:immoral|moral|true impartial|impartial).*\[1;37m([\w-']+)\[37m\[0m\[1;32m.*(?:is here, fighting.*|is standing here|is here, passed out|is resting here)\.\[0m$/);
- if (linerem.search(/^.+\[ exits:.+]$/) != -1) {
- clair = clair.slice(0,1).toUpperCase() + clair.slice(1);
- room = [];
- }
- if ((match = regex.exec( line )) != null) {
- if (match[1] != clair) {
- room.push(match[1]);
- }
- spy_input();
- }
- return event;
- }
- function spy_input() {
- var com = '';
- var comma = 0;
- var found = false;
- for (var x = 0; x < room.length;x++ ) {
- if (room[ x ] != null) {
- found = true;
- if (comma) {
- com = com + ", " + room[ x ];
- } else {
- com = com + room[ x ];
- comma = 1;
- }
- } else {
- found = false;
- }
- }
- if (found) {
- com = com + "]";
- jmc.parse('#var list ' + com);
- }
- return event;
- }
- register_handler( "Incoming", wat_incoming );
- /*
- colors:
- gray
- \[1;30m
- red
- \[1;31m
- green
- \[1;32m
- yellow
- \[1;33m
- blue
- \[1;34m
- magenta(orange)
- \[1;35m
- cyan
- \[1;36m
- white
- \[1;37m
- exit:
- \[0m
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement