예제 #1
0
파일: Program.cs 프로젝트: harleyknd1/rAPB
        static void Main(string[] args)
        {
            Log.Info("DistrictServer", "Starting...");

            #region District

            if (!EasyServer.InitLog("World", "Configs/DistrictLog.conf") || !EasyServer.InitConfig("Configs/District.xml", "District")) return;
            switch (EasyServer.GetConfValue<String>("District", "District", "Type"))
            {
                default:
                case "social":
                    Type = 1;
                    break;
                case "financial":
                    Type = 2;
                    break;
                case "waterfront":
                    Type = 21;
                    break;
                case "tutorial":
                    Type = 14;
                    break;
            }

            switch (EasyServer.GetConfValue<String>("District", "District", "Language"))
            {
                default:
                case "en":
                    Language = 0;
                    break;
                case "fr":
                    Language = 1;
                    break;
                case "it":
                    Language = 2;
                    break;
                case "ge":
                    Language = 3;
                    break;
                case "es":
                    Language = 4;
                    break;
                case "ru":
                    Language = 5;
                    break;
            }

            if ((Type == 21 || Type == 2) && EasyServer.GetConfValue<Boolean>("District", "District", "Hardcore")) Type += 6;

            #endregion

            Log.Info("World.Client", "Connecting to world at 192.168.1.253:2108...");
            Password = "******";
            ID = EasyServer.GetConfValue<Byte>("District", "District", "Id");
            IP = GetPublicIP();
            if (IP == null) { System.Threading.Thread.Sleep(500); Environment.Exit(2); }
            World = new World.Client("192.168.1.253", 2108);
            EasyServer.StartConsole();
        }
예제 #2
0
파일: Program.cs 프로젝트: fiki574/rAPB
        static void Main(string[] args)
        {
            Log.Info("DistrictServer", "Starting...");

            #region District

            if (!EasyServer.InitLog("World", "Configs/Logs.conf") || !EasyServer.InitConfig("Configs/District.xml", "District")) return;
            switch (EasyServer.GetConfValue<String>("District", "District", "Type"))
            {
                case "social":
                    Type = 1;
                    break;
                case "financial":
                    Type = 2;
                    break;
                case "waterfront":
                    Type = 21;
                    break;
                case "tutorial":
                    Type = 14;
                    break;
            }

            switch (EasyServer.GetConfValue<String>("District", "District", "Language"))
            {
                case "en":
                    Language = 0;
                    break;
                case "fr":
                    Language = 1;
                    break;
                case "it":
                    Language = 2;
                    break;
                case "ge":
                    Language = 3;
                    break;
                case "es":
                    Language = 4;
                    break;
                case "ru":
                    Language = 5;
                    break;
            }

            if ((Type == 21 || Type == 2) && EasyServer.GetConfValue<Boolean>("District", "District", "Hardcore")) Type += 6;

            #endregion

            Log.Info("World.Client", "Connecting to world at 127.0.0.1:2108...");
            Password = "******";
            ID = EasyServer.GetConfValue<Byte>("District", "District", "Id");
            Port = EasyServer.GetConfValue<String>("District", "District", "Port");
            IP = GetPublicIP();
            try
            {
                string line = null;
                System.IO.StreamReader file = new System.IO.StreamReader("Configs\\Client stuff (put into 'Binaries' folder)\\_rtoken.id");
                while ((line = file.ReadLine()) != null) Token = line;
                file.Close();
            }
            catch (FileNotFoundException)
            {
                Log.Error("Token", "\"_rtoken.id\" file not found!");
                return;
            }
            if (IP == null) return;
            World = new World.Client("127.0.0.1", 2108);
            listener = new Listener(Convert.ToInt32(Port));
            EasyServer.StartConsole();
        }
예제 #3
0
        static void Main(string[] args)
        {
            Log.Info("DistrictServer", "Starting...");

            #region District

            if (!EasyServer.InitLog("World", "Configs/Logs.conf") || !EasyServer.InitConfig("Configs/District.xml", "District"))
            {
                return;
            }
            switch (EasyServer.GetConfValue <string>("District", "District", "Type"))
            {
            case "social":
                Type = 1;
                break;

            case "financial":
                Type = 2;
                break;

            case "waterfront":
                Type = 21;
                break;

            case "tutorial":
                Type = 14;
                break;
            }

            switch (EasyServer.GetConfValue <string>("District", "District", "Language"))
            {
            case "en":
                Language = 0;
                break;

            case "fr":
                Language = 1;
                break;

            case "it":
                Language = 2;
                break;

            case "ge":
                Language = 3;
                break;

            case "es":
                Language = 4;
                break;

            case "ru":
                Language = 5;
                break;
            }

            if ((Type == 21 || Type == 2) && EasyServer.GetConfValue <bool>("District", "District", "Hardcore"))
            {
                Type += 6;
            }

            #endregion

            Log.Info("World.Client", "Connecting to world at 127.0.0.1:2108...");
            Password = "******";
            ID       = EasyServer.GetConfValue <byte>("District", "District", "Id");
            Port     = EasyServer.GetConfValue <string>("District", "District", "Port");
            IP       = GetPublicIP();
            try
            {
                string       line = null;
                StreamReader file = new StreamReader("Configs\\token.id");
                while ((line = file.ReadLine()) != null)
                {
                    Token = line;
                }
                file.Close();
            }
            catch (FileNotFoundException)
            {
                Log.Error("Token", "\"_rtoken.id\" file not found!");
                return;
            }
            if (IP == null)
            {
                return;
            }
            World    = new World.Client("127.0.0.1", 2108);
            listener = new Listener(Convert.ToInt32(Port));
            EasyServer.StartConsole();
        }