namespace Otaku.Virtual.Users { using Otaku; using Otaku.Managers; using Otaku.Socketservers; using Otaku.Virtual.Rooms; using Otaku.Virtual.Rooms.Games; using Otaku.Virtual.Rooms.Items; using Otaku.Virtual.Rooms.Pathfinding; using Otaku.Virtual.Users.Items; using Otaku.Virtual.Users.Messenger; using System; using System.Globalization; using System.Net.Sockets; using System.Runtime.CompilerServices; using System.Text; using System.Threading; public class virtualUser { internal int _alcohol; internal bool _clubMember; internal string _consoleMission; internal int _Credits; internal string _Figure; internal int _groupID; internal int _groupMemberRank; private int _handPage; internal bool _hasRights; internal int _health; internal bool _hostsEvent; internal int _hunger; internal bool _inPublicroom; private bool _isDisconnected; private bool _isLoggedIn; internal bool _isMuted; internal bool _isOwner; internal bool _isRoomStaff; internal string _Mission; internal string _nowBadge; internal byte _Rank; private bool _receivedSpriteIndex; internal bool _ROOMACCESS_PRIMARY_OK; internal bool _ROOMACCESS_SECONDARY_OK; internal int _roomID; internal char _Sex; internal int _TeamID; internal int _teleporterID; internal int _Tickets; internal bool _tradeAccept; internal int _tradeItemCount; internal int[] _tradeItems = new int[0x41]; internal int _tradePartnerRoomUID = -1; internal int _tradePartnerUID = -1; internal string _Username; private static Thread CaptureCheck; private int connectionID; private Socket connectionSocket; private byte[] dataBuffer = new byte[0x400]; internal Otaku.Virtual.Rooms.Games.gamePlayer gamePlayer; internal virtualMessenger Messenger; internal bool pingOK; internal virtualRoom Room; internal virtualRoomUser roomUser; private virtualSongEditor songEditor; internal virtualRoomUserStatusManager statusManager; internal int userID; public virtualUser(int connectionID, Socket connectionSocket) { this.connectionID = connectionID; this.connectionSocket = connectionSocket; try { string str = userManager.getBanReason(this.connectionRemoteIP); if (str != "") { this.sendData("@c" + str); this.Disconnect(); } else { this.pingOK = true; this.sendData("@@"); connectionSocket.BeginReceive(this.dataBuffer, 0, this.dataBuffer.Length, SocketFlags.None, new AsyncCallback(this.dataArrival), null); } } catch { } } internal void abortTrade() { if (((this.Room != null) && this.Room.containsUser(this._tradePartnerRoomUID)) && (this.roomUser != null)) { virtualUser user = this.Room.getUser(this._tradePartnerRoomUID); this.sendData("An"); this.refreshHand("update"); user.sendData("An"); user.refreshHand("update"); this._tradePartnerRoomUID = -1; this._tradeAccept = false; this._tradeItems = new int[0x41]; this._tradeItemCount = 0; this.statusManager.removeStatus("trd"); this.roomUser.Refresh(); user._tradePartnerRoomUID = -1; user._tradeAccept = false; user._tradeItems = new int[0x41]; user._tradeItemCount = 0; user.statusManager.removeStatus("trd"); user.roomUser.Refresh(); } } internal void CapturePoint() { int num = 0; while (((num < 0x65) && (this.roomUser.X == 8)) && ((this.roomUser.Y == 7) && (this.roomUser.roomID == 0x2b3c))) { this.Room.sendShout(this.roomUser, "..." + num + "..."); num++; switch (num) { case 50: userManager.sendData("BK" + this._Username + " is half way to capturing Ardashir!"); break; case 100: userManager.sendData("BK" + this._Username + " has captured Ardashir!"); break; } Thread.Sleep(0x1388); } } private void dataArrival(IAsyncResult iAr) { try { int num; int count = this.connectionSocket.EndReceive(iAr); string str = System.Text.Encoding.Default.GetString(this.dataBuffer, 0, count); if ((!str.Contains("\x0001") && !str.Contains("\x0002")) && (!str.Contains("\x0005") && !str.Contains("\t"))) { goto Label_009F; } this.Disconnect(); return; Label_006D: num = Otaku.Encoding.decodeB64(str.Substring(1, 2)); this.processPacket(str.Substring(3, num)); str = str.Substring(num + 3); Out.WriteTrace("Processing packet part"); Label_009F: if (str != "") { goto Label_006D; } this.connectionSocket.BeginReceive(this.dataBuffer, 0, this.dataBuffer.Length, SocketFlags.None, new AsyncCallback(this.dataArrival), null); } catch { this.Disconnect(); } } private void delDisconnectTimed(int ms) { this.connectionSocket.Shutdown(SocketShutdown.Receive); Thread.Sleep(ms); this.Disconnect(); } internal void Disconnect() { if (!this._isDisconnected) { try { this.connectionSocket.Close(); } catch { } this.connectionSocket = null; if ((this.Room != null) && (this.roomUser != null)) { this.Room.removeUser(this.roomUser.roomUID, false, ""); } if (this.Messenger != null) { this.Messenger.Clear(); } userManager.removeUser(this.userID); gameSocketServer.freeConnection(this.connectionID); this._isDisconnected = true; } } internal void Disconnect(int ms) { new timedDisconnector(this.delDisconnectTimed).BeginInvoke(ms, null, null); } private bool isSpeechCommand(string Text) { string[] s = Text.Split(new char[] { ' ' }); try { int num; virtualUser user; string str; virtualUser user2; string str2; virtualUser user3; virtualUser user4; string str3; int[] numArray; int[] numArray2; string str4; int num2; string str5; int[] numArray3; switch (s[0]) { case "commands": this.sendData("BKAvailable Commands:\r :about\r :poof\r :cleanhand\r :roomid\r :pickupall \r :stats \r :sleep"); goto Label_14E7; case "about": this.sendData("BKHolograph Emulator BETA"); goto Label_14E7; case "roomid": this.sendData("BKRoomID: " + this.roomUser.roomID); goto Label_14E7; case "location": this.sendData(string.Concat(new object[] { "BKRoomID: ", this.roomUser.roomID, "\rX: ", this.roomUser.X, "\rY:", this.roomUser.Y, "\rZ2:", this.roomUser.Z2 })); goto Label_14E7; case "fx": this.statusManager.addStatus("fx", Text.Substring(2)); goto Label_14E7; case "poof": this.refreshAppearance(true, true, true); goto Label_14E7; case "pickupall": if (!this._isOwner) { return false; } goto Label_0B51; case "cleanhand": DB.runQuery("DELETE FROM furniture WHERE ownerid = '" + this.userID + "' AND roomid = '0'"); this.refreshHand("new"); goto Label_14E7; case "poll": userManager.sendData("D|IYou have followed the draft, now tell me the code on the ice wall! Did you hear the sounds?!\x0002"); goto Label_14E7; case "capture": if (((this.roomUser.X == 8) && (this.roomUser.Y == 7)) && (this.roomUser.roomID == 0x2b3c)) { userManager.sendData("BK" + this._Username + " has begun capturing Ardashir!"); this.Room.sendShout(this.roomUser, "Capturing point..."); CaptureCheck = new Thread(new ThreadStart(this.CapturePoint)); CaptureCheck.Priority = ThreadPriority.BelowNormal; CaptureCheck.Start(); } goto Label_14E7; case "die": this._health = 0; this.KillUser(); goto Label_14E7; case "sleep": if (this.statusManager.containsStatus("lay")) { this.Room.sendShout(this.roomUser, "Zzzzz Zzzzz"); this._alcohol = 0; } goto Label_14E7; case "time": if (!rankManager.containsRight(this._Rank, "fuse_administrator_access")) { return false; } goto Label_0C5D; case "stats": this.sendData(string.Concat(new object[] { "BKStats\rName: ", this._Username, "\rHealth: ", this._health, "\rHunger: ", this._hunger, "\rAlcohol: ", this._alcohol })); goto Label_14E7; case "battleready": if ((((this.roomUser.X == 7) && (this.roomUser.Y == 2)) || ((this.roomUser.X == 9) && (this.roomUser.Y == 2))) || ((this.roomUser.X != 11) || (this.roomUser.Y != 2))) { } goto Label_14E7; case "score": if ((this.roomUser.X == Config.BattleX) && (this.roomUser.Y == Config.BattleY)) { Config.BattleX = new Random().Next(1, 12); Config.BattleY = new Random().Next(1, 12); this.Room.floorItemManager.relocateItem(0x9b5d3c, Config.BattleX, Config.BattleY, 2); this.sendData("BKScooooore!"); } goto Label_14E7; case "join": num = Convert.ToInt16(Text.Substring(5)); if (num == 1) { break; } goto Label_0CC2; case "push": { string str6 = "down"; virtualUser user5 = userManager.getUser(Text.Split(new char[] { ' ' })[1]); if ((user5.roomUser != this.roomUser) && ((((this.roomUser.X + 1) == user5.roomUser.X) || ((this.roomUser.X - 1) == user5.roomUser.X)) || (((this.roomUser.Y + 1) == user5.roomUser.Y) || ((this.roomUser.Y - 1) == user5.roomUser.Y)))) { if (this.roomUser.Z2 == 0) { str6 = "up"; } if (this.roomUser.Z2 == 2) { str6 = "right"; } if (this.roomUser.Z2 == 4) { str6 = "down"; } if (this.roomUser.Z2 == 6) { str6 = "left"; } if (str6 == "up") { user5.roomUser.goalX = user5.roomUser.X; user5.roomUser.goalY = user5.roomUser.Y - 1; } if (str6 == "right") { user5.roomUser.goalX = user5.roomUser.X + 1; user5.roomUser.goalY = user5.roomUser.Y; } if (str6 == "down") { user5.roomUser.goalX = user5.roomUser.X; user5.roomUser.goalY = user5.roomUser.Y + 1; } if (str6 == "left") { user5.roomUser.goalX = user5.roomUser.X - 1; user5.roomUser.goalY = user5.roomUser.Y; } } goto Label_14E7; } case "alert": if (!rankManager.containsRight(this._Rank, "fuse_alert")) { return false; } goto Label_0CFD; case "roomalert": if (!rankManager.containsRight(this._Rank, "fuse_room_alert")) { return false; } goto Label_0D6D; case "kick": if (!rankManager.containsRight(this._Rank, "fuse_kick")) { return false; } goto Label_0DBF; case "roomkick": if (!rankManager.containsRight(this._Rank, "fuse_room_kick")) { return false; } goto Label_0E83; case "shutup": if (!rankManager.containsRight(this._Rank, "fuse_mute")) { return false; } goto Label_0EE3; case "unmute": if (!rankManager.containsRight(this._Rank, "fuse_mute")) { return false; } goto Label_0FA5; case "roomshutup": if (!rankManager.containsRight(this._Rank, "fuse_room_mute")) { return false; } goto Label_105D; case "roomunmute": if (!rankManager.containsRight(this._Rank, "fuse_room_mute")) { return false; } goto Label_10BD; case "ban": if (!rankManager.containsRight(this._Rank, "fuse_ban")) { return false; } goto Label_1115; case "superban": if (!rankManager.containsRight(this._Rank, "fuse_superban")) { return false; } goto Label_1257; case "ha": case "hotelalert": if (!rankManager.containsRight(this._Rank, "fuse_administrator_access")) { return false; } goto Label_13B4; case "offline": if (!rankManager.containsRight(this._Rank, "fuse_administrator_access")) { return false; } goto Label_13FC; case "ra": if (!rankManager.containsRight(this._Rank, "fuse_alert")) { return false; } goto Label_144A; case "userinfo": case "ui": if (!rankManager.containsRight(this._Rank, "fuse_administrator_access")) { return false; } goto Label_149B; default: return false; } this._TeamID = 1; this._Figure = "hd-185-1.ch-255-62.lg-280-62.sh-906-62.ea-1406-.wa-2009-62.ha-1008-.ca-1805-62"; this._Mission = "Battle Bunny!"; this.refreshAppearance(false, true, true); goto Label_14E7; Label_0B51: numArray3 = DB.runReadColumn("SELECT id FROM furniture WHERE roomid = '" + this._roomID + "'", 0, null); if (numArray3.Length > 0) { for (int i = 0; i < numArray3.Length; i++) { int itemID = numArray3[i]; if (this.Room.floorItemManager.containsItem(itemID)) { this.Room.floorItemManager.removeItem(itemID, this.userID); } else if (this.Room.wallItemManager.containsItem(itemID) && (stringManager.getStringPart(this.Room.wallItemManager.getItem(itemID).Sprite, 0, 7) != "post.it")) { this.Room.wallItemManager.removeItem(itemID, this.userID); } } } this.refreshHand("update"); goto Label_14E7; Label_0C5D: Text.Substring(5); this.Room.sendData("@nlandscape/" + Text.Substring(5) + "." + DB.runRead("SELECT landscape FROM rooms WHERE id = '" + this._roomID + "'").Split(new char[] { '.' })[1]); goto Label_14E7; Label_0CC2: if (num == 2) { this._TeamID = 2; this._Figure = "hd-185-30.ch-255-90.lg-280-91.sh-906-90.ea-1401-62.wa-2009-91.ha-1020-.ca-1803-90.fa-1205-90"; this._Mission = "Battle Bear!"; this.refreshAppearance(false, true, true); } goto Label_14E7; Label_0CFD: user = userManager.getUser(DB.Stripslash(s[1])); user.sendData("B!" + stringManager.wrapParameters(s, 2) + Convert.ToChar(2)); this.sendData("BK" + stringManager.getString("scommand_success")); staffManager.addStaffMessage("alert", this.userID, user.userID, s[2], ""); goto Label_14E7; Label_0D6D: str = Text.Substring(10); this.Room.sendData("B!" + str + Convert.ToChar(2)); staffManager.addStaffMessage("ralert", this.userID, this.Room.roomID, str, ""); goto Label_14E7; Label_0DBF: user2 = userManager.getUser(DB.Stripslash(s[1])); if (user2._Rank < this._Rank) { string moderatorMessage = ""; if (s.Length > 2) { moderatorMessage = stringManager.wrapParameters(s, 2); } user2.Room.removeUser(user2.roomUser.roomUID, true, moderatorMessage); this.sendData("BK" + stringManager.getString("scommand_success")); staffManager.addStaffMessage("kick", this.userID, user2.userID, moderatorMessage, ""); } else { this.sendData("BK" + stringManager.getString("scommand_failed")); } goto Label_14E7; Label_0E83: str2 = stringManager.wrapParameters(s, 1); this.Room.kickUsers(this._Rank, str2); this.sendData("BK" + stringManager.getString("scommand_success")); staffManager.addStaffMessage("rkick", this.userID, this.Room.roomID, str2, ""); goto Label_14E7; Label_0EE3: user3 = userManager.getUser(DB.Stripslash(s[1])); if (!((user3._Rank >= this._Rank) || user3._isMuted)) { string message = stringManager.wrapParameters(s, 2); user3._isMuted = true; user3.sendData("BK" + stringManager.getString("scommand_muted") + "\r" + message); this.sendData("BK" + stringManager.getString("scommand_success")); staffManager.addStaffMessage("mute", this.userID, user3.userID, message, ""); } else { this.sendData("BK" + stringManager.getString("scommand_failed")); } goto Label_14E7; Label_0FA5: user4 = userManager.getUser(DB.Stripslash(s[1])); if ((user4._Rank < this._Rank) && user4._isMuted) { user4._isMuted = false; user4.sendData("BK" + stringManager.getString("scommand_unmuted")); this.sendData("BK" + stringManager.getString("scommand_success")); staffManager.addStaffMessage("unmute", this.userID, user4.userID, "", ""); } else { this.sendData("BK" + stringManager.getString("scommand_failed")); } goto Label_14E7; Label_105D: str3 = stringManager.wrapParameters(s, 1); this.Room.muteUsers(this._Rank, str3); this.sendData("BK" + stringManager.getString("scommand_success")); staffManager.addStaffMessage("rmute", this.userID, this.Room.roomID, str3, ""); goto Label_14E7; Label_10BD: this.Room.unmuteUsers(this._Rank); this.sendData("BK" + stringManager.getString("scommand_success")); staffManager.addStaffMessage("runmute", this.userID, this.Room.roomID, "", ""); goto Label_14E7; Label_1115: numArray = DB.runReadRow("SELECT id,rank FROM users WHERE name = '" + DB.Stripslash(s[1]) + "'", null); if (numArray.Length == 0) { this.sendData("BK" + stringManager.getString("modtool_actionfailed") + "\r" + stringManager.getString("modtool_usernotfound")); } else if (((byte) numArray[1]) > this._Rank) { this.sendData("BK" + stringManager.getString("modtool_actionfailed") + "\r" + stringManager.getString("modtool_rankerror")); } else { int hours = int.Parse(s[2]); string str9 = stringManager.wrapParameters(s, 3); if ((hours == 0) || (str9 == "")) { this.sendData("BK" + stringManager.getString("scommand_failed")); } else { staffManager.addStaffMessage("ban", this.userID, numArray[0], str9, ""); userManager.setBan(numArray[0], hours, str9); this.sendData("BK" + userManager.generateBanReport(numArray[0])); } } goto Label_14E7; Label_1257: numArray2 = DB.runReadRow("SELECT id,rank FROM users WHERE name = '" + DB.Stripslash(s[1]) + "'", null); if (numArray2.Length == 0) { this.sendData("BK" + stringManager.getString("modtool_actionfailed") + "\r" + stringManager.getString("modtool_usernotfound")); } else if (((byte) numArray2[1]) > this._Rank) { this.sendData("BK" + stringManager.getString("modtool_actionfailed") + "\r" + stringManager.getString("modtool_rankerror")); } else { int num7 = int.Parse(s[2]); string str10 = stringManager.wrapParameters(s, 3); if ((num7 == 0) || (str10 == "")) { this.sendData("BK" + stringManager.getString("scommand_failed")); } else { string iP = DB.runRead("SELECT ipaddress_last FROM users WHERE id = '" + numArray2[0] + "'"); staffManager.addStaffMessage("ban", this.userID, numArray2[0], str10, ""); userManager.setBan(iP, num7, str10); this.sendData("BK" + userManager.generateBanReport(iP)); } } goto Label_14E7; Label_13B4: str4 = Text.Substring(3); userManager.sendData("BK" + stringManager.getString("scommand_hotelalert") + "\r" + str4); staffManager.addStaffMessage("halert", this.userID, 0, str4, ""); goto Label_14E7; Label_13FC: num2 = int.Parse(s[1]); userManager.sendData("Dc" + Otaku.Encoding.encodeVL64(num2)); staffManager.addStaffMessage("offline", this.userID, 0, "mm=" + num2, ""); goto Label_14E7; Label_144A: str5 = Text.Substring(3); userManager.sendToRank(this._Rank, false, "BK" + stringManager.getString("scommand_rankalert") + "\r" + str5); staffManager.addStaffMessage("rankalert", this.userID, this._Rank, str5, ""); goto Label_14E7; Label_149B: this.sendData("BK" + userManager.generateUserInfo(userManager.getUserID(DB.Stripslash(s[1])), this._Rank)); } catch { this.sendData("BK" + stringManager.getString("scommand_failed")); } Label_14E7: return true; } internal void KillUser() { this.Room.removeUser(this.roomUser.roomUID, false, ""); this._roomID = 0x2ac9; if (roomManager.containsRoom(this._roomID)) { this.Room = roomManager.getRoom(this._roomID); } else { this.Room = new virtualRoom(this._roomID, this._inPublicroom); roomManager.addRoom(this._roomID, this.Room); } string str = "model_" + DB.runRead("SELECT model FROM rooms WHERE id = '" + this._roomID + "'"); this.sendData(string.Concat(new object[] { "AE", str, " ", this._roomID })); int num = DB.runRead("SELECT wallpaper FROM rooms WHERE id = '" + this._roomID + "'", null); int num2 = DB.runRead("SELECT floor FROM rooms WHERE id = '" + this._roomID + "'", null); string str2 = DB.runRead("SELECT landscape FROM rooms WHERE id = '" + this._roomID + "'"); if (num > 0) { this.sendData("@nwallpaper/" + num); } if (num2 > 0) { this.sendData("@nfloor/" + num2); } this.sendData("@nlandscape/" + str2); if (!this._isOwner) { this._isOwner = rankManager.containsRight(this._Rank, "fuse_any_room_controller"); } if (this._isOwner) { this._hasRights = true; this.sendData("@o"); } if (this._hasRights) { this.sendData("@j"); } int i = -1; if (DB.checkExists(string.Concat(new object[] { "SELECT userid FROM room_votes WHERE userid = '", this.userID, "' AND roomid = '", this._roomID, "'" }))) { i = DB.runRead("SELECT SUM(vote) FROM room_votes WHERE roomid = '" + this._roomID + "'", null); if (i < 0) { i = 0; } } this.sendData("EY" + Otaku.Encoding.encodeVL64(i)); this.sendData("Er" + eventManager.getEvent(this._roomID)); this.sendData("@_" + this.Room.Heightmap); this.sendData(@"@\" + this.Room.dynamicUnits); this.sendData("@^" + this.Room.PublicroomItems); this.sendData("@`" + this.Room.Flooritems); this.sendData("@m" + this.Room.Wallitems); this.sendData("@b" + this.Room.dynamicStatuses); this._ROOMACCESS_PRIMARY_OK = true; this._ROOMACCESS_SECONDARY_OK = true; this.Room.addUser(this); this._health = 100; this._hunger = 0; this.sendData("BKYou have passed out from starvation and been revived at the nearest hospital, this service is currently free."); } internal void leaveGame() { if ((this.gamePlayer != null) && (this.gamePlayer.Game != null)) { if (this.gamePlayer.Game.Owner == this.gamePlayer) { try { this.gamePlayer.Game.Lobby.Games.Remove(this.gamePlayer.Game.ID); } catch { } this.gamePlayer.Game.Abort(); } else if (this.gamePlayer.teamID != -1) { this.gamePlayer.Game.movePlayer(this.gamePlayer, this.gamePlayer.teamID, -1); } else { this.gamePlayer.Game.Subviewers.Remove(this.gamePlayer); this.sendData("CmH"); } } this.gamePlayer = null; } private bool PollSorter(string Text) { switch (Text) { case "I": this.sendData("BKThankyou sir!\r\rNOTE: This is incomplete."); break; case "J": this.sendData("D}IChristmas Puzzle\x0002Thank you for the answer. Unfortunatly I'm still under construction hehe.\x0002JKIKWhat kind of animal was rudolph?\x0002HJKQuestion 2?\x0002"); break; default: return false; } return true; } private void processPacket(string currentPacket) { string str2; object obj2; int num62; bool flag4; string[] strArray23; string str74; int num107; int num108; int num109; int lastItemID; int num111; string str76; if (!this._isLoggedIn) { Out.WriteLine(currentPacket, "Logging In"); switch (currentPacket.Substring(0, 2)) { case "CD": this.pingOK = true; return; case "CN": this.sendData("DUIH"); return; case "_R": this.sendData("DAIJWVVVSNKQCFUBJASMSLKUUOJCOLJQPNSBIRSVQBRXZQOTGPMNJIHLVJCRRULBLUO"); return; case "CJ": this.sendData(string.Concat(new object[] { "DAQBHHIIKHJIPAHQAdd-MM-yyyy", Convert.ToChar(2), "SAHPBhttp://www.Otaku-Hotel.co.uk", Convert.ToChar(2), "QBH" })); return; case "CL": { int userID = DB.runRead("SELECT id FROM users WHERE ticket_sso = '" + DB.Stripslash(currentPacket.Substring(4)) + "'", null); if (userID == 0) { this.Disconnect(); } else { string str109 = userManager.getBanReason(userID); if (str109 != "") { this.sendData("@c" + str109); this.Disconnect(0x3e8); } else { this.userID = userID; string[] strArray28 = DB.runReadRow("SELECT name,figure,sex,mission,rank,consolemission FROM users WHERE id = '" + userID + "'"); this._Username = strArray28[0]; this._Figure = strArray28[1]; this._Sex = char.Parse(strArray28[2]); this._Mission = strArray28[3]; this._Rank = byte.Parse(strArray28[4]); this._consoleMission = strArray28[5]; userManager.addUser(userID, this); this._isLoggedIn = true; this.sendData(string.Concat(new object[] { "DAQBHIIIKHJIPAIQAdd-MM-yyyy", Convert.ToChar(2), "SAHPB/client", Convert.ToChar(2), "QBH" })); this.sendData("@B" + rankManager.fuseRights(this._Rank)); this.sendData("DbIH"); this.sendData("@C"); this.sendData("FC"); if (DB.runRead("SELECT guide FROM users WHERE id = '" + this.userID + "'", null) == 1) { this.sendData("BKhoi"); this.sendData("FiI"); } else if (Config.enableWelcomeMessage) { this.sendData("BK" + stringManager.getString("welcomemessage_text")); } } } return; } } this.Disconnect(); return; } Out.WriteLine(currentPacket, this._Username); string str110 = currentPacket.Substring(0, 2); switch (str110) { case "CD": this.pingOK = true; return; case "Cj": this.PollSorter(currentPacket.Substring(2)); return; case "Ch": { string[] strArray = DB.runReadRow("SELECT id,name,owner,description,state,visitors_now,visitors_max FROM rooms WHERE id = '" + this.Room.roomID + "'"); string[] strArray2 = DB.runReadRow("SELECT id,name,credits FROM users WHERE name = '" + strArray[2] + "'"); int num = DB.runRead("SELECT credits FROM users WHERE name = '" + strArray2[1] + "'", null); this.Room.sendData("Dx" + currentPacket.Substring(2) + "IH"); this.roomUser.goalX = -1; string str = ""; int x = this.roomUser.X; int y = this.roomUser.Y; if (x == (this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X + 1)) { str = "X1"; } if (x == (this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X - 1)) { str = "X-1"; } if (y == (this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y + 1)) { str = "Y1"; } if (y == (this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y - 1)) { str = "Y-1"; } this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); Thread.Sleep(500); if (this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Sprite == "one_way_door*0") { str110 = str; if (str110 != null) { if (!(str110 == "X-1")) { if (str110 == "X1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X - 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } else if (str110 == "Y-1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y + 1, true); } else if (str110 == "Y1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y - 1, true); } } else { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X + 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } } } if (this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Sprite == "one_way_door*1") { if (((this._Credits - 5) <= -1) || this._isOwner) { if (!this._isOwner) { this.sendData("BKYou cannot afford entry here."); str110 = str; if (str110 != null) { if (!(str110 == "X1")) { if (str110 == "X-1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X - 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } else if (str110 == "Y1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y + 1, true); } else if (str110 == "Y-1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y - 1, true); } } else { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X + 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } } } else { str110 = str; if (str110 != null) { if (!(str110 == "X-1")) { if (str110 == "X1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X - 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } else if (str110 == "Y-1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y + 1, true); } else if (str110 == "Y1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y - 1, true); } } else { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X + 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } } } } else { this._Credits -= 5; num += 5; this.sendData("@F" + this._Credits); this.sendData("BKYou have been charged 5 credits for entry."); DB.runQuery(string.Concat(new object[] { "UPDATE users SET credits = '", num, "' WHERE id = '", strArray2[0], "'" })); str110 = str; if (str110 != null) { if (!(str110 == "X-1")) { if (str110 == "X1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X - 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } else if (str110 == "Y-1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y + 1, true); } else if (str110 == "Y1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y - 1, true); } } else { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X + 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } } } } if (this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Sprite == "one_way_door*2") { if (!this._isRoomStaff) { if (!this._isOwner) { this.sendData("BKStaff Access Only."); str110 = str; if (str110 != null) { if (!(str110 == "X1")) { if (str110 == "X-1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X - 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } else if (str110 == "Y1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y + 1, true); } else if (str110 == "Y-1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y - 1, true); } } else { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X + 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } } } else { str110 = str; if (str110 != null) { if (!(str110 == "X-1")) { if (str110 == "X1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X - 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } else if (str110 == "Y-1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y + 1, true); } else if (str110 == "Y1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y - 1, true); } } else { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X + 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } } } } else { str110 = str; if (str110 != null) { if (!(str110 == "X-1")) { if (str110 == "X1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X - 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } else if (str110 == "Y-1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y + 1, true); } else if (str110 == "Y1") { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y - 1, true); } } else { this.Room.moveUser(this.roomUser, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).X + 1, this.Room.floorItemManager.getItem(Otaku.Encoding.decodeVL64(currentPacket.Substring(2))).Y, true); } } } } Thread.Sleep(500); this.Room.sendData("Dx" + currentPacket.Substring(2) + "HH"); return; } case "FL": this.sendData("DwQAI"); return; case "Dm": this.sendData("FZH"); return; case "Dn": this.sendData("FYPC1\x0002SnowStorm level 1\x0002HI2\x0002SnowStorm level 2\x0002HJ3\x0002SnowStorm level 3\x0002HK4\x0002SnowStorm level 4\x0002HPA5\x0002SnowStorm level 5\x0002HQA6\x0002SnowStorm level 6\x0002HRA7\x0002SnowStorm level 7\x0002HSA8\x0002Bouncing Ball level 1\x0002III9\x0002Bouncing Ball level 2\x0002IJI10\x0002Bouncing Ball level 3\x0002IKI11\x0002Bouncing Ball level 4\x0002IPAI12\x0002Bouncing Ball level 5\x0002IQAH"); return; case "Dc": this.sendData("DcFG" + Convert.ToChar(1)); return; case "Da": { string str3 = currentPacket.Substring(2); this.statusManager.removeStatus("dance"); this.statusManager.removeStatus("wave"); this.statusManager.removeStatus("fx"); this.statusManager.addStatus("joingame", str3.ToString()); return; } case "Dl": this.sendData("FIRA"); return; case "Dw": this.sendData("DwFL" + Convert.ToChar(1)); return; case "Dr": this.sendData("BrDa" + Convert.ToChar(1)); return; case "Du": this.sendData("FLPBH"); return; case "Dv": this.sendData("DvBKDv" + Convert.ToChar(1)); return; case "Dx": this.sendData("DxQA"); return; case "@q": this.sendData("Bc" + DateTime.Today.ToShortDateString()); return; case "@L": this._health = 100; this._hunger = 1; this._alcohol = 0; this.sendData("Dj" + Otaku.Encoding.encodeVL64(this._health) + Otaku.Encoding.encodeVL64(this._hunger)); this.Messenger = new virtualMessenger(this.userID); this.sendData("@L" + this.Messenger.friendList()); this.sendData("Dz" + this.Messenger.friendRequests()); return; case "@Z": return; case "@G": this.refreshAppearance(false, true, false); return; case "@H": this.refreshValueables(true, true); this.sendData("FtRPPAIACH_Login1\x0002PAJACH_Login2\x0002PAKACH_Login3\x0002PAPAACH_Login4\x0002PAQAACH_Login5\x0002PBIACH_RoomEntry1\x0002PBJACH_RoomEntry2\x0002PBKACH_RoomEntry3\x0002SBIACH_RegistrationDuration1\x0002SBJACH_RegistrationDuration2\x0002SBKACH_RegistrationDuration3\x0002SBPAACH_RegistrationDuration4\x0002SBQAACH_RegistrationDuration5\x0002SBRAACH_RegistrationDuration6\x0002SBSAACH_RegistrationDuration7\x0002SBPBACH_RegistrationDuration8\x0002SBQBACH_RegistrationDuration9\x0002SBRBACH_RegistrationDuration10\x0002PDIACH_AvatarTags1\x0002RDIACH_RespectGiven1\x0002KIACH_EmailVerification1\x0002SAIACH_Student1\x0002PCIHC1\x0002PCJHC2\x0002PCKHC3\x0002PCPAHC4\x0002PCQAHC5\x0002QDIACH_RespectEarned1\x0002QDJACH_RespectEarned2\x0002QDKACH_RespectEarned3\x0002QDPAACH_RespectEarned4\x0002QDQAACH_RespectEarned5\x0002QDRAACH_RespectEarned6\x0002QDSAACH_RespectEarned7\x0002QDPBACH_RespectEarned8\x0002QDQBACH_RespectEarned9\x0002QDRBACH_RespectEarned10\x0002JIACH_Graduate1\x0002QCIACH_MGM1\x0002QCJACH_MGM2\x0002QCKACH_MGM3\x0002QCPAACH_MGM4\x0002QCQAACH_MGM5\x0002QCRAACH_MGM6\x0002QCSAACH_MGM7\x0002QCPBACH_MGM8\x0002QCQBACH_MGM9\x0002QCRBACH_MGM10\x0002QBIACH_Motto1\x0002RAIACH_AvatarLooks1\x0002IIGLA\x0002IJGLB\x0002IKGLC\x0002IPAGLD\x0002IQAGLE\x0002IRAGLF\x0002ISAGLG\x0002IPBGLH\x0002IQBGLI\x0002IRBGLJ\x0002RBIACH_HappyHour1\x0002QAIACH_GamePlayed1\x0002QAJACH_GamePlayed2\x0002QAKACH_GamePlayed3\x0002QAPAACH_GamePlayed4\x0002QAQAACH_GamePlayed5\x0002\x0001"); return; case "B]": this.refreshBadges(); return; case "Cd": this.refreshGroupStatus(); return; case "C^": this.sendData("Do" + recyclerManager.setupString); return; case "C_": this.sendData("Dp" + recyclerManager.sessionString(this.userID)); return; case "BA": { string str4 = DB.Stripslash(currentPacket.Substring(4)); if (!DB.checkExists("SELECT * FROM vouchers WHERE voucher = '" + str4 + "'")) { this.sendData("CU1"); } else { int num4 = DB.runRead("SELECT credits FROM vouchers WHERE voucher = '" + str4 + "'", null); DB.runQuery("DELETE FROM vouchers WHERE voucher = '" + str4 + "' LIMIT 1"); this._Credits += num4; this.sendData("@F" + this._Credits); this.sendData("CT"); DB.runQuery(string.Concat(new object[] { "UPDATE users SET credits = '", num4, "' WHERE id = '", this.userID, "' LIMIT 1" })); } return; } case "@g": if (this.Messenger != null) { int num5 = DB.runRead("SELECT id FROM users WHERE name = '" + DB.Stripslash(currentPacket.Substring(4)) + "'", null); if (((num5 > 0) && !this.Messenger.hasFriendRequests(num5)) && !this.Messenger.hasFriendship(num5)) { int num6 = DB.runReadUnsafe("SELECT MAX(requestid) FROM messenger_friendrequests WHERE userid_to = '" + num5 + "'", null) + 1; DB.runQuery(string.Concat(new object[] { "INSERT INTO messenger_friendrequests(userid_to,userid_from,requestid) VALUES ('", num5, "','", this.userID, "','", num6, "')" })); userManager.getUser(num5).sendData(string.Concat(new object[] { "BDI", this._Username, Convert.ToChar(2), this.userID, Convert.ToChar(2) })); return; } } return; case "@e": if (this.Messenger != null) { int i = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(i).Length + 2); int num8 = 0; StringBuilder builder = new StringBuilder(); virtualBuddy buddy = new virtualBuddy(this.userID); for (int j = 0; j < i; j++) { if (currentPacket == "") { return; } int num10 = Otaku.Encoding.decodeVL64(currentPacket); int num11 = DB.runRead(string.Concat(new object[] { "SELECT userid_from FROM messenger_friendrequests WHERE userid_to = '", this.userID, "' AND requestid = '", num10, "'" }), null); if (num11 == 0) { return; } virtualBuddy buddy2 = new virtualBuddy(num11); builder.Append(buddy2.ToString(true)); num8++; this.Messenger.addBuddy(buddy2, false); if (userManager.containsUser(num11)) { userManager.getUser(num11).Messenger.addBuddy(buddy, true); } DB.runQuery(string.Concat(new object[] { "INSERT INTO messenger_friendships(userid,friendid) VALUES ('", num11, "','", this.userID, "')" })); DB.runQuery(string.Concat(new object[] { "DELETE FROM messenger_friendrequests WHERE userid_to = '", this.userID, "' AND requestid = '", num10, "' LIMIT 1" })); currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(num10).Length); } if (num8 > 0) { this.sendData("@MHI" + Otaku.Encoding.encodeVL64(num8) + builder.ToString()); } } return; case "@f": if (this.Messenger != null) { int num12 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(num12).Length + 2); for (int k = 0; k < num12; k++) { if (currentPacket == "") { return; } int num14 = Otaku.Encoding.decodeVL64(currentPacket); DB.runQuery(string.Concat(new object[] { "DELETE FROM messenger_friendrequests WHERE userid_to = '", this.userID, "' AND requestid = '", num14, "' LIMIT 1" })); currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(num14).Length); } } return; case "@h": if (this.Messenger != null) { int iD = Otaku.Encoding.decodeVL64(currentPacket.Substring(3)); this.Messenger.removeBuddy(iD); if (userManager.containsUser(iD)) { userManager.getUser(iD).Messenger.removeBuddy(this.userID); } DB.runQuery(string.Concat(new object[] { "DELETE FROM messenger_friendships WHERE (userid = '", this.userID, "' AND friendid = '", iD, "') OR (userid = '", iD, "' AND friendid = '", this.userID, "') LIMIT 1" })); } return; case "@a": if (this.Messenger != null) { int num16 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); string str5 = stringManager.filterSwearwords(currentPacket.Substring(Otaku.Encoding.encodeVL64(num16).Length + 4)); if (this.Messenger.containsOnlineBuddy(num16)) { userManager.getUser(num16).sendData(string.Concat(new object[] { "BF", Otaku.Encoding.encodeVL64(this.userID), str5, Convert.ToChar(2) })); return; } this.sendData("DE" + Otaku.Encoding.encodeVL64(5) + Otaku.Encoding.encodeVL64(this.userID)); } return; case "@O": if (this.Messenger != null) { this.sendData("@M" + this.Messenger.getUpdates()); } return; case "DF": if (this.Messenger != null) { int num17 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); int num18 = -1; if (this.Messenger.hasFriendship(num17)) { if (!userManager.containsUser(num17)) { num18 = 1; } else { virtualUser user = userManager.getUser(num17); if (user._roomID <= 0) { num18 = 2; } else if (!user._inPublicroom) { this.sendData("D^H" + Otaku.Encoding.encodeVL64(user._roomID)); } else { this.sendData("D^I" + Otaku.Encoding.encodeVL64(user._roomID)); } } } else { num18 = 0; } if (num18 != -1) { this.sendData("E]" + Otaku.Encoding.encodeVL64(num18)); } } return; case "@b": if ((this.Messenger != null) && (this.roomUser != null)) { int num19 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); int[] numArray = new int[num19]; currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(num19).Length + 2); for (int m = 0; m < num19; m++) { if (currentPacket == "") { return; } int num21 = Otaku.Encoding.decodeVL64(currentPacket); if (this.Messenger.hasFriendship(num21) && userManager.containsUser(num21)) { numArray[m] = num21; } currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(num21).Length); } string str6 = currentPacket.Substring(2); string data = string.Concat(new object[] { "BG", Otaku.Encoding.encodeVL64(this.userID), str6, Convert.ToChar(2) }); for (int n = 0; n < num19; n++) { userManager.getUser(numArray[n]).sendData(data); } } return; case "@i": { string str8 = DB.Stripslash(currentPacket.Substring(4)); if (DB.checkExists("SELECT * FROM users WHERE name = '" + str8 + "'")) { int num23 = DB.runRead("SELECT id FROM users WHERE name = '" + str8 + "'", 0); string str9 = DB.runRead("SELECT name FROM users WHERE id = '" + num23 + "'"); string str10 = DB.runRead("SELECT lastvisit FROM users WHERE id = '" + num23 + "'"); this.sendData(string.Concat(new object[] { "Fs", Otaku.Encoding.encodeVL64(num23), "H", str9, Convert.ToChar(2), Convert.ToChar(2), "HH", Convert.ToChar(2), "H", Convert.ToChar(2), str10, Convert.ToChar(2) })); } if (!DB.checkExists("SELECT * FROM users WHERE name = '" + str8 + "'")) { this.sendData("FsHH"); } return; } case "BV": { this.sendData("Dj" + Otaku.Encoding.encodeVL64(this._health) + Otaku.Encoding.encodeVL64(this._hunger)); int num24 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2, 1)); int num25 = Otaku.Encoding.decodeVL64(currentPacket.Substring(3)); string str11 = DB.runReadUnsafe(string.Concat(new object[] { "SELECT name FROM room_categories WHERE id = '", num25, "' AND (access_rank_min <= ", this._Rank, " OR access_rank_hideforlower = '0')" })); if (str11 != "") { int num26 = DB.runRead("SELECT type FROM room_categories WHERE id = '" + num25 + "'", null); int num27 = DB.runRead("SELECT parent FROM room_categories WHERE id = '" + num25 + "'", null); StringBuilder builder2 = new StringBuilder(string.Concat(new object[] { @"C\", Otaku.Encoding.encodeVL64(num24), Otaku.Encoding.encodeVL64(num25), Otaku.Encoding.encodeVL64(num26), str11, Convert.ToChar(2), Otaku.Encoding.encodeVL64(0), Otaku.Encoding.encodeVL64(0x2710), Otaku.Encoding.encodeVL64(num27) })); string str12 = ""; if (num26 != 0) { if (num24 == 1) { str12 = "AND visitors_now < visitors_max ORDER BY visitors_now DESC LIMIT 30"; } else { str12 = "ORDER BY visitors_now DESC LIMIT " + Config.Navigator_openCategory_maxResults; } } else if (num24 != 1) { str12 = "ORDER BY id ASC"; } else { str12 = "AND visitors_now < visitors_max ORDER BY id ASC"; } int[] numArray2 = DB.runReadColumn(string.Concat(new object[] { "SELECT id FROM rooms WHERE category = '", num25, "' ", str12 }), 0, null); if (num26 == 2) { builder2.Append(Otaku.Encoding.encodeVL64(numArray2.Length)); } if (numArray2.Length > 0) { bool flag = false; int[] numArray3 = DB.runReadColumn(string.Concat(new object[] { "SELECT state FROM rooms WHERE category = '", num25, "' ", str12 }), 0, null); int[] numArray4 = DB.runReadColumn(string.Concat(new object[] { "SELECT showname FROM rooms WHERE category = '", num25, "' ", str12 }), 0, null); int[] numArray5 = DB.runReadColumn(string.Concat(new object[] { "SELECT visitors_now FROM rooms WHERE category = '", num25, "' ", str12 }), 0, null); int[] numArray6 = DB.runReadColumn(string.Concat(new object[] { "SELECT visitors_max FROM rooms WHERE category = '", num25, "' ", str12 }), 0, null); string[] strArray3 = DB.runReadColumn(string.Concat(new object[] { "SELECT name FROM rooms WHERE category = '", num25, "' ", str12 }), 0); string[] strArray4 = DB.runReadColumn(string.Concat(new object[] { "SELECT description FROM rooms WHERE category = '", num25, "' ", str12 }), 0); string[] strArray5 = DB.runReadColumn(string.Concat(new object[] { "SELECT owner FROM rooms WHERE category = '", num25, "' ", str12 }), 0); string[] strArray6 = null; if (num26 == 0) { strArray6 = DB.runReadColumn(string.Concat(new object[] { "SELECT ccts FROM rooms WHERE category = '", num25, "' ", str12 }), 0); } else { flag = rankManager.containsRight(this._Rank, "fuse_enter_locked_rooms"); } for (int num28 = 0; num28 < numArray2.Length; num28++) { if (num26 == 0) { builder2.Append(string.Concat(new object[] { Otaku.Encoding.encodeVL64(numArray2[num28]), Otaku.Encoding.encodeVL64(1), strArray3[num28], Convert.ToChar(2), Otaku.Encoding.encodeVL64(numArray5[num28]), Otaku.Encoding.encodeVL64(numArray6[num28]), Otaku.Encoding.encodeVL64(num25), strArray4[num28], Convert.ToChar(2), Otaku.Encoding.encodeVL64(numArray2[num28]), Otaku.Encoding.encodeVL64(0), strArray6[num28], Convert.ToChar(2), "HI" })); } else if ((numArray4[num28] != 0) || flag) { builder2.Append(string.Concat(new object[] { Otaku.Encoding.encodeVL64(numArray2[num28]), strArray3[num28], Convert.ToChar(2), strArray5[num28], Convert.ToChar(2), roomManager.getRoomState(numArray3[num28]), Convert.ToChar(2), Otaku.Encoding.encodeVL64(numArray5[num28]), Otaku.Encoding.encodeVL64(numArray6[num28]), strArray4[num28], Convert.ToChar(2) })); } } } int[] numArray7 = DB.runReadColumn(string.Concat(new object[] { "SELECT id FROM room_categories WHERE parent = '", num25, "' AND (access_rank_min <= ", this._Rank, " OR access_rank_hideforlower = '0') ORDER BY id ASC" }), 0, null); if (numArray7.Length > 0) { for (int num29 = 0; num29 < numArray7.Length; num29++) { int num30 = DB.runReadUnsafe("SELECT SUM(visitors_now) FROM rooms WHERE category = '" + numArray7[num29] + "'", null); int num31 = DB.runReadUnsafe("SELECT SUM(visitors_max) FROM rooms WHERE category = '" + numArray7[num29] + "'", null); if (((num31 <= 0) || (num24 != 1)) || (num30 < num31)) { string str13 = DB.runRead("SELECT name FROM room_categories WHERE id = '" + numArray7[num29] + "'"); builder2.Append(string.Concat(new object[] { Otaku.Encoding.encodeVL64(numArray7[num29]), Otaku.Encoding.encodeVL64(0), str13, Convert.ToChar(2), Otaku.Encoding.encodeVL64(num30), Otaku.Encoding.encodeVL64(num31), Otaku.Encoding.encodeVL64(num25) })); } } } this.sendData(builder2.ToString()); } return; } case "BW": { StringBuilder builder3 = new StringBuilder(); int[] numArray8 = DB.runReadColumn("SELECT id FROM room_categories WHERE type = '2' AND parent > 0 AND access_rank_min <= " + this._Rank + " ORDER BY id ASC", 0, null); string[] strArray7 = DB.runReadColumn("SELECT name FROM room_categories WHERE type = '2' AND parent > 0 AND access_rank_min <= " + this._Rank + " ORDER BY id ASC", 0); for (int num32 = 0; num32 < numArray8.Length; num32++) { builder3.Append(Otaku.Encoding.encodeVL64(numArray8[num32]) + strArray7[num32] + Convert.ToChar(2)); } this.sendData("C]" + Otaku.Encoding.encodeVL64(numArray8.Length) + builder3.ToString()); return; } case "DH": { this.sendData("Dj" + Otaku.Encoding.encodeVL64(this._health) + Otaku.Encoding.encodeVL64(this._hunger)); string str14 = ""; for (int num33 = 0; num33 <= 3; num33++) { string[] strArray8 = DB.runReadRow("SELECT id,name,owner,description,state,visitors_now,visitors_max FROM rooms WHERE NOT(owner IS NULL) ORDER BY RAND()"); if (strArray8.Length == 0) { return; } obj2 = str14; str14 = string.Concat(new object[] { obj2, Otaku.Encoding.encodeVL64(int.Parse(strArray8[0])), strArray8[1], Convert.ToChar(2), strArray8[2], Convert.ToChar(2), roomManager.getRoomState(int.Parse(strArray8[4])), Convert.ToChar(2), Otaku.Encoding.encodeVL64(int.Parse(strArray8[5])), Otaku.Encoding.encodeVL64(int.Parse(strArray8[6])), strArray8[3], Convert.ToChar(2) }); } this.sendData("E_" + Otaku.Encoding.encodeVL64(3) + str14); return; } case "@P": { string[] strArray9 = DB.runReadColumn("SELECT id FROM rooms WHERE owner = '" + this._Username + "' ORDER BY id ASC", 0); if (strArray9.Length > 0) { StringBuilder builder4 = new StringBuilder(); for (int num34 = 0; num34 < strArray9.Length; num34++) { string[] strArray10 = DB.runReadRow("SELECT name,description,state,showname,visitors_now,visitors_max FROM rooms WHERE id = '" + strArray9[num34] + "'"); builder4.Append(string.Concat(new object[] { strArray9[num34], Convert.ToChar(9), strArray10[0], Convert.ToChar(9), this._Username, Convert.ToChar(9), roomManager.getRoomState(int.Parse(strArray10[2])), Convert.ToChar(9), "x", Convert.ToChar(9), strArray10[4], Convert.ToChar(9), strArray10[5], Convert.ToChar(9), "null", Convert.ToChar(9), strArray10[1], Convert.ToChar(9), strArray10[1], Convert.ToChar(9), Convert.ToChar(13) })); } this.sendData("@P" + builder4.ToString()); return; } this.sendData("@y" + this._Username); return; } case "@Q": { bool flag2 = rankManager.containsRight(this._Rank, "fuse_see_all_roomowners"); string str15 = DB.Stripslash(currentPacket.Substring(2)); string[] strArray11 = DB.runReadColumn("SELECT id FROM rooms WHERE NOT(owner IS NULL) AND (owner = '" + str15 + "' OR name LIKE '%" + str15 + "%') ORDER BY id ASC", Config.Navigator_roomSearch_maxResults); if (strArray11.Length > 0) { StringBuilder builder5 = new StringBuilder(); for (int num35 = 0; num35 < strArray11.Length; num35++) { string[] strArray12 = DB.runReadRow("SELECT name,owner,description,state,showname,visitors_now,visitors_max FROM rooms WHERE id = '" + strArray11[num35] + "'"); if (!((!(strArray12[4] == "0") || !(strArray12[1] != this._Username)) || flag2)) { strArray12[1] = "-"; } builder5.Append(string.Concat(new object[] { strArray11[num35], Convert.ToChar(9), strArray12[0], Convert.ToChar(9), strArray12[1], Convert.ToChar(9), roomManager.getRoomState(int.Parse(strArray12[3])), Convert.ToChar(9), "x", Convert.ToChar(9), strArray12[5], Convert.ToChar(9), strArray12[6], Convert.ToChar(9), "null", Convert.ToChar(9), strArray12[2], Convert.ToChar(9), Convert.ToChar(13) })); } this.sendData("@w" + builder5.ToString()); return; } this.sendData("@z"); return; } case "@U": { int num36 = int.Parse(currentPacket.Substring(2)); string[] strArray13 = DB.runReadRow("SELECT name,owner,description,model,state,superusers,showname,category,visitors_now,visitors_max FROM rooms WHERE id = '" + num36 + "' AND NOT(owner IS NULL)"); if (strArray13.Length > 0) { StringBuilder builder6 = new StringBuilder(Otaku.Encoding.encodeVL64(int.Parse(strArray13[5])) + Otaku.Encoding.encodeVL64(int.Parse(strArray13[4])) + Otaku.Encoding.encodeVL64(num36)); if ((strArray13[6] == "0") && rankManager.containsRight(this._Rank, "fuse_see_all_roomowners")) { builder6.Append("-"); } else { builder6.Append(strArray13[1]); } builder6.Append(string.Concat(new object[] { Convert.ToChar(2), "model_", strArray13[3], Convert.ToChar(2), strArray13[0], Convert.ToChar(2), strArray13[2], Convert.ToChar(2), Otaku.Encoding.encodeVL64(int.Parse(strArray13[6])) })); if (DB.checkExists("SELECT id FROM room_categories WHERE id = '" + strArray13[7] + "' AND trading = '1'")) { builder6.Append("I"); } else { builder6.Append("H"); } builder6.Append(Otaku.Encoding.encodeVL64(int.Parse(strArray13[8])) + Otaku.Encoding.encodeVL64(int.Parse(strArray13[9]))); this.sendData("@v" + builder6.ToString()); } return; } case "@R": { int[] numArray9 = DB.runReadColumn("SELECT roomid FROM users_favourites WHERE userid = '" + this.userID + "' ORDER BY roomid DESC", Config.Navigator_Favourites_maxRooms, null); if (numArray9.Length > 0) { int num37 = 0; int num38 = 0; bool flag3 = rankManager.containsRight(this._Rank, "fuse_enter_locked_rooms"); StringBuilder builder7 = new StringBuilder(); for (int num39 = 0; num39 < numArray9.Length; num39++) { string[] strArray14 = DB.runReadRow("SELECT name,owner,state,showname,visitors_now,visitors_max,description FROM rooms WHERE id = '" + numArray9[num39] + "'"); if (strArray14.Length == 0) { if (num38 > 0) { num37++; } DB.runQuery(string.Concat(new object[] { "DELETE FROM users_favourites WHERE userid = '", this.userID, "' AND roomid = '", numArray9[num39], "' LIMIT 1" })); } else if (strArray14[1] == "") { int num40 = DB.runRead("SELECT category FROM rooms WHERE id = '" + numArray9[num39] + "'", null); string str16 = DB.runRead("SELECT ccts FROM rooms WHERE id = '" + numArray9[num39] + "'"); builder7.Append(string.Concat(new object[] { Otaku.Encoding.encodeVL64(numArray9[num39]), "I", strArray14[0], Convert.ToChar(2), Otaku.Encoding.encodeVL64(int.Parse(strArray14[4])), Otaku.Encoding.encodeVL64(int.Parse(strArray14[5])), Otaku.Encoding.encodeVL64(num40), strArray14[6], Convert.ToChar(2), Otaku.Encoding.encodeVL64(numArray9[num39]), "H", str16, Convert.ToChar(2), "HI" })); } else { if (!((!(strArray14[3] == "0") || !(this._Username != strArray14[1])) || flag3)) { strArray14[1] = "-"; } builder7.Append(string.Concat(new object[] { Otaku.Encoding.encodeVL64(numArray9[num39]), strArray14[0], Convert.ToChar(2), strArray14[1], Convert.ToChar(2), roomManager.getRoomState(int.Parse(strArray14[2])), Convert.ToChar(2), Otaku.Encoding.encodeVL64(int.Parse(strArray14[4])), Otaku.Encoding.encodeVL64(int.Parse(strArray14[5])), strArray14[6], Convert.ToChar(2) })); num38++; } } this.sendData(string.Concat(new object[] { "@}HHJ", Convert.ToChar(2), "HHH", Otaku.Encoding.encodeVL64(num38 - num37), builder7.ToString() })); } return; } case "@S": { int num41 = Otaku.Encoding.decodeVL64(currentPacket.Substring(3)); if (!(!DB.checkExists("SELECT id FROM rooms WHERE id = '" + num41 + "'") || DB.checkExists(string.Concat(new object[] { "SELECT userid FROM users_favourites WHERE userid = '", this.userID, "' AND roomid = '", num41, "'" })))) { if (DB.runReadUnsafe("SELECT COUNT(userid) FROM users_favourites WHERE userid = '" + this.userID + "'", null) < Config.Navigator_Favourites_maxRooms) { DB.runQuery(string.Concat(new object[] { "INSERT INTO users_favourites(userid,roomid) VALUES ('", this.userID, "','", num41, "')" })); return; } this.sendData("@anav_error_toomanyfavrooms"); } return; } case "@T": { int num42 = Otaku.Encoding.decodeVL64(currentPacket.Substring(3)); DB.runQuery(string.Concat(new object[] { "DELETE FROM users_favourites WHERE userid = '", this.userID, "' AND roomid = '", num42, "' LIMIT 1" })); return; } case "EA": this.sendData("Ep" + Otaku.Encoding.encodeVL64(eventManager.categoryAmount)); return; case "EY": if ((this._inPublicroom || (this.roomUser == null)) || this._hostsEvent) { this.sendData("EoH"); return; } this.sendData("EoI"); return; case "D{": { int categoryID = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (eventManager.categoryOK(categoryID)) { this.sendData("Eb" + Otaku.Encoding.encodeVL64(categoryID)); } return; } case "E^": { int num44 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if ((num44 >= 1) && (num44 <= 11)) { this.sendData("Eq" + Otaku.Encoding.encodeVL64(num44) + eventManager.getEvents(num44)); } return; } case "EZ": if ((this._isOwner && !this._hostsEvent) && (!this._inPublicroom && (this.roomUser != null))) { int num45 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (eventManager.categoryOK(num45)) { int length = Otaku.Encoding.encodeVL64(num45).Length; int num47 = Otaku.Encoding.decodeB64(currentPacket.Substring(length + 2, 2)); string name = currentPacket.Substring(length + 4, num47); string description = currentPacket.Substring((length + num47) + 6); this._hostsEvent = true; eventManager.createEvent(num45, this.userID, this._roomID, name, description); this.Room.sendData("Er" + eventManager.getEvent(this._roomID)); return; } } return; case @"E\": if ((this._hostsEvent && this._isOwner) && (!this._inPublicroom && (this.roomUser != null))) { int num48 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (eventManager.categoryOK(num48)) { int num49 = Otaku.Encoding.encodeVL64(num48).Length; int num50 = Otaku.Encoding.decodeB64(currentPacket.Substring(num49 + 2, 2)); string str19 = currentPacket.Substring(num49 + 4, num50); string str20 = currentPacket.Substring((num49 + num50) + 6); eventManager.editEvent(num48, this._roomID, str19, str20); this.Room.sendData("Er" + eventManager.getEvent(this._roomID)); return; } } return; case "E[": if ((this._hostsEvent && this._isOwner) && (!this._inPublicroom && (this.roomUser != null))) { this._hostsEvent = false; eventManager.removeEvent(this._roomID); this.Room.sendData("Er-1"); } return; case "@]": { string[] strArray15 = currentPacket.Split(new char[] { '/' }); if (DB.runRead("SELECT COUNT(id) FROM rooms WHERE owner = '" + this._Username + "'", null) < Config.Navigator_createRoom_maxRooms) { strArray15[2] = stringManager.filterSwearwords(strArray15[2]); strArray15[3] = strArray15[3].Substring(6, 1); strArray15[4] = roomManager.getRoomState(strArray15[4]).ToString(); if ((strArray15[5] == "0") || (strArray15[5] == "1")) { DB.runQuery("INSERT INTO rooms (name,owner,model,state,showname) VALUES ('" + DB.Stripslash(strArray15[2]) + "','" + this._Username + "','" + strArray15[3] + "','" + strArray15[4] + "','" + strArray15[5] + "')"); string str21 = DB.runRead("SELECT MAX(id) FROM rooms WHERE owner = '" + this._Username + "'"); this.sendData(string.Concat(new object[] { "@{", str21, Convert.ToChar(13), strArray15[2] })); } return; } this.sendData("@aError creating a private room"); return; } case "@Y": { int num51 = 0; if (currentPacket.Substring(2, 1) == "/") { num51 = int.Parse(currentPacket.Split(new char[] { '/' })[1]); } else { num51 = int.Parse(currentPacket.Substring(2).Split(new char[] { '/' })[0]); } int num52 = 0; int num53 = 0x19; string[] strArray16 = currentPacket.Split(new char[] { Convert.ToChar(13) }); string str22 = ""; string str23 = ""; for (int num54 = 1; num54 < strArray16.Length; num54++) { string str24 = strArray16[num54].Split(new char[] { '=' })[0]; string text = strArray16[num54].Substring(str24.Length + 1); str2 = str24; switch (str2) { case null: return; case "description": { str22 = DB.Stripslash(stringManager.filterSwearwords(text)); continue; } default: { if (!(str2 == "allsuperuser")) { if (str2 == "maxvisitors") { break; } if (str2 != "password") { return; } goto Label_4169; } num52 = int.Parse(text); if ((num52 != 0) && (num52 != 1)) { num52 = 0; } continue; } } num53 = int.Parse(text); if ((num53 < 10) || (num53 > 0x19)) { num53 = 0x19; } continue; Label_4169: str23 = DB.Stripslash(text); } DB.runQuery(string.Concat(new object[] { "UPDATE rooms SET description = '", str22, "',superusers = '", num52, "',visitors_max = '", num53, "',password = '", str23, "' WHERE id = '", num51, "' AND owner = '", this._Username, "' LIMIT 1" })); return; } case "@X": { string[] strArray17 = currentPacket.Substring(2).Split(new char[] { '/' }); int num55 = int.Parse(strArray17[0]); string str26 = DB.Stripslash(stringManager.filterSwearwords(strArray17[1])); string str27 = strArray17[2]; if ((str27 != "1") && (str27 != "0")) { str27 = "1"; } int num56 = roomManager.getRoomState(strArray17[2]); DB.runQuery(string.Concat(new object[] { "UPDATE rooms SET name = '", str26, "',state = '", num56, "',showname = '", str27, "' WHERE id = '", num55, "' AND owner = '", this._Username, "' LIMIT 1" })); return; } case "BX": { int num57 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); string s = DB.runRead(string.Concat(new object[] { "SELECT category FROM rooms WHERE id = '", num57, "' AND owner = '", this._Username, "'" })); if (s != "") { this.sendData("C^" + Otaku.Encoding.encodeVL64(num57) + Otaku.Encoding.encodeVL64(int.Parse(s))); } return; } case "BY": { int num58 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); int num59 = Otaku.Encoding.decodeVL64(currentPacket.Substring(Otaku.Encoding.encodeVL64(num58).Length + 2)); if (DB.checkExists(string.Concat(new object[] { "SELECT id FROM room_categories WHERE id = '", num59, "' AND type = '2' AND parent > 0 AND access_rank_min <= ", this._Rank }))) { DB.runQuery(string.Concat(new object[] { "UPDATE rooms SET category = '", num59, "' WHERE id = '", num58, "' AND owner = '", this._Username, "' LIMIT 1" })); } return; } case "@W": { int roomID = int.Parse(currentPacket.Substring(2)); if (DB.checkExists(string.Concat(new object[] { "SELECT id FROM rooms WHERE id = '", roomID, "' AND owner = '", this._Username, "'" }))) { DB.runQuery("DELETE FROM room_rights WHERE roomid = '" + roomID + "'"); DB.runQuery("DELETE FROM rooms WHERE id = '" + roomID + "' LIMIT 1"); DB.runQuery("DELETE FROM room_votes WHERE roomid = '" + roomID + "'"); DB.runQuery("DELETE FROM room_bans WHERE roomid = '" + roomID + "' LIMIT 1"); DB.runQuery("DELETE FROM furniture WHERE roomid = '" + roomID + "'"); DB.runQuery("DELETE FROM furniture_moodlight WHERE roomid = '" + roomID + "'"); } if (roomManager.containsRoom(roomID)) { roomManager.getRoom(roomID).kickUsers(byte.Parse("9"), "This room has been deleted"); } return; } case "BZ": { int num61 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (roomManager.containsRoom(num61)) { this.sendData("C_" + roomManager.getRoom(num61).Userlist); return; } this.sendData("C_"); return; } case "@u": if ((this.Room != null) && (this.roomUser != null)) { this.Room.removeUser(this.roomUser.roomUID, false, ""); return; } if (this.gamePlayer != null) { this.leaveGame(); } return; case "Bv": Config.Rooms_LoadAvertisement_img = ""; if (Config.Rooms_LoadAvertisement_img == "") { this.sendData("DB0"); return; } this.sendData(string.Concat(new object[] { "DB", Config.Rooms_LoadAvertisement_img, Convert.ToChar(9), Config.Rooms_LoadAvertisement_uri })); return; case "@B": { num62 = Otaku.Encoding.decodeVL64(currentPacket.Substring(3)); flag4 = currentPacket.Substring(2, 1) == "A"; this.sendData("@S"); this.sendData("Bfhttp://www.otaku-studios.com/"); if ((this.gamePlayer != null) && (this.gamePlayer.Game != null)) { if (!this.gamePlayer.enteringGame) { this.leaveGame(); } else { this.Room.removeUser(this.roomUser.roomUID, false, ""); this.sendData(string.Concat(new object[] { "AE", this.gamePlayer.Game.Lobby.Type, "_arena_", this.gamePlayer.Game.mapID, " ", num62 })); this.sendData("Cs" + this.gamePlayer.Game.getMap()); this.gamePlayer.Game.getMap(); } return; } if ((this.Room != null) && (this.roomUser != null)) { this.Room.removeUser(this.roomUser.roomUID, false, ""); } if (this._teleporterID != 0) { goto Label_4991; } bool flag5 = rankManager.containsRight(this._Rank, "fuse_enter_locked_rooms"); int num63 = DB.runRead("SELECT state FROM rooms WHERE id = '" + num62 + "'", null); if (!(((num63 != 3) || this._clubMember) || flag5)) { this.sendData("C`Kc"); } else if (!((num63 != 4) || flag5)) { this.sendData("BK" + stringManager.getString("room_stafflocked")); } else { int num64 = DB.runRead("SELECT SUM(visitors_now) FROM rooms WHERE id = '" + num62 + "'", null); if (num64 <= 0) { goto Label_4991; } int num65 = DB.runRead("SELECT SUM(visitors_max) FROM rooms WHERE id = '" + num62 + "'", null); if ((num64 < num65) || rankManager.containsRight(this._Rank, "fuse_enter_full_rooms")) { goto Label_4991; } if (!flag4) { this.sendData("C`I"); } else { this.sendData("BK" + stringManager.getString("room_full")); } } return; } case "@v": this.sendData("@S"); return; case "@y": if (this._inPublicroom) { return; } this._isRoomStaff = false; if (DB.checkExists("SELECT * FROM jobs_employers WHERE room = '" + this._roomID + "'")) { string str30 = DB.runRead("SELECT name FROM jobs_employers WHERE room = '" + this._roomID + "'"); string str31 = DB.runRead("SELECT job FROM users WHERE name = '" + this._Username + "'"); if (DB.checkExists("SELECT * FROM jobs WHERE id = '" + str31 + "' AND employer = '" + str30 + "'")) { this._isRoomStaff = true; } } this._isOwner = DB.checkExists(string.Concat(new object[] { "SELECT id FROM rooms WHERE id = '", this._roomID, "' AND owner = '", this._Username, "'" })); if (!this._isOwner) { this._hasRights = DB.checkExists(string.Concat(new object[] { "SELECT userid FROM room_rights WHERE roomid = '", this._roomID, "' AND userid = '", this.userID, "'" })); } if (!this._hasRights) { this._hasRights = DB.checkExists("SELECT id FROM rooms WHERE id = '" + this._roomID + "' AND superusers = '1'"); } if (((this._teleporterID == 0) && !this._isOwner) && !rankManager.containsRight(this._Rank, "fuse_enter_locked_rooms")) { int num66 = DB.runRead("SELECT state FROM rooms WHERE id = '" + this._roomID + "'", null); if (!(this._ROOMACCESS_PRIMARY_OK || (num66 == 2))) { return; } if (DB.checkExists(string.Concat(new object[] { "SELECT roomid FROM room_bans WHERE roomid = '", this._roomID, "' AND userid = '", this.userID, "'" }))) { if (DateTime.Compare(DateTime.Parse(DB.runRead(string.Concat(new object[] { "SELECT ban_expire FROM room_bans WHERE roomid = '", this._roomID, "' AND userid = '", this.userID, "'" }))), DateTime.Now) > 0) { this.sendData("C`PA"); this.sendData("@R"); return; } DB.runQuery(string.Concat(new object[] { "DELETE FROM room_bans WHERE roomid = '", this._roomID, "' AND userid = '", this.userID, "' LIMIT 1" })); } switch (num66) { case 1: if (roomManager.containsRoom(this._roomID)) { roomManager.getRoom(this._roomID).sendDataToRights("A[" + this._Username); this.sendData("A["); return; } this.sendData("BC"); return; case 2: { string str32 = ""; try { str32 = currentPacket.Split(new char[] { '/' })[1]; } catch { } string str33 = DB.runRead("SELECT password FROM rooms WHERE id = '" + this._roomID + "'"); if (str32 != str33) { this.sendData("@aIncorrect flat password"); return; } goto Label_4FE3; } } } goto Label_4FE3; case "Ab": if (!(!this._hasRights && rankManager.containsRight(this.roomUser.User._Rank, "fuse_enter_locked_rooms"))) { string userName = currentPacket.Substring(4, Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2))); bool flag6 = currentPacket.Substring(currentPacket.Length - 1) == "A"; virtualUser user2 = userManager.getUser(userName); if ((user2 != null) && (user2._roomID == this._roomID)) { if (flag6) { user2._ROOMACCESS_SECONDARY_OK = true; this.Room.sendDataToRights("@i" + userName + Convert.ToChar(2)); user2.sendData("@i"); } else { user2.sendData("BC"); user2._roomID = 0; user2._inPublicroom = false; user2._ROOMACCESS_PRIMARY_OK = false; user2._ROOMACCESS_SECONDARY_OK = false; user2._isOwner = false; user2._hasRights = false; user2.Room = null; user2.roomUser = null; } return; } } return; case "@{": if (this._ROOMACCESS_SECONDARY_OK && !this._inPublicroom) { string str35 = "model_" + DB.runRead("SELECT model FROM rooms WHERE id = '" + this._roomID + "'"); this.sendData(string.Concat(new object[] { "AE", str35, " ", this._roomID })); int num67 = DB.runRead("SELECT wallpaper FROM rooms WHERE id = '" + this._roomID + "'", null); int num68 = DB.runRead("SELECT floor FROM rooms WHERE id = '" + this._roomID + "'", null); string str36 = DB.runRead("SELECT landscape FROM rooms WHERE id = '" + this._roomID + "'"); if (num67 > 0) { this.sendData("@nwallpaper/" + num67); } if (num68 > 0) { this.sendData("@nfloor/" + num68); } this.sendData("@nlandscape/" + str36); if (!this._isOwner) { this._isOwner = rankManager.containsRight(this._Rank, "fuse_any_room_controller"); } if (this._isOwner) { this._hasRights = true; this.sendData("@o"); } if (this._hasRights) { this.sendData("@j"); } int num69 = -1; if (DB.checkExists(string.Concat(new object[] { "SELECT userid FROM room_votes WHERE userid = '", this.userID, "' AND roomid = '", this._roomID, "'" }))) { num69 = DB.runRead("SELECT SUM(vote) FROM room_votes WHERE roomid = '" + this._roomID + "'", null); if (num69 < 0) { num69 = 0; } } this.sendData("EY" + Otaku.Encoding.encodeVL64(num69)); this.sendData("Er" + eventManager.getEvent(this._roomID)); } return; case "A~": if (this._inPublicroom && DB.checkExists("SELECT roomid FROM room_ads WHERE roomid = '" + this._roomID + "'")) { string str37 = DB.runRead("SELECT img FROM room_ads WHERE roomid = '" + this._roomID + "'"); string str38 = DB.runRead("SELECT uri FROM room_ads WHERE roomid = '" + this._roomID + "'"); this.sendData(string.Concat(new object[] { "CP", str37, Convert.ToChar(9), str38 })); return; } this.sendData("CP0"); return; case "@|": if (this._ROOMACCESS_SECONDARY_OK) { if (!roomManager.containsRoom(this._roomID)) { this.Room = new virtualRoom(this._roomID, this._inPublicroom); roomManager.addRoom(this._roomID, this.Room); } else { this.Room = roomManager.getRoom(this._roomID); } this.sendData("@_" + this.Room.Heightmap); this.sendData(@"@\" + this.Room.dynamicUnits); return; } if (((this.gamePlayer != null) && this.gamePlayer.enteringGame) && ((this.gamePlayer.teamID != -1) && (this.gamePlayer.Game != null))) { this.sendData("@_" + this.gamePlayer.Game.Heightmap); this.sendData("Cs" + this.gamePlayer.Game.getPlayers()); this.gamePlayer.Game.getPlayers(); } this.gamePlayer.enteringGame = false; return; case "@}": if (this._ROOMACCESS_SECONDARY_OK && (this.Room != null)) { this.sendData("@^" + this.Room.PublicroomItems); this.sendData("@`" + this.Room.Flooritems); } return; case "@~": if (this._ROOMACCESS_SECONDARY_OK && (this.Room != null)) { this.sendData("Du" + this.Room.Groups); if (this.Room.Lobby != null) { this.sendData(string.Concat(new object[] { "CgH", this.Room.Lobby.Rank.Title, Convert.ToChar(2), Otaku.Encoding.encodeVL64(this.Room.Lobby.Rank.minPoints), Otaku.Encoding.encodeVL64(this.Room.Lobby.Rank.maxPoints) })); this.sendData("Cz" + this.Room.Lobby.playerRanks); } this.sendData("DiH"); if (!this._receivedSpriteIndex) { this.sendData("Dg[SEshelves_norja\x0002X~Dshelves_polyfon\x0002YmAshelves_silo\x0002XQHtable_polyfon_small\x0002YmAchair_polyfon\x0002ZbBtable_norja_med\x0002Y_Itable_silo_med\x0002X~Dtable_plasto_4leg\x0002Y_Itable_plasto_round\x0002Y_Itable_plasto_bigsquare\x0002Y_Istand_polyfon_z\x0002ZbBchair_silo\x0002X~Dsofa_silo\x0002X~Dcouch_norja\x0002X~Dchair_norja\x0002X~Dtable_polyfon_med\x0002YmAdoormat_love\x0002ZbBdoormat_plain\x0002Z[Msofachair_polyfon\x0002X~Dsofa_polyfon\x0002Z[Msofachair_silo\x0002X~Dchair_plasty\x0002X~Dchair_plasto\x0002YmAtable_plasto_square\x0002Y_Ibed_polyfon\x0002X~Dbed_polyfon_one\x0002[dObed_trad_one\x0002YmAbed_trad\x0002YmAbed_silo_one\x0002YmAbed_silo_two\x0002YmAtable_silo_small\x0002X~Dbed_armas_two\x0002YmAbed_budget_one\x0002XQHbed_budget\x0002XQHshelves_armas\x0002YmAbench_armas\x0002YmAtable_armas\x0002YmAsmall_table_armas\x0002ZbBsmall_chair_armas\x0002YmAfireplace_armas\x0002YmAlamp_armas\x0002YmAbed_armas_one\x0002YmAcarpet_standard\x0002Y_Icarpet_armas\x0002YmAcarpet_polar\x0002Y_Ifireplace_polyfon\x0002Y_Itable_plasto_4leg*1\x0002Y_Itable_plasto_bigsquare*1\x0002Y_Itable_plasto_round*1\x0002Y_Itable_plasto_square*1\x0002Y_Ichair_plasto*1\x0002YmAcarpet_standard*1\x0002Y_Idoormat_plain*1\x0002Z[Mtable_plasto_4leg*2\x0002Y_Itable_plasto_bigsquare*2\x0002Y_Itable_plasto_round*2\x0002Y_Itable_plasto_square*2\x0002Y_Ichair_plasto*2\x0002YmAdoormat_plain*2\x0002Z[Mcarpet_standard*2\x0002Y_Itable_plasto_4leg*3\x0002Y_Itable_plasto_bigsquare*3\x0002Y_Itable_plasto_round*3\x0002Y_Itable_plasto_square*3\x0002Y_Ichair_plasto*3\x0002YmAcarpet_standard*3\x0002Y_Idoormat_plain*3\x0002Z[Mtable_plasto_4leg*4\x0002Y_Itable_plasto_bigsquare*4\x0002Y_Itable_plasto_round*4\x0002Y_Itable_plasto_square*4\x0002Y_Ichair_plasto*4\x0002YmAcarpet_standard*4\x0002Y_Idoormat_plain*4\x0002Z[Mdoormat_plain*6\x0002Z[Mdoormat_plain*5\x0002Z[Mcarpet_standard*5\x0002Y_Itable_plasto_4leg*5\x0002Y_Itable_plasto_bigsquare*5\x0002Y_Itable_plasto_round*5\x0002Y_Itable_plasto_square*5\x0002Y_Ichair_plasto*5\x0002YmAtable_plasto_4leg*6\x0002Y_Itable_plasto_bigsquare*6\x0002Y_Itable_plasto_round*6\x0002Y_Itable_plasto_square*6\x0002Y_Ichair_plasto*6\x0002YmAtable_plasto_4leg*7\x0002Y_Itable_plasto_bigsquare*7\x0002Y_Itable_plasto_round*7\x0002Y_Itable_plasto_square*7\x0002Y_Ichair_plasto*7\x0002YmAtable_plasto_4leg*8\x0002Y_Itable_plasto_bigsquare*8\x0002Y_Itable_plasto_round*8\x0002Y_Itable_plasto_square*8\x0002Y_Ichair_plasto*8\x0002YmAtable_plasto_4leg*9\x0002Y_Itable_plasto_bigsquare*9\x0002Y_Itable_plasto_round*9\x0002Y_Itable_plasto_square*9\x0002Y_Ichair_plasto*9\x0002YmAcarpet_standard*6\x0002Y_Ichair_plasty*1\x0002X~Dpizza\x0002YmAdrinks\x0002YmAchair_plasty*2\x0002X~Dchair_plasty*3\x0002X~Dchair_plasty*4\x0002X~Dbar_polyfon\x0002Y_Iplant_cruddy\x0002YmAbottle\x0002YmAbardesk_polyfon\x0002X~Dbardeskcorner_polyfon\x0002X~Dfloortile\x0002Hbar_armas\x0002Y_Ibartable_armas\x0002YmAbar_chair_armas\x0002YmAcarpet_soft\x0002Z@Kcarpet_soft*1\x0002Z@Kcarpet_soft*2\x0002Z@Kcarpet_soft*3\x0002Z@Kcarpet_soft*4\x0002Z@Kcarpet_soft*5\x0002Z@Kcarpet_soft*6\x0002Z@Kred_tv\x0002Y_Iwood_tv\x0002YmAcarpet_polar*1\x0002Y_Ichair_plasty*5\x0002X~Dcarpet_polar*2\x0002Y_Icarpet_polar*3\x0002Y_Icarpet_polar*4\x0002Y_Ichair_plasty*6\x0002X~Dtable_polyfon\x0002YmAsmooth_table_polyfon\x0002YmAsofachair_polyfon_girl\x0002X~Dbed_polyfon_girl_one\x0002[dObed_polyfon_girl\x0002X~Dsofa_polyfon_girl\x0002Z[Mbed_budgetb_one\x0002XQHbed_budgetb\x0002XQHplant_pineapple\x0002YmAplant_fruittree\x0002Y_Iplant_small_cactus\x0002Y_Iplant_bonsai\x0002Y_Iplant_big_cactus\x0002Y_Iplant_yukka\x0002Y_Icarpet_standard*7\x0002Y_Icarpet_standard*8\x0002Y_Icarpet_standard*9\x0002Y_Icarpet_standard*a\x0002Y_Icarpet_standard*b\x0002Y_Iplant_sunflower\x0002Y_Iplant_rose\x0002Y_Itv_luxus\x0002Y_Ibath\x0002Z\\Bsink\x0002Y_Itoilet\x0002YmAduck\x0002YmAtile\x0002YmAtoilet_red\x0002YmAtoilet_yell\x0002YmAtile_red\x0002YmAtile_yell\x0002YmApresent_gen\x0002[~Npresent_gen1\x0002[~Npresent_gen2\x0002[~Npresent_gen3\x0002[~Npresent_gen4\x0002[~Npresent_gen5\x0002[~Npresent_gen6\x0002[~Nbar_basic\x0002Y_Ishelves_basic\x0002XQHsoft_sofachair_norja\x0002X~Dsoft_sofa_norja\x0002X~Dlamp_basic\x0002XQHlamp2_armas\x0002YmAfridge\x0002Y_Idoor\x0002Yc[doorB\x0002Yc[doorC\x0002Yc[pumpkin\x0002YmAskullcandle\x0002YmAdeadduck\x0002YmAdeadduck2\x0002YmAdeadduck3\x0002YmAmenorah\x0002YmApudding\x0002YmAham\x0002YmAturkey\x0002YmAxmasduck\x0002Y_Ihouse\x0002YmAtriplecandle\x0002YmAtree3\x0002YmAtree4\x0002YmAtree5\x0002X~Dham2\x0002YmAwcandleset\x0002YmArcandleset\x0002YmAstatue\x0002YmAheart\x0002Y_Ivaleduck\x0002YmAheartsofa\x0002X~Dthrone\x0002YmAsamovar\x0002Y_Igiftflowers\x0002Y_Ihabbocake\x0002YmAhologram\x0002YmAeasterduck\x0002Y_Ibunny\x0002YmAbasket\x0002Y_Ibirdie\x0002YmAedice\x0002X~Dclub_sofa\x0002Z[Mprize1\x0002YmAprize2\x0002YmAprize3\x0002YmAdivider_poly3\x0002X~Ddivider_arm1\x0002YmAdivider_arm2\x0002YmAdivider_arm3\x0002YmAdivider_nor1\x0002X~Ddivider_silo1\x0002X~Ddivider_nor2\x0002X~Ddivider_silo2\x0002Z[Mdivider_nor3\x0002X~Ddivider_silo3\x0002X~Dtypingmachine\x0002YmAspyro\x0002YmAredhologram\x0002YmAcamera\x0002Hjoulutahti\x0002YmAhyacinth1\x0002YmAhyacinth2\x0002YmAchair_plasto*10\x0002YmAchair_plasto*11\x0002YmAbardeskcorner_polyfon*12\x0002X~Dbardeskcorner_polyfon*13\x0002X~Dchair_plasto*12\x0002YmAchair_plasto*13\x0002YmAchair_plasto*14\x0002YmAtable_plasto_4leg*14\x0002Y_Imocchamaster\x0002Y_Icarpet_legocourt\x0002YmAbench_lego\x0002YmAlegotrophy\x0002YmAvalentinescreen\x0002YmAedicehc\x0002YmArare_daffodil_rug\x0002YmArare_beehive_bulb\x0002Y_Ihcsohva\x0002YmAhcamme\x0002YmArare_elephant_statue\x0002YmArare_fountain\x0002Y_Irare_stand\x0002YmArare_globe\x0002YmArare_hammock\x0002YmArare_elephant_statue*1\x0002YmArare_elephant_statue*2\x0002YmArare_fountain*1\x0002Y_Irare_fountain*2\x0002Y_Irare_fountain*3\x0002Y_Irare_beehive_bulb*1\x0002Y_Irare_beehive_bulb*2\x0002Y_Irare_xmas_screen\x0002Y_Irare_parasol*1\x0002XMVrare_parasol*2\x0002XMVrare_parasol*3\x0002XMVtree1\x0002X~Dtree2\x0002ZmBwcandle\x0002YxBrcandle\x0002YxBsoft_jaggara_norja\x0002YmAhouse2\x0002YmAdjesko_turntable\x0002YmAmd_sofa\x0002Z[Mmd_limukaappi\x0002Y_Itable_plasto_4leg*10\x0002Y_Itable_plasto_4leg*15\x0002Y_Itable_plasto_bigsquare*14\x0002Y_Itable_plasto_bigsquare*15\x0002Y_Itable_plasto_round*14\x0002Y_Itable_plasto_round*15\x0002Y_Itable_plasto_square*14\x0002Y_Itable_plasto_square*15\x0002Y_Ichair_plasto*15\x0002YmAchair_plasty*7\x0002X~Dchair_plasty*8\x0002X~Dchair_plasty*9\x0002X~Dchair_plasty*10\x0002X~Dchair_plasty*11\x0002X~Dchair_plasto*16\x0002YmAtable_plasto_4leg*16\x0002Y_Ihockey_score\x0002Y_Ihockey_light\x0002YmAdoorD\x0002Yc[prizetrophy2*3\x0002Yd[prizetrophy3*3\x0002Yd[prizetrophy4*3\x0002Yd[prizetrophy5*3\x0002Yd[prizetrophy6*3\x0002Yd[prizetrophy*1\x0002Yd[prizetrophy2*1\x0002Yd[prizetrophy3*1\x0002Yd[prizetrophy4*1\x0002Yd[prizetrophy5*1\x0002Yd[prizetrophy6*1\x0002Yd[prizetrophy*2\x0002Yd[prizetrophy2*2\x0002Yd[prizetrophy3*2\x0002Yd[prizetrophy4*2\x0002Yd[prizetrophy5*2\x0002Yd[prizetrophy6*2\x0002Yd[prizetrophy*3\x0002Yd[rare_parasol*0\x0002XMVhc_lmp\x0002[fBhc_tbl\x0002YmAhc_chr\x0002YmAhc_dsk\x0002XQHnest\x0002Hpetfood1\x0002ZvCpetfood2\x0002ZvCpetfood3\x0002ZvCwaterbowl*4\x0002XICwaterbowl*5\x0002XICwaterbowl*2\x0002XICwaterbowl*1\x0002XICwaterbowl*3\x0002XICtoy1\x0002XICtoy1*1\x0002XICtoy1*2\x0002XICtoy1*3\x0002XICtoy1*4\x0002XICgoodie1\x0002Yc[goodie1*1\x0002Yc[goodie1*2\x0002Yc[goodie2\x0002Yc[prizetrophy7*3\x0002Yd[prizetrophy7*1\x0002Yd[prizetrophy7*2\x0002Yd[scifiport*0\x0002Y_Iscifiport*9\x0002Y_Iscifiport*8\x0002Y_Iscifiport*7\x0002Y_Iscifiport*6\x0002Y_Iscifiport*5\x0002Y_Iscifiport*4\x0002Y_Iscifiport*3\x0002Y_Iscifiport*2\x0002Y_Iscifiport*1\x0002Y_Iscifirocket*9\x0002Y_Iscifirocket*8\x0002Y_Iscifirocket*7\x0002Y_Iscifirocket*6\x0002Y_Iscifirocket*5\x0002Y_Iscifirocket*4\x0002Y_Iscifirocket*3\x0002Y_Iscifirocket*2\x0002Y_Iscifirocket*1\x0002Y_Iscifirocket*0\x0002Y_Iscifidoor*10\x0002Y_Iscifidoor*9\x0002Y_Iscifidoor*8\x0002Y_Iscifidoor*7\x0002Y_Iscifidoor*6\x0002Y_Iscifidoor*5\x0002Y_Iscifidoor*4\x0002Y_Iscifidoor*3\x0002Y_Iscifidoor*2\x0002Y_Iscifidoor*1\x0002Y_Ipillow*5\x0002YmApillow*8\x0002YmApillow*0\x0002YmApillow*1\x0002YmApillow*2\x0002YmApillow*7\x0002YmApillow*9\x0002YmApillow*4\x0002YmApillow*6\x0002YmApillow*3\x0002YmAmarquee*1\x0002Y_Imarquee*2\x0002Y_Imarquee*7\x0002Y_Imarquee*a\x0002Y_Imarquee*8\x0002Y_Imarquee*9\x0002Y_Imarquee*5\x0002Y_Imarquee*4\x0002Y_Imarquee*6\x0002Y_Imarquee*3\x0002Y_Iwooden_screen*1\x0002Y_Iwooden_screen*2\x0002Y_Iwooden_screen*7\x0002Y_Iwooden_screen*0\x0002Y_Iwooden_screen*8\x0002Y_Iwooden_screen*5\x0002Y_Iwooden_screen*9\x0002Y_Iwooden_screen*4\x0002Y_Iwooden_screen*6\x0002Y_Iwooden_screen*3\x0002Y_Ipillar*6\x0002Y_Ipillar*1\x0002Y_Ipillar*9\x0002Y_Ipillar*0\x0002Y_Ipillar*8\x0002Y_Ipillar*2\x0002Y_Ipillar*5\x0002Y_Ipillar*4\x0002Y_Ipillar*7\x0002Y_Ipillar*3\x0002Y_Irare_dragonlamp*4\x0002Y_Irare_dragonlamp*0\x0002Y_Irare_dragonlamp*5\x0002Y_Irare_dragonlamp*2\x0002Y_Irare_dragonlamp*8\x0002Y_Irare_dragonlamp*9\x0002Y_Irare_dragonlamp*7\x0002Y_Irare_dragonlamp*6\x0002Y_Irare_dragonlamp*1\x0002Y_Irare_dragonlamp*3\x0002Y_Irare_icecream*1\x0002Y_Irare_icecream*7\x0002Y_Irare_icecream*8\x0002Y_Irare_icecream*2\x0002Y_Irare_icecream*6\x0002Y_Irare_icecream*9\x0002Y_Irare_icecream*3\x0002Y_Irare_icecream*0\x0002Y_Irare_icecream*4\x0002Y_Irare_icecream*5\x0002Y_Irare_fan*7\x0002YxBrare_fan*6\x0002YxBrare_fan*9\x0002YxBrare_fan*3\x0002YxBrare_fan*0\x0002YxBrare_fan*4\x0002YxBrare_fan*5\x0002YxBrare_fan*1\x0002YxBrare_fan*8\x0002YxBrare_fan*2\x0002YxBqueue_tile1*3\x0002X~Dqueue_tile1*6\x0002X~Dqueue_tile1*4\x0002X~Dqueue_tile1*9\x0002X~Dqueue_tile1*8\x0002X~Dqueue_tile1*5\x0002X~Dqueue_tile1*7\x0002X~Dqueue_tile1*2\x0002X~Dqueue_tile1*1\x0002X~Dqueue_tile1*0\x0002X~Dticket\x0002Hrare_snowrug\x0002X~Dcn_lamp\x0002ZxIcn_sofa\x0002YmAsporttrack1*1\x0002YmAsporttrack1*3\x0002YmAsporttrack1*2\x0002YmAsporttrack2*1\x0002[~Nsporttrack2*2\x0002[~Nsporttrack2*3\x0002[~Nsporttrack3*1\x0002YmAsporttrack3*2\x0002YmAsporttrack3*3\x0002YmAfootylamp\x0002X~Dbarchair_silo\x0002X~Ddivider_nor4*4\x0002X~Dtraffic_light*1\x0002ZxItraffic_light*2\x0002ZxItraffic_light*3\x0002ZxItraffic_light*4\x0002ZxItraffic_light*6\x0002ZxIrubberchair*1\x0002X~Drubberchair*2\x0002X~Drubberchair*3\x0002X~Drubberchair*4\x0002X~Drubberchair*5\x0002X~Drubberchair*6\x0002X~Dbarrier*1\x0002X~Dbarrier*2\x0002X~Dbarrier*3\x0002X~Drubberchair*7\x0002X~Drubberchair*8\x0002X~Dtable_norja_med*2\x0002Y_Itable_norja_med*3\x0002Y_Itable_norja_med*4\x0002Y_Itable_norja_med*5\x0002Y_Itable_norja_med*6\x0002Y_Itable_norja_med*7\x0002Y_Itable_norja_med*8\x0002Y_Itable_norja_med*9\x0002Y_Icouch_norja*2\x0002X~Dcouch_norja*3\x0002X~Dcouch_norja*4\x0002X~Dcouch_norja*5\x0002X~Dcouch_norja*6\x0002X~Dcouch_norja*7\x0002X~Dcouch_norja*8\x0002X~Dcouch_norja*9\x0002X~Dshelves_norja*2\x0002X~Dshelves_norja*3\x0002X~Dshelves_norja*4\x0002X~Dshelves_norja*5\x0002X~Dshelves_norja*6\x0002X~Dshelves_norja*7\x0002X~Dshelves_norja*8\x0002X~Dshelves_norja*9\x0002X~Dchair_norja*2\x0002X~Dchair_norja*3\x0002X~Dchair_norja*4\x0002X~Dchair_norja*5\x0002X~Dchair_norja*6\x0002X~Dchair_norja*7\x0002X~Dchair_norja*8\x0002X~Dchair_norja*9\x0002X~Ddivider_nor1*2\x0002X~Ddivider_nor1*3\x0002X~Ddivider_nor1*4\x0002X~Ddivider_nor1*5\x0002X~Ddivider_nor1*6\x0002X~Ddivider_nor1*7\x0002X~Ddivider_nor1*8\x0002X~Ddivider_nor1*9\x0002X~Dsoft_sofa_norja*2\x0002X~Dsoft_sofa_norja*3\x0002X~Dsoft_sofa_norja*4\x0002X~Dsoft_sofa_norja*5\x0002X~Dsoft_sofa_norja*6\x0002X~Dsoft_sofa_norja*7\x0002X~Dsoft_sofa_norja*8\x0002X~Dsoft_sofa_norja*9\x0002X~Dsoft_sofachair_norja*2\x0002X~Dsoft_sofachair_norja*3\x0002X~Dsoft_sofachair_norja*4\x0002X~Dsoft_sofachair_norja*5\x0002X~Dsoft_sofachair_norja*6\x0002X~Dsoft_sofachair_norja*7\x0002X~Dsoft_sofachair_norja*8\x0002X~Dsoft_sofachair_norja*9\x0002X~Dsofachair_silo*2\x0002X~Dsofachair_silo*3\x0002X~Dsofachair_silo*4\x0002X~Dsofachair_silo*5\x0002X~Dsofachair_silo*6\x0002X~Dsofachair_silo*7\x0002X~Dsofachair_silo*8\x0002X~Dsofachair_silo*9\x0002X~Dtable_silo_small*2\x0002X~Dtable_silo_small*3\x0002X~Dtable_silo_small*4\x0002X~Dtable_silo_small*5\x0002X~Dtable_silo_small*6\x0002X~Dtable_silo_small*7\x0002X~Dtable_silo_small*8\x0002X~Dtable_silo_small*9\x0002X~Ddivider_silo1*2\x0002X~Ddivider_silo1*3\x0002X~Ddivider_silo1*4\x0002X~Ddivider_silo1*5\x0002X~Ddivider_silo1*6\x0002X~Ddivider_silo1*7\x0002X~Ddivider_silo1*8\x0002X~Ddivider_silo1*9\x0002X~Ddivider_silo3*2\x0002X~Ddivider_silo3*3\x0002X~Ddivider_silo3*4\x0002X~Ddivider_silo3*5\x0002X~Ddivider_silo3*6\x0002X~Ddivider_silo3*7\x0002X~Ddivider_silo3*8\x0002X~Ddivider_silo3*9\x0002X~Dtable_silo_med*2\x0002X~Dtable_silo_med*3\x0002X~Dtable_silo_med*4\x0002X~Dtable_silo_med*5\x0002X~Dtable_silo_med*6\x0002X~Dtable_silo_med*7\x0002X~Dtable_silo_med*8\x0002X~Dtable_silo_med*9\x0002X~Dsofa_silo*2\x0002X~Dsofa_silo*3\x0002X~Dsofa_silo*4\x0002X~Dsofa_silo*5\x0002X~Dsofa_silo*6\x0002X~Dsofa_silo*7\x0002X~Dsofa_silo*8\x0002X~Dsofa_silo*9\x0002X~Dsofachair_polyfon*2\x0002X~Dsofachair_polyfon*3\x0002X~Dsofachair_polyfon*4\x0002X~Dsofachair_polyfon*6\x0002X~Dsofachair_polyfon*7\x0002X~Dsofachair_polyfon*8\x0002X~Dsofachair_polyfon*9\x0002X~Dsofa_polyfon*2\x0002Z[Msofa_polyfon*3\x0002Z[Msofa_polyfon*4\x0002Z[Msofa_polyfon*6\x0002Z[Msofa_polyfon*7\x0002Z[Msofa_polyfon*8\x0002Z[Msofa_polyfon*9\x0002Z[Mbed_polyfon*2\x0002X~Dbed_polyfon*3\x0002X~Dbed_polyfon*4\x0002X~Dbed_polyfon*6\x0002X~Dbed_polyfon*7\x0002X~Dbed_polyfon*8\x0002X~Dbed_polyfon*9\x0002X~Dbed_polyfon_one*2\x0002[dObed_polyfon_one*3\x0002[dObed_polyfon_one*4\x0002[dObed_polyfon_one*6\x0002[dObed_polyfon_one*7\x0002[dObed_polyfon_one*8\x0002[dObed_polyfon_one*9\x0002[dObardesk_polyfon*2\x0002X~Dbardesk_polyfon*3\x0002X~Dbardesk_polyfon*4\x0002X~Dbardesk_polyfon*5\x0002X~Dbardesk_polyfon*6\x0002X~Dbardesk_polyfon*7\x0002X~Dbardesk_polyfon*8\x0002X~Dbardesk_polyfon*9\x0002X~Dbardeskcorner_polyfon*2\x0002X~Dbardeskcorner_polyfon*3\x0002X~Dbardeskcorner_polyfon*4\x0002X~Dbardeskcorner_polyfon*5\x0002X~Dbardeskcorner_polyfon*6\x0002X~Dbardeskcorner_polyfon*7\x0002X~Dbardeskcorner_polyfon*8\x0002X~Dbardeskcorner_polyfon*9\x0002X~Ddivider_poly3*2\x0002X~Ddivider_poly3*3\x0002X~Ddivider_poly3*4\x0002X~Ddivider_poly3*5\x0002X~Ddivider_poly3*6\x0002X~Ddivider_poly3*7\x0002X~Ddivider_poly3*8\x0002X~Ddivider_poly3*9\x0002X~Dchair_silo*2\x0002X~Dchair_silo*3\x0002X~Dchair_silo*4\x0002X~Dchair_silo*5\x0002X~Dchair_silo*6\x0002X~Dchair_silo*7\x0002X~Dchair_silo*8\x0002X~Dchair_silo*9\x0002X~Ddivider_nor3*2\x0002X~Ddivider_nor3*3\x0002X~Ddivider_nor3*4\x0002X~Ddivider_nor3*5\x0002X~Ddivider_nor3*6\x0002X~Ddivider_nor3*7\x0002X~Ddivider_nor3*8\x0002X~Ddivider_nor3*9\x0002X~Ddivider_nor2*2\x0002X~Ddivider_nor2*3\x0002X~Ddivider_nor2*4\x0002X~Ddivider_nor2*5\x0002X~Ddivider_nor2*6\x0002X~Ddivider_nor2*7\x0002X~Ddivider_nor2*8\x0002X~Ddivider_nor2*9\x0002X~Dsilo_studydesk\x0002X~Dsolarium_norja\x0002Y_Isolarium_norja*1\x0002Y_Isolarium_norja*2\x0002Y_Isolarium_norja*3\x0002Y_Isolarium_norja*5\x0002Y_Isolarium_norja*6\x0002Y_Isolarium_norja*7\x0002Y_Isolarium_norja*8\x0002Y_Isolarium_norja*9\x0002Y_Isandrug\x0002X~Drare_moonrug\x0002YmAchair_china\x0002YmAchina_table\x0002YmAsleepingbag*1\x0002YmAsleepingbag*2\x0002YmAsleepingbag*3\x0002YmAsleepingbag*4\x0002YmAsafe_silo\x0002Y_Isleepingbag*7\x0002YmAsleepingbag*9\x0002YmAsleepingbag*5\x0002YmAsleepingbag*10\x0002YmAsleepingbag*6\x0002YmAsleepingbag*8\x0002YmAchina_shelve\x0002X~Dtraffic_light*5\x0002ZxIdivider_nor4*2\x0002X~Ddivider_nor4*3\x0002X~Ddivider_nor4*5\x0002X~Ddivider_nor4*6\x0002X~Ddivider_nor4*7\x0002X~Ddivider_nor4*8\x0002X~Ddivider_nor4*9\x0002X~Ddivider_nor5*2\x0002X~Ddivider_nor5*3\x0002X~Ddivider_nor5*4\x0002X~Ddivider_nor5*5\x0002X~Ddivider_nor5*6\x0002X~Ddivider_nor5*7\x0002X~Ddivider_nor5*8\x0002X~Ddivider_nor5*9\x0002X~Ddivider_nor5\x0002X~Ddivider_nor4\x0002X~Dwall_china\x0002YmAcorner_china\x0002YmAbarchair_silo*2\x0002X~Dbarchair_silo*3\x0002X~Dbarchair_silo*4\x0002X~Dbarchair_silo*5\x0002X~Dbarchair_silo*6\x0002X~Dbarchair_silo*7\x0002X~Dbarchair_silo*8\x0002X~Dbarchair_silo*9\x0002X~Dsafe_silo*2\x0002Y_Isafe_silo*3\x0002Y_Isafe_silo*4\x0002Y_Isafe_silo*5\x0002Y_Isafe_silo*6\x0002Y_Isafe_silo*7\x0002Y_Isafe_silo*8\x0002Y_Isafe_silo*9\x0002Y_Iglass_shelf\x0002Y_Iglass_chair\x0002Y_Iglass_stool\x0002Y_Iglass_sofa\x0002Y_Iglass_table\x0002Y_Iglass_table*2\x0002Y_Iglass_table*3\x0002Y_Iglass_table*4\x0002Y_Iglass_table*5\x0002Y_Iglass_table*6\x0002Y_Iglass_table*7\x0002Y_Iglass_table*8\x0002Y_Iglass_table*9\x0002Y_Iglass_chair*2\x0002Y_Iglass_chair*3\x0002Y_Iglass_chair*4\x0002Y_Iglass_chair*5\x0002Y_Iglass_chair*6\x0002Y_Iglass_chair*7\x0002Y_Iglass_chair*8\x0002Y_Iglass_chair*9\x0002Y_Iglass_sofa*2\x0002Y_Iglass_sofa*3\x0002Y_Iglass_sofa*4\x0002Y_Iglass_sofa*5\x0002Y_Iglass_sofa*6\x0002Y_Iglass_sofa*7\x0002Y_Iglass_sofa*8\x0002Y_Iglass_sofa*9\x0002Y_Iglass_stool*2\x0002Y_Iglass_stool*4\x0002Y_Iglass_stool*5\x0002Y_Iglass_stool*6\x0002Y_Iglass_stool*7\x0002Y_Iglass_stool*8\x0002Y_Iglass_stool*3\x0002Y_Iglass_stool*9\x0002Y_ICF_10_coin_gold\x0002ZvCCF_1_coin_bronze\x0002ZvCCF_20_moneybag\x0002ZvCCF_50_goldbar\x0002ZvCCF_5_coin_silver\x0002ZvChc_crpt\x0002YmAhc_tv\x0002Z\\Bgothgate\x0002X~Dgothiccandelabra\x0002YxBgothrailing\x0002X~Dgoth_table\x0002YmAhc_bkshlf\x0002YmAhc_btlr\x0002Y_Ihc_crtn\x0002YmAhc_djset\x0002YmAhc_frplc\x0002ZbBhc_lmpst\x0002YmAhc_machine\x0002YmAhc_rllr\x0002XQHhc_rntgn\x0002X~Dhc_trll\x0002YmAgothic_chair*1\x0002X~Dgothic_sofa*1\x0002X~Dgothic_stool*1\x0002X~Dgothic_chair*2\x0002X~Dgothic_sofa*2\x0002X~Dgothic_stool*2\x0002X~Dgothic_chair*3\x0002X~Dgothic_sofa*3\x0002X~Dgothic_stool*3\x0002X~Dgothic_chair*4\x0002X~Dgothic_sofa*4\x0002X~Dgothic_stool*4\x0002X~Dgothic_chair*5\x0002X~Dgothic_sofa*5\x0002X~Dgothic_stool*5\x0002X~Dgothic_chair*6\x0002X~Dgothic_sofa*6\x0002X~Dgothic_stool*6\x0002X~Dval_cauldron\x0002X~Dsound_machine\x0002X~Dromantique_pianochair*3\x0002Y_Iromantique_pianochair*5\x0002Y_Iromantique_pianochair*2\x0002Y_Iromantique_pianochair*4\x0002Y_Iromantique_pianochair*1\x0002Y_Iromantique_divan*3\x0002Y_Iromantique_divan*5\x0002Y_Iromantique_divan*2\x0002Y_Iromantique_divan*4\x0002Y_Iromantique_divan*1\x0002Y_Iromantique_chair*3\x0002Y_Iromantique_chair*5\x0002Y_Iromantique_chair*2\x0002Y_Iromantique_chair*4\x0002Y_Iromantique_chair*1\x0002Y_Irare_parasol\x0002Y_Iplant_valentinerose*3\x0002XICplant_valentinerose*5\x0002XICplant_valentinerose*2\x0002XICplant_valentinerose*4\x0002XICplant_valentinerose*1\x0002XICplant_mazegate\x0002YeCplant_maze\x0002ZcCplant_bulrush\x0002XICpetfood4\x0002Y_Icarpet_valentine\x0002Z|Egothic_carpet\x0002XICgothic_carpet2\x0002Z|Egothic_chair\x0002X~Dgothic_sofa\x0002X~Dgothic_stool\x0002X~Dgrand_piano*3\x0002Z|Egrand_piano*5\x0002Z|Egrand_piano*2\x0002Z|Egrand_piano*4\x0002Z|Egrand_piano*1\x0002Z|Etheatre_seat\x0002Z@Kromantique_tray2\x0002Y_Iromantique_tray1\x0002Y_Iromantique_smalltabl*3\x0002Y_Iromantique_smalltabl*5\x0002Y_Iromantique_smalltabl*2\x0002Y_Iromantique_smalltabl*4\x0002Y_Iromantique_smalltabl*1\x0002Y_Iromantique_mirrortabl\x0002Y_Iromantique_divider*3\x0002Z[Mromantique_divider*2\x0002Z[Mromantique_divider*4\x0002Z[Mromantique_divider*1\x0002Z[Mjp_tatami2\x0002[dWjp_tatami\x0002YGGhabbowood_chair\x0002YGGjp_bamboo\x0002YGGjp_irori\x0002XQHjp_pillow\x0002YGGsound_set_1\x0002[dWsound_set_2\x0002[dWsound_set_3\x0002[dWsound_set_4\x0002[dWsound_set_5\x0002[dWsound_set_6\x0002[dWsound_set_7\x0002[dWsound_set_8\x0002[dWsound_set_9\x0002[dWsound_machine*1\x0002Yc[spotlight\x0002Y_Isound_machine*2\x0002Yc[sound_machine*3\x0002Yc[sound_machine*4\x0002Yc[sound_machine*5\x0002Yc[sound_machine*6\x0002Yc[sound_machine*7\x0002Yc[rom_lamp\x0002Z|Erclr_sofa\x0002XQHrclr_garden\x0002XQHrclr_chair\x0002Z|Esound_set_28\x0002[dWsound_set_27\x0002[dWsound_set_26\x0002[dWsound_set_25\x0002[dWsound_set_24\x0002[dWsound_set_23\x0002[dWsound_set_22\x0002[dWsound_set_21\x0002[dWsound_set_20\x0002[dWsound_set_19\x0002[dWsound_set_18\x0002[dWsound_set_17\x0002[dWsound_set_16\x0002[dWsound_set_15\x0002[dWsound_set_14\x0002[dWsound_set_13\x0002[dWsound_set_12\x0002[dWsound_set_11\x0002[dWsound_set_10\x0002[dWrope_divider\x0002XQHromantique_clock\x0002Y_Irare_icecream_campaign\x0002Y_Ipura_mdl5*1\x0002Yc[pura_mdl5*2\x0002Yc[pura_mdl5*3\x0002Yc[pura_mdl5*4\x0002Yc[pura_mdl5*5\x0002Yc[pura_mdl5*6\x0002Yc[pura_mdl5*7\x0002Yc[pura_mdl5*8\x0002Yc[pura_mdl5*9\x0002Yc[pura_mdl4*1\x0002XQHpura_mdl4*2\x0002XQHpura_mdl4*3\x0002XQHpura_mdl4*4\x0002XQHpura_mdl4*5\x0002XQHpura_mdl4*6\x0002XQHpura_mdl4*7\x0002XQHpura_mdl4*8\x0002XQHpura_mdl4*9\x0002XQHpura_mdl3*1\x0002XQHpura_mdl3*2\x0002XQHpura_mdl3*3\x0002XQHpura_mdl3*4\x0002XQHpura_mdl3*5\x0002XQHpura_mdl3*6\x0002XQHpura_mdl3*7\x0002XQHpura_mdl3*8\x0002XQHpura_mdl3*9\x0002XQHpura_mdl2*1\x0002XQHpura_mdl2*2\x0002XQHpura_mdl2*3\x0002XQHpura_mdl2*4\x0002XQHpura_mdl2*5\x0002XQHpura_mdl2*6\x0002XQHpura_mdl2*7\x0002XQHpura_mdl2*8\x0002XQHpura_mdl2*9\x0002XQHpura_mdl1*1\x0002XQHpura_mdl1*2\x0002XQHpura_mdl1*3\x0002XQHpura_mdl1*4\x0002XQHpura_mdl1*5\x0002XQHpura_mdl1*6\x0002XQHpura_mdl1*7\x0002XQHpura_mdl1*8\x0002XQHpura_mdl1*9\x0002XQHjp_lantern\x0002XQHchair_basic*1\x0002XQHchair_basic*2\x0002XQHchair_basic*3\x0002XQHchair_basic*4\x0002XQHchair_basic*5\x0002XQHchair_basic*6\x0002XQHchair_basic*7\x0002XQHchair_basic*8\x0002XQHchair_basic*9\x0002XQHbed_budget*1\x0002XQHbed_budget*2\x0002XQHbed_budget*3\x0002XQHbed_budget*4\x0002XQHbed_budget*5\x0002XQHbed_budget*6\x0002XQHbed_budget*7\x0002XQHbed_budget*8\x0002XQHbed_budget*9\x0002XQHbed_budget_one*1\x0002XQHbed_budget_one*2\x0002XQHbed_budget_one*3\x0002XQHbed_budget_one*4\x0002XQHbed_budget_one*5\x0002XQHbed_budget_one*6\x0002XQHbed_budget_one*7\x0002XQHbed_budget_one*8\x0002XQHbed_budget_one*9\x0002XQHjp_drawer\x0002XQHtile_stella\x0002Z[Mtile_marble\x0002Z[Mtile_brown\x0002Z[Msummer_grill*1\x0002Y_Isummer_grill*2\x0002Y_Isummer_grill*3\x0002Y_Isummer_grill*4\x0002Y_Isummer_chair*1\x0002Y_Isummer_chair*2\x0002Y_Isummer_chair*3\x0002Y_Isummer_chair*4\x0002Y_Isummer_chair*5\x0002Y_Isummer_chair*6\x0002Y_Isummer_chair*7\x0002Y_Isummer_chair*8\x0002Y_Isummer_chair*9\x0002Y_Isound_set_36\x0002[dWsound_set_35\x0002[dWsound_set_34\x0002[dWsound_set_33\x0002[dWsound_set_32\x0002[dWsound_set_31\x0002[dWsound_set_30\x0002[dWsound_set_29\x0002[dWsound_machine_pro\x0002Yc[rare_mnstr\x0002Y_Ione_way_door*1\x0002XQHone_way_door*2\x0002XQHone_way_door*3\x0002XQHone_way_door*4\x0002XQHone_way_door*5\x0002XQHone_way_door*6\x0002XQHone_way_door*7\x0002XQHone_way_door*8\x0002XQHone_way_door*9\x0002XQHexe_rug\x0002Z[Mexe_s_table\x0002ZGRsound_set_37\x0002[dWsummer_pool*1\x0002ZlIsummer_pool*2\x0002ZlIsummer_pool*3\x0002ZlIsummer_pool*4\x0002ZlIsong_disk\x0002Yc[jukebox*1\x0002Yc[carpet_soft_tut\x0002[~Nsound_set_44\x0002[dWsound_set_43\x0002[dWsound_set_42\x0002[dWsound_set_41\x0002[dWsound_set_40\x0002[dWsound_set_39\x0002[dWsound_set_38\x0002[dWgrunge_chair\x0002Z@Kgrunge_mattress\x0002Z@Kgrunge_radiator\x0002Z@Kgrunge_shelf\x0002Z@Kgrunge_sign\x0002Z@Kgrunge_table\x0002Z@Khabboween_crypt\x0002[uKhabboween_grass\x0002Z@Khal_cauldron\x0002Z@Khal_grave\x0002Z@Ksound_set_52\x0002[dWsound_set_51\x0002[dWsound_set_50\x0002[dWsound_set_49\x0002[dWsound_set_48\x0002[dWsound_set_47\x0002[dWsound_set_46\x0002[dWsound_set_45\x0002[dWxmas_icelamp\x0002Z[Mxmas_cstl_wall\x0002Z[Mxmas_cstl_twr\x0002Z[Mxmas_cstl_gate\x0002[~Ntree7\x0002Z[Mtree6\x0002Z[Msound_set_54\x0002[dWsound_set_53\x0002[dWsafe_silo_pb\x0002[dOplant_mazegate_snow\x0002Z[Mplant_maze_snow\x0002Z[Mchristmas_sleigh\x0002Z[Mchristmas_reindeer\x0002[~Nchristmas_poop\x0002Z[Mexe_bardesk\x0002Z[Mexe_chair\x0002Z[Mexe_chair2\x0002Z[Mexe_corner\x0002Z[Mexe_drinks\x0002Z[Mexe_sofa\x0002Z[Mexe_table\x0002Z[Msound_set_59\x0002[dWsound_set_58\x0002[dWsound_set_57\x0002[dWsound_set_56\x0002[dWsound_set_55\x0002[dWnoob_table*1\x0002[~Nnoob_table*2\x0002[~Nnoob_table*3\x0002[~Nnoob_table*4\x0002[~Nnoob_table*5\x0002[~Nnoob_table*6\x0002[~Nnoob_stool*1\x0002[~Nnoob_stool*2\x0002[~Nnoob_stool*3\x0002[~Nnoob_stool*4\x0002[~Nnoob_stool*5\x0002[~Nnoob_stool*6\x0002[~Nnoob_rug*1\x0002[~Nnoob_rug*2\x0002[~Nnoob_rug*3\x0002[~Nnoob_rug*4\x0002[~Nnoob_rug*5\x0002[~Nnoob_rug*6\x0002[~Nnoob_lamp*1\x0002[dOnoob_lamp*2\x0002[dOnoob_lamp*3\x0002[dOnoob_lamp*4\x0002[dOnoob_lamp*5\x0002[dOnoob_lamp*6\x0002[dOnoob_chair*1\x0002[~Nnoob_chair*2\x0002[~Nnoob_chair*3\x0002[~Nnoob_chair*4\x0002[~Nnoob_chair*5\x0002[~Nnoob_chair*6\x0002[~Nexe_globe\x0002[~Nexe_plant\x0002Z[Mval_teddy*1\x0002[dOval_teddy*2\x0002[dOval_teddy*3\x0002[dOval_teddy*4\x0002[dOval_teddy*5\x0002[dOval_teddy*6\x0002[dOval_randomizer\x0002[dOval_choco\x0002[dOteleport_door\x0002Yc[sound_set_61\x0002[dWsound_set_60\x0002[dWfortune\x0002[dOsw_table\x0002ZIPsw_raven\x0002[cQsw_chest\x0002ZIPsand_cstl_wall\x0002ZIPsand_cstl_twr\x0002ZIPsand_cstl_gate\x0002ZIPgrunge_candle\x0002ZIPgrunge_bench\x0002ZIPgrunge_barrel\x0002ZIPrclr_lamp\x0002ZGRprizetrophy9*1\x0002Yd[prizetrophy8*1\x0002Yd[nouvelle_trax\x0002Yc[md_rug\x0002ZGRjp_tray6\x0002ZGRjp_tray5\x0002ZGRjp_tray4\x0002ZGRjp_tray3\x0002ZGRjp_tray2\x0002ZGRjp_tray1\x0002ZGRarabian_teamk\x0002ZGRarabian_snake\x0002ZGRarabian_rug\x0002ZGRarabian_pllw\x0002ZGRarabian_divdr\x0002ZGRarabian_chair\x0002ZGRarabian_bigtb\x0002ZGRarabian_tetbl\x0002ZGRarabian_tray1\x0002ZGRarabian_tray2\x0002ZGRarabian_tray3\x0002ZGRarabian_tray4\x0002ZGRsound_set_64\x0002[dWsound_set_63\x0002[dWsound_set_62\x0002[dWjukebox_ptv*1\x0002Yc[calippo\x0002ZAStraxsilver\x0002Yc[traxgold\x0002Yc[traxbronze\x0002Yc[bench_puffet\x0002YATCFC_500_goldbar\x0002ZvCCFC_200_moneybag\x0002ZvCCFC_10_coin_bronze\x0002ZvCCFC_100_coin_gold\x0002ZvCCFC_50_coin_silver\x0002ZvCjp_table\x0002XMVjp_rare\x0002XMVjp_katana3\x0002XMVjp_katana2\x0002XMVjp_katana1\x0002XMVfootylamp_campaign\x0002XMVtiki_waterfall\x0002[dWtiki_tray4\x0002[dWtiki_tray3\x0002[dWtiki_tray2\x0002[dWtiki_tray1\x0002[dWtiki_tray0\x0002[dWtiki_toucan\x0002[dWtiki_torch\x0002[dWtiki_statue\x0002[dWtiki_sand\x0002[dWtiki_parasol\x0002[dWtiki_junglerug\x0002[dWtiki_corner\x0002[dWtiki_bflies\x0002[dWtiki_bench\x0002[dWtiki_bardesk\x0002[dWtampax_rug\x0002[dWsound_set_70\x0002[dWsound_set_69\x0002[dWsound_set_68\x0002[dWsound_set_67\x0002[dWsound_set_66\x0002[dWsound_set_65\x0002[dWnoob_rug_tradeable*1\x0002[dWnoob_rug_tradeable*2\x0002[dWnoob_rug_tradeable*3\x0002[dWnoob_rug_tradeable*4\x0002[dWnoob_rug_tradeable*5\x0002[dWnoob_rug_tradeable*6\x0002[dWnoob_plant\x0002[dWnoob_lamp_tradeable*1\x0002[dWnoob_lamp_tradeable*2\x0002[dWnoob_lamp_tradeable*3\x0002[dWnoob_lamp_tradeable*4\x0002[dWnoob_lamp_tradeable*5\x0002[dWnoob_lamp_tradeable*6\x0002[dWnoob_chair_tradeable*1\x0002[dWnoob_chair_tradeable*2\x0002[dWnoob_chair_tradeable*3\x0002[dWnoob_chair_tradeable*4\x0002[dWnoob_chair_tradeable*5\x0002[dWnoob_chair_tradeable*6\x0002[dWjp_teamaker\x0002[dWsvnr_uk\x0002[`_svnr_nl\x0002XhXsvnr_it\x0002XhXsvnr_de\x0002[gXsvnr_aus\x0002[gXdiner_tray_7\x0002[gXdiner_tray_6\x0002[gXdiner_tray_5\x0002[gXdiner_tray_4\x0002[gXdiner_tray_3\x0002[gXdiner_tray_2\x0002[gXdiner_tray_1\x0002[gXdiner_tray_0\x0002[gXdiner_sofa_2*1\x0002[gXdiner_sofa_2*2\x0002[gXdiner_sofa_2*3\x0002[gXdiner_sofa_2*4\x0002[gXdiner_sofa_2*5\x0002[gXdiner_sofa_2*6\x0002[gXdiner_sofa_2*7\x0002[gXdiner_sofa_2*8\x0002[gXdiner_sofa_2*9\x0002[gXdiner_shaker\x0002[gXdiner_rug\x0002[gXdiner_gumvendor*1\x0002[gXdiner_gumvendor*2\x0002[gXdiner_gumvendor*3\x0002[gXdiner_gumvendor*4\x0002[gXdiner_gumvendor*5\x0002[gXdiner_gumvendor*6\x0002[gXdiner_gumvendor*7\x0002[gXdiner_gumvendor*8\x0002[gXdiner_gumvendor*9\x0002[gXdiner_cashreg*1\x0002[gXdiner_cashreg*2\x0002[gXdiner_cashreg*3\x0002[gXdiner_cashreg*4\x0002[gXdiner_cashreg*5\x0002[gXdiner_cashreg*6\x0002[gXdiner_cashreg*7\x0002[gXdiner_cashreg*8\x0002[gXdiner_cashreg*9\x0002[gXdiner_table_2*1\x0002XiZdiner_table_2*2diner_table_2*2\x0002XiZdiner_table_2*3\x0002XiZdiner_table_2*4\x0002XiZdiner_table_2*5\x0002XiZdiner_table_2*6\x0002XiZdiner_table_2*7\x0002XiZdiner_table_2*8\x0002XiZdiner_table_2*9\x0002XiZdiner_table_1*1\x0002XiZdiner_table_1*2\x0002XiZdiner_table_1*3\x0002XiZdiner_table_1*4\x0002XiZdiner_table_1*5\x0002XiZdiner_table_1*6\x0002XiZdiner_table_1*7\x0002XiZdiner_table_1*8\x0002XiZdiner_table_1*9\x0002XiZdiner_sofa_1*1\x0002XiZdiner_sofa_1*2\x0002XiZdiner_sofa_1*3\x0002XiZdiner_sofa_1*4\x0002XiZdiner_sofa_1*5\x0002XiZdiner_sofa_1*6\x0002XiZdiner_sofa_1*7\x0002XiZdiner_sofa_1*8\x0002XiZdiner_sofa_1*9\x0002XiZdiner_chair*1\x0002XiZdiner_chair*2\x0002XiZdiner_chair*3\x0002XiZdiner_chair*4\x0002XiZdiner_chair*5\x0002XiZdiner_chair*6\x0002XiZdiner_chair*7\x0002XiZdiner_chair*8\x0002XiZdiner_chair*9\x0002XiZdiner_bardesk_gate*1\x0002XiZdiner_bardesk_gate*2\x0002XiZdiner_bardesk_gate*3\x0002XiZdiner_bardesk_gate*4\x0002XiZdiner_bardesk_gate*5\x0002XiZdiner_bardesk_gate*6\x0002XiZdiner_bardesk_gate*7\x0002XiZdiner_bardesk_gate*8\x0002XiZdiner_bardesk_gate*9\x0002XiZdiner_bardesk_corner*1\x0002XiZdiner_bardesk_corner*2\x0002XiZdiner_bardesk_corner*3\x0002XiZdiner_bardesk_corner*4\x0002XiZdiner_bardesk_corner*5\x0002XiZdiner_bardesk_corner*6\x0002XiZdiner_bardesk_corner*7\x0002XiZdiner_bardesk_corner*8\x0002XiZdiner_bardesk_corner*9\x0002XiZdiner_bardesk*1\x0002XiZdiner_bardesk*2\x0002XiZdiner_bardesk*3\x0002XiZdiner_bardesk*4\x0002XiZdiner_bardesk*5\x0002XiZdiner_bardesk*6\x0002XiZdiner_bardesk*7\x0002XiZdiner_bardesk*8\x0002XiZdiner_bardesk*9\x0002XiZads_dave_cns\x0002XiZeasy_carpet\x0002Yc[easy_bowl2\x0002Yc[greek_corner\x0002Yc[greek_gate\x0002Yc[greek_pillars\x0002Yc[greek_seat\x0002Yc[greektrophy*1\x0002[P\\greektrophy*2\x0002[P\\greektrophy*3\x0002[P\\greek_block\x0002Xt[hcc_table\x0002Y`]hcc_shelf\x0002Y`]hcc_sofa\x0002Y`]hcc_minibar\x0002Y`]hcc_chair\x0002Y`]det_divider\x0002Y`]netari_carpet\x0002Y`]det_body\x0002Y`]hcc_stool\x0002Y`]hcc_sofachair\x0002Y`]hcc_crnr\x0002Xw]hcc_dvdr\x0002Xw]sob_carpet\x0002[`_igor_seat\x0002[`_ads_igorbrain\x0002Y_aads_igorswitch\x0002Y_aads_711*1\x0002Y_aads_711*2\x0002Y_aads_711*3\x0002Y_aads_711*4\x0002Y_aads_igorraygun\x0002Y_ahween08_sink\x0002Y[chween08_curtain\x0002Y[chween08_bath\x0002Y[chween08_defibs\x0002Y[chween08_bbag\x0002Y[chween08_curtain2\x0002Y[chween08_defibs2\x0002Y[chween08_bed\x0002Y[chween08_sink2\x0002Y[chween08_bed2\x0002Y[chween08_bath2\x0002Y[chween08_manhole\x0002Y[chween08_trll\x0002Y[cPRpost.it\x0002Hpost.it.vd\x0002Hphoto\x0002HChess\x0002HTicTacToe\x0002HBattleShip\x0002HPoker\x0002Hwallpaper\x0002Hfloor\x0002Hposter\x0002Z@Kgothicfountain\x0002YxBhc_wall_lamp\x0002ZbBindustrialfan\x0002Z`Btorch\x0002Z\\Bval_heart\x0002XBCwallmirror\x0002Z|Ejp_ninjastars\x0002XQHhabw_mirror\x0002XQHhabbowheel\x0002Z[Mguitar_skull\x0002Z@Kguitar_v\x0002Z@Kxmas_light\x0002[~Nhrella_poster_3\x0002[\x007fNhrella_poster_2\x0002ZIPhrella_poster_1\x0002[\x007fNsw_swords\x0002ZIPsw_stone\x0002ZIPsw_hole\x0002ZIProomdimmer\x0002Yc[md_logo_wall\x0002ZGRmd_can\x0002ZGRjp_sheet3\x0002ZGRjp_sheet2\x0002ZGRjp_sheet1\x0002ZGRarabian_swords\x0002ZGRarabian_wndw\x0002ZGRtiki_wallplnt\x0002[dWtiki_surfboard\x0002[dWtampax_wall\x0002[dWwindow_single_default\x0002[gXwindow_double_default\x0002[gXnoob_window_double\x0002[dWwindow_triple\x0002[gXwindow_square\x0002[gXwindow_romantic_wide\x0002[gXwindow_romantic_narrow\x0002[gXwindow_grunge\x0002[gXwindow_golden\x0002[gXwindow_chinese_wide\x0002[gXwindow_chinese_narrow\x0002YA\\window_basic\x0002[gXwindow_70s_wide\x0002[gXwindow_70s_narrow\x0002[gXads_sunnyd\x0002YlXwindow_diner2\x0002XiZwindow_diner\x0002XiZdiner_walltable\x0002XiZads_dave_wall\x0002XiZwindow_hole\x0002Yc[easy_poster\x0002Yc[ads_nokia_logo\x0002Yc[ads_nokia_phone\x0002Yc[landscape\x0002XV^window_skyscraper\x0002[j\\netari_poster\x0002Y`]det_bhole\x0002Y`]ads_campguitar\x0002Xw]hween08_rad\x0002Y[chween08_wndwb\x0002Y[chween08_wndw\x0002Y[chween08_bio\x0002Y[chw_08_xray\x0002Y[c"); this._receivedSpriteIndex = true; } int num70 = DB.runRead("SELECT room_visits FROM users WHERE id = '" + this.userID + "'", 0) + 1; DB.runQuery(string.Concat(new object[] { "UPDATE users SET room_visits = '", num70, "' WHERE id = '", this.userID, "' LIMIT 1" })); if (num70 <= 30) { if (num70 > 0x1d) { if (!DB.checkExists("SELECT badgeid FROM users_badges WHERE userid = '" + this.userID + "' AND badgeid = 'ACH_RoomEntry3'")) { DB.runQuery("UPDATE users_badges SET badgeid = 'ACH_RoomEntry3' WHERE badgeid = 'ACH_RoomEntry2' AND userid = '" + this.userID + "'"); this.refreshBadges(); } } else if (num70 > 14) { if (!DB.checkExists("SELECT badgeid FROM users_badges WHERE userid = '" + this.userID + "' AND badgeid = 'ACH_RoomEntry2'")) { DB.runQuery("UPDATE users_badges SET badgeid = 'ACH_RoomEntry2' WHERE badgeid = 'ACH_RoomEntry1' AND userid = '" + this.userID + "'"); this.refreshBadges(); } } else if ((num70 > 4) && !DB.checkExists("SELECT badgeid FROM users_badges WHERE userid = '" + this.userID + "' AND badgeid = 'ACH_RoomEntry1'")) { DB.runQuery("INSERT INTO users_badges (userid, badgeid, iscurrent) VALUES ('" + this.userID + "', 'ACH_RoomEntry1', '0')"); this.refreshBadges(); } } } return; case "@\x007f": if (this._ROOMACCESS_SECONDARY_OK && (this.Room != null)) { this.sendData("@m" + this.Room.Wallitems); } return; case "A@": if ((this._ROOMACCESS_SECONDARY_OK && (this.Room != null)) && (this.roomUser == null)) { this.sendData("@b" + this.Room.dynamicStatuses); this.Room.addUser(this); } return; case "CH": { int num71 = 0; string moderatorMessage = ""; int num72 = 0; string note = ""; string str41 = ""; str2 = currentPacket.Substring(2, 2); if (str2 != null) { if (!(str2 == "HH")) { if (str2 == "HI") { if (!rankManager.containsRight(this._Rank, "fuse_kick")) { this.sendData("BK" + stringManager.getString("modtool_accesserror")); } else { num71 = Otaku.Encoding.decodeB64(currentPacket.Substring(4, 2)); moderatorMessage = currentPacket.Substring(6, num71).Replace(Convert.ToChar(1).ToString(), " "); num72 = Otaku.Encoding.decodeB64(currentPacket.Substring(num71 + 6, 2)); note = currentPacket.Substring(num71 + 8, num72); str41 = currentPacket.Substring((num71 + num72) + 10); if ((moderatorMessage != "") && (str41 != "")) { virtualUser user4 = userManager.getUser(str41); if (user4 == null) { this.sendData("BK" + stringManager.getString("modtool_actionfail") + "\r" + stringManager.getString("modtool_usernotfound")); } else if ((user4.Room != null) && (user4.roomUser != null)) { if (user4._Rank < this._Rank) { user4.Room.removeUser(user4.roomUser.roomUID, true, moderatorMessage); staffManager.addStaffMessage("kick", this.userID, user4.userID, moderatorMessage, note); } else { this.sendData("BK" + stringManager.getString("modtool_actionfail") + "\r" + stringManager.getString("modtool_rankerror")); } } } } } else { switch (str2) { case "IH": if (!rankManager.containsRight(this._Rank, "fuse_room_alert")) { this.sendData("BK" + stringManager.getString("modtool_accesserror")); } else if ((this.Room != null) && (this.roomUser != null)) { num71 = Otaku.Encoding.decodeB64(currentPacket.Substring(4, 2)); moderatorMessage = currentPacket.Substring(6, num71).Replace(Convert.ToChar(1).ToString(), " "); num72 = Otaku.Encoding.decodeB64(currentPacket.Substring(num71 + 6, 2)); note = currentPacket.Substring(num71 + 8, num72); if (moderatorMessage != "") { this.Room.sendData("B!" + moderatorMessage + Convert.ToChar(2)); staffManager.addStaffMessage("ralert", this.userID, this._roomID, moderatorMessage, note); } } return; case "II": if (!rankManager.containsRight(this._Rank, "fuse_room_kick")) { this.sendData("BK" + stringManager.getString("modtool_accesserror")); return; } if ((this.Room == null) || (this.roomUser == null)) { return; } num71 = Otaku.Encoding.decodeB64(currentPacket.Substring(4, 2)); moderatorMessage = currentPacket.Substring(6, num71).Replace(Convert.ToChar(1).ToString(), " "); num72 = Otaku.Encoding.decodeB64(currentPacket.Substring(num71 + 6, 2)); note = currentPacket.Substring(num71 + 8, num72); if (moderatorMessage != "") { this.Room.kickUsers(this._Rank, moderatorMessage); staffManager.addStaffMessage("rkick", this.userID, this._roomID, moderatorMessage, note); } break; case "HJ": if (!rankManager.containsRight(this._Rank, "fuse_ban")) { this.sendData("BK" + stringManager.getString("modtool_accesserror")); } else { int num73 = 0; int hours = 0; bool flag7 = currentPacket.Substring(currentPacket.Length - 1, 1) == "I"; num71 = Otaku.Encoding.decodeB64(currentPacket.Substring(4, 2)); moderatorMessage = currentPacket.Substring(6, num71).Replace(Convert.ToChar(1).ToString(), " "); num72 = Otaku.Encoding.decodeB64(currentPacket.Substring(num71 + 6, 2)); note = currentPacket.Substring(num71 + 8, num72); num73 = Otaku.Encoding.decodeB64(currentPacket.Substring((num71 + num72) + 8, 2)); str41 = currentPacket.Substring((num71 + num72) + 10, num73); hours = Otaku.Encoding.decodeVL64(currentPacket.Substring(((num71 + num72) + num73) + 10)); if (((moderatorMessage != "") && (str41 != "")) && (hours != 0)) { string[] strArray18 = DB.runReadRow("SELECT id,rank,ipaddress_last FROM users WHERE name = '" + DB.Stripslash(str41) + "'"); if (strArray18.Length == 0) { this.sendData("BK" + stringManager.getString("modtool_actionfail") + "\r" + stringManager.getString("modtool_usernotfound")); } else if (byte.Parse(strArray18[1]) >= this._Rank) { this.sendData("BK" + stringManager.getString("modtool_actionfail") + "\r" + stringManager.getString("modtool_rankerror")); } else { int targetID = int.Parse(strArray18[0]); string str42 = ""; staffManager.addStaffMessage("ban", this.userID, targetID, moderatorMessage, note); if (flag7 && rankManager.containsRight(this._Rank, "fuse_superban")) { userManager.setBan(strArray18[2], hours, moderatorMessage); str42 = userManager.generateBanReport(strArray18[2]); } else { userManager.setBan(targetID, hours, moderatorMessage); str42 = userManager.generateBanReport(targetID); } this.sendData("BK" + str42); } } } return; } } return; } if (rankManager.containsRight(this._Rank, "fuse_alert")) { num71 = Otaku.Encoding.decodeB64(currentPacket.Substring(4, 2)); moderatorMessage = currentPacket.Substring(6, num71).Replace(Convert.ToChar(1).ToString(), " "); num72 = Otaku.Encoding.decodeB64(currentPacket.Substring(num71 + 6, 2)); note = currentPacket.Substring(num71 + 8, num72); str41 = currentPacket.Substring((num71 + num72) + 10); if ((moderatorMessage != "") && (str41 != "")) { virtualUser user3 = userManager.getUser(str41); if (user3 == null) { this.sendData("BK" + stringManager.getString("modtool_actionfail") + "\r" + stringManager.getString("modtool_usernotfound")); } else { user3.sendData("B!" + moderatorMessage + Convert.ToChar(2)); staffManager.addStaffMessage("alert", this.userID, user3.userID, moderatorMessage, note); } } return; } this.sendData("BK" + stringManager.getString("modtool_accesserror")); } return; } case "Cm": { string[] strArray19 = DB.runReadRow("SELECT id, date, message, picked_up FROM cms_help WHERE username = '" + this._Username + "' AND picked_up = '0'"); if (strArray19.Length == 0) { this.sendData("D\x007fH"); return; } this.sendData(string.Concat(new object[] { "D\x007fI", strArray19[0], Convert.ToChar(2), strArray19[1], Convert.ToChar(2), strArray19[2], Convert.ToChar(2) })); return; } case "Cn": { int num76 = DB.runRead("SELECT id FROM cms_help WHERE username = '" + this._Username + "' AND picked_up = '0'", null); DB.runQuery("DELETE FROM cms_help WHERE picked_up = '0' AND username = '" + this._Username + "' LIMIT 1"); this.sendData("D\x007fH"); userManager.sendToRank(Config.Minimum_CFH_Rank, true, string.Concat(new object[] { "BT", Otaku.Encoding.encodeVL64(num76), Convert.ToChar(2), "IUser Deleted!", Convert.ToChar(2), "User Deleted!", Convert.ToChar(2), "User Deleted!", Convert.ToChar(2), Otaku.Encoding.encodeVL64(0), Convert.ToChar(2), Convert.ToChar(2), "H", Convert.ToChar(2), Otaku.Encoding.encodeVL64(0) })); return; } case "AV": if (!DB.checkExists("SELECT id FROM cms_help WHERE username = '" + this._Username + "' AND picked_up = '0'")) { int num77 = Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2)); if (num77 != 0) { string query = currentPacket.Substring(4, num77); DB.runQuery(string.Concat(new object[] { "INSERT INTO cms_help (username,ip,message,date,picked_up,subject,roomid) VALUES ('", this._Username, "','", this.connectionSocket.RemoteEndPoint.ToString().Split(new char[] { char.Parse(":") })[0], "','", DB.Stripslash(query), "','", DateTime.Now, "','0','CFH message [hotel]','", this._roomID.ToString(), "')" })); int num78 = DB.runRead("SELECT id FROM cms_help WHERE username = '" + this._Username + "' AND picked_up = '0'", null); string str44 = DB.runRead("SELECT name FROM rooms WHERE id = '" + this._roomID + "'"); this.sendData("EAH"); userManager.sendToRank(Config.Minimum_CFH_Rank, true, string.Concat(new object[] { "BT", Otaku.Encoding.encodeVL64(num78), Convert.ToChar(2), "ISent: ", DateTime.Now, Convert.ToChar(2), this._Username, Convert.ToChar(2), query, Convert.ToChar(2), Otaku.Encoding.encodeVL64(this._roomID), Convert.ToChar(2), str44, Convert.ToChar(2), "I", Convert.ToChar(2), Otaku.Encoding.encodeVL64(this._roomID) })); } } return; case "CG": if (rankManager.containsRight(this._Rank, "fuse_receive_calls_for_help")) { int num79 = Otaku.Encoding.decodeVL64(currentPacket.Substring(4, Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2)))); string str45 = currentPacket.Substring(Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2)) + 6); string str46 = DB.runRead("SELECT username FROM cms_help WHERE id = '" + num79 + "'"); if (str46 != null) { virtualUser user5 = userManager.getUser(userManager.getUserID(str46)); if (user5._isLoggedIn) { user5.sendData("DR" + str45 + Convert.ToChar(2)); DB.runQuery(string.Concat(new object[] { "UPDATE cms_help SET picked_up = '", this._Username, "' WHERE id = '", num79, "' LIMIT 1" })); } return; } this.sendData("BK" + stringManager.getString("cfh_fail")); } return; case "CF": if (rankManager.containsRight(this._Rank, "fuse_receive_calls_for_help")) { int num80 = Otaku.Encoding.decodeVL64(currentPacket.Substring(4, Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2)))); string[] strArray20 = DB.runReadRow("SELECT username,message,date,picked_up,roomid FROM cms_help WHERE id = '" + num80 + "'"); if (strArray20.Length != 0) { if (!(strArray20[3] == "1")) { DB.runQuery("DELETE FROM cms_help WHERE id = '" + num80 + "' LIMIT 1"); userManager.sendToRank(Config.Minimum_CFH_Rank, true, string.Concat(new object[] { "BT", Otaku.Encoding.encodeVL64(num80), Convert.ToChar(2), "HStaff Deleted!", Convert.ToChar(2), "Staff Deleted!", Convert.ToChar(2), "Staff Deleted!", Convert.ToChar(2), Otaku.Encoding.encodeVL64(0), Convert.ToChar(2), Convert.ToChar(2), "H", Convert.ToChar(2), Otaku.Encoding.encodeVL64(0) })); return; } this.sendData("BK" + stringManager.getString("cfh_picked_up")); } } return; case "@p": { int num81 = Otaku.Encoding.decodeVL64(currentPacket.Substring(4)); if (!DB.checkExists("SELECT id FROM cms_help WHERE id = '" + num81 + "'")) { this.sendData(stringManager.getString("cfh_deleted")); return; } string[] strArray21 = DB.runReadRow("SELECT picked_up,username,message,roomid FROM cms_help WHERE id = '" + num81 + "'"); string str47 = DB.runRead("SELECT name FROM rooms WHERE id = '" + strArray21[3] + "'"); if (!(strArray21[0] == "1")) { userManager.sendToRank(Config.Minimum_CFH_Rank, true, string.Concat(new object[] { "BT", Otaku.Encoding.encodeVL64(num81), Convert.ToChar(2), "IPicked up: ", DateTime.Now, Convert.ToChar(2), strArray21[1], Convert.ToChar(2), strArray21[2], Convert.ToChar(2), Otaku.Encoding.encodeVL64(int.Parse(strArray21[3])), Convert.ToChar(2), str47, Convert.ToChar(2), "I", Convert.ToChar(2), Otaku.Encoding.encodeVL64(int.Parse(strArray21[3])) })); } else { this.sendData("BK" + stringManager.getString("cfh_picked_up")); } DB.runQuery("UPDATE cms_help SET picked_up = '1' WHERE id = '" + num81 + "' LIMIT 1"); return; } case "EC": if (rankManager.containsRight(this._Rank, "fuse_receive_calls_for_help")) { int num82 = Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2)); int num83 = DB.runRead("SELECT roomid FROM cms_help WHERE id = '" + Otaku.Encoding.decodeVL64(currentPacket.Substring(4, num82)) + "'", null); if (num83 != 0) { if (!roomManager.getRoom(num83).isPublicroom) { this.sendData("D^H" + Otaku.Encoding.encodeVL64(num83)); return; } this.sendData("D^I" + Otaku.Encoding.encodeVL64(num83)); } } return; case "AO": if (((this.Room != null) && (this.roomUser != null)) && (!this.statusManager.containsStatus("sit") && !this.statusManager.containsStatus("lay"))) { int num84 = int.Parse(currentPacket.Substring(2).Split(new char[] { ' ' })[0]); int num85 = int.Parse(currentPacket.Split(new char[] { ' ' })[1]); this.roomUser.Z1 = Rotation.Calculate(this.roomUser.X, this.roomUser.Y, num84, num85); this.roomUser.Z2 = this.roomUser.Z1; this.roomUser.Refresh(); } return; case "AK": if (((this.Room != null) && (this.roomUser != null)) && !this.roomUser.walkLock) { int num86 = Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2)); int num87 = Otaku.Encoding.decodeB64(currentPacket.Substring(4, 2)); if (this._alcohol > 5) { num86 += new Random().Next(-2, 2); } if (this.roomUser.SPECIAL_TELEPORTABLE) { this.roomUser.X = num86; this.roomUser.Y = num87; this.roomUser.goalX = -1; this.Room.Refresh(this.roomUser); this.refreshAppearance(false, false, true); } else { this._hunger++; if (this._hunger > 100) { this._hunger = 100; this._health--; if (this._health < 1) { this.KillUser(); } } this.roomUser.goalX = num86; this.roomUser.goalY = num87; } } return; case "As": if (!(((this.Room == null) || (this.roomUser == null)) || this.roomUser.walkDoor)) { this.roomUser.walkDoor = true; this.roomUser.goalX = this.Room.doorX; this.roomUser.goalY = this.Room.doorY; } return; case "At": if ((this.Room != null) || ((this.roomUser != null) && this.Room.hasSwimmingPool)) { virtualRoom.squareTrigger trigger = this.Room.getTrigger(this.roomUser.X, this.roomUser.Y); if ((trigger.Object == "curtains1") || (trigger.Object == "curtains2")) { string str48 = DB.Stripslash(currentPacket.Substring(2)); this.roomUser.SwimOutfit = str48; this.Room.sendData(@"@\" + this.roomUser.detailsString); this.Room.sendSpecialCast(trigger.Object, "open"); this.roomUser.walkLock = false; this.roomUser.goalX = trigger.goalX; this.roomUser.goalY = trigger.goalY; DB.runQuery(string.Concat(new object[] { "UPDATE users SET figure_swim = '", str48, "' WHERE id = '", this.userID, "' LIMIT 1" })); return; } } return; case "B^": if ((this.Room != null) && (this.roomUser != null)) { string str49 = currentPacket.Split(new char[] { '^' })[1]; int num88 = Otaku.Encoding.decodeB64(str49.Substring(1, 2)); string str50 = DB.Stripslash(str49.Substring(3, num88)); int num89 = num88; num88 = Otaku.Encoding.decodeB64(str49.Substring(4 + num89, 2)); string str51 = DB.Stripslash(str49.Substring(6 + num89, num88)); num89 += num88; num88 = Otaku.Encoding.decodeB64(str49.Substring(7 + num89, 2)); string str52 = DB.Stripslash(str49.Substring(9 + num89, num88)); num89 += num88; num88 = Otaku.Encoding.decodeB64(str49.Substring(11 + num89, 2)); string str53 = DB.Stripslash(str49.Substring(13 + num89, num88)); num89 += num88; num88 = Otaku.Encoding.decodeB64(str49.Substring(15 + num89, 2)); string str54 = DB.Stripslash(str49.Substring(0x11 + num89, num88)); string str55 = "Cd" + this.roomUser.userID + Convert.ToChar(2); int num90 = 0; DB.runQuery("UPDATE users_badges SET iscurrent = '0' WHERE userid = '" + this.roomUser.userID + "'"); if (str50 != "") { DB.runQuery(string.Concat(new object[] { "UPDATE users_badges SET iscurrent = '1' WHERE userid = '", this.roomUser.userID, "' AND badgeid = '", str50, "'" })); num90++; } if (str51 != "") { DB.runQuery(string.Concat(new object[] { "UPDATE users_badges SET iscurrent = '2' WHERE userid = '", this.roomUser.userID, "' AND badgeid = '", str51, "'" })); num90++; } if (str52 != "") { DB.runQuery(string.Concat(new object[] { "UPDATE users_badges SET iscurrent = '3' WHERE userid = '", this.roomUser.userID, "' AND badgeid = '", str52, "'" })); num90++; } if (str53 != "") { DB.runQuery(string.Concat(new object[] { "UPDATE users_badges SET iscurrent = '4' WHERE userid = '", this.roomUser.userID, "' AND badgeid = '", str53, "'" })); num90++; } if (str54 != "") { DB.runQuery(string.Concat(new object[] { "UPDATE users_badges SET iscurrent = '5' WHERE userid = '", this.roomUser.userID, "' AND badgeid = '", str54, "'" })); num90++; } string str56 = Otaku.Encoding.encodeVL64(num90); str55 = str55 + str56 + str56; if (str50 != "") { num90--; str56 = Otaku.Encoding.encodeVL64(num90); obj2 = str55; str55 = string.Concat(new object[] { obj2, str50, Convert.ToChar(2), str56 }); } if (str51 != "") { num90--; str56 = Otaku.Encoding.encodeVL64(num90); obj2 = str55; str55 = string.Concat(new object[] { obj2, str51, Convert.ToChar(2), str56 }); } if (str52 != "") { num90--; str56 = Otaku.Encoding.encodeVL64(num90); obj2 = str55; str55 = string.Concat(new object[] { obj2, str52, Convert.ToChar(2), str56 }); } if (str53 != "") { num90--; str56 = Otaku.Encoding.encodeVL64(num90); obj2 = str55; str55 = string.Concat(new object[] { obj2, str53, Convert.ToChar(2), str56 }); } if (str54 != "") { num90--; str56 = Otaku.Encoding.encodeVL64(num90); str55 = str55 + str54 + Convert.ToChar(2); } this.Room.sendData(str55); } return; case "DG": { int num91 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); string[] strArray22 = DB.runReadColumn("SELECT tag FROM cms_tags WHERE ownerid = '" + num91 + "'", 20); StringBuilder builder8 = new StringBuilder(Otaku.Encoding.encodeVL64(num91) + Otaku.Encoding.encodeVL64(strArray22.Length)); for (int num92 = 0; num92 < strArray22.Length; num92++) { builder8.Append(strArray22[num92] + Convert.ToChar(2)); } this.sendData("E^" + builder8.ToString()); return; } case "Es": this.Room.sendData("Fx" + currentPacket.Substring(2)); return; case "Cg": if ((this.Room != null) && (this.roomUser != null)) { int num93 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (DB.checkExists("SELECT id FROM groups_details WHERE id = '" + num93 + "'")) { string str57 = DB.runRead("SELECT name FROM groups_details WHERE id = '" + num93 + "'"); string str58 = DB.runRead("SELECT description FROM groups_details WHERE id = '" + num93 + "'"); int num94 = DB.runRead("SELECT roomid FROM groups_details WHERE id = '" + num93 + "'", null); string str59 = ""; if (num94 <= 0) { num94 = -1; } else { str59 = DB.runRead("SELECT name FROM rooms WHERE id = '" + num94 + "'"); } this.sendData(string.Concat(new object[] { "Dw", Otaku.Encoding.encodeVL64(num93), str57, Convert.ToChar(2), str58, Convert.ToChar(2), Otaku.Encoding.encodeVL64(num94), str59, Convert.ToChar(2) })); return; } } return; case "AX": if (this.statusManager != null) { switch (currentPacket.Substring(2)) { case "CarryItem": this.statusManager.dropCarrydItem(); return; case "Dance": this.statusManager.removeStatus("dance"); this.statusManager.Refresh(); break; } } return; case "A^": if (!(((this.Room == null) || (this.roomUser == null)) || this.statusManager.containsStatus("wave"))) { this.statusManager.removeStatus("dance"); this.statusManager.handleStatus("wave", "", Config.Statuses_Wave_waveDuration); } return; case "A]": if (((this.Room != null) && (this.roomUser != null)) && (!this.statusManager.containsStatus("sit") && !this.statusManager.containsStatus("lay"))) { this.statusManager.dropCarrydItem(); if (currentPacket.Length == 2) { this.statusManager.addStatus("dance", ""); goto Label_7AFD; } if (rankManager.containsRight(this._Rank, "fuse_use_club_dance")) { int num95 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if ((num95 < 0) || (num95 > 4)) { return; } this.statusManager.addStatus("dance", num95.ToString()); goto Label_7AFD; } } return; case "AP": if ((this.Room != null) && (this.roomUser != null)) { string str61 = currentPacket.Substring(2); if (!this.statusManager.containsStatus("lay") && !str61.Contains("/")) { try { int num96 = int.Parse(str61); if ((num96 < 1) || (num96 > 0x24)) { return; } } catch { if ((!this._inPublicroom && (str61 != "Water")) && ((str61 != "Milk") && (str61 != "Juice"))) { return; } } this.statusManager.carryItem(str61); } } return; case "Ah": if (((this.Room != null) && (this.roomUser != null)) && (!this.statusManager.containsStatus("sit") && !this.statusManager.containsStatus("lay"))) { if (currentPacket.Length == 2) { this.statusManager.addStatus("sign", ""); } else { string str62 = currentPacket.Substring(2); this.statusManager.handleStatus("sign", str62, Config.Statuses_Wave_waveDuration); } this.statusManager.Refresh(); } return; case "Cl": if ((this.Room != null) && (this.roomUser != null)) { int startIndex = 2; int num98 = Otaku.Encoding.decodeVL64(currentPacket.Substring(startIndex)); if (!DB.checkExists(string.Concat(new object[] { "SELECT aid FROM poll_results WHERE uid = '", this.userID, "' AND pid = '", num98, "'" }))) { startIndex += Otaku.Encoding.encodeVL64(num98).Length; int num99 = Otaku.Encoding.decodeVL64(currentPacket.Substring(startIndex)); startIndex += Otaku.Encoding.encodeVL64(num99).Length; if (!DB.checkExists("SELECT type FROM poll_questions WHERE qid = '" + num99 + "' AND type = '3'")) { int num101 = Otaku.Encoding.decodeVL64(currentPacket.Substring(startIndex)); startIndex += Otaku.Encoding.encodeVL64(num101).Length; int[] numArray10 = new int[num101]; for (int num102 = 0; num102 < num101; num102++) { numArray10[num102] = Otaku.Encoding.decodeVL64(currentPacket.Substring(startIndex)); startIndex += Otaku.Encoding.encodeVL64(numArray10[num102]).Length; } foreach (int num103 in numArray10) { DB.runQuery(string.Concat(new object[] { "INSERT INTO poll_results (pid,qid,aid,answers,uid) VALUES ('", num98, "','", num99, "','", num103, "',' ','", this.userID, "')" })); } return; } int num100 = Otaku.Encoding.decodeB64(currentPacket.Substring(startIndex, 2)); startIndex += 2; string str63 = DB.Stripslash(currentPacket.Substring(startIndex, num100)); DB.runQuery(string.Concat(new object[] { "INSERT INTO poll_results (pid,qid,aid,answers,uid) VALUES ('", num98, "','", num99, "','0','", str63, "','", this.userID, "')" })); } } return; case "@t": case "@w": { string message = currentPacket.Substring(4); if ((message.Substring(0, 1) == ":") && this.isSpeechCommand(message.Substring(1))) { if (this.roomUser.isTyping) { this.Room.sendData("Ei" + Otaku.Encoding.encodeVL64(this.roomUser.roomUID) + "H"); this.roomUser.isTyping = false; } } else if (((!this._isMuted && (this.Room != null)) && (this.roomUser != null)) || ((this.Room == null) && (this.gamePlayer != null))) { userManager.addChatMessage(this._Username, this._roomID, message); message = stringManager.filterSwearwords(message); if (this._alcohol > 5) { message = stringManager.DrunkenTalk(message); } if (!(currentPacket.Substring(1, 1) == "w")) { if (this.gamePlayer == null) { this._hunger++; if (this._hunger > 100) { this._hunger = 100; this._health--; if (this._health < 1) { this.KillUser(); } } this.Room.sendSaying(this.roomUser, message); } else { this.gamePlayer.Game.sendData(string.Concat(new object[] { "Ei", Otaku.Encoding.encodeVL64(this.gamePlayer.roomUID), "H", Convert.ToChar(1), "@X", Otaku.Encoding.encodeVL64(this.gamePlayer.roomUID), message, Convert.ToChar(2) })); } } else if (this.gamePlayer != null) { this.gamePlayer.Game.sendData(string.Concat(new object[] { "Ei", Otaku.Encoding.encodeVL64(this.gamePlayer.roomUID), "H", Convert.ToChar(1), "@Z", Otaku.Encoding.encodeVL64(this.gamePlayer.roomUID), message, Convert.ToChar(2) })); } else { this._hunger++; if (this._hunger > 100) { this._hunger = 100; this._health--; if (this._health < 1) { this.KillUser(); } } this.Room.sendShout(this.roomUser, message); } this.statusManager.handleStatus("talk", "", message.Length * 150); } Thread.Sleep(200); return; } case "@x": { string receiver = currentPacket.Substring(4).Split(new char[] { ' ' })[0]; string str66 = currentPacket.Substring(receiver.Length + 5); if ((!this._isMuted && (this.Room != null)) && (this.roomUser != null)) { if (((receiver == "") && (str66.Substring(0, 1) == ":")) && this.isSpeechCommand(str66.Substring(1))) { if (this.roomUser.isTyping) { this.Room.sendData("Ei" + Otaku.Encoding.encodeVL64(this.roomUser.roomUID) + "H"); this.roomUser.isTyping = false; } } else { userManager.addChatMessage(this._Username, this._roomID, str66); str66 = stringManager.filterSwearwords(str66); this.Room.sendWhisper(this.roomUser, receiver, str66); } this.statusManager.handleStatus("talk", "", str66.Length * 150); } return; } case "D}": if ((!this._isMuted && (this.Room != null)) && (this.roomUser != null)) { this.Room.sendData("Ei" + Otaku.Encoding.encodeVL64(this.roomUser.roomUID) + "I"); this.roomUser.isTyping = true; } return; case "D~": if ((this.Room != null) && (this.roomUser != null)) { this.Room.sendData("Ei" + Otaku.Encoding.encodeVL64(this.roomUser.roomUID) + "H"); this.roomUser.isTyping = false; } return; case "A`": if (((this.Room != null) && (this.roomUser != null)) && (!this._inPublicroom && this._isOwner)) { string str67 = currentPacket.Substring(2); if (userManager.containsUser(str67)) { virtualUser user6 = userManager.getUser(str67); if (((user6._roomID == this._roomID) && !user6._hasRights) && !user6._isOwner) { DB.runQuery(string.Concat(new object[] { "INSERT INTO room_rights(roomid,userid) VALUES ('", this._roomID, "','", user6.userID, "')" })); user6._hasRights = true; user6.statusManager.addStatus("flatctrl", "onlyfurniture"); user6.roomUser.Refresh(); user6.sendData("@j"); return; } } } return; case "Aa": if (((this.Room != null) && (this.roomUser != null)) && (!this._inPublicroom && this._isOwner)) { string str68 = currentPacket.Substring(2); if (userManager.containsUser(str68)) { virtualUser user7 = userManager.getUser(str68); if (((user7._roomID == this._roomID) && user7._hasRights) && !user7._isOwner) { DB.runQuery(string.Concat(new object[] { "DELETE FROM room_rights WHERE roomid = '", this._roomID, "' AND userid = '", user7.userID, "' LIMIT 1" })); user7._hasRights = false; user7.statusManager.removeStatus("flatctrl"); user7.roomUser.Refresh(); user7.sendData("@k"); return; } } } return; case "A_": if (((this.Room != null) && (this.roomUser != null)) && (!this._inPublicroom && this._hasRights)) { string str69 = currentPacket.Substring(2); if (userManager.containsUser(str69)) { virtualUser user8 = userManager.getUser(str69); if (user8._roomID == this._roomID) { if (!user8._isOwner || ((user8._Rank <= this._Rank) && !rankManager.containsRight(user8._Rank, "fuse_any_room_controller"))) { user8.roomUser.walkLock = true; user8.roomUser.walkDoor = true; user8.roomUser.goalX = this.Room.doorX; user8.roomUser.goalY = this.Room.doorY; } return; } } } return; case "E@": if ((this._hasRights && !this._inPublicroom) && ((this.Room != null) && (this.roomUser != null))) { string str70 = currentPacket.Substring(2); if (userManager.containsUser(str70)) { virtualUser user9 = userManager.getUser(str70); if (user9._roomID == this._roomID) { if (!user9._isOwner || ((user9._Rank <= this._Rank) && !rankManager.containsRight(user9._Rank, "fuse_any_room_controller"))) { string str71 = DateTime.Now.AddMinutes((double) Config.Rooms_roomBan_banDuration).ToString(); DB.runQuery(string.Concat(new object[] { "INSERT INTO room_bans (roomid,userid,ban_expire) VALUES ('", this._roomID, "','", user9.userID, "','", str71, "')" })); user9.roomUser.walkLock = true; user9.roomUser.walkDoor = true; user9.roomUser.goalX = this.Room.doorX; user9.roomUser.goalY = this.Room.doorY; } return; } } } return; case "DE": if ((!this._inPublicroom && (this.Room != null)) && (this.roomUser != null)) { int num104 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (((num104 == 1) || (num104 == -1)) && !DB.checkExists(string.Concat(new object[] { "SELECT userid FROM room_votes WHERE userid = '", this.userID, "' AND roomid = '", this._roomID, "'" }))) { DB.runQuery(string.Concat(new object[] { "INSERT INTO room_votes (userid,roomid,vote) VALUES ('", this.userID, "','", this._roomID, "','", num104, "')" })); int voteAmount = DB.runRead("SELECT SUM(vote) FROM room_votes WHERE roomid = '" + this._roomID + "'", null); if (voteAmount < 0) { voteAmount = 0; } this.roomUser.hasVoted = true; this.Room.sendNewVoteAmount(voteAmount); } } return; case "Ae": if ((this.Room != null) && (this.roomUser != null)) { this.sendData("A~" + catalogueManager.getPageIndex(this._Rank)); } return; case "Af": if ((this.Room != null) && (this.roomUser != null)) { Otaku.Encoding.decodeVL64(currentPacket.Substring(2, 3)); string pageName = currentPacket.Split(new char[] { '/' })[1]; this.sendData("A\x007f" + catalogueManager.getPage(pageName, this._Rank) + "H"); } return; case "Ad": { strArray23 = currentPacket.Split(new char[] { Convert.ToChar(13) }); string str73 = strArray23[1]; str74 = strArray23[3]; int num106 = DB.runRead(string.Concat(new object[] { "SELECT indexid FROM catalogue_pages WHERE indexname = '", DB.Stripslash(str73), "' AND minrank <= ", this._Rank }), null); num107 = DB.runRead("SELECT tid FROM catalogue_items WHERE name_cct = '" + DB.Stripslash(str74) + "'", null); num108 = DB.runRead(string.Concat(new object[] { "SELECT catalogue_cost FROM catalogue_items WHERE catalogue_id_page = '", num106, "' AND tid = '", num107, "'" }), null); if ((num108 == 0) || (num108 > this._Credits)) { this.sendData("AD"); return; } num109 = this.userID; lastItemID = 0; num111 = 0; if (!(strArray23[5] == "1")) { goto Label_8F08; } string str75 = strArray23[6]; if (!(str75 != this._Username)) { goto Label_8E64; } int num112 = DB.runRead("SELECT id FROM users WHERE name = '" + DB.Stripslash(str75) + "'", null); if (num112 > 0) { num109 = num112; goto Label_8E64; } this.sendData("AL" + str75); return; } case "Ai": { string str80 = currentPacket.Substring(2); int num117 = Otaku.Encoding.decodeVL64(str80.Substring(0, 3)); string str81 = str80.Substring(3); int num118 = 0; int num119 = 0; if (num117 == 1) { num118 = 2; num119 = 1; } else if (num117 == 2) { num118 = 20; num119 = 6; } else { return; } if (num119 > this._Credits) { this.sendData("AD"); } else { int num120 = DB.runRead("SELECT id FROM users WHERE name = '" + DB.Stripslash(str81) + "'", null); if (num120 <= 0) { this.sendData("AL" + str81); } else { this._Credits -= num119; this.sendData("@F" + this._Credits); DB.runQuery(string.Concat(new object[] { "UPDATE users SET credits = '", this._Credits, "' WHERE id = '", this.userID, "' LIMIT 1" })); DB.runQuery(string.Concat(new object[] { "UPDATE users SET tickets = tickets+", num118, " WHERE id = '", num120, "' LIMIT 1" })); if (userManager.containsUser(num120)) { virtualUser user10 = userManager.getUser(num120); user10._Tickets += num118; if (num120 == this.userID) { user10.refreshValueables(false, true); } else { user10.refreshValueables(true, true); } } } } return; } case "Ca": if ((Config.enableRecycler && (this.Room != null)) && !recyclerManager.sessionExists(this.userID)) { int itemCount = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (!recyclerManager.rewardExists(itemCount)) { return; } recyclerManager.createSession(this.userID, itemCount); currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(itemCount).ToString().Length + 2); for (int num122 = 0; num122 < itemCount; num122++) { int num123 = Otaku.Encoding.decodeVL64(currentPacket); if (DB.checkExists("SELECT id FROM furniture WHERE ownerid = '" + this.userID + "' AND roomid = '0'")) { DB.runQuery("UPDATE furniture SET roomid = '-2' WHERE id = '" + num123 + "' LIMIT 1"); currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(num123).ToString().Length); } else { recyclerManager.dropSession(this.userID, true); this.sendData("DpH"); return; } } this.sendData("Dp" + recyclerManager.sessionString(this.userID)); this.refreshHand("update"); } return; case "Cb": if (!(Config.enableRecycler && ((this.Room == null) || !recyclerManager.sessionExists(this.userID)))) { bool dropItems = currentPacket.Substring(2) == "I"; if (dropItems && recyclerManager.sessionReady(this.userID)) { recyclerManager.rewardSession(this.userID); } recyclerManager.dropSession(this.userID, dropItems); this.sendData("Dp" + recyclerManager.sessionString(this.userID)); if (dropItems) { this.refreshHand("last"); } else { this.refreshHand("new"); } } return; case "AA": if ((this.Room != null) && (this.roomUser != null)) { string mode = currentPacket.Substring(2); this.refreshHand(mode); } return; case "LB": if ((this.Room != null) && (this.roomUser != null)) { string str83 = currentPacket.Substring(2); this.refreshHand(str83); } return; case "AB": if ((this._hasRights && !this._inPublicroom) && ((this.Room != null) && (this.roomUser != null))) { int num124 = int.Parse(currentPacket.Split(new char[] { '/' })[1]); string str84 = currentPacket.Substring(2).Split(new char[] { '/' })[0]; str110 = str84; if ((str110 != null) && (((str110 == "wallpaper") || (str110 == "floor")) || (str110 == "landscape"))) { if (catalogueManager.getTemplate(DB.runRead(string.Concat(new object[] { "SELECT tid FROM furniture WHERE id = '", num124, "' AND ownerid = '", this.userID, "' AND roomid = '0'" }), null)).Sprite == str84) { string str85 = DB.runRead("SELECT var FROM furniture WHERE id = '" + num124 + "'"); this.Room.sendData("@n" + str84 + "/" + str85); DB.runQuery(string.Concat(new object[] { "UPDATE rooms SET ", str84, " = '", str85, "' WHERE id = '", this._roomID, "' LIMIT 1" })); DB.runQuery("DELETE FROM furniture WHERE id = '" + num124 + "' LIMIT 1"); } return; } } return; case "AZ": if ((this._hasRights && !this._inPublicroom) && ((this.Room != null) && (this.roomUser != null))) { int itemID = int.Parse(currentPacket.Split(new char[] { ' ' })[0].Substring(2)); int templateID = DB.runRead(string.Concat(new object[] { "SELECT tid FROM furniture WHERE id = '", itemID, "' AND ownerid = '", this.userID, "' AND roomid = '0'" }), null); if (templateID == 0) { return; } if (catalogueManager.getTemplate(templateID).typeID != 0) { string[] strArray24 = currentPacket.Split(new char[] { ' ' }); int num127 = int.Parse(strArray24[1]); int num128 = int.Parse(strArray24[2]); byte z = byte.Parse(strArray24[3]); byte typeID = catalogueManager.getTemplate(templateID).typeID; this.Room.floorItemManager.placeItem(itemID, templateID, num127, num128, typeID, z); return; } string wallPosition = currentPacket.Substring(itemID.ToString().Length + 3); string str87 = catalogueManager.wallPositionOK(wallPosition); if (!(str87 == wallPosition)) { return; } string str88 = DB.runRead("SELECT var FROM furniture WHERE id = '" + itemID + "'"); if (stringManager.getStringPart(catalogueManager.getTemplate(templateID).Sprite, 0, 7) == "post.it") { if (int.Parse(str88) <= 1) { DB.runQuery("DELETE FROM furniture WHERE id = '" + itemID + "' LIMIT 1"); } else { DB.runQuery("UPDATE furniture SET var = var - 1 WHERE id = '" + itemID + "' LIMIT 1"); } DB.runQuery(string.Concat(new object[] { "INSERT INTO furniture(tid,ownerid) VALUES ('", templateID, "','", this.userID, "')" })); itemID = catalogueManager.lastItemID; DB.runQuery("INSERT INTO furniture_stickies(id) VALUES ('" + itemID + "')"); str88 = "FFFF33"; DB.runQuery(string.Concat(new object[] { "UPDATE furniture SET var = '", str88, "' WHERE id = '", itemID, "' LIMIT 1" })); } this.Room.wallItemManager.addItem(itemID, templateID, str87, str88, true); } return; case "AC": if ((this._isOwner && !this._inPublicroom) && ((this.Room != null) && (this.roomUser != null))) { int num131 = int.Parse(currentPacket.Split(new char[] { ' ' })[2]); if (!this.Room.floorItemManager.containsItem(num131)) { if (this.Room.wallItemManager.containsItem(num131) && (stringManager.getStringPart(this.Room.wallItemManager.getItem(num131).Sprite, 0, 7) != "post.it")) { this.Room.wallItemManager.removeItem(num131, this.userID); } else { return; } } else { this.Room.floorItemManager.removeItem(num131, this.userID); } this.refreshHand("update"); } return; case "AI": if ((this._hasRights && !this._inPublicroom) && ((this.Room != null) && (this.roomUser != null))) { int num132 = int.Parse(currentPacket.Split(new char[] { ' ' })[0].Substring(2)); if (this.Room.floorItemManager.containsItem(num132)) { string[] strArray25 = currentPacket.Split(new char[] { ' ' }); int num133 = int.Parse(strArray25[1]); int num134 = int.Parse(strArray25[2]); byte num135 = byte.Parse(strArray25[3]); this.Room.floorItemManager.relocateItem(num132, num133, num134, num135); } } return; case "CV": if ((!this._inPublicroom && (this.Room != null)) && ((this.roomUser != null) && this._isOwner)) { int num136 = int.Parse(currentPacket.Substring(4, Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2)))); int toStatus = Otaku.Encoding.decodeVL64(currentPacket.Substring(num136.ToString().Length + 4)); this.Room.wallItemManager.toggleItemStatus(num136, toStatus); } return; case "AJ": try { int num138 = int.Parse(currentPacket.Substring(4, Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2)))); if (this.Room.floorItemManager.containsItem(num138)) { string sprite = this.Room.floorItemManager.getItem(num138).Sprite; if (!((!(sprite == "party_floor") && !(sprite == "xmas08_icerug")) || this._isOwner)) { return; } } string str90 = DB.Stripslash(currentPacket.Substring(num138.ToString().Length + 6)); this.Room.floorItemManager.toggleItemStatus(num138, str90, this._hasRights); } catch { } return; case "AN": if ((this._isOwner && !this._inPublicroom) && ((this.Room != null) && (this.roomUser != null))) { int num139 = int.Parse(currentPacket.Substring(2)); if (this.Room.floorItemManager.containsItem(num139)) { int[] numArray13 = DB.runReadColumn("SELECT itemid FROM furniture_presents WHERE id = '" + num139 + "'", 0, null); if (numArray13.Length > 0) { for (int num140 = 0; num140 < numArray13.Length; num140++) { DB.runQuery("UPDATE furniture SET roomid = '0' WHERE id = '" + numArray13[num140] + "' LIMIT 1"); } this.Room.floorItemManager.removeItem(num139, 0); catalogueManager.itemTemplate template = catalogueManager.getTemplate(DB.runRead("SELECT tid FROM furniture WHERE id = '" + numArray13[numArray13.Length - 1] + "'", null)); if (template.typeID > 0) { this.sendData(string.Concat(new object[] { "BA", template.Sprite, Convert.ToChar(13), template.Sprite, Convert.ToChar(13), template.Length, Convert.ToChar(30), template.Width, Convert.ToChar(30), template.Colour })); } else { this.sendData(string.Concat(new object[] { "BA", template.Sprite, Convert.ToChar(13), template.Sprite, " ", template.Colour, Convert.ToChar(13) })); } } DB.runQuery(string.Concat(new object[] { "DELETE FROM furniture_presents WHERE id = '", num139, "' LIMIT ", numArray13.Length })); DB.runQuery("DELETE FROM furniture WHERE id = '" + num139 + "' LIMIT 1"); this.refreshHand("last"); return; } } return; case "Bw": if ((this._isOwner && !this._inPublicroom) && ((this.Room != null) && (this.roomUser != null))) { int num141 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (this.Room.floorItemManager.containsItem(num141)) { string str91 = this.Room.floorItemManager.getItem(num141).Sprite; if (str91.Substring(0, 3).ToLower() == "cf_") { int num142 = 0; try { num142 = int.Parse(str91.Split(new char[] { '_' })[1]); } catch { return; } this.Room.floorItemManager.removeItem(num141, 0); this._Credits += num142; this.sendData("@F" + this._Credits); DB.runQuery(string.Concat(new object[] { "UPDATE users SET credits = '", this._Credits, "' WHERE id = '", this.userID, "' LIMIT 1" })); } } } return; case "AQ": if ((!this._inPublicroom && (this.Room != null)) && (this.roomUser != null)) { int num143 = int.Parse(currentPacket.Substring(2)); if (this.Room.floorItemManager.containsItem(num143)) { floorItem item = this.Room.floorItemManager.getItem(num143); if ((((item.Z != 2) || (this.roomUser.X == (item.X + 1))) || (this.roomUser.Y == item.Y)) && (((item.Z != 4) || (this.roomUser.X == item.X)) || (this.roomUser.Y == (item.Y + 1)))) { this.roomUser.goalX = -1; this.Room.moveUser(this.roomUser, item.X, item.Y, true); return; } } } return; case @"@\": if ((!this._inPublicroom && (this.Room != null)) && (this.roomUser != null)) { int num144 = int.Parse(currentPacket.Substring(2)); if (this.Room.floorItemManager.containsItem(num144)) { floorItem item2 = this.Room.floorItemManager.getItem(num144); if ((this.roomUser.X == item2.X) || (this.roomUser.Y == item2.Y)) { int num145 = DB.runRead("SELECT teleportid FROM furniture WHERE id = '" + num144 + "'", null); int num146 = DB.runRead("SELECT roomid FROM furniture WHERE id = '" + num145 + "'", null); if (num146 > 0) { new TeleporterUsageSleep(this.useTeleporter).BeginInvoke(item2, num145, num146, null, null); return; } } } } return; case "AM": if (((this.Room != null) && (this.roomUser != null)) && !this._inPublicroom) { int num147 = int.Parse(currentPacket.Substring(2)); if (this.Room.floorItemManager.containsItem(num147)) { floorItem item3 = this.Room.floorItemManager.getItem(num147); string str92 = item3.Sprite; if ((((str92 == "edice") || (str92 == "edicehc")) || ((str92 == "slot") || (str92 == "rdice"))) && ((Math.Abs((int) (this.roomUser.X - item3.X)) <= 1) && (Math.Abs((int) (this.roomUser.Y - item3.Y)) <= 1))) { item3.Var = "0"; this.Room.sendData(string.Concat(new object[] { "AZ", num147, " ", num147 * 0x26 })); DB.runQuery("UPDATE furniture SET var = '0' WHERE id = '" + num147 + "' LIMIT 1"); } if (str92 == "paperguy") { this.sendData("D|IHey " + this._Username + ", would you like to buy a newspaper? It's got all the latest news and gossip in it!\r\rNOTE: This will charge you 1 credit (Currently free while in testing).\x0002"); } if (str92 == "santa9000") { this.sendData("D|JHey " + this._Username + ", would you like to take part in my christmas quiz?.\x0002"); } } } return; case "AL": if (((this.Room != null) && (this.roomUser != null)) && !this._inPublicroom) { int num148 = int.Parse(currentPacket.Substring(2)); if (this.Room.floorItemManager.containsItem(num148)) { floorItem item4 = this.Room.floorItemManager.getItem(num148); string str93 = item4.Sprite; str110 = str93; if ((str110 != null) && ((((str110 == "edice") || (str110 == "edicehc")) || ((str110 == "slot") || (str110 == "rdice"))) || ((str110 == "food1") || (str110 == "rock1")))) { if (((str93 == "edice") || (str93 == "edicehc")) || (str93 == "rdice")) { if ((Math.Abs((int) (this.roomUser.X - item4.X)) <= 1) && (Math.Abs((int) (this.roomUser.Y - item4.Y)) <= 1)) { this.Room.sendData("AZ" + num148); int num149 = new Random(DateTime.Now.Millisecond).Next(1, 7); this.Room.sendData(string.Concat(new object[] { "AZ", num148, " ", (num148 * 0x26) + num149 }), 0x7d0); item4.Var = num149.ToString(); DB.runQuery(string.Concat(new object[] { "UPDATE furniture SET var = '", num149, "' WHERE id = '", num148, "' LIMIT 1" })); } } else if (str93 == "food1") { if (item4.Var != "2") { int num150 = 2; this.Room.sendData(string.Concat(new object[] { "AZ", num148, " ", (num148 * 0x26) + 2 }), 0x3e8); this._hunger -= 0x4b; if (this._hunger < 0) { this._hunger = 0; } this.Room.sendShout(this.roomUser, "Om nom nom, mmmm!"); item4.Var = num150.ToString(); DB.runQuery("UPDATE furniture SET var = '2' WHERE id = '" + num148 + "' LIMIT 1"); } } else if (str93 == "rock1") { int num151 = item4.X; int num152 = item4.Y; if ((item4.X + 1) == this.roomUser.X) { this.Room.floorItemManager.relocateItem(num148, item4.X - 1, item4.Y, item4.Z); if (num151 == item4.X) { this.Room.floorItemManager.relocateItem(num148, item4.X, item4.Y + 1, item4.Z); if (num151 == item4.X) { this.Room.floorItemManager.relocateItem(num148, item4.X, item4.Y - 1, item4.Z); } } } else if ((item4.X - 1) == this.roomUser.X) { this.Room.floorItemManager.relocateItem(num148, item4.X + 1, item4.Y, item4.Z); if (num151 == item4.X) { this.Room.floorItemManager.relocateItem(num148, item4.X, item4.Y - 1, item4.Z); if (num151 == item4.X) { this.Room.floorItemManager.relocateItem(num148, item4.X, item4.Y + 1, item4.Z); } } } else if ((item4.Y + 1) == this.roomUser.Y) { this.Room.floorItemManager.relocateItem(num148, item4.X, item4.Y - 1, item4.Z); if (num152 == item4.Y) { this.Room.floorItemManager.relocateItem(num148, item4.X + 1, item4.Y, item4.Z); if (num152 == item4.Y) { this.Room.floorItemManager.relocateItem(num148, item4.X - 1, item4.Y, item4.Z); } } } else if ((item4.Y - 1) == this.roomUser.Y) { this.Room.floorItemManager.relocateItem(num148, item4.X, item4.Y + 1, item4.Z); if (num152 == item4.Y) { this.Room.floorItemManager.relocateItem(num148, item4.X - 1, item4.Y, item4.Z); if (num152 == item4.Y) { this.Room.floorItemManager.relocateItem(num148, item4.X + 1, item4.Y, item4.Z); } } } this._hunger += 5; this.Room.sendShout(this.roomUser, "Oof, hmph!"); } else if ((str93 == "slot") && (this._Credits > 0)) { if ((Math.Abs((int) (this.roomUser.X - item4.X)) <= 1) && (Math.Abs((int) (this.roomUser.Y - item4.Y)) <= 1)) { this._Credits--; this.Room.sendData("AZ" + num148); int num153 = new Random(DateTime.Now.Millisecond).Next(1, 150); if (num153 == 100) { num153 = 6; this._Credits += 70; } else if (((num153 == 0x19) || (num153 == 50)) || (num153 == 0x4b)) { num153 = 4; this._Credits += 10; } else if ((((num153 == 10) || (num153 == 20)) || ((num153 == 30) || (num153 == 40))) || (((num153 == 60) || (num153 == 70)) || ((num153 == 80) || (num153 == 90)))) { num153 = 2; this._Credits += 5; } else { num153 = 1; } DB.runQuery(string.Concat(new object[] { "UPDATE users SET credits = '", this._Credits, "' WHERE id = '", this.userID, "' LIMIT 1" })); this.sendData("@F" + this._Credits); this.Room.sendData(string.Concat(new object[] { "AZ", num148, " ", (num148 * 0x26) + num153 }), 0x7d0); item4.Var = num153.ToString(); DB.runQuery(string.Concat(new object[] { "UPDATE furniture SET var = '", num153, "' WHERE id = '", num148, "' LIMIT 1" })); } } else if ((str93 == "slot") && (this._Credits < 1)) { this.sendData("BKYou cannot afford to play on this machine."); } return; } } } return; case "Cw": if ((this._hasRights && (this.Room != null)) && ((this.roomUser != null) && !this._inPublicroom)) { int num154 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (this.Room.wallItemManager.containsItem(num154)) { wallItem item5 = this.Room.wallItemManager.getItem(num154); if (item5.Sprite == "habbowheel") { int num155 = new Random(DateTime.Now.Millisecond).Next(0, 10); this.Room.sendData(string.Concat(new object[] { "AU", num154, Convert.ToChar(9), "habbowheel", Convert.ToChar(9), " ", item5.wallPosition, Convert.ToChar(9), "-1" })); this.Room.sendData(string.Concat(new object[] { "AU", num154, Convert.ToChar(9), "habbowheel", Convert.ToChar(9), " ", item5.wallPosition, Convert.ToChar(9), num155 }), 0x109a); DB.runQuery(string.Concat(new object[] { "UPDATE furniture SET var = '", num155, "' WHERE id = '", num154, "' LIMIT 1" })); return; } } } return; case "Dz": if (!(((this.Room == null) || (this.roomUser == null)) || this._inPublicroom)) { int num156 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (this.Room.floorItemManager.containsItem(num156) && (this.Room.floorItemManager.getItem(num156).Sprite == "val_randomizer")) { int num157 = new Random(DateTime.Now.Millisecond).Next(1, 5); this.Room.sendData(string.Concat(new object[] { "AX", num156, Convert.ToChar(2), "123456789", Convert.ToChar(2) })); this.Room.sendData(string.Concat(new object[] { "AX", num156, Convert.ToChar(2), num157, Convert.ToChar(2) }), 0x1388); DB.runQuery(string.Concat(new object[] { "UPDATE furniture SET var = '", num157, "' WHERE id = '", num156, "' LIMIT 1" })); } } return; case "AS": if (!(((this.Room == null) || (this.roomUser == null)) || this._inPublicroom)) { int num158 = int.Parse(currentPacket.Substring(2)); if (this.Room.wallItemManager.containsItem(num158)) { string str94 = DB.runRead("SELECT text FROM furniture_stickies WHERE id = '" + num158 + "'"); this.sendData(string.Concat(new object[] { "@p", num158, Convert.ToChar(9), this.Room.wallItemManager.getItem(num158).Var, " ", str94 })); } } return; case "AT": if ((this._hasRights && (this.Room != null)) && ((this.roomUser != null) && !this._inPublicroom)) { int num159 = int.Parse(currentPacket.Substring(2, currentPacket.IndexOf("/") - 2)); if (this.Room.wallItemManager.containsItem(num159)) { wallItem item6 = this.Room.wallItemManager.getItem(num159); string str95 = item6.Sprite; str110 = str95; if ((str110 != null) && ((str110 == "post.it") || (str110 == "post.it.vd"))) { string str96 = "FFFFFF"; if (str95 == "post.it") { str96 = currentPacket.Substring((2 + num159.ToString().Length) + 1, 6); if (((str96 != "FFFF33") && (str96 != "FF9CFF")) && ((str96 != "9CFF9C") && (str96 != "9CCEFF"))) { return; } } string str97 = currentPacket.Substring((2 + num159.ToString().Length) + 7); if (str97.Length <= 0x2ac) { if (str96 != item6.Var) { DB.runQuery(string.Concat(new object[] { "UPDATE furniture SET var = '", str96, "' WHERE id = '", num159, "' LIMIT 1" })); } item6.Var = str96; this.Room.sendData(string.Concat(new object[] { "AU", num159, Convert.ToChar(9), str95, Convert.ToChar(9), " ", item6.wallPosition, Convert.ToChar(9), str96 })); str97 = DB.Stripslash(stringManager.filterSwearwords(str97)).Replace("/r", Convert.ToChar(13).ToString()); DB.runQuery(string.Concat(new object[] { "UPDATE furniture_stickies SET text = '", str97, "' WHERE id = '", num159, "' LIMIT 1" })); } return; } } } return; case "AU": if ((this._isOwner && (this.Room != null)) && ((this.roomUser != null) && !this._inPublicroom)) { int num160 = int.Parse(currentPacket.Substring(2)); if (this.Room.wallItemManager.containsItem(num160) && (stringManager.getStringPart(this.Room.wallItemManager.getItem(num160).Sprite, 0, 7) == "post.it")) { this.Room.wallItemManager.removeItem(num160, 0); DB.runQuery("DELETE FROM furniture_stickies WHERE id = '" + num160 + "' LIMIT 1"); } } return; case "Ct": if ((this._isOwner && (this.Room != null)) && (this.Room.floorItemManager.soundMachineID > 0)) { this.sendData("EB" + soundMachineManager.getMachineSongList(this.Room.floorItemManager.soundMachineID)); } return; case "Cu": if ((this.Room != null) && (this.Room.floorItemManager.soundMachineID > 0)) { this.sendData("EC" + soundMachineManager.getMachinePlaylist(this.Room.floorItemManager.soundMachineID)); } return; case "C]": if ((this.Room != null) && (this.Room.floorItemManager.soundMachineID > 0)) { int songID = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); this.sendData("Dl" + soundMachineManager.getSong(songID)); } return; case "Cs": if ((this._isOwner && (this.Room != null)) && (this.Room.floorItemManager.soundMachineID > 0)) { int num162 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (num162 < 6) { currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(num162).Length + 2); DB.runQuery("DELETE FROM soundmachine_playlists WHERE machineid = '" + this.Room.floorItemManager.soundMachineID + "'"); for (int num163 = 0; num163 < num162; num163++) { int num164 = Otaku.Encoding.decodeVL64(currentPacket); DB.runQuery(string.Concat(new object[] { "INSERT INTO soundmachine_playlists(machineid,songid,pos) VALUES ('", this.Room.floorItemManager.soundMachineID, "','", num164, "','", num163, "')" })); currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(num164).Length); } this.Room.sendData("EC" + soundMachineManager.getMachinePlaylist(this.Room.floorItemManager.soundMachineID)); return; } } return; case "C~": if ((this._isOwner && (this.Room != null)) && (this.Room.floorItemManager.soundMachineID > 0)) { int num165 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if ((this._Credits > 0) && DB.checkExists(string.Concat(new object[] { "SELECT id FROM soundmachine_songs WHERE id = '", num165, "' AND userid = '", this.userID, "' AND machineid = '", this.Room.floorItemManager.soundMachineID, "'" }))) { string[] strArray26 = DB.runReadRow("SELECT title,length FROM soundmachine_songs WHERE id = '" + num165 + "'"); DB.runRead("SELECT length FROM soundmachine_songs WHERE id = '" + num165 + "'", null); string str98 = string.Concat(new object[] { Otaku.Encoding.encodeVL64(num165), this._Username, Convert.ToChar(10), DateTime.Today.Day, Convert.ToChar(10), DateTime.Today.Month, Convert.ToChar(10), DateTime.Today.Year, Convert.ToChar(10), strArray26[1], Convert.ToChar(10), strArray26[0] }); DB.runQuery(string.Concat(new object[] { "INSERT INTO furniture(tid,ownerid,var) VALUES ('", Config.Soundmachine_burnToDisk_diskTemplateID, "','", this.userID, "','", str98, "')" })); DB.runQuery("UPDATE soundmachine_songs SET burnt = '1' WHERE id = '" + num165 + "' LIMIT 1"); DB.runQuery("UPDATE users SET credits = credits - 1 WHERE id = '" + this.userID + "' LIMIT 1"); this._Credits--; this.sendData("@F" + this._Credits); this.sendData("EB" + soundMachineManager.getMachineSongList(this.Room.floorItemManager.soundMachineID)); this.refreshHand("last"); return; } this.sendData("AD"); } return; case "Cx": if ((this._isOwner && (this.Room != null)) && (this.Room.floorItemManager.soundMachineID > 0)) { int num166 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (DB.checkExists(string.Concat(new object[] { "SELECT id FROM soundmachine_songs WHERE id = '", num166, "' AND machineid = '", this.Room.floorItemManager.soundMachineID, "'" }))) { DB.runQuery("UPDATE soundmachine_songs SET machineid = '0' WHERE id = '" + num166 + "' AND burnt = '1'"); DB.runQuery("DELETE FROM soundmachine_songs WHERE id = '" + num166 + "' AND burnt = '0' LIMIT 1"); DB.runQuery(string.Concat(new object[] { "DELETE FROM soundmachine_playlists WHERE machineid = '", this.Room.floorItemManager.soundMachineID, "' AND songid = '", num166, "'" })); this.Room.sendData("EC" + soundMachineManager.getMachinePlaylist(this.Room.floorItemManager.soundMachineID)); return; } } return; case "Co": if ((this._isOwner && (this.Room != null)) && (this.Room.floorItemManager.soundMachineID > 0)) { this.songEditor = new virtualSongEditor(this.Room.floorItemManager.soundMachineID, this.userID); this.songEditor.loadSoundsets(); this.sendData("Dm" + this.songEditor.getSoundsets()); this.sendData("Dn" + soundMachineManager.getHandSoundsets(this.userID)); } return; case "C[": if (((this.songEditor != null) && this._isOwner) && ((this.Room != null) && (this.Room.floorItemManager.soundMachineID > 0))) { int num167 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); int slotID = Otaku.Encoding.decodeVL64(currentPacket.Substring(Otaku.Encoding.encodeVL64(num167).Length + 2)); if (((slotID > 0) && (slotID < 5)) && this.songEditor.slotFree(slotID)) { this.songEditor.addSoundset(num167, slotID); this.sendData("Dn" + soundMachineManager.getHandSoundsets(this.userID)); this.sendData("Dm" + this.songEditor.getSoundsets()); return; } } return; case @"C\": if (((this.songEditor != null) && this._isOwner) && ((this.Room != null) && (this.Room.floorItemManager.soundMachineID > 0))) { int num169 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (!this.songEditor.slotFree(num169)) { this.songEditor.removeSoundset(num169); this.sendData("Dm" + this.songEditor.getSoundsets()); this.sendData("Dn" + soundMachineManager.getHandSoundsets(this.userID)); return; } } return; case "Cp": if (((this.songEditor != null) && this._isOwner) && ((this.Room != null) && (this.Room.floorItemManager.soundMachineID > 0))) { int num170 = Otaku.Encoding.decodeB64(currentPacket.Substring(2, 2)); string str99 = currentPacket.Substring(4, num170); string str100 = currentPacket.Substring(num170 + 6); int num171 = soundMachineManager.calculateSongLength(str100); if (num171 != -1) { str99 = DB.Stripslash(stringManager.filterSwearwords(str99)); str100 = DB.Stripslash(str100); DB.runQuery(string.Concat(new object[] { "INSERT INTO soundmachine_songs (userid,machineid,title,length,data) VALUES ('", this.userID, "','", this.Room.floorItemManager.soundMachineID, "','", str99, "','", num171, "','", DB.Stripslash(str100), "')" })); this.sendData("EB" + soundMachineManager.getMachineSongList(this.Room.floorItemManager.soundMachineID)); this.sendData(string.Concat(new object[] { "EK", Otaku.Encoding.encodeVL64(this.Room.floorItemManager.soundMachineID), str99, Convert.ToChar(2) })); return; } } return; case "Cq": if ((this._isOwner && (this.Room != null)) && (this.Room.floorItemManager.soundMachineID > 0)) { int num172 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); this.sendData("Dl" + soundMachineManager.getSong(num172)); this.songEditor = new virtualSongEditor(this.Room.floorItemManager.soundMachineID, this.userID); this.songEditor.loadSoundsets(); this.sendData("Dm" + this.songEditor.getSoundsets()); this.sendData("Dn" + soundMachineManager.getHandSoundsets(this.userID)); } return; case "Cr": if (((this.songEditor != null) && this._isOwner) && ((this.Room != null) && (this.Room.floorItemManager.soundMachineID > 0))) { int num173 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (DB.checkExists(string.Concat(new object[] { "SELECT id FROM soundmachine_songs WHERE id = '", num173, "' AND userid = '", this.userID, "' AND machineid = '", this.Room.floorItemManager.soundMachineID, "'" }))) { int num174 = Otaku.Encoding.encodeVL64(num173).Length; int num175 = Otaku.Encoding.decodeB64(currentPacket.Substring(num174 + 2, 2)); string str101 = currentPacket.Substring(num174 + 4, num175); string str102 = currentPacket.Substring((num174 + num175) + 6); int num176 = soundMachineManager.calculateSongLength(str102); if (num176 != -1) { str101 = DB.Stripslash(stringManager.filterSwearwords(str101)); str102 = DB.Stripslash(str102); DB.runQuery(string.Concat(new object[] { "UPDATE soundmachine_songs SET title = '", str101, "',data = '", str102, "',length = '", num176, "' WHERE id = '", num173, "' LIMIT 1" })); this.sendData("ES"); this.sendData("EB" + soundMachineManager.getMachineSongList(this.Room.floorItemManager.soundMachineID)); this.Room.sendData("EC" + soundMachineManager.getMachinePlaylist(this.Room.floorItemManager.soundMachineID)); } return; } } return; case "AG": if (((this.Room != null) || (this.roomUser != null)) || (this._tradePartnerRoomUID == -1)) { if (Config.enableTrading) { int roomUID = int.Parse(currentPacket.Substring(2)); if (this.Room.containsUser(roomUID)) { virtualUser user11 = this.Room.getUser(roomUID); if (!user11.statusManager.containsStatus("trd")) { this._tradePartnerRoomUID = roomUID; this.statusManager.addStatus("trd", ""); this.roomUser.Refresh(); user11._tradePartnerRoomUID = this.roomUser.roomUID; user11.statusManager.addStatus("trd", ""); user11.roomUser.Refresh(); this.refreshTradeBoxes(); user11.refreshTradeBoxes(); } } return; } this.sendData("BK" + stringManager.getString("trading_disabled")); } return; case "AH": if (((this.Room != null) && (this.roomUser != null)) && ((this._tradePartnerRoomUID != -1) && this.Room.containsUser(this._tradePartnerRoomUID))) { int num178 = int.Parse(currentPacket.Substring(2)); if (DB.runRead(string.Concat(new object[] { "SELECT id FROM furniture WHERE id = '", num178, "' AND ownerid = '", this.userID, "' AND roomid = '0'" }), null) != 0) { this._tradeItems[this._tradeItemCount] = num178; this._tradeItemCount++; virtualUser user12 = this.Room.getUser(this._tradePartnerRoomUID); this._tradeAccept = false; user12._tradeAccept = false; this.refreshTradeBoxes(); user12.refreshTradeBoxes(); } } return; case "AD": if (((this.Room != null) && (this.roomUser != null)) && ((this._tradePartnerRoomUID != -1) && this.Room.containsUser(this._tradePartnerRoomUID))) { virtualUser user13 = this.Room.getUser(this._tradePartnerRoomUID); this._tradeAccept = false; user13._tradeAccept = false; this.refreshTradeBoxes(); user13.refreshTradeBoxes(); } return; case "AE": if (((this.Room != null) && (this.roomUser != null)) && ((this._tradePartnerRoomUID != -1) && this.Room.containsUser(this._tradePartnerRoomUID))) { virtualUser user14 = this.Room.getUser(this._tradePartnerRoomUID); this._tradeAccept = true; this.refreshTradeBoxes(); user14.refreshTradeBoxes(); if (user14._tradeAccept) { for (int num179 = 0; num179 < this._tradeItemCount; num179++) { if (this._tradeItems[num179] > 0) { DB.runQuery(string.Concat(new object[] { "UPDATE furniture SET ownerid = '", user14.userID, "',roomid = '0' WHERE id = '", this._tradeItems[num179], "' LIMIT 1" })); } } for (int num180 = 0; num180 < user14._tradeItemCount; num180++) { if (user14._tradeItems[num180] > 0) { DB.runQuery(string.Concat(new object[] { "UPDATE furniture SET ownerid = '", this.userID, "',roomid = '0' WHERE id = '", user14._tradeItems[num180], "' LIMIT 1" })); } } this.abortTrade(); return; } } return; case "AF": if (((this.Room != null) && (this.roomUser != null)) && ((this._tradePartnerRoomUID != -1) && this.Room.containsUser(this._tradePartnerRoomUID))) { this.abortTrade(); this.refreshHand("update"); } return; case "B_": if ((this.Room != null) && (this.Room.Lobby != null)) { this.sendData("Ch" + this.Room.Lobby.gameList()); } return; case "B`": if (((this.Room != null) && (this.roomUser != null)) && ((this.Room.Lobby != null) && (this.gamePlayer == null))) { int key = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); if (this.Room.Lobby.Games.ContainsKey(key)) { this.gamePlayer = new Otaku.Virtual.Rooms.Games.gamePlayer(this, this.roomUser.roomUID, (Game) this.Room.Lobby.Games[key]); this.gamePlayer.Game.Subviewers.Add(this.gamePlayer); this.sendData("Ci" + this.gamePlayer.Game.Sub); return; } } return; case "Bb": if (((this.Room != null) && (this.roomUser != null)) && ((this.Room.Lobby != null) && (this.gamePlayer == null))) { if (this._Tickets > 1) { if (!this.Room.Lobby.validGamerank(this.roomUser.gamePoints)) { this.sendData("ClK"); } else if (!this.Room.Lobby.isBattleBall) { this.sendData(string.Concat(new object[] { "CkRAsecondsUntilRestart", Convert.ToChar(2), "HIRGIHHfieldType", Convert.ToChar(2), "HKIIIISAnumTeams", Convert.ToChar(2), "HJJIIIPAgameLengthChoice", Convert.ToChar(2), "HJIIIIKname", Convert.ToChar(2), "IJ", Convert.ToChar(2), "HsecondsUntilStart", Convert.ToChar(2), "HIRBIHH" })); } else { this.sendData("Ck" + this.Room.Lobby.getCreateGameSettings()); } return; } this.sendData("ClJ"); } return; case "Bc": if (((this.Room != null) && (this.roomUser != null)) && ((this.Room.Lobby != null) && (this.gamePlayer == null))) { if (this._Tickets > 1) { if (this.Room.Lobby.validGamerank(this.roomUser.gamePoints)) { try { int mapID = -1; int teamAmount = -1; int[] enabledPowerups = null; string str103 = ""; int num184 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); currentPacket = currentPacket.Substring(Otaku.Encoding.encodeVL64(num184).Length + 2); for (int num185 = 0; num185 < num184; num185++) { int num188 = Otaku.Encoding.decodeB64(currentPacket.Substring(0, 2)); string str104 = currentPacket.Substring(2, num188); if (currentPacket.Substring(num188 + 2, 1) == "H") { int num189 = Otaku.Encoding.decodeVL64(currentPacket.Substring(num188 + 3)); switch (str104) { case "fieldType": mapID = num189; break; case "numTeams": teamAmount = num189; break; } int num186 = Otaku.Encoding.encodeVL64(num189).Length; currentPacket = currentPacket.Substring((num188 + num186) + 3); continue; } int num187 = Otaku.Encoding.decodeB64(currentPacket.Substring(num188 + 3, 2)); string str105 = currentPacket.Substring(num188 + 5, num187); switch (str104) { case "allowedPowerups": { string[] strArray27 = str105.Split(new char[] { ',' }); enabledPowerups = new int[strArray27.Length]; for (int num190 = 0; num190 < strArray27.Length; num190++) { int num191 = int.Parse(strArray27[num190]); if (!this.Room.Lobby.allowsPowerup(num191)) { return; } enabledPowerups[num190] = num191; } break; } case "name": str103 = stringManager.filterSwearwords(str105); break; } currentPacket = currentPacket.Substring((num188 + num187) + 5); } if (((mapID != -1) && (teamAmount != -1)) && (str103 != "")) { this.gamePlayer = new Otaku.Virtual.Rooms.Games.gamePlayer(this, this.roomUser.roomUID, null); this.Room.Lobby.createGame(this.gamePlayer, str103, mapID, teamAmount, enabledPowerups); } return; } catch { return; } } this.sendData("ClK"); return; } this.sendData("ClJ"); } return; case "Be": if (((this.Room != null) && (this.Room.Lobby != null)) && ((this.gamePlayer != null) && (this.gamePlayer.Game.State == Game.gameState.Waiting))) { if (this._Tickets > 1) { if (!this.Room.Lobby.validGamerank(this.roomUser.gamePoints)) { this.sendData("ClK"); } else { int num192 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); int teamID = Otaku.Encoding.decodeVL64(currentPacket.Substring(Otaku.Encoding.encodeVL64(num192).Length + 2)); if (!((teamID != this.gamePlayer.teamID) && this.gamePlayer.Game.teamHasSpace(teamID))) { this.sendData("ClH"); } else { if (this.gamePlayer.teamID == -1) { this.gamePlayer.Game.Subviewers.Remove(this.gamePlayer); } this.gamePlayer.Game.movePlayer(this.gamePlayer, this.gamePlayer.teamID, teamID); } } return; } this.sendData("ClJ"); } return; case "Bg": this.leaveGame(); return; case "Bh": if ((((this.Room != null) && (this.Room.Lobby != null)) && ((this.gamePlayer != null) && (this.gamePlayer.Game != null))) && (this.gamePlayer == this.gamePlayer.Game.Owner)) { int num194 = Otaku.Encoding.decodeVL64(currentPacket.Substring(2)); for (int num195 = 0; num195 < this.gamePlayer.Game.Teams.Length; num195++) { foreach (Otaku.Virtual.Rooms.Games.gamePlayer player in this.gamePlayer.Game.Teams[num195]) { if (player.roomUID == num194) { player.sendData("ClRA"); this.gamePlayer.Game.movePlayer(player, num195, -1); return; } } } } return; case "Bj": if (((this.Room != null) && (this.Room.Lobby != null)) && ((this.gamePlayer != null) && (this.gamePlayer == this.gamePlayer.Game.Owner))) { this.gamePlayer.Game.startGame(); } return; case "Bk": if (((this.gamePlayer != null) && (this.gamePlayer.Game.State == Game.gameState.Started)) && (this.gamePlayer.teamID != -1)) { this.gamePlayer.goalX = Otaku.Encoding.decodeVL64(currentPacket.Substring(3)); this.gamePlayer.goalY = Otaku.Encoding.decodeVL64(currentPacket.Substring(Otaku.Encoding.encodeVL64(this.gamePlayer.goalX).Length + 3)); Out.WriteLine(string.Concat(new object[] { this._Username, ": ", this.gamePlayer.goalX, ",", this.gamePlayer.goalY })); } return; case "Bl": if (((this.gamePlayer != null) && (this.gamePlayer.Game.State == Game.gameState.Ended)) && (this.gamePlayer.teamID != -1)) { this.gamePlayer.Game.sendData("BK" + this._Username + " wants to replay!"); } return; case "Ej": DB.runQuery("UPDATE users SET guideavailable = '1' WHERE id = '" + this.userID + "' LIMIT 1"); return; case "Ek": DB.runQuery("UPDATE users SET guideavailable = '0' WHERE id = '" + this.userID + "' LIMIT 1"); return; case "EW": if (this._isOwner) { roomManager.moodlight.setSettings(this._roomID, false, 0, 0, null, 0); } return; case "EU": if (this._isOwner) { string str106 = roomManager.moodlight.getSettings(this._roomID); if (str106 != null) { this.sendData("Em" + str106); } } return; case "EV": if ((this._hasRights && (this.Room != null)) && ((this.roomUser != null) && !this._inPublicroom)) { int presetID = Otaku.Encoding.decodeVL64(currentPacket.Substring(2, 1)); int bgState = Otaku.Encoding.decodeVL64(currentPacket.Substring(3, 1)); currentPacket = DB.Stripslash(currentPacket); string presetColour = currentPacket.Substring(6, Otaku.Encoding.decodeB64(currentPacket.Substring(4, 2))); int alphaDarkF = Otaku.Encoding.decodeVL64(currentPacket.Substring(presetColour.Length + 6)); roomManager.moodlight.setSettings(this._roomID, true, presetID, bgState, presetColour, alphaDarkF); string str108 = roomManager.moodlight.getSettings(this._roomID); if (str108 != null) { this.Room.sendData("Em" + str108); } } return; } return; Label_4991: this._roomID = num62; this._inPublicroom = flag4; this._ROOMACCESS_PRIMARY_OK = true; if (flag4) { string str29 = DB.runRead("SELECT model FROM rooms WHERE id = '" + num62 + "'"); this.sendData(string.Concat(new object[] { "AE", str29, " ", num62 })); this._ROOMACCESS_SECONDARY_OK = true; } return; Label_4FE3: this._ROOMACCESS_SECONDARY_OK = true; this.sendData("@i"); return; Label_7AFD: this.statusManager.Refresh(); return; Label_8E64: str76 = DB.runRead("SELECT tid FROM catalogue_items WHERE name_cct = 'present_gen" + new Random().Next(1, 7) + "'"); string str77 = DB.Stripslash(stringManager.filterSwearwords(strArray23[7])); DB.runQuery(string.Concat(new object[] { "INSERT INTO furniture(tid,ownerid,var) VALUES ('", str76, "','", num109, "','!", str77, "')" })); lastItemID = catalogueManager.lastItemID; num111 = -1; Label_8F08: this._Credits -= num108; this.sendData("@F" + this._Credits); DB.runQuery(string.Concat(new object[] { "UPDATE users SET credits = '", this._Credits, "' WHERE id = '", this.userID, "' LIMIT 1" })); if (stringManager.getStringPart(str74, 0, 4) == "deal") { int num113 = int.Parse(str74.Substring(4)); int[] numArray11 = DB.runReadColumn("SELECT tid FROM catalogue_deals WHERE id = '" + num113 + "'", 0, null); int[] numArray12 = DB.runReadColumn("SELECT amount FROM catalogue_deals WHERE id = '" + num113 + "'", 0, null); for (int num114 = 0; num114 < numArray11.Length; num114++) { for (int num115 = 1; num115 <= numArray12[num114]; num115++) { DB.runQuery(string.Concat(new object[] { "INSERT INTO furniture(tid,ownerid,roomid) VALUES ('", numArray11[num114], "','", num109, "','", num111, "')" })); catalogueManager.handlePurchase(numArray11[num114], num109, num111, 0, lastItemID, ""); } } } else { DB.runQuery(string.Concat(new object[] { "INSERT INTO furniture(tid,ownerid,roomid) VALUES ('", num107, "','", num109, "','", num111, "')" })); if ((catalogueManager.getTemplate(num107).Sprite == "wallpaper") || (catalogueManager.getTemplate(num107).Sprite == "floor")) { int decorID = int.Parse(strArray23[4]); catalogueManager.handlePurchase(num107, num109, 0, decorID, lastItemID, ""); } else if (catalogueManager.getTemplate(num107).Sprite == "landscape") { string landscapeID = strArray23[4]; catalogueManager.handlePurchase(num107, num109, 0, 0, lastItemID, landscapeID); } else if (stringManager.getStringPart(str74, 0, 11) != "prizetrophy") { if (stringManager.getStringPart(str74, 0, 11) == "greektrophy") { DB.Stripslash(stringManager.filterSwearwords(strArray23[4])); string str79 = this._Username + "\t" + DateTime.Today.ToShortDateString() + "\t" + strArray23[4]; DB.runQuery(string.Concat(new object[] { "UPDATE furniture SET var = '", str79, "' WHERE id = '", catalogueManager.lastItemID, "' LIMIT 1" })); } else { catalogueManager.handlePurchase(num107, num109, num111, 0, lastItemID, ""); } } } if (num109 == this.userID) { this.refreshHand("last"); } else if (userManager.containsUser(num109)) { userManager.getUser(num109).refreshHand("last"); } } internal void refreshAppearance(bool Reload, bool refreshSettings, bool refreshRoom) { if (Reload) { string[] strArray = DB.runReadRow("SELECT figure,sex,mission FROM users WHERE id = '" + this.userID + "'"); this._Figure = strArray[0]; this._Sex = char.Parse(strArray[1]); this._Mission = strArray[2]; } if (refreshSettings) { this.sendData(string.Concat(new object[] { "@E", this.connectionID, Convert.ToChar(2), this._Username, Convert.ToChar(2), this._Figure, Convert.ToChar(2), this._Sex, Convert.ToChar(2), this._Mission, Convert.ToChar(2), Convert.ToChar(2), "PCch=s02/53,51,44", Convert.ToChar(2), "HI" })); } if ((refreshRoom && (this.Room != null)) && (this.roomUser != null)) { this.Room.sendData(string.Concat(new object[] { "DJ", Otaku.Encoding.encodeVL64(this.roomUser.roomUID), this._Figure, Convert.ToChar(2), this._Sex, Convert.ToChar(2), this._Mission, Convert.ToChar(2) })); } } internal void refreshBadges() { this._nowBadge = ""; int i = 0; int num2 = 0; string[] strArray = DB.runReadColumn("SELECT badgeid FROM users_badges WHERE userid = '" + this.userID + "'", 0); StringBuilder builder = new StringBuilder(); if (strArray.Length > 0) { num2 = DB.runRead("SELECT badge_status FROM users WHERE id = '" + this.userID + "'", null); string str = DB.runRead("SELECT badgeid FROM users_badges WHERE userid = '" + this.userID + "' AND iscurrent = '1'"); for (int j = 0; j < strArray.Length; j++) { builder.Append(strArray[j] + Convert.ToChar(2)); if (strArray[j] == str) { i = j; } } if (num2 == 1) { this._nowBadge = str; } this.sendData("Ce" + Otaku.Encoding.encodeVL64(strArray.Length) + builder.ToString() + Otaku.Encoding.encodeVL64(i) + Otaku.Encoding.encodeVL64(num2)); } else { this.sendData("CeHH"); } } internal void refreshClub() { int i = 0; int num2 = 0; int num3 = 0; string[] strArray = DB.runReadRow(string.Concat(new object[] { "SELECT months_expired,months_left,date_monthstarted FROM users_club WHERE userid = '", this.userID, '1', " LIMIT 1'" })); if (strArray.Length > 0) { num2 = int.Parse(strArray[0]); num3 = int.Parse(strArray[1]) - 1; i = ((int) DateTime.Parse(strArray[2], new CultureInfo("en-GB")).Subtract(DateTime.Now).TotalDays) + 0x20; this._clubMember = true; } this.sendData(string.Concat(new object[] { "@Gclub_habbo", Convert.ToChar(2), Otaku.Encoding.encodeVL64(i), Otaku.Encoding.encodeVL64(num2), Otaku.Encoding.encodeVL64(num3), Otaku.Encoding.encodeVL64(1) })); } internal void refreshGroupStatus() { this._groupID = DB.runReadUnsafe("SELECT groupid FROM groups_memberships WHERE userid = '" + this.userID + "' AND is_current = '1'", null); if (this._groupID > 0) { this._groupMemberRank = DB.runRead(string.Concat(new object[] { "SELECT member_rank FROM groups_memberships WHERE userid = '", this.userID, "' AND groupID = '", this._groupID, "'" }), null); } } internal void refreshHand(string Mode) { int[] numArray = DB.runReadColumn("SELECT id FROM furniture WHERE ownerid = '" + this.userID + "' AND roomid = '0' ORDER BY id ASC", 0, null); StringBuilder builder = new StringBuilder("BL"); int num = 0; int length = numArray.Length; switch (Mode) { case "next": this._handPage++; break; case "prev": this._handPage--; break; case "last": this._handPage = (length - 1) / 9; break; case "update": break; default: this._handPage = 0; break; } try { int num3; bool flag; if (numArray.Length <= 0) { goto Label_04D5; } goto Label_0132; Label_00ED: num = this._handPage * 9; if (length > (num + 9)) { length = num + 9; } if ((num <= length) && (num != length)) { goto Label_0137; } this._handPage--; Label_0132: flag = true; goto Label_00ED; Label_0137: num3 = num; while (num3 < length) { catalogueManager.itemTemplate template = catalogueManager.getTemplate(DB.runRead("SELECT tid FROM furniture WHERE id = '" + numArray[num3] + "'", null)); char ch = '1'; if (!template.isRecycleable) { ch = '0'; } if (template.typeID == 0) { string colour = template.Colour; if ((template.Sprite == "post.it") || (template.Sprite == "post.it.vd")) { colour = DB.runRead("SELECT var FROM furniture WHERE id = '" + numArray[num3] + "'"); } builder.Append(string.Concat(new object[] { "SI", Convert.ToChar(30).ToString(), numArray[num3], Convert.ToChar(30).ToString(), num3, Convert.ToChar(30).ToString(), "I", Convert.ToChar(30).ToString(), numArray[num3], Convert.ToChar(30).ToString(), template.Sprite, Convert.ToChar(30).ToString(), colour, Convert.ToChar(30).ToString(), ch, "/" })); } else { builder.Append(string.Concat(new object[] { "SI", Convert.ToChar(30).ToString(), numArray[num3], Convert.ToChar(30).ToString(), num3, Convert.ToChar(30).ToString(), "S", Convert.ToChar(30).ToString(), numArray[num3], Convert.ToChar(30).ToString(), template.Sprite, Convert.ToChar(30).ToString(), template.Length, Convert.ToChar(30).ToString(), template.Width, Convert.ToChar(30).ToString(), DB.runRead("SELECT var FROM furniture WHERE id = '" + numArray[num3] + "'"), Convert.ToChar(30).ToString(), template.Colour, Convert.ToChar(30).ToString(), ch, Convert.ToChar(30).ToString(), template.Sprite, Convert.ToChar(30).ToString(), "/" })); } num3++; } Label_04D5: builder.Append(Convert.ToChar(13).ToString() + numArray.Length); this.sendData(builder.ToString()); } catch { this.sendData("BL" + Convert.ToChar(13) + "0"); } } internal void refreshTradeBoxes() { if (((this.Room != null) && this.Room.containsUser(this._tradePartnerRoomUID)) && (this.roomUser != null)) { virtualUser user = this.Room.getUser(this._tradePartnerRoomUID); StringBuilder builder = new StringBuilder(string.Concat(new object[] { "Al", this._Username, Convert.ToChar(9), this._tradeAccept.ToString().ToLower(), Convert.ToChar(9) })); if (this._tradeItemCount > 0) { builder.Append(catalogueManager.tradeItemList(this._tradeItems)); } builder.Append(string.Concat(new object[] { Convert.ToChar(13), user._Username, Convert.ToChar(9), user._tradeAccept.ToString().ToLower(), Convert.ToChar(9) })); if (user._tradeItemCount > 0) { builder.Append(catalogueManager.tradeItemList(user._tradeItems)); } this.sendData(builder.ToString()); } } internal void refreshValueables(bool Credits, bool Tickets) { if (Credits) { this._Credits = DB.runRead("SELECT credits FROM users WHERE id = '" + this.userID + "'", null); this.sendData("@F" + this._Credits); } if (Tickets) { this._Tickets = DB.runRead("SELECT tickets FROM users WHERE id = '" + this.userID + "'", null); this.sendData("A|" + this._Tickets); } } internal void sendData(string Data) { try { byte[] bytes = System.Text.Encoding.Default.GetBytes(Data.Replace(Convert.ToChar(1), Convert.ToChar(160)) + Convert.ToChar(1)); this.connectionSocket.BeginSend(bytes, 0, bytes.Length, SocketFlags.None, new AsyncCallback(this.sentData), null); } catch { this.Disconnect(); } } private void sentData(IAsyncResult iAr) { try { this.connectionSocket.EndSend(iAr); } catch { this.Disconnect(); } } private void useTeleporter(floorItem Teleporter1, int idTeleporter2, int roomIDTeleporter2) { this.roomUser.walkLock = true; string sprite = Teleporter1.Sprite; if (roomIDTeleporter2 == this._roomID) { floorItem item = this.Room.floorItemManager.getItem(idTeleporter2); Thread.Sleep(500); this.Room.sendData(string.Concat(new object[] { "AY", Teleporter1.ID, "/", this._Username, "/", sprite })); this.Room.sendData(string.Concat(new object[] { @"A\", item.ID, "/", this._Username, "/", sprite })); this.roomUser.X = item.X; this.roomUser.Y = item.Y; this.roomUser.H = item.H; this.roomUser.Z1 = item.Z; this.roomUser.Z2 = item.Z; this.roomUser.Refresh(); this.roomUser.walkLock = false; } else { this._teleporterID = idTeleporter2; this.sendData("@~" + Otaku.Encoding.encodeVL64(idTeleporter2) + Otaku.Encoding.encodeVL64(roomIDTeleporter2)); this.Room.sendData(string.Concat(new object[] { "AY", Teleporter1.ID, "/", this._Username, "/", sprite })); } } internal string connectionRemoteIP { get { return this.connectionSocket.RemoteEndPoint.ToString().Split(new char[] { ':' })[0]; } } private delegate void TeleporterUsageSleep(floorItem Teleporter1, int idTeleporter2, int roomIDTeleporter2); private delegate void timedDisconnector(int ms); } }