Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Tutorials
[NEW COMMANDS] - OPEN ROOM, CLOSE ROOM
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Pollak" data-source="post: 433368" data-attributes="member: 77990"><p style="text-align: center">Well, I came in wanting the commands to open the room and close the room. I searched the Internet and could not</p> <p style="text-align: center">to find none I wanted. So I decided to create it for myself (probably if someone has these commands, maybe they are almost the same).</p> <p style="text-align: center">I developed the entire command, but I was having trouble trying to put the room icon closed and not having to stay</p> <p style="text-align: center">restarting emulator for this to appear.</p> <p style="text-align: center"></p> <p style="text-align: center">GO: HabboHotel>Rooms>Chat>Commands>Administrator and enter a new code with the name OpenRoomCommand.cs</p><p>[CODE]using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.GameClients;</p><p>using Plus.Communication.Packets.Outgoing.Inventory.Purse;</p><p>using System.Text;</p><p>using Plus.Communication.Packets.Outgoing.Notifications;</p><p>using Plus.Core;</p><p>using System;</p><p>using Plus.Database.Interfaces;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator</p><p>{</p><p> class OpenRoomCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_openroom"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return ""; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Abre o quarto."; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> var room = Session.GetHabbo().CurrentRoom;</p><p> room.Access = RoomAccess.OPEN;</p><p> room.RoomData.Access = RoomAccess.OPEN;</p><p> using (var queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> queryReactor.runFastQuery(string.Format("UPDATE rooms SET state = 'open' WHERE id = {0}",</p><p> room.RoomId));</p><p></p><p> Session.SendMessage(new RoomAlertComposer("Quarto aberto com sucesso!"));</p><p> Session.SendWhisper("Comando executado com sucesso!");</p><p> }</p><p> }</p><p> }</p><p>}[/CODE]</p><p style="text-align: center">GO: HabboHotel>Rooms>Chat>Commands>Administrator and enter a new code with the name CloseRoomCommand.cs</p><p>[CODE]using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.GameClients;</p><p>using Plus.Communication.Packets.Outgoing.Inventory.Purse;</p><p>using System.Text;</p><p>using Plus.Communication.Packets.Outgoing.Notifications;</p><p>using Plus.Core;</p><p>using System;</p><p>using Plus.Database.Interfaces;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator</p><p>{</p><p> class CloseRoomCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_closeroom"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return ""; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Fecha o quarto."; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> var room = Session.GetHabbo().CurrentRoom;</p><p> room.Access = RoomAccess.DOORBELL;</p><p> room.RoomData.Access = RoomAccess.DOORBELL;</p><p> using (var queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> queryReactor.runFastQuery(string.Format("UPDATE rooms SET state = 'locked' WHERE id = {0}",</p><p> room.RoomId));</p><p> </p><p> Session.SendMessage(new RoomAlertComposer("Quarto fechado com sucesso!"));</p><p> Session.SendWhisper("Comando executado com sucesso!");</p><p> }</p><p> }</p><p> }</p><p>}[/CODE]</p><p style="text-align: center">GO: HabboHotel>Rooms>Chat>Commands in CommandManager.cs</p> <p style="text-align: center">Search for private void RegisterAdministrator() and enter:</p><p>[CODE]this.Register("openroom", new OpenRoomCommand());</p><p>this.Register("closeroom", new CloseRoomCommand());[/CODE]</p><p style="text-align: center">Then debug everything you entered.</p> <p style="text-align: center">Then go to your database (db) in the permissions_commands table and enter:</p><p>[CODE]INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_openroom', '6', '0');</p><p>INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_closeroom', '6', '0');[/CODE]</p><p></p><p style="text-align: center">Credits:</p> <p style="text-align: center">Snaiker (Pollak)</p> <p style="text-align: center">DevBest <3</p></blockquote><p></p>
[QUOTE="Pollak, post: 433368, member: 77990"] [CENTER]Well, I came in wanting the commands to open the room and close the room. I searched the Internet and could not to find none I wanted. So I decided to create it for myself (probably if someone has these commands, maybe they are almost the same). I developed the entire command, but I was having trouble trying to put the room icon closed and not having to stay restarting emulator for this to appear. GO: HabboHotel>Rooms>Chat>Commands>Administrator and enter a new code with the name OpenRoomCommand.cs[/CENTER] [CODE]using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.GameClients; using Plus.Communication.Packets.Outgoing.Inventory.Purse; using System.Text; using Plus.Communication.Packets.Outgoing.Notifications; using Plus.Core; using System; using Plus.Database.Interfaces; namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator { class OpenRoomCommand : IChatCommand { public string PermissionRequired { get { return "command_openroom"; } } public string Parameters { get { return ""; } } public string Description { get { return "Abre o quarto."; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { var room = Session.GetHabbo().CurrentRoom; room.Access = RoomAccess.OPEN; room.RoomData.Access = RoomAccess.OPEN; using (var queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) queryReactor.runFastQuery(string.Format("UPDATE rooms SET state = 'open' WHERE id = {0}", room.RoomId)); Session.SendMessage(new RoomAlertComposer("Quarto aberto com sucesso!")); Session.SendWhisper("Comando executado com sucesso!"); } } } }[/CODE] [CENTER]GO: HabboHotel>Rooms>Chat>Commands>Administrator and enter a new code with the name CloseRoomCommand.cs[/CENTER] [CODE]using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.GameClients; using Plus.Communication.Packets.Outgoing.Inventory.Purse; using System.Text; using Plus.Communication.Packets.Outgoing.Notifications; using Plus.Core; using System; using Plus.Database.Interfaces; namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator { class CloseRoomCommand : IChatCommand { public string PermissionRequired { get { return "command_closeroom"; } } public string Parameters { get { return ""; } } public string Description { get { return "Fecha o quarto."; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { var room = Session.GetHabbo().CurrentRoom; room.Access = RoomAccess.DOORBELL; room.RoomData.Access = RoomAccess.DOORBELL; using (var queryReactor = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) queryReactor.runFastQuery(string.Format("UPDATE rooms SET state = 'locked' WHERE id = {0}", room.RoomId)); Session.SendMessage(new RoomAlertComposer("Quarto fechado com sucesso!")); Session.SendWhisper("Comando executado com sucesso!"); } } } }[/CODE] [CENTER]GO: HabboHotel>Rooms>Chat>Commands in CommandManager.cs Search for private void RegisterAdministrator() and enter:[/CENTER] [CODE]this.Register("openroom", new OpenRoomCommand()); this.Register("closeroom", new CloseRoomCommand());[/CODE] [CENTER]Then debug everything you entered. Then go to your database (db) in the permissions_commands table and enter:[/CENTER] [CODE]INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_openroom', '6', '0'); INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_closeroom', '6', '0');[/CODE] [CENTER]Credits: Snaiker (Pollak) DevBest <3[/CENTER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Tutorials
[NEW COMMANDS] - OPEN ROOM, CLOSE ROOM
Top