Beispiel #1
0
        static Settings()
        {
            if (File.Exists(ConfigPath))
            {
                InIReader IReader = new InIReader(ConfigPath);

                //Paths
                DataPath  = IReader.ReadString("Paths", "DataPath", DataPath);
                MapPath   = IReader.ReadString("Paths", "MapPath", MapPath);
                SoundPath = IReader.ReadString("Paths", "SoundPath", SoundPath);

                //Graphics
                FullScreen = IReader.ReadBoolean("Graphics", "FullScreen", FullScreen);
                TopMost    = IReader.ReadBoolean("Graphics", "AlwaysOnTop", TopMost);

                //Network
                IPAddress = IReader.ReadString("Network", "IPAddress", IPAddress);
                Port      = IReader.ReadInt32("Network", "Port", Port);

                //Sound
                SoundOverLap = IReader.ReadInt32("Sound", "SoundOverLap", SoundOverLap);
                SoundOn      = IReader.ReadBoolean("Sound", "SoundOn", SoundOn);

                //Logs
                LogErrors = IReader.ReadBoolean("Logs", "LogErrors", LogErrors);
                LogChat   = IReader.ReadBoolean("Logs", "LogChat", LogChat);

                //Game Settings
                ShowItemNames = IReader.ReadBoolean("Game Settings", "ShowItemNames", ShowItemNames);
            }
            else
            {
                Save();
            }
        }
Beispiel #2
0
 public static void Load()
 {
     EnvirPath             = Reader.ReadString("Paths", "Envir", EnvirPath);
     MapPath               = Reader.ReadString("Paths", "Maps", MapPath);
     ExportPath            = Reader.ReadString("Paths", "Export", ExportPath);
     NPCPath               = Reader.ReadString("Paths", "NPCs", NPCPath);
     QuestPath             = Reader.ReadString("Paths", "Quests", QuestPath);
     DropPath              = Reader.ReadString("Paths", "Drops", DropPath);
     DatabaseVersion       = Reader.ReadInt32("Database", "Version", DatabaseVersion);
     CustomDatabaseVersion = Reader.ReadInt32("Database", "CustomVersion", CustomDatabaseVersion);
     ToolVersion           = Reader.ReadDouble("Tool", "CurrentVersion", ToolVersion);
     DatabasePath          = Reader.ReadString("Paths", "Database", DatabasePath);
     CredxGold             = Reader.ReadInt16("Config", "CreditXGold", CredxGold);
     LoadRandomItemStats();
     LoadMines();
 }
Beispiel #3
0
 public static void LoadTrackedQuests(string charName)
 {
     //Quests
     for (int i = 0; i < TrackedQuests.Length; i++)
     {
         TrackedQuests[i] = QuestTrackingReader.ReadInt32(charName, "Quest-" + i.ToString(), -1);
     }
 }
Beispiel #4
0
 public GuildBuffInfo(InIReader reader, int i)
 {
     Id                = reader.ReadInt32("Buff-" + i.ToString(), "Id", 0);
     Icon              = reader.ReadInt32("Buff-" + i.ToString(), "Icon", 0);
     name              = reader.ReadString("Buff-" + i.ToString(), "Name", "");
     LevelRequirement  = reader.ReadByte("Buff-" + i.ToString(), "LevelReq", 0);
     PointsRequirement = reader.ReadByte("Buff-" + i.ToString(), "PointsReq", 1);
     TimeLimit         = reader.ReadInt32("Buff-" + i.ToString(), "TimeLimit", 0);;
     ActivationCost    = reader.ReadInt32("Buff-" + i.ToString(), "ActivationCost", 0);
     BuffAc            = reader.ReadByte("Buff-" + i.ToString(), "BuffAc", 0);
     BuffMac           = reader.ReadByte("Buff-" + i.ToString(), "BuffMAC", 0);
     BuffDc            = reader.ReadByte("Buff-" + i.ToString(), "BuffDc", 0);
     BuffMc            = reader.ReadByte("Buff-" + i.ToString(), "BuffMc", 0);
     BuffSc            = reader.ReadByte("Buff-" + i.ToString(), "BuffSc", 0);
     BuffMaxHp         = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxHp", 0);
     BuffMaxMp         = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxMp", 0);
     BuffMineRate      = reader.ReadByte("Buff-" + i.ToString(), "BuffMineRate", 0);
     BuffGemRate       = reader.ReadByte("Buff-" + i.ToString(), "BuffGemRate", 0);
     BuffFishRate      = reader.ReadByte("Buff-" + i.ToString(), "BuffFishRate", 0);
     BuffExpRate       = reader.ReadByte("Buff-" + i.ToString(), "BuffExpRate", 0);
     BuffCraftRate     = reader.ReadByte("Buff-" + i.ToString(), "BuffCraftRate", 0);
     BuffSkillRate     = reader.ReadByte("Buff-" + i.ToString(), "BuffSkillRate", 0);
     BuffHpRegen       = reader.ReadByte("Buff-" + i.ToString(), "BuffHpRegen", 0);
     BuffMPRegen       = reader.ReadByte("Buff-" + i.ToString(), "BuffMpRegen", 0);
     BuffAttack        = reader.ReadByte("Buff-" + i.ToString(), "BuffAttack", 0);
     BuffDropRate      = reader.ReadByte("Buff-" + i.ToString(), "BuffDropRate", 0);
     BuffGoldRate      = reader.ReadByte("Buff-" + i.ToString(), "BuffGoldRate", 0);
 }
Beispiel #5
0
    public GuildBuffInfo(InIReader reader, int i)
    {
        Id                = reader.ReadInt32("Buff-" + i.ToString(), "Id", 0);
        Icon              = reader.ReadInt32("Buff-" + i.ToString(), "Icon", 0);
        name              = reader.ReadString("Buff-" + i.ToString(), "Name", "");
        LevelRequirement  = reader.ReadByte("Buff-" + i.ToString(), "LevelReq", 0);
        PointsRequirement = reader.ReadByte("Buff-" + i.ToString(), "PointsReq", 1);
        TimeLimit         = reader.ReadInt32("Buff-" + i.ToString(), "TimeLimit", 0);;
        ActivationCost    = reader.ReadInt32("Buff-" + i.ToString(), "ActivationCost", 0);

        Stats                           = new Stats();
        Stats[Stat.MaxAC]               = reader.ReadByte("Buff-" + i.ToString(), "BuffAc", 0);
        Stats[Stat.MaxMAC]              = reader.ReadByte("Buff-" + i.ToString(), "BuffMAC", 0);
        Stats[Stat.MaxDC]               = reader.ReadByte("Buff-" + i.ToString(), "BuffDc", 0);
        Stats[Stat.MaxMC]               = reader.ReadByte("Buff-" + i.ToString(), "BuffMc", 0);
        Stats[Stat.MaxSC]               = reader.ReadByte("Buff-" + i.ToString(), "BuffSc", 0);
        Stats[Stat.HP]                  = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxHp", 0);
        Stats[Stat.MP]                  = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxMp", 0);
        Stats[Stat.MineRatePercent]     = reader.ReadByte("Buff-" + i.ToString(), "BuffMineRate", 0);
        Stats[Stat.GemRatePercent]      = reader.ReadByte("Buff-" + i.ToString(), "BuffGemRate", 0);
        Stats[Stat.FishRatePercent]     = reader.ReadByte("Buff-" + i.ToString(), "BuffFishRate", 0);
        Stats[Stat.ExpRatePercent]      = reader.ReadByte("Buff-" + i.ToString(), "BuffExpRate", 0);
        Stats[Stat.CraftRatePercent]    = reader.ReadByte("Buff-" + i.ToString(), "BuffCraftRate", 0);
        Stats[Stat.SkillGainMultiplier] = reader.ReadByte("Buff-" + i.ToString(), "BuffSkillRate", 0);
        Stats[Stat.HealthRecovery]      = reader.ReadByte("Buff-" + i.ToString(), "BuffHpRegen", 0);
        Stats[Stat.SpellRecovery]       = reader.ReadByte("Buff-" + i.ToString(), "BuffMpRegen", 0);
        Stats[Stat.AttackBonus]         = reader.ReadByte("Buff-" + i.ToString(), "BuffAttack", 0);
        Stats[Stat.ItemDropRatePercent] = reader.ReadByte("Buff-" + i.ToString(), "BuffDropRate", 0);
        Stats[Stat.GoldDropRatePercent] = reader.ReadByte("Buff-" + i.ToString(), "BuffGoldRate", 0);
    }
Beispiel #6
0
        public static void LoadExperienceList()
        {
            if (!File.Exists(ExpListPath))
            {
                ExperienceList.Add(100);
            }
            else
            {
                int       Exp     = 100;
                InIReader IReader = new InIReader(ExpListPath);

                for (int I = 1; I <= 50; I++)
                {
                    Exp = IReader.ReadInt32("Exp", "Level" + I.ToString(), Exp);
                    ExperienceList.Add(Exp);
                }
            }
        }
Beispiel #7
0
        public static void ReadIni <T>(InIReader reader) where T : class, new()
        {
            Type objType = typeof(T);

            //取属性上的自定义特性
            foreach (FieldInfo fieldInfo in objType.GetFields())
            {
                object[] objAttrs = fieldInfo.GetCustomAttributes(typeof(IniAttribute), true);
                if (objAttrs.Length <= 0)
                {
                    continue;
                }

                IniAttribute attr = objAttrs[0] as IniAttribute;
                if (attr == null)
                {
                    continue;
                }

                if (Reader.FindValue(attr.Section, fieldInfo.Name) == null)
                {
                    continue;
                }

                if (fieldInfo.FieldType == typeof(bool))
                {
                    bool value = reader.ReadBoolean(attr.Section, fieldInfo.Name, false);
                    fieldInfo.SetValue(null, value);
                }
                else if (fieldInfo.FieldType == typeof(int))
                {
                    int value = reader.ReadInt32(attr.Section, fieldInfo.Name, 0);
                    fieldInfo.SetValue(null, value);
                }
                else if (fieldInfo.FieldType == typeof(string))
                {
                    string value = reader.ReadString(attr.Section, fieldInfo.Name, "");
                    fieldInfo.SetValue(null, value);
                }
            }
        }
Beispiel #8
0
 public GuildBuffInfo(InIReader reader, int i)
 {
     Id  = reader.ReadInt32("Buff-" + i.ToString(), "Id",0);
     Icon = reader.ReadInt32("Buff-" + i.ToString(), "Icon", 0);
     name = reader.ReadString("Buff-" + i.ToString(), "Name","");
     LevelRequirement = reader.ReadByte("Buff-" + i.ToString(), "LevelReq",0);
     PointsRequirement = reader.ReadByte("Buff-" + i.ToString(), "PointsReq",1);
     TimeLimit = reader.ReadInt32("Buff-" + i.ToString(), "TimeLimit",0);;
     ActivationCost = reader.ReadInt32("Buff-" + i.ToString(), "ActivationCost",0);
     BuffAc = reader.ReadByte("Buff-" + i.ToString(), "BuffAc",0);
     BuffMac = reader.ReadByte("Buff-" + i.ToString(), "BuffMAC",0);
     BuffDc = reader.ReadByte("Buff-" + i.ToString(), "BuffDc",0);
     BuffMc = reader.ReadByte("Buff-" + i.ToString(), "BuffMc",0);
     BuffSc = reader.ReadByte("Buff-" + i.ToString(), "BuffSc",0);
     BuffMaxHp = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxHp",0);
     BuffMaxMp = reader.ReadInt32("Buff-" + i.ToString(), "BuffMaxMp",0);
     BuffMineRate = reader.ReadByte("Buff-" + i.ToString(), "BuffMineRate",0);
     BuffGemRate = reader.ReadByte("Buff-" + i.ToString(), "BuffGemRate",0);
     BuffFishRate = reader.ReadByte("Buff-" + i.ToString(), "BuffFishRate",0);
     BuffExpRate = reader.ReadByte("Buff-" + i.ToString(), "BuffExpRate",0);
     BuffCraftRate = reader.ReadByte("Buff-" + i.ToString(), "BuffCraftRate",0);
     BuffSkillRate = reader.ReadByte("Buff-" + i.ToString(), "BuffSkillRate",0);
     BuffHpRegen = reader.ReadByte("Buff-" + i.ToString(), "BuffHpRegen",0);
     BuffMPRegen = reader.ReadByte("Buff-" + i.ToString(), "BuffMpRegen",0);
     BuffAttack = reader.ReadByte("Buff-" + i.ToString(), "BuffAttack",0);
     BuffDropRate = reader.ReadByte("Buff-" + i.ToString(), "BuffDropRate",0);
     BuffGoldRate = reader.ReadByte("Buff-" + i.ToString(), "BuffGoldRate",0);
 }
