Ejemplo n.º 1
0
        public static void CastR(AIHeroClient target, int minimunE)
        {
            
            if (target != null && target.CountEnemiesInRange(1000) == 1 && minimunE == 1)
            {
                if (target.IsMoving)
                {
                    var initPos = target.Position.To2D() - 125*target.Direction.To2D().Perpendicular();
                    var endPos = target.Position.Extend(initPos.To3D(), -1000);

                    Player.CastSpell(SpellSlot.R, initPos.To3D(), endPos.To3D());
                }
                else
                {
                    var initPos = target.Position.To2D() - 490*target.Direction.To2D().Perpendicular();
                    var endPos = target.Position.Extend(initPos.To3D(), -510);

                    Player.CastSpell(SpellSlot.R, initPos.To3D(), endPos.To3D());

                }

            }

            if (target != null && target.CountEnemiesInRange(1000) > 1 && minimunE > 1)
            {
                var enemies = EntityManager.Heroes.Enemies.Where(e => e.IsValidTarget()).Select(enemy => enemy.Position.To2D()).ToList();

                var initPos = target.Position.To2D() - 200 * target.Direction.To2D().Perpendicular();
                var endPos = GetBestEnPos(enemies, SpellManager.R.Width, 990, minimunE, initPos);
                Chat.Print("Casting Ult");

                Player.CastSpell(SpellSlot.R, initPos.To3D(), endPos.To3D());
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Basic Attack Indicator
 /// </summary>
 /// <param name="enemy">Target</param>
 /// <returns></returns>
 public static int BasicAttackIndicator(AIHeroClient enemy)
 {
     var aCalculator = ObjectManager.Player.CalculateDamage(enemy, DamageType.Physical, ObjectManager.Player.TotalAttackDamage);
     var killableAaCount = enemy.Health / aCalculator;
     var totalAa = (int)Math.Ceiling(killableAaCount);
     return totalAa;
 }
Ejemplo n.º 3
0
        public static void OnGapCloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
        {
            var playerPosition = ObjectManager.Player.Position.To2D();
            var direction1 = (ObjectManager.Player.ServerPosition - sender.ServerPosition).To2D().Normalized();
            const int distance = 475;
            const int stepSize = 20;

            if (!Spells.E.IsReady() ||
                !(Init.MiscMenu["gapcloser"].Cast<CheckBox>().CurrentValue &&
                e.Type == Gapcloser.GapcloserType.Skillshot) ||
                !(Init.MiscMenu["gapcloserT"].Cast<CheckBox>().CurrentValue &&
                e.Type == Gapcloser.GapcloserType.Targeted) ||
                sender.IsAlly || !sender.IsValid())
                return;
            {
                for (var step = 0f; step < 360; step += stepSize)
                {
                    var currentAngel = step * (float)Math.PI / 90;
                    var currentCheckPoint = playerPosition +
                                            distance * direction1.Rotated(currentAngel);

                    if (!Helpers.IsSafePosition((Vector3)currentCheckPoint) ||
                        NavMesh.GetCollisionFlags(currentCheckPoint).HasFlag(CollisionFlags.Wall) ||
                        NavMesh.GetCollisionFlags(currentCheckPoint).HasFlag(CollisionFlags.Building))
                        continue;
                    {
                        Spells.E.Cast((Vector3)currentCheckPoint);
                    }
                }
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 ///     Gets Prediction result
 /// </summary>
 /// <param name="target">Target for spell</param>
 /// <param name="radius">Spell radius</param>
 /// <param name="ringRadius">Ring radius</param>
 /// <param name="delay">Spell delay</param>
 /// <param name="missileSpeed">Spell missile speed</param>
 /// <param name="range">Spell range</param>
 /// <param name="collisionable">Spell collisionable</param>
 /// <returns>Prediction result as <see cref="Prediction.Result" /></returns>
 public static Prediction.Result GetPrediction(AIHeroClient target, float radius, float ringRadius, float delay,
     float missileSpeed, float range, bool collisionable)
 {
     return GetPrediction(target, radius, ringRadius, delay, missileSpeed, range, collisionable,
         target.GetWaypoints(), target.AvgMovChangeTime(), target.LastMovChangeTime(), target.AvgPathLenght(),
         ObjectManager.Player.ServerPosition.LSTo2D(), ObjectManager.Player.ServerPosition.LSTo2D());
 }
Ejemplo n.º 5
0
        public void insec(AIHeroClient target)
        {
            if (azir.Hero.Distance(target) <= azir.Spells.R.Range)
            {
                Player.IssueOrder(GameObjectOrder.MoveTo, target);
                if (azir.Hero.Distance(target) < 220)
                {
                    var tower =
                        ObjectManager.Get<Obj_AI_Turret>().FirstOrDefault(it => it.IsAlly && it.IsValidTarget(1000));

                    if (tower != null)
                    {
                        if (azir.Spells.R.Cast(tower.ServerPosition)) return;
                    }

                    if (azir.Spells.R.Cast(Game.CursorPos)) return;
                }

            }
            else
            {
                var pos = Game.CursorPos.LSExtend(target.Position, Game.CursorPos.Distance(target.Position) - 250);

                fleeTopos(pos);
            }
        }
Ejemplo n.º 6
0
        public static float GetTotalDamage(AIHeroClient target)
        {
            // Auto attack
            var damage = Player.Instance.GetAutoAttackDamage(target);

            // Q
            if (SpellManager.Q.IsReady())
            {
                damage += SpellManager.Q.GetRealDamage(target);
            }

            // W
            if (SpellManager.W.IsReady())
            {
                damage += SpellManager.W.GetRealDamage(target);
            }

            // E
            if (SpellManager.E.IsReady())
            {
                damage += SpellManager.E.GetRealDamage(target);
            }

            // R
            if (SpellManager.R.IsReady())
            {
                damage += SpellManager.R.GetRealDamage(target);
            }

            return damage;
        }
Ejemplo n.º 7
0
        private static void Game_OnTick(EventArgs args)
        {
            try
            {
                if (Standarts.Rengar.IsDead)
                {
                    return;
                }

                if (Standarts.RengarHasUltimate)
                {
                    RjumpTarget = GetUltimateTarget();
                }
                else if (Standarts.RengarHasPassive)
                {
                    PassiveJumpTarget = GetBushTarget();
                }
                if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                    return;
                UltimateTargetingOnTick();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Ejemplo n.º 8
0
 public override float GetDamage(AIHeroClient enemy)
 {
     var baseDamage = base.GetDamage(enemy);
     return enemy.HasBuff("brandablaze") || _brandE.CanBeCast() && enemy.LSDistance(ObjectManager.Player) < 650
         ? baseDamage*1.25f
         : baseDamage;
 }
Ejemplo n.º 9
0
 public override void LaneClear(ComboProvider combo, AIHeroClient target)
 {
     var locationM =
         GetCircularFarmLocation(MinionManager.GetMinions(900 + 120, MinionTypes.All, MinionTeam.NotAlly));
     if (locationM.MinionsHit >= Program.getLaneMenuSL("MinWtargets"))
         Cast(locationM.Position);
 }
Ejemplo n.º 10
0
 private static void Gapcloser_OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
 {
     if (sender.IsEnemy && sender.IsValidTarget(E.Range) && sender != null && e != null)
     {
         E.Cast(sender);
     }
 }
Ejemplo n.º 11
0
 public override void Execute(AIHeroClient target)
 {
     if (!Provider.ShouldBeDead(target))
     {
         Cast(target, aoe: Program.getMiscMenuCB("aoeW"));
     }
 }
Ejemplo n.º 12
0
 private static bool dangerousSpell(SpellData spellData, AIHeroClient sender)
 {
     var slot = sender.GetSpellSlotFromName(spellData.Name);
     var enemies = EntityManager.Heroes.Enemies;
     int j2 = 0;
     for (int j = 0; j < enemies.Count(); j++)
     {
         if (sender.NetworkId == enemies[j].NetworkId)
         {
             j2 = j;
             break;
         }
     }
     int i = 0;
     switch (slot)
     {
         case SpellSlot.Q:
             i = 0;
             break;
         case SpellSlot.W:
             i = 1;
             break;
         case SpellSlot.E:
             i = 2;
             break;
         case SpellSlot.R:
             i = 3;
             break;
     }
     if (Settings._skills[j2 * 4 + i].CurrentValue)
         return true;
     return false;
 }
Ejemplo n.º 13
0
        private static void Combo1(AIHeroClient t)
        {
            if (SpellManager.E.IsReady() && t.IsInRange(Player.Instance.Position, SpellManager.E.Range) && ConfigList.Combo.ComboE)
            {
                var d = Dagger.GetClosestDagger();
                if (t.Position.IsInRange(d, SpellManager.W.Range)) SpellManager.E.CastE(Damage.GetBestDaggerPoint(d, t));
                else
                    if (Player.Instance.Distance(t) >= SpellManager.W.Range)
                    SpellManager.E.CastE(t.Position);
            }

            if (SpellManager.W.IsLearned && !SpellManager.W.IsOnCooldown && ConfigList.Combo.ComboW)
            {
                if (t.IsInRange(Player.Instance.Position, SpellManager.W.Range))
                    SpellManager.W.Cast();
            }

            if (SpellManager.Q.CanCast(t) && ConfigList.Combo.ComboQ)
            {
                SpellManager.Q.Cast(t);
            }

            if (SpellManager.R.IsLearned && !SpellManager.R.IsOnCooldown && ConfigList.Combo.ComboR)
            {
                if (Player.Instance.CountEnemyChampionsInRange(ConfigList.Combo.MaxRCastRange) < ConfigList.Combo.MinToUseR) return;
                if (Damage.GetQDamage(t) + Damage.GetPDamage(t) + Damage.GetEDamage(t) + Player.Instance.GetAutoAttackDamage(t, true) >= t.TotalShieldHealth()) return;
                if (Orbwalker.IsAutoAttacking && !Orbwalker.DisableAttacking)
                {
                    Orbwalker.DisableAttacking = true;
                    Orbwalker.ResetAutoAttack();
                }
                SpellManager.R.Cast();
                Damage.FreezePlayer();
            }
        }
Ejemplo n.º 14
0
 public static void Update()
 {
     if (Jungler == null)
     {
         Jungler = Heroes.AllyHeroes.FirstOrDefault(h => h.GetSpellSlotFromName("summonersmite") != SpellSlot.Unknown || h.HasItem(ItemId.Hunters_Machete));
     }
     if (Midlaner == null)
     {
         var playerPos = ObjectManager.Player.ServerPosition.To2D();
         Midlaner = Heroes.AllyHeroes.FirstOrDefault(h => h != Jungler && (Map.MidLane.Red_Zone.Points.Any(p => p.Distance(playerPos) < 200) || Map.MidLane.Blue_Zone.Points.Any(p => p.Distance(playerPos) < 200)));
     }
     if (Support == null)
     {
         var playerPos = ObjectManager.Player.ServerPosition.To2D();
         Support = Heroes.AllyHeroes.FirstOrDefault(h => h != Jungler && (Map.BottomLane.Red_Zone.Points.Any(p => p.Distance(playerPos) < 200) || Map.BottomLane.Blue_Zone.Points.Any(p => p.Distance(playerPos) < 200)));
     }
     if (Toplaner == null)
     {
         var playerPos = ObjectManager.Player.ServerPosition.To2D();
         Toplaner = Heroes.AllyHeroes.FirstOrDefault(h => h != Jungler && (Map.BottomLane.Red_Zone.Points.Any(p => p.Distance(playerPos) < 200) || Map.BottomLane.Blue_Zone.Points.Any(p => p.Distance(playerPos) < 200)));
     }
     if (Support != null && ADC == null)
     {
         var playerPos = ObjectManager.Player.ServerPosition.To2D();
         ADC = Heroes.AllyHeroes.FirstOrDefault(h => h != Jungler && h != Support && (Map.BottomLane.Red_Zone.Points.Any(p => p.Distance(playerPos) < 200) || Map.BottomLane.Blue_Zone.Points.Any(p => p.Distance(playerPos) < 200)));
     }
 }
Ejemplo n.º 15
0
        public FioraPassive(Obj_GeneralParticleEmitter emitter, AIHeroClient enemy)
            : base(emitter.Index, (uint)emitter.NetworkId, emitter as GameObject)
        {
            Target = enemy;

            if (emitter.Name.Contains("Base_R"))
            {
                Passive = PassiveType.UltPassive;
                Color = Color.White;
            }
            else if (emitter.Name.Contains("Warning"))
            {
                Passive = PassiveType.Prepassive;
                Color = Color.Blue;
            }
            else if (emitter.Name.Contains("Timeout"))
            {
                Passive = PassiveType.PassiveTimeout;
                Color = Color.Red;
            }
            else
            {
                Passive = PassiveType.Passive;
                Color = Color.Green;
            }
            PassiveDistance = Passive == PassiveType.UltPassive ? 400 : 200;
        }
Ejemplo n.º 16
0
        public float GetComboDamage(AIHeroClient t)
        {
            var fComboDamage = 0f;

            if (Spells.Q.IsReady() && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.Q"))
            {
                fComboDamage += QDamage*(100/(100 + t.Armor));
            }

            if (Spells.W.IsReady() && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.W"))
            {
                fComboDamage += WDamage*(100/(100 + t.SpellBlock));
            }

            if (Spells.E.IsReady() && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.E"))
            {
                fComboDamage += WDamage*(100/(100 + t.Armor));
            }

            if (Spells.R.IsReady() && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.R"))
            {
                fComboDamage += ObjectManager.Player.GetSpellDamage(t, SpellSlot.R)*(100/(100 + t.SpellBlock));
            }

            if (PlayerSpells.IgniteSlot != SpellSlot.Unknown && Menu.getCheckBoxItem(Menu.MenuDrawings, "Draw.Calc.I")
                && Utils.Player.Self.Spellbook.CanUseSpell(PlayerSpells.IgniteSlot) == SpellState.Ready)
            {
                fComboDamage += (float) Utils.Player.Self.GetSummonerSpellDamage(t, Damage.SummonerSpell.Ignite);
            }

            return fComboDamage;
        }
Ejemplo n.º 17
0
        public static void Do()
        {
            if (TargetSelector.SelectedTarget == null)
            {
                Target = TargetSelector.GetTarget(Spells.Q.Range, DamageType.Magical);
            }
            else if (TargetSelector.SelectedTarget != null)
            {
                Target = TargetSelector.SelectedTarget;
            }

            if (Ryze.ManaPercent < Checker.HarassMana || Target == null)
            {
                return;
            }

            if (Checker.HarassUseQ && Spells.Q.IsReady() && Target.IsValidTarget(Spells.Q.Range))
            {
                var pred = Spells.Q.GetPrediction(Target);
                if (pred.HitChancePercent >= 85 && pred.CollisionObjects.Count() == 0)
                {
                    Spells.Q.Cast(Target);
                }
            }

            if (Checker.HarassUseW && Spells.W.IsReady() && Target.IsValidTarget(Spells.W.Range))
            {
                Spells.W.Cast(Target);
            }

            if (Checker.HarassUseE && Spells.E.IsReady() && Target.IsValidTarget(Spells.E.Range))
            {
                Spells.E.Cast(Target);
            }
        }
Ejemplo n.º 18
0
 public static float GetTotalDmg(AIHeroClient target)
 {
     var damage = Player.Instance.GetAutoAttackDamage(target);
     if (Q.IsReady())
         damage += _Player.GetSpellDamage(target, SpellSlot.Q);
     return damage;
 }
Ejemplo n.º 19
0
 public static void SetTarget(AIHeroClient hero)
 {
     if (!isEBActive)
     {
         LSTargetSelector.SetTarget(hero);
     }
 }
Ejemplo n.º 20
0
        public static float GetTotalDamage(AIHeroClient target)
        {
            // Auto attack
            var damage = Program.Player.GetAutoAttackDamage(target);

            // Q
            if (Program.Q.IsReady())
            {
                damage += Program.Q.GetRealDamage(target);
            }

            // W
            if (Program.W.IsReady())
            {
                damage += Program.W.GetRealDamage(target);
            }

            // E
            if (Program.E.IsReady())
            {
                damage += Program.E.GetRealDamage(target);
            }

            // R
            if (Program.R.IsReady())
            {
                damage += Program.R.GetRealDamage(target);
            }

            return damage;
        }
Ejemplo n.º 21
0
        public static bool HasSpellShield(AIHeroClient unit)
        {
            if (ObjectManager.Player.HasBuffOfType(BuffType.SpellShield))
            {
                return true;
            }

            if (ObjectManager.Player.HasBuffOfType(BuffType.SpellImmunity))
            {
                return true;
            }

            //TODO:
            ////Sivir E
            //if (unit.LastCastedSpellName() == "SivirE" && (EvadeUtils.TickCount - Evade.lastSpellCastTime) < 300)
            //{
            //    return true;
            //}

            ////Morganas E
            //if (unit.LastCastedSpellName() == "BlackShield" && (EvadeUtils.TickCount - Evade.lastSpellCastTime) < 300)
            //{
            //    return true;
            //}

            ////Nocturnes E
            //if (unit.LastCastedSpellName() == "NocturneShit" && (EvadeUtils.TickCount - Evade.lastSpellCastTime) < 300)
            //{
            //    return true;
            //}
            return false;
        }
Ejemplo n.º 22
0
 public SummonerItems(AIHeroClient myHero)
 {
     player = myHero;
     sumBook = player.Spellbook;
     ignite = player.GetSpellSlot("summonerdot");
     smite = player.GetSpellSlot("SummonerSmite");
 }
Ejemplo n.º 23
0
        static AutoWalker()
        {
            myNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsAlly);
            enemyNexus = ObjectManager.Get<Obj_HQ>().First(n => n.IsEnemy);
            enemyLazer = ObjectManager.Get<Obj_AI_Turret>().FirstOrDefault(tur => tur.IsEnemy && tur.GetLane() == Lane.Spawn);
            p = ObjectManager.Player;

            if (p.Spellbook.GetSpell(SpellSlot.Summoner1).Name == "summonerheal")
            {
                Heal = new Spell.Active(SpellSlot.Summoner1);
            }
            if (p.Spellbook.GetSpell(SpellSlot.Summoner2).Name == "summonerheal")
            {
                Heal = new Spell.Active(SpellSlot.Summoner2);
            }
            if (p.Spellbook.GetSpell(SpellSlot.Summoner1).Name == "summonerhaste")
            {
                Ghost = new Spell.Active(SpellSlot.Summoner1);
            }
            if (p.Spellbook.GetSpell(SpellSlot.Summoner2).Name == "summonerhaste")
            {
                Ghost = new Spell.Active(SpellSlot.Summoner2);
            }

            target = ObjectManager.Player.Position;
            Orbwalker.DisableMovement = true;
            Orbwalker.OnPreAttack += Orbwalker_OnPreAttack;
            Game.OnTick += OnTick;
            if (MainMenu.GetMenu("AB").Get<CheckBox>("debuginfo").CurrentValue)
                Drawing.OnDraw += Drawing_OnDraw;
        }
Ejemplo n.º 24
0
 private static void OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
 {
     if (sender.IsEnemy && sender.IsValidTarget(SpellManager.E.Range) && SpellManager.E.IsInRange(sender) && SpellManager.E.IsReady() && Config.Modes.Misc.UseEGC)
     {
         SpellManager.E.Cast(sender);
     }
 }
Ejemplo n.º 25
0
        public static float GetTotalDamage(AIHeroClient target)
        {
            // Auto attack
            var damage = Player.Instance.GetAutoAttackDamage(target);

            // Q
            if (SpellManager.Q.IsReady())
            {
                damage += SpellManager.Q.GetRealDamage(target);
            }

            // W
            if (SpellManager.W.IsReady())
            {
                damage += SpellManager.W.GetRealDamage(target);
            }

            // E
            if (SpellManager.E.IsReady())
            {
                damage += SpellManager.E.GetRealDamage(target);
            }

            // R
            if (SpellManager.R.IsReady() || SpellManager.IsCastingUlt)
            {
                damage += SpellManager.R.GetRealDamage(target) * (SpellManager.IsCastingUlt ? SpellManager.ChargesRemaining : SpellManager.MaxCharges);
            }

            return damage;
        }
Ejemplo n.º 26
0
        /// <summary>
        /// Uses MEC to get the perfect position on Circle Skillshots
        /// </summary>
        /// <param name="spell">Give it a spell and it will do the rest of the logic for you</param>
        /// <param name="targetHero">If you give it a target it will look around that target for other targets but will always focus that target</param>
        /// <returns></returns>
        internal static OptimizedLocation? GetOptimizedCircleLocation(Spell.Skillshot spell,
            AIHeroClient targetHero = null)
        {
            if (targetHero != null)
            {
                if (!targetHero.IsValidTarget(spell.Range + spell.Radius))
                    return null;

                var champs =
                    EntityManager.Heroes.Enemies.Where(e => e.Distance(targetHero) < spell.Radius)
                        .Select(
                            champ =>
                                Prediction.Position.PredictUnitPosition(champ,
                                    ((int)Player.Instance.Distance(champ) / spell.Speed) + spell.CastDelay))
                        .ToList();
                return GetOptimizedCircleLocation(champs, spell.Width, spell.Range);
            }
            if (EntityManager.Heroes.Enemies.Any(e => e.Distance(Player.Instance) < spell.Radius + spell.Range))
            {
                var champs =
                    EntityManager.Heroes.Enemies.Where(e => e.Distance(Player.Instance) < spell.Radius + spell.Range)
                        .Select(
                            champ =>
                                Prediction.Position.PredictUnitPosition(champ,
                                    ((int)Player.Instance.Distance(champ) / spell.Speed) + spell.CastDelay)).ToList();

                return GetOptimizedCircleLocation(champs, spell.Width, spell.Range);
            }
            return null;
        }
Ejemplo n.º 27
0
        private static void OnGapcloser(AIHeroClient sender, Gapcloser.GapcloserEventArgs e)
        {
            if (!sender.IsEnemy) return;

            if (Return.UseRGapclose && Spells.R.IsReady() && sender.IsValidTarget(Spells.R.Range))
                Spells.R.Cast(sender);
        }
Ejemplo n.º 28
0
 public static void CastOffensiveItems(AIHeroClient target)
 {
     foreach (var item in OffensiveItems.Where(i => i.IsReady() && target.IsValidTarget(i.Range)))
     {
         item.Cast(target);
     }
 }
Ejemplo n.º 29
0
        private static void ECast(AIHeroClient enemy)
        {
            var range = Orbwalking.GetRealAutoAttackRange(enemy);
            var path = Geometry.CircleCircleIntersection(ObjectManager.Player.ServerPosition.LSTo2D(),
                Prediction.GetPrediction(enemy, 0.25f).UnitPosition.LSTo2D(), LucianSpells.E.Range, range);

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

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

                // no intersection or target to close
                LucianSpells.E.Cast(ObjectManager.Player.ServerPosition.LSExtend(enemy.ServerPosition,
                    -LucianSpells.E.Range));
            }
        }
Ejemplo n.º 30
0
 public static bool IsRecalling(this AIHeroClient unit)
 {
     return(unit.Buffs.Any(buff => buff.Name.ToLower().Contains("recall") && buff.Type == BuffType.Aura));
 }
Ejemplo n.º 31
0
 public static float SmiteDmgHero(AIHeroClient target)
 {
     return(Player.Instance.CalculateDamageOnUnit(target, DamageType.True,
                                                  20.0f + Player.Instance.Level * 8.0f));
 }
Ejemplo n.º 32
0
        private static void LogicW()
        {
            var wName = W.Instance.Name;
            var t = TargetSelector.GetTarget(1100, DamageType.Magical);
            if (wName == "PickACard" && Utils.TickCount - W.LastCastAttemptT > 150)
            {
                if (R.IsReady() && (Player.HasBuff("destiny_marker") || Player.HasBuff("gate")))
                    W.Cast();
                else if (t.LSIsValidTarget() && Program.Combo)
                    W.Cast();
                else if (Orbwalker.LastTarget != null)
                {
                    if (Program.Farm && Orbwalker.LastTarget.Type == GameObjectType.AIHeroClient && getCheckBoxItem(wMenu, "harasW"))
                        W.Cast();
                    else if (Program.LaneClear && (Orbwalker.LastTarget.Type == GameObjectType.obj_AI_Minion || Orbwalker.LastTarget.Type == GameObjectType.obj_AI_Turret) && getCheckBoxItem(farmMenu, "farmW"))
                        W.Cast();
                }
            }
            else if (Player.HasBuff("pickacard_tracker"))
            {
                if (temp == null)
                    temp = wName;
                else if (temp != wName)
                    cardok = true;

                if (cardok)
                {
                    AIHeroClient orbTarget = null;

                    var getTarget = Orbwalker.LastTarget;
                    if (getTarget != null && getTarget.Type == GameObjectType.AIHeroClient)
                    {
                        orbTarget = (AIHeroClient)getTarget;
                    }

                    if (R.IsReady() && (Player.HasBuff("destiny_marker") || Player.HasBuff("gate")))
                    {
                        FindCard = 1;
                        if (wName == "GoldCardLock")
                            W.Cast();
                    }
                    else if (Program.Combo && orbTarget.LSIsValidTarget() && W.GetDamage(orbTarget) + Player.GetAutoAttackDamage(orbTarget) > orbTarget.Health)
                    {
                        W.Cast();
                        Program.debug("1" + wName);
                    }
                    else if (Player.Mana < RMANA + QMANA + WMANA)
                    {
                        FindCard = 2;
                        if (wName == "BlueCardLock")
                            W.Cast();
                    }
                    else if (Program.Farm && orbTarget.LSIsValidTarget())
                    {
                        FindCard = 1;
                        if (wName == "GoldCardLock")
                            W.Cast();
                    }
                    else if (Player.ManaPercent > getSliderItem(farmMenu, "WredFarm") && Program.LaneClear && getCheckBoxItem(farmMenu, "farmW"))
                    {
                        FindCard = 3;
                        if (wName == "RedCardLock")
                            W.Cast();
                    }
                    else if ((Program.LaneClear || Player.Mana < RMANA + QMANA) && getCheckBoxItem(farmMenu, "farmW"))
                    {
                        FindCard = 2;
                        if (wName == "BlueCardLock")
                            W.Cast();
                    }
                    else if (Program.Combo)
                    {
                        FindCard = 1;
                        if (wName == "GoldCardLock")
                            W.Cast();
                    }
                }
            }
        }
Ejemplo n.º 33
0
        public static void drawText(string msg, AIHeroClient Hero, System.Drawing.Color color)
        {
            var wts = Drawing.WorldToScreen(Hero.Position);

            Drawing.DrawText(wts[0] - (msg.Length) * 5, wts[1], color, msg);
        }
Ejemplo n.º 34
0
 public IncData(AIHeroClient _hero)
 {
     Hero = _hero;
 }
Ejemplo n.º 35
0
        private static void Game_OnGameLoad()
        {
            try
            {
                Chat.PrintChat("This script is a Port of Zed is Back (Code of Jackisback)");

                _player = ObjectManager.Player;
                if (ObjectManager.Player.CharacterName != ChampionName)
                {
                    return;
                }
                _q = new Spell(SpellSlot.Q, 900f);
                _w = new Spell(SpellSlot.W, 700f);
                _e = new Spell(SpellSlot.E, 270f);
                _r = new Spell(SpellSlot.R, 650f);

                _q.SetSkillshot(0.25f, 50f, 1700f, false, SkillshotType.Line);

                _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);
                _youmuu     = new Items.Item(3142, 10);
                _igniteSlot = _player.GetSpellSlot("SummonerDot");
                var enemy = from hero in ObjectManager.Get <AIHeroClient>()
                            where hero.IsEnemy == true
                            select hero;



                var _config = new Menu("zedisback", "011110001.Zed", true);
                var combo   = new Menu("combat", "[COMBO] Settings");
                combo.Add(_combo.Ult);
                combo.Add(_combo.Wgap);
                combo.Add(_combo.W2);
                combo.Add(_combo.Ig);
                combo.Add(_combo.Cmode);

                var harass = new Menu("harass", "[HARASS] Settings");
                harass.Add(_harass.Wh);
                harass.Add(_harass.energia);

                var clear = new Menu("clear", "[LANE CLEAR] Settings");
                clear.Add(_clear.Qlane);
                clear.Add(_clear.Elane);
                clear.Add(_clear.energia);

                var misc = new Menu("clear", "[MISC] Settings");
                misc.Add(_misc.Qks);
                misc.Add(_misc.Eks);

                var dodge = new Menu("dodge", "[ULTIMATE] Settings");

                foreach (var e in enemy)
                {
                    SpellDataInstClient rdata = e.Spellbook.GetSpell(SpellSlot.R);
                    if (DangerDB.DangerousList.Any(spell => spell.Contains(rdata.SData.Name)))
                    {
                        dodge.Add(new MenuBool(rdata.SData.Name, rdata.SData.Name));
                    }
                }

                _config.Add(combo);
                _config.Add(harass);
                _config.Add(clear);
                _config.Add(misc);
                _config.Add(dodge);
                _config.Attach();


                Game.OnUpdate  += Game_OnUpdate;
                Drawing.OnDraw += Drawing_OnDraw;
                //AIBaseClient.OnProcessSpellCast += OnProcessSpell;
            }
            catch
            {
            }
        }
Ejemplo n.º 36
0
 private static bool Immobile(AIHeroClient unit)
 {
     return(unit.HasBuffOfType(BuffType.Charm) || unit.HasBuffOfType(BuffType.Knockup) ||
            unit.HasBuffOfType(BuffType.Snare) ||
            unit.HasBuffOfType(BuffType.Taunt) || unit.HasBuffOfType(BuffType.Suppression));
 }
Ejemplo n.º 37
0
 public static float BonusAttackDamage(this AIHeroClient self)
 {
     return(self.TotalAttackDamage - self.BaseAttackDamage);
 }
Ejemplo n.º 38
0
 public static bool IsAutoCanceling(this AIHeroClient self, List <Obj_AI_Base> enemies)
 {
     return(Orbwalker.IsAutoAttacking || enemies.Where(a => a.IsInRange(self, self.GetAutoAttackRange())).FirstOrDefault() == null);
 }
Ejemplo n.º 39
0
 public static InventorySlot GetItem(this AIHeroClient self, ItemId item)
 {
     return(self.InventoryItems.Where(a => a.Id == item).FirstOrDefault());
 }
Ejemplo n.º 40
0
 /// <summary>
 /// Gets Prediction result
 /// </summary>
 /// <param name="target">Target for spell</param>
 /// <param name="width">Spell width</param>
 /// <param name="delay">Spell delay</param>
 /// <param name="missileSpeed">Spell missile speed</param>
 /// <param name="range">Spell range</param>
 /// <param name="collisionable">Spell collisionable</param>
 /// <param name="type">Spell skillshot type</param>
 /// <param name="from">Spell casted position</param>
 /// <returns>Prediction result as <see cref="Prediction.Result"/></returns>
 internal static Result GetPrediction(AIHeroClient target, float width, float delay, float missileSpeed, float range, bool collisionable, SkillshotType type)
 {
     return(GetPrediction(target, width, delay, missileSpeed, range, collisionable, type, target.GetWaypoints(), target.AvgMovChangeTime(), target.LastMovChangeTime(), target.AvgPathLenght(), target.LastAngleDiff(), ObjectManager.Player.ServerPosition.To2D(), ObjectManager.Player.ServerPosition.To2D()));
 }
Ejemplo n.º 41
0
 public static float MissingHealth(this AIHeroClient self)
 {
     return(self.MaxHealth - self.Health);
 }
Ejemplo n.º 42
0
 public EnemyInfo(AIHeroClient enemy)
 {
     target = enemy;
 }
Ejemplo n.º 43
0
        public void Harass()
        {
            List <Obj_AI_Base> shadows = GetShadows();

            if (!shadows.Any() ||
                (!q.UseOnHarass && !e.UseOnHarass) ||
                (!q.IsReady() && !e.IsReady()))
            {
                return;
            }

            List <AIHeroClient> blackList = zedMenu.GetBlockList(BlockListType.Harass);

            foreach (Obj_AI_Base objAiBase in shadows)
            {
                if (((q.UseOnHarass && !q.IsReady()) || !q.UseOnHarass) &&
                    ((e.UseOnHarass && !e.IsReady()) || !e.UseOnHarass))
                {
                    break;
                }

                if (q.UseOnHarass && q.IsReady())
                {
                    AIHeroClient target = TargetSelector.GetTarget(
                        q.Range,
                        q.DamageType,
                        true,
                        blackList,
                        objAiBase.Position);

                    if (target != null)
                    {
                        PredictionInput predictionInput = new PredictionInput();
                        predictionInput.Range          = q.Range;
                        predictionInput.RangeCheckFrom = objAiBase.Position;
                        predictionInput.From           = objAiBase.Position;
                        predictionInput.Delay          = q.Delay;
                        predictionInput.Speed          = q.Speed;
                        predictionInput.Unit           = target;
                        predictionInput.Type           = SkillshotType.SkillshotLine;
                        predictionInput.Collision      = false;

                        PredictionOutput predictionOutput = Prediction.GetPrediction(predictionInput);

                        if (predictionOutput.Hitchance >= HitChance.Medium)
                        {
                            q.Cast(predictionOutput.CastPosition);
                        }
                    }
                }

                if (e.UseOnHarass && e.IsReady())
                {
                    AIHeroClient target = TargetSelector.GetTarget(e.Range, e.DamageType, true, blackList, objAiBase.Position);

                    if (target != null)
                    {
                        e.Cast();
                    }
                }
            }
        }
Ejemplo n.º 44
0
 public static bool CanKill(this AIHeroClient hero, AIHeroClient target)
 {
     return(hero.GetAutoAttackDamage(target, true) >= target.TotalShieldHealth() && target.IsKillable(hero.GetAutoAttackRange(target)));
 }
Ejemplo n.º 45
0
        private float CalcComboDamage(AIHeroClient target, float resMulti, bool rangeCheck, bool q, bool w, bool r)
        {
            try
            {
                if (target == null)
                {
                    return(0);
                }

                var damage    = 0f;
                var totalMana = 0f;

                var pred     = R.GetPrediction(target);
                var position = target.Position;
                if (!pred.UnitPosition.Equals(Vector3.Zero))
                {
                    position = pred.UnitPosition;
                }

                if (r && R.IsReady() && (!rangeCheck || R.IsInRange(target)))
                {
                    var rMana = R.ManaCost * resMulti;
                    if (totalMana + rMana <= Player.Mana)
                    {
                        totalMana += rMana;
                        damage    += GetRDamage(target);
                    }
                }
                var qMana = Q.ManaCost * resMulti;
                if (totalMana + qMana <= Player.Mana && q && (!rangeCheck || Q.IsInRange(position)))
                {
                    totalMana += qMana;
                    damage    += Q.GetDamage(target);
                    if (totalMana + qMana <= Player.Mana)
                    {
                        totalMana += qMana;
                        damage    += Q.GetDamage(target);
                    }
                }
                if (w && W.IsReady() && (!rangeCheck || W.IsInRange(position)))
                {
                    var wMana = W.ManaCost * resMulti;
                    if (totalMana + wMana <= Player.Mana)
                    {
                        damage += W.GetDamage(target);
                    }
                }
                if (!rangeCheck ||
                    position.Distance(Player.Position) <= Orbwalking.GetRealAutoAttackRange(target) * 0.9f)
                {
                    damage += 2 * (float)Player.GetAutoAttackDamage(target, true);
                }
                damage += ItemManager.CalculateComboDamage(target, rangeCheck);
                damage += SummonerManager.CalculateComboDamage(target, rangeCheck);
                return(damage);
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
            return(0);
        }
Ejemplo n.º 46
0
 /// <summary>
 ///     Returns true if target Is CC'D.
 /// </summary>
 public static bool IsCC(this AIHeroClient target)
 {
     return(((!target.CanMove || target.IsRecalling()) && !target.IsMe) || target.HasBuffOfType(BuffType.Charm) || target.HasBuffOfType(BuffType.Knockback) || target.HasBuffOfType(BuffType.Knockup) || target.HasBuffOfType(BuffType.Fear) ||
            target.HasBuffOfType(BuffType.Snare) || target.HasBuffOfType(BuffType.Stun) || target.HasBuffOfType(BuffType.Suppression) || target.HasBuffOfType(BuffType.Taunt) ||
            target.HasBuffOfType(BuffType.Sleep));
 }
Ejemplo n.º 47
0
 internal static bool isBlackListed(this AIHeroClient unit)
 {
     return(!Helper.GetBool("ult" + unit.ChampionName, YasuoMenu.ComboM));
 }
Ejemplo n.º 48
0
        //public int LastPinged;

        public EnemyInfo(AIHeroClient player)
        {
            Player = player;
        }
Ejemplo n.º 49
0
 /// <summary>
 ///     Returns true if you can deal damage to the target (AIHeroClient).
 /// </summary>
 public static bool IsKillable(this AIHeroClient target, float range)
 {
     return(target != null && !target.Buffs.Any(b => b.Name.ToLower().Contains("fioraw")) && !target.HasBuff("JudicatorIntervention") && !target.IsZombie &&
            !target.HasUndyingBuff(true) && !target.IsInvulnerable && !target.IsZombie && !target.HasBuff("bansheesveil") && !target.IsDead &&
            !target.IsPhysicalImmune && target.Health > 0 && !target.HasBuffOfType(BuffType.Invulnerability) && !target.HasBuffOfType(BuffType.PhysicalImmunity) && target.IsValidTarget(range + target.BoundingRadius / 2f));
 }
Ejemplo n.º 50
0
 public void Combo(AIHeroClient target)
 {
 }
Ejemplo n.º 51
0
 public EnemyInfo GetPlayerInfo(AIHeroClient enemy)
 {
     return(Program.Helper.EnemyInfo.Find(x => x.Player.NetworkId == enemy.NetworkId));
 }
Ejemplo n.º 52
0
        private void Game_OnTick(EventArgs args)

        {
            //Chat.Print(AutoWalker.Recalling());
            AIHeroClient t = EntityManager.Heroes.Enemies.Where(en => en.IsVisible() && en.Distance(Game.CursorPos) < 630).OrderBy(en => en.Health).FirstOrDefault();

            if (t != null)
            {
                float ti = TimeForAttack(t, 630);
                float dm = 0;
                if (EstDmg(t, ti) > 0)
                {
                    dm = EstDmg(t, ti);
                }
                if (AutoWalker.Ignite != null && AutoWalker.Ignite.IsReady() && t.Health > dm && t.Health < dm + (50 + 20 * AutoWalker.p.Level))
                {
                    AutoWalker.UseIgnite(t);
                }
                dmg = dm + ", " + (t.Health - dm);
            }

            if (isTearOwned && Q.IsReady() && AutoWalker.p.ManaPercent > 95 && !AutoWalker.Recalling() && !EntityManager.Heroes.Enemies.Any(en => en.Distance(AutoWalker.p) < 2000) && !EntityManager.MinionsAndMonsters.EnemyMinions.Any(min => min.Distance(AutoWalker.p) < 1000))
            {
                QCast(null, new Vector3());
                Q.Cast((Prediction.Position.PredictUnitPosition(AutoWalker.p, 2000) +
                        new Vector2(RandGen.r.NextFloat(-200, 200), RandGen.r.NextFloat(-200, 200))).To3D());
            }


            if (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Harass || Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.LaneClear)
            {
                if (!EntityManager.Heroes.Enemies.Any(en => en.Distance(AutoWalker.p) < 650 + en.BoundingRadius))
                {
                    if (Q.IsReady() && AutoWalker.p.MaxMana > 750 && AutoWalker.p.ManaPercent > 65)
                    {
                        tick++;
                        if (tick % 5 != 0)
                        {
                            return;
                        }
                        EntityManager.MinionsAndMonsters.FarmLocation f =
                            EntityManager.MinionsAndMonsters.GetCircularFarmLocation(EntityManager.MinionsAndMonsters.GetLaneMinions(radius: 850), 250, 700);
                        if (f.HitNumber >= 4 || (f.HitNumber == 3 && AutoWalker.p.ManaPercent > 80))
                        {
                            QCast(null, new Vector3());
                            Q.Cast(f.CastPosition);
                        }
                    }

                    if (E.IsReady())
                    {
                        Obj_AI_Minion minionToE = EntityManager.MinionsAndMonsters.GetLaneMinions(radius: 850).FirstOrDefault(min => min.HasBuffOfType(BuffType.Poison) && min.Distance(AutoWalker.p) < min.BoundingRadius + E.Range && Prediction.Health.GetPrediction(min, 100) < AutoWalker.p.GetSpellDamage(min, SpellSlot.E) && Prediction.Health.GetPrediction(min, 100) > 0);
                        if (minionToE != null)
                        {
                            E.Cast(minionToE);
                        }
                        else if (!EntityManager.Heroes.Enemies.Any(en => en.IsVisible() && en.Distance(AutoWalker.p) < 1200))
                        {
                            minionToE = EntityManager.MinionsAndMonsters.GetLaneMinions(radius: 850).FirstOrDefault(min => min.Distance(AutoWalker.p) < min.BoundingRadius + E.Range && Prediction.Health.GetPrediction(min, 200) < AutoWalker.p.GetSpellDamage(min, SpellSlot.E) && Prediction.Health.GetPrediction(min, 200) > 0);
                            if (minionToE != null)
                            {
                                E.Cast(minionToE);
                            }
                        }
                    }
                }


                if (AutoWalker.p.ManaPercent < 15)
                {
                    return;
                }
                AIHeroClient poorVictim = TargetSelector.GetTarget(850, DamageType.Magical, addBoundingRadius: true);
                if (poorVictim != null && minManaHarass < AutoWalker.p.HealthPercent)
                {
                    if (Q.IsReady())
                    {
                        PredictionResult pr = Q.GetPrediction(poorVictim);
                        if (pr.HitChancePercent > 35)
                        {
                            QCast(poorVictim, pr.CastPosition);
                            Q.Cast(pr.CastPosition);
                        }
                    }
                    if (E.IsReady())
                    {
                        AIHeroClient candidateForE = EntityManager.Heroes.Enemies.Where(
                            en =>
                            en.HasBuffOfType(BuffType.Poison) && en.IsTargetable &&
                            !en.HasBuffOfType(BuffType.SpellImmunity) && !en.HasBuffOfType(BuffType.Invulnerability) &&
                            en.Distance(AutoWalker.p) < en.BoundingRadius + E.Range && !en.IsDead())
                                                     .OrderBy(en => en.Health / AutoWalker.p.GetSpellDamage(en, SpellSlot.E))
                                                     .FirstOrDefault();
                        if (candidateForE != null)
                        {
                            E.Cast(candidateForE);
                        }
                    }
                }
            }
            else if (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Combo || Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Flee)
            {
                AIHeroClient poorVictim = TargetSelector.GetTarget(700, DamageType.Magical, addBoundingRadius: true) ??
                                          TargetSelector.GetTarget(850, DamageType.Magical, addBoundingRadius: true);

                if (poorVictim != null)
                {
                    if (Q.IsReady())
                    {
                        PredictionResult pr = Q.GetPrediction(poorVictim);
                        if (pr.HitChancePercent > 30)
                        {
                            QCast(poorVictim, pr.CastPosition);
                            Q.Cast(pr.CastPosition);
                        }
                    }
                    if (E.IsReady() && (poorVictim.HasBuffOfType(BuffType.Poison) || AutoWalker.p.GetSpellDamage(poorVictim, SpellSlot.E) > poorVictim.Health))
                    {
                        E.Cast(poorVictim);
                    }
                    else if (E.IsReady())
                    {
                        AIHeroClient an = EntityManager.Heroes.Enemies.Where(en => en.HasBuffOfType(BuffType.Poison) && AutoWalker.p.Distance(en) < E.Range + en.BoundingRadius).OrderBy(en => en.Health / AutoWalker.p.GetSpellDamage(en, SpellSlot.E))
                                          .FirstOrDefault();
                        if (an != null)
                        {
                            E.Cast(an);
                        }
                    }
                    if (!poorVictim.HasBuffOfType(BuffType.Poison) && W.IsReady() || poorVictim.Distance(AutoWalker.p) > 650)
                    {
                        PredictionResult pr = W.GetPrediction(poorVictim);
                        if (pr.HitChance >= HitChance.Medium)
                        {
                            W.Cast(pr.CastPosition);
                        }
                    }
                    if (R.IsReady() && poorVictim.HasBuffOfType(BuffType.Poison) && AutoWalker.p.ManaPercent > 35 && poorVictim.Distance(AutoWalker.p) > 200 && poorVictim.Distance(AutoWalker.p) < 600 + poorVictim.BoundingRadius && poorVictim.IsFacing(AutoWalker.p) && poorVictim.HealthPercent > 30 && poorVictim.HealthPercent < 60)
                    {
                        R.Cast(Prediction.Position.PredictUnitPosition(poorVictim, 300).To3D());
                    }
                    if (R.IsReady() && poorVictim.Distance(AutoWalker.p) < 600 && EntityManager.Heroes.Enemies.Count(en => en.IsVisible() && !en.IsDead() && en.Distance(AutoWalker.p) < 600) >= 2)
                    {
                        R.Cast(Prediction.Position.PredictUnitPosition(poorVictim, 400).To3D());
                    }
                    if (Orbwalker.ActiveModesFlags == Orbwalker.ActiveModes.Flee)
                    {
                        if (R.IsReady() && Logic.surviLogic.dangerValue > 10000 && AutoWalker.p.HealthPercent < 20)
                        {
                            AIHeroClient champToUlt =
                                EntityManager.Heroes.Enemies.FirstOrDefault(
                                    en =>
                                    en.HealthPercent > 5 && en.Distance(AutoWalker.p) < 600 &&
                                    en.Distance(AutoWalker.p) > 100);
                            if (champToUlt != null)
                            {
                                R.Cast(Prediction.Position.PredictUnitPosition(champToUlt, 500).To3D());
                            }
                        }
                    }
                }
            }



            if (R.IsReady() && AutoWalker.p.HealthPercent < 15)
            {
                AIHeroClient champToUlt =
                    EntityManager.Heroes.Enemies.FirstOrDefault(
                        en => en.Distance(AutoWalker.p) < 700);
                if (champToUlt != null)
                {
                    R.Cast(champToUlt);
                }
            }
        }
Ejemplo n.º 53
0
        internal static int GetCustomDamage(this AIHeroClient source, string auraname, AIHeroClient target)
        {
            if (auraname == "sheen")
            {
                return
                    ((int)
                     source.CalcDamage(target, Damage.DamageType.Physical,
                                       1.0 * source.FlatPhysicalDamageMod + source.BaseAttackDamage));
            }

            if (auraname == "lichbane")
            {
                return
                    ((int)
                     source.CalcDamage(target, Damage.DamageType.Magical,
                                       (0.75 * source.FlatPhysicalDamageMod + source.BaseAttackDamage) +
                                       (0.50 * source.FlatMagicDamageMod)));
            }

            return(0);
        }
Ejemplo n.º 54
0
 public bool CanKill(AIHeroClient enemy)
 {
     return(HasIgnite && IsReady() && enemy.Health < ObjectManager.Player.GetSummonerSpellDamage(enemy, Damage.SummonerSpell.Ignite));
 }
Ejemplo n.º 55
0
 public void Harass(AIHeroClient target)
 {
 }
Ejemplo n.º 56
0
        private List <BuffInstance> GetBuffs(AIHeroClient hero)
        {
            var ret = new List <BuffInstance>();

            if (hero.HasBuffOfType(BuffType.Knockup) || hero.HasBuffOfType(BuffType.Knockback))
            {
                return(ret);
            }
            if (Menu[IdentBase + ".useForBufftype"].Cast <CheckBox>().CurrentValue)
            {
                if (Menu[IdentBase + ".onType.Supression"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Suppression));
                }
                if (Menu[IdentBase + ".onType.Stun"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Stun));
                }
                if (Menu[IdentBase + ".onType.Charm"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Charm));
                }
                if (Menu[IdentBase + ".onType.Taunt"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Taunt));
                }
                if (Menu[IdentBase + ".onType.Flee"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Flee));
                }
                if (Menu[IdentBase + ".onType.Fear"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Fear));
                }
                if (Menu[IdentBase + ".onType.Snare"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Snare));
                }
                if (Menu[IdentBase + ".onType.Polymorph"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Polymorph));
                }
                if (Menu[IdentBase + ".onType.Slow"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Slow));
                }
                if (Menu[IdentBase + ".onType.Silence"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Silence));
                }
                if (Menu[IdentBase + ".onType.Blind"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Blind));
                }
                if (Menu[IdentBase + ".onType.Poison"].Cast <CheckBox>().CurrentValue)
                {
                    ret.AddRange(hero.Buffs.Where(u => u.Type == BuffType.Poison));
                }
            }
            if (!Menu[IdentBase + ".useonEvilBuff"].Cast <CheckBox>().CurrentValue)
            {
                return(ret);
            }
            foreach (var buff in hero.Buffs)
            {
                try
                {
                    var existingbuff = buff;
                    var buffname     = Buff.BuffList.Where(b => b.Name == existingbuff.Name);
                    if (Menu[IdentBase + ".uniqueBuff." + buffname].Cast <CheckBox>().CurrentValue&& hero.HasBuff(buff.Name) &&
                        !ret.Contains(buff))
                    {
                        ret.Add(buff);
                    }
                }
                catch (Exception)
                {
                    //Iggnored (not in list, allready added and so on
                }
            }
            return(ret);
        }
Ejemplo n.º 57
0
        private void qResult(Vector3[] path, Vector3 castpos, Vector3 targetPos, float ms, AIHeroClient tg, float myhp, float targhp, Vector3 castheropos, StreamWriter fi)
        {
            //Console.WriteLine(castpos.Distance(tg));
            if (castpos.Distance(tg) > 600 || !tg.IsVisible())
            {
                return;
            }
            //endpos.x endpos.y movespeed startpos.x startpos.y startpath[1].x startpath[1].y startpath[2].x startpath[2].y myhpPerc targHpPer distance
            string res = tg.Position.X + " " + tg.Position.Y + " " + ms + " " + targetPos.X + " " + targetPos.Y;

            for (int i = 1; i < 3; i++)
            {
                if (path.Length <= i)
                {
                    res += " " + path[path.Length - 1].X + " " + path[path.Length - 1].Y;
                }
                else
                {
                    res += " " + path[i].X + " " + path[i].Y;
                }
            }
            res += " " + myhp + " " + targhp + " " + castheropos.Distance(targetPos);
            fi.WriteLine(res);
        }
Ejemplo n.º 58
0
 private static void Interrupter2_OnInterruptableTarget(AIHeroClient sender, Interrupter2.InterruptableTargetEventArgs args)
 {
     if (R.IsReady() && getCheckBoxItem(rMenu, "inter") && sender.LSIsValidTarget(R.Range))
         R.Cast();
 }
Ejemplo n.º 59
0
 public static int GetRecallTime(AIHeroClient obj)
 {
     return(GetRecallTime(obj.Spellbook.GetSpell(SpellSlot.Recall).Name));
 }
Ejemplo n.º 60
-1
        public static void Game_OnGameLoad()
        {
            if (Player.ChampionName != ChampionName) return;

            LoadMenu();
            Q = new Spell(SpellSlot.Q, Player.AttackRange);
            W = new Spell(SpellSlot.W, 1490f);
            E = new Spell(SpellSlot.E, 900f);
            R = new Spell(SpellSlot.R, 2500f);

            W.SetSkillshot(0.6f, 75f, 3300f, true, SkillshotType.SkillshotLine);
            E.SetSkillshot(1.2f, 1f, 1750f, false, SkillshotType.SkillshotCircle);
            R.SetSkillshot(0.7f, 140f, 1500f, false, SkillshotType.SkillshotLine);

            foreach (var hero in ObjectManager.Get<AIHeroClient>())
            {
                if (hero.IsEnemy)
                {
                    Enemies.Add(hero);
                }
                else if(hero.ChampionName.Equals("Blitzcrank"))
                {
                    blitz = hero;
                }
            }

            Game.OnUpdate += Game_OnGameUpdate;
            Orbwalker.OnPreAttack += BeforeAttack;
            AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser;
            Drawing.OnDraw += Drawing_OnDraw;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            Chat.Print("<font color=\"#00BFFF\">GENESIS </font>Jinx<font color=\"#000000\"> by Sebby </font> - <font color=\"#FFFFFF\">Loaded</font>");
        }