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 Releases
Server Releases
Bubble Alert
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="AnalPudding" data-source="post: 448718" data-attributes="member: 78841"><p>Hello everyone i decided to share this with everyone cause i couldnt find any tutorial considering about this.</p><p>Lets begin</p><p></p><p>This works with <strong>PlusEmu</strong></p><p></p><p>1. Create .cs folder. Example <strong>AlertCommand.cs</strong></p><p></p><p>2. Clear everything so there is no coding in the file</p><p></p><p>3. Paste everything in <strong>Spoiler 1</strong> to your cs file <strong>(Remember to add the command names)</strong></p><p></p><p>4. Open <strong>Spoiler 2</strong> and copy the text on it. you have to put that in <strong>RoomNotificationComposer</strong> </p><p></p><p>5. Get yourself a image that will show in the alert <strong>(size 50x50)</strong> </p><p></p><p>6. Place the image in /c_images/notifications/IMAGENAME.png</p><p></p><p>7. Go in your COMMANDNAME.cs and find row 38 there will be <strong>SendBubble("IMAGENAME", message));</strong> Do not put .png behind the name.</p><p></p><p>8. Go in CommandManager.cs and register the command to the section you want it in. Example: <strong>this.Register("COMMANDNAME", new COMMANDNAMECommand());</strong> </p><p></p><p>9. Save everything and debug</p><p></p><p>10. Go in your database and add the command in there usually table <strong>permission_commands</strong> </p><p></p><p>11. Restart emu and clear cache and you are done</p><p></p><p>[SPOILER="Spoiler 1"]</p><p>using Plus.HabboHotel.Rooms;</p><p>using Plus.Communication.Interfaces;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Chat;</p><p>using Plus.HabboHotel.GameClients;</p><p>using System;</p><p>using System.Threading;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p></p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator</p><p>{</p><p> class COMMANDNAMECommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_COMMANDNAME"; }</p><p> }</p><p></p><p> public string Parameters</p><p> {</p><p> get { return "%message%"; }</p><p> }</p><p></p><p> public string Description</p><p> {</p><p> get { return "Send bubble alert to whole hotel."; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> if (Params.Length == 1)</p><p> {</p><p> Session.SendWhisper("Need message");</p><p> return;</p><p> }</p><p></p><p> string message = CommandManager.MergeParams(Params, 1);</p><p> PlusEnvironment.GetGame().GetClientManager().SendMessage(RoomNotificationComposer.SendBubble("IMAGENAME", message));</p><p> }</p><p> }</p><p>}</p><p>[/SPOILER]</p><p></p><p>[SPOILER="Spoiler 2"]</p><p> public static ServerPacket SendBubble(string image, string message, string linkUrl = "")</p><p> {</p><p> var bubbleNotification = new ServerPacket(ServerPacketHeader.RoomNotificationMessageComposer);</p><p> bubbleNotification.WriteString(image);</p><p> bubbleNotification.WriteInteger(string.IsNullOrEmpty(linkUrl) ? 2 : 3);</p><p> bubbleNotification.WriteString("display");</p><p> bubbleNotification.WriteString("BUBBLE");</p><p> bubbleNotification.WriteString("message");</p><p> bubbleNotification.WriteString(message);</p><p> if (string.IsNullOrEmpty(linkUrl)) return bubbleNotification;</p><p> bubbleNotification.WriteString("linkUrl");</p><p> bubbleNotification.WriteString(linkUrl);</p><p> return bubbleNotification;</p><p> }</p><p>[/SPOILER]</p><p></p><p>Hopefully this worked for you!</p><p></p><p>And here is short GIF for you so you can see what its like</p><p><a href="https://gyazo.com/a5cdc6708ad4362ffae22e135aed2875" target="_blank">https://gyazo.com/a5cdc6708ad4362ffae22e135aed2875</a> </p><p></p><p><u>Thanks to:</u><strong><u> Pollak#5428 </u> </strong>for helping me to code this.</p><p></p><p>If you have any questions considering this feel free to add me as friend in Discord: <strong>AnalPudding#4578</strong></p><p></p><p>Anyways have a great day! Goodbye</p></blockquote><p></p>
[QUOTE="AnalPudding, post: 448718, member: 78841"] Hello everyone i decided to share this with everyone cause i couldnt find any tutorial considering about this. Lets begin This works with [B]PlusEmu[/B] 1. Create .cs folder. Example [B]AlertCommand.cs[/B] 2. Clear everything so there is no coding in the file 3. Paste everything in [B]Spoiler 1[/B] to your cs file [B](Remember to add the command names)[/B] 4. Open [B]Spoiler 2[/B] and copy the text on it. you have to put that in [B]RoomNotificationComposer[/B] 5. Get yourself a image that will show in the alert [B](size 50x50)[/B] 6. Place the image in /c_images/notifications/IMAGENAME.png 7. Go in your COMMANDNAME.cs and find row 38 there will be [B]SendBubble("IMAGENAME", message));[/B] Do not put .png behind the name. 8. Go in CommandManager.cs and register the command to the section you want it in. Example: [B]this.Register("COMMANDNAME", new COMMANDNAMECommand());[/B] 9. Save everything and debug 10. Go in your database and add the command in there usually table [B]permission_commands[/B] 11. Restart emu and clear cache and you are done [SPOILER="Spoiler 1"] using Plus.HabboHotel.Rooms; using Plus.Communication.Interfaces; using Plus.Communication.Packets.Outgoing.Rooms.Chat; using Plus.HabboHotel.GameClients; using System; using System.Threading; using Plus.Communication.Packets.Outgoing.Rooms.Notifications; namespace Plus.HabboHotel.Rooms.Chat.Commands.Administrator { class COMMANDNAMECommand : IChatCommand { public string PermissionRequired { get { return "command_COMMANDNAME"; } } public string Parameters { get { return "%message%"; } } public string Description { get { return "Send bubble alert to whole hotel."; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Need message"); return; } string message = CommandManager.MergeParams(Params, 1); PlusEnvironment.GetGame().GetClientManager().SendMessage(RoomNotificationComposer.SendBubble("IMAGENAME", message)); } } } [/SPOILER] [SPOILER="Spoiler 2"] public static ServerPacket SendBubble(string image, string message, string linkUrl = "") { var bubbleNotification = new ServerPacket(ServerPacketHeader.RoomNotificationMessageComposer); bubbleNotification.WriteString(image); bubbleNotification.WriteInteger(string.IsNullOrEmpty(linkUrl) ? 2 : 3); bubbleNotification.WriteString("display"); bubbleNotification.WriteString("BUBBLE"); bubbleNotification.WriteString("message"); bubbleNotification.WriteString(message); if (string.IsNullOrEmpty(linkUrl)) return bubbleNotification; bubbleNotification.WriteString("linkUrl"); bubbleNotification.WriteString(linkUrl); return bubbleNotification; } [/SPOILER] Hopefully this worked for you! And here is short GIF for you so you can see what its like [URL]https://gyazo.com/a5cdc6708ad4362ffae22e135aed2875[/URL] [U]Thanks to:[/U][B][U] Pollak#5428 [/U] [/B]for helping me to code this. If you have any questions considering this feel free to add me as friend in Discord: [B]AnalPudding#4578[/B] Anyways have a great day! Goodbye [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
Bubble Alert
Top