示例#1
0
文件: IpJoin.cs 项目: abrn/exalt-root
    // Token: 0x060004EF RID: 1263 RVA: 0x0001C9CC File Offset: 0x0001ABCC
    private void SendClientToIp(string ip)
    {
        string s = Guid.NewGuid().ToString();

        byte[]          bytes           = Encoding.ASCII.GetBytes(s);
        string          key             = Client.ByteArrayToString(bytes);
        ReconnectPacket reconnectPacket = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);

        reconnectPacket.GameId      = -2;
        reconnectPacket.Host        = ip;
        reconnectPacket.Port        = 2050;
        reconnectPacket.isFromArena = false;
        reconnectPacket.Key         = new byte[0];
        reconnectPacket.KeyTime     = -1;
        reconnectPacket.Name        = "Recon";
        reconnectPacket.State       = string.Empty;
        ReconnectPacket reconnectPacket2 = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);

        reconnectPacket2.GameId      = -2;
        reconnectPacket2.Host        = "127.0.0.1";
        reconnectPacket2.Port        = 2050;
        reconnectPacket2.isFromArena = false;
        reconnectPacket2.Key         = bytes;
        reconnectPacket2.KeyTime     = -1;
        reconnectPacket2.Name        = "Realm";
        reconnectPacket2.State       = string.Empty;
        this.client.Proxy.ClientDestinations.TryAdd(key, reconnectPacket);
        this.client.SendToClient("Connecting to: " + ip);
        this.client.SendToClient(reconnectPacket2);
    }
示例#2
0
文件: Client.cs 项目: abrn/exalt-root
 // Token: 0x06000234 RID: 564 RVA: 0x000104D0 File Offset: 0x0000E6D0
 private void Reconnect(ReconnectPacket reconnect)
 {
     if (reconnect.Key.Length != 0)
     {
         if (reconnect.Host.Contains(".com"))
         {
             reconnect.Host = Dns.GetHostEntry(reconnect.Host).AddressList[0].ToString();
         }
         ReconnectPacket u9Kj4tAStSlt3Dcm6rdEl60w8MG = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
         u9Kj4tAStSlt3Dcm6rdEl60w8MG.GameId      = reconnect.GameId;
         u9Kj4tAStSlt3Dcm6rdEl60w8MG.Host        = (string.IsNullOrWhiteSpace(reconnect.Host) ? (this._serverConnection.Client.RemoteEndPoint as IPEndPoint).Address.ToString() : reconnect.Host);
         u9Kj4tAStSlt3Dcm6rdEl60w8MG.Port        = ((reconnect.Port == -1) ? (this._serverConnection.Client.RemoteEndPoint as IPEndPoint).Port : reconnect.Port);
         u9Kj4tAStSlt3Dcm6rdEl60w8MG.isFromArena = reconnect.isFromArena;
         u9Kj4tAStSlt3Dcm6rdEl60w8MG.Key         = reconnect.Key;
         u9Kj4tAStSlt3Dcm6rdEl60w8MG.KeyTime     = reconnect.KeyTime;
         u9Kj4tAStSlt3Dcm6rdEl60w8MG.Name        = reconnect.Name;
         u9Kj4tAStSlt3Dcm6rdEl60w8MG.State       = reconnect.State;
         string key = Client.ByteArrayToString(reconnect.Key);
         if (this.Proxy.ClientDestinations.ContainsKey(key))
         {
             ReconnectPacket u9Kj4tAStSlt3Dcm6rdEl60w8MG2;
             this.Proxy.ClientDestinations.TryRemove(key, out u9Kj4tAStSlt3Dcm6rdEl60w8MG2);
         }
         this.Proxy.ClientDestinations.TryAdd(key, u9Kj4tAStSlt3Dcm6rdEl60w8MG);
         reconnect.Host = "127.0.0.1";
         reconnect.Port = 2050;
         Console.WriteLine("Client: Stored reconnect info.");
     }
 }
示例#3
0
文件: Client.cs 项目: abrn/exalt-root
    // Token: 0x06000235 RID: 565 RVA: 0x00010640 File Offset: 0x0000E840
    private void Escape(EscapePacket escape)
    {
        ReconnectPacket reconnectPacket = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);

        reconnectPacket.GameId      = -2;
        reconnectPacket.Host        = string.Empty;
        reconnectPacket.Port        = -1;
        reconnectPacket.IsFromArena = false;
        reconnectPacket.Key         = new byte[0];
        reconnectPacket.KeyTime     = -1;
        reconnectPacket.Name        = "Nexus";
        reconnectPacket.Stats       = string.Empty;
        this.SendToClient(reconnectPacket);
        Console.WriteLine("Client: Sent nexus reconnect.");

        /*
         * An exception occurred when decompiling this method (06000235)
         *
         * ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void _U5AaPl8DapnIJVdc80Ay29WdWR4::_j6HWhGC4110gXDRHhj0Ik2ikJ8G(_m74ADSrj0VfuNwRBO916gAw0Nu0)
         * ---> System.OverflowException: Array dimensions exceeded supported range.
         * at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackSlot.ModifyStack(StackSlot[] stack, Int32 popCount, Int32 pushCount, ByteCode pushDefinition) in C:\projects\dnspy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 47
         * at ICSharpCode.Decompiler.ILAst.ILAstBuilder.StackAnalysis(MethodDef methodDef) in C:\projects\dnspy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 387
         * at ICSharpCode.Decompiler.ILAst.ILAstBuilder.Build(MethodDef methodDef, Boolean optimize, DecompilerContext context) in C:\projects\dnspy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs:line 269
         * at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in C:\projects\dnspy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 112
         * at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in C:\projects\dnspy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
         * --- End of inner exception stack trace ---
         * at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in C:\projects\dnspy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
         * at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in C:\projects\dnspy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1545
         */
        ;
    }
示例#4
0
 public void Reconnect(ReconnectPacket pkt)
 {
     // log.InfoFormat("Reconnecting client @ {0} to {1}...", skt.RemoteEndPoint, pkt.Name);
     Player?.ApplyConditionEffect(new ConditionEffect
     {
         DurationMS = -1,
         Effect     = ConditionEffectIndex.Invincible
     });
     Manager.Logic.AddPendingAction(t =>
     {
         reconnected = true;
         if (Player != null)
         {
             World world = Manager.GetWorld(pkt.GameId);
             if (Player.Party != null && Player.Party.World != world && pkt.GameId != World.VAULT_ID && pkt.GameId != World.VIPLOUNGE && pkt.GameId != World.DONORPETS_ID)
             {
                 if (Player.Party.Leader == Player)
                 {
                     Player.Party.World = world;
                 }
                 else
                 {
                     Player.Party.RemoveMember(Player);
                 }
             }
             if (Player.Party != null && Player.Party.World == world && Player.Party.Leader != Player)
             {
                 Player.Party.Members.Remove(Player);
             }
             Player.SaveToCharacter();
         }
         Save();
         SendPacket(pkt, () => Manager.Disconnect(this));
     }, PendingPriority.Destruction);
 }
示例#5
0
 public void Reconnect(ReconnectPacket pkt)
 {
     RealmManager.Logic.AddPendingAction(t =>
     {
         RealmManager.Disconnect(this); // saves player on exit
         SendPacket(pkt);
     }, PendingPriority.Destruction);
 }
示例#6
0
 public void Reconnect(ReconnectPacket pkt)
 {
     Manager.Logic.AddPendingAction(t =>
     {
         Save();
         SendPacket(pkt);
     }, PendingPriority.Destruction);
 }
示例#7
0
 public void Reconnect(ReconnectPacket pkt)
 {
     log.Info($"Reconnecting client @ {skt.RemoteEndPoint} to {pkt.Name}...");
     Manager.Logic.AddPendingAction(t =>
     {
         Save();
         Manager.Disconnect(this);
         SendPacket(pkt);
     }, PendingPriority.Destruction);
 }
示例#8
0
        private void OnReconnect(Client client, ReconnectPacket packet)
        {
            if (packet.Host.Contains(".com"))
            {
                packet.Host = Dns.GetHostEntry(packet.Host).AddressList[0].ToString();
            }

            if (packet.Name.ToLower().Contains("nexusportal"))
            {
                ReconnectPacket recon = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
                recon.IsFromArena      = false;
                recon.GameId           = packet.GameId;
                recon.Host             = packet.Host == "" ? client.State.ConTargetAddress : packet.Host;
                recon.Port             = packet.Port == -1 ? client.State.ConTargetPort : packet.Port;
                recon.Key              = packet.Key;
                recon.Stats            = packet.Stats;
                recon.KeyTime          = packet.KeyTime;
                recon.Name             = packet.Name;
                client.State.LastRealm = recon;
            }
            else if (packet.Name != "" && !packet.Name.Contains("vault") && packet.GameId != -2)
            {
                ReconnectPacket drecon = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
                drecon.IsFromArena       = false;
                drecon.GameId            = packet.GameId;
                drecon.Host              = packet.Host == "" ? client.State.ConTargetAddress : packet.Host;
                drecon.Port              = packet.Port == -1 ? client.State.ConTargetPort : packet.Port;
                drecon.Key               = packet.Key;
                drecon.Stats             = packet.Stats;
                drecon.KeyTime           = packet.KeyTime;
                drecon.Name              = packet.Name;
                client.State.LastDungeon = drecon;
            }

            if (packet.Port != -1)
            {
                client.State.ConTargetPort = packet.Port;
            }

            if (packet.Host != "")
            {
                client.State.ConTargetAddress = packet.Host;
            }

            if (packet.Key.Length != 0)
            {
                client.State.ConRealKey = packet.Key;
            }

            // Tell the client to connect to the proxy
            packet.Key  = Encoding.UTF8.GetBytes(client.State.GUID);
            packet.Host = "localhost";
            packet.Port = 2050;
        }
