Add bot placement message

This commit is contained in:
Alejandro 2020-02-05 19:17:51 +02:00
parent 5f5345c80c
commit f240580c1e
3 changed files with 10 additions and 1 deletions

View File

@ -1,2 +1,4 @@
ALTER TABLE `users_pets`
ADD COLUMN `saddle_item_id` int(11) NULL;
ADD COLUMN `saddle_item_id` int(11) NULL;
INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.bot.placement.messages', 'Yo!;Hello I\'m a real party animal!;Hello!');

View File

@ -22,6 +22,8 @@ import java.util.Arrays;
public class Bot implements Runnable {
public static final String NO_CHAT_SET = "${bot.skill.chatter.configuration.text.placeholder}";
public static String[] PLACEMENT_MESSAGES = "Yo!;Hello I'm a real party animal!;Hello!".split(";");
private final ArrayList<String> chatLines;
private transient int id;
private String name;
@ -240,6 +242,8 @@ public class Bot implements Runnable {
if (this.roomUnit != null) {
room.giveEffect(this.roomUnit, this.effect, -1);
}
this.talk(PLACEMENT_MESSAGES[Emulator.getRandom().nextInt(PLACEMENT_MESSAGES.length)]);
}
public void onPickUp(Habbo habbo, Room room) {

View File

@ -3,6 +3,7 @@ package com.eu.habbo.plugin;
import com.eu.habbo.Emulator;
import com.eu.habbo.core.Easter;
import com.eu.habbo.habbohotel.achievements.AchievementManager;
import com.eu.habbo.habbohotel.bots.Bot;
import com.eu.habbo.habbohotel.bots.BotManager;
import com.eu.habbo.habbohotel.catalog.CatalogManager;
import com.eu.habbo.habbohotel.catalog.TargetOffer;
@ -82,6 +83,8 @@ public class PluginManager {
BotManager.MAXIMUM_CHAT_LENGTH = Emulator.getConfig().getInt("hotel.bot.max.chatlength");
BotManager.MAXIMUM_NAME_LENGTH = Emulator.getConfig().getInt("hotel.bot.max.namelength");
BotManager.MAXIMUM_CHAT_SPEED = Emulator.getConfig().getInt("hotel.bot.max.chatdelay");
Bot.PLACEMENT_MESSAGES = Emulator.getConfig().getValue("hotel.bot.placement.messages", "Yo!;Hello I'm a real party animal!;Hello!").split(";");
HabboInventory.MAXIMUM_ITEMS = Emulator.getConfig().getInt("hotel.inventory.max.items");
Messenger.MAXIMUM_FRIENDS = Emulator.getConfig().getInt("hotel.max.friends");
Messenger.MAXIMUM_FRIENDS_HC = Emulator.getConfig().getInt("hotel.max.friends.hc");