Advertisement
DudeWithFood

Forum Bot 2

Jul 24th, 2015
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. javascript:var doc = document;
  2. var forums = "http://www.roblox.com/Forum/ShowForum.aspx?ForumID=";
  3. var board = 18;
  4. var floodcheck = 31000;
  5. var reply = "http://www.roblox.com/Forum/AddPost.aspx?PostID=";
  6. var frame = document.createElement('iframe');
  7. var threadview = "ctl00_cphRoblox_ThreadView1_ctl00_ThreadList";
  8. var body = "ctl00_cphRoblox_Createeditpost1_PostForm_PostBody";
  9. var postbutton = "ctl00_cphRoblox_Createeditpost1_PostForm_PostButton";
  10. var keywords = new Array("Cool...","nice!","very cool","i like it","i dont understand","sure, if i go first XD","NOU","veryyyy niceee");
  11. /*var keywords = new Array("u just got bot trolled");*/
  12. var added = String.fromCharCode(173) + " "+ String.fromCharCode(173);
  13. var subject = "ctl00_cphRoblox_Createeditpost1_PostForm_PostSubject";
  14. var posts = 0;
  15. function Add(str){
  16. keywords.push(str);
  17. }
  18. function FindPost(){
  19. var doc = frame.contentDocument;
  20. var threds = doc.getElementById(threadview).firstElementChild;
  21. var post = threds.children[Math.floor(Math.random()*20)+5];
  22. var postlink = post.children[1].firstElementChild;
  23. var postid = postlink.href.substring(postlink.href.indexOf("=")+1);
  24. return postid;
  25. }
  26. function load() {
  27. var loc = frame.contentWindow.location;
  28. var url = loc.hostname+loc.pathname;
  29. if (loc.href == forums + board) {
  30. var postid = FindPost();
  31. frame.contentWindow.location = reply+postid;
  32. } else if(url == "www.roblox.com/Forum/AddPost.aspx"){
  33. frame.contentDocument.getElementById(subject).value = "isuper67's FORUM ";
  34. frame.contentDocument.getElementById(body).value = keywords[Math.floor(Math.random()*keywords.length)]+added;
  35. added += String.fromCharCode(173);
  36. frame.contentDocument.getElementById(postbutton).click();
  37. posts++;
  38. document.title = posts+" posts";
  39. } else {
  40. setTimeout("frame.contentWindow.location = forums+board;",floodcheck);
  41. }
  42. }
  43.  
  44. frame.onload = load;
  45. frame.src = forums+board;
  46. frame.height = 600;
  47. frame.width = 900;
  48. frame.style.position = "absolute";
  49. document.body.innerHTML = "";
  50. document.body.appendChild(frame);
  51. /*isuper67*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement