Advertisement
Guest User

asd

a guest
Jun 3rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.19 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Efsaneleri cukkalama scripti
  3. // @version 0.1
  4. // @description Tools
  5. // @author Zafer reyiz
  6. // @require http://code.jquery.com/jquery-1.11.0.min.js
  7. // @match *.pokemon-vortex.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 = true; //auto-login when logged out
  17.  
  18. var username = "";
  19. var password = "";
  20.  
  21. /**********ON/OFF SETTINGS**********/
  22. var doBattle = true; //enable battles same battle over and over again
  23. var forceBattle = true; //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 = false; //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. // Efsanevi reyizler
  32. 'Articuno',
  33. 'Zapdos',
  34. 'Moltres',
  35. 'Mewtwo',
  36. 'Mew',
  37. 'Raikou',
  38. 'Entei',
  39. 'Suicune',
  40. 'Lugia',
  41. 'Ho-oh',
  42. 'Celebi',
  43. 'Regirock',
  44. 'Regice',
  45. 'Registeel',
  46. 'Latias',
  47. 'Latios',
  48. 'Kyogre',
  49. 'Groudon',
  50. 'Rayquaza',
  51. 'Jirachi',
  52. 'Deoxys',
  53. 'Rotom',
  54. 'Uxie',
  55. 'Mesprit',
  56. 'Azelf',
  57. 'Dialga',
  58. 'Palkia',
  59. 'Giratina',
  60. 'Heatran',
  61. 'Regigigas',
  62. 'Cresselia',
  63. 'Darkrai',
  64. 'Phione',
  65. 'Manaphy',
  66. 'Shaymin',
  67. 'Arceus',
  68. 'Victini',
  69. 'Cobalion',
  70. 'Terrakion',
  71. 'Virizion',
  72. 'Keldeo',
  73. 'Tornadus',
  74. 'Thundurus',
  75. 'Landorus',
  76. 'Reshiram',
  77. 'Zekrom',
  78. 'Kyurem',
  79. 'Meloetta',
  80. 'Genesect',
  81. 'Xerneas (Active)',
  82. 'Yveltal',
  83. 'Zygarde',
  84. 'Diancie',
  85. 'Hoopa',
  86. 'Volcanion',
  87.  
  88. ];
  89. //the pokemon you want to be alerted of
  90. //make sure you get the right spelling
  91. //TIP: You can also use the above setting as
  92. //a general keyword searcher in the pokemon you see
  93. //e.g. "shiny", "dark"
  94.  
  95. var levelsToFind = ["9"]; //The specific levels you want to be alerted for
  96. //keep this a string array
  97.  
  98. var levelsAndUpToFind = 50; //level and up to alert about pokemon
  99. //dont make this a string or array
  100.  
  101. var scanFreq = 75; //time to wait between every time the script checks if you saw what you wanted (in milliseconds)
  102.  
  103. var isDoneLoadingFreq = 350; //time to wait between checking if looking for pokemon has finished loading (in milli)
  104. //dont make this too low (keep it how it is, it works fine) unless you have very super speedy internet
  105. //THE LOWER THIS IS THE HIGHER CHANCE YOU HAVE OF LOSING A LEGEND
  106.  
  107. /**********FIGHTING SETTINGS**********/
  108. var battle = "/battle.php?bid=458459";
  109. //change this to your battle url, but make sure you remove everything up to the /battle.php?jglasd=dfjklgdfj
  110. //Even though it does automatically :P
  111.  
  112. var firstPokemonPrefAtt = 0; // 0 = don't pick
  113. var seconPokemonPrefAtt = 0; // 0 = don't pick
  114. var thirdPokemonPrefAtt = 0; // 0 = don't pick
  115. var fourtPokemonPrefAtt = 0; // 0 = don't pick
  116. var fifthPokemonPrefAtt = 0; // 0 = don't pick
  117. var sixthPokemonPrefAtt = 0; // 0 = don't pick
  118.  
  119. var firstPokemonName = ""; // These names just need to be unique
  120. var seconPokemonName = ""; // Capitalization is ignored
  121. var thirdPokemonName = ""; // if empty it will be skipped
  122. var fourtPokemonName = ""; // if not found it will be skipped
  123. var fifthPokemonName = ""; // Make sure you spell right :p
  124. var sixthPokemonName = ""; //
  125. var attackFreq = 500; //time to wait between every click while fighting (in milliseconds)
  126.  
  127. /**********IGNORE EVERYTHING PAST THIS**********/
  128. var pokeNames = [firstPokemonName, seconPokemonName, thirdPokemonName, fourtPokemonName, fifthPokemonName, sixthPokemonName];
  129. var pokeAtts = [firstPokemonPrefAtt, seconPokemonPrefAtt, thirdPokemonPrefAtt, fourtPokemonPrefAtt, fifthPokemonPrefAtt, sixthPokemonPrefAtt];
  130. var battleUrl = ".pokemon-vortex.com/battle.php?bid=458459";
  131. var findUrl = ".pokemon-vortex.com/map.php";
  132. var loginUrl = "www.pokemon-vortex.com/login.php";
  133. var dashboardUrl = ".pokemon-vortex.com/dashboard.php";
  134. var attTimes = 0;
  135. var moveTimes = 0;
  136.  
  137. if(battle.indexOf(".com")>-1){
  138. battle = battle.split(".com")[1];
  139. }
  140.  
  141. if (doBattle && window.location.href.indexOf(battleUrl) > -1) {
  142. function startBattle() {
  143. for(var d = 0; d < 6; d++)
  144. if(pokeAtts[d] !== 0 && $("h3:contains('Your')").text().toLowerCase().indexOf(pokeNames[d].toLowerCase()) > -1 && pokeNames[d] !== "")
  145. $("input#attack"+pokeAtts[d]).click();
  146.  
  147. if($("input[value*='Continue']").length)
  148. $("input[value*='Continue']").submit();
  149. if($("input[value*='Attack']").length)
  150. $("input[value*='Attack']").submit();
  151. if($("a:contains('Rebattle Opponent')").length)
  152. $("a:contains('Rebattle Opponent')").click();
  153. }
  154. if (window.location.href.indexOf(battle) >-1) {
  155. setInterval(function () {
  156. if($("#loading").css("visibility") == "hidden"){
  157. startBattle();
  158. attTimes = 0;
  159. }else{
  160. attTimes++;
  161. }
  162. if(times >= 100)
  163. location.reload(true);
  164.  
  165. }, attackFreq);
  166. } else {
  167. window.location.href = battle;
  168. }
  169. }else if ((findPokemon || findLevels || findLevelsAndUp) && window.location.href.indexOf(findUrl) > -1) {
  170. var a;
  171. var b;
  172. var finderOn = true;
  173. var whichMove = 1;
  174.  
  175. function fireKey(el, key) {
  176. //Set key to corresponding code. This one is set to the left arrow key.
  177. //37 = left, 38 = up, 39 = right, 40 = down;
  178. if (document.createEventObject) {
  179. var eventObj = document.createEventObject();
  180. eventObj.keyCode = key;
  181. el.fireEvent("onkeydown", eventObj);
  182. } else if (document.createEvent) {
  183. var eventObj = document.createEvent("Events");
  184. eventObj.initEvent("keydown", true, true);
  185. eventObj.which = key;
  186. el.dispatchEvent(eventObj);
  187. }
  188. }
  189.  
  190.  
  191. function found(thing){
  192. if($('#pkmnappear').first().html().toLowerCase().indexOf(thing.toLowerCase()) > -1){
  193. alert("Kaan noob zafer pro");
  194. finderOn = true;
  195. clearInterval(a);
  196. if(autoWalkFind){
  197. clearInterval(b);
  198. }
  199. return true;
  200. }else{
  201. return false;
  202. }
  203. }
  204.  
  205. function setFinder(){
  206. finderOn = true;
  207.  
  208. if(autoWalkFind){
  209. b = setInterval(function(){
  210. var isLoading = $("#pkmnappear").text().indexOf("Please wait") > -1;
  211. if(!isLoading){
  212. switch(whichMove){
  213. case 1:
  214. fireKey(document,37);
  215. whichMove = 2;
  216. break;
  217. case 2:
  218. fireKey(document,38);
  219. whichMove = 3;
  220. break;
  221. case 3:
  222. fireKey(document,39);
  223. whichMove = 4;
  224. break;
  225. case 4:
  226. fireKey(document,40);
  227. whichMove = 1;
  228. break;
  229. }
  230. moveTimes=0;
  231. }else{
  232. moveTimes++;
  233. }
  234. if(moveTimes >= 100)
  235. location.reload(true);
  236. },isDoneLoadingFreq);
  237. }
  238.  
  239. a = setInterval(function () {
  240. if(findPokemon)
  241. for (var i = 0; i < pokemonToFind.length; i++)
  242. found(pokemonToFind[i]);
  243.  
  244. if(findLevels)
  245. for (var i = 0; i < levelsToFind.length; i++)
  246. found("Level: " + levelsToFind[i] + " ");
  247.  
  248. if(findLevelsAndUp)
  249. for(var l = levelsAndUpToFind; l<101;l++)
  250. if (found("Level: " + l + " "))
  251. break;
  252.  
  253. }, scanFreq);
  254. }
  255.  
  256. setFinder();
  257. $(document).keydown(function(event) {
  258. switch (event.keyCode) {
  259. case 37: case 38: case 39: case 40: case 87: case 65: case 83: case 68: if(!finderOn)setFinder();
  260. break;
  261. }
  262. });
  263.  
  264. }else if(autoLogin && window.location.href.indexOf(loginUrl) > -1){
  265. $("#myusername").val(username);
  266. $("#mypassword").val(password);
  267. $("input[value*='Log in']").click();
  268. $("input[value*='Log in']").submit();
  269. }else if(forceBattle && window.location.href.indexOf(dashboardUrl) > -1){
  270. window.location.href = battle;
  271. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement