Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Plus Emulation [Revision 2] FIXES!

Status
Not open for further replies.
Experienced Elementalist
Joined
Jun 7, 2012
Messages
288
Reaction score
250
OK i give the wired unload fix :)
PS 1 time asking is enough ;p ( this is also not fixed in tdits version)
ok search in RoomItemHandling.cs at line 308
PHP:
 if (item.IsWired)
                                {
                                    room.GetWiredHandler().LoadWired(room.GetWiredHandler().GenerateNewItem(item));
                                }
and remove it because its loading before all items are loaded and wired needs the other items to work ;p

ok and search in RoomItemHandling.cs at line 352
PHP:
                foreach (RoomItem Item in mFloorItems.Values)
                {
                 
                    if (Item.IsRoller)
                        mGotRollers = true;
and replace it with:
PHP:
    foreach (RoomItem Item in mFloorItems.Values)
                {
                    if (Item.IsWired)
                    {
                        room.GetWiredHandler().LoadWired(room.GetWiredHandler().GenerateNewItem(Item));
                    }
                    if (Item.IsRoller)
                        mGotRollers = true;
So here it is :) and check this screen omfg :OOO
eaf68a05a78bc982ade9d91782f050ac - Plus Emulation [Revision 2] FIXES! - RaGEZONE Forums

the longest stairs ever :)
 

Attachments

You must be registered for see attachments list
Last edited:
ส็็็็็็็
Loyal Member
Joined
Sep 21, 2009
Messages
2,005
Reaction score
594
I found no exploit, if there is one then it isn't obvious, I've been over every change with CodeCompare. I'm 80% certain there is none. the other 20% of uncertainty is because I haven't read every change thoroughly. (I'm not going to)
 
Newbie Spellweaver
Joined
Nov 29, 2011
Messages
90
Reaction score
18
Makesay command,
thanks to Yadz for sayall command.

#region Makesay :)makesay)
case "makesay":
if (Session.GetHabbo().Rank > 12)
{
Room currentRoom2 = Session.GetHabbo().CurrentRoom;
if (currentRoom2 != null)
{
string Message3 = ChatCommandHandler.MergeParams(Params, 1);

if (Params.Length > 2)
{
GameClient Target = SilverwaveEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
RoomUser TargetUser = currentRoom2.GetRoomUserManager().GetRoomUserByHabbo(Target.GetHabbo().Id);
TargetUser.Chat(TargetUser.GetClient(), MergeParams(Params, 2), false, 0);
}

}
}
return true;
#endregion

"if (Session.GetHabbo().Rank > 12)" determines what rank is allowed to use the command, currently it's set to be allowed to use for all ranks above 12. 13 and up.

Change the condition to whatever you please.

Code should be added to "chatcommandhandler.cs"
 
Last edited:
Newbie Spellweaver
Joined
Apr 16, 2014
Messages
14
Reaction score
0
I made 2 new commands.


1. Habnam (latest Habbo effects required)

Add this in ChatCommandHandler.cs in the VIP area:
PHP:
                #region Habnam (:habnam)
                case "habnam":
                    {
                        if (Session.GetHabbo().HasCmd("habnam"))
                        {
                            Room Room = PlusEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                            RoomUser User = Room.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);
                            User.ApplyEffect(140);
                        }
                        return true;
                    }
                #endregion

2. Kiss command :)kissed)

PHP:
#region Kissed (:kissed)                case "kissed":                    {                        if (Session.GetHabbo().HasFuse("fuse_cmd_kiss"))                        {                            Room roomKiss = Session.GetHabbo().CurrentRoom;                            RoomUser roomUser = roomKiss.GetRoomUserManager().GetRoomUserByHabbo(Session.GetHabbo().Id);                            GameClient clientByUsername = null;                            clientByUsername = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
                            if (clientByUsername == null)                            {                                SendChatMessage(Session, "User doesn't exist");                            }                            else                            {                                if (clientByUsername.GetHabbo().Username == Session.GetHabbo().Username)                                {                                    SendChatMessage(Session, "You can not kiss yourself!");                                }                                else                                {                                    roomKiss.SendMessage(new ChatComposer(roomUser.VirtualId, "*" + Session.GetHabbo().Username + " has kissed " + clientByUsername.GetHabbo().Username + "*", 0, roomUser.LastBubble, -1));                                }                            }                        }                        return true;                    }                #endregion
 
Last edited:
Skilled Illusionist
Joined
Dec 20, 2013
Messages
365
Reaction score
64
Pro tip;

Wanna remove the Builders Club icon? Go to your external_variables, find this line builders.club.enabled=true and change it to builders.club.enabled=false . Done. Icon removed.
lol haha thanks ill removed it in the swf lawl ^^ thanks
---------BUG REPORT------------
1. Horse Jumps
2. Freeze
3. Room Promotions in catalogue
4. Maybe some 1 could make hors dyes page like on habbo
Would Be Great if just some of these bugs could be fixed :) - i am trying my self too but i aint the best at C# (the horse jumps would be awesome :))@Explicable
No Problem :)
 
Last edited:
Skilled Illusionist
Joined
Dec 20, 2013
Messages
365
Reaction score
64
Got these Errors which resulst furnis disaper from room and gets in my hand automatic :S i dont know what these errors means but here they are
These error come with loads of furnis like wired etc if they are stacked when reload
Code:
Error in query: 
UPDATE items SET extra_data = @[I][B][URL="http://forum.ragezone.com/members/2000020544.html"]Eda[/URL][/B][/I]ta881 WHERE id='881';UPDATE items SET x=4, y=1, z=1,2, rot=0 WHERE id=881;UPDATE items SET extra_data = @[I][B][URL="http://forum.ragezone.com/members/2000020544.html"]Eda[/URL][/B][/I]ta880 WHERE id='880';UPDATE items SET x=4, y=1, z=0,6, rot=0 WHERE id=880
MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2, rot=0 WHERE id=881;UPDATE items SET extra_data = '0' WHERE id='880';UPDATE it' at line 1
   ved MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   ved MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   ved MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   ved Database_Manager.Database.Session_Details.QueryAdapter.runQuery() i c:\Users\dennis\Desktop\Plus Emu rev 4\Silverwave Emulator\DatabaseManager\Database_Manager\Database\Session_Details\QueryAdapter.cs:linje 193
Code:
Error in query: 
UPDATE items SET extra_data = @[I][B][URL="http://forum.ragezone.com/members/2000020544.html"]Eda[/URL][/B][/I]ta881 WHERE id='881';UPDATE items SET x=8, y=6, z=0,6, rot=0 WHERE id=881
MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '6, rot=0 WHERE id=881' at line 1
   ved MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   ved MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   ved MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   ved Database_Manager.Database.Session_Details.QueryAdapter.runQuery() i c:\Users\dennis\Desktop\Plus Emu rev 4\Silverwave Emulator\DatabaseManager\Database_Manager\Database\Session_Details\QueryAdapter.cs:linje 193
Code:
Error in query: 
UPDATE items SET room_id=47, x=4, y=13, z=0, rot=0 WHERE id='874';UPDATE items SET room_id=47, x=4, y=13, z=0,6, rot=0 WHERE id='873'
MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '6, rot=0 WHERE id='873'' at line 1
   ved MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   ved MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   ved MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   ved Database_Manager.Database.Session_Details.QueryAdapter.runQuery() i c:\Users\dennis\Desktop\Plus Emu rev 4\Silverwave Emulator\DatabaseManager\Database_Manager\Database\Session_Details\QueryAdapter.cs:linje 193
Code:
Error in query: 
UPDATE items SET room_id=46, x=4, y=1, z=0,6, rot=0 WHERE id='873';UPDATE items SET room_id=46, x=8, y=4, z=0, rot=0 WHERE id='884';UPDATE items SET room_id=46, x=4, y=1, z=0, rot=0 WHERE id='875'
MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '6, rot=0 WHERE id='873';UPDATE items SET room_id=46, x=8, y=4, z=0, rot=0 WHERE ' at line 1
   ved MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   ved MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   ved MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   ved Database_Manager.Database.Session_Details.QueryAdapter.runQuery() i c:\Users\dennis\Desktop\Plus Emu rev 4\Silverwave Emulator\DatabaseManager\Database_Manager\Database\Session_Details\QueryAdapter.cs:linje 193
Code:
Error in query: 
UPDATE items SET room_id=48, x=1, y=17, z=0, rot=0 WHERE id='924';UPDATE items SET room_id=48, x=1, y=15, z=0, rot=0 WHERE id='923';UPDATE items SET room_id=48, x=1, y=14, z=0, rot=2 WHERE id='922';UPDATE items SET room_id=48, x=9, y=6, z=0, rot=0 WHERE id='921';UPDATE items SET room_id=48, x=9, y=9, z=0, rot=0 WHERE id='920';UPDATE items SET room_id=48, x=8, y=5, z=0,5, rot=0 WHERE id='919';UPDATE items SET room_id=48, x=7, y=1, z=0, rot=0 WHERE id='918';UPDATE items SET room_id=48, x=6, y=1, z=0, rot=0 WHERE id='917';UPDATE items SET room_id=48, x=1, y=8, z=0, rot=0 WHERE id='916';UPDATE items SET room_id=48, x=9, y=8, z=0, rot=0 WHERE id='915';UPDATE items SET room_id=48, x=10, y=6, z=0, rot=0 WHERE id='914';UPDATE items SET room_id=48, x=8, y=5, z=0, rot=2 WHERE id='913';UPDATE items SET room_id=48, x=1, y=2, z=0, rot=0 WHERE id='912';UPDATE items SET room_id='48',wall_pos=':w=0,16 l=23,64 l' WHERE id='935';UPDATE items SET room_id='48',wall_pos=':w=0,12 l=27,62 l' WHERE id='934';UPDATE items SET room_id='48',wall_pos=':w=0,14 l=28,62 l' WHERE id='932';UPDATE items SET room_id=48, x=9, y=7, z=0, rot=0 WHERE id='931';UPDATE items SET room_id=48, x=1, y=24, z=0, rot=0 WHERE id='930';UPDATE items SET room_id=48, x=1, y=22, z=0, rot=0 WHERE id='929';UPDATE items SET room_id=48, x=11, y=6, z=0, rot=0 WHERE id='928';UPDATE items SET room_id=48, x=8, y=1, z=0, rot=0 WHERE id='927';UPDATE items SET room_id=48, x=1, y=20, z=0, rot=2 WHERE id='926';UPDATE items SET room_id=48, x=1, y=19, z=0, rot=0 WHERE id='925'
MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '5, rot=0 WHERE id='919';UPDATE items SET room_id=48, x=7, y=1, z=0, rot=0 WHERE ' at line 1
   ved MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   ved MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)
   ved MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   ved MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   ved MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   ved Database_Manager.Database.Session_Details.QueryAdapter.runQuery() i c:\Users\dennis\Desktop\Plus Emu rev 4\Silverwave Emulator\DatabaseManager\Database_Manager\Database\Session_Details\QueryAdapter.cs:linje 193
Any help is gr8 :)
 
Last edited:
Newbie Spellweaver
Joined
Aug 14, 2012
Messages
39
Reaction score
1
Here you got a emu with some fixes.






But :floor bugs so look out with it!
And no wired is fixes!

Download link:
 
Last edited:
Junior Spellweaver
Joined
Apr 5, 2012
Messages
113
Reaction score
8
It is AkllX Revision 2 emu

Again this is a fixes thread why do people never get this?

Solution is in the error itself:

Code:
MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '5, rot=0 WHERE id='919';UPDATE items SET room_id=48, x=7, y=1, z=0, rot=0 WHERE ' at line 1

you have to change the decimal symbol to a point.

Error is here in this query
Code:
UPDATE items SET room_id=48, x=8, y=5, z=[COLOR="#FF0000"][B]0,5[/B][/COLOR], rot=0 WHERE id='919';
 
Newbie Spellweaver
Joined
Jan 17, 2014
Messages
53
Reaction score
12
Fix Magic tiles:


Find:
Code:
handlers.Add(Incoming.StartMoodlight, new StaticRequestHandler(SharedPacketLib.GetMoodlight));

And add this below it:

Code:
handlers.Add(Incoming.UpdateItemTileHeight, new StaticRequestHandler(SharedPacketLib.UpdateItemTileHeight));

SEARCH THE FILE "Events.cs"

Find:
Code:
internal static int JoinGroup = 959; //30012014

And add this below it:
Code:
internal static int UpdateItemTileHeight = 3593; //30012014

Find:
Code:
[LIST=1]
[*][COLOR=#0600FF][B]internal[/B][/COLOR] [COLOR=#0600FF][B]static[/B][/COLOR] [COLOR=#6666CC][B]void[/B][/COLOR] GetMoodlight[COLOR=#008000]([/COLOR]GameClientMessageHandler handler[COLOR=#008000])[/COLOR]
[*]        [COLOR=#008000]{[/COLOR]
[*]            handler[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetMoodlight[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]        [COLOR=#008000]}[/COLOR]
[/LIST]

And add this below it:
Code:
[LIST=1]
[*][COLOR=#0600FF][B]internal[/B][/COLOR] [COLOR=#0600FF][B]static[/B][/COLOR] [COLOR=#6666CC][B]void[/B][/COLOR] UpdateItemTileHeight[COLOR=#008000]([/COLOR]GameClientMessageHandler handler[COLOR=#008000])[/COLOR]
[*]                [COLOR=#008000]{[/COLOR]
[*]                        handler[COLOR=#008000].[/COLOR][COLOR=#0000FF]UpdateItemTileHeight[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                [COLOR=#008000]}[/COLOR]
[/LIST]


SEARCH THE FILE "Rooms.cs"


Find:
Code:
[LIST=1]
[*][COLOR=#0600FF][B]internal[/B][/COLOR] [COLOR=#6666CC][B]void[/B][/COLOR] GetMoodlight[COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR]
[*]        [COLOR=#008000]{[/COLOR]
[*]            Room Room [COLOR=#008000]=[/COLOR] SilverwaveEnvironment[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetGame[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]GetRoomManager[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]GetRoom[/COLOR][COLOR=#008000]([/COLOR]Session[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetHabbo[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]CurrentRoomId[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]            [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR]Room [COLOR=#008000]==[/COLOR] [COLOR=#0600FF][B]null[/B][/COLOR] [COLOR=#008000]||[/COLOR] [COLOR=#008000]![/COLOR]Room[COLOR=#008000].[/COLOR][COLOR=#0000FF]CheckRights[/COLOR][COLOR=#008000]([/COLOR]Session, [COLOR=#0600FF][B]true[/B][/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000])[/COLOR]
[*]            [COLOR=#008000]{[/COLOR]
[*]                [COLOR=#008080][I]//Console.WriteLine("error loading! " + (Room.MoodlightData == null));[/I][/COLOR]
[*]                [COLOR=#0600FF][B]return[/B][/COLOR][COLOR=#008000];[/COLOR]
[*]            [COLOR=#008000]}[/COLOR]
[*]            [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR]Room[COLOR=#008000].[/COLOR][COLOR=#0000FF]MoodlightData[/COLOR] [COLOR=#008000]==[/COLOR] [COLOR=#0600FF][B]null[/B][/COLOR][COLOR=#008000])[/COLOR]
[*]            [COLOR=#008000]{[/COLOR]
[*]                [COLOR=#0600FF][B]foreach[/B][/COLOR] [COLOR=#008000]([/COLOR]RoomItem item [COLOR=#0600FF][B]in[/B][/COLOR] Room[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetRoomItemHandler[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]mWallItems[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Values[/COLOR][COLOR=#008000])[/COLOR]
[*]                [COLOR=#008000]{[/COLOR]
[*]                    [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR]item[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetBaseItem[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]InteractionType[/COLOR] [COLOR=#008000]==[/COLOR] InteractionType[COLOR=#008000].[/COLOR][COLOR=#0000FF]dimmer[/COLOR][COLOR=#008000])[/COLOR]
[*]                        Room[COLOR=#008000].[/COLOR][COLOR=#0000FF]MoodlightData[/COLOR] [COLOR=#008000]=[/COLOR] [URL="http://*******/262930/http://www.google.com/search?q=new+msdn.microsoft.com"][COLOR=#008000]new[/COLOR][/URL] MoodlightData[COLOR=#008000]([/COLOR]item[COLOR=#008000].[/COLOR][COLOR=#0000FF]Id[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                [COLOR=#008000]}[/COLOR]
[*]            [COLOR=#008000]}[/COLOR]
[*]            [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR]Room[COLOR=#008000].[/COLOR][COLOR=#0000FF]MoodlightData[/COLOR] [COLOR=#008000]==[/COLOR] [COLOR=#0600FF][B]null[/B][/COLOR][COLOR=#008000])[/COLOR]
[*]                [COLOR=#0600FF][B]return[/B][/COLOR][COLOR=#008000];[/COLOR]
[*]            Response[COLOR=#008000].[/COLOR][COLOR=#0000FF]Init[/COLOR][COLOR=#008000]([/COLOR]Outgoing[COLOR=#008000].[/COLOR][COLOR=#0000FF]DimmerData[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]            Response[COLOR=#008000].[/COLOR][COLOR=#0000FF]AppendInt32[/COLOR][COLOR=#008000]([/COLOR]Room[COLOR=#008000].[/COLOR][COLOR=#0000FF]MoodlightData[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Presets[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Count[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]            Response[COLOR=#008000].[/COLOR][COLOR=#0000FF]AppendInt32[/COLOR][COLOR=#008000]([/COLOR]Room[COLOR=#008000].[/COLOR][COLOR=#0000FF]MoodlightData[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]CurrentPreset[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]            [COLOR=#6666CC][B]int[/B][/COLOR] i [COLOR=#008000]=[/COLOR] [COLOR=#FF0000]0[/COLOR][COLOR=#008000];[/COLOR]
[*]            [COLOR=#0600FF][B]foreach[/B][/COLOR] [COLOR=#008000]([/COLOR]MoodlightPreset Preset [COLOR=#0600FF][B]in[/B][/COLOR] Room[COLOR=#008000].[/COLOR][COLOR=#0000FF]MoodlightData[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Presets[/COLOR][COLOR=#008000])[/COLOR]
[*]            [COLOR=#008000]{[/COLOR]
[*]                i[COLOR=#008000]++;[/COLOR]
[*]                Response[COLOR=#008000].[/COLOR][COLOR=#0000FF]AppendInt32[/COLOR][COLOR=#008000]([/COLOR]i[COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                Response[COLOR=#008000].[/COLOR][COLOR=#0000FF]AppendInt32[/COLOR][COLOR=#008000]([/COLOR][COLOR=#6666CC][B]int[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Parse[/COLOR][COLOR=#008000]([/COLOR]SilverwaveEnvironment[COLOR=#008000].[/COLOR][COLOR=#0000FF]BoolToEnum[/COLOR][COLOR=#008000]([/COLOR]Preset[COLOR=#008000].[/COLOR][COLOR=#0000FF]BackgroundOnly[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000])[/COLOR] [COLOR=#008000]+[/COLOR] [COLOR=#FF0000]1[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                Response[COLOR=#008000].[/COLOR][COLOR=#0000FF]AppendString[/COLOR][COLOR=#008000]([/COLOR]Preset[COLOR=#008000].[/COLOR][COLOR=#0000FF]ColorCode[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                Response[COLOR=#008000].[/COLOR][COLOR=#0000FF]AppendInt32[/COLOR][COLOR=#008000]([/COLOR]Preset[COLOR=#008000].[/COLOR][COLOR=#0000FF]ColorIntensity[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]            [COLOR=#008000]}[/COLOR]
[*]            SendResponse[COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]        [COLOR=#008000]}[/COLOR]
[/LIST]

And add this below it:
Code:
[LIST=1]
[*][COLOR=#0600FF][B]internal[/B][/COLOR] [COLOR=#6666CC][B]void[/B][/COLOR] UpdateItemTileHeight[COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR]
[*]        [COLOR=#008000]{[/COLOR]
[*]            [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR][COLOR=#008000]([/COLOR]Session [COLOR=#008000]==[/COLOR] [COLOR=#0600FF][B]null[/B][/COLOR] [COLOR=#008000]?[/COLOR] [COLOR=#0600FF][B]false[/B][/COLOR] [COLOR=#008000]:[/COLOR] Session[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetHabbo[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR] [COLOR=#008000]!=[/COLOR] [COLOR=#0600FF][B]null[/B][/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000])[/COLOR]
[*]            [COLOR=#008000]{[/COLOR]
[*]                [COLOR=#6666CC][B]uint[/B][/COLOR] ItemId [COLOR=#008000]=[/COLOR] [COLOR=#0600FF][B]this[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Request[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]PopWiredUInt[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                [COLOR=#6666CC][B]int[/B][/COLOR] Height [COLOR=#008000]=[/COLOR] [COLOR=#0600FF][B]this[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Request[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]PopWiredInt32[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                Room room [COLOR=#008000]=[/COLOR] SilverwaveEnvironment[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetGame[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]GetRoomManager[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]GetRoom[/COLOR][COLOR=#008000]([/COLOR]Session[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetHabbo[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]CurrentRoomId[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR][COLOR=#008000]([/COLOR]room [COLOR=#008000]==[/COLOR] [COLOR=#0600FF][B]null[/B][/COLOR] [COLOR=#008000]?[/COLOR] [COLOR=#0600FF][B]false[/B][/COLOR] [COLOR=#008000]:[/COLOR] room[COLOR=#008000].[/COLOR][COLOR=#0000FF]CheckRights[/COLOR][COLOR=#008000]([/COLOR][COLOR=#0600FF][B]this[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Session[/COLOR], [COLOR=#0600FF][B]true[/B][/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000])[/COLOR]
[*]                [COLOR=#008000]{[/COLOR]
[*]                    RoomItem item [COLOR=#008000]=[/COLOR] room[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetRoomItemHandler[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]GetItem[/COLOR][COLOR=#008000]([/COLOR]ItemId[COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                    [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR][COLOR=#008000]([/COLOR]item [COLOR=#008000]==[/COLOR] [COLOR=#0600FF][B]null[/B][/COLOR] [COLOR=#008000]?[/COLOR] [COLOR=#0600FF][B]false[/B][/COLOR] [COLOR=#008000]:[/COLOR] item[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetBaseItem[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Name[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]StartsWith[/COLOR][COLOR=#008000]([/COLOR][COLOR=#666666]"tile_stackmagic"[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000])[/COLOR]
[*]                    [COLOR=#008000]{[/COLOR]
[*]                        [COLOR=#6666CC][B]string[/B][/COLOR] str [COLOR=#008000]=[/COLOR] [COLOR=#6666CC][B]string[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Concat[/COLOR][COLOR=#008000]([/COLOR][COLOR=#666666]"10"[/COLOR], [COLOR=#666666]"."[/COLOR], [COLOR=#666666]"00"[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                        [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR]Height[COLOR=#008000].[/COLOR][COLOR=#0000FF]ToString[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Length[/COLOR] [COLOR=#008000]==[/COLOR] [COLOR=#FF0000]3[/COLOR][COLOR=#008000])[/COLOR]
[*]                        [COLOR=#008000]{[/COLOR]
[*]                            str [COLOR=#008000]=[/COLOR] [COLOR=#6666CC][B]string[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Concat[/COLOR][COLOR=#008000]([/COLOR]Height[COLOR=#008000].[/COLOR][COLOR=#0000FF]ToString[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Substring[/COLOR][COLOR=#008000]([/COLOR][COLOR=#FF0000]0[/COLOR], [COLOR=#FF0000]1[/COLOR][COLOR=#008000])[/COLOR], [COLOR=#666666]"."[/COLOR], Height[COLOR=#008000].[/COLOR][COLOR=#0000FF]ToString[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Substring[/COLOR][COLOR=#008000]([/COLOR][COLOR=#FF0000]1[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                        [COLOR=#008000]}[/COLOR]
[*]                        [COLOR=#0600FF][B]else[/B][/COLOR] [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR]Height[COLOR=#008000].[/COLOR][COLOR=#0000FF]ToString[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Length[/COLOR] [COLOR=#008000]==[/COLOR] [COLOR=#FF0000]2[/COLOR][COLOR=#008000])[/COLOR]
[*]                        [COLOR=#008000]{[/COLOR]
[*]                            str [COLOR=#008000]=[/COLOR] [COLOR=#6666CC][B]string[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Concat[/COLOR][COLOR=#008000]([/COLOR][COLOR=#666666]"0"[/COLOR], [COLOR=#666666]"."[/COLOR], Height[COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                        [COLOR=#008000]}[/COLOR]
[*]                        [COLOR=#0600FF][B]else[/B][/COLOR] [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR]Height[COLOR=#008000].[/COLOR][COLOR=#0000FF]ToString[/COLOR][COLOR=#008000]([/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Length[/COLOR] [COLOR=#008000]==[/COLOR] [COLOR=#FF0000]1[/COLOR][COLOR=#008000])[/COLOR]
[*]                        [COLOR=#008000]{[/COLOR]
[*]                            str [COLOR=#008000]=[/COLOR] [COLOR=#6666CC][B]string[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Concat[/COLOR][COLOR=#008000]([/COLOR][COLOR=#666666]"0"[/COLOR], [COLOR=#666666]"."[/COLOR], [COLOR=#666666]"0"[/COLOR], Height[COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                        [COLOR=#008000]}[/COLOR]
[*]                        [COLOR=#0600FF][B]if[/B][/COLOR] [COLOR=#008000]([/COLOR][COLOR=#6666CC][B]double[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Parse[/COLOR][COLOR=#008000]([/COLOR]str[COLOR=#008000])[/COLOR] [COLOR=#008000]>[/COLOR] [COLOR=#FF0000]10[/COLOR][COLOR=#008000])[/COLOR]
[*]                        [COLOR=#008000]{[/COLOR]
[*]                            str [COLOR=#008000]=[/COLOR] [COLOR=#6666CC][B]string[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Concat[/COLOR][COLOR=#008000]([/COLOR][COLOR=#666666]"10"[/COLOR], [COLOR=#666666]"."[/COLOR], [COLOR=#666666]"00"[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                        [COLOR=#008000]}[/COLOR]
[*]                        item[COLOR=#008000].[/COLOR][COLOR=#0000FF]SetState[/COLOR][COLOR=#008000]([/COLOR]item[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetX[/COLOR], item[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetY[/COLOR], [COLOR=#6666CC][B]double[/B][/COLOR][COLOR=#008000].[/COLOR][COLOR=#0000FF]Parse[/COLOR][COLOR=#008000]([/COLOR]str[COLOR=#008000])[/COLOR], item[COLOR=#008000].[/COLOR][COLOR=#0000FF]GetAffectedTiles[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                        ServerMessage serverMessage [COLOR=#008000]=[/COLOR] [URL="http://*******/262930/http://www.google.com/search?q=new+msdn.microsoft.com"][COLOR=#008000]new[/COLOR][/URL] ServerMessage[COLOR=#008000]([/COLOR]Outgoing[COLOR=#008000].[/COLOR][COLOR=#0000FF]UpdateItemOnRoom[/COLOR][COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                        item[COLOR=#008000].[/COLOR][COLOR=#0000FF]Serialize[/COLOR][COLOR=#008000]([/COLOR]serverMessage[COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                        room[COLOR=#008000].[/COLOR][COLOR=#0000FF]SendMessage[/COLOR][COLOR=#008000]([/COLOR]serverMessage[COLOR=#008000])[/COLOR][COLOR=#008000];[/COLOR]
[*]                    [COLOR=#008000]}[/COLOR]
[*]                [COLOR=#008000]}[/COLOR]
[*]            [COLOR=#008000]}[/COLOR]
[*]        [COLOR=#008000]}[/COLOR]
[/LIST]


Screen:

Sql's:

Furniture:

Code:
INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `type`, `width`, `length`, `stack_height`, `can_stack`,`can_sit`, `is_walkable`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`,`allow_inventory_stack`, `interaction_type`, `interaction_modes_count`, `vending_ids`, `is_arrow`, `foot_figure`,`stack_multiplier`, `subscriber`, `effectid`, `height_adjustable`, `flat_id`, `revision`, `description`, `specialtype`,`canlayon`) VALUES(999888564, 'Stack Magic Tile', 'tile_stackmagic', 's', 1, 1, '0.00', '1', '0', '0', 5103, '1', '1', '1', '1', '1','default', 1, '0', '0', '0', '0', '0', 0, '0', -1, 45987, '¡Desafía las leyes de la física y crea maravillosas salas!',1, '0');Código SQL.INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `type`, `width`, `length`, `stack_height`, `can_stack`,`can_sit`, `is_walkable`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`,`allow_inventory_stack`, `interaction_type`, `interaction_modes_count`, `vending_ids`, `is_arrow`, `foot_figure`,`stack_multiplier`, `subscriber`, `effectid`, `height_adjustable`, `flat_id`, `revision`, `description`, `specialtype`,`canlayon`) VALUES(999888641, '2x1 Stack Magic Tile', 'tile_stackmagic1', 's', 2, 1, '0.00', '1', '0', '0', 5180, '1', '1', '1', '1', '1','default', 1, '0', '0', '0', '0', '0', 0, '0', -1, 46552, '¡Desafía las leyes de la física y crea maravillosas salas!',1, '0');Código SQL.INSERT INTO `furniture` (`id`, `public_name`, `item_name`, `type`, `width`, `length`, `stack_height`, `can_stack`,`can_sit`, `is_walkable`, `sprite_id`, `allow_recycle`, `allow_trade`, `allow_marketplace_sell`, `allow_gift`,`allow_inventory_stack`, `interaction_type`, `interaction_modes_count`, `vending_ids`, `is_arrow`, `foot_figure`,`stack_multiplier`, `subscriber`, `effectid`, `height_adjustable`, `flat_id`, `revision`, `description`, `specialtype`,`canlayon`) VALUES(999888642, '2x2 Stack Magic Tile', 'tile_stackmagic2', 's', 2, 2, '0.00', '1', '0', '0', 5181, '1', '1', '1', '1', '1','default', 1, '0', '0', '0', '0', '0', 0, '0', -1, 46552, '¡Desafía las leyes de la física y crea maravillosas salas!',1, '0');


CATALOG_PAGES:

Code:
INSERT INTO `catalog_pages` (`id`, `parent_id`, `caption`, `icon_color`, `icon_image`, `visible`, `enabled`, `min_rank`,`club_only`, `order_num`, `page_layout`, `page_headline`, `page_teaser`, `page_special`, `page_text1`, `page_text2`,`min_sub`, `page_text_details`, `page_text_teaser`, `vip_only`, `page_link_description`, `page_link_pagename`) VALUES(6, -1, 'Baldosas Mágicas', 1, 1085, '1', '1', 1, '0', 4, 'default_3x3', 'catalog_club_headline1','catalog_limited_teaser', '', '¿No podías crear salas porque las leyes físicas te lo impedían? ¡Olvídate de eso! ¡Llegan las nuevas baldosas apiladoras!', '', 0, 'Haz click en ellos para más información.', '', '0', '', '');


CATALOG_ITEMS:

Code:
INSERT INTO `catalog_items` (`id`, `page_id`, `item_ids`, `catalog_name`, `cost_credits`, `cost_belcredits`,`cost_duckets`, `amount`, `vip`, `achievement`, `song_id`, `limited_sells`, `limited_stack`, `offer_active`, `extradata`,`badge`, `flat_id`) VALUES(6778426, 6, '999888564', 'Baldosa Mágica 1x1', 5, 0, 0, 1, '0', 0, 0, 0, 0, '1', '', '', -1);Código SQL.INSERT INTO `catalog_items` (`id`, `page_id`, `item_ids`, `catalog_name`, `cost_credits`, `cost_belcredits`,`cost_duckets`, `amount`, `vip`, `achievement`, `song_id`, `limited_sells`, `limited_stack`, `offer_active`, `extradata`,`badge`, `flat_id`) VALUES(6778427, 6, '999888641', 'Baldosa Mágica 2x1', 5, 0, 0, 1, '0', 0, 0, 0, 0, '1', '', '', -1);Código SQL.INSERT INTO `catalog_items` (`id`, `page_id`, `item_ids`, `catalog_name`, `cost_credits`, `cost_belcredits`,`cost_duckets`, `amount`, `vip`, `achievement`, `song_id`, `limited_sells`, `limited_stack`, `offer_active`, `extradata`,`badge`, `flat_id`) VALUES(6778428, 6, '999888642', 'Baldosa Mágica 2x2', 5, 0, 0, 1, '0', 0, 0, 0, 0, '1', '', '', -1);

Credits:

- Sukis
- Skyblue
- AKIIX
- Custom
 
Last edited:
Custom Title Activated
Loyal Member
Joined
Jun 5, 2010
Messages
1,582
Reaction score
160
Fix for superban!

Replace your GameClient.cs with this:
Code:
using System;
using System.Collections.Generic;
using Silverwave.Core;
using Silverwave.HabboHotel.Misc;
using Silverwave.HabboHotel.Pathfinding;
using Silverwave.HabboHotel.Users;
using Silverwave.HabboHotel.Users.UserDataManagement;
using Silverwave.Messages;
using Silverwave.Net;
using Silverwave.Util;
using ConnectionManager;
using System.Drawing;
using HabboEncryption;
using Silverwave.Messages.Headers;
using System.Threading;
using System.Threading.Tasks;
using Database_Manager.Database.Session_Details.Interfaces;
using Silverwave.HabboHotel.Rooms;
using Silverwave.Communication.Interfaces;
using Silverwave.Communication.Packets.Outgoing.Rooms.Chat;
using Silverwave.Communication.Packets.Outgoing.Handshake;
namespace Silverwave.HabboHotel.GameClients
{
    public class GameClient
    {
        private uint Id;

        private ConnectionInformation Connection;
        private GameClientMessageHandler MessageHandler;

        private Habbo Habbo;

        internal DateTime TimePingedReceived;
        internal GamePacketParser packetParser;


        internal int DesignedHandler = 1;
        internal TaskFactory listaTareas = new TaskFactory();

        internal RC4 RC4Client = null;

        internal bool CryptoInitialized = false;

        internal uint ConnectionID
        {
            get
            {
                return Id;
            }
        }

        internal int CurrentRoomUserID;
        internal string MachineId;

        internal GameClient(uint ClientId, ConnectionInformation pConnection)
        {
            Id = ClientId;
            Connection = pConnection;
            CurrentRoomUserID = -1;
            packetParser = new GamePacketParser(this);
        }


        void SwitchParserRequest()
        {
            if (MessageHandler == null)
            {
                InitHandler();
            }
            packetParser.SetConnection(Connection);
            packetParser.onNewPacket += new GamePacketParser.HandlePacket(parser_onNewPacket);
            byte[] data = (Connection.parser as InitialPacketParser).currentData;
            Connection.parser.Dispose();
            Connection.parser = packetParser;
            Connection.parser.handlePacketData(data);
        }

        void parser_onNewPacket(ClientMessage Message)
        {
            try
            {
                MessageHandler.HandleRequest(Message);
            }
            catch (Exception e) { Logging.LogPacketException(Message.ToString(), e.ToString()); }
        }

        void PolicyRequest()
        {
            Connection.SendData(SilverwaveEnvironment.GetDefaultEncoding().GetBytes(CrossdomainPolicy.GetXmlPolicy()));
        }

        internal ConnectionInformation GetConnection()
        {
            return Connection;
        }

        internal GameClientMessageHandler GetMessageHandler()
        {
            return MessageHandler;
        }


        internal Habbo GetHabbo()
        {
            return Habbo;
        }

        internal void StartConnection()
        {
            if (Connection == null)
            {
                return;
            }

            TimePingedReceived = DateTime.Now;

            (Connection.parser as InitialPacketParser).PolicyRequest += new InitialPacketParser.NoParamDelegate(PolicyRequest);
            (Connection.parser as InitialPacketParser).SwitchParserRequest += new InitialPacketParser.NoParamDelegate(SwitchParserRequest);

            Connection.startPacketProcessing();
        }

        internal void InitHandler()
        {
            MessageHandler = new GameClientMessageHandler(this);
        }

        internal bool tryLogin(string AuthTicket)
        {
            try
            {
                string ip = GetConnection().getIp();
                byte errorCode = 0;
                UserData userData = UserDataFactory.GetUserData(AuthTicket, ip, out errorCode);
                if (errorCode == 1)
                {
                    SendNotifWithScroll(LanguageLocale.GetValue("login.invalidsso"));
                    return false;
                }
                else if (errorCode == 2)
                {
                    SendNotifWithScroll(LanguageLocale.GetValue("login.loggedin"));
                    return false;
                }

                SilverwaveEnvironment.GetGame().GetClientManager().RegisterClient(this, userData.userID, userData.user.Username);
                this.Habbo = userData.user;
                this.Habbo.SSOTicket = AuthTicket;
                userData.user.LoadData(userData);

                string banReason = SilverwaveEnvironment.GetGame().GetBanManager().GetBanReason(userData.user.Username, ip, MachineId);
                if (!string.IsNullOrEmpty(banReason) || userData.user.Username == null)
                {
                    SendNotifWithScroll(banReason);
                    Logging.WriteLine("Banned access from " + MachineId, ConsoleColor.Red);
                    using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                    {
                        dbClient.setQuery("SELECT ip_last FROM users WHERE id=" + this.GetHabbo().Id + " LIMIT 1");
                        string IP = dbClient.getString();
                        dbClient.setQuery("SELECT COUNT(0) FROM bans_access WHERE user_id=" + this.Habbo.Id + " LIMIT 1");
                        int Count = dbClient.getInteger();
                        if (Count > 0)
                        {
                            dbClient.runFastQuery("UPDATE bans_access SET attempts = attempts + 1, ip='" + IP + "' WHERE user_id=" + this.GetHabbo().Id + " LIMIT 1");
                        }
                        else
                        {
                            dbClient.runFastQuery("INSERT INTO bans_access (user_id, ip) VALUES (" + this.GetHabbo().Id + ", '" + IP + "')");
                        }
                    }
                    return false;
                }

                userData.user.Init(this, userData);

                QueuedServerMessage response = new QueuedServerMessage(Connection);

                ServerMessage UniqueId = new ServerMessage(Outgoing.UniqueID);
                UniqueId.AppendString(this.MachineId);
                response.appendResponse(UniqueId);

                response.appendResponse(new AuthenticationOKComposer());

                if (this.Habbo != null)
                {

                    ServerMessage HomeRoom1 = new ServerMessage(Outgoing.HomeRoom);
                    HomeRoom1.AppendInt32(this.Habbo.HomeRoom); // first home
                    HomeRoom1.AppendInt32(this.Habbo.HomeRoom); // current home
                    response.appendResponse(HomeRoom1);
                }


                ServerMessage MiniMail = new ServerMessage(Outgoing.SerializeMiniMailCount);
                MiniMail.AppendInt32(0);
                response.appendResponse(MiniMail);


                ServerMessage FavouriteRooms = new ServerMessage(Outgoing.FavouriteRooms);
                FavouriteRooms.AppendInt32(30); // max rooms
                FavouriteRooms.AppendInt32(userData.user.FavoriteRooms.Count);
                foreach (uint Id in userData.user.FavoriteRooms.ToArray())
                {
                    FavouriteRooms.AppendInt32(Id);
                }
                response.appendResponse(FavouriteRooms);

                if (this.GetHabbo().GetAvatarEffectsInventoryComponent() != null)
                    SendMessage(this.GetHabbo().GetAvatarEffectsInventoryComponent().Serialize());

                response.appendResponse(new UserRightsComposer((this.Habbo == null) ? 1 : this.Habbo.Rank));

                ServerMessage bools1 = new ServerMessage(Outgoing.bools1);
                bools1.AppendBoolean(true);
                bools1.AppendBoolean(false);
                response.appendResponse(bools1);

                ServerMessage StartConsole = new ServerMessage(Outgoing.EnableConsole);
                StartConsole.AppendBoolean(true);
                response.appendResponse(StartConsole);

                //PixelManager.GivePixels(this, 0);

                ServerMessage mClient = new ServerMessage(Outgoing.ActivityPoints);
                mClient.AppendInt32(11); // ?
                mClient.AppendInt32(0);
                mClient.AppendInt32(Habbo.ActivityPoints);
                mClient.AppendInt32(1);
                mClient.AppendInt32(0);
                mClient.AppendInt32(2);
                mClient.AppendInt32(0);
                mClient.AppendInt32(3);
                mClient.AppendInt32(0);
                mClient.AppendInt32(4);
                mClient.AppendInt32(0); // Pixels
                mClient.AppendInt32(5);
                mClient.AppendInt32(Habbo.BelCredits);
                //seasonal currency
                mClient.AppendInt32(101);
                mClient.AppendInt32(0);
                mClient.AppendInt32(102);
                mClient.AppendInt32(0);
                mClient.AppendInt32(103);
                mClient.AppendInt32(0);
                mClient.AppendInt32(104);
                mClient.AppendInt32(0);
                mClient.AppendInt32(105);
                mClient.AppendInt32(Habbo.BelCredits);
                response.appendResponse(mClient);
                userData.user.UpdateCreditsBalance();


                ServerMessage Constructors = new ServerMessage(Outgoing.ConstructorsClubLimits);
                Constructors.AppendInt32(0);  //current used furni
                Constructors.AppendInt32(100);  //max furni
                Constructors.AppendInt32(20000);  // club timestamp ? ye
                response.appendResponse(Constructors);

                ServerMessage KeysEvent = new ServerMessage(Outgoing.HabboColoredKeysEvent);
                KeysEvent.AppendString("");
                KeysEvent.AppendString("");
                response.appendResponse(KeysEvent);

                if (userData.user.HasFuse("fuse_mod"))
                {
                    response.appendResponse(SilverwaveEnvironment.GetGame().GetModerationTool().SerializeTool());
                }

                response.sendResponse();

                if (!string.IsNullOrWhiteSpace(SilverwaveEnvironment.GetDBConfig().DBData["welcome_message"]))
                {
                    this.SendBroadcastMessage(SilverwaveEnvironment.GetDBConfig().DBData["welcome_message"]);
                }
                return true;

            }
            catch (UserDataNotFoundException)
            {
                SendNotifWithScroll("User not found or already logged in.");
            }
            catch (Exception e)
            {
                Logging.LogCriticalException("Bug duing user login: " + e.ToString());
            }
            return false;
        }
        internal void SendNotifWithScroll(string message)
        {
            ServerMessage notification = new ServerMessage(Outgoing.SendNotifWithScroll);
            notification.AppendInt32(1);
            notification.AppendString(message);
            SendMessage(notification);
        }

        internal void SendBroadcastMessage(string Message)
        {
            ServerMessage notif = new ServerMessage(Outgoing.BroadcastMessage);
            notif.AppendString(Message);
            notif.AppendString(""); // link
            SendMessage(notif);
        }

        internal void SendWhisper(string Message)
        {
            if (GetHabbo().CurrentRoom == null)
                return;
            RoomUser User = GetHabbo().CurrentRoom.GetRoomUserManager().GetRoomUserByHabbo(GetHabbo().Username);
            if (User == null)
                return;

            SendMessage(new WhisperComposer(User, Message, 0, User.LastBubble));
        }

        internal void SendNotif(string Message)
        {
            ServerMessage notif = new ServerMessage(Outgoing.SendNotif);
            notif.AppendString(Message);
            notif.AppendString(""); // link
            SendMessage(notif);

        }
        internal void SendNotificationWithPicture(string Message, string Title, string Picture, string Link = "", string LinkTitle = "")
        {
            ServerMessage Notification = new ServerMessage(Outgoing.BroadcastMessage);
            Notification.AppendString(Picture);
            Notification.AppendInt32((Link != "" ? 4 : 2));
            Notification.AppendString("title");
            Notification.AppendString(Title);
            Notification.AppendString("message");
            Notification.AppendString(Message);
            if (Link != "")
            {
                Notification.AppendString("linkUrl");
                Notification.AppendString(Link);
                Notification.AppendString("linkTitle");
                Notification.AppendString(LinkTitle);
            }
            this.SendMessage(Notification);
        }
        internal void Stop()
        {
            if (GetMessageHandler() != null)
                MessageHandler.Destroy();

            if (GetHabbo() != null)
                Habbo.OnDisconnect();
            CurrentRoomUserID = -1;

            this.MessageHandler = null;
            this.Habbo = null;
            this.Connection = null;
        }

        private bool Disconnected = false;

        internal void Disconnect()
        {
            if (GetHabbo() != null)// && GetHabbo().GetInventoryComponent() != null)
            {
                //GetHabbo().GetInventoryComponent().RunDBUpdate();

                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                {
                    dbClient.runFastQuery(GetHabbo().GetQueryString);
                }

                GetHabbo().OnDisconnect();
            }


            if (!Disconnected)
            {
                if (Connection != null)
                    Connection.Dispose();
                Disconnected = true;
            }
        }

        internal void SendMessage(IServerPacket Message)
        {
            byte[] bytes = Message.GetBytes();

            if (Message == null)
                return;
            if (GetConnection() == null)
                return;

            GetConnection().SendData(bytes);
        }
    }
}

Be sure the use the command as :superban <username> <reason>
If you dont fill in a reasion it wont work, because the SQL needs picks the reason.

Credits: Spot Ify
 
Junior Spellweaver
Joined
Dec 28, 2011
Messages
185
Reaction score
59
Anyone know how to get ad_furni to work in plus r2? table room_ads
 
R.I.P Millercent
Loyal Member
Joined
Nov 6, 2012
Messages
2,230
Reaction score
314
Easy to tell this thread has gone to poop house..

The room bug is where the name shows as "..." and you can't edit the settings. If you place furni, it will disappear after a while as well.
 
Experienced Elementalist
Joined
Nov 16, 2009
Messages
204
Reaction score
12
Easy to tell this thread has gone to poop house..

The room bug is where the name shows as "..." and you can't edit the settings. If you place furni, it will disappear after a while as well.

Yeah, and when you delete a group the room name shows a "..." and you can't do poop in the room, too..
 
Custom Title Activated
Loyal Member
Joined
Jun 5, 2010
Messages
1,582
Reaction score
160
Well, this has to do with the bug i posted (room bugg).

MySQL error:
Code:
Error in query: 
DELETE FROM `chatlogs` WHERE `user_id` = '56', `room_id` = '50', `message` = 'ahhaa.', `timestamp` = '1399052144'
MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `room_id` = '50', `message` = 'ahhaa.', `timestamp` = '1399052144'' at line 1
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at Database_Manager.Database.Session_Details.QueryAdapter.runQuery() in c:\Users\Administrator\Downloads\Server\Silverwave Emulator\DatabaseManager\Database_Manager\Database\Session_Details\QueryAdapter.cs:line 193

Thread error:
Code:
Error in thread Room cycle task for room 48: 
System.NullReferenceException: Object reference not set to an instance of an object.
   at Silverwave.HabboHotel.Rooms.RoomUserManager.OnCycle(Int32& idleCount) in c:\Users\Administrator\Downloads\Server\Silverwave Emulator\HabboHotel\Rooms\RoomUserManager.cs:line 1526
   at Silverwave.HabboHotel.Rooms.Room.ProcessRoom() in c:\Users\Administrator\Downloads\Server\Silverwave Emulator\HabboHotel\Rooms\Room.cs:line 871
 
Last edited:
Status
Not open for further replies.
Back
Top