All pastes #956088 Raw Edit

Miscellany

public text v1 · immutable
#956088 ·published 2008-03-25 00:50 UTC
rendered paste body
print(0,"\x0314SCRIPT ANNOUNCEMENT: Nothingness Room Script V 1.1 loaded, made by \xC2\xA6\xC5\x9E\xD0\xAF\xCE\x9B\xC2\xA6\xC4\x90e\xD1\x82hdeks");

//lil help from RWReaper
 
alph1 = new Array();
alph2 = new Array();
 
alph1[0] = "\xCE\xB1";
alph1[1] = "\xD0\xB2",
alph1[2] = "c";
alph1[3] = "\xC4\x91";
alph1[4] = "\xD1\x94",
alph1[5] = "f";
alph1[6] = "g";
alph1[7] = "\xD0\xBD"
alph1[8] = "\xD1\x96"
alph1[9] = "j";
alph1[10] = "\xD0\xBA";
alph1[11] = "l";
alph1[12] = "\xD0\xBC";
alph1[13] = "\xD0\xB8";
alph1[14] = "\xCE\xBF";
alph1[15] = "p";
alph1[16] = "q";
alph1[17] = "\xD1\x8F";
alph1[18] = "\xD1\x95";
alph1[19] = "\xD1\x82";
alph1[20] = "u"; ;
alph1[21] = "v"; ;
alph1[22] = "\xCF\x89"; ;
alph1[23] = "x"; ; 
alph1[24] = "\xCE\xB3";
alph1[25] = "z"
alph1[26] = "\xCE\xBB"; ;
alph1[27] = "B"; ;
alph1[28] = "\xC4\x8C"; ;
alph1[29] = "\xC4\x90"; ;
alph1[30] = "\xCE\x9E"; ;
alph1[31] = "F"; ;
alph1[32] = "\xC4\xA2";
alph1[33] = "H";
alph1[34] = "I";
alph1[35] = "J";
alph1[36] = "\xC4\xB6";
alph1[37] = "\xC5\x81";
alph1[38] = "\xCE\x9C";
alph1[39] = "\xC5\x8A";
alph1[40] = "\xC6\xA0";
alph1[41] = "P";
alph1[42] = "Q";
alph1[43] = "\xC5\x94";
alph1[44] = "S";
alph1[45] = "\xC5\xA6";
alph1[46] = "U";
alph1[47] = "V";
alph1[48] = "W";
alph1[49] = "X";
alph1[50] = "\xE1\xBB\xB4";
alph1[51] = "Z";
 
 
alph2[0]="a";
alph2[1]="b";
alph2[2]="c";
alph2[3]="d";
alph2[4]="e";
alph2[5]="f";
alph2[6]="g";
alph2[7]="h";
alph2[8]="i";
alph2[9]="j";
alph2[10]="k";
alph2[11]="l";
alph2[12]="m";
alph2[13]="n";
alph2[14]="o";
alph2[15]="p";
alph2[16]="q";
alph2[17]="r";
alph2[18]="s";
alph2[19]="t";
alph2[20]="u";
alph2[21]="v";
alph2[22]="w";
alph2[23]="x";
alph2[24]="y";
alph2[25]="z";
alph2[26]="A";
alph2[27]="B";
alph2[28]="C";
alph2[29]="D";
alph2[30]="E";
alph2[31]="F";
alph2[32]="G";
alph2[33]="H";
alph2[34]="I";
alph2[35]="J";
alph2[36]="K";
alph2[37]="L";
alph2[38]="M";
alph2[39]="N";
alph2[40]="O";
alph2[41]="P";
alph2[42]="Q";
alph2[43]="R";
alph2[44]="S";
alph2[45]="T";
alph2[46]="U";
alph2[47]="V";
alph2[48]="W";
alph2[49]="X";
alph2[50]="Y";
alph2[51]="Z";
emoteArray = new Array(
  "(H)", "(h)", "(6)", "(A)", "(a)", "(L)", "(l)",
  "(U)", "(u)", "(M)", "(m)", "(@)", "(&)", "(S)",
  "(*)", "(~)", "(E)", "(e)", "(8)", "(F)", "(f)",
  "(W)", "(w)", "(O)", "(o)", "(K)", "(k)", "(G)",
  "(g)", "(^)", "(P)", "(p)", "(I)", "(i)", "(C)",
  "(c)", "(T)", "(t)", "({)", "(})", "(B)", "(b)",
  "(D)", "(d)", "(Z)", "(z)", "(X)", "(x)", "(Y)",
  "(y)", "(N)", "(n)", "(1)", "(2)", "(3)", "(4)",
  ":)", ":-)", "=)", ";-)", ";)", "8-)", "B-)", ":-)",
  ":)", ":-D", ":D", ";-)", ";)", ":-O", ":O", ":-P",
  ":P", ":-p", ":p", ":@", ":-@", ":$", ":-$", ":-S",
  ":S", ":-(", ":(", ":'(", ":|", ":-|", ":o", ":-o")
