Beispiel #1
0
        public static void LoadSettings()
        {
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;
            string ourDirectory            = executableDirectoryName;
            var    pIniManager             = new IniManager(ourDirectory + SettingsName);

            LoadedBeharvior = pIniManager.GetString("Config", "LoadedBeharvior", String.Empty);
            AvoidAddsCombat = pIniManager.GetBoolean("Config", "AvoidAddsCombat", false);
            SkipAddsDis     = pIniManager.GetInt("Config", "SkipAddsDis", 0);
            AllowScripts    = pIniManager.GetBoolean("Config", "AllowScripts", false);
        }
Beispiel #2
0
        public static void LoadSettings()
        {
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            OurDirectory = executableDirectoryName;
            var pIniManager = new IniManager(OurDirectory + SettingsName);

            try
            {
                if (!string.IsNullOrEmpty(pIniManager.GetString("Relog", "AccoutnName", string.Empty)))
                {
                    AccountName = Encryptor.Decrypt(pIniManager.GetString("Relog", "AccoutnName", string.Empty));
                }
                else
                {
                    AccountName = string.Empty;
                }
                if (!string.IsNullOrEmpty(pIniManager.GetString("Relog", "AccoutnPW", string.Empty)))
                {
                    AccountPw = Encryptor.Decrypt(pIniManager.GetString("Relog", "AccoutnPW", string.Empty));
                }
                else
                {
                    AccountPw = string.Empty;
                }
                ReloggingEnabled         = pIniManager.GetBoolean("Relog", "EnableRelogging", false);
                PeriodicReloggingEnabled = pIniManager.GetBoolean("Relog", "EnablePeriodicRelogging", false);
                PeriodicLogOut           = pIniManager.GetInt("Relog", "PeriodicLogOut", 60);
                PeriodicLogIn            = pIniManager.GetInt("Relog", "PeriodicLogIn", 30);
                AccountAccount           = pIniManager.GetInt("Relog", "AccountAccount", 1);
                CharacterName            = pIniManager.GetString("Relog", "CharacterName", string.Empty);
            }
            catch (Exception)
            {
                Logging.Debug("Could not load relogger settings. All relogger values have been reset.");
                AccountName              = "";
                AccountPw                = "";
                ReloggingEnabled         = false;
                PeriodicReloggingEnabled = false;
                PeriodicLogIn            = 30;
                PeriodicLogOut           = 60;
                AccountAccount           = 1;
            }
        }
Beispiel #3
0
 private static bool LoadPluginSettings(string name)
 {
     try
     {
         var pIniManager = new IniManager(LazyForms.OurDirectory + "\\Settings\\lazy_plugins.ini");
         return(pIniManager.GetBoolean("Plugins", name, false));
     }
     catch
     {
     }
     return(false);
 }
Beispiel #4
0
        public static void LoadSettings()
        {
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            OurDirectory = executableDirectoryName;
            var pIniManager = new IniManager(OurDirectory + SettingsName);

            LureBar = pIniManager.GetString("Fishing", "LureBar", "1");
            LureKey = pIniManager.GetString("Fishing", "LureKey", "1");
            UseLure = pIniManager.GetBoolean("Fishing", "UseLure", false);
        }
Beispiel #5
0
        public void AddDrawItem(IDrawItem item)
        {
            _itemsToDraw.Add(item);
            var cb = new CheckBoxItem(item.SettingName());

            _itemsShouldDraw.Add(item.SettingName(), false);
            cb.Tag  = item.SettingName();
            cb.Text = item.CheckBoxName();
            if (pIniManager.GetBoolean("Radar", item.SettingName(), false))
            {
                cb.Checked = true;
                _itemsShouldDraw[item.SettingName()] = true;
            }
            cb.Click += DrawItemClick;
            ControlSettings.Items.Add(cb);
        }
