예제 #1
0
        public ConfigManager(Server server)
        {
            if (server == null)
                throw new ArgumentNullException("server");

            _server = server;
            _scriptContext = new ScriptContext(_server);

            _scriptContext.ExecuteFile("config.lua");

            DataDirectory = GetString("datadir", "data/");
            MapLocation = GetString("map", "data/world/map.otbm");

            ServerName = GetString("servername", "SimpleOT");
            ServerLocation = GetString("location", "Brasil");
            ServerIp = GetString("ip", "127.0.0.1");

            WorldName = GetString("worldname", "OpenTibia");

            LoginPort = GetInteger("login_port", 7171);
            GamePort = GetInteger("game_port", 7172);
        }
예제 #2
0
 static void Main(string[] args)
 {
     try
     {
         Instance = new Server();
         Instance.Start();
     }
     catch (Exception e)
     {
         Logger.Fatal("Unable to start the server.", e);
     }
 }