CameronFitzy

Pokémon Message New

Nov 9th, 2020 (edited)
6,687
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. PDC=0;
  16. Error=a.split(` `);
  17.  
  18. if(typeof Limit === 'undefined')
  19. {Limit=[20,15,15]}
  20. else
  21. {if(Limit.length!=3)
  22. {Limit=[20,10,15]}};
  23. if(Limit[0]>=5)
  24. {if(!isNaN(Limit[0]))
  25. {k=Math.min(25,Limit[0])}
  26. else
  27. {k=20}}
  28. else
  29. {k=5};
  30. if(Limit[1]>=5)
  31. {if(!isNaN(Limit[1]))
  32. {l=Math.min(20,Limit[1])}
  33. else
  34. {l=15}}
  35. else
  36. {l=5};
  37. if(Limit[2]>=5)
  38. {if(!isNaN(Limit[0]))
  39. {m=Math.min(20,Limit[2])}
  40. else
  41. {m=15}}
  42. else
  43. {m=5};
  44.  
  45. 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`;
  46.  
  47. PLS=`DertyCharizard|RaccPacc|Potato`.split(`|`);
  48.  
  49. PersonalListSub1=Data.filter(x=>x==user+x.slice(user.length));
  50. PersonalListSub2=PersonalListSub1.filter(x=>x!=x.slice(0,x.length-4)+"Nope");
  51. PersonalList=PersonalListSub2.filter(x=>x!=x.slice(0,x.length-4)+"null");
  52.  
  53. if(MessageSub=="Lvl")
  54. {Extra="You Leveled UP to Level "+Lvl+"!"+` ${parseInt(Lvl)==100?`Congratulations check out !p Code`:``}`}
  55. else
  56. {Extra=""};
  57.  
  58. if(Message=="Catch"&&Pcatch!="")
  59. {Output="@"+user+" caught a wild "+`${Pcatch.includes(`(Shiny)`)?`✨${Pcatch.replace(/=/g,` `).replace(/(\(Shiny\))+/i,``)}✨`:Pcatch.replace(/=/g,` `)}`+" gaining "+XpExtra+" Xp and "+MoneyExtra+" Pokédollars! "+Extra+" You have "+Pb+" Pokéballs left."}
  60. else
  61. if(Message=="Catch"&&Pcatch=="")
  62. {Output="Uh Oh, @"+user+" you missed the Pokémon and lost a Pokéball. "+Extra+" You have "+Pb+" Pokéballs left."};
  63.  
  64. if(Message=="Out")
  65. {Output="@"+user+" you are all out of Pokéballs buy more with “Buy (Amount)” after the command."};
  66.  
  67. if(Message=="Info")
  68. {Output="@"+user+" possible arguments are: (Catch, Stats/Inventory, Buy [Max/Number], Pokemon [Shiny/Number], Dex [Rare/Number], Code)"};
  69.  
  70. GTemp1=``;
  71. GTemp2=``;
  72.  
  73. RL=`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``);
  74.  
  75. if(Message=="Stats")
  76. {if(Lvl!="100")
  77. {Output="@"+user+" you are level "+Lvl+" with "+Xp+" Xp. You have "+Money+" Pokédollars and "+Pb+" Pokéballs."}
  78. else
  79. {Output="@"+user+" you are level 100 congratulations!!! You have "+Money+" Pokédollars and "+Pb+" Pokéballs."}};
  80.  
  81. if(Message=="Code")
  82. {if(Lvl==100)
  83. {for(x=0;x<PersonalList.length;x++)
  84. {GTemp1+=`/`+PersonalList[x].split(`|`)[1];
  85. GTemp2+=`/`+PersonalList[x].split(`|`)[1].split(`/`).filter(x=>x.includes(`(Shiny)`)).join(`/`);
  86. GTemp4=PersonalList[x].split(`|`)[0].split(` `)[1]};
  87. U=0;
  88. I=user.split(``);
  89. for(x=0;x<I.length;x++)
  90. {U+=I[x].charCodeAt(0)*(x+1)};
  91. F=Math.floor(U/I.length)+Math.floor(U/I.length**2)*Math.floor(U/I.length);
  92. Gx1=GTemp1.split(`/`).filter(x=>x!=``).length;
  93. Gx2=GTemp2.split(`/`).filter(x=>x!=``).length;
  94. Gx3=PersonalList.length;
  95. Gx4=GTemp4;
  96. Code=``;
  97. CTemp1=`${Gx1}5${Gx2}5${Gx3}5${Gx4}`;
  98. C=0;
  99. for(x=0;x<CTemp1.length;x++)
  100. {C+=parseInt(CTemp1[x])};
  101. CT=`${parseInt(CTemp1)*C/(100+CTemp1.length*Math.floor(F*C/CTemp1.length))}`.replace(`.`,RL[F%52]).split(``);
  102. for(i=0;i<CT.length;i++)
  103. {if((i*CT.length+F)*Math.floor(F*C/(i+1*C))%3==0)
  104. {if(Math.floor(i*CT.length+(F/((i+1*C)+CT.length))*F)%2==0)
  105. {Code+=RL[parseInt(`${(i+1*C)*CT.length*parseInt(`1${CT[i]}`)*Math.floor(F/((i+1*C)*CTemp1.length+5))%52==F%52&&F%52!=51?F%52+1:(i+1*C)*CT.length*parseInt(`1${CT[i]}`)*Math.floor(F/((i+1*C)*CTemp1.length+5))%52==F%52&&F%52==51?0:(i+1*C)*CT.length*parseInt(`1${CT[i]}`)*Math.floor(F/((i+1*C)*CTemp1.length+5))%52}`)]+CT[i]}
  106. else
  107. {Code+=CT[i]+RL[parseInt(`${(i+1*C)*CT.length*parseInt(`1${CT[i]}`)*Math.floor(F/((i+1*C)*CTemp1.length+5))%52==F%52&&F%52!=51?F%52+1:(i+1*C)*CT.length*parseInt(`1${CT[i]}`)*Math.floor(F/((i+1*C)*CTemp1.length+5))%52==F%52&&F%52==51?0:(i+1*C)*CT.length*parseInt(`1${CT[i]}`)*Math.floor(F/((i+1*C)*CTemp1.length+5))%52}`)]}}
  108. else
  109. {Code+=CT[i]}};
  110. Output=`Dm me on discord PotatoAteHer#0007 to have your own Pokémon added. 4 slots available. Code: “${Code}”`}
  111. else
  112. {Output=`Use this when you’re lvl 100 ;)`}};
  113.  
  114. if(Message=="BuyHelp")
  115. {Output="@"+user+" please only put the number of Pokéballs you wish to buy after Buy or “max”. They cost 250 Pokédollars each"};
  116.  
  117. if(Message=="Buy")
  118. {Output="@"+user+" you bought "+MessageSub+" Pokéballs for "+Math.floor(parseInt(MessageSub)*250)+" Pokédollars. You have "+Pb+" Pokéballs now."};
  119.  
  120. if(Message=="TooPoor")
  121. {Output="@"+user+" you can’t afford "+MessageSub+" Pokéballs. You can only afford "+Math.floor(parseInt(Money)/250)+" with your "+Money+" Pokédollars."};
  122.  
  123. PokemonAmount=0;
  124. PokemonList=``;
  125. PDex=[];
  126. PDCS=0;
  127.  
  128. if(Message=="Dex"&&parseInt(MessageSub)==Math.floor(parseInt(MessageSub)+0)&&!MessageSub.includes(`.`))
  129. {PLC=PL.split(`|`);
  130. PPL=PL.toLowerCase().split(`|`);
  131. PLL=PL.toLowerCase().split(`|`).slice((parseInt(MessageSub)-1)*m,parseInt(MessageSub)*m+1);
  132. PLT=PLC.slice((parseInt(MessageSub)-1)*m,parseInt(MessageSub)*m+1);
  133. for(y=0;y<PersonalList.length;y++)
  134. {PokemonList+=`/`+PersonalList[y].split(`|`)[1].toLowerCase()};
  135. PLTT=PokemonList.split(`/`);
  136. for(i=0;i<m;i++)
  137. {if(PLTT.includes(PLL[i])||PLTT.includes(`${PLL[i]}(shiny)`))
  138. {if(PLTT.includes(`${PLL[i]}(shiny)`))
  139. {PDex.push(`✨${PLT[i].replace(`=`,` `)}✨(❎)`)}
  140. else
  141. {PDex.push(`${PLT[i].replace(`=`,` `)}(❎)`)}}
  142. else
  143. {if(PLT[i])
  144. {PDex.push(`${PLT[i].replace(`=`,` `)}`)}}};
  145. for(i=0;i<PPL.length;i++)
  146. {if(PLTT.includes(PPL[i])||PLTT.includes(`${PPL[i]}(shiny)`))
  147. {if(PLTT.includes(`${PPL[i]}(shiny)`))
  148. {PDCS++};
  149. PDC++}};
  150. if(parseInt(MessageSub)<=Math.ceil(PLC.length/m))
  151. {Output=`${PDex.join(`, `)} || ${(parseInt(MessageSub)-1)*m+1}-${PLC.length>=parseInt(MessageSub)*m?parseInt(MessageSub)*m:PLL.length}/${PLC.length} Page:${MessageSub}/${Math.ceil(PLC.length/m)} Total:${PDC}/${PLC.length} Shiny:${PDCS}/${PLC.length} (Only includes up to Gen 2)`}
  152. else
  153. {Output=`There is only ${Math.ceil(PLC.length/m)} pages in the PokéDex.`}}
  154. else if(Message=="Dex"&&MessageSub.match(/rare|special/gi))
  155. {PLT=PLS.slice(0,PLS.length);
  156. for(y=0;y<PersonalList.length;y++)
  157. {PokemonList+=`/`+PersonalList[y].split(`|`)[1]};
  158. PLTT=PokemonList.split(`/`);
  159. for(i=0;i<PLS.length;i++)
  160. {if(PLTT.includes(PLT[i])||PLTT.includes(`${PLT[i]}(Shiny)`))
  161. {if(PLTT.includes(`${PLT[i]}(Shiny)`))
  162. {PDex.push(`✨${PLT[i].replace(`=`,` `)}✨(❎)`)}
  163. else
  164. {PDex.push(`${PLT[i].replace(`=`,` `)}(❎)`)}}
  165. else
  166. {if(PLT[i])
  167. {PDex.push(`${PLT[i].replace(`=`,` `)}`)}}};
  168. for(i=0;i<PLS.length;i++)
  169. {if(PLTT.includes(PLS[i])||PLTT.includes(`${PLS[i]}(Shiny)`))
  170. {if(PLTT.includes(`${PLS[i]}(Shiny)`))
  171. {PDCS++};
  172. PDC++}};
  173. Output=`${PDex.join(`, `)} || Total:${PDC}/${PLS.length} Shiny:${PDCS}/${PLS.length}`}
  174. else if(Message=="Dex"&&(parseInt(MessageSub)!=Math.floor(parseInt(MessageSub)+0)||MessageSub.includes(`.`))&&MessageSub!=`special`)
  175. {Output="Please only put whole numbers or Special/Rare in the second input."};
  176.  
  177. if(Message=="List"&&parseInt(MessageSub)==Math.floor(parseInt(MessageSub)+0)&&!MessageSub.includes(`.`))
  178. {for(y=0;y<PersonalList.length;y++)
  179. {PokemonTemp=PersonalList[y].split(`|`)[1].split(`/`);
  180. PokemonList+=`/`+PersonalList[y].split(`|`)[1];
  181. if(PokemonTemp[0]==``)
  182. {PokemonAmount+=PokemonTemp.length-1}
  183. else
  184. {PokemonAmount+=PokemonTemp.length}};
  185. if(PokemonAmount>k&&parseInt(MessageSub)*k>=PokemonAmount)
  186. {Count2=PokemonAmount%k}
  187. else if(PokemonAmount<k&&parseInt(MessageSub)*k<PokemonAmount+k)
  188. {Count2=PokemonAmount}
  189. else if(PokemonAmount>k&&parseInt(MessageSub)*k<=PokemonAmount)
  190. {Count2=k}
  191. else if(PokemonAmount<k&&parseInt(MessageSub)*k>=PokemonAmount+k)
  192. {Count2=PokemonAmount};
  193. List=PokemonList.replace(/=/g,` `).split(`/`).map(x=>x.includes(`(Shiny)`)?`✨${x.replace(/(\(Shiny\))+/i,``)}✨`:x).slice((parseInt(MessageSub)-1)*k+1,parseInt(MessageSub)*k+1);
  194. Page=Math.ceil(PokemonAmount/k);
  195. if(PokemonAmount==0)
  196. {Output="@"+user+" you have no Pokémon :/"}
  197. else if(Math.floor(parseInt(MessageSub)*k)>=PokemonAmount+k)
  198. {Output="@"+user+" you only have "+Page+" pages of Pokémon. Please choose a lower number"}
  199. else
  200. {Output=`${List.join(`, `)} || ${(MessageSub-1)*k+1}-${MessageSub*k>PokemonAmount?PokemonAmount:MessageSub*k}/${PokemonAmount} Page:${MessageSub}/${Page}`}}
  201. else if(Message=="List"&&MessageSub==`shiny`&&parseInt(MessageSSub)==Math.floor(parseInt(MessageSSub)+0)&&!MessageSSub.includes(`.`))
  202. {for(z=0;z<PersonalList.length;z++)
  203. {PokemonTemp=PersonalList[z].split(`|`)[1].split(`/`);
  204. PokemonTemp2=PokemonTemp.filter(x=>x==x.slice(0,x.length-7)+"(Shiny)");
  205. if(PokemonTemp2.length!=0)
  206. {PokemonList+=","+PokemonTemp2}
  207. else
  208. {PokemonList=PokemonList};
  209. PokemonAmount+=PokemonTemp2.length};
  210. List=PokemonList.replace(/=/g,` `).split(`,`).map(x=>x.includes(`(Shiny)`)?`✨${x.replace(/(\(Shiny\))+/i,``)}✨`:x).slice((parseInt(MessageSSub)-1)*l+1,parseInt(MessageSSub)*l+1);
  211. if(PokemonAmount>l&&parseInt(MessageSSub)*l>=PokemonAmount)
  212. {Count2=PokemonAmount%l}
  213. else if(PokemonAmount<l&&parseInt(MessageSSub)*l<PokemonAmount+l)
  214. {Count2=PokemonAmount}
  215. else if(PokemonAmount>l&&parseInt(MessageSSub)*l<=PokemonAmount)
  216. {Count2=l}
  217. else if(PokemonAmount<l&&parseInt(MessageSSub)*l>=PokemonAmount+l)
  218. {Count2=PokemonAmount};
  219. Page=Math.ceil(PokemonAmount/l);
  220. if(PokemonAmount==0)
  221. {Output="@"+user+" you have no Shiny Pokémon :/"}
  222. else if(Math.floor(parseInt(MessageSSub)*l)>=PokemonAmount+l)
  223. {Output="@"+user+" you only have "+Page+" pages of Shiny Pokémon. Please choose a lower number"}
  224. else
  225. {Output=`${List.join(`, `)} || ${(MessageSSub-1)*l+1}-${MessageSSub*l>PokemonAmount?PokemonAmount:MessageSSub*l}/${PokemonAmount} Page:${MessageSSub}/${Page}`}}
  226. else if(Message=="List"&&(parseInt(MessageSub)!=Math.floor(parseInt(MessageSub)+0)||MessageSub.includes(`.`))&&MessageSub!=`shiny`)
  227. {Output="Please only put whole numbers or Shiny in the second input."}
  228. else if(Message=="List"&&(parseInt(MessageSSub)!=Math.floor(parseInt(MessageSSub)+0)||MessageSSub.includes(`.`))&&MessageSub==`shiny`)
  229. {Output="Please only put whole numbers in the third input."};
  230.  
  231. if(Message=="Error")
  232. {Output="Sorry, “"+MessageSub+"” is not a recognized argument. Please see Help."};
  233.  
  234. if(Message=="TooMuch")
  235. {Output="@"+user+" please only fill the first two fields of the message unless looking at your Shiny Pokémon."};
  236.  
  237. if(Message=="null")
  238. {Output="There was an error with the command"};
  239.  
  240. 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))
  241. {if(parseInt(Error[3])==parseInt(Error[3])+0)
  242. {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"}
  243. else
  244. if(parseInt(Error[3].slice(1))!=parseInt(Error[3].slice(1))+0)
  245. {Output="Please try again. If this continues to occur please contact PotatoAteHer#0007 via discord or the nightdev forums."}};
  246.  
  247. if(Message=="Bad!!!")
  248. {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"};
  249.  
  250. if(Message==`OVERRIDE`)
  251. {if(MessageSub==`TOKEN`)
  252. {Output=`Don’t worry it’s encrypted ;) ${MessageSSub}`}
  253. else
  254. {Output=Query.join(` `)}};
  255.  
  256. Output
Add Comment
Please, Sign In to add comment