Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. package ezbot;
  2.  
  3. import org.jibble.pircbot.*;
  4.  
  5. public class TwitchBot extends PircBot{
  6.  
  7. public TwitchBot() {
  8. this.setName("ripperinobotterino");
  9.  
  10. this.isConnected();
  11. }
  12. int count;
  13. int countX;
  14. long firstMsg;
  15. int countMsg = 0;
  16. String channels="#shigetora";
  17.  
  18. public void countFail(){
  19. count=0;
  20. sendMessage(channels,"/me glomps");
  21. }
  22.  
  23. public void countAdd(){
  24. if (count==countX){
  25. sendMessage(channels,"๐Ÿ‘Œ๐Ÿ‘€๐Ÿ‘Œ๐Ÿ‘€๐Ÿ‘Œ๐Ÿ‘€๐Ÿ‘Œ๐Ÿ‘€๐Ÿ‘Œ๐Ÿ‘€ good shit goเฑฆิ sHit๐Ÿ‘Œ thats โœ” some good๐Ÿ‘Œ๐Ÿ‘Œshit right๐Ÿ‘Œ๐Ÿ‘Œthere๐Ÿ‘Œ๐Ÿ‘Œ๐Ÿ‘Œ rightโœ”there โœ”โœ”if i do ฦฝaาฏ so my self ๐Ÿ’ฏ i say so ๐Ÿ’ฏ thats what im talking about right there right there (chorus: สณแถฆแตสฐแต— แต—สฐแต‰สณแต‰) mMMMMแŽทะœ๐Ÿ’ฏ ๐Ÿ‘Œ๐Ÿ‘Œ ๐Ÿ‘ŒะO0ะžเฌ OOOOOะžเฌ เฌ Ooooแต’แต’แต’แต’แต’แต’แต’แต’แต’๐Ÿ‘Œ ๐Ÿ‘Œ๐Ÿ‘Œ ๐Ÿ‘Œ ๐Ÿ’ฏ ๐Ÿ‘Œ ๐Ÿ‘€ ๐Ÿ‘€ ๐Ÿ‘€ ๐Ÿ‘Œ๐Ÿ‘ŒGood shit");
  26. count=0;
  27. }else{
  28. count++;
  29. }
  30. }
  31.  
  32. public void count(String msg) throws NumberFormatException{
  33. if(count==0){
  34. String divider = msg;
  35. String[] parts = divider.split(" ");
  36. String part1 = parts[0];
  37. String part2 = parts[1];
  38. try{
  39. countX=Integer.parseInt(part2);
  40. } catch(NumberFormatException e) {
  41. countFail();
  42. }
  43. if(Integer.parseInt(part2)>1){
  44. sendMessage(channels,"Camp if you manage to count to "+part2+" you're in for a good surprise (hint: no you're not).");
  45. countX=Integer.parseInt(part2);
  46. count=1;
  47. return;
  48. } else {
  49. sendMessage(channels,"That wouldn't impress me much.. N-not like I'd want you to =w=");
  50. return;
  51. }
  52. }
  53. }
  54.  
  55. public void check(long currMsg){
  56. if(firstMsg+30000<=currMsg){
  57. countMsg=0;
  58. }
  59. }
  60.  
  61. public void integers(String msg)throws NumberFormatException{
  62. try{
  63. Integer.parseInt(msg);
  64. } catch(NumberFormatException e){
  65. countFail();
  66. }
  67.  
  68. if(Integer.parseInt(msg)==count){
  69. countAdd();
  70. } else {
  71. if(!(Integer.parseInt(msg)==count)){
  72. countFail();
  73. }
  74. }
  75. }
  76.  
  77.  
  78.  
  79.  
  80. public void onMessage(String channel, String sender, String login, String hostname, String message){
  81.  
  82. check(System.currentTimeMillis());
  83.  
  84. if(countMsg==0){
  85. firstMsg=System.currentTimeMillis();
  86. }
  87. if(countMsg<20){
  88. countMsg++;
  89. if(message.equalsIgnoreCase("!doot")) {
  90. sendMessage(channel, "๐ŸŽบ ["+countMsg+"]");
  91. }
  92.  
  93. if(message.equalsIgnoreCase("!sadoot")) {
  94. sendMessage(channel, "FeelsBadMan ๐ŸŽบ ["+countMsg+"]");
  95. }
  96.  
  97. // if(sender.equals("lalarow")){
  98. // sendMessage(channel,"wow yeah we know, we knew about it hours ago..");
  99. // }
  100.  
  101. if(message.equalsIgnoreCase("!kys")&&(sender.equals("ripperinosrotolino"))){
  102. sendMessage(channel,"literally nobody fucking cares just fucking kill yourself you useless waste of oxygen ["+countMsg+"]");
  103. }
  104.  
  105. if(message.startsWith("!count ")){
  106. count(message);
  107. }
  108.  
  109. if(!(count==0)){
  110. if(message.length()<3){
  111. integers(message);
  112. } else {
  113. if(count>1){
  114. countFail();
  115. }
  116. }
  117. }
  118.  
  119.  
  120. }
  121.  
  122. }
  123.  
  124.  
  125. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement