public BuffManagerArgs(string uniqueId, Obj_AI_Hero hero, Vector3 position, float endTime)
 {
     UniqueId = uniqueId;
     Hero = hero;
     Position = position;
     EndTime = endTime;
 }
Exemplo n.º 2
1
        private static void Game_OnGameLoad(EventArgs args)
        {
            EQDrawList = new List<Vector3>();
            Player = ObjectManager.Player;
            if (Player.ChampionName != ChampionName) return;
            Q = new Spell(SpellSlot.Q, 700f);
            Q.SetSkillshot(0.5f, 70f, float.MaxValue, false, SkillshotType.SkillshotLine);

            W = new Spell(SpellSlot.W, 300f);

            E = new Spell(SpellSlot.E, 830f);
            E.SetSkillshot(0.5f, 70f, float.MaxValue, false, SkillshotType.SkillshotCircle);
            Config = new Menu("J4Helper", "J4Helper", true);
            //Orbwalker
            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            //Misc
            Config.AddSubMenu(new Menu("Keys", "Keys"));
            Config.SubMenu("Keys")
                .AddItem(
                    new MenuItem("EQMouse", "EQ to Mouse").SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press)));
            Config.AddToMainMenu();
            Game.OnUpdate += Game_OnUpdate;
            Drawing.OnDraw += Drawing_OnDraw;
            Game.PrintChat("J4Helper Loaded.");
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
        }
Exemplo n.º 3
1
 public InitiatorArgs(Obj_AI_Hero hero, Vector3 start, Vector3 end, float range)
 {
     Hero = hero;
     Start = start;
     End = end;
     Range = range;
 }
Exemplo n.º 4
0
        public static bool GetQCollision(Obj_AI_Hero target)
        {
            var from = Program.Player.ServerPosition.To2D();
            var to = target.ServerPosition.To2D();
            if (
                !ObjectManager.Get<Obj_AI_Hero>()
                    .Any(
                        hero =>
                            hero.IsValidTarget(float.MaxValue, false) &&
                            hero.Team == ObjectManager.Player.Team && hero.ChampionName == "Yasuo"))
            {
                return false;
            }

            GameObject wall = null;

            foreach (var gameObject in ObjectManager.Get<GameObject>().Where(gameObject => gameObject.IsValid && Regex.IsMatch(gameObject.Name, "_w_windwall.\\.troy",RegexOptions.IgnoreCase)))
            {
                wall = gameObject;
            }

            if (wall == null) return false;

            var level = wall.Name.Substring(wall.Name.Length - 6, 1);
            var wallWidth = (300 + 50*Convert.ToInt32(level));

            var wallDirection = (wall.Position.To2D() - _yasuoWallCastedPos).Normalized().Perpendicular();
            var wallStart = wall.Position.To2D() + wallWidth/2*wallDirection;
            var wallEnd = wallStart - wallWidth*wallDirection;

            Drawing.DrawLine(wallStart, wallEnd, 50, Color.Blue);

            return (Environment.TickCount - _wallCastT < 4000 && CheckLineIntersection(wallStart, wallEnd, from, to));
        }
Exemplo n.º 5
0
        private void Combo(Obj_AI_Hero target)
        {
            if (target == null || !target.IsValid)
            {
                return;
            }

            if (Q.IsReady() && Player.Distance(target) < Q.Range)
            {
                if (W.IsReady())
                {
                    W.Cast();
                }
                Q.CastOnUnit(target);
            }

            if (E.IsReady())
            {
                E.CastOnUnit(target);
            }
            if (R.IsReady() && Player.Distance(target) < Q.Range)
            {
                R.Cast(Target.Position);
            }
        }
Exemplo n.º 6
0
        private static void ECast(Obj_AI_Hero enemy)
        {
            var range = Orbwalking.GetRealAutoAttackRange(enemy);
            var path = Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.To2D(),
                Prediction.GetPrediction(enemy, 0.25f).UnitPosition.To2D(), LucianSpells.E.Range, range);

            if (path.Count() > 0)
            {
                var epos = path.MinOrDefault(x => x.Distance(Game.CursorPos));
                if (epos.To3D().UnderTurret(true) || epos.To3D().IsWall())
                {
                    return;
                }

                if (epos.To3D().CountEnemiesInRange(LucianSpells.E.Range - 100) > 0)
                {
                    return;
                }
                LucianSpells.E.Cast(epos);
            }
            if (path.Count() == 0)
            {
                var epos = ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -LucianSpells.E.Range);
                if (epos.UnderTurret(true) || epos.IsWall())
                {
                    return;
                }

                // no intersection or target to close
                LucianSpells.E.Cast(ObjectManager.Player.ServerPosition.Extend(enemy.ServerPosition, -LucianSpells.E.Range));
            }
        }
Exemplo n.º 7
0
 public SummonerItems(Obj_AI_Hero myHero)
 {
     player = myHero;
     sumBook = player.Spellbook;
     ignite = player.GetSpellSlot("summonerdot");
     smite = player.GetSpellSlot("SummonerSmite");
 }
Exemplo n.º 8
0
		//private static bool done;
		/*
        private static void PrintSData()
        {
            if (done) return;
            foreach (var spell in Player.Spellbook.Spells)
            {
                var sdata = spell.SData;
                Game.PrintChat("spell " + spell.Slot + " speed " + sdata.MissileSpeed + " delay " + sdata.DelayCastOffsetPercent + " width " + sdata.LineWidth + " range " + sdata.CastRange);
            }
            done = true;
        }
        */

		private static void SorakaMain(EventArgs args)
		{
			Player = ObjectManager.Player;

			if (Player.CharData.BaseSkinName != "Soraka")
			{
				return;
			}

			Config = SorakaMenu.CreateMenu();

			Config.AddToMainMenu();

			InitializeSpells();

			AntiGapcloser.OnEnemyGapcloser += OnGapClose;
			Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

			Obj_AI_Base.OnProcessSpellCast += DangerDetector;

			Orbwalking.BeforeAttack += BeforeAttack;

			Game.OnUpdate += OnUpdate;
			Drawing.OnDraw += OnDraw;

			Game.PrintChat("SephSoraka Loaded!");
		}
Exemplo n.º 9
0
 public UltTarget(GameObject obj)
 {
     Target = obj as Obj_AI_Hero;
     CastTime = Environment.TickCount;
     EndTime = CastTime + 8000;
     Game.OnUpdate += Game_OnUpdate;
 }
 public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
 {
     try
     {
         if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
         {
             return true;
         }
         foreach (var invulnerable in Items)
         {
             if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
             {
                 if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
                 {
                     if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
                     {
                         return true;
                     }
                     if (invulnerable.CustomCheck != null && CustomCheck(invulnerable, target, damageType))
                     {
                         return true;
                     }
                 }
             }
         }
         return false;
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return false;
 }
Exemplo n.º 11
0
        private static void LuxMain(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.BaseSkinName != "Lux")
            {
                return;
            }


            Config = LuxMenu.CreateMenu();

            Config.AddToMainMenu();

            InitializeSpells();

            ObjectHandling();

            AntiGapcloser.OnEnemyGapcloser += OnGapClose;

            Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

            Game.OnUpdate += OnUpdate;
            Game.OnUpdate += CheckKillable;
            Drawing.OnDraw += OnDraw;
        }
Exemplo n.º 12
0
        internal static void CheckCleanse(Obj_AI_Hero player)
        {
            foreach (var hero in Activator.Heroes.Where(x => x.Player.NetworkId == player.NetworkId))
            {
                hero.CleanseBuffCount = GetAuras(hero.Player, "summonerboost").Count();

                if (hero.CleanseBuffCount > 0)
                {
                    foreach (var buff in GetAuras(hero.Player, "summonerboost"))
                    {
                        var duration = (int) Math.Ceiling(buff.EndTime - buff.StartTime);
                        if (duration > hero.CleanseHighestBuffTime)
                        {
                            hero.CleanseHighestBuffTime = duration;
                        }
                    }

                    hero.LastDebuffTimestamp = Utils.GameTimeTickCount;
                }

                else
                {
                    if (hero.CleanseHighestBuffTime > 0)
                        hero.CleanseHighestBuffTime -= hero.QSSHighestBuffTime;
                    else
                        hero.CleanseHighestBuffTime = 0;
                }
            }
        }
Exemplo n.º 13
0
Arquivo: Ziggs.cs Projeto: Ryzeros/L-
        private static void ZiggsMain(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.CharData.BaseSkinName != "Ziggs")
            {
                return;
            }

            Config = ZiggsMenu.CreateMenu();

            Config.AddToMainMenu();

            InitializeSpells();

            ObjectHandling(); 

            AntiGapcloser.OnEnemyGapcloser += OnGapClose;

            Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

            Game.OnUpdate += OnUpdate;
            Game.OnUpdate += AutoSpells;
            
            Drawing.OnDraw += OnDraw;
        }
Exemplo n.º 14
0
 static Orbwalking()
 {
     Player = ObjectManager.Player;
     Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;
     GameObject.OnCreate += Obj_SpellMissile_OnCreate;
     Spellbook.OnStopCast += SpellbookOnStopCast;
 }
Exemplo n.º 15
0
        // use underTurret and .Extend for this please
        public static bool IsPositionSafe(Obj_AI_Hero target, Spell spell)
        {
            var predPos = spell.GetPrediction(target).UnitPosition.To2D();
            var myPos = Player.Position.To2D();
            var newPos = (target.Position.To2D() - myPos);
            newPos.Normalize();

            var checkPos = predPos + newPos * (spell.Range - Vector2.Distance(predPos, myPos));
            Obj_Turret closestTower = null;

            foreach (var tower in ObjectManager.Get<Obj_Turret>()
                .Where(tower => tower.IsValid && !tower.IsDead && Math.Abs(tower.Health) > float.Epsilon)
                .Where(tower => Vector3.Distance(tower.Position, Player.Position) < 1450))
            {
                closestTower = tower;
            }

            if (closestTower == null)
                return true;

            if (Vector2.Distance(closestTower.Position.To2D(), checkPos) <= 910)
                return false;

            return true;
        }
Exemplo n.º 16
0
 private void Interrupter2_OnInterruptableTarget(Obj_AI_Hero unit, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (E.IsReady() && Config.Item("EInterruptable").GetValue<bool>() && unit.IsValidTarget(E.Range))
     {
         E.Cast(unit);
     }
 }
Exemplo n.º 17
0
            internal bool Cast(Obj_AI_Hero target, bool farmcast = false)
            {
                if (!item.IsReady())
                {
                    return false;
                }

                if (!farmcast)
                {
                    if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) &&
                        Player.CountEnemiesInRange(item.Range) >= eneinrangecount)
                    {
                        item.Cast();
                        return true;
                    }

                    if (type == ItemCastType.TargettedCast && target.IsInRange(item.Range))
                    {
                        item.Cast(target);
                        return true;
                    }
                }

                else if (farmcast)
                {
                    if ((type == ItemCastType.SelfCast || type == ItemCastType.RangeCast) && ObjectManager.Get<Obj_AI_Minion>().Count(x=> x.IsValidTarget(item.Range)) >= minioncount)
                    {
                        item.Cast();
                        return true;
                    }
                }

                return false;
            }
Exemplo n.º 18
0
        public static void Set(Obj_AI_Hero t)
        {
            if (s_Target != t)
                s_Flashed = false;

            s_Target = t;
        }
Exemplo n.º 19
0
        private static void CassMain(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.CharData.BaseSkinName != "Cassiopeia")
            {
                return;
            }


            Config = CassiopeiaMenu.CreateMenu();

            Config.AddToMainMenu();

            InitializeSpells();


            new CommonAutoLevel(skillorder);


            AntiGapcloser.OnEnemyGapcloser += OnGapClose;

            Interrupter2.OnInterruptableTarget += OnInterruptableTarget;

            Game.OnUpdate += OnUpdate;
            Game.OnUpdate += CheckKillable;
            Game.OnUpdate += AutoSpells;
            Drawing.OnDraw += OnDraw;
            Orbwalking.BeforeAttack += BeforeAuto;
        }
Exemplo n.º 20
0
        public override double CalculateDamageR(Obj_AI_Hero target)
        {
            if(!Spells[R].IsReady())
                return 0;

            return ObjectManager.Player.CalcDamage(target, Damage.DamageType.Magical, new int[] { 250, 375, 500 }[Spells[R].Level - 1] + ObjectManager.Player.FlatMagicDamageMod + target.FlatMagicDamageMod * 0.8);
        }
Exemplo n.º 21
0
        public static void Game_OnGameUpdate(EventArgs args)
        {            
            Enemy_Leblanc = HeroManager.Enemies.Find(x => x.ChampionName == "Leblanc");
            
            if (Enemy_Leblanc != null && Enemy_Leblanc.HealthPercent < 41 && Enemy_Leblanc.Pet != null && LPet_Enable != true && LPet_Time < Game.ClockTime && Enemy_Leblanc.Pet.Name == Enemy_Leblanc.Name)
            {
                LPet_Time = Game.ClockTime + 8;
                LPet_Enable = true;
                Console.Write("On");
            }
            if (LPet_Enable == true && LPet_Time < Game.ClockTime)
            {
                LPet_Enable = false;
                LPet_Time = Game.ClockTime + 30;
                Console.Write("Off");
            }            

            Enemy_Shaco = HeroManager.Enemies.Find(x => x.ChampionName == "Shaco");
            if (SPet_Enable == false && Enemy_Shaco != null && Enemy_Shaco.Pet != null && Enemy_Shaco.Name == Enemy_Shaco.Pet.Name && SPet_Time < Game.ClockTime)
            {
                SPet_Time = Game.ClockTime + 18;
                SPet_Enable = true;                
            }
            if (SPet_Enable == true && SPet_Time < Game.ClockTime)
            {
                SPet_Enable = false;
                SPet_Time = Game.ClockTime + 18;
            }
        }
Exemplo n.º 22
0
 public static float CalculateComboDamage(Obj_AI_Hero target, bool ignite, bool smite)
 {
     try
     {
         var damage = 0f;
         if (ignite && Ignite.Exists() && Ignite.IsReady() &&
             target.Position.Distance(ObjectManager.Player.Position) <= Ignite.Range)
         {
             damage += (float) ObjectManager.Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
         }
         if (smite)
         {
             if (BlueSmite.Exists() && BlueSmite.IsReady() &&
                 target.Position.Distance(ObjectManager.Player.Position) <= BlueSmite.Range)
             {
                 damage += CalculateBlueSmiteDamage();
             }
             else if (RedSmite.Exists() && RedSmite.IsReady() &&
                      target.Position.Distance(ObjectManager.Player.Position) <= RedSmite.Range)
             {
                 damage += CalculateRedSmiteDamage();
             }
         }
         return damage;
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return 0f;
 }
Exemplo n.º 23
0
 public static int EnemyWStackCount(Obj_AI_Hero t)
 {
     return
         t.Buffs.Where(xBuff => xBuff.Name == "varuswdebuff" && t.IsValidTarget(Q.Range))
             .Select(xBuff => xBuff.Count)
             .FirstOrDefault();
 }
Exemplo n.º 24
0
        public static Obj_AI_Hero GetTarget(float range,
            TargetSelector.DamageType damageType,
            bool ignoreShield = true,
            IEnumerable<Obj_AI_Hero> ignoredChamps = null,
            Vector3? rangeCheckFrom = null)
        {
            if (_lastTarget == null || !_lastTarget.IsValidTarget() || _lastDamageType != damageType)
            {
                var newTarget = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);

                _lastTarget = newTarget;
                _lastDamageType = damageType;

                return newTarget;
            }

            if (_lastTarget.IsValidTarget(range) && damageType == _lastDamageType)
            {
                return _lastTarget;
            }

            var newTarget2 = TargetSelector.GetTarget(range, damageType, ignoreShield, ignoredChamps, rangeCheckFrom);

            _lastTarget = newTarget2;
            _lastDamageType = damageType;

            return newTarget2;
        }
Exemplo n.º 25
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!Variables.MagnetEnable.GetValue<bool>())
            {
                MagnetTarget = null;
                IsDoingMagnet = false;
                Variables.Orbwalker._orbwalkingPoint = Game.CursorPos;
                return;
            }

            if (Variables.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo
                && TargetSelector.GetSelectedTarget().IsValidTarget(Variables.MagnetRange.GetValue<Slider>().Value))
            {
                MagnetTarget = TargetSelector.GetSelectedTarget();
                IsDoingMagnet = true;
                Variables.Orbwalker._orbwalkingPoint = TargetSelector.GetSelectedTarget().Position.Extend(ObjectManager.Player.Position, - 200);
            }
            else if (Variables.AssassinateKey.GetValue<KeyBind>().Active && Assasinate.AssassinateTarget.IsValidTarget(Variables.MagnetRange.GetValue<Slider>().Value))
            {
                MagnetTarget = Assasinate.AssassinateTarget;
                IsDoingMagnet = true;
                Variables.Orbwalker._orbwalkingPoint = Assasinate.AssassinateTarget.Position.Extend(ObjectManager.Player.Position, -200);
            }
            else
            {
                MagnetTarget = null;
                IsDoingMagnet = false;
                Variables.Orbwalker._orbwalkingPoint = Game.CursorPos;
            }
        }
Exemplo n.º 26
0
        static void Game_OnGameLoad(EventArgs args)
        {
            Player = ObjectManager.Player;

            if (Player.ChampionName != ChampionName)
                return;

            try
            {
                InitializeSpells();

                InitializeSkinManager();

                InitializeLevelUpManager();

                InitializeMainMenu();

                InitializeAttachEvents();

                Game.PrintChat(string.Format("<font color='#fb762d'>DevFiora Loaded v{0}</font>", Assembly.GetExecutingAssembly().GetName().Version));

                assemblyUtil = new AssemblyUtil(Assembly.GetExecutingAssembly().GetName().Name);
                assemblyUtil.onGetVersionCompleted += AssemblyUtil_onGetVersionCompleted;
                assemblyUtil.GetLastVersionAsync();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Exemplo n.º 27
0
 public void Update(Obj_AI_Hero target)
 {
     if (target.HealthPercent >= _minEnemyHealth && (!_onlyTwitchUlt || ObjectManager.Player.HasBuff("TwitchFullAutomatic")))
     {
         Use(target);
     }
 }
Exemplo n.º 28
0
        public static void Combo(Obj_AI_Hero t)
        {
            var useQ = Menu.Item("UseQ").GetValue<bool>();
            var useR = Menu.Item("UseR").GetValue<bool>();
            var alwaysStun = Menu.Item("alwaysStun").GetValue<bool>();
            var numOfEnemies = Menu.Item("MinEnemys").GetValue<Slider>().Value;
            t = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical);

            if (useQ && Q.IsReady())
            {
                if (t.IsValidTarget())
                {
                    if (alwaysStun)
                    {
                        castStunQ(t);
                    }
                    else
                    {
                        Q.Cast(t);
                    }
                }
            }
            if (useR && R.IsReady())
            {
                var t2 = TargetSelector.GetTarget(2500, TargetSelector.DamageType.Magical);
                if (GetEnemys(t2) >= numOfEnemies)
                {
                    R.Cast(t2, false, true);
                }

            }
        }
Exemplo n.º 29
0
 public void Update(Obj_AI_Hero target)
 {
     if ((target.HealthPercent >= _minEnemyHealth || ObjectManager.Player.HealthPercent < 20) && ObjectManager.Player.HealthPercent <= _maxPlayerHealth && target.Distance(ObjectManager.Player) < 550)
     {
         Use(target);
     }
 }
Exemplo n.º 30
0
        private float GetComboDamage(Obj_AI_Hero t)
        {
            float fComboDamage = 0f;

            if (Q.IsReady())
                fComboDamage += (float)ObjectManager.Player.GetSpellDamage(t, SpellSlot.Q); 
            //fComboDamage += CalcQDamage;

            if (W.Level >0)
                fComboDamage += (float)ObjectManager.Player.GetSpellDamage(t, SpellSlot.W);

            if (E.IsReady())
                fComboDamage += (float) ObjectManager.Player.GetSpellDamage(t, SpellSlot.E);

            if (R.IsReady())
                fComboDamage += (float) ObjectManager.Player.GetSpellDamage(t, SpellSlot.R);

            if (ObjectManager.Player.GetSpellSlot("summonerdot") != SpellSlot.Unknown &&
                ObjectManager.Player.Spellbook.CanUseSpell(ObjectManager.Player.GetSpellSlot("summonerdot")) ==
                SpellState.Ready && ObjectManager.Player.Distance(t) < 550)
                fComboDamage += (float) ObjectManager.Player.GetSummonerSpellDamage(t, Damage.SummonerSpell.Ignite);

            if (Items.CanUseItem(3144) && ObjectManager.Player.Distance(t) < 550)
                fComboDamage += (float) ObjectManager.Player.GetItemDamage(t, Damage.DamageItems.Bilgewater);

            if (Items.CanUseItem(3153) && ObjectManager.Player.Distance(t) < 550)
                fComboDamage += (float) ObjectManager.Player.GetItemDamage(t, Damage.DamageItems.Botrk);

            return fComboDamage;
        }
Exemplo n.º 31
0
        internal static bool CanCastE(Vector3 pos, Obj_AI_Hero target)
        {
            if (pos == Vector3.Zero || target == null || target.IsDead)
            {
                return(false);
            }

            if (MyLogic.MiscMenu["FlowersKatarina.MiscMenu.ETurret"].As <MenuList>().Value == 0 && pos.PointUnderEnemyTurret())
            {
                return(false);
            }

            if (MyLogic.MiscMenu["FlowersKatarina.MiscMenu.ETurret"].As <MenuList>().Value == 1 && pos.PointUnderEnemyTurret())
            {
                if (ObjectManager.GetLocalPlayer().HealthPercent() <=
                    MyLogic.MiscMenu["FlowersKatarina.MiscMenu.ETurretHP"].Value &&
                    target.Health > GetComboDamage(target) * 0.85)
                {
                    return(false);
                }
            }

            if (MyLogic.ComboMenu["FlowersKatarina.ComboMenu.EKillAble"].As <MenuKeyBind>().Enabled)
            {
                if (GameObjects.EnemyHeroes.Count(x => x.Distance(pos) <= MyLogic.R.Range) >= 3)
                {
                    if (GameObjects.EnemyHeroes.Count(x => x.Distance(pos) <= MyLogic.R.Range) == 3)
                    {
                        if (GameObjects.EnemyHeroes.Count(x => x.Health < GetComboDamage(target) * 1.45) <= 2)
                        {
                            return(false);
                        }
                    }
                    else if (GameObjects.EnemyHeroes.Count(x => x.Distance(pos) <= MyLogic.R.Range) == 4)
                    {
                        if (GameObjects.EnemyHeroes.Count(x => x.Health < GetComboDamage(target) * 1.45) < 2)
                        {
                            return(false);
                        }
                    }
                    else if (GameObjects.EnemyHeroes.Count(x => x.Distance(pos) <= MyLogic.R.Range) == 5)
                    {
                        if (GameObjects.EnemyHeroes.Count(x => x.Health < GetComboDamage(target) * 1.45) < 3)
                        {
                            return(false);
                        }
                    }
                }
                else
                {
                    if (MyLogic.Orbwalker.Mode == OrbwalkingMode.Combo)
                    {
                        if (target.Health >
                            (GameObjects.AllyHeroes.Any(x => x.DistanceToPlayer() <= MyLogic.E.Range)
                                ? GetComboDamage(target) + ObjectManager.GetLocalPlayer().Level * 45
                                : GetComboDamage(target)))
                        {
                            return(false);
                        }
                    }
                    else if (MyLogic.Orbwalker.Mode == OrbwalkingMode.Mixed)
                    {
                        if (pos.PointUnderEnemyTurret())
                        {
                            return(false);
                        }
                    }
                }
            }

            return(true);
        }
Exemplo n.º 32
0
        static void Game_OnGameLoad(EventArgs args)
        {
            Player = ObjectManager.Player;
            if (ObjectManager.Player.BaseSkinName != Champion)
            {
                return;
            }

            Q = new Spell(SpellSlot.Q, 1000);
            W = new Spell(SpellSlot.W, 300);
            E = new Spell(SpellSlot.E, 350);
            R = new Spell(SpellSlot.R, 525);

            Q.SetSkillshot(0.250f, 80, 2000, true, SkillshotType.SkillshotLine);


            SpellList.Add(Q);
            SpellList.Add(W);
            SpellList.Add(E);
            SpellList.Add(R);

            RDO  = new Items.Item(3143, 490f);
            HYD  = new Items.Item(3074, 175f);
            DFG  = new Items.Item(3128, 750f);
            YOY  = new Items.Item(3142, 185f);
            BOTK = new Items.Item(3153, 450f);
            CUT  = new Items.Item(3144, 450f);
            TYM  = new Items.Item(3077, 175f);

            //Menu Amumu
            Config = new Menu("Stoned 阿木木", "StonedAmumu", true);

            //Ts
            var targetSelectorMenu = new Menu("目标选择", "Target Selector");

            TargetSelector.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);

            //orb
            Config.AddSubMenu(new Menu("走砍", "Orbwalking"));
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            //Combo Menu
            Config.AddSubMenu(new Menu("连招", "Combo"));
            Config.SubMenu("Combo").AddItem(new MenuItem("UseQCombo", "使用 Q")).SetValue(true);
            Config.SubMenu("Combo").AddItem(new MenuItem("UseWCombo", "使用 W")).SetValue(true);
            Config.SubMenu("Combo").AddItem(new MenuItem("UseECombo", "使用 E")).SetValue(true);
            Config.SubMenu("Combo").AddItem(new MenuItem("UseItems", "使用 物品")).SetValue(true);
            Config.SubMenu("Combo").AddItem(new MenuItem("AutoR", "自动 R")).SetValue(true);
            Config.SubMenu("Combo").AddItem(new MenuItem("CountR", "使用R|范围内敌人").SetValue(new Slider(1, 5, 0)));
            Config.SubMenu("Combo").AddItem(new MenuItem("ActiveCombo", "连招 键位").SetValue(new KeyBind(32, KeyBindType.Press)));

            //JungleClear
            Config.AddSubMenu(new Menu("清野", "Jungle"));
            Config.SubMenu("Jungle").AddItem(new MenuItem("UseQClear", "使用 Q")).SetValue(true);
            Config.SubMenu("Jungle").AddItem(new MenuItem("UseWClear", "使用 W")).SetValue(true);
            Config.SubMenu("Jungle").AddItem(new MenuItem("UseEClear", "使用 E")).SetValue(true);
            Config.SubMenu("Jungle").AddItem(new MenuItem("ActiveClear", "清野 键位").SetValue(new KeyBind("V".ToCharArray()[0], KeyBindType.Press)));

            //WaveClear
            Config.AddSubMenu(new Menu("清线", "Wave"));
            Config.SubMenu("Wave").AddItem(new MenuItem("UseQWave", "使用 Q")).SetValue(true);
            Config.SubMenu("Wave").AddItem(new MenuItem("UseWWave", "使用 W")).SetValue(true);
            Config.SubMenu("Wave").AddItem(new MenuItem("UseEWave", "使用 E")).SetValue(true);
            Config.SubMenu("Wave").AddItem(new MenuItem("ActiveWave", "清线 范围").SetValue(new KeyBind("V".ToCharArray()[0], KeyBindType.Press)));



            //Drawings
            Config.AddSubMenu(new Menu("范围", "Drawings"));
            Config.SubMenu("Drawings").AddItem(new MenuItem("DrawQ", "范围 Q")).SetValue(true);
            Config.SubMenu("Drawings").AddItem(new MenuItem("DrawW", "范围 W")).SetValue(true);
            Config.SubMenu("Drawings").AddItem(new MenuItem("DrawE", "范围 E")).SetValue(true);
            Config.SubMenu("Drawings").AddItem(new MenuItem("DrawR", "范围 R")).SetValue(true);
            Config.SubMenu("Drawings").AddItem(new MenuItem("CircleLag", "延迟自由圈").SetValue(true));
            Config.SubMenu("Drawings").AddItem(new MenuItem("CircleQuality", "圈 质量").SetValue(new Slider(100, 100, 10)));
            Config.SubMenu("Drawings").AddItem(new MenuItem("CircleThickness", "圈 厚度").SetValue(new Slider(1, 10, 1)));

            Config.AddToMainMenu();

            Game.OnGameUpdate += OnGameUpdate;
            Drawing.OnDraw    += OnDraw;



            Game.PrintChat("<font color='#FF00BF'>Stoned Amumu Loaded By</font> <font color='#FF0000'>The</font><font color='#FFFF00'>Kush</font><font color='#40FF00'>Style</font>");
        }
Exemplo n.º 33
0
 private static double CountKillhits(Obj_AI_Hero enemy)
 {
     return(enemy.Health / MyHero.GetAutoAttackDamage(enemy));
 }
Exemplo n.º 34
0
        Vector3 GetWardFlashPositions(float maxTravelDistance, Obj_AI_Hero player, byte minHitRequirement, List <Obj_AI_Hero> enemies)
        {
            var destination = SelectBest(GetPositions(player, maxTravelDistance, minHitRequirement, enemies), player);

            return(destination);
        }
Exemplo n.º 35
0
        private static List <Tuple <Geometry.Polygon.Rectangle, Vector3, Vector3> > GeneratePositions(List <Tuple <Geometry.Polygon.Rectangle, byte, List <Obj_AI_Hero> > > minHitFilterResults, Obj_AI_Hero player)
        {
            var leePos = player.ServerPosition;

            foreach (var tuple in minHitFilterResults)
            {
                tuple.Item3.OrderBy(e => e.Distance(leePos));
            }

            return((from tuple in minHitFilterResults
                    let sres =
                        SGeneratePosition(tuple.Item1, tuple.Item3.Last().ServerPosition, tuple.Item3.First().ServerPosition)
                        select new Tuple <Geometry.Polygon.Rectangle, Vector3, Vector3>(tuple.Item1, sres.Item1, sres.Item2))
                   .ToList());
        }
Exemplo n.º 36
0
        // Best position order is maintained
        private static List <Vector3> TravelRangeFilter(List <Tuple <Geometry.Polygon.Rectangle, Vector3, Vector3> > generatePositionsResult, float maxTravelDistance, Obj_AI_Hero player)
        {
            var leePos  = player.ServerPosition;
            var results = new List <Vector3>();

            foreach (var tuple in generatePositionsResult)
            {
                if (leePos.Distance(tuple.Item2) <= maxTravelDistance)
                {
                    results.Add(tuple.Item2);
                }

                if (leePos.Distance(tuple.Item3) <= maxTravelDistance)
                {
                    results.Add(tuple.Item3);
                }
            }
            return(results);
        }
Exemplo n.º 37
0
 public static bool TeleportTurret(Obj_AI_Hero vTarget)
 {
     return
         (ObjectManager.Get <Obj_AI_Hero>()
          .Any(player => !player.IsDead && player.IsMe && UnderAllyTurret(ObjectManager.Player)));
 }
Exemplo n.º 38
0
 private float GetRealRRange(Obj_AI_Hero target)
 {
     return(R.Range + Player.BoundingRadius + target.BoundingRadius);
 }
Exemplo n.º 39
0
 private static bool eBuff(Obj_AI_Hero target)
 {
     return(target.Buffs.Any(buff => buff.Name == "NocturneUnspeakableHorror"));
 }
Exemplo n.º 40
0
 public int enemiesInRange(Obj_AI_Hero obj, float range)
 {
     return(obj.CountEnemiesInRange(range));
 }
Exemplo n.º 41
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            _player = ObjectManager.Player;
            if (ObjectManager.Player.BaseSkinName != ChampionName)
            {
                return;
            }

            _q = new Spell(SpellSlot.Q, 830f);
            _w = new Spell(SpellSlot.W, 200f);
            _e = new Spell(SpellSlot.E, 420f);
            _r = new Spell(SpellSlot.R, 825f);

            _q.SetSkillshot(0.35f, 200f, 1800, false, SkillshotType.SkillshotCircle);

            SpellList.Add(_q);
            SpellList.Add(_w);
            SpellList.Add(_e);
            SpellList.Add(_r);

            _bilge      = new Items.Item(3144, 475f);
            _blade      = new Items.Item(3153, 425f);
            _hydra      = new Items.Item(3074, 250f);
            _tiamat     = new Items.Item(3077, 250f);
            _rand       = new Items.Item(3143, 490f);
            _lotis      = new Items.Item(3190, 590f);
            _igniteSlot = _player.GetSpellSlot("SummonerDot");
            SetSmiteSlot();

            //D Diana
            _config = new Menu("D-Diana", "D-Diana", true);

            //TargetSelector
            TargetSelectorMenu = new Menu("Hedef Secici", "Hedef Secici");
            TargetSelector.AddToMenu(TargetSelectorMenu);
            _config.AddSubMenu(TargetSelectorMenu);

            //Orbwalker
            _config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));
            _orbwalker = new Orbwalking.Orbwalker(_config.SubMenu("Orbwalking"));

            //Combo
            _config.AddSubMenu(new Menu("Kombo", "Kombo"));
            _config.SubMenu("Kombo").AddItem(new MenuItem("KombodaIgniteKullanımı", "Ignite Kullan(rush for it)")).SetValue(true);
            _config.SubMenu("Kombo").AddItem(new MenuItem("smiteKombo", "Use Smite in target")).SetValue(true);
            _config.SubMenu("Kombo").AddItem(new MenuItem("UseQCombo", "Use Q")).SetValue(true);
            _config.SubMenu("Kombo").AddItem(new MenuItem("UseWCombo", "Use W")).SetValue(true);
            _config.SubMenu("Kombo").AddItem(new MenuItem("UseECombo", "Use E")).SetValue(true);
            _config.SubMenu("Kombo").AddItem(new MenuItem("UseRCombo", "Use R")).SetValue(true);
            _config.SubMenu("Kombo").AddItem(new MenuItem("UseRSecond", "Use Second R")).SetValue(false);
            _config.SubMenu("Kombo").AddItem(new MenuItem("NormalKombo", "Q-R Combo")).SetValue(true);
            _config.Item("NormalKombo").ValueChanged += SwitchCombo;
            _config.SubMenu("Kombo").AddItem(new MenuItem("MisayaKombo", "R-Q Combo").SetValue(false));
            _config.Item("MisayaKombo").ValueChanged += SwitchMisaya;
            _config.SubMenu("Kombo")
            .AddItem(new MenuItem("ActiveCombo", "Combo!").SetValue(new KeyBind(32, KeyBindType.Press)));
            //_config.SubMenu("Combo").AddItem(new MenuItem("ActiveCombo2", "Combo2!").SetValue(new KeyBind(32, KeyBindType.Press)));


            //Items public static Int32 Tiamat = 3077, Hydra = 3074, Blade = 3153, Bilge = 3144, Rand = 3143, lotis = 3190;
            _config.AddSubMenu(new Menu("items", "items"));
            _config.SubMenu("items").AddSubMenu(new Menu("Offensive", "Offensive"));
            _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Tiamat", "Use Tiamat")).SetValue(true);
            _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Hydra", "Use Hydra")).SetValue(true);
            _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Bilge", "Use Bilge")).SetValue(true);
            _config.SubMenu("items")
            .SubMenu("Offensive")
            .AddItem(new MenuItem("BilgeEnemyhp", "If Enemy Hp <").SetValue(new Slider(85, 1, 100)));
            _config.SubMenu("items")
            .SubMenu("Offensive")
            .AddItem(new MenuItem("Bilgemyhp", "Or your Hp < ").SetValue(new Slider(85, 1, 100)));
            _config.SubMenu("items").SubMenu("Offensive").AddItem(new MenuItem("Blade", "Use Blade")).SetValue(true);
            _config.SubMenu("items")
            .SubMenu("Offensive")
            .AddItem(new MenuItem("BladeEnemyhp", "If Enemy Hp <").SetValue(new Slider(85, 1, 100)));
            _config.SubMenu("items")
            .SubMenu("Offensive")
            .AddItem(new MenuItem("Blademyhp", "Or Your  Hp <").SetValue(new Slider(85, 1, 100)));
            _config.SubMenu("items").AddSubMenu(new Menu("Deffensive", "Deffensive"));
            _config.SubMenu("items")
            .SubMenu("Deffensive")
            .AddItem(new MenuItem("Omen", "Use Randuin Omen"))
            .SetValue(true);
            _config.SubMenu("items")
            .SubMenu("Deffensive")
            .AddItem(new MenuItem("Omenenemys", "Randuin if enemys>").SetValue(new Slider(2, 1, 5)));
            _config.SubMenu("items")
            .SubMenu("Deffensive")
            .AddItem(new MenuItem("lotis", "Use Iron Solari"))
            .SetValue(true);
            _config.SubMenu("items")
            .SubMenu("Deffensive")
            .AddItem(new MenuItem("lotisminhp", "Solari if Ally Hp<").SetValue(new Slider(35, 1, 100)));
            _config.SubMenu("items").AddSubMenu(new Menu("Potions", "Potions"));
            _config.SubMenu("items")
            .SubMenu("Potions")
            .AddItem(new MenuItem("usehppotions", "Use Healt potion/Flask/Biscuit"))
            .SetValue(true);
            _config.SubMenu("items")
            .SubMenu("Potions")
            .AddItem(new MenuItem("usepotionhp", "If Health % <").SetValue(new Slider(35, 1, 100)));
            _config.SubMenu("items")
            .SubMenu("Potions")
            .AddItem(new MenuItem("usemppotions", "Use Mana potion/Flask/Biscuit"))
            .SetValue(true);
            _config.SubMenu("items")
            .SubMenu("Potions")
            .AddItem(new MenuItem("usepotionmp", "If Mana % <").SetValue(new Slider(35, 1, 100)));

            _config.AddSubMenu(new Menu("Harass", "Harass"));
            _config.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "Use Q")).SetValue(true);
            _config.SubMenu("Harass").AddItem(new MenuItem("UseWHarass", "Use W")).SetValue(true);
            _config.SubMenu("Harass")
            .AddItem(
                new MenuItem("ActiveHarass", "Harass key").SetValue(new KeyBind("X".ToCharArray()[0],
                                                                                KeyBindType.Press)));
            _config.SubMenu("Harass")
            .AddItem(
                new MenuItem("harasstoggle", "Harass(toggle)").SetValue(new KeyBind("G".ToCharArray()[0],
                                                                                    KeyBindType.Toggle)));
            _config.SubMenu("Harass")
            .AddItem(new MenuItem("Harrasmana", "Minimum Mana").SetValue(new Slider(60, 1, 100)));

            _config.AddSubMenu(new Menu("Farm", "Farm"));
            _config.SubMenu("Farm").AddSubMenu(new Menu("LastHit", "LastHit"));
            _config.SubMenu("Farm").SubMenu("LastHit").AddItem(new MenuItem("UseQLH", "Q LastHit")).SetValue(true);
            _config.SubMenu("Farm").SubMenu("LastHit").AddItem(new MenuItem("UseWLH", "W LaneClear")).SetValue(true);
            _config.SubMenu("Farm")
            .SubMenu("LastHit")
            .AddItem(new MenuItem("lastmana", "Minimum Mana% >").SetValue(new Slider(35, 1, 100)));
            _config.SubMenu("Farm")
            .SubMenu("LastHit")
            .AddItem(
                new MenuItem("ActiveLast", "LastHit!").SetValue(new KeyBind("X".ToCharArray()[0], KeyBindType.Press)));

            _config.SubMenu("Farm").AddSubMenu(new Menu("Lane", "Lane"));
            _config.SubMenu("Farm").SubMenu("Lane").AddItem(new MenuItem("UseQLane", "Use Q")).SetValue(true);
            _config.SubMenu("Farm").SubMenu("Lane").AddItem(new MenuItem("UseWLane", "Use W")).SetValue(true);
            _config.SubMenu("Farm")
            .SubMenu("Lane")
            .AddItem(
                new MenuItem("ActiveLane", "Farm key").SetValue(new KeyBind("V".ToCharArray()[0], KeyBindType.Press)));
            _config.SubMenu("Farm")
            .SubMenu("Lane")
            .AddItem(new MenuItem("Lanemana", "Minimum Mana").SetValue(new Slider(60, 1, 100)));

            //jungle
            _config.SubMenu("Farm").AddSubMenu(new Menu("Jungle", "Jungle"));
            _config.SubMenu("Farm").SubMenu("Jungle").AddItem(new MenuItem("UseQJungle", "Use Q")).SetValue(true);
            _config.SubMenu("Farm").SubMenu("Jungle").AddItem(new MenuItem("UseWJungle", "Use W")).SetValue(true);
            _config.SubMenu("Farm")
            .SubMenu("Jungle")
            .AddItem(
                new MenuItem("ActiveJungle", "Jungle key").SetValue(new KeyBind("V".ToCharArray()[0],
                                                                                KeyBindType.Press)));
            _config.SubMenu("Farm")
            .SubMenu("Jungle")
            .AddItem(new MenuItem("Junglemana", "Minimum Mana").SetValue(new Slider(60, 1, 100)));

            //Smite
            _config.AddSubMenu(new Menu("Smite", "Smite"));
            _config.SubMenu("Smite")
            .AddItem(
                new MenuItem("Usesmite", "Use Smite(toggle)").SetValue(new KeyBind("H".ToCharArray()[0],
                                                                                   KeyBindType.Toggle)));
            _config.SubMenu("Smite").AddItem(new MenuItem("Useblue", "Smite Blue Early ")).SetValue(true);
            _config.SubMenu("Smite")
            .AddItem(new MenuItem("manaJ", "Smite Blue Early if MP% <").SetValue(new Slider(35, 1, 100)));
            _config.SubMenu("Smite").AddItem(new MenuItem("Usered", "Smite Red Early ")).SetValue(true);
            _config.SubMenu("Smite")
            .AddItem(new MenuItem("healthJ", "Smite Red Early if HP% <").SetValue(new Slider(35, 1, 100)));

            //Extra
            _config.AddSubMenu(new Menu("Misc", "Misc"));
            _config.SubMenu("Misc").AddItem(new MenuItem("usePackets", "Usepackes")).SetValue(true);
            _config.SubMenu("Misc").AddItem(new MenuItem("AutoShield", "Auto W")).SetValue(true);
            // _config.SubMenu("Misc").AddItem(new MenuItem("Shieldper", "Self Health %")).SetValue(new Slider(40, 1, 100));
            _config.SubMenu("Misc")
            .AddItem(
                new MenuItem("Escape", "Escape Key!").SetValue(new KeyBind("T".ToCharArray()[0], KeyBindType.Press)));
            _config.SubMenu("Misc").AddItem(new MenuItem("Inter_E", "Interrupter E")).SetValue(true);
            _config.SubMenu("Misc").AddItem(new MenuItem("Gap_W", "GapClosers W")).SetValue(true);

            //Kill Steal
            _config.AddSubMenu(new Menu("KillSteal", "Ks"));
            _config.SubMenu("Ks").AddItem(new MenuItem("ActiveKs", "Use KillSteal")).SetValue(true);
            _config.SubMenu("Ks").AddItem(new MenuItem("UseQKs", "Use Q")).SetValue(true);
            _config.SubMenu("Ks").AddItem(new MenuItem("UseRKs", "Use R")).SetValue(true);
            _config.SubMenu("Ks")
            .AddItem(new MenuItem("TargetRange", "R use if range >").SetValue(new Slider(400, 200, 600)));
            _config.SubMenu("Ks").AddItem(new MenuItem("UseIgnite", "Use Ignite")).SetValue(true);

            //Damage after combo:
            MenuItem dmgAfterComboItem = new MenuItem("DamageAfterCombo", "Draw damage after combo").SetValue(true);

            Utility.HpBarDamageIndicator.DamageToUnit = ComboDamage;
            Utility.HpBarDamageIndicator.Enabled      = dmgAfterComboItem.GetValue <bool>();
            dmgAfterComboItem.ValueChanged           +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                Utility.HpBarDamageIndicator.Enabled = eventArgs.GetNewValue <bool>();
            };

            //Drawings
            _config.AddSubMenu(new Menu("Drawings", "Drawings"));
            _config.SubMenu("Drawings").AddItem(new MenuItem("DrawQ", "Draw Q")).SetValue(true);
            _config.SubMenu("Drawings").AddItem(new MenuItem("DrawW", "Draw W")).SetValue(true);
            _config.SubMenu("Drawings").AddItem(new MenuItem("DrawE", "Draw E")).SetValue(true);
            _config.SubMenu("Drawings").AddItem(new MenuItem("DrawR", "Draw R")).SetValue(true);
            _config.SubMenu("Drawings").AddItem(dmgAfterComboItem);
            _config.SubMenu("Drawings").AddItem(new MenuItem("Drawsmite", "Draw smite")).SetValue(true);
            _config.SubMenu("Drawings").AddItem(new MenuItem("ShowPassive", "Show Passive")).SetValue(true);
            _config.SubMenu("Drawings").AddItem(new MenuItem("combotext", "Show Selected Combo")).SetValue(true);
            _config.SubMenu("Drawings").AddItem(new MenuItem("CircleLag", "Lag Free Circles").SetValue(true));
            _config.SubMenu("Drawings")
            .AddItem(new MenuItem("CircleQuality", "Circles Quality").SetValue(new Slider(100, 100, 10)));
            _config.SubMenu("Drawings")
            .AddItem(new MenuItem("CircleThickness", "Circles Thickness").SetValue(new Slider(1, 10, 1)));

            _config.AddToMainMenu();

            new AssassinManager();
            Game.OnGameUpdate   += Game_OnGameUpdate;
            Drawing.OnDraw      += Drawing_OnDraw;
            GameObject.OnCreate += OnCreate;
            GameObject.OnDelete += OnDelete;
            Game.PrintChat("<font color='#881df2'>Diana By Diabaths With Misaya Combo by xSalice </font>Loaded!");
            Game.PrintChat(
                "<font color='#FF0000'>If You like my work and want to support me,  plz donate via paypal in </font> <font color='#FF9900'>[email protected]</font> (10) S");

            // Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast;
            Interrupter.OnPossibleToInterrupt += Interrupter_OnPossibleToInterrupt;
            AntiGapcloser.OnEnemyGapcloser    += AntiGapcloser_OnEnemyGapcloser;
        }
Exemplo n.º 42
0
        private void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(GetTargetRange(), TargetSelector.DamageType.Physical);

            if (target == null)
            {
                return;
            }
            var data = Program.IncDamages.GetAllyData(player.NetworkId);

            if (config.Item("usew", true).GetValue <bool>() && W.IsReady() && data.AnyCC)
            {
                W.Cast();
            }
            var eTarget = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Physical);
            var cmbdmg  = ComboDamage(target) + ItemHandler.GetItemsDamage(target);

            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, cmbdmg);
            }
            var dist = player.Distance(target);

            if (lastR > 4000f)
            {
                lastR = 0f;
            }
            if (config.Item("useq", true).GetValue <bool>() && Q.CanCast(target) &&
                dist < config.Item("useqMaxRange", true).GetValue <Slider>().Value&& !player.IsDashing())
            {
                if (dist < 550)
                {
                    Q.CastIfHitchanceEquals(target, HitChance.Medium);
                }
                else
                {
                    Q.CastIfHitchanceEquals(target, HitChance.High);
                }
            }
            if (config.Item("usee", true).GetValue <bool>() && E.CanCast(eTarget) &&
                dist < config.Item("useeMaxRange", true).GetValue <Slider>().Value)
            {
                E.Cast(eTarget);
            }
            if (config.Item("user", true).GetValue <bool>() && R.IsReady())
            {
                R.Range = rRanges[R.Level - 1];
            }
            if (config.Item("user", true).GetValue <bool>() && lastR.Equals(0) && !target.UnderTurret(true) &&
                R.CanCast(target) &&
                ((qTrailOnMe && eBuff(target) && target.MoveSpeed > player.MoveSpeed && dist > 360 &&
                  target.HealthPercent < 60) ||
                 (dist < rRanges[R.Level - 1] && dist > 900 &&
                  target.CountAlliesInRange(2000) >= target.CountEnemiesInRange(2000) &&
                  cmbdmg + Environment.Hero.GetAdOverTime(player, target, 5) > target.Health &&
                  (target.Health > Q.GetDamage(target) || !Q.IsReady())) ||
                 (player.HealthPercent < 40 && target.HealthPercent < 40 && target.CountAlliesInRange(1000) == 1 &&
                  target.CountEnemiesInRange(1000) == 1)))
            {
                R.Cast(target);
                lastR = System.Environment.TickCount;
            }
            if (config.Item("user", true).GetValue <bool>() && !lastR.Equals(0) && R.CanCast(target) &&
                ((cmbdmg * 1.6 + Environment.Hero.GetAdOverTime(player, target, 5) > target.Health ||
                  R.GetDamage(target) > target.Health ||
                  (qTrailOnMe && eBuff(target) && target.MoveSpeed > player.MoveSpeed && dist > 360 &&
                   target.HealthPercent < 60))))
            {
                var time = System.Environment.TickCount - lastR;
                if (time > 3500f || player.Distance(target) > E.Range || cmbdmg > target.Health ||
                    (player.HealthPercent < 40 && target.HealthPercent < 40))
                {
                    R.Cast(target);
                    lastR = 0f;
                }
            }
            var  ignitedmg = (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            bool hasIgnite = player.Spellbook.CanUseSpell(player.GetSpellSlot("SummonerDot")) == SpellState.Ready;

            if (config.Item("useIgnite").GetValue <bool>() && ignitedmg > target.Health && hasIgnite &&
                !E.CanCast(target))
            {
                player.Spellbook.CastSpell(player.GetSpellSlot("SummonerDot"), target);
            }
        }
Exemplo n.º 43
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Player = ObjectManager.Player;

            //check to see if correct champ
            if (Player.BaseSkinName != ChampionName)
            {
                return;
            }

            //intalize spell
            Q = new Spell(SpellSlot.Q, 650);
            W = new Spell(SpellSlot.W, 900);
            E = new Spell(SpellSlot.E, 1005);
            R = new Spell(SpellSlot.R, 650);

            W.SetSkillshot(1.25f, 230f, float.MaxValue, false, SkillshotType.SkillshotCircle);
            E.SetSkillshot(.2f, 330f, float.MaxValue, false, SkillshotType.SkillshotCircle);

            SpellList.Add(Q);
            SpellList.Add(W);
            SpellList.Add(E);
            SpellList.Add(R);

            IgniteSlot = Player.GetSpellSlot("SummonerDot");

            Dfg = Utility.Map.GetMap()._MapType == Utility.Map.MapType.TwistedTreeline ||
                  Utility.Map.GetMap()._MapType == Utility.Map.MapType.CrystalScar
                ? new Items.Item(3188, 750)
                : new Items.Item(3128, 750);

            //Create the menu
            menu = new Menu(ChampionName, ChampionName, true);

            //Orbwalker submenu
            var orbwalkerMenu = new Menu("走砍", "my_Orbwalker");

            LXOrbwalker.AddToMenu(orbwalkerMenu);
            menu.AddSubMenu(orbwalkerMenu);

            //Target selector
            var targetSelectorMenu = new Menu("目标选择", "Target Selector");

            SimpleTs.AddToMenu(targetSelectorMenu);
            menu.AddSubMenu(targetSelectorMenu);


            //Keys
            menu.AddSubMenu(new Menu("热键", "Keys"));
            menu.SubMenu("Keys")
            .AddItem(
                new MenuItem("ComboActive", "连招").SetValue(
                    new KeyBind(menu.Item("Combo_Key").GetValue <KeyBind>().Key, KeyBindType.Press)));
            menu.SubMenu("Keys")
            .AddItem(
                new MenuItem("HarassActive", "骚扰").SetValue(
                    new KeyBind(menu.Item("LaneClear_Key").GetValue <KeyBind>().Key, KeyBindType.Press)));
            menu.SubMenu("Keys")
            .AddItem(
                new MenuItem("HarassActiveT", "骚扰 (锁定)").SetValue(new KeyBind("Y".ToCharArray()[0],
                                                                              KeyBindType.Toggle)));
            menu.SubMenu("Keys")
            .AddItem(
                new MenuItem("LastHitQQ", "Q补兵").SetValue(new KeyBind("A".ToCharArray()[0],
                                                                      KeyBindType.Press)));
            menu.SubMenu("Keys")
            .AddItem(
                new MenuItem("LastHitQQ2", "Q补兵(锁定)").SetValue(new KeyBind("J".ToCharArray()[0],
                                                                           KeyBindType.Toggle)));
            menu.SubMenu("Keys")
            .AddItem(
                new MenuItem("wPoke", "E中W").SetValue(new KeyBind("N".ToCharArray()[0],
                                                                  KeyBindType.Toggle)));
            menu.SubMenu("Keys")
            .AddItem(
                new MenuItem("escape", "逃跑").SetValue(new KeyBind(
                                                          menu.Item("Flee_Key").GetValue <KeyBind>().Key, KeyBindType.Press)));

            //Combo menu:
            menu.AddSubMenu(new Menu("连招", "Combo"));
            menu.SubMenu("Combo").AddItem(new MenuItem("selected", "锁定目标").SetValue(true));
            menu.SubMenu("Combo").AddItem(new MenuItem("UseQCombo", "使用Q").SetValue(true));
            menu.SubMenu("Combo").AddItem(new MenuItem("UseWCombo", "使用W").SetValue(true));
            menu.SubMenu("Combo").AddItem(new MenuItem("UseECombo", "使用E").SetValue(true));
            menu.SubMenu("Combo").AddItem(new MenuItem("waitW", "E中才W").SetValue(true));
            menu.SubMenu("Combo").AddItem(new MenuItem("UseRCombo", "使用R").SetValue(true));
            menu.SubMenu("Combo").AddItem(new MenuItem("dfg", "使用冥火").SetValue(true));
            menu.SubMenu("Combo")
            .AddItem(new MenuItem("dfgMode", "模式").SetValue(new StringList(new[] { "Combo", "DFG-R" }, 0)));
            menu.SubMenu("Combo").AddItem(new MenuItem("ignite", "使用点燃").SetValue(true));
            menu.SubMenu("Combo")
            .AddItem(new MenuItem("igniteMode", "模式").SetValue(new StringList(new[] { "Combo", "KS" }, 0)));

            //Harass menu:
            menu.AddSubMenu(new Menu("骚扰", "Harass"));
            menu.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "使用Q").SetValue(true));
            menu.SubMenu("Harass").AddItem(new MenuItem("UseWHarass", "使用W").SetValue(false));
            menu.SubMenu("Harass").AddItem(new MenuItem("UseEHarass", "使用E").SetValue(true));
            menu.SubMenu("Harass").AddItem(new MenuItem("mana", "蓝量 > %").SetValue(new Slider(75, 0, 100)));

            //Misc Menu:
            menu.AddSubMenu(new Menu("杂项", "Misc"));
            menu.SubMenu("Misc").AddItem(new MenuItem("UseInt", "R打断").SetValue(true));
            menu.SubMenu("Misc").AddItem(new MenuItem("UseGap", "W突进").SetValue(true));
            menu.SubMenu("Misc").AddItem(new MenuItem("packet", "封包").SetValue(true));
            menu.SubMenu("Misc").AddItem(new MenuItem("overKill", "秒人").SetValue(true));
            menu.SubMenu("Misc").AddItem(new MenuItem("smartKS", "只能抢头").SetValue(true));

            menu.SubMenu("Misc").AddSubMenu(new Menu("不使用R", "DontUlt"));

            foreach (Obj_AI_Hero enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.Team != Player.Team))
            {
                menu.SubMenu("Misc")
                .SubMenu("DontUlt")
                .AddItem(new MenuItem("DontUlt" + enemy.BaseSkinName, enemy.BaseSkinName).SetValue(false));
            }

            menu.SubMenu("Misc").AddSubMenu(new Menu("不用冥火", "DontDFG"));

            foreach (Obj_AI_Hero enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.Team != Player.Team))
            {
                menu.SubMenu("Misc")
                .SubMenu("DontDFG")
                .AddItem(new MenuItem("DontDFG" + enemy.BaseSkinName, enemy.BaseSkinName).SetValue(false));
            }

            //Damage after combo:
            MenuItem dmgAfterComboItem = new MenuItem("DamageAfterCombo", "显示伤害").SetValue(true);

            Utility.HpBarDamageIndicator.DamageToUnit = GetComboDamage;
            Utility.HpBarDamageIndicator.Enabled      = dmgAfterComboItem.GetValue <bool>();
            dmgAfterComboItem.ValueChanged           +=
                delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                Utility.HpBarDamageIndicator.Enabled = eventArgs.GetNewValue <bool>();
            };

            //Drawings menu:
            menu.AddSubMenu(new Menu("显示", "Drawings"));
            menu.SubMenu("Drawings")
            .AddItem(new MenuItem("QRange", "Q范围").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255))));
            menu.SubMenu("Drawings")
            .AddItem(new MenuItem("WRange", "W范围").SetValue(new Circle(true, Color.FromArgb(100, 255, 0, 255))));
            menu.SubMenu("Drawings")
            .AddItem(new MenuItem("ERange", "E范围").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255))));
            menu.SubMenu("Drawings")
            .AddItem(new MenuItem("RRange", "R范围").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255))));
            menu.SubMenu("Drawings")
            .AddItem(new MenuItem("manaStatus", "蓝量").SetValue(true));
            menu.SubMenu("Drawings")
            .AddItem(dmgAfterComboItem);
            menu.AddToMainMenu();

            menu.AddSubMenu(new Menu("超神汉化", "by wuwei"));
            menu.SubMenu("by wuwei").AddItem(new MenuItem("qunhao", "汉化群:386289593"));
            menu.SubMenu("by wuwei").AddItem(new MenuItem("qunhao2", "娃娃群:158994507"));
            //Events
            Game.OnGameUpdate += Game_OnGameUpdate;
            Drawing.OnDraw    += Drawing_OnDraw;
            Interrupter.OnPossibleToInterrupt += Interrupter_OnPosibleToInterrupt;
            AntiGapcloser.OnEnemyGapcloser    += AntiGapcloser_OnEnemyGapcloser;
            Game.PrintChat(ChampionName + " Loaded! --- by xSalice");
        }
Exemplo n.º 44
0
 private static bool qTrail(Obj_AI_Hero target)
 {
     return(target.Buffs.Any(buff => buff.Name == "nocturneduskbringertrail"));
 }
Exemplo n.º 45
0
        private static float GetComboDamage(Obj_AI_Hero enemy)
        {
            IEnumerable <SpellSlot> spellCombo = new[] { SpellSlot.Q, SpellSlot.W, SpellSlot.E, SpellSlot.R };

            return((float)Damage.GetComboDamage(Player, enemy, spellCombo));
        }
Exemplo n.º 46
0
        private static void Game_OnGameUpdate(EventArgs args)
        {
            _player = ObjectManager.Player;

            _orbwalker.SetAttack(true);
            if (_config.Item("Usesmite").GetValue <KeyBind>().Active)
            {
                Smiteuse();
            }
            if (_config.Item("ActiveLast").GetValue <KeyBind>().Active&&
                (100 * (_player.Mana / _player.MaxMana)) > _config.Item("lastmana").GetValue <Slider>().Value)
            {
                LastHit();
            }
            if (_config.Item("ActiveCombo").GetValue <KeyBind>().Active)
            {
                int assassinRange = TargetSelectorMenu.Item("AssassinSearchRange").GetValue <Slider>().Value;

                IEnumerable <Obj_AI_Hero> xEnemy = ObjectManager.Get <Obj_AI_Hero>()
                                                   .Where(
                    enemy =>
                    enemy.Team != ObjectManager.Player.Team && !enemy.IsDead && enemy.IsVisible &&
                    TargetSelectorMenu.Item("Assassin" + enemy.ChampionName) != null &&
                    TargetSelectorMenu.Item("Assassin" + enemy.ChampionName).GetValue <bool>() &&
                    ObjectManager.Player.Distance(enemy) < assassinRange);

                Obj_AI_Hero[] objAiHeroes = xEnemy as Obj_AI_Hero[] ?? xEnemy.ToArray();

                if (objAiHeroes.Length > 2)
                {
                    Game.PrintChat(objAiHeroes[0].Distance(objAiHeroes[1]).ToString());
                }

                Obj_AI_Hero t = !objAiHeroes.Any()
                    ? TargetSelector.GetTarget(_q.Range, TargetSelector.DamageType.Magical)
                    : objAiHeroes[0];
                if (_config.Item("Misayacombo").GetValue <bool>())
                {
                    Misaya(t);
                }
                else if (_config.Item("Normalcombo").GetValue <bool>())
                {
                    Combo(t);
                }
            }
            if ((_config.Item("ActiveHarass").GetValue <KeyBind>().Active ||
                 _config.Item("harasstoggle").GetValue <KeyBind>().Active) &&
                (100 * (_player.Mana / _player.MaxMana)) > _config.Item("Harrasmana").GetValue <Slider>().Value)
            {
                Harass();
            }
            if (_config.Item("ActiveLane").GetValue <KeyBind>().Active&&
                (100 * (_player.Mana / _player.MaxMana)) > _config.Item("Lanemana").GetValue <Slider>().Value)
            {
                Farm();
            }
            if (_config.Item("ActiveJungle").GetValue <KeyBind>().Active&&
                (100 * (_player.Mana / _player.MaxMana)) > _config.Item("Junglemana").GetValue <Slider>().Value)
            {
                JungleClear();
            }
            Usepotion();
            if (_config.Item("Escape").GetValue <KeyBind>().Active)
            {
                Tragic();
            }
            if (_config.Item("ActiveKs").GetValue <bool>())
            {
                KillSteal();
            }

            /* if (_config.Item("AutoShield").GetValue<bool>() && !_config.Item("ActiveCombo").GetValue<KeyBind>().Active)
             * {
             *  AutoW();
             * }*/
        }
Exemplo n.º 47
0
        private static void UseSpells(bool useQ, bool useW, bool useE, bool useR, string Source)
        {
            var         range         = E.IsReady() ? E.Range : Q.Range;
            var         focusSelected = menu.Item("selected").GetValue <bool>();
            Obj_AI_Hero target        = SimpleTs.GetTarget(range, SimpleTs.DamageType.Magical);

            if (SimpleTs.GetSelectedTarget() != null)
            {
                if (focusSelected && SimpleTs.GetSelectedTarget().Distance(Player.ServerPosition) < range)
                {
                    target = SimpleTs.GetSelectedTarget();
                }
            }

            int IgniteMode = menu.Item("igniteMode").GetValue <StringList>().SelectedIndex;
            int dfgMode    = menu.Item("dfgMode").GetValue <StringList>().SelectedIndex;

            bool hasMana = manaCheck();

            float dmg   = GetComboDamage(target);
            bool  waitW = menu.Item("waitW").GetValue <bool>();

            if (Source == "Harass")
            {
                int   mana        = menu.Item("mana").GetValue <Slider>().Value;
                float manaPercent = Player.Mana / Player.MaxMana * 100;

                if (manaPercent < mana)
                {
                    return;
                }
            }

            if (useE && target != null && E.IsReady() && Player.Distance(target) < E.Range)
            {
                if (!waitW || W.IsReady())
                {
                    castE(target);
                    return;
                }
            }

            if (useW && target != null && Player.Distance(target) <= W.Range)
            {
                if (menu.Item("wPoke").GetValue <KeyBind>().Active)
                {
                    var pred = W.GetPrediction(target);
                    if (pred.Hitchance == HitChance.Immobile && W.IsReady())
                    {
                        W.Cast(target.ServerPosition, Packets());
                    }
                }
                else if (W.IsReady())
                {
                    PredictionOutput pred = Prediction.GetPrediction(target, 1.25f);
                    if (pred.Hitchance >= HitChance.High && W.IsReady())
                    {
                        W.Cast(pred.CastPosition, Packets());
                    }
                }
            }

            //dfg
            if (target != null && Dfg.IsReady() && menu.Item("dfg").GetValue <bool>() && dfgMode == 0 &&
                GetComboDamage(target) > target.Health + 30 && Source == "Combo" && hasMana)
            {
                if ((menu.Item("DontDFG" + target.BaseSkinName) != null &&
                     menu.Item("DontDFG" + target.BaseSkinName).GetValue <bool>() == false))
                {
                    Dfg.Cast(target);
                }
            }

            //Ignite
            if (target != null && menu.Item("ignite").GetValue <bool>() && IgniteSlot != SpellSlot.Unknown &&
                Player.SummonerSpellbook.CanUseSpell(IgniteSlot) == SpellState.Ready && Source == "Combo" && hasMana)
            {
                if (IgniteMode == 0 && dmg > target.Health)
                {
                    Player.SummonerSpellbook.CastSpell(IgniteSlot, target);
                }
            }

            //Q
            if (useQ && Q.IsReady() && Player.Distance(target) <= Q.Range && target != null)
            {
                Q.CastOnUnit(target, Packets());
            }

            //R
            if (target != null && R.IsReady())
            {
                useR = rTarget(target) && useR;
                if (useR)
                {
                    castR(target, dmg);
                }
            }
        }
Exemplo n.º 48
0
 public static double GetIgniteDamage(this Obj_AI_Hero source, Obj_AI_Hero target)
 {
     return(50 + 20 * source.Level - target.HPRegenRate / 5 * 3);
 }
        private static void Check(bool dash,
                                  Obj_AI_Hero sender,
                                  Vector3 startPosition,
                                  Vector3 endPosition,
                                  float endTime,
                                  bool targeted)
        {
            try
            {
                if (!sender.IsValid || !sender.IsEnemy || sender.IsDead)
                {
                    return;
                }
                if (Game.Time - endTime >= 5)
                {
                    return;
                }
                if (endPosition.Distance(ObjectManager.Player.ServerPosition) >= 2000)
                {
                    return;
                }

                foreach (var entry in Menues)
                {
                    var uniqueId = entry.Key;
                    var menu     = entry.Value;
                    if (HeroListManager.Check(uniqueId, sender))
                    {
                        var distance  = menu.Item(menu.Name + ".gap-" + uniqueId + ".distance").GetValue <Slider>().Value;
                        var dangerous = menu.Item(menu.Name + ".gap-" + uniqueId + ".dangerous").GetValue <bool>();
                        if (startPosition.Distance(ObjectManager.Player.Position) >= distance &&
                            (!dangerous || IsDangerous(sender, startPosition, endPosition, targeted)))
                        {
                            var delay     = menu.Item(menu.Name + ".gap-" + uniqueId + ".delay").GetValue <Slider>().Value;
                            var randomize =
                                menu.Item(menu.Name + ".gap-" + uniqueId + ".randomize").GetValue <Slider>().Value;
                            if (delay > 1)
                            {
                                delay = Random.Next((int)(delay * 0.9f), (int)(delay * 1.1f));
                            }
                            if (randomize > 0)
                            {
                                if (!startPosition.Equals(Vector3.Zero))
                                {
                                    startPosition.X += Random.Next(0, randomize * 2 + 1) - randomize;
                                    startPosition.Y += Random.Next(0, randomize * 2 + 1) - randomize;
                                }
                                if (!endPosition.Equals(Vector3.Zero))
                                {
                                    endPosition.X += Random.Next(0, randomize * 2 + 1) - randomize;
                                    endPosition.Y += Random.Next(0, randomize * 2 + 1) - randomize;
                                }
                            }
                            Utility.DelayAction.Add(
                                Math.Max(1, dash ? delay - 100 : delay),
                                () =>
                                OnGapcloser.RaiseEvent(
                                    null,
                                    new GapcloserManagerArgs(uniqueId, sender, startPosition, endPosition, endTime)));
                        }
                    }
                }
                OnGapcloser.RaiseEvent(
                    null, new GapcloserManagerArgs(string.Empty, sender, startPosition, endPosition, endTime));
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
Exemplo n.º 50
0
        internal static void EQWLogic(Obj_AI_Hero target, bool useQ, bool useW, bool useE)
        {
            if (target == null || !target.IsValidTarget())
            {
                target = TargetSelector.GetTarget(MyLogic.E.Range + 300f);
            }

            if (target == null || !target.IsValidTarget() || !target.IsValidTarget())
            {
                return;
            }

            if (useE && MyLogic.E.Ready && target.IsValidTarget(MyLogic.E.Range + 300f))
            {
                var ePos = GetEPosition(target);

                if (ePos != Vector3.Zero && ePos.DistanceToPlayer() <= MyLogic.E.Range && CanCastE(ePos, target))
                {
                    if (MyLogic.MiscMenu["FlowersKatarina.MiscMenu.EHumanizer"].As <MenuSliderBool>().Enabled)
                    {
                        MyDelayAction.Queue(
                            MyLogic.MiscMenu["FlowersKatarina.MiscMenu.EHumanizer"].As <MenuSliderBool>().Value,
                            () => MyLogic.E.Cast(ePos));
                    }
                    else
                    {
                        MyLogic.E.Cast(ePos);
                    }
                }
            }

            if (useQ && MyLogic.Q.Ready && target.IsValidTarget(MyLogic.Q.Range) && !MyLogic.E.Ready)
            {
                if (target.IsValidTarget(MyLogic.Q.Range))
                {
                    if (!(MyLogic.W.Ready && MyLogic.E.Ready) && target.DistanceToPlayer() <= 300 ||
                        !target.IsFacingUnit(ObjectManager.GetLocalPlayer()) && target.DistanceToPlayer() > 300)
                    {
                        MyLogic.Q.CastOnUnit(target);
                    }
                }
                else if (target.IsValidTarget(MyLogic.E.Range) &&
                         (MyLogic.Orbwalker.Mode == OrbwalkingMode.Combo &&
                          MyLogic.ComboMenu["FlowersKatarina.ComboMenu.QOnMinion"].Enabled ||
                          MyLogic.Orbwalker.Mode == OrbwalkingMode.Mixed &&
                          MyLogic.HarassMenu["FlowersKatarina.HarassMenu.QOnMinion"].Enabled))
                {
                    var extraDagger = target.ServerPosition.Extend(ObjectManager.GetLocalPlayer().ServerPosition, 350f);
                    var min         = ObjectManager.Get <Obj_AI_Base>().Aggregate((x, y) => x.Distance(extraDagger) < y.Distance(extraDagger) ? x : y);

                    if (min.Distance(extraDagger) < 130)
                    {
                        MyLogic.Q.CastOnUnit(min);
                    }
                }
            }

            if (useW && MyLogic.W.Ready && target.IsValidTarget(MyLogic.W.Range))
            {
                MyLogic.W.Cast();
            }
        }
Exemplo n.º 51
0
        private int CountEnemiesInRangePredicted(float range, float width, float time, Obj_AI_Hero t = null)
        {
            int  cnt       = 0;
            bool hasTarget = false;

            foreach (var enemy in HeroManager.Enemies)
            {
                var prediction = SPrediction.Prediction.GetPrediction(enemy, width, time, 0, range, false, SkillshotType.SkillshotCircle, enemy.GetWaypoints(), enemy.AvgMovChangeTime(), enemy.LastMovChangeTime(), enemy.AvgPathLenght(), Ball.Position.To2D(), Ball.Position.To2D());
                if (prediction.HitChance > HitChance.Low)
                {
                    if (prediction.UnitPosition.Distance(Ball.Position.To2D()) < range)
                    {
                        cnt++;
                        if (t != null && enemy.NetworkId == t.NetworkId)
                        {
                            hasTarget = true;
                        }
                    }
                }
            }

            if (t != null && cnt == 1 && !hasTarget)
            {
                return(0);
            }

            return(cnt);
        }
Exemplo n.º 52
0
        internal static float GetComboDamage(Obj_AI_Hero target)
        {
            if (target == null || target.IsDead || !target.IsValidTarget())
            {
                return(0);
            }

            if (target.IsUnKillable())
            {
                return(0);
            }

            var damage = 0d;

            if (MyLogic.IgniteSlot != SpellSlot.Unknown && MyLogic.Ignite.Ready)
            {
                damage += ObjectManager.GetLocalPlayer().GetIgniteDamage(target);
            }

            if (MyLogic.Q.Ready)
            {
                damage += GetDamage(MyLogic.Q, target);
            }

            if (MyLogic.W.Ready)
            {
                damage += GetDamage(MyLogic.W, target);
            }

            if (MyLogic.E.Ready)
            {
                damage += GetDamage(MyLogic.E, target);
            }

            if (MyLogic.R.Ready)
            {
                damage += GetDamage(MyLogic.R, target);
            }

            if (ObjectManager.GetLocalPlayer().ChampionName == "Katarina")
            {
                var targetDagger =
                    ObjectManager.Get <Obj_AI_Minion>()
                    .Where(
                        x =>
                        x.UnitSkinName == "testcuberender" && x.Health > 1 && x.IsValid &&
                        x.Distance(target) <= 340).ToArray();

                if (targetDagger.Any())
                {
                    damage += GetKataPassiveDamage(target) * targetDagger.Count();
                }
            }

            if (ObjectManager.GetLocalPlayer().HasBuff("SummonerExhaust"))
            {
                damage = damage * 0.6f;
            }

            if (target.UnitSkinName == "Morderkaiser")
            {
                damage -= target.Mana;
            }

            if (target.HasBuff("GarenW"))
            {
                damage = damage * 0.7f;
            }

            if (target.HasBuff("ferocioushowl"))
            {
                damage = damage * 0.7f;
            }

            if (target.HasBuff("BlitzcrankManaBarrierCD") && target.HasBuff("ManaBarrier"))
            {
                damage -= target.Mana / 2f;
            }

            return((float)damage);
        }
Exemplo n.º 53
0
        private static void UseE(Obj_AI_Base ForceTarget = null)
        {
            if (!_e.IsReady())
            {
                return;
            }
            var target = Gettarget(525 + 700);

            if (ForceTarget != null)
            {
                target = ForceTarget;
            }
            if (target != null && target.IsValidTarget(1025) && !target.IsZombie && _e.IsReady())
            {
                Obj_AI_Hero startHeroPos    = HeroManager.Enemies.Where(x => x.IsValidTarget(525) && x.NetworkId != target.NetworkId && x.Distance(target) <= 700).MinOrDefault(x => x.Health);
                Obj_AI_Hero startHeroExtend = HeroManager.Enemies.Where(x => x.IsValidTarget() && x.NetworkId != target.NetworkId && x.Distance(target) <= 700 &&
                                                                        target.Position.To2D().Extend(x.Position.To2D(), 700).Distance(Player.Position) <= 525).MinOrDefault(x => x.Health);
                Obj_AI_Hero endHeroPos = HeroManager.Enemies.Where(x => x.IsValidTarget(525 + 700) && x.NetworkId != target.NetworkId && target.IsValidTarget(525) &&
                                                                   x.Distance(target) <= 700).MinOrDefault(x => x.Health);
                Obj_AI_Hero endHeroExtend = HeroManager.Enemies.Where(x => x.IsValidTarget(1025) && x.NetworkId != target.NetworkId &&
                                                                      x.Distance(target) <= 700 && x.Position.To2D().Extend(target.Position.To2D(), 700).Distance(Player.Position) <= 525).MinOrDefault(x => x.Health);
                Vector3 DefaultPos = Player.Distance(target.Position) >= 525 ? Player.Position.To2D().Extend(target.Position.To2D(), 525).To3D() : target.Position;
                if (startHeroPos != null)
                {
                    _e.SetSkillshot(0.25f, 80, 1050, false, SkillshotType.SkillshotLine, startHeroPos.Position, startHeroPos.Position);
                    CastE(target);
                }
                else if (startHeroExtend != null)
                {
                    //float r = 525;
                    //float d = target.Distance(Player);
                    //float h = Geometry.Distance(Player.Position.To2D(), target.Position.To2D(), startHeroExtend.Position.To2D());
                    //float a = (float)Math.Sqrt(d * d - h * h);
                    //float b = (float)Math.Sqrt(r * r - h * h);
                    //float c = a - b;
                    _e.SetSkillshot(0.25f, 80, 1050, false, SkillshotType.SkillshotLine, target.Position.To2D().Extend(startHeroExtend.Position.To2D(), 700).To3D(), target.Position.To2D().Extend(startHeroExtend.Position.To2D(), 700).To3D());
                    CastE(target);
                }
                else if (endHeroPos != null)
                {
                    _e.SetSkillshot(0.25f, 80, 1050, false, SkillshotType.SkillshotLine, target.Position, target.Position);
                    CastE(endHeroPos);
                }
                else if (endHeroExtend != null)
                {
                    //float r = 525;
                    //float d = endHeroExtend.Distance(Player);
                    //float h = Geometry.Distance(Player.Position.To2D(), target.Position.To2D(), endHeroExtend.Position.To2D());
                    //float a = (float)Math.Sqrt(d * d - h * h);
                    //float b = (float)Math.Sqrt(r * r - h * h);
                    //float c = a - b;
                    _e.SetSkillshot(0.25f, 80, 1050, false, SkillshotType.SkillshotLine, endHeroExtend.Position.To2D().Extend(target.Position.To2D(), 700).To3D(), endHeroExtend.Position.To2D().Extend(target.Position.To2D(), 700).To3D());
                    CastE(endHeroExtend);
                }
                else
                {
                    _e.SetSkillshot(0.25f, 80, 1050, false, SkillshotType.SkillshotLine, DefaultPos, DefaultPos);
                    CastE(target);
                }
            }
        }
Exemplo n.º 54
0
 private static bool xEnemyHaveSoulShackle(Obj_AI_Hero vTarget)
 {
     return(vTarget.HasBuff("LeblancSoulShackle"));
 }
Exemplo n.º 55
0
 /// <summary>
 /// Determines if the target is lightly impaired (slowed)
 /// </summary>
 /// <param name="enemy">The target</param>
 /// <returns>Whether the target is lightly impaired</returns>
 private static bool IsLightlyImpaired(Obj_AI_Hero enemy)
 {
     return(enemy.HasBuffOfType(BuffType.Slow));
 }
Exemplo n.º 56
0
        public override void OnUpdate(EventArgs args)
        {
            try
            {
                if (_qTarget != null)
                {
                    if (Environment.TickCount - _qTick >= QFollowTime)
                    {
                        _qTarget = null;
                    }
                }

                if (ComboMode)
                {
                    if (Q.CastCheck(Target, "ComboQ") && FollowQBlock)
                    {
                        if (Q.Cast(Target) == Spell.CastStates.SuccessfullyCasted)
                        {
                            _qTick   = Environment.TickCount;
                            _qTarget = Target;
                        }
                    }
                    if (Q.CastCheck(_qTarget, "ComboQFollow"))
                    {
                        if (FollowQ)
                        {
                            Q.Cast();
                        }
                    }

                    if (W.CastCheck(Target, "ComboW"))
                    {
                        EngageFriendLatern();
                    }

                    if (E.CastCheck(Target, "ComboE"))
                    {
                        if (Helpers.AllyBelowHp(ConfigValue <Slider>("ComboHealthE").Value, E.Range) != null)
                        {
                            E.Cast(Target.Position);
                        }
                        else
                        {
                            E.Cast(Helpers.ReversePosition(ObjectManager.Player.Position, Target.Position));
                        }
                    }

                    if (R.CastCheck(Target, "ComboR"))
                    {
                        if (Helpers.EnemyInRange(ConfigValue <Slider>("ComboCountR").Value, R.Range))
                        {
                            R.Cast();
                        }
                    }
                }

                if (HarassMode)
                {
                    if (Q.CastCheck(Target, "HarassQ") && FollowQBlock)
                    {
                        Q.Cast(Target);
                    }

                    if (W.CastCheck(Target, "HarassW"))
                    {
                        SafeFriendLatern();
                    }

                    if (E.CastCheck(Target, "HarassE"))
                    {
                        if (Helpers.AllyBelowHp(ConfigValue <Slider>("HarassHealthE").Value, E.Range) != null)
                        {
                            E.Cast(Target.Position);
                        }
                        else
                        {
                            E.Cast(Helpers.ReversePosition(ObjectManager.Player.Position, Target.Position));
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public bool CheckSingle(UltimateModeType mode, Obj_AI_Hero target)
        {
            try
            {
                if (_menu == null || target == null || !target.IsValidTarget())
                {
                    return(false);
                }

                if (ShouldSingle(mode))
                {
                    var minHealth = _menu.Item(_menu.Name + ".ultimate.single.min-health").GetValue <Slider>().Value;
                    if (Spells != null &&
                        !Spells.Any(
                            s =>
                            s.Slot != SpellSlot.R && s.IsReady() && s.IsInRange(target) &&
                            s.GetDamage(target, 1) > 10 && Math.Abs(s.Speed - float.MaxValue) < 1 ||
                            s.From.Distance(target.ServerPosition) / s.Speed + s.Delay <= 1.0f))
                    {
                        minHealth = 0;
                    }
                    if (target.HealthPercent < minHealth)
                    {
                        return(false);
                    }

                    var alliesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue <Slider>().Value;
                    var alliesMax   = _menu.Item(_menu.Name + ".ultimate.single.max-add-allies").GetValue <Slider>().Value;

                    var enemiesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue <Slider>().Value;
                    var enemiesMax   =
                        _menu.Item(_menu.Name + ".ultimate.single.max-add-enemies").GetValue <Slider>().Value;

                    var pos = ObjectManager.Player.Position.Extend(
                        target.Position, ObjectManager.Player.Distance(target) / 2f);
                    var aCount =
                        GameObjects.AllyHeroes.Count(
                            h => h.IsValid && !h.IsDead && !h.IsMe && h.Distance(pos) <= alliesRange);
                    var eCount =
                        GameObjects.EnemyHeroes.Count(
                            h =>
                            h.IsValid && !h.IsDead && h.IsVisible && h.NetworkId != target.NetworkId &&
                            h.Distance(pos) <= enemiesRange);

                    if (aCount > alliesMax || eCount > enemiesMax)
                    {
                        return(false);
                    }

                    if (DamageCalculation != null)
                    {
                        if (GetDamage(target, mode, 1) < target.Health)
                        {
                            return(false);
                        }
                    }

                    return(true);
                }
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return(false);
        }
Exemplo n.º 58
0
 /// <summary>
 /// Determines if the target is heavily impaired (stunned/rooted)
 /// </summary>
 /// <param name="enemy">The target</param>
 /// <returns>Whether the target is heavily impaired</returns>
 private static bool IsHeavilyImpaired(Obj_AI_Hero enemy)
 {
     return(enemy.HasBuffOfType(BuffType.Stun) || enemy.HasBuffOfType(BuffType.Snare) || enemy.HasBuffOfType(BuffType.Charm) || enemy.HasBuffOfType(BuffType.Fear) || enemy.HasBuffOfType(BuffType.Taunt));
 }
Exemplo n.º 59
0
 public Item(Obj_AI_Hero sender, Targets.Item target)
 {
     Sender    = sender;
     Target    = target;
     Timestamp = Game.Time;
 }
Exemplo n.º 60
0
 public HeroWard(Obj_AI_Hero hero)
 {
     this.Hero        = hero;
     this.LastVisible = Game.Time;
 }