Beispiel #9
0
        public static void Load()
        {
            //Languahe
            GameLanguage.LoadClientLanguage(@".\Language.ini");

            if (!Directory.Exists(DataPath))
            {
                Directory.CreateDirectory(DataPath);
            }
            if (!Directory.Exists(MapPath))
            {
                Directory.CreateDirectory(MapPath);
            }
            if (!Directory.Exists(SoundPath))
            {
                Directory.CreateDirectory(SoundPath);
            }

            //Graphics
            FullScreen = Reader.ReadBoolean("Graphics", "FullScreen", FullScreen);
            Borderless = Reader.ReadBoolean("Graphics", "Borderless", Borderless);
            TopMost    = Reader.ReadBoolean("Graphics", "AlwaysOnTop", TopMost);
            FPSCap     = Reader.ReadBoolean("Graphics", "FPSCap", FPSCap);
            Resolution = Reader.ReadInt32("Graphics", "Resolution", Resolution);
            DebugMode  = Reader.ReadBoolean("Graphics", "DebugMode", DebugMode);

            //Network
            UseConfig = Reader.ReadBoolean("Network", "UseConfig", UseConfig);
            if (UseConfig)
            {
                IPAddress = Reader.ReadString("Network", "IPAddress", IPAddress);
                Port      = Reader.ReadInt32("Network", "Port", Port);
            }

            //Logs
            LogErrors = Reader.ReadBoolean("Logs", "LogErrors", LogErrors);
            LogChat   = Reader.ReadBoolean("Logs", "LogChat", LogChat);

            //Sound
            Volume       = Reader.ReadByte("Sound", "Volume", Volume);
            SoundOverLap = Reader.ReadInt32("Sound", "SoundOverLap", SoundOverLap);
            MusicVolume  = Reader.ReadByte("Sound", "Music", MusicVolume);

            //Game
            AccountID = Reader.ReadString("Game", "AccountID", AccountID);
            Password  = Reader.ReadString("Game", "Password", Password);

            SkillMode = Reader.ReadBoolean("Game", "SkillMode", SkillMode);
            SkillBar  = Reader.ReadBoolean("Game", "SkillBar", SkillBar);
            //SkillSet = Reader.ReadBoolean("Game", "SkillSet", SkillSet);
            Effect             = Reader.ReadBoolean("Game", "Effect", Effect);
            LevelEffect        = Reader.ReadBoolean("Game", "LevelEffect", Effect);
            DropView           = Reader.ReadBoolean("Game", "DropView", DropView);
            NameView           = Reader.ReadBoolean("Game", "NameView", NameView);
            HPView             = Reader.ReadBoolean("Game", "HPMPView", HPView);
            ModeView           = Reader.ReadBoolean("Game", "ModeView", ModeView);
            FontName           = Reader.ReadString("Game", "FontName", FontName);
            TransparentChat    = Reader.ReadBoolean("Game", "TransparentChat", TransparentChat);
            DisplayDamage      = Reader.ReadBoolean("Game", "DisplayDamage", DisplayDamage);
            TargetDead         = Reader.ReadBoolean("Game", "TargetDead", TargetDead);
            ExpandedBuffWindow = Reader.ReadBoolean("Game", "ExpandedBuffWindow", ExpandedBuffWindow);
            DuraView           = Reader.ReadBoolean("Game", "DuraWindow", DuraView);

            for (int i = 0; i < SkillbarLocation.Length / 2; i++)
            {
                SkillbarLocation[i, 0] = Reader.ReadInt32("Game", "Skillbar" + i.ToString() + "X", SkillbarLocation[i, 0]);
                SkillbarLocation[i, 1] = Reader.ReadInt32("Game", "Skillbar" + i.ToString() + "Y", SkillbarLocation[i, 1]);
            }

            //Chat
            ShowNormalChat  = Reader.ReadBoolean("Chat", "ShowNormalChat", ShowNormalChat);
            ShowYellChat    = Reader.ReadBoolean("Chat", "ShowYellChat", ShowYellChat);
            ShowWhisperChat = Reader.ReadBoolean("Chat", "ShowWhisperChat", ShowWhisperChat);
            ShowLoverChat   = Reader.ReadBoolean("Chat", "ShowLoverChat", ShowLoverChat);
            ShowMentorChat  = Reader.ReadBoolean("Chat", "ShowMentorChat", ShowMentorChat);
            ShowGroupChat   = Reader.ReadBoolean("Chat", "ShowGroupChat", ShowGroupChat);
            ShowGuildChat   = Reader.ReadBoolean("Chat", "ShowGuildChat", ShowGuildChat);

            //Filters
            FilterNormalChat  = Reader.ReadBoolean("Filter", "FilterNormalChat", FilterNormalChat);
            FilterWhisperChat = Reader.ReadBoolean("Filter", "FilterWhisperChat", FilterWhisperChat);
            FilterShoutChat   = Reader.ReadBoolean("Filter", "FilterShoutChat", FilterShoutChat);
            FilterSystemChat  = Reader.ReadBoolean("Filter", "FilterSystemChat", FilterSystemChat);
            FilterLoverChat   = Reader.ReadBoolean("Filter", "FilterLoverChat", FilterLoverChat);
            FilterMentorChat  = Reader.ReadBoolean("Filter", "FilterMentorChat", FilterMentorChat);
            FilterGroupChat   = Reader.ReadBoolean("Filter", "FilterGroupChat", FilterGroupChat);
            FilterGuildChat   = Reader.ReadBoolean("Filter", "FilterGuildChat", FilterGuildChat);

            //AutoPatcher
            P_Patcher        = Reader.ReadBoolean("Launcher", "Enabled", P_Patcher);
            P_Host           = Reader.ReadString("Launcher", "Host", P_Host);
            P_PatchFileName  = Reader.ReadString("Launcher", "PatchFile", P_PatchFileName);
            P_NeedLogin      = Reader.ReadBoolean("Launcher", "NeedLogin", P_NeedLogin);
            P_Login          = Reader.ReadString("Launcher", "Login", P_Login);
            P_Password       = Reader.ReadString("Launcher", "Password", P_Password);
            P_AutoStart      = Reader.ReadBoolean("Launcher", "AutoStart", P_AutoStart);
            P_ServerName     = Reader.ReadString("Launcher", "ServerName", P_ServerName);
            P_BrowserAddress = Reader.ReadString("Launcher", "Browser", P_BrowserAddress);

            if (!P_Host.EndsWith("/"))
            {
                P_Host += "/";
            }
            if (P_Host.StartsWith("www.", StringComparison.OrdinalIgnoreCase))
            {
                P_Host = P_Host.Insert(0, "http://");
            }
            if (P_BrowserAddress.StartsWith("www.", StringComparison.OrdinalIgnoreCase))
            {
                P_BrowserAddress = P_BrowserAddress.Insert(0, "http://");
            }
        }