Beispiel #6
0
        public static void LoadSettings()
        {
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            OurDirectory = executableDirectoryName;
            var pIniManager = new IniManager(OurDirectory + SettingsName);

            Skin             = pIniManager.GetBoolean("Grinding", "Skin", false);
            WaitForLoot      = pIniManager.GetBoolean("Grinding", "WaitForLoot", true);
            StopLootOnFull   = pIniManager.GetBoolean("Grinding", "StopLootOnFull", false);
            Loot             = pIniManager.GetBoolean("Grinding", "Loot", true);
            Mount            = pIniManager.GetBoolean("Grinding", "Mount", true);
            ApproachRange    = pIniManager.GetInt("Grinding", "ApproachRange", 40);
            Profile          = pIniManager.GetString("Grinding", "Profile", string.Empty);
            Jump             = pIniManager.GetBoolean("Grinding", "Jump", false);
            SkipMobsWithAdds = pIniManager.GetBoolean("Grinding", "SkipMobsWithAdds", false);
            ShouldTrain      = pIniManager.GetBoolean("Grinding", "ShouldTrain", false);
            //OnLongBattle = pIniManager.GetBoolean("Grinding", "OnLongBattle", false);
            ShouldTrain      = false;
            SkipAddsDistance = pIniManager.GetInt("Grinding", "SkipAddsDistance", 20);
            SkipAddsCount    = pIniManager.GetInt("Grinding", "SkipAddsCount", 2);
        }
Beispiel #7
0
        public static void LoadSettings()
        {
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            OurDirectory = executableDirectoryName;
            var pIniManager = new IniManager(OurDirectory + SettingsName);

            Herb                        = pIniManager.GetBoolean("Flying", "Herb", false);
            Mine                        = pIniManager.GetBoolean("Flying", "Mine", false);
            ApproachModifier            = (float)Convert.ToDouble(pIniManager.GetString("Flying", "ApproachModifier", "0"));
            MaxUnits                    = pIniManager.GetString("Flying", "MaxUnits", "3");
            StopOnDeath                 = pIniManager.GetBoolean("Flying", "StopOnDeath", false);
            StopHarvestWithPlayerAround = pIniManager.GetBoolean("Flying", "StopHarvest", true);
            AvoidPlayers                = pIniManager.GetBoolean("Flying", "AvoidPlayers", true);
            AutoBlacklist               = pIniManager.GetBoolean("Flying", "AutoBlacklist", false);
            StopOnFullBags              = pIniManager.GetBoolean("Flying", "StopOnFullBags", false);
            AvoidElites                 = pIniManager.GetBoolean("Flying", "AvoidElites", true);
            FindCorpse                  = pIniManager.GetBoolean("Flying", "FindCorpse", true);
            WaitForLoot                 = pIniManager.GetBoolean("Flying", "WaitForLoot", true);
            WaitForRessSick             = pIniManager.GetBoolean("Flying", "WaitForRessSick", false);
            FlyingMountBar              = pIniManager.GetString("Flying", "FlyingMountBar", "0");
            FlyingMountKey              = pIniManager.GetString("Flying", "FlyingMountKey", "0");
            Profile                     = pIniManager.GetString("Flying", "Profile", string.Empty);
            DruidAvoidCombat            = pIniManager.GetBoolean("Flying", "DruidAvoidCombat", false);
            Fish                        = pIniManager.GetBoolean("Flying", "Fish", false);
            Lure                        = pIniManager.GetBoolean("Flying", "Lure", false);
            SendKeyOnStartCombat        = pIniManager.GetBoolean("Flying", "SendKeyOnStartCombat", false);
            MaxTimeAtSchool             = Convert.ToDouble(pIniManager.GetString("Flying", "MaxTimeAtSchool", "4"));
            FishApproach                = Convert.ToDouble(pIniManager.GetString("Flying", "FishApproach", "30"));
            LureBar                     = pIniManager.GetString("Flying", "LureBar", "1");
            LureKey                     = pIniManager.GetString("Flying", "LureKey", "1");
            WaterwalkBar                = pIniManager.GetString("Flying", "WaterwalkBar", "1");
            WaterwalkKey                = pIniManager.GetString("Flying", "WaterwalkKey", "1");
            ExtraBar                    = pIniManager.GetString("Flying", "ExtraBar", "1");
            ExtraKey                    = pIniManager.GetString("Flying", "ExtraKey", "1");
        }
Beispiel #8
0
        public static void LoadSettings()
        {
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            OurDirectory = executableDirectoryName;
            var pIniManager = new IniManager(OurDirectory + SettingsName);

            SelectedEngine     = pIniManager.GetString("Engine", "Selected", string.Empty);
            SelectedCombat     = pIniManager.GetString("Combat", "Selected", string.Empty);
            FirstRun           = pIniManager.GetBoolean("Config", "FirstRun", true);
            DebugMode          = pIniManager.GetBoolean("Config", "DebugMode", false);
            Password           = pIniManager.GetString("Config", "UserName", String.Empty);
            UserName           = pIniManager.GetString("Config", "Password", String.Empty);
            BackgroundMode     = pIniManager.GetBoolean("Config", "BackgroundMode", false);
            HookMouse          = pIniManager.GetBoolean("Config", "HookMouse", false);
            SetupUseHotkeys    = pIniManager.GetBoolean("Config", "UseHotkeys", false);
            StopAfterBool      = pIniManager.GetBoolean("Config", "StopAfter", false);
            StopAfter          = pIniManager.GetString("Config", "StopAfterTime", "120");
            LogOutOnFollowTime = pIniManager.GetString("Config", "LogoutOnFollowTime", "2");
            SoundFollow        = pIniManager.GetBoolean("Config", "FollowSound", true);
            SoundWhisper       = pIniManager.GetBoolean("Config", "WhisperSound", true);
            SoundStop          = pIniManager.GetBoolean("Config", "SoundStop", true);
            Shutdown           = pIniManager.GetBoolean("Config", "ShutdownComputer", false);
            LogoutOnFollow     = pIniManager.GetBoolean("Config", "LogoutOnFollow", false);
            UseCtm             = pIniManager.GetBoolean("Config", "UseCtm", false);
            DebugLog           = pIniManager.GetBoolean("Config", "DebugLog", false);
            Latency            = pIniManager.GetInt("Config", "Latency", 0);
            Language           = (LazyLanguage)pIniManager.GetInt("Config", "Language", 0);
            //
            CombatBoolEat   = pIniManager.GetBoolean("Combat", "CBEat", true);
            CombatBoolDrink = pIniManager.GetBoolean("Combat", "CBDrink", true);
            CombatEatAt     = pIniManager.GetString("Combat", "COEat", "0");
            CombatDrinkAt   = pIniManager.GetString("Combat", "CODrink", "0");

            KeysGroundMountBar       = pIniManager.GetString("Keys", "GroundMountBar", "1");
            KeysGroundMountKey       = pIniManager.GetString("Keys", "GroundMountKey", "1");
            KeysAttack1Bar           = pIniManager.GetString("Keys", "Attack1Bar", "1");
            KeysAttack1Key           = pIniManager.GetString("Keys", "Attack1Key", "1");
            KeysEatBar               = pIniManager.GetString("Keys", "EatBar", "1");
            KeysEatKey               = pIniManager.GetString("Keys", "EatKey", "1");
            KeysDrinkBar             = pIniManager.GetString("Keys", "DrinkBar", "1");
            KeysDrinkKey             = pIniManager.GetString("Keys", "DrinkKey", "1");
            KeysMoteExtractorBar     = pIniManager.GetString("Keys", "MoteBar", "1");
            KeysMoteExtractorKey     = pIniManager.GetString("Keys", "MoteKey", "1");
            KeysStafeLeftKeyText     = pIniManager.GetString("Keys", "StafeLeftKeyText", "Q");
            KeysStafeRightKeyText    = pIniManager.GetString("Keys", "StafeRightKeyText", "E");
            KeysInteractKeyText      = pIniManager.GetString("Keys", "InteractText", "U");
            KeysInteractTargetText   = pIniManager.GetString("Keys", "InteractTargetText", "P");
            KeysTargetLastTargetText = pIniManager.GetString("Keys", "KeysTargetLastTargetText", "G");

            //Mail
            ShouldMail = pIniManager.GetBoolean("Mail", "ShouldMail", false);
            MailTo     = pIniManager.GetString("Mail", "MailTo", string.Empty);
            //MacroForMail = pIniManager.GetBoolean("Mail", "MacroForMail", false);
            MacroForMail     = false;
            KeysMailMacroBar = pIniManager.GetString("Mail", "KeysMailMacroBar", "1");
            KeysMailMacroKey = pIniManager.GetString("Mail", "KeysMailMacroKey", "1");

            //Vendor
            ShouldVendor  = pIniManager.GetBoolean("Vendor", "ShouldVendor", false);
            ShouldRepair  = pIniManager.GetBoolean("Vendor", "ShouldRepair", false);
            SellCommon    = pIniManager.GetBoolean("Vendor", "SellCommon", false);
            SellUncommon  = pIniManager.GetBoolean("Vendor", "SellUncommon", false);
            SellPoor      = pIniManager.GetBoolean("Vendor", "SellPoor", false);
            FreeBackspace = pIniManager.GetString("Vendor", "FreeBackspace", "2");
        }