Beispiel #1
0
        public CustomLvlSeq(Menu m, AIHeroClient champ, string dir, string seq = "", int maxlvl = 18)
        {
            locked = new bool[] {true};
            this.dir = dir;
            se = seq;
            Menu menuSettings = m == null
                ? MainMenu.AddMenu("Essential LvlUp", "esl")
                : m.AddSubMenu("LvlUp settings", "AB_SL_SETTINGS");
            CheckBox enabled = new CheckBox("Enabled", true);
            menuSettings.AddGroupLabel("General");
            menuSettings.Add(champ + "enabled", enabled);
            menuSettings.AddGroupLabel("Current profile");
            profile1 = new CheckBox("Profile 1", true);
            profile2 = new CheckBox("Profile 2", false);
            menuSettings.Add(champ.ChampionName + Game.MapId + "p1", profile1);
            menuSettings.Add(champ.ChampionName + Game.MapId + "p2", profile2);


            updater = new CheckBox("Update default sequences");
            clear = new CheckBox("Clear current profile", false);
            menuSettings.Add("clear", clear);
            defau = new CheckBox("Set current profile to default");
            menuSettings.Add("defaults", defau);
            Slider delay = new Slider("Delay after load to upgrade the first skill (seconds)", 5, 0, 30);
            menuSettings.Add("delayyy", delay);


            menuSettings.AddGroupLabel("Humanizer");
            humanMin = new Slider("Minimum time after level up to upgrade an ability (miliseconds)", 300, 0, 2000);
            humanMax = new Slider("Maximum time after level up to upgrade an ability (miliseconds)", 500, 0, 2000);
            menuSettings.Add("xhm", humanMin);
            menuSettings.Add("xhmx", humanMax);
            humanMin.OnValueChange += humanMin_OnValueChange;
            humanMax.OnValueChange += humanMax_OnValueChange;
            menuSettings.AddGroupLabel("Updater");
            menuSettings.Add("updateSkills", updater);
            updater.CurrentValue = false;
            locked[0] = false;
            updater.OnValueChange += updater_OnValueChange;
            clear.CurrentValue = false;
            clear.OnValueChange += clear_OnValueChange;
            defau.CurrentValue = false;
            defau.OnValueChange += defau_OnValueChange;
            profile1.OnValueChange += profile1_OnValueChange;
            profile2.OnValueChange += profile2_OnValueChange;
            menuSettings.Add("l1", new Label("By Christian Brutal Sniper"));
            System.Version v = Assembly.GetExecutingAssembly().GetName().Version;
            menuSettings.Add("l2",
                new Label("Version " + v.Major + "." + v.Minor + " Build time: " + v.Build%100 + " " +
                          CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(v.Build/100) + " " +
                          (v.Revision/100).ToString().PadLeft(2, '0') + ":" +
                          (v.Revision%100).ToString().PadLeft(2, '0')));


            profile = profile1.CurrentValue ? 1 : 2;
            lvlFile =
                Path.Combine(dir + "\\" + "Skills-" + champ.ChampionName + "-" + Game.MapId + "-P" + profile + ".txt");

            this.champ = champ;
            def = new DefautSequences(dir + "\\" + "Skills-DEFAULT.txt");
            maxLvl = maxlvl;
            Menu menu = m == null
                ? menuSettings.AddSubMenu("LvlUp: " + champ.ChampionName)
                : m.AddSubMenu("LvlUp: " + champ.ChampionName);


            sliders = new LvlSlider[maxlvl];
            skills = new SkillToLvl[maxlvl];
            for (int i = 0; i < maxLvl; i++)
            {
                sliders[i] = new LvlSlider(menu, i, this);
            }
            load(seq);
            lvlUp = new SkillLevelUp(skills, enabled, delay.CurrentValue)
            {
                maxTime = humanMax.CurrentValue,
                minTime = humanMin.CurrentValue
            };
        }
