CameronFitzy

Pokemon Test M

Oct 26th, 2021 (edited)
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Catch=Query[0].split(`|`)[1].split(`/`);
  2. Stats=Query[0].split(`|`)[0].split(`,`)[1].split(`%20`);
  3. Lvl=Stats[1];
  4. Xp=Stats[2];
  5. Pb=Stats[3];
  6. Money=Stats[4];
  7. Pcatch=Catch[Catch.length-1];
  8. MoneyExtra=Query[2];
  9. XpExtra=Query[3];
  10. Message=Query[4];
  11. MessageSub=Query[5];
  12. MessageSSub=Query[6];
  13. Output="If you see this please contact me via discord PotatoAteHer#0007 or the nightdev forums.";
  14. List="";
  15. Count=0;
  16. Error=a.split(" ");
  17.  
  18. PL=`Bulbasaur|Ivysaur|Venusaur|Charmander|Charmeleon|Charizard|Squirtle|Wartortle|Blastoise|Caterpie|Metapod|Butterfree|Weedle|Kakuna|Beedrill|Pidgey|Pidgeotto|Pidgeot|Rattata|Raticate|Spearow|Fearow|Ekans|Arbok|Pikachu|Raichu|Sandshrew|Sandslash|Nidoran=Female|Nidorina|Nidoqueen|Nidoran=Male|Nidorino|Nidoking|Clefairy|Clefable|Vulpix|Ninetales|Jigglypuff|Wigglytuff|Zubat|Golbat|Oddish|Gloom|Vileplume|Paras|Parasect|Venonat|Venomoth|Diglett|Dugtrio|Meowth|Persian|Psyduck|Golduck|Mankey|Primeape|Growlithe|Arcanine|Poliwag|Poliwhirl|Poliwrath|Abra|Kadabra|Alakazam|Machop|Machoke|Machamp|Bellsprout|Weepinbell|Victreebel|Tentacool|Tentacruel|Geodude|Graveler|Golem|Ponyta|Rapidash|Slowpoke|Slowbro|Magnemite|Magneton|Farfetch'd|Doduo|Dodrio|Seel|Dewgong|Grimer|Muk|Shellder|Cloyster|Gastly|Haunter|Gengar|Onix|Drowzee|Hypno|Krabby|Kingler|Voltorb|Electrode|Exeggcute|Exeggutor|Cubone|Marowak|Hitmonlee|Hitmonchan|Lickitung|Koffing|Weezing|Rhyhorn|Rhydon|Chansey|Tangela|Kangaskhan|Horsea|Seadra|Goldeen|Seaking|Staryu|Starmie|Mr.=Mime|Scyther|Jynx|Electabuzz|Magmar|Pinsir|Tauros|Magikarp|Gyarados|Lapras|Ditto|Eevee|Vaporeon|Jolteon|Flareon|Porygon|Omanyte|Omastar|Kabuto|Kabutops|Aerodactyl|Snorlax|Articuno|Zapdos|Moltres|Dratini|Dragonair|Dragonite|Mewtwo|Mew|Chikorita|Bayleef|Meganium|Cyndaquil|Quilava|Typhlosion|Totodile|Croconaw|Feraligatr|Sentret|Furret|Hoothoot|Noctowl|Ledyba|Ledian|Spinarak|Ariados|Crobat|Chinchou|Lanturn|Pichu|Cleffa|Igglybuff|Togepi|Togetic|Natu|Xatu|Mareep|Flaaffy|Ampharos|Bellossom|Marill|Azumarill|Sudowoodo|Politoed|Hoppip|Skiploom|Jumpluff|Aipom|Sunkern|Sunflora|Yanma|Wooper|Quagsire|Espeon|Umbreon|Murkrow|Slowking|Misdreavus|Unown|Wobbuffet|Girafarig|Pineco|Forretress|Dunsparce|Gligar|Steelix|Snubbull|Qwilfish|Scizor|Shuckle|Heracross|Sneasel|Teddiursa|Ursaring|Slugma|Magcargo|Swinub|Piloswine|Corsola|Remoraid|Octillery|Delibird|Mantine|Skarmory|Houndour|Houndoom|Kingdra|Phanpy|Donphan|Porygon2|Stantler|Smeargle|Tyrogue|Hitmontop|Smoochum|Elekid|Magby|Miltank|Blissey|Raikou|Entei|Suicune|Larvitar|Pupitar|Tyranitar|Lugia|Ho-Oh|Celebi`.split(`|`);
  19.  
  20. PersonalListSub1=Data.filter(x=>x==user+x.slice(user.length));
  21. PersonalListSub2=PersonalListSub1.filter(x=>x!=x.slice(0,x.length-4)+"Nope");
  22. PersonalList=PersonalListSub2.filter(x=>x!=x.slice(0,x.length-4)+"null");
  23.  
  24. if(MessageSub=="Lvl")
  25. {Extra="You Leveled UP to Level "+Lvl+"!"}
  26. else
  27. {Extra=""};
  28.  
  29. if(Message=="Catch"&&Pcatch!="")
  30. {Output="@"+user+" caught a wild "+Pcatch.replace(/=/g,` `)+" gaining "+XpExtra+" Xp and "+MoneyExtra+" Pokédollars! "+Extra+" You have "+Pb+" Pokéballs left."}
  31. else
  32. if(Message=="Catch"&&Pcatch=="")
  33. {Output="Uh Oh, @"+user+" you missed the Pokémon and lost a Pokéball. "+Extra+" You have "+Pb+" Pokéballs left."};
  34.  
  35. if(Message=="Out")
  36. {Output="@"+user+" you are all out of Pokéballs buy more with “Buy (Amount)” after the command."};
  37.  
  38. if(Message=="Info")
  39. {Output="@"+user+" possible arguments are: (Catch, Help, Stats, Buy, Inventory, Inven, Pokemon, Pokémon)"};
  40.  
  41. if(Message=="Stats")
  42. {if(Lvl!="100")
  43. {Output="@"+user+" you are level "+Lvl+" with "+Xp+" Xp."}
  44. else
  45. {Output="@"+user+" you are level 100 congratulations!!!"}};
  46.  
  47. if(Message=="BuyHelp")
  48. {Output="@"+user+" please only put the number of Pokéballs you wish to buy after Buy or “max”. They cost 250 Pokédollars each"};
  49.  
  50. if(Message=="Buy")
  51. {Output="@"+user+" you bought "+MessageSub+" Pokéballs for "+Math.floor(parseInt(MessageSub)*250)+" Pokédollars. You have "+Pb+" Pokéballs now."};
  52.  
  53. if(Message=="TooPoor")
  54. {Output="@"+user+" you can’t afford "+MessageSub+" Pokéballs. You can only afford "+Math.floor(parseInt(Money)/250)+" with your "+Money+" Pokédollars."};
  55.  
  56. if(Message=="Inventory")
  57. {Output="@"+user+" you have "+Money+" Pokédollars and "+Pb+" Pokéballs."};
  58.  
  59. PokemonAmount=0;
  60. PokemonList=``;
  61.  
  62. if(Message=="List"&&parseInt(MessageSub)==Math.floor(parseInt(MessageSub)+0))
  63. {for(y=0;y<PersonalList.length;y++)
  64. {PokemonTemp=PersonalList[y].split(`|`)[1].split(`/`);
  65. PokemonList+=`/`+PersonalList[y].split(`|`)[1];
  66. if(PokemonTemp[0]==``)
  67. {PokemonAmount+=PokemonTemp.length-1}
  68. else
  69. {PokemonAmount+=PokemonTemp.length}};
  70. if(PokemonAmount>20&&parseInt(MessageSub)*20>=PokemonAmount)
  71. {Count2=PokemonAmount%20}
  72. else if(PokemonAmount<20&&parseInt(MessageSub)*20<PokemonAmount+20)
  73. {Count2=PokemonAmount}
  74. else if(PokemonAmount>20&&parseInt(MessageSub)*20<=PokemonAmount)
  75. {Count2=20}
  76. else if(PokemonAmount<20&&parseInt(MessageSub)*20>=PokemonAmount+20)
  77. {Count2=PokemonAmount};
  78. List=PokemonList.replace(/=/g,` `).split(`/`).slice((parseInt(MessageSub)-1)*20+1,parseInt(MessageSub)*20+1);
  79. Page=Math.ceil(PokemonAmount/20);
  80. if(PokemonAmount==0)
  81. {Output="@"+user+" you have no Pokémon :/"}
  82. else if(Math.floor(parseInt(MessageSub)*20)>=PokemonAmount+20)
  83. {Output="@"+user+" you only have "+Page+" pages of Pokémon. Please choose a lower number"}
  84. else
  85. {Output=`${List.join(`, `)} || ${(MessageSub-1)*20+1}-${MessageSub*20>PokemonAmount?PokemonAmount:MessageSub*20}/${PokemonAmount} Page:${MessageSub}/${Page}`}}
  86. else if(Message=="List"&&MessageSub==`shiny`&&parseInt(MessageSSub)==Math.floor(parseInt(MessageSSub)+0))
  87. {for(z=0;z<PersonalList.length;z++)
  88. {PokemonTemp=PersonalList[z].split(`|`)[1].split(`/`);
  89. PokemonTemp2=PokemonTemp.filter(x=>x==x.slice(0,x.length-7)+"(Shiny)");
  90. if(PokemonTemp2.length!=0)
  91. {PokemonList+=","+PokemonTemp2}
  92. else
  93. {PokemonList=PokemonList};
  94. PokemonAmount+=PokemonTemp2.length};
  95. List=PokemonList.replace(/=/g,` `).split(`,`).slice((parseInt(MessageSSub)-1)*10+1,parseInt(MessageSSub)*10+1);
  96. if(PokemonAmount>10&&parseInt(MessageSSub)*10>=PokemonAmount)
  97. {Count2=PokemonAmount%10}
  98. else if(PokemonAmount<10&&parseInt(MessageSSub)*10<PokemonAmount+10)
  99. {Count2=PokemonAmount}
  100. else if(PokemonAmount>10&&parseInt(MessageSSub)*10<=PokemonAmount)
  101. {Count2=10}
  102. else if(PokemonAmount<10&&parseInt(MessageSSub)*10>=PokemonAmount+10)
  103. {Count2=PokemonAmount};
  104. Page=Math.ceil(PokemonAmount/10);
  105. if(PokemonAmount==0)
  106. {Output="@"+user+" you have no Shiny Pokémon :/"}
  107. else if(Math.floor(parseInt(MessageSSub)*10)>=PokemonAmount+10)
  108. {Output="@"+user+" you only have "+Page+" pages of Shiny Pokémon. Please choose a lower number"}
  109. else
  110. {Output=`${List.join(`, `)} || ${(MessageSSub-1)*10+1}-${MessageSSub*10>PokemonAmount?PokemonAmount:MessageSSub*10}/${PokemonAmount} Page:${MessageSSub}/${Page}`}}
  111. else if(Message=="List"&&parseInt(MessageSub)!=Math.floor(parseInt(MessageSub)+0)&&MessageSub!=`shiny`)
  112. {Output="Please only put numbers in the second input."}
  113. else if (Message=="List"&&parseInt(MessageSSub)!=Math.floor(parseInt(MessageSSub)+0)&&MessageSub!=`shiny`)
  114. {Output="Please only put numbers in the third input."};
  115.  
  116. if(Message=="Error")
  117. {Output="Sorry, “"+MessageSub+"” is not a recognized argument. Please see Help."};
  118.  
  119. if(Message=="TooMuch")
  120. {Output="@"+user+" please only fill the first two fields of the message."};
  121.  
  122. if(Message=="null")
  123. {Output="There was an error with the command"}
  124.  
  125. if(parseInt(Lvl)!=Math.floor(parseInt(Lvl)+0)||parseInt(Xp)!=Math.floor(parseInt(Xp)+0)||parseInt(Money)!=Math.floor(parseInt(Money)+0)||parseInt(Pb)!=Math.floor(parseInt(Pb)+0)||parseInt(MoneyExtra)!=Math.floor(parseInt(MoneyExtra)+0)||parseInt(XpExtra)!=Math.floor(parseInt(XpExtra)+0))
  126. {if(parseInt(Error[3])==parseInt(Error[3])+0)
  127. {Output="There was an error with request "+Error[3]+" please ask a moderator to type “!PDelete "+Error[3].slice(1)+"” before using the command again"}
  128. else
  129. if(parseInt(Error[3].slice(1))!=parseInt(Error[3].slice(1))+0)
  130. {Output="Please try again. If this continues to occur please contact PotatoAteHer#0007 via discord or the nightdev forums."}};
  131.  
  132. if(Message=="Bad!!!")
  133. {Output="Well you done screwed up now Potato has taken away your !p catch access. Feel free to message an appeal to PotatoAteHer#0007 on discord <3 best wishes :p"};
  134.  
  135. Output
Add Comment
Please, Sign In to add comment