static Utility()
 {
     // Menu
     Summoners.Initialize();
     OItems.Initialize();
     DItems.Initialize();
     CItems.Initialize();
     Protector.Initialize();
     Cleansers.Initialize();
     Settings.Initialize();
 }
 static Utility()
 {
     // Menu
     Summoners.Initialize();
     if (UtilsManager.IsSupported)
     {
         Stealer.Initialize();
     }
     OItems.Initialize();
     DItems.Initialize();
     CItems.Initialize();
     Protector.Initialize();
     Cleansers.Initialize();
     Settings.Initialize();
 }
Exemple #3
0
        private static void OnGameLoad(EventArgs args)
        {
            FileName = "Oracle - " + DateTime.Now.ToString("yy.MM.dd") +
                       " " + DateTime.Now.ToString("h.mm.ss") + ".txt";

            ChampionName       = Me.ChampionName;
            Game.OnGameUpdate += Game_OnGameUpdate;
            Game.PrintChat("<font color=\"#1FFF8F\">Oracle# r." + Revision + " -</font><font color=\"#FFFFCC\"> by Kurisu</font>");

            if (!Directory.Exists(Config.LeagueSharpDirectory + @"\Logs\Oracle"))
            {
                Directory.CreateDirectory(Config.LeagueSharpDirectory + @"\Logs\Oracle");
                Game.PrintChat(
                    "<font color=\"#FFFFCC\"><b>Thank you for choosing Oracle! :^)</b></font>");
                Game.PrintChat(
                    "<font color=\"#FFFFCC\"><b>Log files are generated in </b></font>" + Config.LeagueSharpDirectory + @"\Logs\Oracle\");
            }

            else
            {
                Game.PrintChat("<font color=\"#FFFFCC\">Feel free to donate to</font>: [email protected]");
            }

            try
            {
                var wc = new WebClient {
                    Proxy = null
                };
                var gitrevision =
                    wc.DownloadString(
                        "https://raw.githubusercontent.com/xKurisu/KurisuSolutions/master/Oracle%20(Activator)/Oracle.txt");

                if (Revision != gitrevision)
                {
                    Game.PrintChat("<font color=\"#FFFFCC\"><b>Oracle is outdated, please Update!</b></font>");
                }
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                Game.PrintChat("Something went wrong with update checker!");
            }

            Origin = new Menu("Oracle", "oracle", true);
            Cleansers.Initialize(Origin);
            Defensives.Initialize(Origin);
            Summoners.Initialize(Origin);
            Offensives.Initialize(Origin);
            Consumables.Initialize(Origin);
            AutoSpells.Initialize(Origin);

            var config     = new Menu("Oracle Config", "oracleconfig");
            var dangerMenu = new Menu("Dangerous Config", "dangerconfig");

            foreach (var i in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.Team != Me.Team))
            {
                var menu = new Menu(i.SkinName, i.SkinName + "cccmenu");
                foreach (
                    var spell in
                    TargetSpellDatabase.Spells.Where(spell => spell.ChampionName == i.ChampionName.ToLower()))
                {
                    var danger = spell.Spellslot.ToString() == "R" ||
                                 spell.CcType != CcType.No && (spell.Type == SpellType.Skillshot || spell.Type == SpellType.Targeted);

                    menu.AddItem(new MenuItem(spell.Name + "ccc", spell.Name + " | " + spell.Spellslot)).SetValue(danger);
                }

                dangerMenu.AddSubMenu(menu);
            }

            config.AddItem(
                new MenuItem("usecombo", "Combo (Active)")
                .SetValue(new KeyBind(32, KeyBindType.Press)));

            config.AddSubMenu(dangerMenu);

            var cskills = new Menu("Cleanse Special", "cskills");

            foreach (var debuff in GameBuff.CleanseBuffs)
            {
                cskills.AddItem(new MenuItem("cure" + debuff.BuffName, debuff.ChampionName + " | " + debuff.BuffName))
                .SetValue(true);
            }
            config.AddSubMenu(cskills);

            var cleanseMenu = new Menu("Cleanse Debuffs", "cdebufs");

            cleanseMenu.AddItem(new MenuItem("stun", "Stuns")).SetValue(true);
            cleanseMenu.AddItem(new MenuItem("charm", "Charms")).SetValue(true);
            cleanseMenu.AddItem(new MenuItem("taunt", "Taunts")).SetValue(true);
            cleanseMenu.AddItem(new MenuItem("fear", "Fears")).SetValue(true);
            cleanseMenu.AddItem(new MenuItem("snare", "Snares")).SetValue(true);
            cleanseMenu.AddItem(new MenuItem("silence", "Silences")).SetValue(true);
            cleanseMenu.AddItem(new MenuItem("suppression", "Supression")).SetValue(true);
            cleanseMenu.AddItem(new MenuItem("polymorph", "Polymorphs")).SetValue(true);
            cleanseMenu.AddItem(new MenuItem("blind", "Blinds")).SetValue(false);
            cleanseMenu.AddItem(new MenuItem("slow", "Slows")).SetValue(false);
            cleanseMenu.AddItem(new MenuItem("poison", "Poisons")).SetValue(false);
            config.AddSubMenu(cleanseMenu);

            var debugMenu = new Menu("Debugging", "debugmenu");

            debugMenu.AddItem(new MenuItem("dbool", "Enable Console Debugging")).SetValue(false);
            config.AddSubMenu(debugMenu);

            Origin.AddSubMenu(config);
            Origin.AddToMainMenu();

            // Events
            GameObject.OnCreate            += GameObject_OnCreate;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;

            Logger(LogType.Info, "Oracle Revision: " + Revision);
            Logger(LogType.Info, "Local Player: " + ChampionName);
            Logger(LogType.Info, "Local Version: " + Game.Version);
            Logger(LogType.Info, "Local Game Map: " + Game.MapId);
            Logger(LogType.Info, "Local Summoners: " + Me.Spellbook.GetSpell(SpellSlot.Summoner1).Name + " - " +
                   Me.Spellbook.GetSpell(SpellSlot.Summoner2).Name);

            foreach (var i in ObjectManager.Get <Obj_AI_Hero>())
            {
                if (i.Team == Me.Team)
                {
                    Logger(LogType.Info, "Ally added: " + i.ChampionName);
                }

                if (i.Team != Me.Team)
                {
                    Logger(LogType.Info, "Enemy added: " + i.ChampionName);
                }
            }
        }
Exemple #4
0
        private static void OnGameLoad(EventArgs args)
        {
            Game.OnGameUpdate += Game_OnGameUpdate;

            ChampionName = Me.ChampionName;
            Origin       = new Menu("花边-神谕", "oracle", true);

            Cleansers.Initialize(Origin);
            Defensives.Initialize(Origin);
            Summoners.Initialize(Origin);
            Offensives.Initialize(Origin);
            Consumables.Initialize(Origin);
            AutoSpells.Initialize(Origin);

            var Config     = new Menu("额外 设置", "oracleconfig");
            var DangerMenu = new Menu("危险 配置", "dangerconfig");

            foreach (var i in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.Team != Me.Team))
            {
                var menu = new Menu(i.SkinName, i.SkinName + "cccmenu");
                foreach (
                    var spell in
                    TargetSpellDatabase.Spells.Where(spell => spell.ChampionName == i.ChampionName.ToLower()))
                {
                    var danger = spell.Spellslot.ToString() == "R" ||
                                 spell.CcType != CcType.No && (spell.Type == SpellType.Skillshot || spell.Type == SpellType.Targeted);

                    menu.AddItem(new MenuItem(spell.Name + "ccc", spell.Name + " | " + spell.Spellslot)).SetValue(danger);
                }

                DangerMenu.AddSubMenu(menu);
            }

            Config.AddSubMenu(DangerMenu);

            var CleanseMenu = new Menu("净化 状态", "cdebufs");

            CleanseMenu.AddItem(new MenuItem("stun", "眩晕")).SetValue(true);
            CleanseMenu.AddItem(new MenuItem("charm", "魅惑")).SetValue(true);
            CleanseMenu.AddItem(new MenuItem("taunt", "嘲讽")).SetValue(true);
            CleanseMenu.AddItem(new MenuItem("fear", "恐惧")).SetValue(true);
            CleanseMenu.AddItem(new MenuItem("snare", "陷阱")).SetValue(true);
            CleanseMenu.AddItem(new MenuItem("silence", "沉默")).SetValue(true);
            CleanseMenu.AddItem(new MenuItem("suppression", "虚弱")).SetValue(true);
            CleanseMenu.AddItem(new MenuItem("polymorph", "变形")).SetValue(true);
            CleanseMenu.AddItem(new MenuItem("blind", "致盲")).SetValue(false);
            CleanseMenu.AddItem(new MenuItem("slow", "减速")).SetValue(false);
            CleanseMenu.AddItem(new MenuItem("poison", "制毒")).SetValue(false);
            Config.AddSubMenu(CleanseMenu);

            var DebugMenu = new Menu("调试选项", "debugmenu");

            DebugMenu.AddItem(new MenuItem("dbool", "启用活化剂调试")).SetValue(false);
            Config.AddSubMenu(DebugMenu);

            Origin.AddSubMenu(Config);

            Origin.AddItem(
                new MenuItem("ComboKey", "连招 (启用)")
                .SetValue(new KeyBind(32, KeyBindType.Press)));

            Origin.AddToMainMenu();

            // Events
            GameObject.OnCreate            += GameObject_OnCreate;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;

            Game.PrintChat("<font color=\"#1FFF8F\">花边-神谕 加载成功!</font>");
        }