示例#9
0
 private void OnReconnect(ReconnectPacket reconnect)
 {
     if (reconnect.Host.Length > 0)
     {
         Reconnect.Host = reconnect.Host;
     }
     Reconnect.GameId  = reconnect.GameId;
     Reconnect.Key     = reconnect.Key;
     Reconnect.KeyTime = reconnect.KeyTime;
     Log($"{reconnect.Key}|{reconnect.Key.Length} + {reconnect.KeyTime} + {reconnect.GameId} + {reconnect.Host}");
     _net.Disconnect();
 }
示例#10
0
 public void Reconnect(ReconnectPacket pkt)
 {
     RealmManager.AddPendingAction(t =>
     {
         if (Player != null)
         {
             Player.SaveToCharacter();
         }
         Save();
         RealmManager.Disconnect(this);
         SendPacket(pkt);
     }, PendingPriority.Destruction);
 }
示例#11
0
        public static ReconnectPacket BuidReconnectPacket(int gameId, string host, int keytime, string name = "bingle", bool isfromarena = false, string stats = "", params byte[] key)
        {
            ReconnectPacket rpacket = Packet.Create <ReconnectPacket>(PacketType.RECONNECT);

            rpacket.GameId      = gameId;
            rpacket.Host        = host;
            rpacket.IsFromArena = isfromarena;
            rpacket.Key         = key;
            rpacket.KeyTime     = keytime;
            rpacket.Name        = name;
            rpacket.Stats       = stats;
            return(rpacket);
        }
示例#12
0
        private void OnConnectCommand(Client client, string command, string[] args)
        {
            if (args.Length == 0)
            {
                /*
                 * string LastConnection = ((MapInfoPacket)client.State["MapInfo"]).Name;
                 * string Text = GameData.GameData.Servers.Map.Single(x => x.Value.Address == Proxy.DefaultServer).Value.Name + ", ";
                 *
                 * Text = LastConnection == "Realm of the Mad God" ? client.State.LastReconnect.Name.Split('.').Last() : LastConnection;
                 * Text += GameData.GameData.Servers.Map.Where(x => x.Value.Address == client.State.ConTargetAddress).Count() == 0 ? client.State.LastRealm.Name.Split('.').Last() : LastConnection;
                 *
                 * TextPacket tpacket = (TextPacket)Packet.Create(PacketType.TEXT);
                 * tpacket.BubbleTime = 184;
                 * tpacket.NumStars = -1;
                 * tpacket.ObjectId = -1;
                 * tpacket.Name = "";
                 * tpacket.Recipient = "";
                 * tpacket.CleanText = "";
                 * tpacket.Text = Text;
                 * client.SendToClient(tpacket);
                 */
            }
            else if (args.Length == 1)
            {
                string serverNameUpper = args[0].ToUpper();

                IEnumerable <ServerStructure> servers = GameData.GameData.Servers.Map.Where(x => x.Key == serverNameUpper || x.Value.Name.ToUpper() == serverNameUpper).Select(x => x.Value);

                if (servers.Count() == 1)
                {
                    ServerStructure server = servers.First();

                    ChangeDefault(server);

                    ReconnectPacket reconnect = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
                    reconnect.Host        = server.Address;
                    reconnect.Port        = 2050;
                    reconnect.GameId      = -2;
                    reconnect.Name        = "Nexus";
                    reconnect.IsFromArena = false;
                    reconnect.Key         = new byte[0];
                    reconnect.KeyTime     = 0;
                    reconnect.Stats       = string.Empty;
                    SendReconnect(client, reconnect);
                }
                else
                {
                    client.SendToClient(PluginUtils.CreateOryxNotification("K Relay", "Unknown server!"));
                }
            }
        }
示例#13
0
 public void Reconnect(ReconnectPacket pkt)
 {
     RealmManager.Logic.AddPendingAction(t =>
     {
         if (Player != null)
         {
             Player.SaveToCharacter();
         }
         //psr.Database.SaveCharacter(psr.Account, psr.Character);
         Save();
         RealmManager.Disconnect(this);
         SendPacket(pkt);
     }, PendingPriority.Destruction);
 }
示例#14
0
    // Token: 0x060004AF RID: 1199 RVA: 0x0001A994 File Offset: 0x00018B94
    private ReconnectPacket _awssO9iABhEDJrqUB4tmDrMK9kh()
    {
        ReconnectPacket u9Kj4tAStSlt3Dcm6rdEl60w8MG = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);

        u9Kj4tAStSlt3Dcm6rdEl60w8MG.Host        = "";
        u9Kj4tAStSlt3Dcm6rdEl60w8MG.Port        = 2050;
        u9Kj4tAStSlt3Dcm6rdEl60w8MG.Name        = "Nexus";
        u9Kj4tAStSlt3Dcm6rdEl60w8MG.Key         = new byte[0];
        u9Kj4tAStSlt3Dcm6rdEl60w8MG.KeyTime     = 0;
        u9Kj4tAStSlt3Dcm6rdEl60w8MG.State       = "";
        u9Kj4tAStSlt3Dcm6rdEl60w8MG.GameId      = -2;
        u9Kj4tAStSlt3Dcm6rdEl60w8MG.isFromArena = false;
        return(u9Kj4tAStSlt3Dcm6rdEl60w8MG);
    }
示例#15
0
 public void Reconnect(ReconnectPacket pkt)
 {
     log.Info($"Reconnecting client @ {skt.RemoteEndPoint} to {pkt.Name}");
     Manager.Logic.AddPendingAction(t =>
     {
         if (Player != null)
         {
             Player.SaveToCharacter();
         }
         Save();
         Manager.Disconnect(this);
         SendPacket(pkt);
     }, PendingPriority.Destruction);
 }
示例#16
0
        public static ReconnectPacket CloneReconnectPacket(Client client, ReconnectPacket packet)
        {
            ReconnectPacket clone = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);

            clone.IsFromArena = false;
            clone.GameId      = packet.GameId;
            clone.Host        = packet.Host == "" ? client.State.ConTargetAddress : packet.Host;
            clone.Port        = packet.Port == -1 ? client.State.ConTargetPort : packet.Port;
            clone.Key         = packet.Key;
            clone.Stats       = packet.Stats;
            clone.KeyTime     = packet.KeyTime;
            clone.Name        = packet.Name;

            return(clone);
        }
        protected override bool Process(Player player, RealmTime time, string[] args)
        {
            if (player.Owner is Vault || player.Owner is PetYard)
            {
                player.SendInfo("You cant summon in this world.");
                return(false);
            }
            foreach (KeyValuePair <string, Client> i in player.Manager.Clients)
            {
                if (i.Value.Player.Name.EqualsIgnoreCase(args[0]))
                {
                    Packet pkt;
                    if (i.Value.Player.Owner == player.Owner)
                    {
                        i.Value.Player.Move(player.X, player.Y);
                        pkt = new GotoPacket
                        {
                            ObjectId = i.Value.Player.Id,
                            Position = new Position(player.X, player.Y)
                        };
                        i.Value.Player.UpdateCount++;
                        player.SendInfo("Player summoned!");
                    }
                    else
                    {
                        pkt = new ReconnectPacket
                        {
                            GameId      = player.Owner.Id,
                            Host        = "",
                            IsFromArena = false,
                            Key         = player.Owner.PortalKey,
                            KeyTime     = -1,
                            Name        = player.Owner.Name,
                            Port        = -1
                        };
                        player.SendInfo("Player will connect to you now!");
                    }

                    i.Value.SendPacket(pkt);

                    return(true);
                }
            }
            player.SendError(string.Format("Player '{0}' could not be found!", args));
            return(false);
        }
示例#18
0
        public static void SendReconnect(Client client, ReconnectPacket reconnect)
        {
            string host = reconnect.Host;
            int port = reconnect.Port;
            byte[] key = reconnect.Key;
            client.State.ConTargetAddress = host;
            client.State.ConTargetPort = port;
            client.State.ConRealKey = key;
            reconnect.Key = Encoding.UTF8.GetBytes(client.State.GUID);
            reconnect.Host = "localhost";
            reconnect.Port = 2050;

            client.SendToClient(reconnect);

            reconnect.Key = key;
            reconnect.Host = host;
            reconnect.Port = port;
        }
示例#19
0
        public static void SendToNexus(this Client client, string host)
        {
            if (!GameData.Servers.Map.Values.Select(x => x.Address).Contains(host))
            {
                return;
            }

            ReconnectPacket rpacket = Packet.Create <ReconnectPacket>(PacketType.RECONNECT);

            rpacket.GameId      = -2;
            rpacket.Host        = host;
            rpacket.IsFromArena = false;
            rpacket.Key         = new byte[0];
            rpacket.KeyTime     = client.Time;
            rpacket.Name        = "Nexus";
            rpacket.Port        = 2050;
            rpacket.Stats       = "";
            ReconnectHandler.SendReconnect(client, rpacket);
        }
示例#20
0
        public static void SendReconnect(Client client, ReconnectPacket reconnect)
        {
            string host = reconnect.Host;
            int    port = reconnect.Port;

            byte[] key = reconnect.Key;
            client.State.ConTargetAddress = host;
            client.State.ConTargetPort    = port;
            client.State.ConRealKey       = key;
            reconnect.Key  = Encoding.UTF8.GetBytes(client.State.GUID);
            reconnect.Host = "localhost";
            reconnect.Port = 2050;

            client.SendToClient(reconnect);

            reconnect.Key  = key;
            reconnect.Host = host;
            reconnect.Port = port;
        }
示例#21
0
        protected override Tuple <bool, string> Process(Player player, RealmTime time, string[] args)
        {
            if (player.Owner is Vault || player.Owner is PetYard)
            {
                return(Tuple.Create(false, "You cannot summon players to this world"));
            }

            foreach (KeyValuePair <string, Client> i in player.Manager.Clients)
            {
                if (i.Value.Player.Name.EqualsIgnoreCase(args[0]))
                {
                    Packet pkt;
                    if (i.Value.Player.Owner == player.Owner)
                    {
                        i.Value.Player.Move(player.X, player.Y);
                        pkt = new GotoPacket
                        {
                            ObjectId = i.Value.Player.Id,
                            Position = new Position(player.X, player.Y)
                        };
                        i.Value.Player.UpdateCount++;
                    }
                    else
                    {
                        pkt = new ReconnectPacket
                        {
                            GameId      = player.Owner.Id,
                            Host        = "",
                            IsFromArena = false,
                            Key         = player.Owner.PortalKey,
                            KeyTime     = -1,
                            Name        = player.Owner.Name,
                            Port        = -1
                        };
                    }

                    i.Value.SendPacket(pkt);
                    return(Tuple.Create(true, "Player summoned!"));
                }
            }
            return(Tuple.Create(false, $"Player '{args[0]}' could not be found!"));
        }
示例#22
0
        private void OnReconnect(Client client, ReconnectPacket ppacket)
        {
            ReconnectPacket packet = CloneReconnectPacket(client, ppacket);

            client.State.LastReconnect = CloneReconnectPacket(client, packet);
            packet.Send = false;
            if (packet.Host.Contains(".com"))
            {
                packet.Host = Dns.GetHostEntry(packet.Host).AddressList[0].ToString();
            }

            if (packet.Name.ToLower().Contains("nexusportal"))
            {
                client.State.LastRealm = CloneReconnectPacket(client, packet);
            }
            else if (packet.Name != "" && !packet.Name.Contains("vault") && packet.GameId != -2)
            {
                client.State.LastDungeon = CloneReconnectPacket(client, packet);
            }

            if (packet.Port != -1)
            {
                client.State.ConTargetPort = packet.Port;
            }

            if (packet.Host != "")
            {
                client.State.ConTargetAddress = packet.Host;
            }

            if (packet.Key.Length != 0)
            {
                client.State.ConRealKey = packet.Key;
            }

            // Tell the client to connect to the proxy
            ppacket.Key  = Encoding.UTF8.GetBytes(client.State.GUID);
            ppacket.Host = "localhost";
            ppacket.Port = 2050;
            //client.SendToClient(packet);
        }
示例#23
0
        public override bool Handle(Player player)
        {
            foreach (KeyValuePair <string, Client> i in player.Manager.Clients)
            {
                if (i.Value.Player.Name.EqualsIgnoreCase(Arguments[0]))
                {
                    Packet pkt;
                    if (i.Value.Player.Owner == player.Owner)
                    {
                        i.Value.Player.Move(player.X, player.Y);
                        pkt = new GotoPacket
                        {
                            ObjectId = i.Value.Player.Id,
                            Position = new Position(player.X, player.Y)
                        };
                        i.Value.Player.UpdateCount++;
                        player.SendInfo("Player summoned!");
                    }
                    else
                    {
                        pkt = new ReconnectPacket
                        {
                            GameId      = player.Owner.Id,
                            Host        = "",
                            IsFromArena = false,
                            Key         = player.Owner.PortalKey,
                            KeyTime     = -1,
                            Name        = player.Owner.Name,
                            Port        = -1
                        };
                        player.SendInfo("Player will connect to you now!");
                    }

                    i.Value.SendPacket(pkt);

                    return(true);
                }
            }
            player.SendError(string.Format("Player '{0}' could not be found!", Arguments));
            return(false);
        }
示例#24
0
        private void OnReconnect(Client client, Packet packet)
        {
            ReconnectPacket p = (ReconnectPacket)packet;

            if (p.Name.StartsWith("NexusPortal"))
            {
                currRealmName = p.Name.Split('.') [1];
            }
            else
            {
            }

            if (loopingforrealmcount >= 50)
            {
                loopingforrealm = false;
            }

            if (currRealmName == _bestName)
            {
                loopingforrealm      = false;
                loopingforrealmcount = 0;
            }
            else if (loopingforrealm)
            {
                loopingforrealmcount++;
                Console.WriteLine("Searching for " + _bestName + ". Found " + currRealmName + " instead.");

                ReconnectPacket reconnect = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
                reconnect.Name        = "{\"text\":\"server.realm_of_the_mad_god\"}";
                reconnect.Host        = "";
                reconnect.Stats       = "";
                reconnect.Port        = -1;
                reconnect.GameId      = -3;
                reconnect.KeyTime     = -1;
                reconnect.IsFromArena = false;
                reconnect.Key         = new byte[0];

                connectedClient.SendToClient(reconnect);
            }
        }
示例#25
0
 private void OnConnectCommand(Client client, string command, string[] args)
 {
     if (args.Length == 1)
     {
         if (GameData.GameData.Servers.Map.ContainsKey(args[0].ToUpper()))
         {
             ReconnectPacket reconnect = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
             reconnect.Host        = GameData.GameData.Servers.ByID(args[0].ToUpper()).Address;
             reconnect.Port        = 2050;
             reconnect.GameId      = -2;
             reconnect.Name        = "Nexus";
             reconnect.IsFromArena = false;
             reconnect.Key         = new byte[0];
             reconnect.KeyTime     = 0;
             SendReconnect(client, reconnect);
         }
         else
         {
             client.SendToClient(PluginUtils.CreateOryxNotification("K Relay", "Unknown server!"));
         }
     }
 }
示例#26
0
文件: Client.cs 项目: abrn/exalt-root
    // Token: 0x06000233 RID: 563 RVA: 0x000103AC File Offset: 0x0000E5AC
    private void Hello(HelloPacket hello)
    {
        this._serverConnection         = new TcpClient();
        this._serverConnection.NoDelay = true;
        string key = Client.ByteArrayToString(hello.Key);

        if (hello.Key.Length != 0 && this.Proxy.ClientDestinations.ContainsKey(key))
        {
            ReconnectPacket u9Kj4tAStSlt3Dcm6rdEl60w8MG = this.Proxy.ClientDestinations[key];
            hello.GameId  = u9Kj4tAStSlt3Dcm6rdEl60w8MG.GameId;
            hello.Key     = u9Kj4tAStSlt3Dcm6rdEl60w8MG.Key;
            hello.KeyTime = u9Kj4tAStSlt3Dcm6rdEl60w8MG.KeyTime;
            this._serverConnection.BeginConnect(u9Kj4tAStSlt3Dcm6rdEl60w8MG.Host, u9Kj4tAStSlt3Dcm6rdEl60w8MG.Port, new AsyncCallback(this.ServerConnected), hello);
            Console.WriteLine("Client: Restored reconnect info.");
        }
        else
        {
            string host = (!ServerParser._IOpSuG4guyYLeez9LywVYmMYQtG.ContainsKey(Settings.Default.CurrentServer)) ? ServerParser._IOpSuG4guyYLeez9LywVYmMYQtG.First <KeyValuePair <string, string> >().Value : ServerParser._IOpSuG4guyYLeez9LywVYmMYQtG[Settings.Default.CurrentServer];
            this._serverConnection.BeginConnect(host, 2050, new AsyncCallback(this.ServerConnected), hello);
            Console.WriteLine("Client: Used default connect info.");
        }
        hello.Send = false;
    }
