SHARE
TWEET

Untitled

a guest Dec 13th, 2016 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 mewtwo',
  33.     'Mystic mew',
  34.  
  35.     //Gen 6 Legends
  36.      'Xerneas','Shiny Xerneas','Dark Xerneas','Shadow Xernias','Metallic Xerneas','Mystic Xerneas',
  37.      'Yveltal','Shiny Yveltal','Dark Yveltal','Shadow Yveltal','Metallic Yveltal','Mystic Yveltal',
  38.      '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.     'Ancient Shaymin (Sky)',
  94.     'Ancient Celebi',
  95.     'Ancient Latios',
  96.     'Ancient Latias',
  97.     'Ancient Rayquaza',
  98.     'Ancient Shaymin',
  99.     'Ancient Mew',
  100.     'Ancient Cresselia',
  101.     'Ancient Azelf',
  102.     'Ancient Uxie',
  103.     'Ancient Mesprit',
  104.     'Ancient Virizion',
  105.     'Ancient Genesect',
  106.  
  107.  
  108.  
  109.     // Grass (water)
  110.     'Manaphy',
  111.     'Phione',
  112.     'Suicune',
  113.     'Keldeo',
  114.  
  115.     // Ice
  116.     'Articuno',
  117.     'Suicune',
  118.     'Lugia',
  119.     'Regice',
  120.     'Kyurem',
  121.     'Mystic Articuno',
  122.     'Mystic Suicune',
  123.     'Mystic Lugia',
  124.     'Mystic Regice',
  125.     'Mystic Kyurem',
  126.     'Shiny Articuno',
  127.     'Shiny Suicune',
  128.     'Shiny Lugia',
  129.     'Shiny Regice',
  130.     'Shiny Kyurem',
  131.     'Dark Articuno',
  132.     'Dark Suicune',
  133.     'Dark Lugia',
  134.     'Dark Regice',
  135.     'Dark Kyurem',
  136.     'Ancient Articuno',
  137.     'Ancient Suicune',
  138.     'Ancient Lugia',
  139.     'Ancient Regice',
  140.     'Ancient Kyurem',
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.     // Cave (land)
  148.     'Groudon',
  149.     'Arceus',
  150.     'Regigigas',
  151.     'Palkia',
  152.     'Dialga',
  153.     'Deoxys',
  154.     'Jirachi',
  155.     'Registeel',
  156.     'Regirock',
  157.     'Mewtwo',
  158.     'Cobalion',
  159.     'Terrakion',
  160.     'Virizion',
  161.     'Reshiram',
  162.     'Zekrom',
  163.     'Kyurem',
  164.     'Genesect',
  165.     'Tornadus',
  166.     'Landorus',
  167.     'Mystic Groudon',
  168.     'Mystic Arceus',
  169.     'Mystic Regigigas',
  170.     'Mystic Palkia',
  171.     'Mystic Dialga',
  172.     'Mystic Deoxys',
  173.     'Mystic Jirachi',
  174.     'Mystic Registeel',
  175.     'Mystic Regirock',
  176.     'Mystic Mewtwo',
  177.     'Mystic Cobalion',
  178.     'Mystic Terrakion',
  179.     'Mystic Virizion',
  180.     'Mystic Reshiram',
  181.     'Mystic Zekrom',
  182.     'Mystic Kyurem',
  183.     'Mystic Genesect',
  184.     'Mystic Tornadus',
  185.     'Mystic Landorus',
  186.     'Shiny Groudon',
  187.     'Shiny Arceus',
  188.     'Shiny Regigigas',
  189.     'Shiny Palkia',
  190.     'Shiny Dialga',
  191.     'Shiny Deoxys',
  192.     'Shiny Jirachi',
  193.     'Shiny Registeel',
  194.     'Shiny Regirock',
  195.     'Shiny Mewtwo',
  196.     'Shiny Cobalion',
  197.     'Shiny Terrakion',
  198.     'Shiny Virizion',
  199.     'Shiny Reshiram',
  200.     'Shiny Zekrom',
  201.     'Shiny Kyurem',
  202.     'Shiny Genesect',
  203.     'Shiny Tornadus',
  204.     'Shiny Landorus',
  205.     'Dark Groudon',
  206.     'Dark Arceus',
  207.     'Dark Regigigas',
  208.     'Dark Palkia',
  209.     'Dark Dialga',
  210.     'Dark Deoxys',
  211.     'Dark Jirachi',
  212.     'Dark Registeel',
  213.     'Dark Regirock',
  214.     'Dark Mewtwo',
  215.     'Dark Cobalion',
  216.     'Dark Terrakion',
  217.     'Dark Virizion',
  218.     'Dark Reshiram',
  219.     'Dark Zekrom',
  220.     'Dark Kyurem',
  221.     'Dark Genesect',
  222.     'Dark Tornadus',
  223.     'Dark Landorus',
  224.  
  225.  
  226.     // Cave (water)
  227.     'Kyogre',
  228.     'Lugia',
  229.     'Keldeo',
  230.  
  231.     // Ghost
  232.     'Mew',
  233.     'Giratina',
  234.     'Rotom',
  235.     'Mesprit',
  236.     'Azelf',
  237.     'Uxie',
  238.     'Celebi',
  239.     'Darkrown',
  240.     'Darkrai',
  241.     'Shiny Mew',
  242.     'Shiny Giratina',
  243.     'Shiny Rotom',
  244.     'Shiny Mesprit',
  245.     'Shiny Azelf',
  246.     'Shiny Uxie',
  247.     'Shiny Celebi',
  248.     'Shiny Darkrown',
  249.     'Shiny Darkrai',
  250.     'Dark Mew',
  251.     'Dark Giratina',
  252.     'Dark Rotom',
  253.     'Dark Mesprit',
  254.     'Dark Azelf',
  255.     'Dark Uxie',
  256.     'Dark Celebi',
  257.     'Dark Darkrown',
  258.     'Dark Darkrai',
  259.     'Mystic Mew',
  260.     'Mystic Giratina',
  261.     'Mystic Rotom',
  262.     'Mystic Mesprit',
  263.     'Mystic Azelf',
  264.     'Mystic Uxie',
  265.     'Mystic Celebi',
  266.     'Mystic Darkrown',
  267.     'Mystic Darkrai',
  268.     'Ancient Mew',
  269.     'Ancient Giratina',
  270.     'Ancient Rotom',
  271.     'Ancient Mesprit',
  272.     'Ancient Azelf',
  273.     'Ancient Uxie',
  274.     'Ancient Celebi',
  275.     'Ancient Darkrown',
  276.     'Ancient Darkrai',
  277.  
  278.     // Electric
  279.     'Zapdos',
  280.     'Raikou',
  281.     'Jirachi',
  282.     'Darkrai',
  283.     'Darkrown',
  284.     'Thundurus',
  285.     'Zekrom',
  286.     'Genesect',
  287.  
  288.     // Fire
  289.     'Heatran',
  290.     'Shiny Heatran','Dark Heatran','Shadow Heatran','Metallic Heatran','Mystic Heatran',
  291.     'Ho-oh','Shiny Ho-oh','Dark Ho-oh','Shadow Ho-oh','Metallic Ho-oh','Mystic Ho-oh',
  292.     'Moltres','Shiny Moltres','Dark Moltres','Shadow Moltres','Metallic Moltres','Mystic Moltres',
  293.     'Entei','Shiny Entei','Dark Entei','Shadow Entei','Metallic Entei','Mystic Entei',
  294.     'Reshiram','Shiny Reshiram',
  295.     'Victini','Shiny Victini','Dark Victini','Shadow Victini','Metallic Victini','Mystic Vitctini',
  296. ];
  297. //the pokemon you want to be alerted of
  298. //make sure you get the right spelling
  299. //TIP: You can also use the above setting as
  300. //a general keyword searcher in the pokemon you see
  301. //e.g. "shiny", "dark"
  302.  
  303. var levelsToFind = ["9"]; //The specific levels you want to be alerted for
  304. //keep this a string array
  305.  
  306. var levelsAndUpToFind = 50; //level and up to alert about pokemon
  307. //dont make this a string or array
  308.  
  309. var scanFreq = 75; //time to wait between every time the script checks if you saw what you wanted (in milliseconds)
  310.  
  311. var isDoneLoadingFreq = 350; //time to wait between checking if looking for pokemon has finished loading (in milli)
  312. //dont make this too low (keep it how it is, it works fine) unless you have very super speedy internet
  313. //THE LOWER THIS IS THE HIGHER CHANCE YOU HAVE OF LOSING A LEGEND
  314.  
  315. /**********FIGHTING SETTINGS**********/
  316. var battle = "/wildbattle.php";
  317. //change this to your battle url, but make sure you remove everything up to the /battle.php?jglasd=dfjklgdfj
  318. //Even though it does automatically :P
  319.  
  320. var firstPokemonPrefAtt = 0; // 0 = don't pick
  321. var seconPokemonPrefAtt = 0; // 0 = don't pick
  322. var thirdPokemonPrefAtt = 0; // 0 = don't pick
  323. var fourtPokemonPrefAtt = 0; // 0 = don't pick
  324. var fifthPokemonPrefAtt = 0; // 0 = don't pick
  325. var sixthPokemonPrefAtt = 0; // 0 = don't pick
  326.  
  327. var firstPokemonName = ""; // These names just need to be unique
  328. var seconPokemonName = ""; // Capitalization is ignored
  329. var thirdPokemonName = ""; // if empty it will be skipped
  330. var fourtPokemonName = ""; // if not found it will be skipped
  331. var fifthPokemonName = ""; // Make sure you spell right :p
  332. var sixthPokemonName = ""; //
  333. var attackFreq = 500; //time to wait between every click while fighting (in milliseconds)
  334.  
  335. /**********IGNORE EVERYTHING PAST THIS**********/
  336. var pokeNames = [firstPokemonName, seconPokemonName, thirdPokemonName, fourtPokemonName, fifthPokemonName, sixthPokemonName];
  337. var pokeAtts  = [firstPokemonPrefAtt, seconPokemonPrefAtt, thirdPokemonPrefAtt, fourtPokemonPrefAtt, fifthPokemonPrefAtt, sixthPokemonPrefAtt];
  338. var battleUrl    = ".pokemon-vortex.com/wildbattle.php";
  339. var findUrl      = ".pokemon-vortex.com/map.php";
  340. var loginUrl     = "www.pokemon-vortex.com/login.php";
  341. var dashboardUrl = ".pokemon-vortex.com/dashboard.php";
  342. var attTimes = 0;
  343. var moveTimes = 0;
  344.  
  345. if(battle.indexOf(".com")>-1){
  346.     battle = battle.split(".com")[1];
  347. }
  348.  
  349. if (doBattle && window.location.href.indexOf(battleUrl) > -1) {
  350.     function startBattle() {
  351.         for(var d = 0; d < 6; d++)
  352.             if(pokeAtts[d] !== 0 && $("h3:contains('Your')").text().toLowerCase().indexOf(pokeNames[d].toLowerCase()) > -1 && pokeNames[d] !== "")
  353.                 $("input#attack"+pokeAtts[d]).click();
  354.  
  355.         if($("input[value*='Continue']").length)
  356.             $("input[value*='Continue']").submit();
  357.         if($("input[value*='Attack']").length)
  358.             $("input[value*='Attack']").submit();
  359.         if($("a:contains('Rebattle Opponent')").length)
  360.             $("a:contains('Rebattle Opponent')").click();
  361.     }
  362.     if (window.location.href.indexOf(battle) >-1) {
  363.         setInterval(function () {
  364.             if($("#loading").css("visibility") == "hidden"){
  365.                 startBattle();
  366.                 attTimes = 0;
  367.             }else{
  368.                 attTimes++;
  369.             }
  370.             if(times >= 100)
  371.                 location.reload(true);
  372.  
  373.         }, attackFreq);
  374.     } else {
  375.         window.location.href = battle;
  376.     }
  377. }else if ((findPokemon || findLevels || findLevelsAndUp) && window.location.href.indexOf(findUrl) > -1) {
  378.     var a;
  379.     var b;
  380.     var finderOn = true;
  381.     var whichMove = 1;
  382.  
  383.     function fireKey(el, key) {
  384.         //Set key to corresponding code. This one is set to the left arrow key.
  385.         //37 = left, 38 = up, 39 = right, 40 = down;
  386.         if (document.createEventObject) {
  387.             var eventObj = document.createEventObject();
  388.             eventObj.keyCode = key;
  389.             el.fireEvent("onkeydown", eventObj);
  390.         } else if (document.createEvent) {
  391.             var eventObj = document.createEvent("Events");
  392.             eventObj.initEvent("keydown", true, true);
  393.             eventObj.which = key;
  394.             el.dispatchEvent(eventObj);
  395.         }
  396.     }
  397.  
  398.  
  399.     function found(thing){
  400.         if($('#pkmnappear').first().html().toLowerCase().indexOf(thing.toLowerCase()) > -1){
  401.             alert("Found Something");
  402.             finderOn = true;
  403.             clearInterval(a);
  404.             if(autoWalkFind){
  405.                 clearInterval(b);
  406.             }
  407.             return true;
  408.         }else{
  409.             return false;
  410.         }
  411.     }
  412.  
  413.     function setFinder(){
  414.         finderOn = true;
  415.  
  416.         if(autoWalkFind){
  417.             b = setInterval(function(){
  418.                 var isLoading = $("#pkmnappear").text().indexOf("Please wait") > -1;
  419.                 if(!isLoading){
  420.                     switch(whichMove){
  421.                         case 1:
  422.                             fireKey(document,37);
  423.                             whichMove = 2;
  424.                             break;
  425.                         case 2:
  426.                             fireKey(document,38);
  427.                             whichMove = 3;
  428.                             break;
  429.                         case 3:
  430.                             fireKey(document,39);
  431.                             whichMove = 4;
  432.                             break;
  433.                         case 4:
  434.                             fireKey(document,40);
  435.                             whichMove = 1;
  436.                             break;
  437.                     }
  438.                     moveTimes=0;
  439.                 }else{
  440.                     moveTimes++;
  441.                 }
  442.                 if(moveTimes >= 100)
  443.                     location.reload(true);
  444.             },isDoneLoadingFreq);
  445.         }
  446.  
  447.         a = setInterval(function () {
  448.             if(findPokemon)
  449.                 for (var i = 0; i < pokemonToFind.length; i++)
  450.                     found(pokemonToFind[i]);
  451.  
  452.             if(findLevels)
  453.                 for (var i = 0; i < levelsToFind.length; i++)
  454.                     found("Level: " + levelsToFind[i] + " ");
  455.  
  456.             if(findLevelsAndUp)
  457.                 for(var l = levelsAndUpToFind; l<101;l++)
  458.                     if (found("Level: " + l + " "))
  459.                         break;
  460.  
  461.         }, scanFreq);
  462.     }
  463.  
  464.     setFinder();
  465.     $(document).keydown(function(event) {
  466.         switch (event.keyCode) {
  467.             case 37: case 38: case 39: case 40: case 87: case 65: case 83: case 68: if(!finderOn)setFinder();
  468.                 break;
  469.         }
  470.     });
  471.  
  472. }else if(autoLogin && window.location.href.indexOf(loginUrl) > -1){
  473.     $("#myusername").val(username);
  474.     $("#mypassword").val(password);
  475.     $("input[value*='Log in']").click();
  476.     $("input[value*='Log in']").submit();
  477. }else if(forceBattle && window.location.href.indexOf(dashboardUrl) > -1){
  478.     window.location.href = battle;
  479. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top