Beispiel #10
0
        public static void Load()
        {
            if (!Directory.Exists(DataPath))
            {
                Directory.CreateDirectory(DataPath);
            }
            if (!Directory.Exists(MapPath))
            {
                Directory.CreateDirectory(MapPath);
            }
            if (!Directory.Exists(SoundPath))
            {
                Directory.CreateDirectory(SoundPath);
            }

            //Graphics
            FullScreen = Reader.ReadBoolean("Graphics", "FullScreen", FullScreen);
            TopMost    = Reader.ReadBoolean("Graphics", "AlwaysOnTop", TopMost);
            FPSCap     = Reader.ReadBoolean("Graphics", "FPSCap", FPSCap);
            Resolution = Reader.ReadInt32("Graphics", "Resolution", Resolution);
            DebugMode  = Reader.ReadBoolean("Graphics", "DebugMode", DebugMode);

            //Network
            UseConfig = Reader.ReadBoolean("Network", "UseConfig", UseConfig);
            if (UseConfig)
            {
                IPAddress = Reader.ReadString("Network", "IPAddress", IPAddress);

                /*
                 * if (IPAddress != "game.edens-elite.co.uk")
                 *  IPAddress = "game.edens-elite.co.uk";
                 */
                Port = Reader.ReadInt32("Network", "Port", Port);
            }

            //Logs
            LogErrors = Reader.ReadBoolean("Logs", "LogErrors", LogErrors);
            LogChat   = Reader.ReadBoolean("Logs", "LogChat", LogChat);

            //Sound
            Volume       = Reader.ReadByte("Sound", "Volume", Volume);
            SoundOverLap = Reader.ReadInt32("Sound", "SoundOverLap", SoundOverLap);
            MusicVolume  = Reader.ReadByte("Sound", "Music", MusicVolume);

            //Game
            AccountID = Reader.ReadString("Game", "AccountID", AccountID);
            Password  = Reader.ReadString("Game", "Password", Password);

            SkillMode       = Reader.ReadBoolean("Game", "SkillMode", SkillMode);
            SkillBar        = Reader.ReadBoolean("Game", "SkillBar", SkillBar);
            Effect          = Reader.ReadBoolean("Game", "Effect", Effect);
            LevelEffect     = Reader.ReadBoolean("Game", "LevelEffect", Effect);
            DropView        = Reader.ReadBoolean("Game", "DropView", DropView);
            NameView        = Reader.ReadBoolean("Game", "NameView", NameView);
            HPView          = Reader.ReadBoolean("Game", "HPMPView", HPView);
            FontName        = Reader.ReadString("Game", "FontName", FontName);
            TransparentChat = Reader.ReadBoolean("Game", "TransparentChat", TransparentChat);
            DisplayDamage   = Reader.ReadBoolean("Game", "DisplayDamage", DisplayDamage);
            TargetDead      = Reader.ReadBoolean("Game", "TargetDead", TargetDead);
            DuraView        = Reader.ReadBoolean("Game", "DuraWindow", DuraView);
            ServerTimeZone  = Reader.ReadString("Game", "ServerTimeZone", ServerTimeZone);
            MonsterName     = Reader.ReadBoolean("Game", "MonsterName", MonsterName); //Ice
            DropEffect      = Reader.ReadBoolean("Game", "DropEffect", DropEffect);   //Ice
            for (int i = 0; i < SkillbarLocation.Length / 2; i++)
            {
                SkillbarLocation[i, 0] = Reader.ReadInt32("Game", "Skillbar" + i.ToString() + "X", SkillbarLocation[i, 0]);
                SkillbarLocation[i, 1] = Reader.ReadInt32("Game", "Skillbar" + i.ToString() + "Y", SkillbarLocation[i, 1]);
            }

            //Chat
            ShowNormalChat  = Reader.ReadBoolean("Chat", "ShowNormalChat", ShowNormalChat);
            ShowYellChat    = Reader.ReadBoolean("Chat", "ShowYellChat", ShowYellChat);
            ShowWhisperChat = Reader.ReadBoolean("Chat", "ShowWhisperChat", ShowWhisperChat);
            ShowLoverChat   = Reader.ReadBoolean("Chat", "ShowLoverChat", ShowLoverChat);
            ShowMentorChat  = Reader.ReadBoolean("Chat", "ShowMentorChat", ShowMentorChat);
            ShowGroupChat   = Reader.ReadBoolean("Chat", "ShowGroupChat", ShowGroupChat);
            ShowGuildChat   = Reader.ReadBoolean("Chat", "ShowGuildChat", ShowGuildChat);

            //Filters
            FilterNormalChat  = Reader.ReadBoolean("Filter", "FilterNormalChat", FilterNormalChat);
            FilterWhisperChat = Reader.ReadBoolean("Filter", "FilterWhisperChat", FilterWhisperChat);
            FilterShoutChat   = Reader.ReadBoolean("Filter", "FilterShoutChat", FilterShoutChat);
            FilterSystemChat  = Reader.ReadBoolean("Filter", "FilterSystemChat", FilterSystemChat);
            FilterLoverChat   = Reader.ReadBoolean("Filter", "FilterLoverChat", FilterLoverChat);
            FilterMentorChat  = Reader.ReadBoolean("Filter", "FilterMentorChat", FilterMentorChat);
            FilterGroupChat   = Reader.ReadBoolean("Filter", "FilterGroupChat", FilterGroupChat);
            FilterGuildChat   = Reader.ReadBoolean("Filter", "FilterGuildChat", FilterGuildChat);

            //AutoPatcher
            P_Patcher        = Reader.ReadBoolean("Launcher", "Enabled", P_Patcher);
            P_Host           = Reader.ReadString("Launcher", "Host", P_Host);
            P_PatchFileName  = Reader.ReadString("Launcher", "PatchFile", P_PatchFileName);
            P_NeedLogin      = Reader.ReadBoolean("Launcher", "NeedLogin", P_NeedLogin);
            P_Login          = Reader.ReadString("Launcher", "Login", P_Login);
            P_Password       = Reader.ReadString("Launcher", "Password", P_Password);
            P_AutoStart      = Reader.ReadBoolean("Launcher", "AutoStart", P_AutoStart);
            P_ServerName     = Reader.ReadString("Launcher", "ServerName", P_ServerName);
            P_BrowserAddress = Reader.ReadString("Launcher", "Browser", P_BrowserAddress);


            if (C_WebLink.StartsWith("www.", StringComparison.OrdinalIgnoreCase))
            {
                C_WebLink = C_WebLink.Insert(0, "http://");
            }

            if (!P_Host.EndsWith("/"))
            {
                P_Host += "/";
            }
            if (P_Host.StartsWith("www.", StringComparison.OrdinalIgnoreCase))
            {
                P_Host = P_Host.Insert(0, "http://");
            }
            if (P_BrowserAddress.StartsWith("www.", StringComparison.OrdinalIgnoreCase))
            {
                P_BrowserAddress = P_BrowserAddress.Insert(0, "http://");
            }
            if (C_DonateLink.StartsWith("www.", StringComparison.OrdinalIgnoreCase))
            {
                C_DonateLink = C_DonateLink.Insert(0, "http://");
            }

            MissIndicator        = Reader.ReadBoolean("Custom", "MissIndicator", MissIndicator);
            DamageIndicator      = Reader.ReadBoolean("Custom", "DamageIndicator", DamageIndicator);
            MagicDamageIndicator = Reader.ReadBoolean("Custom", "MagicDamageIndicator", MagicDamageIndicator);
            CriticalIndicator    = Reader.ReadBoolean("Custom", "CriticalIndicator", CriticalIndicator);
            HealIndicator        = Reader.ReadBoolean("Custom", "HealIndicator", HealIndicator);
            ManaRecovIndicator   = Reader.ReadBoolean("Custom", "ManaRecovIndicator", ManaRecovIndicator);
            BossHPBar            = Reader.ReadBoolean("Custom", "BossHPBar", BossHPBar);
            MobLightEffect       = Reader.ReadBoolean("Custom", "MobLightEffect", MobLightEffect);
        }