示例#27
0
        public static bool ConnectTo(this Client client, ReconnectPacket packet)
        {
            if (packet == null)
            {
                return(false);
            }
            string host = packet.Host;
            int    port = packet.Port;

            byte[] key = packet.Key;
            client.State.ConTargetAddress = host;
            client.State.ConTargetPort    = port;
            client.State.ConRealKey       = key;
            packet.Key  = Encoding.UTF8.GetBytes(client.State.GUID);
            packet.Host = "localhost";
            packet.Port = 2050;

            client.SendToClient(packet);

            packet.Key  = key;
            packet.Host = host;
            packet.Port = port;
            return(true);
        }
示例#28
0
文件: Client.cs 项目: abrn/exalt-root
    // Token: 0x06000232 RID: 562 RVA: 0x0000FDC0 File Offset: 0x0000DFC0
    private void HandlePacket(Packet packet)
    {
        UpdatePacket updatePacket = packet as UpdatePacket;

        if (updatePacket != null)
        {
            this._objectTracker.Update(updatePacket);
            this.SafeWalk.Update(updatePacket);
            this._autoNexus.Update(updatePacket);
            this._fameHelper.Update(updatePacket);
            this._accuracyFarm.Update(updatePacket);
            this._antiLag.Update(updatePacket);
            this._autoLoot.Update(updatePacket);
            this._mapHack.Update(updatePacket);
            this._o3Helper.Update(updatePacket);
            this._showLHPot.Update(updatePacket);
            return;
        }
        NewTickPacket newTickPacket = packet as NewTickPacket;

        if (newTickPacket != null)
        {
            this._objectTracker.NewTick(newTickPacket);
            this._antiDebuffs.NewTick(newTickPacket);
            this._autoNexus.NewTick(newTickPacket);
            this._antiDdos.NewTick();
            this._fameHelper.NewTick(newTickPacket);
            this._accuracyFarm.NewTick(newTickPacket);
            this._antiLag.NewTick(newTickPacket);
            this._o3Helper.NewTick(newTickPacket);
            this._autoNexus2.NewTick(newTickPacket);
            return;
        }
        MovePacket movePacket = packet as MovePacket;

        if (movePacket != null)
        {
            this.PreviousTime = movePacket._Nx46RcGIU0H1BCGWaJXjN1ieopt;
            this._objectTracker.move(movePacket);
            this._antiDebuffs.Move(movePacket);
            this._autoLoot.Move(movePacket);
            this.AntiAfk.move(movePacket);
            this._autoNexus.move(movePacket);
            this._autoNexus2.move(movePacket);
            return;
        }
        MapInfoPacket mapInfoPacket = packet as MapInfoPacket;

        if (mapInfoPacket != null)
        {
            Console.WriteLine("Client: Map is " + mapInfoPacket.Name);
            this._objectTracker.MapInfo(mapInfoPacket);
            this._autoNexus2.MapInfo(mapInfoPacket);
            this.SafeWalk.MapInfo(mapInfoPacket);
            this._autoNexus.MapInfo(mapInfoPacket);
            this._autoLoot.MapInfo(mapInfoPacket);
            this._fameHelper.MapInfo();
            _accuracyFarm.MapInfo();
            this._antiLag.MapInfo(mapInfoPacket);
            this._mapHack.MapInfo(mapInfoPacket);
            this._o3Helper.MapInfo(mapInfoPacket);
            this._showLHPot.MapInfo(mapInfoPacket);
            return;
        }
        PlayerTextPacket playerTextPacket = packet as PlayerTextPacket;

        if (playerTextPacket != null)
        {
            this._teleportTools.text(playerTextPacket);
            this._ipJoin.text(playerTextPacket);
            this._fameHelper._QrK9KtR4xguWgEYrBE9xnEwwcqd(playerTextPacket);
            this._antiLag.PlayerText(playerTextPacket);
            this._mapHack.text(playerTextPacket);
            this._autoNexus._QrK9KtR4xguWgEYrBE9xnEwwcqd(playerTextPacket);
            return;
        }
        _5Qyhf9ImNgkDzh4BmaDRKP646iH createSuccessPacket = packet as _5Qyhf9ImNgkDzh4BmaDRKP646iH;

        if (createSuccessPacket != null)
        {
            this.PlayerId = createSuccessPacket.ObjectId;
            this._objectTracker._1lYB9SyYVs1zUAIHgLGbUs7pmeb();
            this._bazaarTimer.CreateSuccess();
            this._autoNexus2._1lYB9SyYVs1zUAIHgLGbUs7pmeb();
            return;
        }
        FailurePacket failurePacket = packet as FailurePacket;

        if (failurePacket != null)
        {
            Console.WriteLine(string.Format("Client: Got failure {0}, {1} ({2})", failurePacket.ErrorId, failurePacket.ErrorMessage, failurePacket.ErrorPlace));
            return;
        }
        ReconnectPacket reconnectPacket = packet as ReconnectPacket;

        if (reconnectPacket != null)
        {
            this.Reconnect(reconnectPacket);
            return;
        }
        HelloPacket helloPacket = packet as HelloPacket;

        if (helloPacket != null)
        {
            this.Hello(helloPacket);
            return;
        }
        PlayerHitPacket playerHitPacket = packet as PlayerHitPacket;

        if (playerHitPacket != null)
        {
            this._autoNexus.PlayerHit(playerHitPacket);
            this._antiDebuffs.PlayerHit(playerHitPacket);
            return;
        }
        AoEPacket pqhqze9k9pObME2LmlIcbfEeSYS = packet as AoEPacket;

        if (pqhqze9k9pObME2LmlIcbfEeSYS != null)
        {
            this._autoNexus._M1PxW31jx87SGG4gvOYAwe86vjg(pqhqze9k9pObME2LmlIcbfEeSYS);
            this._antiDebuffs.AoE(pqhqze9k9pObME2LmlIcbfEeSYS);
            return;
        }
        AoEAckPacket x7UwVkbcYG7VnZWu4HCA8hCeQtS = packet as AoEAckPacket;

        if (x7UwVkbcYG7VnZWu4HCA8hCeQtS != null)
        {
            this._autoNexus._iKqf12lpU2ifSlxUxUegqEC5CVe(x7UwVkbcYG7VnZWu4HCA8hCeQtS);
            return;
        }
        GroundDamagePacket hllcDvAIxPBOvJZP4BFTFQUoryN = packet as GroundDamagePacket;

        if (hllcDvAIxPBOvJZP4BFTFQUoryN != null)
        {
            this._autoNexus._524YRDmz9HCOj575eu5oeD5ruJb(hllcDvAIxPBOvJZP4BFTFQUoryN);
            return;
        }
        _6lHFncsY9352Wg3pNnnFZ49g5xA 6lHFncsY9352Wg3pNnnFZ49g5xA = packet as QuestObjIdPacket;
        if (6lHFncsY9352Wg3pNnnFZ49g5xA != null)
        {
            this._teleportTools._FMTVFcTfzNRteqoB3XiUkaNps7l(6lHFncsY9352Wg3pNnnFZ49g5xA);
            return;
        }
        ShowEffectPacket showEffectPacket = packet as ShowEffectPacket;

        if (showEffectPacket != null)
        {
            this._antiLag.ShowEffect(showEffectPacket);
            this._autoNexus._1nwhQXngJ6rNjd7Ufx1bWeF0vhM(showEffectPacket);
            this._o3Helper._1nwhQXngJ6rNjd7Ufx1bWeF0vhM(showEffectPacket);
            return;
        }
        _4wU9AwmH67XtmNygsXuDz9DUXYm 4wU9AwmH67XtmNygsXuDz9DUXYm = packet as _4wU9AwmH67XtmNygsXuDz9DUXYm;
        if (4wU9AwmH67XtmNygsXuDz9DUXYm != null)
        {
            this._antiLag._Q1PiJQ99KBCJeLcZ0HOk3AUAjIP(4wU9AwmH67XtmNygsXuDz9DUXYm);
            return;
        }
        PlayerShootPacket fbqBESNaaIBpK5dNK9X5lWOOll = packet as PlayerShootPacket;

        if (fbqBESNaaIBpK5dNK9X5lWOOll != null)
        {
            this._autoNexus2.PlayerShoot(fbqBESNaaIBpK5dNK9X5lWOOll);
            return;
        }
        TextPacket cbwOjnzusZzuPkHfx7wuwePHqrf = packet as TextPacket;

        if (cbwOjnzusZzuPkHfx7wuwePHqrf != null)
        {
            this._antiSpam._IDtpCgDjmC1AQOcZCJSFNAYjlbH(cbwOjnzusZzuPkHfx7wuwePHqrf);
            this._antiLag.Text(cbwOjnzusZzuPkHfx7wuwePHqrf);
            this._o3Helper._IDtpCgDjmC1AQOcZCJSFNAYjlbH(cbwOjnzusZzuPkHfx7wuwePHqrf);
            return;
        }
        UseItemPacket lylWoxWrca2h31SiYiDb8gyQP0o = packet as UseItemPacket;

        if (lylWoxWrca2h31SiYiDb8gyQP0o != null)
        {
            this._autoNexus2.UseItem(lylWoxWrca2h31SiYiDb8gyQP0o);
            this._fameHelper.UseItem(lylWoxWrca2h31SiYiDb8gyQP0o);
            return;
        }
        EnemyShootPacket cbwrHXLbrCktla3qkqXNmNymbvH = packet as EnemyShootPacket;

        if (cbwrHXLbrCktla3qkqXNmNymbvH != null)
        {
            this._objectTracker._Qz49aY7UXgmnBNNMA6Q6IEQtadk(cbwrHXLbrCktla3qkqXNmNymbvH);
            return;
        }
        InvSwapPacket maJp2qic3r54gk5Eg1eeMowxvXh = packet as InvSwapPacket;

        if (maJp2qic3r54gk5Eg1eeMowxvXh != null)
        {
            this._autoLoot.InvSwap(maJp2qic3r54gk5Eg1eeMowxvXh);
            this._autoNexus._ZHfjECn2B9JJHnVF67eBaO57JUp(maJp2qic3r54gk5Eg1eeMowxvXh);
            return;
        }
        EscapePacket m74ADSrj0VfuNwRBO916gAw0Nu = packet as EscapePacket;

        if (m74ADSrj0VfuNwRBO916gAw0Nu != null)
        {
            this.Escape(m74ADSrj0VfuNwRBO916gAw0Nu);
            return;
        }
        InvitedToGuildPacket tJHGMoVf7DhHyQm8a6SCuL1cSWl = packet as InvitedToGuildPacket;

        if (tJHGMoVf7DhHyQm8a6SCuL1cSWl != null)
        {
            this._antiDdos.Invite(tJHGMoVf7DhHyQm8a6SCuL1cSWl);
            return;
        }
        TeleportPacket rvckmor8bw91EVaRfdwc25aHYbc = packet as TeleportPacket;

        if (rvckmor8bw91EVaRfdwc25aHYbc != null)
        {
            this._fameHelper.Teleport(rvckmor8bw91EVaRfdwc25aHYbc);
            this._accuracyFarm.Teleport(rvckmor8bw91EVaRfdwc25aHYbc);
            return;
        }
        _6UIiGxMChbVinHsvx5uqg8WrMRc 6UIiGxMChbVinHsvx5uqg8WrMRc = packet as InvResultPacket;
        if (6UIiGxMChbVinHsvx5uqg8WrMRc != null)
        {
            this._autoLoot._yOjSn1WKSXsXVziJpL1eH5gSoWg(6UIiGxMChbVinHsvx5uqg8WrMRc);
            return;
        }
        NotificationPacket zIBPB6zZVww7yGWtjJqRMmACh1q = packet as NotificationPacket;

        if (zIBPB6zZVww7yGWtjJqRMmACh1q != null)
        {
            this._autoNexus._4GSfC8bADOwIwOXLYze8EOUBQxJ(zIBPB6zZVww7yGWtjJqRMmACh1q);
            return;
        }
        AccountListPacket k4pBHmoGRyaE6dWf1FIvL0dcuzKA = packet as AccountListPacket;

        if (k4pBHmoGRyaE6dWf1FIvL0dcuzKA != null)
        {
            this._antiLag.AccountList(k4pBHmoGRyaE6dWf1FIvL0dcuzKA);
            return;
        }
        EditAccountListPacket co7ACSeK1WWaCGAPAqLaov37Wqdb = packet as EditAccountListPacket;

        if (co7ACSeK1WWaCGAPAqLaov37Wqdb != null)
        {
            this._antiLag.EditAccountList(co7ACSeK1WWaCGAPAqLaov37Wqdb);
            return;
        }
        _7k8aOfI7MhNrVnHioUXbsPAxkbm 7k8aOfI7MhNrVnHioUXbsPAxkbm = packet as EnemyHitPacket;
        if (7k8aOfI7MhNrVnHioUXbsPAxkbm != null)
        {
            this._o3Helper._9BgsXisaUbFFlj5HLRd76sERUUX(7k8aOfI7MhNrVnHioUXbsPAxkbm);
            return;
        }
        DeathPacket wOmvsGmaE1PheZ2fPjD9V16UEseb = packet as DeathPacket;

        if (wOmvsGmaE1PheZ2fPjD9V16UEseb != null)
        {
            this._autoNexus._qQsqaOxgCR9yg9ky7erATaKrgCC(wOmvsGmaE1PheZ2fPjD9V16UEseb);
            return;
        }
    }
示例#29
0
        public void Initialize(Proxy proxy)
        {
            targets         = new List <Target> ();
            playerPositions = new Dictionary <int, Target> ();
            portals         = new List <Portal> ();
            enemies         = new List <Enemy> ();
            obstacles       = new List <Obstacle> ();

            obstacleIds = new List <ushort> ();
            GameData.Objects.Map.ForEach((kvp) => {
                if (kvp.Value.FullOccupy || kvp.Value.OccupySquare)
                {
                    obstacleIds.Add(kvp.Key);
                }
            });
            PluginUtils.Log("FameBot", "Found {0} obstacles.", obstacleIds.Count);

            gui = new FameBotGUI();
            PluginUtils.ShowGUI(gui);

            config = ConfigManager.GetConfiguration();

            Process[] processes = Process.GetProcessesByName(config.FlashPlayerName);
            if (processes.Length == 1)
            {
                Log("Automatically bound to client.");
                flashPtr = processes[0].MainWindowHandle;
                gui?.SetHandle(flashPtr);
                if (config.AutoConnect)
                {
                    Start();
                }
            }
            else if (processes.Length > 1)
            {
                Log("Multiple flash players running. Use the /bind command on the client you want to use.");
            }
            else
            {
                Log("Couldn't find flash player. Use the /bind command in game, then start the bot.");
            }

            #region Proxy Hooks
            proxy.HookCommand("bind", ReceiveCommand);
            proxy.HookCommand("start", ReceiveCommand);
            proxy.HookCommand("gui", ReceiveCommand);
            proxy.HookCommand("famebot", ReceiveCommand);
            proxy.HookCommand("stop1", ReceiveCommand);
            proxy.HookCommand("options", ReceiveCommand);
            proxy.HookPacket(PacketType.RECONNECT, OnReconnect);
            proxy.HookPacket(PacketType.UPDATE, OnUpdate);
            proxy.HookPacket(PacketType.NEWTICK, OnNewTick);
            proxy.HookPacket(PacketType.PLAYERHIT, OnHit);
            proxy.HookPacket(PacketType.MAPINFO, OnMapInfo);
            proxy.HookPacket(PacketType.TEXT, OnText);
            proxy.HookPacket(PacketType.GOTOACK, (client, packet) => {
                if (blockNextAck)
                {
                    packet.Send  = false;
                    blockNextAck = false;
                }
            });
            #endregion

            proxy.ClientConnected += (client) => {
                connectedClient = client;
                targets.Clear();
                playerPositions.Clear();
                enemies.Clear();
                obstacles.Clear();
                followTarget = false;
                isInNexus    = false;
                ResetAllKeys();
            };

            proxy.ClientDisconnected += (client) => {
                Log("Client disconnected. Waiting a few seconds before trying to press play...");
                PressPlay();
            };

            guiEvent += (evt) => {
                switch (evt)
                {
                case GuiEvent.StartBot:
                    Start();
                    break;

                case GuiEvent.StopBot:
                    Stop();
                    break;

                case GuiEvent.SettingsChanged:
                    Log("Updated config");
                    config = ConfigManager.GetConfiguration();
                    break;
                }
            };

            sendMessage += (message) => {
                if (!(connectedClient?.Connected ?? false))
                {
                    return;
                }
                PlayerTextPacket packet = (PlayerTextPacket)Packet.Create(PacketType.PLAYERTEXT);
                packet.Text = message;
                connectedClient.SendToServer(packet);
            };

            proxy.HookPacket(PacketType.FAILURE, (client, packet) => {
                FailurePacket p = packet as FailurePacket;

                if (p.ErrorId != 9)
                {
                    Console.WriteLine("<FAILURE> ID: " + p.ErrorId + " Message: " + p.ErrorMessage);
                }

                if (p.ErrorMessage == "{\"key\":\"server.realm_full\"}")
                {
                    Attempts++;
                    if (Attempts >= 2 && bestName != "")
                    {
                        _bestName = bestName;
                        ReconnectPacket reconnect = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
                        reconnect.Name            = "{\"text\":\"server.realm_of_the_mad_god\"}";
                        reconnect.Host            = "";
                        reconnect.Stats           = "";
                        reconnect.Port            = -1;
                        reconnect.GameId          = -3;
                        reconnect.KeyTime         = -1;
                        reconnect.IsFromArena     = false;
                        reconnect.Key             = new byte[0];

                        connectedClient.SendToClient(reconnect);
                        Attempts        = 0;
                        loopingforrealm = true;
                    }
                }
            });

            proxy.HookPacket(PacketType.CREATESUCCESS, (client, packet) => {
                target_ = null;
                if (enabled)
                {
                    PluginUtils.Delay(200, () => Stop());
                    PluginUtils.Delay(500, () => Stop());
                    PluginUtils.Delay(1300, () => Stop());
                    PluginUtils.Delay(2200, () => Start());
                }
            });
        }
