mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-31 12:22:36 +01:00
Bot now only serves once when the distance is more than reach distance
This commit is contained in:
parent
5851162a63
commit
fe31b37aa1
@ -90,7 +90,6 @@ public class ButlerBot extends Bot {
|
|||||||
|
|
||||||
// Step 2: Prepare tasks for when the Bot (carrying the handitem) reaches the Habbo
|
// Step 2: Prepare tasks for when the Bot (carrying the handitem) reaches the Habbo
|
||||||
final List<Runnable> tasks = new ArrayList<>();
|
final List<Runnable> tasks = new ArrayList<>();
|
||||||
tasks.add(() -> System.out.println("Serving drinks!"));
|
|
||||||
tasks.add(new RoomUnitGiveHanditem(serveEvent.habbo.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), serveEvent.itemId));
|
tasks.add(new RoomUnitGiveHanditem(serveEvent.habbo.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), serveEvent.itemId));
|
||||||
tasks.add(new RoomUnitGiveHanditem(this.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), 0));
|
tasks.add(new RoomUnitGiveHanditem(this.getRoomUnit(), serveEvent.habbo.getHabboInfo().getCurrentRoom(), 0));
|
||||||
|
|
||||||
@ -110,7 +109,6 @@ public class ButlerBot extends Bot {
|
|||||||
List<Runnable> failedReached = new ArrayList<>();
|
List<Runnable> failedReached = new ArrayList<>();
|
||||||
failedReached.add(() -> {
|
failedReached.add(() -> {
|
||||||
if (distanceBetweenBotAndHabbo <= Emulator.getConfig().getInt("hotel.bot.butler.servedistance", 8)) {
|
if (distanceBetweenBotAndHabbo <= Emulator.getConfig().getInt("hotel.bot.butler.servedistance", 8)) {
|
||||||
System.out.println("Failed reached!");
|
|
||||||
for (Runnable task : tasks) {
|
for (Runnable task : tasks) {
|
||||||
task.run();
|
task.run();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user