Beispiel #11
0
		public static void LoadAwakeAttribute()
        {
            if (!File.Exists(ConfigPath + @".\AwakeningSystem.ini"))
            {
                return;
            }

            InIReader reader = new InIReader(ConfigPath + @".\AwakeningSystem.ini");
            Awake.AwakeSuccessRate = reader.ReadByte("Attribute", "SuccessRate", Awake.AwakeSuccessRate);
            Awake.AwakeHitRate = reader.ReadByte("Attribute", "HitRate", Awake.AwakeHitRate);
            Awake.MaxAwakeLevel = reader.ReadInt32("Attribute", "MaxUpgradeLevel", Awake.MaxAwakeLevel);
            Awake.Awake_WeaponRate = reader.ReadByte("IncreaseValue", "WeaponValue", Awake.Awake_WeaponRate);
            Awake.Awake_HelmetRate = reader.ReadByte("IncreaseValue", "HelmetValue", Awake.Awake_HelmetRate);
            Awake.Awake_ArmorRate = reader.ReadByte("IncreaseValue", "ArmorValue", Awake.Awake_ArmorRate);

            for (int i = 0; i < 4; i++)
            {
                Awake.AwakeChanceMax[i] = reader.ReadByte("Value", "ChanceMax_" + ((ItemGrade)(i + 1)).ToString(), Awake.AwakeChanceMax[i]);
            }

            for (int i = 0; i < (int)AwakeType.HPMP; i++)
            {
                List<byte>[] value = new List<byte>[2];

                for (int k = 0; k < 2; k++)
                {
                    value[k] = new List<byte>();
                }

                for (int j = 0; j < 4; j++)
                {
                    byte material1 = 1;
                    material1 = reader.ReadByte("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material1", material1);
                    byte material2 = 1;
                    material2 = reader.ReadByte("Materials_BaseValue", ((AwakeType)(i + 1)).ToString() + "_" + ((ItemGrade)(j + 1)).ToString() + "_Material2", material2);
                    value[0].Add(material1);
                    value[1].Add(material2);
                }

                Awake.AwakeMaterials.Add(value);
            }

            for (int c = 0; c < 4; c++)
            {
                Awake.AwakeMaterialRate[c] = reader.ReadFloat("Materials_IncreaseValue", "Materials_" + ((ItemGrade)(c + 1)).ToString(), Awake.AwakeMaterialRate[c]);
            }

        }
Beispiel #12
0
        public static void LoadGuildSettings()
        {
            if (!File.Exists(ConfigPath + @".\GuildSettings.ini"))
            {
                Guild_CreationCostList.Add(new ItemVolume(){Amount = 1000000});
                Guild_CreationCostList.Add(new ItemVolume(){ItemName = "WoomaHorn",Amount = 1});
                return;
            }
            InIReader reader = new InIReader(ConfigPath + @".\GuildSettings.ini");
            Guild_RequiredLevel = reader.ReadByte("Guilds", "MinimumLevel", Guild_RequiredLevel);
            Guild_ExpRate = reader.ReadFloat("Guilds", "ExpRate", Guild_ExpRate);
            Guild_PointPerLevel = reader.ReadByte("Guilds", "PointPerLevel", Guild_PointPerLevel);
            Guild_WarTime = reader.ReadInt64("Guilds", "WarTime", Guild_WarTime);
            Guild_WarCost = reader.ReadUInt32("Guilds", "WarCost", Guild_WarCost);

            int i = 0;
            while (reader.ReadUInt32("Required-" + i.ToString(),"Amount",0) != 0)
            {
                Guild_CreationCostList.Add(new ItemVolume()
                {
                    ItemName = reader.ReadString("Required-" + i.ToString(), "ItemName", ""),
                    Amount = reader.ReadUInt32("Required-" + i.ToString(), "Amount", 0)
                }
                );
                i++;
            }
            i = 0;
            while (reader.ReadInt64("Exp", "Level-" + i.ToString(), -1) != -1)
            {
                Guild_ExperienceList.Add(reader.ReadInt64("Exp", "Level-" + i.ToString(), 0));
                i++;
            }
            i = 0;
            while (reader.ReadInt32("Cap", "Level-" + i.ToString(), -1) != -1)
            {
                Guild_MembercapList.Add(reader.ReadInt32("Cap", "Level-" + i.ToString(), 0));
                i++;
            }
            byte TotalBuffs = reader.ReadByte("Guilds", "TotalBuffs", 0);
            for (i = 0; i < TotalBuffs; i++)
            {
                Guild_BuffList.Add(new GuildBuffInfo(reader, i));
            }



        }
