Guest User

Untitled

a guest
Jan 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. setInterval('RUN();',500);
  2. var Users = new Array(null,"Cweener");
  3. var y = document.getElementById('cw');
  4. var words = document.getElementById('m');
  5. function RUN() {
  6. var x = y.getElementsByTagName('span');
  7. for (var i=0;i<x.length;i++) {
  8. var string = x[i].innerHTML;
  9. if(string.match("has joined the channel") != null) {
  10. var store = words.value;
  11. var strlength = string.length-23;
  12. var name = string.substr(0,strlength);
  13. var strfirst = name.indexOf(">")+1;
  14. var strlast = (name.indexOf("/"))-2;
  15. var name = name.substr(strfirst,strlast);
  16. name = name.replace("</span>", "");
  17. for(var q=0;q<Users.length;q++) {
  18. if(name == Users[q]) {
  19. name = "";
  20. }
  21. }
  22. if (name != "") {
  23. if (name == "M0rbid") {
  24. words.value = "Welcome to the chat, almighty Sith Lord Revan !";
  25. }
  26. else if (name == "ap0calypse") {
  27. words.value = "Oh hey there ap0calypse, oh light of my life. I'm so glad you could grace the chatroom with your presence. :))";
  28. }
  29. else if (name == "General Frank") {
  30. words.value = "Good day General Frank! :)";
  31. }
  32. else {
  33. var random = Math.floor(Math.random()*15);
  34. if (random == 0) { words.value = "Hey there, "+name+"."; }
  35. else if (random == 1) { words.value = "Oh hai there "+name+". :D"; }
  36. else if (random == 2) { words.value = name+", Roar! :D"; }
  37. else if (random == 3) { words.value = "Hey there, "+name+", you're so awesome!"; }
  38. else if (random == 4) { words.value = "Look who decided to join the chat. It's "+name+"."; }
  39. else if (random == 5) { words.value = "Speak of the devil. Oh hey "+name+"."; }
  40. else if (random == 6) { words.value = ""+name+", welcome to the abyss."; }
  41. else if (random == 7) { words.value = "Oh hai there "+name+". :D"; }
  42. else if (random == 8) { words.value = ""+name+", you're looking good today! :)"; }
  43. else if (random == 9) { words.value = "Welcome to the chat "+name+"."; }
  44. else if (random == 10) { words.value = ""+name+", how are you on this fine day? :)"; }
  45. else if (random == 11) { words.value = "Oh, "+name+"! Why hello thar ol' chap!"; }
  46. else if (random == 12) { words.value = "Oh, "+name+"!! My main cheese wiz! What's Crackin'?"; }
  47. else if (random == 13) { words.value = name+", wwwaaassssssuuupppppppppp?"; }
  48. else if (random == 14) { words.value = "Oh snap! It's "+name+". PARTTYYYYY TIMEEEEE :D"; }
  49. }
  50. chat.input(words.value);
  51. words.value = store;
  52. Users.push(name);
  53. }
  54. }
  55. }
  56. }
Add Comment
Please, Sign In to add comment