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
[Release] :ui (changing between old and new ui) command for Plus emu r2 [Release]
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="13rad" data-source="post: 290282" data-attributes="member: 37541"><p><strong>Step 1 - Table alteration</strong></p><p></p><p>Firstly, run the following MySQL query:</p><p></p><p></p><p>ALTER TABLE users </p><p>ADD use_newui enum('1','0') DEFAULT '1';<strong>Step 2 - Modifying the Habbo class</strong></p><p></p><p>Firstly, open Habbo.cs and find: </p><p></p><p></p><p>internal bool IsGuardian;and add below it:</p><p></p><p>Code:</p><p>internal bool NewUI;</p><p>then, find: </p><p></p><p></p><p>internal Habbo(UInt32 Id, string Username, string RealName, uint Rank, string Motto, string Look, string Gender, Int32 Credits,</p><p>Int32 ActivityPoints, Double LastActivityPointsUpdate, bool Muted,</p><p>UInt32 HomeRoom, Int32 Respect, Int32 DailyRespectPoints, Int32 DailyPetRespectPoints,</p><p>bool MutantPenalty, bool HasFriendRequestsDisabled, uint currentQuestID, int currentQuestProgress,</p><p>int achievementPoints, int LastOnline, bool AppearOffline, bool HideInRoom, bool VIP, double CreateDate,</p><p>bool Online, bool isguide, bool Blockwhisper, int SCurrency, bool mysbox, int key, List<GroupUser> Groups, uint FavId, int LastChange)and add bool NewUI or replace it with this:</p><p></p><p>Code:</p><p>internal Habbo(UInt32 Id, string Username, string RealName, uint Rank, string Motto, string Look, string Gender, Int32 Credits,</p><p>Int32 ActivityPoints, Double LastActivityPointsUpdate, bool Muted,</p><p>UInt32 HomeRoom, Int32 Respect, Int32 DailyRespectPoints, Int32 DailyPetRespectPoints,</p><p>bool MutantPenalty, bool HasFriendRequestsDisabled, uint currentQuestID, int currentQuestProgress,</p><p>int achievementPoints, int LastOnline, bool AppearOffline, bool HideInRoom, bool VIP, double CreateDate,</p><p>bool Online, bool isguide, bool Blockwhisper, int SCurrency, bool mysbox, int key, List<GroupUser> Groups, uint FavId, int LastChange, bool NewUI)</p><p>and then find:</p><p></p><p></p><p>this.IsGuardian = true;and add this directly below: </p><p></p><p>Code:</p><p>this.NewUI = NewUI;</p><p>then you need to add this at the bottom of the Habbo.cs file:</p><p></p><p>Code:</p><p>internal void NewUISwitcher() {</p><p>if (NewUI)</p><p>{</p><p>using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())</p><p>{</p><p>dbClient.runFastQuery("UPDATE users SET use_newui='0' WHERE id='" + this.Id + "'");</p><p>this.NewUI = false;</p><p>GetClient().SendNotif("New UI disabled!\n\nYour changes will be applied when you reload.");</p><p>}</p><p>}</p><p>else</p><p>{</p><p>using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())</p><p>{</p><p>dbClient.runFastQuery("UPDATE users SET use_newui='1' WHERE id='" + this.Id + "'");</p><p>this.NewUI = true;</p><p>GetClient().SendNotif("New UI enabled!\n\nYour changes will be applied when you reload.");</p><p>}</p><p>}</p><p>}</p><p><strong></strong></p><p><strong>Step 3 - modifying the Authenticator class</strong></p><p><strong>Firstly, open Authenticator.cs and find:</strong></p><p><strong></strong></p><p><strong></strong></p><p><strong>int LastChange = (int)dRow["last_change"];add this directly below:</strong></p><p><strong></strong></p><p><strong>Code:</strong></p><p><strong>bool NewUI = SilverwaveEnvironment.EnumToBool(dRow["use_newui"].ToString());</strong></p><p><strong>then, find: </strong></p><p><strong></strong></p><p><strong></strong></p><p><strong>return new Habbo(id, username, realname, rank, motto, look, gender, credits, activityPoints, activityPointsLastUpdate, isMuted, homeRoom, respect, dailyRespect, dailyPetRespect, mtantPenalty, blockFriends, questID, questProgress, achiecvementPoints, </strong></p><p><strong>lastonline, AppearOffline, HideFromRoom, vip, Createtime, online, isguide, Blockwhisper, Sc, mys, key, group, favid, LastChange);and add the NewUI bool or replace it with this:</strong></p><p><strong></strong></p><p><strong>Code:</strong></p><p><strong>return new Habbo(id, username, realname, rank, motto, look, gender, credits, activityPoints, activityPointsLastUpdate, isMuted, homeRoom, respect, dailyRespect, dailyPetRespect, mtantPenalty, blockFriends, questID, questProgress, achiecvementPoints,</strong></p><p><strong>lastonline, AppearOffline, HideFromRoom, vip, Createtime, online, isguide, Blockwhisper, Sc, mys, key, group, favid, LastChange, NewUI);</strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Step 4 - Adding the command</strong></strong></p><p><strong><strong>Open ChatCommandHandler.cs and add this:</strong></strong></p><p><strong><strong></strong></strong></p><p><strong><strong>Code:</strong></strong></p><p><strong><strong>#region UI <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" />ui) case "ui":</strong></strong></p><p><strong><strong>{</strong></strong></p><p><strong><strong>Session.GetHabbo().NewUISwitcher();</strong></strong></p><p><strong><strong>return true;</strong></strong></p><p><strong><strong>}</strong></strong></p><p><strong><strong>#endregion</strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong>Step 5 - Final steps</strong></strong></strong></p><p><strong><strong><strong>Firstly open InfoRetrieveEvent.cs and find:</strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong>Session.SendMessage(new UserPerksComposer());replace it with this:</strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong>Code:</strong></strong></strong></p><p><strong><strong><strong>Session.SendMessage(new UserPerksComposer(Session.GetHabbo()));</strong></strong></strong></p><p><strong><strong><strong>then, open up UserPerksComposer.cs and add the following reference:</strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong>Code:</strong></strong></strong></p><p><strong><strong><strong>using Silverwave.HabboHotel.Users;</strong></strong></strong></p><p><strong><strong><strong>then, find: </strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong>public UserPerksComposer()and replace it with: </strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong>Code:</strong></strong></strong></p><p><strong><strong><strong>public UserPerksComposer(Habbo Habbo)</strong></strong></strong></p><p><strong><strong><strong>then, find: </strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong>base.WriteString("NEW_UI");</strong></strong></strong></p><p><strong><strong><strong>base.WriteString("");</strong></strong></strong></p><p><strong><strong><strong>base.WriteBoolean(true);and replace with with this:</strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong>Code:</strong></strong></strong></p><p><strong><strong><strong>base.WriteString("NEW_UI"); base.WriteString("");</strong></strong></strong></p><p><strong><strong><strong>if (Habbo.NewUI)</strong></strong></strong></p><p><strong><strong><strong>{</strong></strong></strong></p><p><strong><strong><strong>base.WriteBoolean(true);</strong></strong></strong></p><p><strong><strong><strong>}</strong></strong></strong></p><p><strong><strong><strong>else</strong></strong></strong></p><p><strong><strong><strong>{</strong></strong></strong></p><p><strong><strong><strong>base.WriteBoolean(false);</strong></strong></strong></p><p><strong><strong><strong>}</strong></strong></strong></p><p><strong><strong><strong>Now you can say :ui to change between the old and new UI's</strong></strong></strong></p><p><strong><strong><strong><img src="http://i.imgur.com/HC6NQTJ.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></strong></strong></strong></p><p><strong><strong><strong></strong></strong></strong></p><p><strong><strong><strong>'giz a thumbs up? <img src="/styles/default/xenforo/smilies/emojione/thumbsup.png" class="smilie" loading="lazy" alt=":up:" title="Thumbs Up :up:" data-shortname=":up:" /> </strong></strong></strong></p></blockquote><p></p>
[QUOTE="13rad, post: 290282, member: 37541"] [B]Step 1 - Table alteration[/B] Firstly, run the following MySQL query: ALTER TABLE users ADD use_newui enum('1','0') DEFAULT '1';[B]Step 2 - Modifying the Habbo class[/B] Firstly, open Habbo.cs and find: internal bool IsGuardian;and add below it: Code: internal bool NewUI; then, find: internal Habbo(UInt32 Id, string Username, string RealName, uint Rank, string Motto, string Look, string Gender, Int32 Credits, Int32 ActivityPoints, Double LastActivityPointsUpdate, bool Muted, UInt32 HomeRoom, Int32 Respect, Int32 DailyRespectPoints, Int32 DailyPetRespectPoints, bool MutantPenalty, bool HasFriendRequestsDisabled, uint currentQuestID, int currentQuestProgress, int achievementPoints, int LastOnline, bool AppearOffline, bool HideInRoom, bool VIP, double CreateDate, bool Online, bool isguide, bool Blockwhisper, int SCurrency, bool mysbox, int key, List<GroupUser> Groups, uint FavId, int LastChange)and add bool NewUI or replace it with this: Code: internal Habbo(UInt32 Id, string Username, string RealName, uint Rank, string Motto, string Look, string Gender, Int32 Credits, Int32 ActivityPoints, Double LastActivityPointsUpdate, bool Muted, UInt32 HomeRoom, Int32 Respect, Int32 DailyRespectPoints, Int32 DailyPetRespectPoints, bool MutantPenalty, bool HasFriendRequestsDisabled, uint currentQuestID, int currentQuestProgress, int achievementPoints, int LastOnline, bool AppearOffline, bool HideInRoom, bool VIP, double CreateDate, bool Online, bool isguide, bool Blockwhisper, int SCurrency, bool mysbox, int key, List<GroupUser> Groups, uint FavId, int LastChange, bool NewUI) and then find: this.IsGuardian = true;and add this directly below: Code: this.NewUI = NewUI; then you need to add this at the bottom of the Habbo.cs file: Code: internal void NewUISwitcher() { if (NewUI) { using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor()) { dbClient.runFastQuery("UPDATE users SET use_newui='0' WHERE id='" + this.Id + "'"); this.NewUI = false; GetClient().SendNotif("New UI disabled!\n\nYour changes will be applied when you reload."); } } else { using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor()) { dbClient.runFastQuery("UPDATE users SET use_newui='1' WHERE id='" + this.Id + "'"); this.NewUI = true; GetClient().SendNotif("New UI enabled!\n\nYour changes will be applied when you reload."); } } } [B] Step 3 - modifying the Authenticator class Firstly, open Authenticator.cs and find: int LastChange = (int)dRow["last_change"];add this directly below: Code: bool NewUI = SilverwaveEnvironment.EnumToBool(dRow["use_newui"].ToString()); then, find: return new Habbo(id, username, realname, rank, motto, look, gender, credits, activityPoints, activityPointsLastUpdate, isMuted, homeRoom, respect, dailyRespect, dailyPetRespect, mtantPenalty, blockFriends, questID, questProgress, achiecvementPoints, lastonline, AppearOffline, HideFromRoom, vip, Createtime, online, isguide, Blockwhisper, Sc, mys, key, group, favid, LastChange);and add the NewUI bool or replace it with this: Code: return new Habbo(id, username, realname, rank, motto, look, gender, credits, activityPoints, activityPointsLastUpdate, isMuted, homeRoom, respect, dailyRespect, dailyPetRespect, mtantPenalty, blockFriends, questID, questProgress, achiecvementPoints, lastonline, AppearOffline, HideFromRoom, vip, Createtime, online, isguide, Blockwhisper, Sc, mys, key, group, favid, LastChange, NewUI); [B] Step 4 - Adding the command Open ChatCommandHandler.cs and add this: Code: #region UI (:ui) case "ui": { Session.GetHabbo().NewUISwitcher(); return true; } #endregion [B] Step 5 - Final steps Firstly open InfoRetrieveEvent.cs and find: Session.SendMessage(new UserPerksComposer());replace it with this: Code: Session.SendMessage(new UserPerksComposer(Session.GetHabbo())); then, open up UserPerksComposer.cs and add the following reference: Code: using Silverwave.HabboHotel.Users; then, find: public UserPerksComposer()and replace it with: Code: public UserPerksComposer(Habbo Habbo) then, find: base.WriteString("NEW_UI"); base.WriteString(""); base.WriteBoolean(true);and replace with with this: Code: base.WriteString("NEW_UI"); base.WriteString(""); if (Habbo.NewUI) { base.WriteBoolean(true); } else { base.WriteBoolean(false); } Now you can say :ui to change between the old and new UI's [IMG]http://i.imgur.com/HC6NQTJ.png[/IMG] 'giz a thumbs up? :up: [/B][/B][/B] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
[Release] :ui (changing between old and new ui) command for Plus emu r2 [Release]
Top