This commit is contained in:
Remco 2020-12-24 09:19:05 +01:00
commit 69f9abc1cc
3 changed files with 5 additions and 2 deletions

View File

@ -104,6 +104,8 @@ INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('subscriptions.hc.payday.m
-- OPTIONAL HC MIGRATION -- OPTIONAL HC MIGRATION
-- INSERT INTO users_subscriptions SELECT NULL, user_id, 'HABBO_CLUB' as `subscription_type`, UNIX_TIMESTAMP() AS `timestamp_start`, (club_expire_timestamp - UNIX_TIMESTAMP()) AS `duration`, 1 AS `active` FROM users_settings WHERE club_expire_timestamp > UNIX_TIMESTAMP(); -- INSERT INTO users_subscriptions SELECT NULL, user_id, 'HABBO_CLUB' as `subscription_type`, UNIX_TIMESTAMP() AS `timestamp_start`, (club_expire_timestamp - UNIX_TIMESTAMP()) AS `duration`, 1 AS `active` FROM users_settings WHERE club_expire_timestamp > UNIX_TIMESTAMP();
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('easter_eggs.enabled', '1');
ALTER TABLE `bots` ALTER TABLE `bots`
ADD COLUMN `bubble_id` int(3) NULL DEFAULT 31 AFTER `effect`; ADD COLUMN `bubble_id` int(3) NULL DEFAULT 31 AFTER `effect`;

View File

@ -1,5 +1,6 @@
package com.eu.habbo.core; package com.eu.habbo.core;
import com.eu.habbo.Emulator;
import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.rooms.RoomChatMessage; import com.eu.habbo.habbohotel.rooms.RoomChatMessage;
import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles; import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles;
@ -11,7 +12,7 @@ import com.eu.habbo.plugin.events.users.UserSavedMottoEvent;
public class Easter { public class Easter {
@EventHandler @EventHandler
public static void onUserChangeMotto(UserSavedMottoEvent event) { public static void onUserChangeMotto(UserSavedMottoEvent event) {
if (event.newMotto.equalsIgnoreCase("crickey!")) { if (Emulator.getConfig().getBoolean("easter_eggs.enabled") && event.newMotto.equalsIgnoreCase("crickey!")) {
event.habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(event.newMotto, event.habbo, event.habbo, RoomChatMessageBubbles.ALERT))); event.habbo.getClient().sendResponse(new RoomUserWhisperComposer(new RoomChatMessage(event.newMotto, event.habbo, event.habbo, RoomChatMessageBubbles.ALERT)));
Room room = event.habbo.getHabboInfo().getCurrentRoom(); Room room = event.habbo.getHabboInfo().getCurrentRoom();

View File

@ -3094,7 +3094,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
} }
} }
habbo.getHabboStats().lastChat = millis; habbo.getHabboStats().lastChat = millis;
if (roomChatMessage != null && roomChatMessage.getMessage().equalsIgnoreCase("i am a pirate")) { if (roomChatMessage != null && Emulator.getConfig().getBoolean("easter_eggs.enabled") && roomChatMessage.getMessage().equalsIgnoreCase("i am a pirate")) {
habbo.getHabboStats().chatCounter.addAndGet(1); habbo.getHabboStats().chatCounter.addAndGet(1);
Emulator.getThreading().run(new YouAreAPirate(habbo, this)); Emulator.getThreading().run(new YouAreAPirate(habbo, this));
return; return;