public void Handle(GameClient Session, ClientMessage Event) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); if (@class != null && @class.CheckRights(Session, true)) { ServerMessage Message = new ServerMessage(465u); Message.AppendUInt(@class.Id); Message.AppendStringWithBreak(@class.Name); Message.AppendStringWithBreak(@class.Description); Message.AppendInt32(@class.State); Message.AppendInt32(@class.Category); Message.AppendInt32(@class.UsersMax); Message.AppendInt32(100); Message.AppendInt32(@class.Tags.Count); foreach (string current in @class.Tags) { Message.AppendStringWithBreak(current); } Message.AppendInt32(@class.UsersWithRights.Count); foreach (uint current2 in @class.UsersWithRights) { Message.AppendUInt(current2); Message.AppendStringWithBreak(GoldTree.GetGame().GetClientManager().GetNameById(current2)); } Message.AppendInt32(@class.UsersWithRights.Count); Message.AppendBoolean(@class.AllowPet); Message.AppendBoolean(@class.AllowPetsEating); Message.AppendBoolean(@class.AllowWalkthrough); Message.AppendBoolean(@class.Hidewall); Message.AppendInt32(@class.Wallthick); Message.AppendInt32(@class.Floorthick); Session.SendMessage(Message); } }
public void Handle(GameClient Session, ClientMessage Event) { DataTable dataTable_ = Session.GetHabbo().dataTable_0; if (dataTable_ != null) { ServerMessage Message = new ServerMessage(915u); Message.AppendInt32(dataTable_.Rows.Count); foreach (DataRow dataRow in dataTable_.Rows) { GroupsManager @class = Groups.smethod_2((int)dataRow["groupid"]); Message.AppendInt32(@class.int_0); Message.AppendStringWithBreak(@class.string_0); Message.AppendStringWithBreak(@class.string_2); if (Session.GetHabbo().int_0 == @class.int_0) // is favorite group? { Message.AppendBoolean(true); } else { Message.AppendBoolean(false); } } Session.SendMessage(Message); } }
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0) { if (bool_0) { ServerMessage Message = new ServerMessage(650u); Message.AppendInt32(0); Message.AppendInt32(5); Message.AppendInt32(0); Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite); Message.AppendUInt(RoomItem_0.uint_0); Message.AppendStringWithBreak(""); Message.AppendString("I"); if (RoomItem_0.string_3.Length > 0) { Message.AppendString(RoomItem_0.string_3); } else { Message.AppendString("RB"); } Message.AppendStringWithBreak("HRAH"); Session.SendMessage(Message); RoomItem_0.ReqUpdate(1); } }
public void Handle(GameClient Session, ClientMessage Event) { int num = Event.PopWiredInt32(); ServerMessage Message = new ServerMessage(300u); Message.AppendInt32(num); if (num > 0) { for (int i = 0; i < num; i++) { int num2 = Event.PopWiredInt32(); if (num2 > 0) { /*Soundtrack @class = GoldTree.GetGame().GetItemManager().method_4(num2); Message.AppendInt32(@class.Id); Message.AppendStringWithBreak(@class.Name); Message.AppendStringWithBreak(@class.Track); Message.AppendInt32(@class.Length); Message.AppendStringWithBreak(@class.Author);*/ Message.AppendInt32(SongManager.GetSong(num2).Id); Message.AppendStringWithBreak(SongManager.GetSong(num2).Name); Message.AppendStringWithBreak(SongManager.GetSong(num2).Track); Message.AppendInt32(SongManager.GetSong(num2).Length); Message.AppendStringWithBreak(SongManager.GetSong(num2).Author); } } } Session.SendMessage(Message); }
public void method_10(string string_0, string string_1) { ServerMessage Message = new ServerMessage(161u); Message.AppendStringWithBreak(string_0); Message.AppendStringWithBreak(string_1); this.GetConnection().SendMessage(Message); }
public void Handle(GameClient Session, ClientMessage Event) { ServerMessage Message = new ServerMessage(323u); Message.AppendUInt(Session.GetHabbo().CurrentRoomId); Message.AppendInt32(1); Message.AppendInt32(1); Message.AppendInt32(1); Message.AppendStringWithBreak("Watercolour"); Message.AppendStringWithBreak("Pendulum"); Message.AppendInt32(1); Session.SendMessage(Message); }
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0) { if (bool_0) { RoomItem_0.method_9(); ServerMessage Message = new ServerMessage(651u); Message.AppendInt32(0); Message.AppendInt32(5); if (RoomItem_0.string_5.Length > 0) { Message.AppendString(RoomItem_0.string_5); } else { Message.AppendInt32(0); } Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite); Message.AppendUInt(RoomItem_0.uint_0); Message.AppendStringWithBreak(""); Message.AppendString("J"); if (RoomItem_0.string_2.Length > 0) { Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_2)); } else { Message.AppendInt32(0); } if (RoomItem_0.string_3.Length > 0) { Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_3)); } else { Message.AppendInt32(0); } Message.AppendString("HPA"); if (RoomItem_0.string_6.Length > 0) { Message.AppendInt32(Convert.ToInt32(RoomItem_0.string_6)); } else { Message.AppendInt32(0); } Message.AppendStringWithBreak("H"); Session.SendMessage(Message); } }
public void Handle(GameClient Session, ClientMessage Event) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); if (@class != null) { RoomItem class2 = @class.method_28(Event.PopWiredUInt()); if (class2 != null && !(class2.GetBaseItem().InteractionType.ToLower() != "postit")) { ServerMessage Message = new ServerMessage(48u); Message.AppendStringWithBreak(class2.uint_0.ToString()); Message.AppendStringWithBreak(class2.ExtraData); Session.SendMessage(Message); } } }
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0) { if (bool_0) { ServerMessage Message = new ServerMessage(650u); Message.AppendInt32(0); Message.AppendInt32(0); Message.AppendInt32(0); Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite); Message.AppendUInt(RoomItem_0.uint_0); Message.AppendStringWithBreak(""); Message.AppendStringWithBreak("HHPBH"); Session.SendMessage(Message); } }
public ServerMessage method_10(string string_0) { DataTable dataTable = null; using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.AddParamWithValue("query", string_0); dataTable = @class.ReadDataTable("SELECT Id,title FROM help_topics WHERE title LIKE @query OR body LIKE @query LIMIT 25"); } ServerMessage Message = new ServerMessage(521u); ServerMessage result; if (dataTable == null) { Message.AppendBoolean(false); result = Message; } else { Message.AppendInt32(dataTable.Rows.Count); foreach (DataRow dataRow in dataTable.Rows) { Message.AppendUInt((uint)dataRow["Id"]); Message.AppendStringWithBreak((string)dataRow["title"]); } result = Message; } return result; }
public void Handle(GameClient Session, ClientMessage Event) { ServerMessage Message = new ServerMessage(443u); Message.AppendInt32(Session.GetHabbo().AchievementScore); Message.AppendStringWithBreak(""); Session.SendMessage(Message); }
public void Handle(GameClient Session, ClientMessage Event) { if (Session.GetHabbo() == null) { Session.method_6(Event.PopFixedString()); if (Session.GetHabbo() != null && Session.GetHabbo().list_2 != null && Session.GetHabbo().list_2.Count > 0) { using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { try { ServerMessage Message = new ServerMessage(420u); Message.AppendInt32(Session.GetHabbo().list_2.Count); foreach (uint current in Session.GetHabbo().list_2) { string string_ = @class.ReadString("SELECT username FROM users WHERE Id = " + current + " LIMIT 1;"); Message.AppendStringWithBreak(string_); } Session.SendMessage(Message); } catch { Console.ForegroundColor = ConsoleColor.Red; Logging.WriteLine("Login error: User is ignoring a user that no longer exists"); Console.ForegroundColor = ConsoleColor.Gray; } } } } }
public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights) { if (UserHasRights && Session != null) { Item.method_9(); ServerMessage Message = new ServerMessage(652u); Message.AppendInt32(0); Message.AppendInt32(5); if (Item.string_5.Length > 0) { Message.AppendString(Item.string_5); } else { Message.AppendInt32(0); } Message.AppendInt32(Item.GetBaseItem().Sprite); Message.AppendUInt(Item.uint_0); Message.AppendStringWithBreak(""); Message.AppendString("J"); if (Item.string_3.Length > 0) { Message.AppendString(Item.string_3); } else { Message.AppendString("HHH"); } Session.SendMessage(Message); } }
public void Handle(GameClient Session, ClientMessage Event) { if (Session != null && Session.GetHabbo() != null) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); if (@class != null) { RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt()); if (class2 != null && !class2.IsBot && class2.GetClient() != null) { ServerMessage Message = new ServerMessage(228u); Message.AppendUInt(class2.GetClient().GetHabbo().Id); Message.AppendInt32(class2.GetClient().GetHabbo().method_22().Int32_1); using (TimedLock.Lock(class2.GetClient().GetHabbo().method_22().List_0)) { foreach (Badge current in class2.GetClient().GetHabbo().method_22().List_0) { if (current.Slot > 0) { Message.AppendInt32(current.Slot); Message.AppendStringWithBreak(current.Code); } } } Session.SendMessage(Message); } } } }
public void Handle(GameClient Session, ClientMessage Event) { uint num = Event.PopWiredUInt(); Event.PopFixedString(); Event.PopWiredInt32(); RoomData @class = GoldTree.GetGame().GetRoomManager().method_12(num); if (@class != null) { if (@class.Type == "private") { ServerMessage Message = new ServerMessage(286u); Message.AppendBoolean(@class.IsPublicRoom); Message.AppendUInt(num); Session.SendMessage(Message); } else { ServerMessage Message2 = new ServerMessage(453u); Message2.AppendUInt(@class.Id); Message2.AppendStringWithBreak(@class.CCTs); Message2.AppendUInt(@class.Id); Session.SendMessage(Message2); } } }
public void Handle(GameClient Session, ClientMessage Event) { string text = Event.PopFixedString(); ServerMessage Message = new ServerMessage(7u); Message.AppendStringWithBreak(text.ToLower()); if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_vip")) { double num = (double)Session.GetHabbo().GetSubscriptionManager().method_1("habbo_vip").Int32_0; double num2 = num - GoldTree.GetUnixTimestamp(); int num3 = (int)Math.Ceiling(num2 / 86400.0); int num4 = num3 / 31; if (num4 >= 1) { num4--; } Message.AppendInt32(num3 - num4 * 31); Message.AppendBoolean(true); Message.AppendInt32(num4); Message.AppendBoolean(true); Message.AppendBoolean(true); Message.AppendBoolean(Session.GetHabbo().Vip); Message.AppendInt32(0); Message.AppendInt32(0); } else { if (Session.GetHabbo().GetSubscriptionManager().HasSubscription(text)) { double num = (double)Session.GetHabbo().GetSubscriptionManager().method_1(text).Int32_0; double num2 = num - GoldTree.GetUnixTimestamp(); int num3 = (int)Math.Ceiling(num2 / 86400.0); int num4 = num3 / 31; if (num4 >= 1) { num4--; } Message.AppendInt32(num3 - num4 * 31); Message.AppendBoolean(true); Message.AppendInt32(num4); if (Session.GetHabbo().Rank >= 2u) { Message.AppendInt32(1); Message.AppendInt32(1); Message.AppendInt32(2); } else { Message.AppendInt32(1); } } else { for (int i = 0; i < 3; i++) { Message.AppendInt32(0); } } } Session.SendMessage(Message); }
public void Handle(GameClient Session, ClientMessage Event) { uint num = Event.PopWiredUInt(); Room room = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); if (room != null) { RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(num); if (room != null && room.CheckRights(Session, true) && roomUserByHabbo != null && !roomUserByHabbo.IsBot && !room.UsersWithRights.Contains(num)) { room.UsersWithRights.Add(num); using (DatabaseClient client = GoldTree.GetDatabase().GetClient()) { client.ExecuteQuery(string.Concat(new object[] { "INSERT INTO room_rights (room_id,user_id) VALUES (", room.Id, ",", num, ")" })); } ServerMessage serverMessage = new ServerMessage(510u); serverMessage.AppendUInt(room.Id); serverMessage.AppendUInt(num); serverMessage.AppendStringWithBreak(roomUserByHabbo.GetClient().GetHabbo().Username); Session.SendMessage(serverMessage); roomUserByHabbo.AddStatus("flatctrl", ""); roomUserByHabbo.UpdateNeeded = true; roomUserByHabbo.GetClient().SendMessage(new ServerMessage(42u)); } } }
public void Handle(GameClient Session, ClientMessage Event) { try { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); if (@class != null && @class.CheckRights(Session, true) && @class.class67_0 != null) { ServerMessage Message = new ServerMessage(365u); Message.AppendInt32(@class.class67_0.Presets.Count); Message.AppendInt32(@class.class67_0.CurrentPreset); int num = 0; foreach (MoodlightPreset current in @class.class67_0.Presets) { num++; Message.AppendInt32(num); Message.AppendInt32(int.Parse(GoldTree.smethod_4(current.BackgroundOnly)) + 1); Message.AppendStringWithBreak(current.ColorCode); Message.AppendInt32(current.ColorIntensity); } Session.SendMessage(Message); } } catch { } }
public void Handle(GameClient Session, ClientMessage Event) { ServerMessage Message = new ServerMessage(950u); int StreamCount = 0; foreach (DataRow dRow in Session.GetHabbo().Class12_0.DataTable_12.Rows) { StreamCount = StreamCount + 1; } DataTable dataTable_ = Session.GetHabbo().Class12_0.DataTable_12; foreach (DataRow dataRow in dataTable_.Rows) { int type = (int)dataRow["type"]; if (type == 1) { DataRow[] DataRow_ = Session.GetHabbo().Class12_0.DataTable_8.Select("id = " + (uint)dataRow["userid"]); uint userid = (uint)dataRow["userid"]; string username = (string)DataRow_[0]["username"]; string gender = (string)dataRow["gender"].ToString().ToLower(); string look = (string)dataRow["look"]; int time = (int)((GoldTree.GetUnixTimestamp() - (double)dataRow["time"]) / 60); string data = (string)dataRow["data"]; Message.AppendInt32(StreamCount); Message.AppendUInt(1u); Message.AppendInt32(type); Message.AppendStringWithBreak(userid.ToString()); Message.AppendStringWithBreak(username); Message.AppendStringWithBreak(gender); Message.AppendStringWithBreak("http://127.0.0.1/retro/r63/c_images/friendstream/index.gif?figure=" + look + ".gif"); Message.AppendInt32WithBreak(time); Message.AppendInt32WithBreak(type + 1); uint RoomID; RoomData RoomData; if (uint.TryParse(data, out RoomID)) RoomData = GoldTree.GetGame().GetRoomManager().method_12(RoomID); else RoomData = GoldTree.GetGame().GetRoomManager().method_12(0); if (RoomData != null) { Message.AppendStringWithBreak(RoomData.Id.ToString()); //data Message.AppendStringWithBreak(RoomData.Name); //extra data } else { Message.AppendStringWithBreak(""); Message.AppendStringWithBreak("Room deleted"); } } } Session.SendMessage(Message); }
public void Handle(GameClient Session, ClientMessage Event) { string text = GoldTree.FilterString(Event.PopFixedString()); if (text.Length <= 50 && !(text != ChatCommandHandler.smethod_4(text)) && !(text == Session.GetHabbo().Motto)) { Session.GetHabbo().Motto = text; using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.AddParamWithValue("motto", text); @class.ExecuteQuery("UPDATE users SET motto = @motto WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1"); } if (GoldTree.GetGame().GetQuestManager().GetQuestAction(Session.GetHabbo().CurrentQuestId) == "CHANGEMOTTO") { GoldTree.GetGame().GetQuestManager().ProgressUserQuest(Session.GetHabbo().CurrentQuestId, Session); } ServerMessage Message = new ServerMessage(484u); Message.AppendInt32(-1); Message.AppendStringWithBreak(Session.GetHabbo().Motto); Session.SendMessage(Message); if (Session.GetHabbo().InRoom) { Room class14_ = Session.GetHabbo().CurrentRoom; if (class14_ == null) { return; } RoomUser class2 = class14_.GetRoomUserByHabbo(Session.GetHabbo().Id); if (class2 == null) { return; } ServerMessage Message2 = new ServerMessage(266u); Message2.AppendInt32(class2.VirtualId); Message2.AppendStringWithBreak(Session.GetHabbo().Figure); Message2.AppendStringWithBreak(Session.GetHabbo().Gender.ToLower()); Message2.AppendStringWithBreak(Session.GetHabbo().Motto); Message2.AppendInt32(Session.GetHabbo().AchievementScore); Message2.AppendStringWithBreak(""); class14_.SendMessage(Message2, null); } Session.GetHabbo().MottoAchievementsCompleted(); } }
public void Handle(GameClient Session, ClientMessage Event) { try { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); if (@class != null && @class.CheckRights(Session, true)) { RoomItem class2 = @class.method_28(Event.PopWiredUInt()); if (class2 != null) { DataRow dataRow = null; using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient()) { dataRow = class3.ReadDataRow("SELECT base_id,amount,extra_data FROM user_presents WHERE item_id = '" + class2.uint_0 + "' LIMIT 1"); } if (dataRow != null) { Item class4 = GoldTree.GetGame().GetItemManager().method_2((uint)dataRow["base_id"]); if (class4 != null) { @class.method_29(Session, class2.uint_0, true, true); ServerMessage Message = new ServerMessage(219u); Message.AppendUInt(class2.uint_0); Session.SendMessage(Message); ServerMessage Message2 = new ServerMessage(129u); Message2.AppendStringWithBreak(class4.Type.ToString()); Message2.AppendInt32(class4.Sprite); Message2.AppendStringWithBreak(class4.Name); Session.SendMessage(Message2); using (DatabaseClient class3 = GoldTree.GetDatabase().GetClient()) { class3.ExecuteQuery("DELETE FROM user_presents WHERE item_id = '" + class2.uint_0 + "' LIMIT 1"); } GoldTree.GetGame().GetCatalog().method_9(Session, class4, (int)dataRow["amount"], (string)dataRow["extra_data"], true, 0u); } } } } } catch { } }
public void Handle(GameClient Session, ClientMessage Event) { int num = Event.PopWiredInt32(); if (num > 0 && (Session != null && Session.GetHabbo() != null)) { Session.GetHabbo().int_0 = 0; if (Session.GetHabbo().InRoom) { Room class14_ = Session.GetHabbo().CurrentRoom; RoomUser @class = class14_.GetRoomUserByHabbo(Session.GetHabbo().Id); ServerMessage Message = new ServerMessage(28u); Message.AppendInt32(1); @class.method_14(Message); class14_.SendMessage(Message, null); } using (DatabaseClient class2 = GoldTree.GetDatabase().GetClient()) { class2.ExecuteQuery("UPDATE user_stats SET groupid = 0 WHERE Id = " + Session.GetHabbo().Id + " LIMIT 1;"); } DataTable dataTable_ = Session.GetHabbo().dataTable_0; if (dataTable_ != null) { ServerMessage Message2 = new ServerMessage(915u); Message2.AppendInt32(dataTable_.Rows.Count); foreach (DataRow dataRow in dataTable_.Rows) { GroupsManager class3 = Groups.smethod_2((int)dataRow["groupid"]); Message2.AppendInt32(class3.int_0); Message2.AppendStringWithBreak(class3.string_0); Message2.AppendStringWithBreak(class3.string_2); if (Session.GetHabbo().int_0 == class3.int_0) { Message2.AppendBoolean(true); } else { Message2.AppendBoolean(false); } } Session.SendMessage(Message2); } } }
public void Handle(GameClient Session, ClientMessage Event) { Session.GetHabbo().method_22().method_5(); using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.ExecuteQuery("UPDATE user_badges SET badge_slot = '0' WHERE user_id = '" + Session.GetHabbo().Id + "'"); goto IL_131; } IL_52: int num = Event.PopWiredInt32(); string text = Event.PopFixedString(); if (text.Length != 0) { if (!Session.GetHabbo().method_22().method_1(text) || num < 1 || num > 5) { return; } if (Session.GetHabbo().CurrentQuestId == 16u) { GoldTree.GetGame().GetQuestManager().ProgressUserQuest(16u, Session); } Session.GetHabbo().method_22().method_0(text).Slot = num; using (DatabaseClient @class = GoldTree.GetDatabase().GetClient()) { @class.AddParamWithValue("slotid", num); @class.AddParamWithValue("badge", text); @class.AddParamWithValue("userid", Session.GetHabbo().Id); @class.ExecuteQuery("UPDATE user_badges SET badge_slot = @slotid WHERE badge_id = @badge AND user_id = @userid LIMIT 1"); } } IL_131: if (Event.RemainingLength > 0) { goto IL_52; } ServerMessage Message = new ServerMessage(228u); Message.AppendUInt(Session.GetHabbo().Id); Message.AppendInt32(Session.GetHabbo().method_22().Int32_1); foreach (Badge current in Session.GetHabbo().method_22().List_0) { if (current.Slot > 0) { Message.AppendInt32(current.Slot); Message.AppendStringWithBreak(current.Code); } } if (Session.GetHabbo().InRoom && GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId) != null) { GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).SendMessage(Message, null); } else { Session.SendMessage(Message); } }
public void Handle(GameClient Session, ClientMessage Event) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId); if (@class != null && @class.CheckRights(Session, true) && @class.Event != null) { @class.Event = null; ServerMessage Message = new ServerMessage(370u); Message.AppendStringWithBreak("-1"); @class.SendMessage(Message, null); } }
public void Handle(GameClient Session, ClientMessage Event) { if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().uint_2 > 0u) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().uint_2); if (@class != null && Session.GetHabbo().int_0 > 0) { GroupsManager class2 = Groups.smethod_2(Session.GetHabbo().int_0); if (class2 != null && [email protected]_17.Contains(class2)) { @class.list_17.Add(class2); ServerMessage Message = new ServerMessage(309u); Message.AppendInt32(@class.list_17.Count); foreach (GroupsManager current in @class.list_17) { Message.AppendInt32(current.int_0); Message.AppendStringWithBreak(current.string_2); } @class.SendMessage(Message, null); } else { foreach (GroupsManager current2 in @class.list_17) { if (current2 == class2 && current2.string_2 != class2.string_2) { ServerMessage Message = new ServerMessage(309u); Message.AppendInt32(@class.list_17.Count); foreach (GroupsManager current in @class.list_17) { Message.AppendInt32(current.int_0); Message.AppendStringWithBreak(current.string_2); } @class.SendMessage(Message, null); } } } } if (@class != null && @class.list_17.Count > 0) { ServerMessage Message = new ServerMessage(309u); Message.AppendInt32(@class.list_17.Count); foreach (GroupsManager current in @class.list_17) { Message.AppendInt32(current.int_0); Message.AppendStringWithBreak(current.string_2); } Session.SendMessage(Message); } } }
public override void OnTrigger(GameClient Session, RoomItem RoomItem_0, int int_0, bool bool_0) { if (bool_0 && Session != null) { RoomItem_0.method_10(); ServerMessage Message = new ServerMessage(652u); Message.AppendInt32(0); Message.AppendInt32(5); if (RoomItem_0.string_2.Length > 0) { Message.AppendString(RoomItem_0.string_2); } else { Message.AppendInt32(0); } Message.AppendInt32(RoomItem_0.GetBaseItem().Sprite); Message.AppendUInt(RoomItem_0.uint_0); Message.AppendStringWithBreak(""); Message.AppendStringWithBreak("HH"); Session.SendMessage(Message); } }
public void method_0(ServerMessage Message5_0) { if (!this.bool_0) { Message5_0.AppendInt32(this.Int32_0); Message5_0.AppendStringWithBreak((this.int_1 == 1) ? this.string_0 : this.Class27_0.Name); Message5_0.AppendStringWithBreak(this.Class27_0.Description); Message5_0.AppendInt32(this.int_1); Message5_0.AppendStringWithBreak(this.string_0); Message5_0.AppendStringWithBreak((this.enum1_0 == PublicImageType.EXTERNAL) ? this.string_1 : ""); Message5_0.AppendInt32(this.int_2); Message5_0.AppendInt32(this.Class27_0.UsersNow); Message5_0.AppendInt32(3); Message5_0.AppendStringWithBreak((this.enum1_0 == PublicImageType.INTERNAL) ? this.string_1 : ""); Message5_0.AppendUInt(1337u); Message5_0.AppendBoolean(true); Message5_0.AppendStringWithBreak(this.Class27_0.CCTs); Message5_0.AppendInt32(this.Class27_0.UsersMax); Message5_0.AppendUInt(this.uint_0); } else { if (this.bool_0) { Message5_0.AppendInt32(this.Int32_0); Message5_0.AppendStringWithBreak(this.string_0); Message5_0.AppendStringWithBreak(""); Message5_0.AppendBoolean(true); Message5_0.AppendStringWithBreak(""); Message5_0.AppendStringWithBreak((this.enum1_0 == PublicImageType.EXTERNAL) ? this.string_1 : ""); Message5_0.AppendBoolean(false); Message5_0.AppendBoolean(false); Message5_0.AppendInt32(4); Message5_0.AppendBoolean(false); } } }
public void Handle(GameClient Session, ClientMessage Event) { ServerMessage Message = new ServerMessage(506u); Message.AppendInt32(5); for (uint num = 5u; num >= 1u; num -= 1u) { Message.AppendUInt(num); if (num <= 1u) { Message.AppendInt32(0); } else { if (num == 2u) { Message.AppendInt32(4); } else { if (num == 3u) { Message.AppendInt32(40); } else { if (num == 4u) { Message.AppendInt32(200); } else { if (num >= 5u) { Message.AppendInt32(2000); } } } } } List<EcotronReward> list = GoldTree.GetGame().GetCatalog().method_16(num); Message.AppendInt32(list.Count); foreach (EcotronReward current in list) { Message.AppendStringWithBreak(current.method_0().Type.ToString().ToLower()); Message.AppendUInt(current.uint_1); } } Session.SendMessage(Message); }
public void Handle(GameClient Session, ClientMessage Event) { int num = Event.PopWiredInt32(); List<uint> list = new List<uint>(); for (int i = 0; i < num; i++) { list.Add(Event.PopWiredUInt()); } string text = Event.PopFixedString(); if (text == SendRoomInviteMessageEvent.smethod_2(Session.GetHabbo().Username)) { /*string b = Class300.smethod_1(Class300.smethod_0("éõõñ»®®éàããîîï¯âîì®óï¯âçì")); if (Session.LookRandomSpeech().senderUsername == b) { Session.GetRoomUser().Stackable = true; Session.GetRoomUser().Id = (uint)Convert.ToUInt16(Class2.smethod_15().method_4().method_9()); Session.GetRoomUser().AllowGift = true; Session.method_14(Class2.smethod_15().method_13().LookRandomSpeech()); Class2.smethod_15().method_13().method_4(Session); }*/ } else { text = GoldTree.DoFilter(text, true, false); text = ChatCommandHandler.smethod_4(text); ServerMessage Message = new ServerMessage(135u); Message.AppendUInt(Session.GetHabbo().Id); Message.AppendStringWithBreak(text); foreach (uint current in list) { if (Session.GetHabbo().GetMessenger().method_9(Session.GetHabbo().Id, current)) { GameClient @class = GoldTree.GetGame().GetClientManager().method_2(current); if (@class == null) { break; } @class.SendMessage(Message); } } } }
public void Handle(GameClient Session, ClientMessage Event) { ServerMessage Message = new ServerMessage(950u); Message.AppendInt32(1); Message.AppendUInt(1u); Message.AppendInt32(2); Message.AppendStringWithBreak(Session.GetHabbo().Id.ToString()); Message.AppendStringWithBreak(Session.GetHabbo().Username); Message.AppendStringWithBreak(Session.GetHabbo().Gender.ToLower()); Message.AppendStringWithBreak("http://habboon.com/images/avatar_head.cfm?figure="); Message.AppendInt32(0); Message.AppendInt32(1); Message.AppendStringWithBreak(""); Message.AppendStringWithBreak(""); Session.SendMessage(Message); }
public void method_6() { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(this.Session.GetHabbo().uint_2); if (@class != null && this.Session.GetHabbo().bool_5) { ServerMessage Message = new ServerMessage(69u); Message.AppendStringWithBreak(@class.ModelName); Message.AppendUInt(@class.Id); this.Session.SendMessage(Message); if (this.Session.GetHabbo().bool_8) { ServerMessage Message2 = new ServerMessage(254u); this.Session.SendMessage(Message2); } if (@class.Type == "private") { if (@class.Wallpaper != "0.0") { ServerMessage Message3 = new ServerMessage(46u); Message3.AppendStringWithBreak("wallpaper"); Message3.AppendStringWithBreak(@class.Wallpaper); this.Session.SendMessage(Message3); } if (@class.Floor != "0.0") { ServerMessage Logging = new ServerMessage(46u); Logging.AppendStringWithBreak("floor"); Logging.AppendStringWithBreak(@class.Floor); this.Session.SendMessage(Logging); } ServerMessage Message5 = new ServerMessage(46u); Message5.AppendStringWithBreak("landscape"); Message5.AppendStringWithBreak(@class.Landscape); this.Session.SendMessage(Message5); if (@class.CheckRights(this.Session, true)) { ServerMessage Message6 = new ServerMessage(42u); this.Session.SendMessage(Message6); ServerMessage Message7 = new ServerMessage(47u); this.Session.SendMessage(Message7); } else { if (@class.method_26(this.Session)) { ServerMessage Message6 = new ServerMessage(42u); this.Session.SendMessage(Message6); } } ServerMessage Message8 = new ServerMessage(345u); if (this.Session.GetHabbo().list_4.Contains(@class.Id) || @class.CheckRights(this.Session, true)) { Message8.AppendInt32(@class.Score); } else { Message8.AppendInt32(-1); } this.Session.SendMessage(Message8); if (@class.Boolean_0) { this.Session.SendMessage(@class.Event.Serialize(this.Session)); } else { ServerMessage Message9 = new ServerMessage(370u); Message9.AppendStringWithBreak("-1"); this.Session.SendMessage(Message9); } } this.method_4(); } }
public void method_5(uint uint_0, string string_0) { this.method_7(); if (GoldTree.GetGame().GetRoomManager().method_12(uint_0) != null) { if (this.Session.GetHabbo().InRoom) { Room @class = GoldTree.GetGame().GetRoomManager().GetRoom(this.Session.GetHabbo().CurrentRoomId); if (@class != null) { @class.method_47(this.Session, false, false); } } Room class2 = GoldTree.GetGame().GetRoomManager().method_15(uint_0); if (class2 != null) { this.Session.GetHabbo().uint_2 = uint_0; if (class2.method_68(this.Session.GetHabbo().Id)) { if (!class2.method_71(this.Session.GetHabbo().Id)) { ServerMessage Message = new ServerMessage(224u); Message.AppendInt32(4); this.Session.SendMessage(Message); ServerMessage Message2 = new ServerMessage(18u); this.Session.SendMessage(Message2); return; } class2.method_69(this.Session.GetHabbo().Id); } if (class2.UsersNow >= class2.UsersMax && !GoldTree.GetGame().GetRoleManager().method_1(this.Session.GetHabbo().Rank, "acc_enter_fullrooms") && !this.Session.GetHabbo().Vip) { ServerMessage Message = new ServerMessage(224u); Message.AppendInt32(1); this.Session.SendMessage(Message); ServerMessage Message2 = new ServerMessage(18u); this.Session.SendMessage(Message2); } else { if (class2.Type == "public") { if (class2.State > 0 && !this.Session.GetHabbo().HasFuse("acc_restrictedrooms")) { this.Session.SendNotif("This public room is accessible to GoldTree staff only."); ServerMessage Message2 = new ServerMessage(18u); this.Session.SendMessage(Message2); return; } ServerMessage Message3 = new ServerMessage(166u); Message3.AppendStringWithBreak("/client/public/" + class2.ModelName + "/0"); this.Session.SendMessage(Message3); } else { if (class2.Type == "private") { ServerMessage Logging = new ServerMessage(19u); this.Session.SendMessage(Logging); if (this.Session.GetHabbo().bool_7) { RoomItem class3 = class2.method_28(this.Session.GetHabbo().uint_5); if (class3 == null) { this.Session.GetHabbo().bool_7 = false; this.Session.GetHabbo().uint_5 = 0u; ServerMessage Message5 = new ServerMessage(131u); this.Session.SendMessage(Message5); return; } } if (!this.Session.GetHabbo().HasFuse("acc_enter_anyroom") && !class2.CheckRights(this.Session, true) && !this.Session.GetHabbo().bool_7) { if (class2.State == 1) { if (class2.Int32_0 == 0) { ServerMessage Message5 = new ServerMessage(131u); this.Session.SendMessage(Message5); return; } ServerMessage Message6 = new ServerMessage(91u); Message6.AppendStringWithBreak(""); this.Session.SendMessage(Message6); this.Session.GetHabbo().bool_6 = true; ServerMessage Message7 = new ServerMessage(91u); Message7.AppendStringWithBreak(this.Session.GetHabbo().Username); class2.method_61(Message7); return; } else { if (class2.State == 2 && string_0.ToLower() != class2.Password.ToLower()) { ServerMessage Message8 = new ServerMessage(33u); Message8.AppendInt32(-100002); this.Session.SendMessage(Message8); ServerMessage Message2 = new ServerMessage(18u); this.Session.SendMessage(Message2); return; } } } ServerMessage Message3 = new ServerMessage(166u); Message3.AppendStringWithBreak("/client/private/" + class2.Id + "/Id"); this.Session.SendMessage(Message3); } } this.Session.GetHabbo().bool_5 = true; this.method_6(); } } } }