diff --git a/BandoriBot/BandoriBot.jar b/BandoriBot/BandoriBot.jar index 1ce0d11..bb7a0b9 100644 Binary files a/BandoriBot/BandoriBot.jar and b/BandoriBot/BandoriBot.jar differ diff --git a/BandoriBot/src/sig/BandoriBot.java b/BandoriBot/src/sig/BandoriBot.java index c2a523a..b158817 100644 --- a/BandoriBot/src/sig/BandoriBot.java +++ b/BandoriBot/src/sig/BandoriBot.java @@ -31,6 +31,7 @@ public class BandoriBot extends ListenerAdapter{ public static int currentEventTimer = 0; public static String currentEvent = ""; public static JDA bot; + public static int messageCounter = 0; public static String[] eventsList = new String[]{ "Making Choco Cornets", @@ -183,6 +184,7 @@ public class BandoriBot extends ListenerAdapter{ if (currentEventTimer==0) { UpdateBotStatus(currentEvent,0); currentEventTimer = 300; + messageCounter = 0; } } else if (noMessageTimer>14400) { @@ -190,12 +192,14 @@ public class BandoriBot extends ListenerAdapter{ if (currentEventTimer==0) { UpdateBotStatus(currentEvent,0); currentEventTimer = 300; + messageCounter = 0; } } else { currentEvent = "Taking a cat-nap"; if (currentEventTimer==0) { UpdateBotStatus(currentEvent,0); currentEventTimer = 300; + messageCounter = 0; } } } else { @@ -231,7 +235,7 @@ public class BandoriBot extends ListenerAdapter{ } } try { - System.out.println("Current Event: "+currentEvent+"; Timer: "+currentEventTimer+"; No Message Timer: "+noMessageTimer); + System.out.println("Current Event: "+currentEvent+"; Timer: "+currentEventTimer+"; No Message Timer: "+noMessageTimer+"; Message Counter: "+messageCounter); Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); @@ -339,6 +343,16 @@ public class BandoriBot extends ListenerAdapter{ if (foundmatch) { noMessageTimer=0; return; + } else + { + if (noMessageTimer>7200) { + messageCounter++; + if (Math.random()>1d/messageCounter) { + currentEvent = ""; + UpdateBotStatus(currentEvent,0); + messageCounter = 0; + } + } } } }