示例#30
0
        private void SendReconnect(ReconnectPacket reconnect, Client client)
        {
            string host = reconnect.Host;
            int port = reconnect.Port;
            _proxy.RemoteAddress = host;
            _proxy.Port = port;
            reconnect.Host = "localhost";
            reconnect.Port = 2050;

            client.SendToClient(reconnect);

            reconnect.Host = host;
            reconnect.Port = port;
        }
示例#31
0
    public void _CgwO1K8tgdyKPdKvCtJupNhapLD(PlayerTextPacket playerText)
    {
        if (string.IsNullOrEmpty(playerText._Message))
        {
            return;
        }
        string[]   array = default(string[]);
        PlayerData jI4Bueou7dItYp5S7QML5vyC6Rc       = default(PlayerData);
        IEnumerable <PlayerData> source              = default(IEnumerable <PlayerData>);
        PlayerData      jI4Bueou7dItYp5S7QML5vyC6Rc2 = default(PlayerData);
        double          num14    = default(double);
        PlayerData      current2 = default(PlayerData);
        TeleportPacket  gXkgDctfNPN0Xyz8qvjQDIS73of2 = default(TeleportPacket);
        ReconnectPacket reconnectPacket = default(ReconnectPacket);
        string          value           = default(string);
        string          text            = default(string);
        PlayerData      current         = default(PlayerData);

        while (true)
        {
            int num = -1750270187;
            while (true)
            {
                uint num2;
                switch ((num2 = (uint)num ^ 0xA67D4B79u) % 17u)
                {
                case 7u:
                    break;

                case 2u:
                {
                    int num9;
                    int num10;
                    if (playerText._Message[0] != '/')
                    {
                        num9  = 806781121;
                        num10 = num9;
                    }
                    else
                    {
                        num9  = 532765268;
                        num10 = num9;
                    }
                    num = num9 ^ (int)(num2 * 1164389951);
                    continue;
                }

                case 15u:
                {
                    int num41;
                    int num42;
                    if (Settings.Default.EnableTeleportToSelf)
                    {
                        num41 = -264259780;
                        num42 = num41;
                    }
                    else
                    {
                        num41 = -2010866462;
                        num42 = num41;
                    }
                    num = num41 ^ (int)(num2 * 1334473406);
                    continue;
                }

                case 14u:
                    return;

                case 1u:
                    if (array[0] == "/tp")
                    {
                        num = ((int)num2 * -919367479) ^ -648364078;
                        continue;
                    }
                    while (true)
                    {
                        if (array[0] == "/tpq")
                        {
                            int num11 = -788484004;
                            while (true)
                            {
                                switch ((num2 = (uint)num11 ^ 0xA67D4B79u) % 11u)
                                {
                                case 10u:
                                    num11 = -1591089261;
                                    continue;

                                case 1u:
                                    break;

                                case 8u:
                                    jI4Bueou7dItYp5S7QML5vyC6Rc = source.First();
                                    num11 = ((int)num2 * -185312111) ^ 0x5721D1B0;
                                    continue;

                                case 3u:
                                    return;

                                case 6u:
                                    playerText._Send = false;
                                    num11            = -773015358;
                                    continue;

                                case 4u:
                                {
                                    int num15;
                                    int num16;
                                    if (!source.Any())
                                    {
                                        num15 = 1964101611;
                                        num16 = num15;
                                    }
                                    else
                                    {
                                        num15 = 351924091;
                                        num16 = num15;
                                    }
                                    num11 = num15 ^ ((int)num2 * -907251790);
                                    continue;
                                }

                                case 5u:
                                    jI4Bueou7dItYp5S7QML5vyC6Rc2 = null;
                                    num14 = 0.0;
                                    num11 = -896664423;
                                    continue;

                                case 2u:
                                {
                                    int num12;
                                    int num13;
                                    if (Settings.Default.EnableTeleportToPlayerClosestToQuestCommand)
                                    {
                                        num12 = -1733244460;
                                        num13 = num12;
                                    }
                                    else
                                    {
                                        num12 = -1906903748;
                                        num13 = num12;
                                    }
                                    num11 = num12 ^ (int)(num2 * 1657868672);
                                    continue;
                                }

                                case 9u:
                                    _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("Quest not found!");
                                    return;

                                case 0u:
                                    source = _50w8wVuv8bL5nhKaR2EHxjrTamB._Aq9hW2NyDqEkITmxzYm6OCQLaDB.Values.Where((PlayerData enemy) => enemy._fn2CRnBpjyTWHR9K8SU4iOwhDtK == _EeeRzHBDOL9AqYJ8CIuFvkR3Qlz);
                                    num11  = (int)(num2 * 23163576) ^ -1930811091;
                                    continue;

                                default:
                                    goto IL_052b;
                                }
                                break;
                            }
                            continue;
                        }
                        goto IL_0a15;
IL_0a6b:
                        _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("Teleporting to " + jI4Bueou7dItYp5S7QML5vyC6Rc2._WL2DOBxBuX9DARzf2KPoaJbgZiCb + "!");
                        int num17 = -770781531;
                        goto IL_0695;
IL_0690:
                        num17 = -1589234120;
                        goto IL_0695;
IL_052b:
                        using (Dictionary <int, PlayerData> .ValueCollection.Enumerator enumerator = _50w8wVuv8bL5nhKaR2EHxjrTamB._naDcMlPfaanTh6qrJ3cOuO4HNwz.Values.GetEnumerator())
                        {
                            while (true)
                            {
                                int num18;
                                int num19;
                                if (!enumerator.MoveNext())
                                {
                                    num18 = -193042290;
                                    num19 = num18;
                                }
                                else
                                {
                                    num18 = -1985374203;
                                    num19 = num18;
                                }
                                while (true)
                                {
                                    switch ((num2 = (uint)num18 ^ 0xA67D4B79u) % 9u)
                                    {
                                    case 3u:
                                        num18 = -1985374203;
                                        continue;

                                    default:
                                        goto end_IL_0541;

                                    case 6u:
                                        current2 = enumerator.Current;
                                        num18    = -125787301;
                                        continue;

                                    case 5u:
                                        jI4Bueou7dItYp5S7QML5vyC6Rc2 = current2;
                                        num14 = current2._Position.GetDistance(jI4Bueou7dItYp5S7QML5vyC6Rc._Position);
                                        num18 = -2029029138;
                                        continue;

                                    case 8u:
                                    {
                                        int num26;
                                        int num27;
                                        if (!current2._NNgacHsIcOUlk6tnbwwxK7FDsff())
                                        {
                                            num26 = 1621638204;
                                            num27 = num26;
                                        }
                                        else
                                        {
                                            num26 = 1013029468;
                                            num27 = num26;
                                        }
                                        num18 = num26 ^ ((int)num2 * -99043881);
                                        continue;
                                    }

                                    case 2u:
                                    {
                                        int num22;
                                        int num23;
                                        if (current2._Position.GetDistance(jI4Bueou7dItYp5S7QML5vyC6Rc._Position) >= num14)
                                        {
                                            num22 = -2076566562;
                                            num23 = num22;
                                        }
                                        else
                                        {
                                            num22 = -799362313;
                                            num23 = num22;
                                        }
                                        num18 = num22 ^ ((int)num2 * -1129373452);
                                        continue;
                                    }

                                    case 7u:
                                        break;

                                    case 0u:
                                    {
                                        int num24;
                                        int num25;
                                        if (jI4Bueou7dItYp5S7QML5vyC6Rc2 != null)
                                        {
                                            num24 = -1864538543;
                                            num25 = num24;
                                        }
                                        else
                                        {
                                            num24 = -1042825133;
                                            num25 = num24;
                                        }
                                        num18 = num24 ^ ((int)num2 * -342833652);
                                        continue;
                                    }

                                    case 1u:
                                    {
                                        int num20;
                                        int num21;
                                        if (current2 == _50w8wVuv8bL5nhKaR2EHxjrTamB._PlayerData)
                                        {
                                            num20 = -1385695744;
                                            num21 = num20;
                                        }
                                        else
                                        {
                                            num20 = -457941751;
                                            num21 = num20;
                                        }
                                        num18 = num20 ^ ((int)num2 * -1011815673);
                                        continue;
                                    }

                                    case 4u:
                                        goto end_IL_0541;
                                    }
                                    break;
                                }
                            }
                            end_IL_0541 :;
                        }
                        if (jI4Bueou7dItYp5S7QML5vyC6Rc2 == null)
                        {
                            goto IL_0690;
                        }
                        goto IL_0a6b;
IL_0695:
                        while (true)
                        {
                            switch ((num2 = (uint)num17 ^ 0xA67D4B79u) % 34u)
                            {
                            case 21u:
                                break;

                            default:
                                return;

                            case 28u:
                                goto IL_0733;

                            case 26u:
                                goto IL_0753;

                            case 10u:
                                _50w8wVuv8bL5nhKaR2EHxjrTamB.SendToServer(gXkgDctfNPN0Xyz8qvjQDIS73of2);
                                num17 = (int)(num2 * 1686821117) ^ -2054065793;
                                continue;

                            case 32u:
                                reconnectPacket = (ReconnectPacket)Packet.CreatePacketFromType(PacketType.RECONNECT);
                                num17           = ((int)num2 * -1436860093) ^ -1342146281;
                                continue;

                            case 22u:
                                playerText._Send = false;
                                num17            = -13505546;
                                continue;

                            case 8u:
                                return;

                            case 7u:
                                Settings.Default.CurrentServer = value;
                                num17 = (int)((num2 * 1561157505) ^ 0x25CB793E);
                                continue;

                            case 2u:
                                return;

                            case 1u:
                                _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("No players found to teleport to!");
                                num17 = (int)(num2 * 2096922046) ^ -125483602;
                                continue;

                            case 30u:
                            {
                                int num32;
                                int num33;
                                if (array[0] == "/loc")
                                {
                                    num32 = -712487546;
                                    num33 = num32;
                                }
                                else
                                {
                                    num32 = -1310431336;
                                    num33 = num32;
                                }
                                num17 = num32 ^ ((int)num2 * -292526049);
                                continue;
                            }

                            case 24u:
                                _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("Usage: /connect [server name]");
                                num17 = -2142874341;
                                continue;

                            case 6u:
                                gXkgDctfNPN0Xyz8qvjQDIS73of2           = (TeleportPacket)Packet.CreatePacketFromType(PacketType.TELEPORT);
                                gXkgDctfNPN0Xyz8qvjQDIS73of2._ObjectId = jI4Bueou7dItYp5S7QML5vyC6Rc2._fn2CRnBpjyTWHR9K8SU4iOwhDtK;
                                num17 = (int)(num2 * 931766000) ^ -1673800875;
                                continue;

                            case 27u:
                                reconnectPacket._IsFromArena = false;
                                reconnectPacket._Key         = new byte[0];
                                num17 = ((int)num2 * -96955804) ^ -1988870985;
                                continue;

                            case 31u:
                            {
                                int num34;
                                int num35;
                                if (!(array[0] == "/connect"))
                                {
                                    num34 = 684173617;
                                    num35 = num34;
                                }
                                else
                                {
                                    num34 = 719580645;
                                    num35 = num34;
                                }
                                num17 = num34 ^ (int)(num2 * 696526382);
                                continue;
                            }

                            case 12u:
                                reconnectPacket._KeyTime = -1;
                                num17 = (int)((num2 * 62081320) ^ 0x76031676);
                                continue;

                            case 4u:
                                return;

                            case 33u:
                                reconnectPacket._MapName = value + " Nexus";
                                num17 = (int)((num2 * 2115272512) ^ 0x344C60BE);
                                continue;

                            case 16u:
                                reconnectPacket._GameId = -2;
                                num17 = (int)(num2 * 948123561) ^ -2127748574;
                                continue;

                            case 9u:
                            {
                                int num30;
                                int num31;
                                if (array.Length != 2)
                                {
                                    num30 = 534559486;
                                    num31 = num30;
                                }
                                else
                                {
                                    num30 = 516844265;
                                    num31 = num30;
                                }
                                num17 = num30 ^ ((int)num2 * -157206137);
                                continue;
                            }

                            case 19u:
                                goto IL_098f;

                            case 5u:
                                playerText._Send = false;
                                _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage($"Current location: {Math.Round(_50w8wVuv8bL5nhKaR2EHxjrTamB._PlayerData._Position._PositionX, 1)}, {Math.Round(_50w8wVuv8bL5nhKaR2EHxjrTamB._PlayerData._Position._PositionY, 1)}");
                                num17 = -1483513078;
                                continue;

                            case 23u:
                                goto IL_0a15;

                            case 15u:
                            {
                                int num28;
                                int num29;
                                if (ServerList._aCrqUtEobC4JELAJ9SKdNpyMHvF.TryGetValue(array[1].ToLower(), out value))
                                {
                                    num28 = -229036871;
                                    num29 = num28;
                                }
                                else
                                {
                                    num28 = -182536418;
                                    num29 = num28;
                                }
                                num17 = num28 ^ (int)(num2 * 1156014646);
                                continue;
                            }

                            case 25u:
                                goto IL_0a6b;

                            case 20u:
                                Settings.Default.Change();
                                num17 = ((int)num2 * -1527675920) ^ 0x3050A16A;
                                continue;

                            case 14u:
                                _50w8wVuv8bL5nhKaR2EHxjrTamB.SendToClient(reconnectPacket);
                                return;

                            case 0u:
                                reconnectPacket._Port = 2050;
                                num17 = (int)(num2 * 916855739) ^ -357830690;
                                continue;

                            case 13u:
                                reconnectPacket._Hostname = "127.0.0.1";
                                num17 = (int)(num2 * 611952939) ^ -184346516;
                                continue;

                            case 17u:
                                _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("Unknown server!");
                                return;

                            case 29u:
                                return;

                            case 18u:
                                return;

                            case 11u:
                                _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("Connecting to: " + value);
                                num17 = (int)(num2 * 1732984103) ^ -347248346;
                                continue;

                            case 3u:
                                return;
                            }
                            break;
IL_098f:
                            int num36;
                            if (Settings.Default.EnableLocCommand)
                            {
                                num17 = -1503005708;
                                num36 = num17;
                            }
                            else
                            {
                                num17 = -154957677;
                                num36 = num17;
                            }
                            continue;
IL_0753:
                            int num37;
                            if (!(array[0] == "/l"))
                            {
                                num17 = -564094377;
                                num37 = num17;
                            }
                            else
                            {
                                num17 = -1006679788;
                                num37 = num17;
                            }
                            continue;
IL_0733:
                            int num38;
                            if (!Settings.Default.EnableConnectCommand)
                            {
                                num17 = -1712388317;
                                num38 = num17;
                            }
                            else
                            {
                                num17 = -351010149;
                                num38 = num17;
                            }
                        }
                        goto IL_0690;
IL_0a15:
                        int num39;
                        if (!(array[0] == "/con"))
                        {
                            num17 = -1361958442;
                            num39 = num17;
                        }
                        else
                        {
                            num17 = -1417258857;
                            num39 = num17;
                        }
                        goto IL_0695;
                    }

                case 0u:
                    return;

                case 5u:
                {
                    int num43;
                    int num44;
                    if (array.Length == 1)
                    {
                        num43 = -636101856;
                        num44 = num43;
                    }
                    else
                    {
                        num43 = -1018051115;
                        num44 = num43;
                    }
                    num = num43 ^ (int)(num2 * 1919184901);
                    continue;
                }

                case 9u:
                    return;

                case 4u:
                {
                    int num45;
                    int num46;
                    if (Settings.Default.EnableTeleportToPlayerCommand)
                    {
                        num45 = 808092347;
                        num46 = num45;
                    }
                    else
                    {
                        num45 = 767592542;
                        num46 = num45;
                    }
                    num = num45 ^ (int)(num2 * 998309261);
                    continue;
                }

                case 12u:
                {
                    int num40;
                    if (array.Length != 2)
                    {
                        num   = -1265570669;
                        num40 = num;
                    }
                    else
                    {
                        num   = -672276365;
                        num40 = num;
                    }
                    continue;
                }

                case 11u:
                    return;

                case 13u:
                    text = array[1].ToLower();
                    num  = -1164419516;
                    continue;

                case 8u:
                {
                    _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("Teleporting to self!");
                    TeleportPacket gXkgDctfNPN0Xyz8qvjQDIS73of3 = (TeleportPacket)Packet.CreatePacketFromType(PacketType.TELEPORT);
                    gXkgDctfNPN0Xyz8qvjQDIS73of3._ObjectId = _50w8wVuv8bL5nhKaR2EHxjrTamB._PlayerData._fn2CRnBpjyTWHR9K8SU4iOwhDtK;
                    _50w8wVuv8bL5nhKaR2EHxjrTamB.SendToServer(gXkgDctfNPN0Xyz8qvjQDIS73of3);
                    num = ((int)num2 * -247600723) ^ -171822290;
                    continue;
                }

                case 3u:
                    playerText._Send = false;
                    num = -852138602;
                    continue;

                case 6u:
                    array = playerText._Message.Split(' ');
                    if (array.Length != 0)
                    {
                        num = -225100984;
                        continue;
                    }
                    return;

                case 10u:
                    _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("Usage: /tp [partial or full player name]");
                    num = (int)(num2 * 215014787) ^ -718363310;
                    continue;

                default:
                {
                    using (Dictionary <int, PlayerData> .ValueCollection.Enumerator enumerator = _50w8wVuv8bL5nhKaR2EHxjrTamB._naDcMlPfaanTh6qrJ3cOuO4HNwz.Values.GetEnumerator())
                    {
                        while (true)
                        {
                            int num3;
                            int num4;
                            if (enumerator.MoveNext())
                            {
                                num3 = -383970670;
                                num4 = num3;
                            }
                            else
                            {
                                num3 = -74179290;
                                num4 = num3;
                            }
                            while (true)
                            {
                                switch ((num2 = (uint)num3 ^ 0xA67D4B79u) % 8u)
                                {
                                case 6u:
                                    num3 = -383970670;
                                    continue;

                                default:
                                    goto end_IL_026e;

                                case 3u:
                                    current = enumerator.Current;
                                    num3    = -222315011;
                                    continue;

                                case 0u:
                                    break;

                                case 5u:
                                {
                                    int num7;
                                    int num8;
                                    if (!current._WL2DOBxBuX9DARzf2KPoaJbgZiCb.ToLower().Contains(text))
                                    {
                                        num7 = -1300799904;
                                        num8 = num7;
                                    }
                                    else
                                    {
                                        num7 = -1187543807;
                                        num8 = num7;
                                    }
                                    num3 = num7 ^ ((int)num2 * -127224387);
                                    continue;
                                }

                                case 4u:
                                {
                                    int num5;
                                    int num6;
                                    if (current._NNgacHsIcOUlk6tnbwwxK7FDsff())
                                    {
                                        num5 = -2025665199;
                                        num6 = num5;
                                    }
                                    else
                                    {
                                        num5 = -1298686500;
                                        num6 = num5;
                                    }
                                    num3 = num5 ^ (int)(num2 * 1212507724);
                                    continue;
                                }

                                case 1u:
                                {
                                    _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("Teleporting to " + current._WL2DOBxBuX9DARzf2KPoaJbgZiCb + "!");
                                    TeleportPacket teleportPacket = (TeleportPacket)Packet.CreatePacketFromType(PacketType.TELEPORT);
                                    teleportPacket._ObjectId = current._fn2CRnBpjyTWHR9K8SU4iOwhDtK;
                                    _50w8wVuv8bL5nhKaR2EHxjrTamB.SendToServer(teleportPacket);
                                    num3 = (int)((num2 * 2016917650) ^ 0x3A7C32A1);
                                    continue;
                                }

                                case 2u:
                                    return;

                                case 7u:
                                    goto end_IL_026e;
                                }
                                break;
                            }
                        }
                        end_IL_026e :;
                    }
                    _50w8wVuv8bL5nhKaR2EHxjrTamB.SendInfoMessage("Player with the name similar to " + text + " not found!");
                    return;
                }
                }
                break;
            }
        }
    }