Beispiel #13
0
 public static void LoadMarriage()
 {
     if (!File.Exists(ConfigPath + @".\MarriageSystem.ini"))
     {
         SaveMarriage();
         return;
     }
     InIReader reader = new InIReader(ConfigPath + @".\MarriageSystem.ini");
     LoverEXPBonus = reader.ReadInt32("Config", "EXPBonus", LoverEXPBonus);
     MarriageCooldown = reader.ReadInt32("Config", "MarriageCooldown", MarriageCooldown);
     WeddingRingRecall = reader.ReadBoolean("Config", "AllowLoverRecall", WeddingRingRecall);
     MarriageLevelRequired = reader.ReadInt32("Config", "MinimumLevel", MarriageLevelRequired);
     ReplaceWedRingCost = reader.ReadInt32("Config", "ReplaceRingCost", ReplaceWedRingCost);
 }
Beispiel #14
0
        public static void LoadRefine()
        {
            if (!File.Exists(ConfigPath + @".\RefineSystem.ini"))
            {
                SaveRefine();
                return;
            }

            InIReader reader = new InIReader(ConfigPath + @".\RefineSystem.ini");
            OnlyRefineWeapon = reader.ReadBoolean("Config", "OnlyRefineWeapon", OnlyRefineWeapon);
            RefineBaseChance = reader.ReadByte("Config", "BaseChance", RefineBaseChance);
            RefineTime = reader.ReadInt32("Config", "Time", RefineTime);
            RefineIncrease = reader.ReadByte("Config", "StatIncrease", RefineIncrease);
            RefineCritChance = reader.ReadByte("Config", "CritChance", RefineCritChance);
            RefineCritIncrease = reader.ReadByte("Config", "CritIncrease", RefineCritIncrease);
            RefineWepStatReduce = reader.ReadByte("Config", "WepStatReducedChance", RefineWepStatReduce);
            RefineItemStatReduce = reader.ReadByte("Config", "ItemStatReducedChance", RefineItemStatReduce);
            RefineCost = reader.ReadInt32("Config", "RefineCost", RefineCost);

            RefineOreName = reader.ReadString("Ore", "OreName", RefineOreName);
        }
Beispiel #15
0
        public static void LoadFishing()
        {
            if (!File.Exists(ConfigPath + @".\FishingSystem.ini"))
            {
                SaveFishing();
                return;
            }

            InIReader reader = new InIReader(ConfigPath + @".\FishingSystem.ini");
            FishingAttempts = reader.ReadInt32("Rates", "Attempts", FishingAttempts);
            FishingSuccessStart = reader.ReadInt32("Rates", "SuccessStart", FishingSuccessStart);
            FishingSuccessMultiplier = reader.ReadInt32("Rates", "SuccessMultiplier", FishingSuccessMultiplier);
            FishingDelay = reader.ReadInt64("Rates", "Delay", FishingDelay);
            FishingMobSpawnChance = reader.ReadInt32("Rates", "MonsterSpawnChance", FishingMobSpawnChance);
            FishingMonster = reader.ReadString("Game", "Monster", FishingMonster);
        }
Beispiel #16
0
        static Settings()
        {
            Main.EnqueueMessage("Loading Config file.");

            if (File.Exists(ConfigPath))
            {
                InIReader IReader = new InIReader(ConfigPath);

                //Path
                MapPath    = IReader.ReadString("Path", "MapPath", MapPath);
                LogPath    = IReader.ReadString("Path", "LogPath", LogPath);
                ClientPath = IReader.ReadString("Path", "ClientPath", ClientPath);

                //Database
                SQLServer   = IReader.ReadString("Database", "SQLServer", SQLServer);
                SQLDatabase = IReader.ReadString("Database", "SQLDatabase", SQLDatabase);
                SQLUserID   = IReader.ReadString("Database", "SQLUserID", SQLUserID);
                SQLPassword = IReader.ReadString("Database", "SQLPassword", SQLPassword);

                //Network
                IPAddress = IReader.ReadString("Network", "IPAddress", IPAddress);
                Port      = IReader.ReadInt32("Network", "Port", Port);
                TimeOut   = IReader.ReadInt64("Network", "TimeOut", TimeOut);
                MaxUser   = IReader.ReadInt32("Network", "MaxUser", MaxUser);
                ReLogTime = IReader.ReadDouble("Network", "ReLogTime", ReLogTime);

                //Security
                CheckVersion = IReader.ReadBoolean("Security", "CheckVersion", CheckVersion);

                //Permission
                AllowNewAccount      = IReader.ReadBoolean("Permission", "AllowNewAccount", AllowNewAccount);
                AllowChangePassword  = IReader.ReadBoolean("Permission", "AllowChangePassword", AllowChangePassword);
                AllowLogin           = IReader.ReadBoolean("Permission", "AllowLogin", AllowLogin);
                AllowNewCharacter    = IReader.ReadBoolean("Permission", "AllowNewCharacter", AllowNewCharacter);
                AllowDeleteCharacter = IReader.ReadBoolean("Permission", "AllowDeleteCharacter", AllowDeleteCharacter);
                AllowStartGame       = IReader.ReadBoolean("Permission", "AllowStartGame", AllowStartGame);

                //Game
                DropRange     = IReader.ReadInt32("Game", "DropRange", DropRange);
                DropStackSize = IReader.ReadInt32("Game", "DropStackSize", DropStackSize);
                ItemTimeOut   = IReader.ReadInt32("Game", "ItemTimeOut", ItemTimeOut);

                ExpRate  = IReader.ReadSingle("Game", "ExpRate", ExpRate);
                DropRate = IReader.ReadSingle("Game", "DropRate", DropRate);

                StartLevel = IReader.ReadByte("Game", "StartLevel", StartLevel);
                StartGold  = IReader.ReadInt64("Game", "StartGold", StartGold);

                if (ExpRate <= 0)
                {
                    ExpRate = 1;
                }
                if (StartLevel <= 0)
                {
                    StartLevel = 1;
                }

                Main.EnqueueMessage("Config file loaded.");
            }
            else
            {
                Main.EnqueueMessage("Config file not found, creating Config file.");
                Save();
            }
            LoadVersion();
            LoadExperienceList();
        }
Beispiel #17
0
        public static void Load()
        {
            if (!Directory.Exists(DataPath))
            {
                Directory.CreateDirectory(DataPath);
            }
            if (!Directory.Exists(MapPath))
            {
                Directory.CreateDirectory(MapPath);
            }
            if (!Directory.Exists(SoundPath))
            {
                Directory.CreateDirectory(SoundPath);
            }

            //Graphics
            FullScreen     = Reader.ReadBoolean("Graphics", "FullScreen", FullScreen);
            TopMost        = Reader.ReadBoolean("Graphics", "AlwaysOnTop", TopMost);
            FPSCap         = Reader.ReadBoolean("Graphics", "FPSCap", FPSCap);
            HighResolution = Reader.ReadBoolean("Graphics", "HighResolution", HighResolution);
            DebugMode      = Reader.ReadBoolean("Graphics", "DebugMode", DebugMode);

            //Network
            UseConfig = Reader.ReadBoolean("Network", "UseConfig", UseConfig);
            if (UseConfig)
            {
                IPAddress = Reader.ReadString("Network", "IPAddress", IPAddress);
                Port      = Reader.ReadInt32("Network", "Port", Port);
            }

            //Logs
            LogErrors = Reader.ReadBoolean("Logs", "LogErrors", LogErrors);
            LogChat   = Reader.ReadBoolean("Logs", "LogChat", LogChat);

            //Sound
            Volume       = Reader.ReadByte("Sound", "Volume", Volume);
            SoundOverLap = Reader.ReadInt32("Sound", "SoundOverLap", SoundOverLap);

            //Game
            AccountID = Reader.ReadString("Game", "AccountID", AccountID);
            Password  = Reader.ReadString("Game", "Password", Password);

            SkillMode       = Reader.ReadBoolean("Game", "SkillMode", SkillMode);
            SkillBar        = Reader.ReadBoolean("Game", "SkillBar", SkillBar);
            SkillSet        = Reader.ReadBoolean("Game", "SkillSet", SkillSet);
            Effect          = Reader.ReadBoolean("Game", "Effect", Effect);
            LevelEffect     = Reader.ReadBoolean("Game", "LevelEffect", Effect);
            DropView        = Reader.ReadBoolean("Game", "DropView", DropView);
            NameView        = Reader.ReadBoolean("Game", "NameView", NameView);
            HPView          = Reader.ReadBoolean("Game", "HPMPView", HPView);
            FontName        = Reader.ReadString("Game", "FontName", FontName);
            TransparentChat = Reader.ReadBoolean("Game", "TransparentChat", TransparentChat);

            //Chat
            ShowNormalChat  = Reader.ReadBoolean("Chat", "ShowNormalChat", ShowNormalChat);
            ShowYellChat    = Reader.ReadBoolean("Chat", "ShowYellChat", ShowYellChat);
            ShowWhisperChat = Reader.ReadBoolean("Chat", "ShowWhisperChat", ShowWhisperChat);
            ShowLoverChat   = Reader.ReadBoolean("Chat", "ShowLoverChat", ShowLoverChat);
            ShowMentorChat  = Reader.ReadBoolean("Chat", "ShowMentorChat", ShowMentorChat);
            ShowGroupChat   = Reader.ReadBoolean("Chat", "ShowGroupChat", ShowGroupChat);
            ShowGuildChat   = Reader.ReadBoolean("Chat", "ShowGuildChat", ShowGuildChat);

            //Filters
            FilterNormalChat  = Reader.ReadBoolean("Filter", "FilterNormalChat", FilterNormalChat);
            FilterWhisperChat = Reader.ReadBoolean("Filter", "FilterWhisperChat", FilterWhisperChat);
            FilterShoutChat   = Reader.ReadBoolean("Filter", "FilterShoutChat", FilterShoutChat);
            FilterSystemChat  = Reader.ReadBoolean("Filter", "FilterSystemChat", FilterSystemChat);
            FilterLoverChat   = Reader.ReadBoolean("Filter", "FilterLoverChat", FilterLoverChat);
            FilterMentorChat  = Reader.ReadBoolean("Filter", "FilterMentorChat", FilterMentorChat);
            FilterGroupChat   = Reader.ReadBoolean("Filter", "FilterGroupChat", FilterGroupChat);
            FilterGuildChat   = Reader.ReadBoolean("Filter", "FilterGuildChat", FilterGuildChat);
        }
Beispiel #18
0
        public CustomAI LoadCustomAI(string mobName)
        {
            if (mobName.Length <= 0) return null;
            try
            {
                InIReader Reader = new InIReader(@".\Custom\Unique AIs\" + mobName + ".ini");
                CustomAI mobAI = new CustomAI();
                mobAI.Name = mobName;

                #region Loading the Bools
                mobAI.SetXY = Reader.ReadBoolean("Bools", "SetXY", mobAI.SetXY);
                mobAI.MapSpecific = Reader.ReadBoolean("Bools", "MapSpecific", mobAI.MapSpecific);
                mobAI.AnnounceSpawn = Reader.ReadBoolean("Bools", "AnnounceSpawn", mobAI.AnnounceSpawn);
                mobAI.AnnounceDrop = Reader.ReadBoolean("Bools", "AnnounceDrop", mobAI.AnnounceDrop);
                mobAI.AnnounceDeath = Reader.ReadBoolean("Bools", "AnnounceDeath", mobAI.AnnounceDeath);
                mobAI.UseMassAttack = Reader.ReadBoolean("Bools", "UseMassAttack", mobAI.UseMassAttack);
                mobAI.UseSpecialAttack = Reader.ReadBoolean("Bools", "UseSpecialAttack", mobAI.UseSpecialAttack);
                mobAI.UseMeleeAttack = Reader.ReadBoolean("Bools", "UseMeleeAttack", mobAI.UseMeleeAttack);
                mobAI.UseRangeAttack = Reader.ReadBoolean("Bools", "UseRangeAttack", mobAI.UseRangeAttack);
                mobAI.UseMagicAttack = Reader.ReadBoolean("Bools", "UseMagicAttack", mobAI.UseMagicAttack);
                mobAI.Target = Reader.ReadBoolean("Bools", "Target", mobAI.Target);
                mobAI.UseKillTimer = Reader.ReadBoolean("Bools", "UseKillTimer", mobAI.UseKillTimer);
                mobAI.IgnorePets = Reader.ReadBoolean("Bools", "IgnorePets", mobAI.IgnorePets);
                mobAI.DamagePetsMore = Reader.ReadBoolean("Bools", "DamagePetsMore", mobAI.DamagePetsMore);
                mobAI.CanPara = Reader.ReadBoolean("Bools", "CanPara", mobAI.CanPara);
                mobAI.CanGreen = Reader.ReadBoolean("Bools", "CanGreen", mobAI.CanGreen);
                mobAI.CanRed = Reader.ReadBoolean("Bools", "CanRed", mobAI.CanRed);
                mobAI.Spawn_Slaves = Reader.ReadBoolean("Bools", "SpawnSlaves", mobAI.Spawn_Slaves);
                #endregion

                #region Loading the Kill Timer
                if (mobAI.UseKillTimer)
                {
                    mobAI.KillTimer = Reader.ReadString("Strings", "KillTimer", mobAI.KillTimer);
                    if (mobAI.killTimer.Length > 0)
                    {
                        string[] timeString = mobAI.KillTimer.Split(' ');
                        string[] dateString = timeString[0].Split('-');
                        dateString[0] = dateString[0].Replace("(", "");
                        mobAI.LastKillDay = Convert.ToInt32(dateString[0]);
                        mobAI.LastKillMonth = Convert.ToInt32(dateString[1]);
                        mobAI.LastKillYear = Convert.ToInt32(dateString[2]);
                        dateString[1] = dateString[1].Replace("(", "");
                        dateString[1] = dateString[1].Replace(")", "");
                        string[] tempString = timeString[1].Split(':');
                        if (tempString[0].Contains("("))
                            tempString[0] = tempString[0].Replace("(", "");
                        if (tempString[1].Contains(")"))
                            tempString[1] = tempString[1].Replace(")", "");
                        mobAI.LastKillHour = Convert.ToInt32(tempString[0]);
                        mobAI.LastKillMinute = Convert.ToInt32(tempString[1]);
                    }
                    mobAI.RespawnDay = Reader.ReadInt32("Ints", "RespawnDays", mobAI.RespawnDay);
                    mobAI.RespawnMonth = Reader.ReadInt32("Ints", "RespawnMonths", mobAI.RespawnMonth);
                    mobAI.RespawnYear = Reader.ReadInt32("Ints", "RespawnYears", mobAI.RespawnYear);
                    mobAI.RespawnHour = Reader.ReadInt32("Ints", "RespawnHours", mobAI.RespawnHour);
                    mobAI.RespawnMinute = Reader.ReadInt32("Ints", "RespawnMinutes", mobAI.RespawnMinute);
                }
                #endregion

                if (mobAI.MapSpecific)
                    mobAI.MapName = Reader.ReadString("Strings", "MapName", mobAI.MapName);

                #region Loading the announcers
                if (mobAI.AnnounceSpawn)
                    mobAI.SpawnMessage = Reader.ReadString("Strings", "SpawnMessage", mobAI.SpawnMessage);

                if (mobAI.AnnounceDeath)
                    mobAI.DeadMessage = Reader.ReadString("Strings", "DeathMessage", mobAI.DeadMessage);

                if (mobAI.AnnounceDrop)
                    mobAI.ItemMessage = Reader.ReadString("Strings", "ItemMessage", mobAI.ItemMessage);
                #endregion

                if (SetXY)
                {
                    mobAI.MapX = Reader.ReadInt32("Ints", "MapX", mobAI.MapX);
                    mobAI.MapY = Reader.ReadInt32("Ints", "MapY", mobAI.MapY);
                }
                #region Loading the Attacks
                if (mobAI.UseMassAttack)
                {
                    mobAI.MassAttackEffect = Reader.ReadInt32("Ints", "MassAttackEffect", mobAI.MassAttackEffect);
                    mobAI.MassAttackDamage = Reader.ReadInt32("Damage", "MassAttackDamage", mobAI.MassAttackDamage);
                }
                if (mobAI.UseSpecialAttack)
                {
                    mobAI.SpecialAttackEffect = Reader.ReadInt32("Ints", "SpecialAttackEffect", mobAI.SpecialAttackEffect);
                    mobAI.SpecialAttackDamage = Reader.ReadInt32("Damage", "SpecialAttackDamage", mobAI.SpecialAttackDamage);
                }
                if (mobAI.UseMeleeAttack)
                {
                    mobAI.MeleeAttackEffect = Reader.ReadInt32("Ints", "MeleeAttackEffect", mobAI.MeleeAttackEffect);
                    mobAI.MeleeAttackDamage = Reader.ReadInt32("Damage", "MeleeAttackDamage", mobAI.MeleeAttackDamage);
                }
                if (mobAI.UseRangeAttack)
                {
                    mobAI.RangeAttackEffect = Reader.ReadInt32("Ints", "RangeAttackEffect", mobAI.RangeAttackEffect);
                    mobAI.RangeAttackDamage = Reader.ReadInt32("Damage", "RangeAttackDamage", mobAI.RangeAttackDamage);
                }
                if (mobAI.UseMagicAttack)
                {
                    mobAI.MagicAttackEffect = Reader.ReadInt32("Ints", "MagicAttackEffect", mobAI.MagicAttackEffect);
                    mobAI.MagicAttackDamage = Reader.ReadInt32("Damage", "MagicAttackDamage", mobAI.MagicAttackDamage);
                }
                if (mobAI.Target)
                {
                    mobAI.TargetClass = Reader.ReadInt32("Strings", "TargetClass", mobAI.TargetClass); //Default = Warrior
                    mobAI.TargetedClass = (MirClass)mobAI.TargetClass;
                    mobAI.TargetAttackDamage = Reader.ReadInt32("Damage", "TargetDamage", mobAI.TargetAttackDamage);
                }
                if (mobAI.DamagePetsMore)
                    mobAI.PetAttackDamage = Reader.ReadInt32("Damage", "PetDamage", mobAI.PetAttackDamage);
                #endregion

                #region Loading the Slaves Spawns
                if (mobAI.Spawn_Slaves)
                {
                    for (int i = 0; i < 4; i++)
                    {
                        SpawnSlaves monsters = new SpawnSlaves();
                        monsters.Name = Reader.ReadString("Slaves", "Slave" + i, monsters.Name);
                        monsters.Count = Reader.ReadInt32("Slaves", "SlaveCount" + i, monsters.Count);
                        mobAI.Slaves.Add(monsters);
                    }
                }
                #endregion

                #region Loading the Item Drops
                mobAI.ItemCount = Reader.ReadInt32("Ints", "ItemCount", mobAI.ItemCount);
                if (mobAI.ItemCount > 0)
                {
                    for (int i = 0; i < mobAI.ItemCount; i++)
                    {
                        DropItemsWithAnnounce items = new DropItemsWithAnnounce();
                        items.Name = Reader.ReadString("Items", "Item" + i, items.Name);
                        items.Chance = Reader.ReadInt32("Items", "ItemChance" + i, items.Chance);
                        mobAI.Drops.Add(items);
                    }
                }
                #endregion

                #region Loading the current location
                mobAI.CurrentMap = Reader.ReadString("States", "CurrentMap", CurrentMap);
                mobAI.CurrentX = Reader.ReadInt32("States", "CurrentX", CurrentX);
                mobAI.CurrentY = Reader.ReadInt32("States", "CurrentY", CurrentY);

                #endregion

                return mobAI;
            }
            catch
            {
                SMain.Enqueue("Error with loading config");
                return null;
            }

        }