diff --git a/Database Updates/UpdateDatabase_DanceCMD.sql b/Database Updates/UpdateDatabase_DanceCMD.sql new file mode 100644 index 00000000..8ed80044 --- /dev/null +++ b/Database Updates/UpdateDatabase_DanceCMD.sql @@ -0,0 +1,5 @@ +ALTER TABLE `camwijs`.`permissions` +ADD COLUMN `cms_dance` ENUM('0', '1') NULL DEFAULT '0' AFTER `cmd_credits`; + +INSERT INTO emulator_texts (`key`, `value`) VALUES ('commands.description.cmd_dance', 'dance around the world ! use 1 t/m 4 and 0 to stop'); +INSERT INTO emulator_texts (`key`, `value`) VALUES ('commands.keys.cmd_dance', 'dance'); diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java index 2f9cbde1..9e21c1fc 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/CommandHandler.java @@ -191,6 +191,7 @@ public class CommandHandler { addCommand(new ControlCommand()); addCommand(new CoordsCommand()); addCommand(new CreditsCommand()); + addCommand(new DanceCommand()); addCommand(new DiagonalCommand()); addCommand(new DisconnectCommand()); addCommand(new EjectAllCommand()); diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/DanceCommand.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/DanceCommand.java new file mode 100644 index 00000000..8b75d14d --- /dev/null +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/commands/DanceCommand.java @@ -0,0 +1,48 @@ +package com.eu.habbo.habbohotel.commands; + +import com.eu.habbo.Emulator; +import com.eu.habbo.habbohotel.gameclients.GameClient; +import com.eu.habbo.habbohotel.rooms.RoomChatMessageBubbles; +import com.eu.habbo.habbohotel.users.DanceType; +import com.eu.habbo.habbohotel.users.Habbo; +import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDanceComposer; + +public class DanceCommand extends Command { + public DanceCommand() { + super("cmd_dance", Emulator.getTexts().getValue("commands.keys.cmd_dance").split(";")); + } + + @Override + public boolean handle(GameClient gameClient, String[] params) throws Exception { + Habbo habbo = gameClient.getHabbo(); + if (habbo == null || habbo.getHabboInfo().getCurrentRoom() == null) { + return true; + } + + if (params.length == 2) { + int danceId; + + try { + danceId = Integer.parseInt(params[1]); + } catch (NumberFormatException e) { + habbo.whisper(Emulator.getTexts().getValue("commands.error.cmd_dance.invalid_dance"), RoomChatMessageBubbles.ALERT); + return true; + } + + if (danceId < 0 || danceId > 4) { + habbo.whisper(Emulator.getTexts().getValue("commands.error.cmd_dance.outside_bounds"), RoomChatMessageBubbles.ALERT); + return true; + } + + habbo.getRoomUnit().setDanceType(DanceType.values()[danceId]); + habbo.getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDanceComposer(habbo.getRoomUnit()).compose()); + + String danceName = danceId == 0 ? "stop" : "dance " + danceId; + habbo.whisper("You are now doing " + danceName + "!", RoomChatMessageBubbles.NORMAL); + } else { + habbo.whisper(Emulator.getTexts().getValue("commands.error.cmd_dance.usage"), RoomChatMessageBubbles.ALERT); + } + + return true; + } +} \ No newline at end of file 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 2179fb47..4d5125bb 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 diff --git a/README.md b/README.md index aeb030f3..4b44ac8b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ and is developed for free by talented developers and is compatible with the foll | ------------- | ------------- | ## Download ## -[Latest compiled version](https://git.camwijs.eu/duckietm/Arcturus-Morningstar-Extended/src/branch/main/Latest_Compiled_Version) +[Latest compiled version](https://github.com/duckietm/Arcturus-Morningstar-Extended/tree/main/Latest_Compiled_Version) ## Connection ## Use the Websocket plugin! @@ -81,7 +81,6 @@ The robust Plugin System included in the original Arcturus release is also inclu - ArpyAge - Mikkel - Rodolfo - - Rasmus - for selling me the banners and height code - Kitt Mustang - Snaiker - nttzx