Beispiel #2
0
        public CustomLvlSeq(Menu m, AIHeroClient champ, string dir, string seq = "", int maxlvl = 18)
        {
            locked   = new bool[] { true };
            this.dir = dir;
            se       = seq;
            Menu menuSettings = m == null
                ? MainMenu.AddMenu("Essential LvlUp", "esl")
                : m.AddSubMenu("LvlUp settings", "AB_SL_SETTINGS");

            CheckBox enabled = new CheckBox("Enabled", true);

            menuSettings.AddGroupLabel("General");
            menuSettings.Add(champ + "enabled", enabled);
            menuSettings.AddGroupLabel("Current profile");
            profile1 = new CheckBox("Profile 1", true);
            profile2 = new CheckBox("Profile 2", false);
            menuSettings.Add(champ.ChampionName + Game.MapId + "p1", profile1);
            menuSettings.Add(champ.ChampionName + Game.MapId + "p2", profile2);


            updater = new CheckBox("Update default sequences");
            clear   = new CheckBox("Clear current profile", false);
            menuSettings.Add("clear", clear);
            defau = new CheckBox("Set current profile to default");
            menuSettings.Add("defaults", defau);
            Slider delay = new Slider("Delay after load to upgrade the first skill (seconds)", 5, 0, 30);

            menuSettings.Add("delayyy", delay);


            menuSettings.AddGroupLabel("Humanizer");
            humanMin = new Slider("Minimum time after level up to upgrade an ability (miliseconds)", 300, 0, 2000);
            humanMax = new Slider("Maximum time after level up to upgrade an ability (miliseconds)", 500, 0, 2000);
            menuSettings.Add("xhm", humanMin);
            menuSettings.Add("xhmx", humanMax);
            humanMin.OnValueChange += humanMin_OnValueChange;
            humanMax.OnValueChange += humanMax_OnValueChange;
            menuSettings.AddGroupLabel("Updater");
            menuSettings.Add("updateSkills", updater);
            updater.CurrentValue    = false;
            locked[0]               = false;
            updater.OnValueChange  += updater_OnValueChange;
            clear.CurrentValue      = false;
            clear.OnValueChange    += clear_OnValueChange;
            defau.CurrentValue      = false;
            defau.OnValueChange    += defau_OnValueChange;
            profile1.OnValueChange += profile1_OnValueChange;
            profile2.OnValueChange += profile2_OnValueChange;
            menuSettings.Add("l1", new Label("By Christian Brutal Sniper"));
            System.Version v = Assembly.GetExecutingAssembly().GetName().Version;
            menuSettings.Add("l2",
                             new Label("Version " + v.Major + "." + v.Minor + " Build time: " + v.Build % 100 + " " +
                                       CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(v.Build / 100) + " " +
                                       (v.Revision / 100).ToString().PadLeft(2, '0') + ":" +
                                       (v.Revision % 100).ToString().PadLeft(2, '0')));


            profile = profile1.CurrentValue ? 1 : 2;
            lvlFile =
                Path.Combine(dir + "\\" + "Skills-" + champ.ChampionName + "-" + Game.MapId + "-P" + profile + ".txt");

            this.champ = champ;
            def        = new DefautSequences(dir + "\\" + "Skills-DEFAULT.txt");
            maxLvl     = maxlvl;
            Menu menu = m == null
                ? menuSettings.AddSubMenu("LvlUp: " + champ.ChampionName)
                : m.AddSubMenu("LvlUp: " + champ.ChampionName);


            sliders = new LvlSlider[maxlvl];
            skills  = new SkillToLvl[maxlvl];
            for (int i = 0; i < maxLvl; i++)
            {
                sliders[i] = new LvlSlider(menu, i, this);
            }
            load(seq);
            lvlUp = new SkillLevelUp(skills, enabled, delay.CurrentValue)
            {
                maxTime = humanMax.CurrentValue,
                minTime = humanMin.CurrentValue
            };
        }