Only this time then ;s
Maybe this could help http://forum.ragezone.com/f353/orion...0-plus-991008/
Only this time then ;s
Maybe this could help http://forum.ragezone.com/f353/orion...0-plus-991008/
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:
Now find internal RoomData CreateRoom(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(); } }
and replace the whole function with:
* ow, I believe the code below was fucked up by the forum. The "@" parameters were replaced by mentions
Now, how to fix room entering?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; }
Search for:
And below that you put:Code:ServerMessage Message = new ServerMessage(Outgoing.HeightMap); Message.AppendBoolean(false);
done :DCode:Message.AppendInt32(-1); // Walls height, new structure fixed by Finn
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.
Nice release, there's time I don't see this section with so many decent threads. Nice job!
@MrPudding updating the thread thanks for this mate ;)
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(); }
Okay guys here is the fix for chatlogs, since everyone is lazy .. ;)
Find: internal static ServerMessage SerializeRoomChatlog
Replace the whole function with:
EDIT: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; }
Ow, I forgot!!!!!!!
Add to ServerMessage.cs :
Screen:Code:public void AppendByte(int i) { this.AppendBytes(new byte[] { (byte)i }, false); }
don't forgot to give Rep++ ;D
Last edited by MrPudding; 01-06-14 at 05:26 AM. Reason: forgot appendbyte
Hey guys, When I walk into a room the game crashes and then immediately drops the server
Bugs:
Enter room when purche group
group items page
My profil dc
People don't let this thread getting closed... By asking for help.
Post your help questions here : http://forum.ragezone.com/f333/
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++ }