Fixes issue with Bot Wired.

This commit is contained in:
harmonic 2020-07-10 16:15:14 +01:00
parent e45d2867ef
commit 8005c5cf1f
6 changed files with 18 additions and 1 deletions

View File

@ -89,6 +89,9 @@ public class WiredEffectBotFollowHabbo extends InteractionWiredEffect {
if (habbo != null) {
List<Bot> bots = room.getBots(this.botName);
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
if (this.mode == 1)
bot.startFollowingHabbo(habbo);
else

View File

@ -93,6 +93,9 @@ public class WiredEffectBotGiveHandItem extends InteractionWiredEffect {
List<Bot> bots = room.getBots(this.botName);
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
List<Runnable> tasks = new ArrayList<>();
tasks.add(new RoomUnitGiveHanditem(habbo.getRoomUnit(), room, this.itemId));
tasks.add(new RoomUnitGiveHanditem(bot.getRoomUnit(), room, 0));

View File

@ -86,6 +86,9 @@ public class WiredEffectBotTalk extends InteractionWiredEffect {
List<Bot> bots = room.getBots(this.botName);
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
if (this.mode == 1)
bot.shout(message);
else

View File

@ -105,6 +105,9 @@ public class WiredEffectBotTalkToHabbo extends InteractionWiredEffect {
List<Bot> bots = room.getBots(this.botName);
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
if (this.mode == 1) {
bot.whisper(m, habbo);
} else {

View File

@ -13,7 +13,6 @@ import com.eu.habbo.habbohotel.wired.WiredHandler;
import com.eu.habbo.messages.ClientMessage;
import com.eu.habbo.messages.ServerMessage;
import com.eu.habbo.threading.runnables.RoomUnitTeleport;
import com.eu.habbo.threading.runnables.SendRoomUnitEffectComposer;
import gnu.trove.set.hash.THashSet;
import java.sql.ResultSet;
@ -99,6 +98,9 @@ public class WiredEffectBotTeleport extends InteractionWiredEffect {
return false;
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
int i = Emulator.getRandom().nextInt(this.items.size()) + 1;
int j = 1;
for (HabboItem item : this.items) {

View File

@ -109,6 +109,9 @@ public class WiredEffectBotWalkToFurni extends InteractionWiredEffect {
if (this.items.size() > 0) {
for (Bot bot : bots) {
if (bots.size() > 1) {
return false;
}
int i = Emulator.getRandom().nextInt(this.items.size()) + 1;
int j = 1;
for (HabboItem item : this.items) {