Plus Emulator Revision RB3.0 [Community Project]

Page 4 of 50 FirstFirst 12345678910111214 ... LastLast
Results 46 to 60 of 740
  1. #46
    Account Upgraded | Title Enabled! Jamal7 is offline
    MemberRank
    Dec 2013 Join Date
    547Posts

    Re: RELEASE63-201405071257-197450526 - PlusR2

    Quote Originally Posted by taked View Post
    im italian please link you????
    Only this time then ;s
    Maybe this could help http://forum.ragezone.com/f353/orion...0-plus-991008/

  2. #47
    Proficient Member MrPudding is offline
    MemberRank
    Jul 2013 Join Date
    GermanyLocation
    174Posts

    wink Re: RELEASE63-201405071257-197450526 - PlusR2

    Okay everyone here are the fixes for creating rooms and entering rooms.
    I am from KekoMundo, however I will not post these fixes there because those people are just stupid.

    Create Room:

    Replace the CreateRoom() void with this one:
    Code:
    internal void CreateRoom()
            {
    // New structure fixed by Finn
    
                string Name = this.Request.PopFixedString();
                string Description = this.Request.PopFixedString();
                string RoomModel = this.Request.PopFixedString();
                int Category = this.Request.PopWiredInt32();
                int MaxVisitors = this.Request.PopWiredInt32();
                int TradeState = this.Request.PopWiredInt32();
    
    
                RoomData Data = SilverwaveEnvironment.GetGame().GetRoomManager().CreateRoom(this.Session, Name, Description, RoomModel, Category, MaxVisitors);
                if (Data != null)
                {
                    this.Response.Init(Outgoing.OnCreateRoomInfo);
                    this.Response.AppendInt32(Data.Id);
                    this.Response.AppendString(Data.Name);
                    this.SendResponse();
                }
            }
    Now find internal RoomData CreateRoom(
    and replace the whole function with:
    * ow, I believe the code below was fucked up by the forum. The "@" parameters were replaced by mentions
    Code:
    internal RoomData CreateRoom(GameClient Session, string Name, string Desc, string Model, int Category, int MaxVisitors)
            {
            // New structure fixed by Finn
            
                if (!this.roomModels.ContainsKey(Model))
                {
                    Session.SendNotif("Room Model was not found.");
                    return null;
                }
                if (Name.Length < 3)
                {
                    Session.SendNotif("The Room name is too short...");
                    return null;
                }
    
    
                uint RoomId = 0;
                using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
                {
                    dbClient.setQuery("INSERT INTO rooms (roomtype,caption,description,owner,model_name,category,users_max) VALUES ('private', @Caption , @desc , @username , @model , @cat , @usmax)");
                    dbClient.addParameter("caption", Name);
                    dbClient.addParameter("desc", Desc);
                    dbClient.addParameter("username", Session.GetHabbo().Username);
                    dbClient.addParameter("model", Model);
                    dbClient.addParameter("cat", Category);
                    dbClient.addParameter("usmax", MaxVisitors);
                    RoomId = (uint)dbClient.insertQuery();
                }
                RoomData Data = this.GenerateRoomData(RoomId);
                Session.GetHabbo().UsersRooms.Add(Data);
                return Data;
            }
    Now, how to fix room entering?
    Search for:
    Code:
    ServerMessage Message = new ServerMessage(Outgoing.HeightMap);
    Message.AppendBoolean(false);
    And below that you put:
    Code:
    Message.AppendInt32(-1); // Walls height, new structure fixed by Finn
    done :D
    I would like some rep++

    MAKE SURE
    Outgoing.SerializeWallItems IS 395
    and not that crappy 0xFFF
    Last edited by MrPudding; 01-06-14 at 12:47 AM.

  3. #48
    Evil Italian Overlowrd Droppy is offline
    [Internal Coder]Rank
    Feb 2012 Join Date
    /home/droppyLocation
    2,047Posts

    Re: RELEASE63-201405071257-197450526 - PlusR2

    Nice release, there's time I don't see this section with so many decent threads. Nice job!

  4. #49
    Account Upgraded | Title Enabled! Jamal7 is offline
    MemberRank
    Dec 2013 Join Date
    547Posts

    Re: RELEASE63-201405071257-197450526 - PlusR2

    @MrPudding updating the thread thanks for this mate ;)

  5. #50
    Enthusiast Kyess is offline
    MemberRank
    Jan 2014 Join Date
    37Posts

    Re: RELEASE63-201405071257-197450526 - PlusR2

    structure chatlog mt:
    Code:
    public function _-3z7(_arg1:String, _arg2:int, _arg3:int, _arg4:Array, _arg5:Dictionary):void        {
                var k:ChatRecordData;
                var k:_-39d;
                var k:Boolean;
                var k:int;
                var k:int;
                var k:_-39d;
                if (this._disposed)
                {
                    return;
                };
                if ((((_arg2 == WindowTracker._-33U)) && (!((_arg3 == this._-63p._-4Un)))))
                {
                    return;
                };
                if (_arg2 == WindowTracker._-3Kf)
                {
                };
                for each (k in _arg4)
                {
                    for each (k in k.chatlog)
                    {
                        k = true;
                        k = -1;
                        k = 0;
                        while (k < this._-1V6.length)
                        {
                            k = this._-1V6[k];
                            if (k._-4wf == k._-4wf)
                            {
                                k = false;
                                break;
                            };
                            if ((((k == -1)) && ((k._-1cA < k._-1cA))))
                            {
                                break;
                            };
                            k++;
                        };
                        if (k)
                        {
                            if (k == -1)
                            {
                                this._-1V6.push(k);
                            } else
                            {
                                this._-1V6.splice(k, 0, k);
                            };
                        };
                    };
                };
                this._-4SH();
            }

  6. #51
    Proficient Member MrPudding is offline
    MemberRank
    Jul 2013 Join Date
    GermanyLocation
    174Posts

    note Re: New Structure - PlusR2 [Updated]

    Okay guys here is the fix for chatlogs, since everyone is lazy .. ;)

    Find: internal static ServerMessage SerializeRoomChatlog

    Replace the whole function with:

    Code:
                internal static ServerMessage SerializeRoomChatlog(uint roomID)
            {
                // NEW CHATLOGS [March 2014] Coded by Finn
                // Please don't remove credits, this took me some time to do... :(
                // Credits to Itachi for the structure's "context" enigma :D
    
    
                ServerMessage Message = new ServerMessage();
                           RoomData Room = SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(roomID);
                if (Room == null)
                {
                    throw new NullReferenceException("No room found.");
                }
    
    
                Message.Init(Outgoing.RoomChatlog);
                Message.AppendByte(1);
                Message.AppendShort(2);
                Message.AppendString("roomName");
                Message.AppendByte(2);
                Message.AppendString(Room.Name);
                Message.AppendString("roomId");
                Message.AppendByte(1);
                Message.AppendInt32(Room.Id);
    
    
                Message.AppendShort(Room.RoomChat.Count);
                Room.RoomChat.Reverse();
                foreach (Chatlog Log in Room.RoomChat)
                {
                    Habbo Habbo = SilverwaveEnvironment.getHabboForId(Log.UserId);
                    DateTime Date = SilverwaveEnvironment.UnixToDateTime(Log.Timestamp);
                    if (Habbo == null)
                    {
                        Message.AppendInt32((DateTime.Now - Date).Seconds);
                        Message.AppendInt32(Log.UserId);
                        Message.AppendString("*User not found*");
                        Message.AppendString(Log.Message);
                        Message.AppendBoolean(true);
                    }
                    else
                    {
                        Message.AppendInt32((DateTime.Now - Date).Seconds);
                        Message.AppendInt32(Habbo.Id);
                        Message.AppendString(Habbo.Username);
                        Message.AppendString(Log.Message);
                        Message.AppendBoolean(false); // Text is bold
                    }
                }
                Room.RoomChat.Reverse();
                return Message;
            }
    EDIT:
    Ow, I forgot!!!!!!!
    Add to ServerMessage.cs :

    Code:
                public void AppendByte(int i)
            {
                this.AppendBytes(new byte[] { (byte)i }, false);
            }
    Screen:



    don't forgot to give Rep++ ;D
    Last edited by MrPudding; 01-06-14 at 05:26 AM. Reason: forgot appendbyte

  7. #52
    Member TheWulles is offline
    MemberRank
    Jan 2014 Join Date
    SP - BrazilLocation
    53Posts

    Re: New Structure - PlusR2 [Updated]

    Hey guys, When I walk into a room the game crashes and then immediately drops the server

  8. #53
    Member MichaeelS is offline
    MemberRank
    Jul 2012 Join Date
    95Posts

    Re: New Structure - PlusR2 [Updated]

    Quote Originally Posted by MrPudding View Post
    Okay guys here is the fix for chatlogs, since everyone is lazy .. ;)

    Find: internal static ServerMessage SerializeRoomChatlog

    Replace the whole function with:

    Code:
                internal static ServerMessage SerializeRoomChatlog(uint roomID)
            {
                // NEW CHATLOGS [March 2014] Coded by Finn
                // Please don't remove credits, this took me some time to do... :(
                // Credits to Itachi for the structure's "context" enigma :D
    
    
                ServerMessage Message = new ServerMessage();
                           RoomData Room = SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(roomID);
                if (Room == null)
                {
                    throw new NullReferenceException("No room found.");
                }
    
    
                Message.Init(Outgoing.RoomChatlog);
                Message.AppendByte(1);
                Message.AppendShort(2);
                Message.AppendString("roomName");
                Message.AppendByte(2);
                Message.AppendString(Room.Name);
                Message.AppendString("roomId");
                Message.AppendByte(1);
                Message.AppendInt32(Room.Id);
    
    
                Message.AppendShort(Room.RoomChat.Count);
                Room.RoomChat.Reverse();
                foreach (Chatlog Log in Room.RoomChat)
                {
                    Habbo Habbo = SilverwaveEnvironment.getHabboForId(Log.UserId);
                    DateTime Date = SilverwaveEnvironment.UnixToDateTime(Log.Timestamp);
                    if (Habbo == null)
                    {
                        Message.AppendInt32((DateTime.Now - Date).Seconds);
                        Message.AppendInt32(Log.UserId);
                        Message.AppendString("*User not found*");
                        Message.AppendString(Log.Message);
                        Message.AppendBoolean(true);
                    }
                    else
                    {
                        Message.AppendInt32((DateTime.Now - Date).Seconds);
                        Message.AppendInt32(Habbo.Id);
                        Message.AppendString(Habbo.Username);
                        Message.AppendString(Log.Message);
                        Message.AppendBoolean(false); // Text is bold
                    }
                }
                Room.RoomChat.Reverse();
                return Message;
            }
    EDIT:
    Ow, I forgot!!!!!!!
    Add to ServerMessage.cs :

    Code:
                public void AppendByte(int i)
            {
                this.AppendBytes(new byte[] { (byte)i }, false);
            }
    Screen:



    don't forgot to give Rep++ ;D
    fix habbo club pls? and bubble color chat not change color

  9. #54
    Only God Can Judge Me Jiozx is offline
    MemberRank
    Nov 2009 Join Date
    Weird WorldLocation
    253Posts

    Re: New Structure - PlusR2 [Updated]

    Quote Originally Posted by MichaeelS View Post
    fix habbo club pls? and bubble color chat not change color
    It's best if we just give him time. Some people doesn't like to keep getting messages about to post fixes.

  10. #55
    Member MichaeelS is offline
    MemberRank
    Jul 2012 Join Date
    95Posts

    Re: New Structure - PlusR2 [Updated]

    Quote Originally Posted by Jiozx View Post
    It's best if we just give him time. Some people doesn't like to keep getting messages about to post fixes.
    ..... important fix for change look

  11. #56
    Account Upgraded | Title Enabled! HotelMaker is offline
    MemberRank
    Dec 2012 Join Date
    288Posts

    Re: New Structure - PlusR2 [Updated]

    Bugs:
    Enter room when purche group
    group items page
    My profil dc

  12. #57
    Account Upgraded | Title Enabled! Jamal7 is offline
    MemberRank
    Dec 2013 Join Date
    547Posts

    Re: New Structure - PlusR2 [Updated]

    People don't let this thread getting closed... By asking for help.

    Post your help questions here : http://forum.ragezone.com/f333/

  13. #58
    No need of reading this Rush Retros is offline
    MemberRank
    Dec 2013 Join Date
    DenmarkLocation
    365Posts

    Re: New Structure - PlusR2 [Updated]


  14. #59
    Unspoiled Perfection AKllX is offline
    MemberRank
    Aug 2007 Join Date
    @ akllxprojectLocation
    366Posts

    Re: New Structure - PlusR2 [Updated]

    Complete reversed chatlog, might be usefull

    Code:
    List rooms
    int userId = readint
    string userName = readstring
    int roomsNumber = readint
    
    
    rooms = new list(roomsNumber)
    
    
    int roomsCounter =0;
    while(roomsCounter < roomsNumber)
    {
        //Chat Record Data
        //Notice that each ChatRecordData has it's own context and chatlog
        //For every room that the user has been you will have a ChatRecordData
        //Appending a post from a group forum is a possibility (they have website forums)
        
        new hashtable context // must be hashtable;
        new List<Chatlogs> chatlogs
        
        byte chatDataType = readbyte  //0-4
        // type 0 = nothing
        // type 1 = roomChatlog
        // type 2 = IM Session  : Internal mods chat ?
        // type 3 = Forum Thread
        // type 4 = Forum Message  : Website forum or group forum ?
        // Notice that both in-game chat messages and forum messages will look the same client-side speaking
        // There is a in-game tool in which the mod can delete a forum post or thread
        // A mod cannot delete a room chatlog in oposite to forum messages
        
       short contextNumber = readshort
       short contextCounter = 0;
       
       while(contextCounter < contextNumber)
       {
            string contextKey = readstring
            // keys: {roomName,groupId,threadId,messageId,roomId}
            int contextDataType = (int)readbyte
            switch(contextDataType)
            {
                case 0:
                    context[contextKey] = readbool
                    break
                case 1:
                    context[contextKey] = readint
                    break
                case 2:
                    context[contextKey] = readstring
                    break
                deafult:
                    Unknown data type    
            }
            k++;
       }
       
       //finally, you append the chatlog list
       //Each context data is associed to only one chatlog list
        
        int chatlogsNumber = (int)readshort  // 0-65535
        int chatlogsCounter = 0;
        while(chatlogsCounter < chatlogsNumber)
        {
            //notice that you are appending the chat for everyone in the room/thread
            //if the userId is the same as the reported user that you are browing, the chat color should change
            int timestamp = readint
            int userId  = readint  //0 if 'bot/pet'
            string userName = readstring
            string message = readstring
            bool colorBool = readbool //defines a color for something. Must test
            
            k++
        }
        roomsCounter++
    }

  15. #60
    Alpha Member Twan is offline
    MemberRank
    Jun 2010 Join Date
    1,961Posts

    Re: New Structure - PlusR2 [Updated]

    Quote Originally Posted by AKllX View Post
    Complete reversed chatlog, might be usefull

    Code:
    List rooms
    int userId = readint
    string userName = readstring
    int roomsNumber = readint
    
    
    rooms = new list(roomsNumber)
    
    
    int roomsCounter =0;
    while(roomsCounter < roomsNumber)
    {
        //Chat Record Data
        //Notice that each ChatRecordData has it's own context and chatlog
        //For every room that the user has been you will have a ChatRecordData
        //Appending a post from a group forum is a possibility (they have website forums)
        
        new hashtable context // must be hashtable;
        new List<Chatlogs> chatlogs
        
        byte chatDataType = readbyte  //0-4
        // type 0 = nothing
        // type 1 = roomChatlog
        // type 2 = IM Session  : Internal mods chat ?
        // type 3 = Forum Thread
        // type 4 = Forum Message  : Website forum or group forum ?
        // Notice that both in-game chat messages and forum messages will look the same client-side speaking
        // There is a in-game tool in which the mod can delete a forum post or thread
        // A mod cannot delete a room chatlog in oposite to forum messages
        
       short contextNumber = readshort
       short contextCounter = 0;
       
       while(contextCounter < contextNumber)
       {
            string contextKey = readstring
            // keys: {roomName,groupId,threadId,messageId,roomId}
            int contextDataType = (int)readbyte
            switch(contextDataType)
            {
                case 0:
                    context[contextKey] = readbool
                    break
                case 1:
                    context[contextKey] = readint
                    break
                case 2:
                    context[contextKey] = readstring
                    break
                deafult:
                    Unknown data type    
            }
            k++;
       }
       
       //finally, you append the chatlog list
       //Each context data is associed to only one chatlog list
        
        int chatlogsNumber = (int)readshort  // 0-65535
        int chatlogsCounter = 0;
        while(chatlogsCounter < chatlogsNumber)
        {
            //notice that you are appending the chat for everyone in the room/thread
            //if the userId is the same as the reported user that you are browing, the chat color should change
            int timestamp = readint
            int userId  = readint  //0 if 'bot/pet'
            string userName = readstring
            string message = readstring
            bool colorBool = readbool //defines a color for something. Must test
            
            k++
        }
        roomsCounter++
    }
    Where do i have to add this?



Advertisement