Advertisement
thetenfold

Untitled

Jul 12th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Make sure the page is not in a frame
  2. if(window.self !== window.top) return;
  3.  
  4. // short function to make code look cleaner
  5. function search(a) {
  6.     'use strict';
  7.     return document.body.textContent.search(a) !== -1;
  8. }
  9.  
  10. // main script body
  11. function main() {
  12. 'use strict';
  13.     var i, boltstrike;
  14.     if (search(/error/i)) {
  15.         if (search('Submit')) {
  16.             if (search('You have entered the correct code')) {
  17.                 location.href = "/battle.php?opp=Swimmer%20Richard";
  18.             }
  19.             if (location.pathname === "/battle.php") {
  20.                 if (search('.')) {
  21.                     location.href = "/battle.php?opp=Swimmer%20Richard";
  22.                 }
  23.                 boltstrike = document.evaluate('//input[@type="button" and contains(., "Bolt Strike")]', document, null, 9, null).singleNodeValue;
  24.                 if(boltstrike) {
  25.                     boltstrike.click();
  26.                 }
  27.             }
  28.         } else {
  29.             alert("Captcha");
  30.         }
  31.     } else {
  32.         location.href = "/battle.php?opp=Swimmer%20Richard";
  33.     }
  34. }
  35.  
  36. // run main() every 2 seconds
  37. setInterval(main, 2000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement