diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/bots/Bot.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/bots/Bot.java index b1149aa..da1eb8d 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/bots/Bot.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/bots/Bot.java @@ -43,11 +43,11 @@ public class Bot implements Runnable { private short chatDelay; private int chatTimeOut; private int chatTimestamp; - private short lastChatIndex; + private int lastChatIndex; private int bubble; - private String type; + private final String type; private int effect; @@ -187,9 +187,7 @@ public class Bot implements Runnable { if (!this.chatLines.isEmpty() && this.chatTimeOut <= Emulator.getIntUnixTimestamp() && this.chatAuto) { if (this.room != null) { - this.lastChatIndex = (this.chatRandom ? (short) Emulator.getRandom().nextInt(this.chatLines.size()) : (this.lastChatIndex == (this.chatLines.size() - 1) ? 0 : this.lastChatIndex++)); - - if (this.lastChatIndex >= this.chatLines.size()) { + if (this.lastChatIndex < 0 || this.lastChatIndex >= this.chatLines.size()) { this.lastChatIndex = 0; } @@ -204,6 +202,15 @@ public class Bot implements Runnable { this.talk(message); } + if (this.chatRandom) { + this.lastChatIndex = (short) Emulator.getRandom().nextInt(this.chatLines.size()); + } else { + this.lastChatIndex++; + if (this.lastChatIndex >= this.chatLines.size()) { + this.lastChatIndex = 0; + } + } + this.chatTimeOut = Emulator.getIntUnixTimestamp() + this.chatDelay; } } @@ -420,6 +427,10 @@ public class Bot implements Runnable { return this.effect; } + public void setBubble(int bubble) { + this.bubble = bubble; + this.needsUpdate = true; + } public void setEffect(int effect, int duration) { this.effect = effect; this.needsUpdate = true; diff --git a/Latest_Compiled_Version/Habbo-3.6.0-jar-with-dependencies.jar b/Latest_Compiled_Version/Habbo-3.6.0-jar-with-dependencies.jar index 62dc13c..afd8715 100644 Binary files a/Latest_Compiled_Version/Habbo-3.6.0-jar-with-dependencies.jar and b/Latest_Compiled_Version/Habbo-3.6.0-jar-with-dependencies.jar differ