Exemple #1
0
        static void Main(string[] args)
        {
            UOProxy.UOProxy proxy = new UOProxy.UOProxy();
            proxy.StartListeningForClient(2593);
            //proxy.EventUpdatePlayer += new UOProxy.UOProxy.UpdatePlayerEventHandler(proxy_EventUpdatePlayer);
               // proxy._0x1AObjectInfo +=new UOProxy.UOProxy.ObjectInfoEventHandler(proxy_EventObjectInfo);
               // proxy._0x8CConnectToGameServer += new UOProxy.UOProxy.ConnectToGameServerEventHandler(proxy__0x8CConnectToGameServer);
            proxy._0xB0SendGumpMenuDialog += new UOProxy.UOProxy.SendGumpMenuDialogEventHandler(proxy__0xB0SendGumpMenuDialog);
               // proxy._0x77UpdatePlayer += new UOProxy.UOProxy.UpdatePlayerEventHandler(proxy__0x77UpdatePlayer);
            proxy._0xB1GumpMenuSelection += new UOProxy.UOProxy.GumpMenuSelectionEventHandler(proxy__0xB1GumpMenuSelection);
            proxy._0x03TalkRequest += Proxy__0x03TalkRequest;
            while (true)
            {
                Thread.Sleep(5);
                if (UOProxy.Logger.MsgLog.Count >= 1)
                {
                    lock (UOProxy.Logger.MsgLog)
                    {
                        foreach (string s in UOProxy.Logger.MsgLog)
                        {
                            Console.WriteLine(s);
                        }
                        UOProxy.Logger.MsgLog.Clear();
                    }

                }
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            UOProxy.UOProxy proxy = new UOProxy.UOProxy();
            proxy.StartListeningForClient(2593);
            //proxy.EventUpdatePlayer += new UOProxy.UOProxy.UpdatePlayerEventHandler(proxy_EventUpdatePlayer);
            proxy._0x1AObjectInfo +=new UOProxy.UOProxy.ObjectInfoEventHandler(proxy_EventObjectInfo);
            proxy._0x8CConnectToGameServer += new UOProxy.UOProxy.ConnectToGameServerEventHandler(proxy__0x8CConnectToGameServer);
            proxy._0xB0SendGumpMenuDialog += new UOProxy.UOProxy.SendGumpMenuDialogEventHandler(proxy__0xB0SendGumpMenuDialog);
            proxy._0x77UpdatePlayer += new UOProxy.UOProxy.UpdatePlayerEventHandler(proxy__0x77UpdatePlayer);
            proxy.Client_0xB1GumpMenuSelection += new UOProxy.UOProxy.GumpMenuSelectionEventHandler(proxy__0xB1GumpMenuSelection);
            proxy._0xDDCompressedGump += proxy__0xDDCompressedGump;
            proxy.Client_0x80LoginRequest += proxy_Client_0x80LoginRequest;
            int oldcnt = 0;
            while (true)
            {
                Thread.Sleep(5);
                if (Console.KeyAvailable)
                {
                    var key = Console.ReadKey(false);
                    if (key.Key == ConsoleKey.Escape)
                        break;
                }
                if (UOProxy.Logger.MsgLog.Count > oldcnt)
                {
                    lock (UOProxy.Logger.MsgLog)
                    {
                        for(int i = oldcnt;i < UOProxy.Logger.MsgLog.Count;i++)
                        {
                            Console.WriteLine(UOProxy.Logger.MsgLog[i]);
                        }
                        oldcnt = UOProxy.Logger.MsgLog.Count;

                    }

                }
            }
            UOProxy.Logger.SaveLog();
        }