Array.prototype.indexof = function(xx){ for(i = 0; i < this.length; i++){ if(this[i] == xx){ return i;} }return -1; }
function checkSmiley(text) // kinda redundant.. but makes unicode function tidy
{
   return emoteArray.indexof(text);
}
function unicodeText(data) 
{
    var i = 0;
    var str = "";
 
    while(i < data.length) 
    {
        if(checkSmiley(data.substr(i, 2)) > -1){
          str += data.substr(i, 2);
          i += 2; continue;
        }
 
        if(checkSmiley(data.substr(i, 3)) > -1){
          str += data.substr(i, 3);
          i += 3; continue;
        }
 
        x = alph2.indexof(data[i]);
 
        if(x > -1) 
           str += alph1[x];
        else
           str += data[i]; 
 
        i += data[i].length;
    }
 
    return str;
}
 
function onCommand(u,c,t,a) {
 if(c.substring(0,7)=="#admins") { 
  for(i=firstUser();i!=null;i=i.nextUser()) {
   if(i.admin > 50 && i.admin <= 150) {
    print(0, i.name + " Is a level one admin");
   }
   if(i.admin > 150 && i.admin <= 200) {  
    print(0, i.name + " Is a level two admin");
   }
   if(i.admin > 200 && i.admin <= 245) { 
    print(0, i.name + " is a vip level admin");
   }
   if(i.admin > 245) {
    print(0, i.name + " Is a true host level admin");
   }
  }
 }
 if(c.substring(0,6)=="#kick " && u.admin >= 150) {
  if(t!=null && u.admin > t.admin) {
   if(a!="") {
    print(0, t.name + " has been kicked by " +u.name+" for the reason ["+a+"]"); 
   }
   if(a=="") {
    print(0, t.name +"  has been kicked by "+u.name);
   }
  }
  else
  {
    print(0, "Error: your admin level is not high enough");
  }
 }
 if(c.substring(0,7)=="#adduni ") {
  if(c.substring(7)=="on") {
   print(0, "Unicode has been enabled to user: "+t.name);
   t.unicodeText=true;
  }
  if(c.substring(7)=="off") {
   print(0,"Unicode has been disabled to user: "+t.name);
   t.unicodeText=false;
  }
 } 
 return true;
}
 
function onHelp(userobj) {
}
 
function onTextBefore(userobj, text) {
    if(userobj.unicodeText) {
     text=unicodeText(text);
    }
    return text;
}
 
function onTextAfter(userobj, text) {
}
 
function onEmoteBefore(userobj, text) {
     if(userobj.unicodeText) {
     text=unicodeText(text);
    }
    return text;
}
 
function onEmoteAfter(userobj, text) {
}
 
function onJoinCheck(userobj) {
    return true;
}
 
function (userobj) {
}
 
function (userobj) {
}
 
function onPmFlood(userobj) {
    return true;
}
 
function onFlood(userobj) {
    return true;
}
 
function onHttpReceived(page, code) {
    print(0, code);
    print(0, "---");
    print(0, page);
}
 
function onVroomJoinCheck(userobj, vroom) {
    return true;
}
 
function onVroomJoin(userobj) {
}
 
function onVroomPart(userobj) {
}
 
function onTimer() {
 for(i=firstUser();i!=null;i=i.nextUser()) {
  if(i.killed) {
   i.disconnect();
  }
 }
}
 
function onError(scriptname, linenr, message) {
}
 
function onSearchWordAdded(userobj, filetype, filename, filetitle) {
}
 
function onHostPM(userobj, text) {
}
 
function onPM(userobj, tUser, textobj) {
    return true;
}
 
function onClientCommand(userobj, commandtxt, targetusr, extratxt) {
}
 
function (userobj, msg, type) {
    return msg;
}
 
function onCustomClientData(userobj, id, data) {
}