示例#32
0
 // Token: 0x06000520 RID: 1312 RVA: 0x0001E84C File Offset: 0x0001CA4C
 public void text(PlayerTextPacket playerText)
 {
     if (!string.IsNullOrEmpty(playerText.Text))
     {
         if (playerText.Text[0] == '/')
         {
             string[] array = playerText.Text.Split(new char[]
             {
                 ' '
             });
             if (array.Length != 0)
             {
                 if (array[0] == "/tp")
                 {
                     if (!Settings.Default.EnableTeleportToPlayerCommand || Settings.Default.FameBlockTeleports)
                     {
                         return;
                     }
                     playerText.Send = false;
                     if (array.Length == 1)
                     {
                         if (Settings.Default.EnableTeleportToSelf)
                         {
                             this.client.SendToClient("Teleporting to self!");
                             TeleportPacket teleportPacket = (TeleportPacket)Packet.Create(PacketType.TELEPORT);
                             teleportPacket.ObjectId = this.client.Player.ObjectId;
                             this.client.SendToServer(teleportPacket);
                             return;
                         }
                     }
                     if (array.Length == 2)
                     {
                         string text = array[1].ToLower();
                         foreach (GameObject gameObject in this.client.Players.Values)
                         {
                             if (!gameObject.isInvisible() && gameObject.Name.ToLower().Contains(text))
                             {
                                 this.client.SendToClient("Teleporting to " + gameObject.Name + "!");
                                 TeleportPacket teleportPacket = (TeleportPacket)Packet.Create(PacketType.TELEPORT);
                                 teleportPacket.ObjectId = gameObject.ObjectId;
                                 this.client.SendToServer(teleportPacket);
                                 return;
                             }
                         }
                         this.client.SendToClient("Player with the name similar to " + text + " not found!");
                         return;
                     }
                     this.client.SendToClient("Usage: /tp [partial or full player name]");
                     return;
                 }
                 else if (array[0] == "/tpq")
                 {
                     if (!Settings.Default.EnableTeleportToPlayerClosestToQuestCommand || Settings.Default.FameBlockTeleports)
                     {
                         return;
                     }
                     playerText.Send = false;
                     IEnumerable <GameObject> source = from enemy in this.client.Enemies.Values
                                                       where enemy.ObjectId == this._lastQuest
                                                       select enemy;
                     if (!source.Any <GameObject>())
                     {
                         this.client.SendToClient("Quest not found!");
                         return;
                     }
                     GameObject gameObject2 = null;
                     double     num         = 0.0;
                     GameObject gameObject3 = source.First <GameObject>();
                     foreach (GameObject gameObject4 in this.client.Players.Values)
                     {
                         if (gameObject4 != this.client.Player && !gameObject4.isInvisible() && (gameObject2 == null || gameObject4.ClientPosition.DistanceSquaredTo(gameObject3.ClientPosition) < num))
                         {
                             gameObject2 = gameObject4;
                             num         = gameObject4.ClientPosition.DistanceSquaredTo(gameObject3.ClientPosition);
                         }
                     }
                     if (gameObject2 == null)
                     {
                         this.client.SendToClient("No players found to teleport to!");
                         return;
                     }
                     this.client.SendToClient("Teleporting to " + gameObject2.Name + "!");
                     TeleportPacket teleportPacket2 = (TeleportPacket)Packet.Create(PacketType.TELEPORT);
                     teleportPacket2.ObjectId = gameObject2.ObjectId;
                     this.client.SendToServer(teleportPacket2);
                     return;
                 }
                 else if (array[0] == "/c" || array[0] == "/con" || array[0] == "/connect")
                 {
                     if (!Settings.Default.EnableConnectCommand)
                     {
                         return;
                     }
                     playerText.Send = false;
                     if (array.Length != 2)
                     {
                         this.client.SendToClient("Usage: /connect [server name]");
                     }
                     else
                     {
                         string text2;
                         if (!ServerParser.ServerAbbreviations.TryGetValue(array[1].ToLower(), out text2))
                         {
                             this.client.SendToClient("Unknown server!");
                             return;
                         }
                         ReconnectPacket reconnectPacket = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
                         reconnectPacket.GameId         = -2;
                         reconnectPacket.Host           = "127.0.0.1";
                         reconnectPacket.Port           = 2050;
                         reconnectPacket.isFromArena    = false;
                         reconnectPacket.Key            = new byte[0];
                         reconnectPacket.KeyTime        = -1;
                         reconnectPacket.Name           = text2 + " Nexus";
                         reconnectPacket.State          = string.Empty;
                         Settings.Default.CurrentServer = text2;
                         this.client.SendToClient("Connecting to: " + text2);
                         this.client.SendToClient(reconnectPacket);
                         return;
                     }
                 }
             }
             return;
         }
     }
 }
示例#33
0
        private void OnReconnect(Client client, ReconnectPacket packet)
        {
            if (packet.Host.Contains(".com"))
                packet.Host = Dns.GetHostEntry(packet.Host).AddressList[0].ToString();

            if (packet.Name.ToLower().Contains("nexusportal"))
            {
                ReconnectPacket recon = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
                recon.IsFromArena = false;
                recon.GameId = packet.GameId;
                recon.Host = packet.Host == "" ? client.State.ConTargetAddress : packet.Host;
                recon.Port = packet.Port == -1 ? client.State.ConTargetPort : packet.Port;
                recon.Key = packet.Key;
                recon.KeyTime = packet.KeyTime;
                recon.Name = packet.Name;
                client.State.LastRealm = recon;
            }
            else if (packet.Name != "" && !packet.Name.Contains("vault") && packet.GameId != -2)
            {
                ReconnectPacket drecon = (ReconnectPacket)Packet.Create(PacketType.RECONNECT);
                drecon.IsFromArena = false;
                drecon.GameId = packet.GameId;
                drecon.Host = packet.Host == "" ? client.State.ConTargetAddress : packet.Host;
                drecon.Port = packet.Port == -1 ? client.State.ConTargetPort : packet.Port;
                drecon.Key = packet.Key;
                drecon.KeyTime = packet.KeyTime;
                drecon.Name = packet.Name;
                client.State.LastDungeon = drecon;
            }

            if (packet.Port != -1)
                client.State.ConTargetPort = packet.Port;

            if (packet.Host != "")
                client.State.ConTargetAddress = packet.Host;

            if (packet.Key.Length != 0)
                client.State.ConRealKey = packet.Key;

            // Tell the client to connect to the proxy
            packet.Key = Encoding.UTF8.GetBytes(client.State.GUID);
            packet.Host = "localhost";
            packet.Port = 2050;
        }