Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ezbot;
- import org.jibble.pircbot.*;
- public class TwitchBot extends PircBot{
- public TwitchBot() {
- this.setName("ripperinobotterino");
- this.isConnected();
- }
- int count;
- int countX;
- long firstMsg;
- int countMsg = 0;
- String channels="#shigetora";
- public void countFail(){
- count=0;
- sendMessage(channels,"/me glomps");
- }
- public void countAdd(){
- if (count==countX){
- 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");
- count=0;
- }else{
- count++;
- }
- }
- public void count(String msg) throws NumberFormatException{
- if(count==0){
- String divider = msg;
- String[] parts = divider.split(" ");
- String part1 = parts[0];
- String part2 = parts[1];
- try{
- countX=Integer.parseInt(part2);
- } catch(NumberFormatException e) {
- countFail();
- }
- if(Integer.parseInt(part2)>1){
- sendMessage(channels,"Camp if you manage to count to "+part2+" you're in for a good surprise (hint: no you're not).");
- countX=Integer.parseInt(part2);
- count=1;
- return;
- } else {
- sendMessage(channels,"That wouldn't impress me much.. N-not like I'd want you to =w=");
- return;
- }
- }
- }
- public void check(long currMsg){
- if(firstMsg+30000<=currMsg){
- countMsg=0;
- }
- }
- public void integers(String msg)throws NumberFormatException{
- try{
- Integer.parseInt(msg);
- } catch(NumberFormatException e){
- countFail();
- }
- if(Integer.parseInt(msg)==count){
- countAdd();
- } else {
- if(!(Integer.parseInt(msg)==count)){
- countFail();
- }
- }
- }
- public void onMessage(String channel, String sender, String login, String hostname, String message){
- check(System.currentTimeMillis());
- if(countMsg==0){
- firstMsg=System.currentTimeMillis();
- }
- if(countMsg<20){
- countMsg++;
- if(message.equalsIgnoreCase("!doot")) {
- sendMessage(channel, "๐บ ["+countMsg+"]");
- }
- if(message.equalsIgnoreCase("!sadoot")) {
- sendMessage(channel, "FeelsBadMan ๐บ ["+countMsg+"]");
- }
- // if(sender.equals("lalarow")){
- // sendMessage(channel,"wow yeah we know, we knew about it hours ago..");
- // }
- if(message.equalsIgnoreCase("!kys")&&(sender.equals("ripperinosrotolino"))){
- sendMessage(channel,"literally nobody fucking cares just fucking kill yourself you useless waste of oxygen ["+countMsg+"]");
- }
- if(message.startsWith("!count ")){
- count(message);
- }
- if(!(count==0)){
- if(message.length()<3){
- integers(message);
- } else {
- if(count>1){
- countFail();
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement