Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setInterval('RUN();',500);
- var Users = new Array(null,"Cweener");
- var y = document.getElementById('cw');
- var words = document.getElementById('m');
- function RUN() {
- var x = y.getElementsByTagName('span');
- for (var i=0;i<x.length;i++) {
- var string = x[i].innerHTML;
- if(string.match("has joined the channel") != null) {
- var store = words.value;
- var strlength = string.length-23;
- var name = string.substr(0,strlength);
- var strfirst = name.indexOf(">")+1;
- var strlast = (name.indexOf("/"))-2;
- var name = name.substr(strfirst,strlast);
- name = name.replace("</span>", "");
- for(var q=0;q<Users.length;q++) {
- if(name == Users[q]) {
- name = "";
- }
- }
- if (name != "") {
- if (name == "M0rbid") {
- words.value = "Welcome to the chat, almighty Sith Lord Revan !";
- }
- else if (name == "ap0calypse") {
- words.value = "Oh hey there ap0calypse, oh light of my life. I'm so glad you could grace the chatroom with your presence. :))";
- }
- else if (name == "General Frank") {
- words.value = "Good day General Frank! :)";
- }
- else {
- var random = Math.floor(Math.random()*15);
- if (random == 0) { words.value = "Hey there, "+name+"."; }
- else if (random == 1) { words.value = "Oh hai there "+name+". :D"; }
- else if (random == 2) { words.value = name+", Roar! :D"; }
- else if (random == 3) { words.value = "Hey there, "+name+", you're so awesome!"; }
- else if (random == 4) { words.value = "Look who decided to join the chat. It's "+name+"."; }
- else if (random == 5) { words.value = "Speak of the devil. Oh hey "+name+"."; }
- else if (random == 6) { words.value = ""+name+", welcome to the abyss."; }
- else if (random == 7) { words.value = "Oh hai there "+name+". :D"; }
- else if (random == 8) { words.value = ""+name+", you're looking good today! :)"; }
- else if (random == 9) { words.value = "Welcome to the chat "+name+"."; }
- else if (random == 10) { words.value = ""+name+", how are you on this fine day? :)"; }
- else if (random == 11) { words.value = "Oh, "+name+"! Why hello thar ol' chap!"; }
- else if (random == 12) { words.value = "Oh, "+name+"!! My main cheese wiz! What's Crackin'?"; }
- else if (random == 13) { words.value = name+", wwwaaassssssuuupppppppppp?"; }
- else if (random == 14) { words.value = "Oh snap! It's "+name+". PARTTYYYYY TIMEEEEE :D"; }
- }
- chat.input(words.value);
- words.value = store;
- Users.push(name);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment