Advertisement
Froast

Forum ID Sniper

Jun 4th, 2015
688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Just click new thread and put in body and subject as usual. Right click the new thread page and hit Inspect Element and go to the console and copy and paste this in. You can go off to another tab/window and do whatever you want, it will post the thread once the ID is ready.
  3. Faster internet = higher accuracy
  4. Closer ID (to the current latest ID) = higher accuracy
  5. (If you're doing a long one you might want to play it safe and go 1-3 below, especially at peak times)
  6.  
  7. Probably not the best bot by any means, but is quite simple.
  8. */
  9.  
  10. var id = 0; // This is the ID you want to snipe and is the only thing you need to change
  11.  
  12. var button = document.getElementById('ctl00_cphRoblox_Createeditpost1_PostForm_PostButton');
  13. function check(id) {
  14.     $.ajax('http://forum.roblox.com/Forum/ShowPost.aspx?PostID=' + (id - 1),{
  15.         method: 'GET',
  16.         success: function(data) {
  17.             if (!data.match(/<span id="ctl00_cphRoblox_Message1_ctl00_MessageTitle"/)) { // Had to resort to this because of XMLHttpRequest limitations
  18.                 clearInterval(run);
  19.                 button.click();
  20.                 button.remove();
  21.             }
  22.         }
  23.     });
  24. }
  25.  
  26. var run = setInterval(function() {
  27.     check(id);
  28. },100);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement