CameronFitzy

Pokémon Message

Sep 3rd, 2020 (edited)
2,737
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Lvl=Query[1];
  2. Xp=Query[2];
  3. Pb=Query[3];
  4. Money=Query[4];
  5. Pcatch=Query[5];
  6. MoneyExtra=Query[6];
  7. XpExtra=Query[7];
  8. Message=Query[8];
  9. MessageSub=Query[9];
  10. Output="If you see this please contact me via twitch @potatoeaterlove";
  11. List="";
  12. Count=0;
  13. Error=a.split(" ");
  14. PersonalListSub1=Data.filter(x=>x==user+x.slice(user.length));
  15. PersonalListSub2=PersonalListSub1.filter(x=>x!=x.slice(0,x.length-4)+"Nope");
  16. PersonalList=PersonalListSub2.filter(x=>x!=x.slice(0,x.length-4)+"null");
  17.  
  18. if(MessageSub=="Lvl")
  19. {Extra="You Leveled UP to Level "+Lvl+"!"}
  20. else
  21. {Extra=""};
  22.  
  23. if(Message=="Catch"&&Pcatch!="")
  24. {Output="@"+user+" caught a wild "+Pcatch+" gaining "+XpExtra+" Xp and "+MoneyExtra+" Pokédollars! "+Extra+" You have "+Pb+" Pokéballs left."}
  25. else
  26. if(Message=="Catch"&&Pcatch=="")
  27. {Output="Uh Oh, @"+user+" you missed the Pokémon and lost a Pokéball. "+Extra+" You have "+Pb+" Pokéballs left."};
  28.  
  29. if(Message=="Out")
  30. {Output="@"+user+" you are all out of Pokéballs buy more with “Buy (Amount)” after the command."};
  31.  
  32. if(Message=="Info")
  33. {Output="@"+user+" possible arguments are: (Catch, Help, Stats, Level, Buy, Inventory, Inven, Pokemon, Pokémon) New version of command available at https://bit.ly/3cuQ64T"};
  34.  
  35. if(Message=="Stats")
  36. {if(Lvl!="100")
  37. {Output="@"+user+" you are level "+Lvl+" with "+Xp+" Xp."}
  38. else
  39. {Output="@"+user+" you are max level congratulations!!!"}};
  40.  
  41. if(Message=="BuyHelp")
  42. {Output="@"+user+" please only put the number of Pokéballs you wish to buy after Buy. They cost 250 Pokédollars each"};
  43.  
  44. if(Message=="Buy")
  45. {Output="@"+user+" you bought "+MessageSub+" Pokéballs for "+Math.floor(parseInt(MessageSub)*250)+" Pokédollars. You have "+Pb+" Pokéballs now."};
  46.  
  47. if(Message=="TooPoor")
  48. {Output="@"+user+" you can’t afford "+MessageSub+" Pokéballs. You can only afford "+Math.floor(parseInt(Money)/250)+" with your "+Money+" Pokédollars."};
  49.  
  50. if(Message=="Inventory")
  51. {Output="@"+user+" you have "+Money+" Pokédollars and "+Pb+" Pokéballs."};
  52.  
  53. if(Message=="List"&&parseInt(MessageSub)==Math.floor(parseInt(MessageSub)+0))
  54. {for(x=0;x<PersonalList.length;x++)
  55. {DataSub=PersonalList[x].split(" ");
  56. Count++;
  57. if(Count>Math.floor(parseInt(MessageSub)*20-20)&&Count<Math.floor(parseInt(MessageSub)*20))
  58. {List+=", "+DataSub[5]}};
  59. if(Math.floor(Count%20)==0)
  60. {Page=Math.floor(Count/20)}
  61. else
  62. {Page=Math.floor(Count/20+1)};
  63. if(Math.floor(parseInt(MessageSub)*20)>Count)
  64. {Count2=Math.floor(Count%20)}
  65. else
  66. {Count2=20};
  67. if(Math.floor(parseInt(MessageSub)*20)>Math.floor(Count+20))
  68. {Output="@"+user+" you only have "+Page+" pages of Pokémon. Please choose a lower number"}
  69. else
  70. {if(Count==0)
  71. {Output="@"+user+" you have no Pokémon :/"}
  72. else
  73. {Output=List.slice(1)+" || "+Count2+"/"+Count+" Page:"+MessageSub+"/"+Page}}}
  74. else
  75. if(Message=="List"&&MessageSub=="null")
  76. {for(x=0;x<PersonalList.length;x++)
  77. {DataSub=PersonalList[x].split(" ");
  78. Count++;
  79. if(Count>Math.floor(1*20-20)&&Count<Math.floor(1*20))
  80. {List+=", "+DataSub[5]}};
  81. if(Math.floor(Count%20)==0)
  82. {Page=Math.floor(Count/20)}
  83. else
  84. {Page=Math.floor(Count/20+1)};
  85. if(20>Count)
  86. {Count2=Math.floor(Count%20)}
  87. else
  88. {Count2=20};
  89. if(Math.floor(1*20)>Math.floor(Count+20))
  90. {Output="@"+user+" you only have "+Page+" pages of Pokémon. Please choose a lower number"}
  91. else
  92. {if(Count==0)
  93. {Output="@"+user+" you have no Pokémon :/"}
  94. else
  95. {Output=List.slice(1)+" || "+Count2+"/"+Count+" Page:1/"+Page}}}
  96. else
  97. if(Message=="List"&&parseInt(MessageSub)!=Math.floor(parseInt(MessageSub)+0)&&MessageSub!="null")
  98. {Output="@"+user+" please only put numbers or leave it blank after Pokémon"};
  99.  
  100. if(Message=="Error")
  101. {Output="Sorry, “"+MessageSub+"” is not a recognized argument. Please see Help."};
  102.  
  103. if(Message=="TooMuch")
  104. {Output="@"+user+" please only fill the first two fields of the message."};
  105.  
  106. if(Message=="null")
  107. {Output="There was an error with the command"}
  108.  
  109. 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))
  110. {if(parseInt(Error[3])==parseInt(Error[3])+0)
  111. {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"}
  112. else
  113. if(parseInt(Error[3].slice(1))!=parseInt(Error[3].slice(1))+0)
  114. {Output="Please try again. If this continues to occur please contact @potatoeaterlove via twitch"}};
  115.  
  116. Output
Add Comment
Please, Sign In to add comment