Advertisement
Guest User

Legendary Finder (Modified)

a guest
Oct 10th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.07 KB | None | 0 0
  1. // ==UserScript==
  2. // @name PVT V.3
  3. // @version 0.1
  4. // @description Tools
  5. // @author iTC
  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 = 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. 'Mystic Sableye',
  33. 'Mystic Spiritomb',
  34.  
  35. //Gen 6 Legends
  36. 'Xerneas','Shiny Xerneas','Dark Xerneas','Shadow Xerneas','Metallic Xerneas','Mystic Xerneas',
  37. 'Yveltal','Shiny Yveltal','Dark Yveltal','Shadow Yveltal','Metallic Yveltal','Mystic Yveltal',
  38. 'Zygarde','Shiny Zygarde','Dark Zygarde','Shadow Zygarde','Metallic Zygarde','Mystic Zygarde',
  39.  
  40. // Grass
  41. 'Shaymin (Sky)',
  42. 'Celebi',
  43. 'Latios',
  44. 'Latias',
  45. 'Rayquaza',
  46. 'Shaymin',
  47. 'Mew',
  48. 'Cresselia',
  49. 'Azelf',
  50. 'Uxie',
  51. 'Mesprit',
  52. 'Virizion',
  53. 'Genesect',
  54. 'Mystic Shaymin (Sky)',
  55. 'Mystic Celebi',
  56. 'Mystic Latios',
  57. 'Mystic Latias',
  58. 'Mystic Rayquaza',
  59. 'Mystic Shaymin',
  60. 'Mystic Mew',
  61. 'Mystic Cresselia',
  62. 'Mystic Azelf',
  63. 'Mystic Uxie',
  64. 'Mystic Mesprit',
  65. 'Mystic Virizion',
  66. 'Mystic Genesect',
  67. 'Shiny Shaymin (Sky)',
  68. 'Shiny Celebi',
  69. 'Shiny Latios',
  70. 'Shiny Latias',
  71. 'Shiny Rayquaza',
  72. 'Shiny Shaymin',
  73. 'Shiny Mew',
  74. 'Shiny Cresselia',
  75. 'Shiny Azelf',
  76. 'Shiny Uxie',
  77. 'Shiny Mesprit',
  78. 'Shiny Virizion',
  79. 'Shiny Genesect',
  80. 'Dark Shaymin (Sky)',
  81. 'Dark Celebi',
  82. 'Dark Latios',
  83. 'Dark Latias',
  84. 'Dark Rayquaza',
  85. 'Dark Shaymin',
  86. 'Dark Mew',
  87. 'Dark Cresselia',
  88. 'Dark Azelf',
  89. 'Dark Uxie',
  90. 'Dark Mesprit',
  91. 'Dark Virizion',
  92. 'Dark Genesect',
  93. 'Shadow Shaymin (Sky)',
  94. 'Shadow Celebi',
  95. 'Shadow Latios',
  96. 'Shadow Latias',
  97. 'Shadow Rayquaza',
  98. 'Shadow Shaymin',
  99. 'Shadow Mew',
  100. 'Shadow Cresselia',
  101. 'Shadow Azelf',
  102. 'Shadow Uxie',
  103. 'Shadow Mesprit',
  104. 'Shadow Virizion',
  105. 'Shadow Genesect',
  106. 'Metallic Shaymin (Sky)',
  107. 'Metallic Celebi',
  108. 'Metallic Latios',
  109. 'Metallic Latias',
  110. 'Metallic Rayquaza',
  111. 'Metallic Shaymin',
  112. 'Metallic Mew',
  113. 'Metallic Cresselia',
  114. 'Metallic Azelf',
  115. 'Metallic Uxie',
  116. 'Metallic Mesprit',
  117. 'Metallic Virizion',
  118. 'Metallic Genesect',
  119.  
  120.  
  121.  
  122. // Grass (water)
  123. 'Manaphy',
  124. 'Phione',
  125. 'Suicune',
  126. 'Keldeo',
  127. 'Mysyic Manaphy',
  128. 'Mystic Phione',
  129. 'Mystic Suicune',
  130. 'Mystic Keldeo',
  131. 'Shiny Manaphy',
  132. 'Shiny Phione',
  133. 'Shiny Suicune',
  134. 'Shiny Keldeo',
  135. 'Dark Manaphy',
  136. 'Dark Phione',
  137. 'Dark Suicune',
  138. 'Dark Keldeo',
  139. 'Shadow Manaphy',
  140. 'Shadow Phione',
  141. 'Shadow Suicune',
  142. 'Shadow Keldeo',
  143. 'Metallic Manaphy',
  144. 'Metallic Phione',
  145. 'Metallic Suicune',
  146. 'Metallic Keldeo',
  147.  
  148. // Ice
  149. 'Articuno',
  150. 'Suicune',
  151. 'Lugia',
  152. 'Regice',
  153. 'Kyurem',
  154. 'Mystic Articuno',
  155. 'Mystic Suicune',
  156. 'Mystic Lugia',
  157. 'Mystic Regice',
  158. 'Mystic Kyurem',
  159. 'Shiny Articuno',
  160. 'Shiny Suicune',
  161. 'Shiny Lugia',
  162. 'Shiny Regice',
  163. 'Shiny Kyurem',
  164. 'Dark Articuno',
  165. 'Dark Suicune',
  166. 'Dark Lugia',
  167. 'Dark Regice',
  168. 'Dark Kyurem',
  169. 'Shadow Articuno',
  170. 'Shadow Suicune',
  171. 'Shadow Lugia',
  172. 'Shadow Regice',
  173. 'Shadow Kyurem',
  174. 'Metallic Articuno',
  175. 'Metallic Suicune',
  176. 'Metallic Lugia',
  177. 'Metallic Regice',
  178. 'Metallic Kyurem',
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186. // Cave (land)
  187. 'Groudon',
  188. 'Arceus',
  189. 'Regigigas',
  190. 'Palkia',
  191. 'Dialga',
  192. 'Deoxys',
  193. 'Jirachi',
  194. 'Registeel',
  195. 'Regirock',
  196. 'Mewtwo',
  197. 'Cobalion',
  198. 'Terrakion',
  199. 'Virizion',
  200. 'Reshiram',
  201. 'Zekrom',
  202. 'Kyurem',
  203. 'Genesect',
  204. 'Tornadus',
  205. 'Landorus',
  206. 'Mystic Groudon',
  207. 'Mystic Arceus',
  208. 'Mystic Regigigas',
  209. 'Mystic Palkia',
  210. 'Mystic Dialga',
  211. 'Mystic Deoxys',
  212. 'Mystic Jirachi',
  213. 'Mystic Registeel',
  214. 'Mystic Regirock',
  215. 'Mystic Mewtwo',
  216. 'Mystic Cobalion',
  217. 'Mystic Terrakion',
  218. 'Mystic Virizion',
  219. 'Mystic Reshiram',
  220. 'Mystic Zekrom',
  221. 'Mystic Kyurem',
  222. 'Mystic Genesect',
  223. 'Mystic Tornadus',
  224. 'Mystic Landorus',
  225. 'Shiny Groudon',
  226. 'Shiny Arceus',
  227. 'Shiny Regigigas',
  228. 'Shiny Palkia',
  229. 'Shiny Dialga',
  230. 'Shiny Deoxys',
  231. 'Shiny Jirachi',
  232. 'Shiny Registeel',
  233. 'Shiny Regirock',
  234. 'Shiny Mewtwo',
  235. 'Shiny Cobalion',
  236. 'Shiny Terrakion',
  237. 'Shiny Virizion',
  238. 'Shiny Reshiram',
  239. 'Shiny Zekrom',
  240. 'Shiny Kyurem',
  241. 'Shiny Genesect',
  242. 'Shiny Tornadus',
  243. 'Shiny Landorus',
  244. 'Dark Groudon',
  245. 'Dark Arceus',
  246. 'Dark Regigigas',
  247. 'Dark Palkia',
  248. 'Dark Dialga',
  249. 'Dark Deoxys',
  250. 'Dark Jirachi',
  251. 'Dark Registeel',
  252. 'Dark Regirock',
  253. 'Dark Mewtwo',
  254. 'Dark Cobalion',
  255. 'Dark Terrakion',
  256. 'Dark Virizion',
  257. 'Dark Reshiram',
  258. 'Dark Zekrom',
  259. 'Dark Kyurem',
  260. 'Dark Genesect',
  261. 'Dark Tornadus',
  262. 'Dark Landorus',
  263. 'Shadow Groudon',
  264. 'Shadow Arceus',
  265. 'Shadow Regigigas',
  266. 'Shadow Palkia',
  267. 'Shadow Dialga',
  268. 'Shadow Deoxys',
  269. 'Shadow Jirachi',
  270. 'Shadow Registeel',
  271. 'Shadow Regirock',
  272. 'Shadow Mewtwo',
  273. 'Shadow Cobalion',
  274. 'Shadow Terrakion',
  275. 'Shadow Virizion',
  276. 'Shadow Reshiram',
  277. 'Shadow Zekrom',
  278. 'Shadow Kyurem',
  279. 'Shadow Genesect',
  280. 'Shadow Tornadus',
  281. 'Shadow Landorus',
  282. 'Metallic Groudon',
  283. 'Metallic Arceus',
  284. 'Metallic Regigigas',
  285. 'Metallic Palkia',
  286. 'Metallic Dialga',
  287. 'Metallic Deoxys',
  288. 'Metallic Jirachi',
  289. 'Metallic Registeel',
  290. 'Metallic Regirock',
  291. 'Metallic Mewtwo',
  292. 'Metallic Cobalion',
  293. 'Metallic Terrakion',
  294. 'Metallic Virizion',
  295. 'Metallic Reshiram',
  296. 'Metallic Zekrom',
  297. 'Metallic Kyurem',
  298. 'Metallic Genesect',
  299. 'Metallic Tornadus',
  300. 'Metallic Landorus',
  301.  
  302.  
  303. // Cave (water)
  304. 'Kyogre',
  305. 'Lugia',
  306. 'Keldeo',
  307. 'Shiny Kyogre',
  308. 'Shiny Lugia',
  309. 'Shiny Keldeo',
  310. 'Dark Kyogre',
  311. 'Dark Lugia',
  312. 'Dark Keldeo',
  313. 'Mystic Kyogre',
  314. 'Mystic Lugia',
  315. 'Mystic Keldeo',
  316. 'Shadow Kyogre',
  317. 'Shadow Lugia',
  318. 'Shadow Keldeo',
  319. 'Metallic Kyogre',
  320. 'Metallic Lugia',
  321. 'Metallic Keldeo',
  322.  
  323.  
  324. // Ghost
  325. 'Mew',
  326. 'Giratina',
  327. 'Rotom',
  328. 'Mesprit',
  329. 'Azelf',
  330. 'Uxie',
  331. 'Celebi',
  332. 'Darkrown',
  333. 'Darkrai',
  334. 'Shiny Mew',
  335. 'Shiny Giratina',
  336. 'Shiny Rotom',
  337. 'Shiny Mesprit',
  338. 'Shiny Azelf',
  339. 'Shiny Uxie',
  340. 'Shiny Celebi',
  341. 'Shiny Darkrown',
  342. 'Shiny Darkrai',
  343. 'Dark Mew',
  344. 'Dark Giratina',
  345. 'Dark Rotom',
  346. 'Dark Mesprit',
  347. 'Dark Azelf',
  348. 'Dark Uxie',
  349. 'Dark Celebi',
  350. 'Dark Darkrown',
  351. 'Dark Darkrai',
  352. 'Mystic Mew',
  353. 'Mystic Giratina',
  354. 'Mystic Rotom',
  355. 'Mystic Mesprit',
  356. 'Mystic Azelf',
  357. 'Mystic Uxie',
  358. 'Mystic Celebi',
  359. 'Mystic Darkrown',
  360. 'Mystic Darkrai',
  361. 'Shadow Mew',
  362. 'Shadow Giratina',
  363. 'Shadow Rotom',
  364. 'Shadow Mesprit',
  365. 'Shadow Azelf',
  366. 'Shadow Uxie',
  367. 'Shadow Celebi',
  368. 'Shadow Darkrown',
  369. 'Shadow Darkrai',
  370. 'Metallic Mew',
  371. 'Metallic Giratina',
  372. 'Metallic Rotom',
  373. 'Metallic Mesprit',
  374. 'Metallic Azelf',
  375. 'Metallic Uxie',
  376. 'Metallic Celebi',
  377. 'Metallic Darkrown',
  378. 'Metallic Darkrai',
  379.  
  380.  
  381. // Electric
  382. 'Zapdos',
  383. 'Raikou',
  384. 'Jirachi',
  385. 'Darkrai',
  386. 'Darkrown',
  387. 'Thundurus',
  388. 'Zekrom',
  389. 'Genesect',
  390. 'Shiny Zapdos',
  391. 'Shiny Raikou',
  392. 'Shiny Jirachi',
  393. 'Shiny Darkrai',
  394. 'Shiny Darkrown',
  395. 'Shiny Thundurus',
  396. 'Shiny Zekrom',
  397. 'Shiny Genesect',
  398. 'Dark Zapdos',
  399. 'Dark Raikou',
  400. 'Dark Jirachi',
  401. 'Dark Darkrai',
  402. 'Dark Darkrown',
  403. 'Dark Thundurus',
  404. 'Dark Zekrom',
  405. 'Dark Genesect',
  406. 'Mystic Zapdos',
  407. 'Mystic Raikou',
  408. 'Mystic Jirachi',
  409. 'Mystic Darkrai',
  410. 'Mystic Darkrown',
  411. 'Mystic Thundurus',
  412. 'Mystic Zekrom',
  413. 'Mystic Genesect',
  414. 'Shadow Zapdos',
  415. 'Shadow Raikou',
  416. 'Shadow Jirachi',
  417. 'Shadow Darkrai',
  418. 'Shadow Darkrown',
  419. 'Shadow Thundurus',
  420. 'Shadow Zekrom',
  421. 'Shadow Genesect',
  422. 'Metallic Zapdos',
  423. 'Metallic Raikou',
  424. 'Metallic Jirachi',
  425. 'Metallic Darkrai',
  426. 'Metallic Darkrown',
  427. 'Metallic Thundurus',
  428. 'Metallic Zekrom',
  429. 'Metallic Genesect',
  430.  
  431. // Fire
  432. 'Heatran','Shiny Heatran','Dark Heatran','Shadow Heatran','Metallic Heatran','Mystic Heatran',
  433. 'Ho-oh','Shiny Ho-oh','Dark Ho-oh','Shadow Ho-oh','Metallic Ho-oh','Mystic Ho-oh',
  434. 'Moltres','Shiny Moltres','Dark Moltres','Shadow Moltres','Metallic Moltres','Mystic Moltres',
  435. 'Entei','Shiny Entei','Dark Entei','Shadow Entei','Metallic Entei','Mystic Entei',
  436. 'Reshiram','Shiny Reshiram','Dark Reshiram','Shadow Reshiram','Metallic Reshiram','Mystic Reshiram',
  437. 'Victini','Shiny Victini','Dark Victini','Shadow Victini','Metallic Victini','Mystic Vitctini',
  438. ];
  439. //the pokemon you want to be alerted of
  440. //make sure you get the right spelling
  441. //TIP: You can also use the above setting as
  442. //a general keyword searcher in the pokemon you see
  443. //e.g. "shiny", "dark"
  444.  
  445. var levelsToFind = ["9"]; //The specific levels you want to be alerted for
  446. //keep this a string array
  447.  
  448. var levelsAndUpToFind = 50; //level and up to alert about pokemon
  449. //dont make this a string or array
  450.  
  451. var scanFreq = 75; //time to wait between every time the script checks if you saw what you wanted (in milliseconds)
  452.  
  453. var isDoneLoadingFreq = 350; //time to wait between checking if looking for pokemon has finished loading (in milli)
  454. //dont make this too low (keep it how it is, it works fine) unless you have very super speedy internet
  455. //THE LOWER THIS IS THE HIGHER CHANCE YOU HAVE OF LOSING A LEGEND
  456.  
  457. /**********FIGHTING SETTINGS**********/
  458. var battle = "/wildbattle.php";
  459. //change this to your battle url, but make sure you remove everything up to the /battle.php?jglasd=dfjklgdfj
  460. //Even though it does automatically :P
  461.  
  462. var firstPokemonPrefAtt = 0; // 0 = don't pick
  463. var seconPokemonPrefAtt = 0; // 0 = don't pick
  464. var thirdPokemonPrefAtt = 0; // 0 = don't pick
  465. var fourtPokemonPrefAtt = 0; // 0 = don't pick
  466. var fifthPokemonPrefAtt = 0; // 0 = don't pick
  467. var sixthPokemonPrefAtt = 0; // 0 = don't pick
  468.  
  469. var firstPokemonName = ""; // These names just need to be unique
  470. var seconPokemonName = ""; // Capitalization is ignored
  471. var thirdPokemonName = ""; // if empty it will be skipped
  472. var fourtPokemonName = ""; // if not found it will be skipped
  473. var fifthPokemonName = ""; // Make sure you spell right :p
  474. var sixthPokemonName = ""; //
  475. var attackFreq = 500; //time to wait between every click while fighting (in milliseconds)
  476.  
  477. /**********IGNORE EVERYTHING PAST THIS**********/
  478. var pokeNames = [firstPokemonName, seconPokemonName, thirdPokemonName, fourtPokemonName, fifthPokemonName, sixthPokemonName];
  479. var pokeAtts = [firstPokemonPrefAtt, seconPokemonPrefAtt, thirdPokemonPrefAtt, fourtPokemonPrefAtt, fifthPokemonPrefAtt, sixthPokemonPrefAtt];
  480. var battleUrl = ".pokemon-vortex.com/wildbattle.php";
  481. var findUrl = ".pokemon-vortex.com/map.php";
  482. var loginUrl = "www.pokemon-vortex.com/login.php";
  483. var dashboardUrl = ".pokemon-vortex.com/dashboard.php";
  484. var attTimes = 0;
  485. var moveTimes = 0;
  486.  
  487. if(battle.indexOf(".com")>-1){
  488. battle = battle.split(".com")[1];
  489. }
  490.  
  491. if (doBattle && window.location.href.indexOf(battleUrl) > -1) {
  492. function startBattle() {
  493. for(var d = 0; d < 6; d++)
  494. if(pokeAtts[d] !== 0 && $("h3:contains('Your')").text().toLowerCase().indexOf(pokeNames[d].toLowerCase()) > -1 && pokeNames[d] !== "")
  495. $("input#attack"+pokeAtts[d]).click();
  496.  
  497. if($("input[value*='Continue']").length)
  498. $("input[value*='Continue']").submit();
  499. if($("input[value*='Attack']").length)
  500. $("input[value*='Attack']").submit();
  501. if($("a:contains('Rebattle Opponent')").length)
  502. $("a:contains('Rebattle Opponent')").click();
  503. }
  504. if (window.location.href.indexOf(battle) >-1) {
  505. setInterval(function () {
  506. if($("#loading").css("visibility") == "hidden"){
  507. startBattle();
  508. attTimes = 0;
  509. }else{
  510. attTimes++;
  511. }
  512. if(times >= 100)
  513. location.reload(true);
  514.  
  515. }, attackFreq);
  516. } else {
  517. window.location.href = battle;
  518. }
  519. }else if ((findPokemon || findLevels || findLevelsAndUp) && window.location.href.indexOf(findUrl) > -1) {
  520. var a;
  521. var b;
  522. var finderOn = true;
  523. var whichMove = 1;
  524.  
  525. function fireKey(el, key) {
  526. //Set key to corresponding code. This one is set to the left arrow key.
  527. //37 = left, 38 = up, 39 = right, 40 = down;
  528. if (document.createEventObject) {
  529. var eventObj = document.createEventObject();
  530. eventObj.keyCode = key;
  531. el.fireEvent("onkeydown", eventObj);
  532. } else if (document.createEvent) {
  533. var eventObj = document.createEvent("Events");
  534. eventObj.initEvent("keydown", true, true);
  535. eventObj.which = key;
  536. el.dispatchEvent(eventObj);
  537. }
  538. }
  539.  
  540.  
  541. function found(thing){
  542. if($('#pkmnappear').first().html().toLowerCase().indexOf(thing.toLowerCase()) > -1){
  543. alert("Found Something");
  544. finderOn = true;
  545. clearInterval(a);
  546. if(autoWalkFind){
  547. clearInterval(b);
  548. }
  549. return true;
  550. }else{
  551. return false;
  552. }
  553. }
  554.  
  555. function setFinder(){
  556. finderOn = true;
  557.  
  558. if(autoWalkFind){
  559. b = setInterval(function(){
  560. var isLoading = $("#pkmnappear").text().indexOf("Please wait") > -1;
  561. if(!isLoading){
  562. switch(whichMove){
  563. case 1:
  564. fireKey(document,37);
  565. whichMove = 2;
  566. break;
  567. case 2:
  568. fireKey(document,38);
  569. whichMove = 3;
  570. break;
  571. case 3:
  572. fireKey(document,39);
  573. whichMove = 4;
  574. break;
  575. case 4:
  576. fireKey(document,40);
  577. whichMove = 1;
  578. break;
  579. }
  580. moveTimes=0;
  581. }else{
  582. moveTimes++;
  583. }
  584. if(moveTimes >= 100)
  585. location.reload(true);
  586. },isDoneLoadingFreq);
  587. }
  588.  
  589. a = setInterval(function () {
  590. if(findPokemon)
  591. for (var i = 0; i < pokemonToFind.length; i++)
  592. found(pokemonToFind[i]);
  593.  
  594. if(findLevels)
  595. for (var i = 0; i < levelsToFind.length; i++)
  596. found("Level: " + levelsToFind[i] + " ");
  597.  
  598. if(findLevelsAndUp)
  599. for(var l = levelsAndUpToFind; l<101;l++)
  600. if (found("Level: " + l + " "))
  601. break;
  602.  
  603. }, scanFreq);
  604. }
  605.  
  606. setFinder();
  607. $(document).keydown(function(event) {
  608. switch (event.keyCode) {
  609. case 37: case 38: case 39: case 40: case 87: case 65: case 83: case 68: if(!finderOn)setFinder();
  610. break;
  611. }
  612. });
  613.  
  614. }else if(autoLogin && window.location.href.indexOf(loginUrl) > -1){
  615. $("#myusername").val(username);
  616. $("#mypassword").val(password);
  617. $("input[value*='Log in']").click();
  618. $("input[value*='Log in']").submit();
  619. }else if(forceBattle && window.location.href.indexOf(dashboardUrl) > -1){
  620. window.location.href = battle;
  621. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement