示例#1
0
        private static void onLoad(object sender)
        {
            gameStart = now;

            Game.PrintChat("ARAm - Sharp by DeTuKs");
            try
            {
                defaultOut = System.Console.Out;
                System.Console.SetOut(new ErrorLogger(defaultOut));

                Config = new Menu("ARAM", "aramBot", true);

                var orbwalkerMenu = new Menu("Orbwalker", "my_Orbwalker");
                DeathWalker.AddToMenu(orbwalkerMenu);
                Config.AddSubMenu(orbwalkerMenu);

                //Extra
                Config.AddSubMenu(new Menu("Extra Sharp", "extra"));
                Config.SubMenu("extra").AddItem(new MenuItem("debugDraw", "Debug draw")).SetValue(false);
                Config.SubMenu("extra").AddItem(new MenuItem("dataGathering", "Send errors to server")).SetValue(false);


                //Debug
                Config.AddSubMenu(new Menu("Debug", "debug"));
                Config.SubMenu("extra").AddItem(new MenuItem("botOff", "Bot off")).SetValue(false);
                Config.SubMenu("debug").AddItem(new MenuItem("db_targ", "Debug Target")).SetValue(new KeyBind('T', KeyBindType.Press, false));


                Config.AddToMainMenu();
                Drawing.OnDraw += onDraw;
                Game.OnUpdate  += OnGameUpdate;
                Game.OnEnd     += OnGameEnd;
                ARAMSimulator.setupARMASimulator();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
示例#2
0
        private static void onLoad(object sender)
        {
            r        = new Random();
            allyIds  = new List <int>();
            enemyIds = new List <int>();

            gameStart = now;
            Chat.Print("<font size='30'>AramDetFull</font> <font color='#b756c5'>ported by Hesa & Ouija</font>");
            try
            {
                defaultOut = Console.Out;
                Console.SetOut(new ErrorLogger(defaultOut));

                Config = MainMenu.AddMenu("ARAM", "aramDet");

                Debug = Config.AddSubMenu("Debug", "aramDetDebug");
                Debug.Add("botOff", new CheckBox("Bot off", false));
                Debug.Add("debugDraw", new CheckBox("Debug draw", false));

                Drawing.OnDraw += onDraw;
                Game.OnUpdate  += OnGameUpdate;
                Game.OnNotify  += Game_OnNotify;

                var gameEndNotified = false;

                OnGameEnd += ARAMDetFull_OnGameEnd;

                Game.OnTick += delegate
                {
                    if (gameEndNotified)
                    {
                        return;
                    }
                    var nexus = ObjectManager.Get <Obj_HQ>();
                    if (nexus == null)
                    {
                        return;
                    }
                    if (nexus.Any(n => n.IsDead || n.Health.Equals(0)))
                    {
                        var win = ObjectManager.Get <Obj_HQ>().Any(n => n.Health.Equals(0));
                        OnGameEnd?.Invoke(win);
                        gameEndNotified = true;
                    }
                };

                ARAMSimulator.setupARMASimulator();

                foreach (AIHeroClient ally in EloBuddy.SDK.EntityManager.Heroes.Allies)
                {
                    allyIds.Add(ally.NetworkId);
                }

                foreach (AIHeroClient enemy in EloBuddy.SDK.EntityManager.Heroes.Enemies)
                {
                    enemyIds.Add(enemy.NetworkId);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
示例#3
0
        private static void onLoad()
        {
            r        = new Random();
            allyIds  = new List <int>();
            enemyIds = new List <int>();

            gameStart = now;

            Chat.Print("ARAm - Sharp by DeTuKs");
            try
            {
                defaultOut = System.Console.Out;

                Config = new Menu("ARAM", "aramBot", true);

                var orbwalkerMenu = new Menu("Orbwalker", "my_Orbwalker");
                DeathWalker.AddToMenu(orbwalkerMenu);
                Config.AddSubMenu(orbwalkerMenu);


                Config.AddToMainMenu();

                Game.OnUpdate += OnGameUpdate;
                Game.OnNotify += Game_OnNotify;

                var gameEndNotified = false;

                OnGameEnd += ARAMDetFull_OnGameEnd;

                Game.OnTick += delegate
                {
                    if (gameEndNotified)
                    {
                        return;
                    }
                    var nexus = ObjectManager.Get <Obj_HQ>();
                    if (nexus == null)
                    {
                        return;
                    }
                    if (nexus.Any(n => n.IsDead || n.Health.Equals(0)))
                    {
                        var win = ObjectManager.Get <Obj_HQ>().Any(n => n.Health.Equals(0));
                        OnGameEnd?.Invoke(win);
                        gameEndNotified = true;
                    }
                };

                ARAMSimulator.setupARMASimulator();

                foreach (AIHeroClient ally in EloBuddy.SDK.EntityManager.Heroes.Allies)
                {
                    allyIds.Add(ally.NetworkId);
                }

                foreach (AIHeroClient enemy in EloBuddy.SDK.EntityManager.Heroes.Enemies)
                {
                    enemyIds.Add(enemy.NetworkId);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }