Advertisement
Guest User

Untitled

a guest
May 24th, 2017
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.32 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Only uniques
  3. // @version 0.1
  4. // @description Tools
  5. // @author iTC
  6. // @require http://code.jquery.com/jquery-1.11.0.min.js
  7. // @match *.website.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. /*********Information*************/
  12. // To use this script you need to install TamperMonkey/GreaseMonkey ( EXTENSIONS ) on your web browser (e.g. Chrome/Firefox)
  13. // Select add script and paste all of this script and enable it
  14. // For this one i already set up a Legendary Catcher only so you can just go to any map and wait until a notification pops up saying 'Found Something' and you just got yourself a legendary. Have fun !
  15. /**********LOGIN SETTING**********/
  16. var autoLogin = false; //auto-login when logged out
  17.  
  18. var username = "";
  19. var password = "";
  20.  
  21. /**********ON/OFF SETTINGS**********/
  22. var doBattle = false; //enable battles same battle over and over again
  23. var forceBattle = false; //enable being sent to the battle url when at dashboard
  24. var findPokemon = true; //enable finding pokemon alerts
  25. var findLevels = false; //enable find specific pokemon levels
  26. var findLevelsAndUp = true; //enable finding pokemon levels and up
  27. var autoWalkFind = true; //enable walking+finding without you doing work
  28.  
  29. /**********FINDING SETTINGS**********/
  30. var pokemonToFind = [
  31. // Custom
  32. 'Shiny Kyogre',
  33. 'Shiny Lugia',
  34. ];
  35. //the pokemon you want to be alerted of
  36. //make sure you get the right spelling
  37. //TIP: You can also use the above setting as
  38. //a general keyword searcher in the pokemon you see
  39. //e.g. "shiny", "dark"
  40.  
  41. var levelsToFind = ["100"]; //The specific levels you want to be alerted for
  42. //keep this a string array
  43.  
  44. var levelsAndUpToFind = 100; //level and up to alert about pokemon
  45. //dont make this a string or array
  46. //time to wait between checking if looking for pokemon has finished loading (in milli)
  47. //dont make this too low (keep it how it is, it works fine) unless you have very super speedy internet
  48. //THE LOWER THIS IS THE HIGHER CHANCE YOU HAVE OF LOSING A LEGEND
  49.  
  50. /**********FIGHTING SETTINGS**********/
  51. var battle = "/wildbattle.php";
  52. //change this to your battle url, but make sure you remove everything up to the /battle.php?jglasd=dfjklgdfj
  53. //Even though it does automatically :P
  54.  
  55. var firstPokemonPrefAtt = 0; // 0 = don't pick
  56. var seconPokemonPrefAtt = 0; // 0 = don't pick
  57. var thirdPokemonPrefAtt = 0; // 0 = don't pick
  58. var fourtPokemonPrefAtt = 0; // 0 = don't pick
  59. var fifthPokemonPrefAtt = 0; // 0 = don't pick
  60. var sixthPokemonPrefAtt = 0; // 0 = don't pick
  61.  
  62. var firstPokemonName = ""; // These names just need to be unique
  63. var seconPokemonName = ""; // Capitalization is ignored
  64. var thirdPokemonName = ""; // if empty it will be skipped
  65. var fourtPokemonName = ""; // if not found it will be skipped
  66. var fifthPokemonName = ""; // Make sure you spell right :p
  67. var sixthPokemonName = ""; //
  68. var attackFreq = 500; //time to wait between every click while fighting (in milliseconds)
  69.  
  70. /**********IGNORE EVERYTHING PAST THIS**********/
  71. var pokeNames = [firstPokemonName, seconPokemonName, thirdPokemonName, fourtPokemonName, fifthPokemonName, sixthPokemonName];
  72. var pokeAtts = [firstPokemonPrefAtt, seconPokemonPrefAtt, thirdPokemonPrefAtt, fourtPokemonPrefAtt, fifthPokemonPrefAtt, sixthPokemonPrefAtt];
  73. var battleUrl = ".pokemon-vortex.com/wildbattle.php";
  74. var findUrl = ".pokemon-vortex.com/map.php";
  75. var loginUrl = "www.pokemon-vortex.com/login.php";
  76. var dashboardUrl = ".pokemon-vortex.com/dashboard.php";
  77. var attTimes = 0;
  78. var moveTimes = 0;
  79.  
  80. if(battle.indexOf(".com")>-1){
  81. battle = battle.split(".com")[1];
  82. }
  83.  
  84. if (doBattle && window.location.href.indexOf(battleUrl) > -1) {
  85. function startBattle() {
  86. for(var d = 0; d < 6; d++)
  87. if(pokeAtts[d] !== 0 && $("h3:contains('Your')").text().toLowerCase().indexOf(pokeNames[d].toLowerCase()) > -1 && pokeNames[d] !== "")
  88. $("input#attack"+pokeAtts[d]).click();
  89.  
  90. if($("input[value*='Continue']").length)
  91. $("input[value*='Continue']").submit();
  92. if($("input[value*='Attack']").length)
  93. $("input[value*='Attack']").submit();
  94. if($("a:contains('Rebattle Opponent')").length)
  95. $("a:contains('Rebattle Opponent')").click();
  96. }
  97. if (window.location.href.indexOf(battle) >-1) {
  98. setInterval(function () {
  99. if($("#loading").css("visibility") == "hidden"){
  100. startBattle();
  101. attTimes = 0;
  102. }else{
  103. attTimes++;
  104. }
  105. if(times >= 100)
  106. location.reload(true);
  107.  
  108. }, attackFreq);
  109. } else {
  110. window.location.href = battle;
  111. }
  112. }else if ((findPokemon || findLevels || findLevelsAndUp) && window.location.href.indexOf(findUrl) > -1) {
  113. var a;
  114. var b;
  115. var finderOn = true;
  116. var whichMove = 1;
  117.  
  118. function fireKey(el, key) {
  119. //Set key to corresponding code. This one is set to the left arrow key.
  120. //37 = left, 38 = up, 39 = right, 40 = down;
  121. if (document.createEventObject) {
  122. var eventObj = document.createEventObject();
  123. eventObj.keyCode = key;
  124. el.fireEvent("onkeydown", eventObj);
  125. } else if (document.createEvent) {
  126. var eventObj = document.createEvent("Events");
  127. eventObj.initEvent("keydown", true, true);
  128. eventObj.which = key;
  129. el.dispatchEvent(eventObj);
  130. }
  131. }
  132.  
  133.  
  134. function found(thing){
  135. if($('#pkmnappear').first().html().toLowerCase().indexOf(thing.toLowerCase()) > -1){
  136. alert("Found Something");
  137. finderOn = true;
  138. clearInterval(a);
  139. if(autoWalkFind){
  140. clearInterval(b);
  141. }
  142. return true;
  143. }else{
  144. return false;
  145. }
  146. }
  147.  
  148. function setFinder(){
  149. finderOn = true;
  150.  
  151. var math1 = Math.floor(Math.random() * 2000) + 110;
  152. var scanFreq = math1;
  153. var math2 = Math.floor(Math.random() * 2000) + 400;
  154. var isDoneLoadingFreq = math2;
  155.  
  156. if(autoWalkFind){
  157. b = setInterval(function(){
  158. var isLoading = $("#pkmnappear").text().indexOf("Please wait") > -1;
  159. if(!isLoading){
  160. switch(whichMove){
  161. case 1:
  162. fireKey(document,37);
  163. whichMove = 2;
  164. break;
  165. case 2:
  166. fireKey(document,38);
  167. whichMove = 3;
  168. break;
  169. case 3:
  170. fireKey(document,39);
  171. whichMove = 4;
  172. break;
  173. case 4:
  174. fireKey(document,40);
  175. whichMove = 1;
  176. break;
  177. }
  178. moveTimes=0;
  179. }else{
  180. moveTimes++;
  181. }
  182. if(moveTimes >= 100)
  183. location.reload(true);
  184. },isDoneLoadingFreq);
  185. }
  186.  
  187. a = setInterval(function () {
  188. if(findPokemon)
  189. for (var i = 0; i < pokemonToFind.length; i++)
  190. found(pokemonToFind[i]);
  191.  
  192. if(findLevels)
  193. for (var i = 0; i < levelsToFind.length; i++)
  194. found("Level: " + levelsToFind[i] + " ");
  195.  
  196. if(findLevelsAndUp)
  197. for(var l = levelsAndUpToFind; l<101;l++)
  198. if (found("Level: " + l + " "))
  199. break;
  200.  
  201. }, scanFreq);
  202. }
  203.  
  204. setFinder();
  205. $(document).keydown(function(event) {
  206. switch (event.keyCode) {
  207. case 37: case 38: case 39: case 40: case 87: case 65: case 83: case 68: if(!finderOn)setFinder();
  208. break;
  209. }
  210. });
  211.  
  212. }else if(autoLogin && window.location.href.indexOf(loginUrl) > -1){
  213. $("#myusername").val(username);
  214. $("#mypassword").val(password);
  215. $("input[value*='Log in']").click();
  216. $("input[value*='Log in']").submit();
  217. }else if(forceBattle && window.location.href.indexOf(dashboardUrl) > -1){
  218. window.location.href = battle;
  219. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement