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
[PlusEMU] Appearing Offline With Command
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="Hypothesis" data-source="post: 462926" data-attributes="member: 83881"><p>Hey there DevBest, I just wanted to make a quick release. I was told that Plus Emulator didn't have a command to appear offline by default. I was confused because I recall the emulator I've been working on since 2016 having it. Come to find out, it actually does not in fact have appearing offline finished. I must've added it to mine sometime back and forgot I added it. It has the class for it in the Habbo composer, but there is no command or actual functionality of it, so I thought I'd release a working command for everyone to add to their edits, also provide a brief tutorial on how to get it working.</p><p></p><p>Navigate to<strong> /Communication/Packets/Outgoing/Users/ProfileInformationComposer.cs</strong> of your emulator and open that class file.</p><p>[ATTACH=full]11306[/ATTACH]</p><p>Once you're in that class, you're going to look for the first line:</p><p><strong>base.WriteBoolean((PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(habbo.Id)) != null); </strong>keep in mind, it might not actually look like this and your variable might be different than mine, but just look for something that looks like this in boolean data type.</p><p>[ATTACH=full]11307[/ATTACH]</p><p>After you've found that, you're going to replace that line with this:</p><p><strong>base.WriteBoolean(PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(habbo.Id) != null && !Data.AppearOffline ? true : false);</strong></p><p></p><p>After you've done that, now you're gonna look for the integer type:</p><p><strong>base.WriteInteger(Convert.ToInt32(PlusEnvironment.GetUnixTimestamp() - habbo.LastOnline));</strong></p><p>[ATTACH=full]11308[/ATTACH]</p><p>Replace that line with this:</p><p><strong>base.WriteInteger(habbo.AppearOffline ? -1 : Convert.ToInt32(PlusEnvironment.GetUnixTimestamp() - habbo.LastOnline)); </strong>again, keep in mind that your variable might not be the same as mine.</p><p>After you've done that, you've finished the appearing offline function, so now you just add the command that sets the boolean to true or false, I've added the command I use below.</p><p>[CODE=csharp]using System;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Collections.Generic;</p><p>using Plus.Database.Interfaces;</p><p></p><p></p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.User</p><p>{</p><p> class HideOnlineCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return ""; }</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 "Toggles your profile online status."; }</p><p> }</p><p></p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> Session.GetHabbo().AppearOffline = !Session.GetHabbo().AppearOffline;</p><p> Session.SendWhisper("You are now appearing " + (Session.GetHabbo().AppearOffline == true ? "offline" : "online"));</p><p> }</p><p> }</p><p>}[/CODE]</p><p>After that, add the call for it in your CommandManager and you should be good to go. Hope this helped anyone who didn't have the command.</p></blockquote><p></p>
[QUOTE="Hypothesis, post: 462926, member: 83881"] Hey there DevBest, I just wanted to make a quick release. I was told that Plus Emulator didn't have a command to appear offline by default. I was confused because I recall the emulator I've been working on since 2016 having it. Come to find out, it actually does not in fact have appearing offline finished. I must've added it to mine sometime back and forgot I added it. It has the class for it in the Habbo composer, but there is no command or actual functionality of it, so I thought I'd release a working command for everyone to add to their edits, also provide a brief tutorial on how to get it working. Navigate to[B] /Communication/Packets/Outgoing/Users/ProfileInformationComposer.cs[/B] of your emulator and open that class file. [ATTACH=full]11306[/ATTACH] Once you're in that class, you're going to look for the first line: [B]base.WriteBoolean((PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(habbo.Id)) != null); [/B]keep in mind, it might not actually look like this and your variable might be different than mine, but just look for something that looks like this in boolean data type. [ATTACH=full]11307[/ATTACH] After you've found that, you're going to replace that line with this: [B]base.WriteBoolean(PlusEnvironment.GetGame().GetClientManager().GetClientByUserID(habbo.Id) != null && !Data.AppearOffline ? true : false);[/B] After you've done that, now you're gonna look for the integer type: [B]base.WriteInteger(Convert.ToInt32(PlusEnvironment.GetUnixTimestamp() - habbo.LastOnline));[/B] [ATTACH=full]11308[/ATTACH] Replace that line with this: [B]base.WriteInteger(habbo.AppearOffline ? -1 : Convert.ToInt32(PlusEnvironment.GetUnixTimestamp() - habbo.LastOnline)); [/B]again, keep in mind that your variable might not be the same as mine. After you've done that, you've finished the appearing offline function, so now you just add the command that sets the boolean to true or false, I've added the command I use below. [CODE=csharp]using System; using System.Linq; using System.Text; using System.Collections.Generic; using Plus.Database.Interfaces; namespace Plus.HabboHotel.Rooms.Chat.Commands.User { class HideOnlineCommand : IChatCommand { public string PermissionRequired { get { return ""; } } public string Parameters { get { return ""; } } public string Description { get { return "Toggles your profile online status."; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { Session.GetHabbo().AppearOffline = !Session.GetHabbo().AppearOffline; Session.SendWhisper("You are now appearing " + (Session.GetHabbo().AppearOffline == true ? "offline" : "online")); } } }[/CODE] After that, add the call for it in your CommandManager and you should be good to go. Hope this helped anyone who didn't have the command. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[PlusEMU] Appearing Offline With Command
Top