Ejemplo n.º 1
0
        public static bool RCheck(Obj_AI_Hero enemy)
        {
            double aa = 0;

            if (Program.Menu.Item("DontRwA").GetValue <bool>())
            {
                aa = ObjectManager.Player.GetAutoAttackDamage(enemy);
            }
            //Menu check
            if (Program.Menu.Item("DontRwParam").GetValue <StringList>().SelectedIndex == 2)
            {
                return(true);
            }

            //If can be killed by all the skills that are checked
            if (Program.Menu.Item("DontRwParam").GetValue <StringList>().SelectedIndex == 0 &&
                GetDamage.GetComboDamage(enemy, Program.Menu.Item("DontRwQ").GetValue <bool>(),
                                         Program.Menu.Item("DontRwW").GetValue <bool>(),
                                         Program.Menu.Item("DontRwE").GetValue <bool>(), false) + aa >= enemy.Health)
            {
                return(false);
            }
            //If can be killed by either any of the skills
            if (Program.Menu.Item("DontRwParam").GetValue <StringList>().SelectedIndex == 1 &&
                (GetDamage.GetComboDamage(enemy, Program.Menu.Item("DontRwQ").GetValue <bool>(), false, false, false) >=
                 enemy.Health ||
                 GetDamage.GetComboDamage(enemy, Program.Menu.Item("DontRwW").GetValue <bool>(), false, false, false) >=
                 enemy.Health ||
                 GetDamage.GetComboDamage(enemy, Program.Menu.Item("DontRwE").GetValue <bool>(), false, false, false) >=
                 enemy.Health || aa >= enemy.Health))
            {
                return(false);
            }

            //Check last cast times
            return(Environment.TickCount - Spells.Q.LastCastAttemptT > 600 + Game.Ping &&
                   Environment.TickCount - Spells.E.LastCastAttemptT > 600 + Game.Ping &&
                   Environment.TickCount - Spells.W.LastCastAttemptT > 600 + Game.Ping);
        }
Ejemplo n.º 2
0
        public static void AutoKs()
        {
            var UseQEKS = Menu.Item("UseQEKS").GetValue <bool>();
            var UseWKS  = Menu.Item("UseWKS").GetValue <bool>();
            var UseQKS  = Menu.Item("UseQKS").GetValue <bool>();
            var UseEKS  = Menu.Item("UseEKS").GetValue <bool>();
            var UseRKS  = Menu.Item("UseRKS").GetValue <bool>();

            foreach (
                var enemy in
                ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.Team != Player.Team).Where(enemy =>
                                                                                                  !enemy.HasBuff("UndyingRage") && !enemy.HasBuff("JudicatorIntervention") &&
                                                                                                  enemy.IsValidTarget(Spells.QE.Range) && Environment.TickCount - Spells.FlashLastCast > 650 + Game.Ping)
                )
            {
                // Use QE KS
                if (GetDamage.GetComboDamage(enemy, UseQEKS, false, UseQEKS, false) >
                    enemy.Health && Player.Distance(enemy, true) <= Math.Pow(Spells.QE.Range, 2))
                {
                    Spells.UseSpells(false, false, false, false, UseQEKS);
                    PlaySound.PlatSounds();
                    //Game.PrintChat("QEKS " + enemy.Name);
                }
                //Use W KS
                else if (GetDamage.GetComboDamage(enemy, false, UseWKS, false, false) > enemy.Health &&
                         Player.Distance(enemy, true) <= Math.Pow(Spells.W.Range, 2))
                {
                    Spells.UseSpells(false, UseWKS, false, false, false);
                    PlaySound.PlatSounds();
                    //Game.PrintChat("WKS " + enemy.Name);
                }
                //Use Q E KS
                else if (GetDamage.GetComboDamage(enemy, UseQKS, false, UseEKS, false) > enemy.Health &&
                         Player.Distance(enemy, true) <= Math.Pow(Spells.Q.Range + 25f, 2))
                {
                    Spells.UseSpells(UseQKS, false, UseEKS, false, false);
                    PlaySound.PlatSounds();
                    //Game.PrintChat("QEKSC " + enemy.Name);
                }
                //Use QWER QE KS
                else if (GetDamage.GetComboDamage(enemy, UseQKS, UseWKS, UseEKS, UseRKS) > enemy.Health &&
                         Player.Distance(enemy, true) <= Math.Pow(Spells.R.Range, 2))
                {
                    Spells.UseSpells(UseQKS, UseWKS, UseEKS, UseRKS, UseQEKS);
                    PlaySound.PlatSounds();
                    //Game.PrintChat("QWERKS " + enemy.Name);
                }

                // Why ?

/*                else if (
 *                  (GetComboDamage(
 *                      enemy, false, false, Menu.Item("UseEKS").GetValue<bool>(),
 *                      Menu.Item("UseRKS").GetValue<bool>()) > enemy.Health ||
 *                   GetComboDamage(
 *                       enemy, false, Menu.Item("UseWKS").GetValue<bool>(),
 *                       Menu.Item("UseEKS").GetValue<bool>(), false) > enemy.Health) &&
 *                  Player.Distance(enemy, true) <= Math.Pow(QE.Range, 2))
 *              {
 *                  UseSpells(
 *                      false, //Q
 *                      false, //W
 *                      false, //E
 *                      false, //R
 *                      Menu.Item("UseQEKS").GetValue<bool>() //QE
 *                      );
 *                  PlaySound();
 *                  //Game.PrintChat("QEKS " + enemy.Name);
 *              }*/


                //Flash Kill
                var useFlash = Menu.Item("FKT" + enemy.CharData.BaseSkinName) != null &&
                               Menu.Item("FKT" + enemy.CharData.BaseSkinName).GetValue <bool>();
                var useR = Menu.Item("DontR" + enemy.CharData.BaseSkinName) != null &&
                           Menu.Item("DontR" + enemy.CharData.BaseSkinName).GetValue <bool>() == false;
                var rflash = GetDamage.GetComboDamage(enemy, UseQKS, false, UseEKS, false) < enemy.Health;
                var ePos   = Spells.R.GetPrediction(enemy);


                if ((Spells.FlashSlot == SpellSlot.Unknown && Player.Spellbook.CanUseSpell(Spells.FlashSlot) != SpellState.Ready) ||
                    !useFlash || !(Player.Distance(ePos.UnitPosition, true) <= Math.Pow(Spells.Q.Range + 25f + 395, 2)) ||
                    !(Player.Distance(ePos.UnitPosition, true) > Math.Pow(Spells.Q.Range + 25f + 200, 2)))
                {
                    continue;
                }
                if (
                    (!(GetDamage.GetComboDamage(enemy, UseQKS, false, UseEKS, false) > enemy.Health) ||
                     !Menu.Item("UseFK1").GetValue <bool>()) &&
                    (!(GetDamage.GetComboDamage(enemy, false, false, false, UseRKS) > enemy.Health) ||
                     !Menu.Item("UseFK2").GetValue <bool>() ||
                     !(Player.Distance(ePos.UnitPosition, true) <= Math.Pow(Spells.R.Range + 390, 2)) ||
                     Environment.TickCount - Spells.R.LastCastAttemptT <= Game.Ping + 750 ||
                     Environment.TickCount - Spells.QE.LastCastAttemptT <= Game.Ping + 750 ||
                     !(Player.Distance(ePos.UnitPosition, true) > Math.Pow(Spells.R.Range + 200, 2))))
                {
                    continue;
                }
                var totmana = 0d;
                if (Menu.Item("FKMANA").GetValue <bool>())
                {
                    totmana = Spells.SpellList.Aggregate(
                        totmana, (current, spell) => current + Player.Spellbook.GetSpell(spell.Slot).ManaCost);
                }
                if (totmana > Player.Mana && Menu.Item("FKMANA").GetValue <bool>() &&
                    Menu.Item("FKMANA").GetValue <bool>())
                {
                    continue;
                }
                var nearbyE = ePos.UnitPosition.CountEnemiesInRange(1000);
                if (nearbyE > Menu.Item("MaxE").GetValue <Slider>().Value)
                {
                    continue;
                }
                var flashPos = Player.ServerPosition -
                               Vector3.Normalize(Player.ServerPosition - ePos.UnitPosition) * 400;
                if (flashPos.IsWall())
                {
                    continue;
                }
                if (rflash)
                {
                    if (useR)
                    {
                        //Use Ult after flash if can't be killed by QE
                        Player.Spellbook.CastSpell(Spells.FlashSlot, flashPos);
                        Spells.UseSpells(false, false, false, UseRKS, false);
                        PlaySound.PlatSounds();
                    }
                }
                else
                {
                    //Q & E after flash
                    Player.Spellbook.CastSpell(Spells.FlashSlot, flashPos);
                }
                Spells.FlashLastCast = Environment.TickCount;
            }
        }
Ejemplo n.º 3
0
        public static void UseSpells(bool useQBool, bool useWBool, bool useEBool, bool useRBool, bool useQEBool)
        {
            //Set Target
            var qTarget  = TargetSelector.GetTarget(Spells.Q.Range + 25f, TargetSelector.DamageType.Magical);
            var wTarget  = TargetSelector.GetTarget(Spells.W.Range + Spells.W.Width, TargetSelector.DamageType.Magical);
            var rTarget  = TargetSelector.GetTarget(Spells.R.Range, TargetSelector.DamageType.Magical);
            var qeTarget = TargetSelector.GetTarget(Spells.QE.Range + 150, TargetSelector.DamageType.Magical);

            //Harass Combo Key Override
            if (rTarget != null &&
                (Program.harassKey.GetValue <KeyBind>().Active || Program.laneclearKey.GetValue <KeyBind>().Active) &&
                Program.comboKey.GetValue <KeyBind>().Active&&
                ObjectManager.Player.Distance(rTarget, true) <= Math.Pow(Spells.R.Range, 2) &&
                Utils.BuffCheck(rTarget) && Utils.DetectCollision(rTarget))
            {
                if (Program.Menu.Item("DontR" + rTarget.CharData.BaseSkinName) != null &&
                    Program.Menu.Item("DontR" + rTarget.CharData.BaseSkinName).GetValue <bool>() == false &&
                    useRBool && GetDamage.overkillcheckv2(rTarget) <= rTarget.Health && ObjectManager.Player.HealthPercent >= 35)
                {
                    Spells.R.CastOnUnit(rTarget);
                    Spells.R.LastCastAttemptT = Environment.TickCount;
                }
            }
            if (Spells.IgniteSlot.IsReady() && qTarget.Health < GetDamage.GetIgniteDamage(qTarget))
            {
                ObjectManager.Player.Spellbook.CastSpell(Spells.IgniteSlot, qTarget);
            }

            if (Spells.R.IsReady())
            {
                //R, Ignite
                foreach (var enemy in
                         ObjectManager.Get <Obj_AI_Hero>()
                         .Where(
                             enemy =>
                             enemy.Team != ObjectManager.Player.Team && enemy.IsValidTarget(Spells.R.Range) && !enemy.IsDead &&
                             Utils.BuffCheck(enemy)))
                {
                    //R
                    var useR = Program.Menu.Item("DontR" + enemy.CharData.BaseSkinName).GetValue <bool>() == false && useRBool;
                    var okR  = Program.Menu.Item("okR" + enemy.CharData.BaseSkinName).GetValue <Slider>().Value * .01 + 1;
                    if (Utils.DetectCollision(enemy) && useR && ObjectManager.Player.Distance(enemy, true) <= Math.Pow(Spells.R.Range, 2) &&
                        (GetDamage.GetRDamage(enemy)) > enemy.Health * okR &&
                        RCheck(enemy))
                    {
                        if (
                            !(ObjectManager.Player.GetSpellDamage(enemy, SpellSlot.Q) > enemy.Health &&
                              ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).CooldownExpires - Game.Time < 2 &&
                              ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).CooldownExpires - Game.Time >= 0 && enemy.IsStunned) &&
                            Environment.TickCount - Spells.Q.LastCastAttemptT > 500 + Game.Ping &&
                            GetDamage.overkillcheckv2(rTarget) <= rTarget.Health && ObjectManager.Player.HealthPercent >= 35)
                        {
                            Spells.R.CastOnUnit(enemy);
                            Spells.R.LastCastAttemptT = Environment.TickCount;
                        }
                    }
                    //Ignite
                    if (!(ObjectManager.Player.Distance(enemy, true) <= 600 * 600) || !(GetDamage.GetIgniteDamage(enemy) > enemy.Health))
                    {
                        continue;
                    }
                    if (Program.Menu.Item("IgniteALLCD").GetValue <bool>())
                    {
                        if (!Spells.Q.IsReady() && !Spells.W.IsReady() && !Spells.E.IsReady() && !Spells.R.IsReady() &&
                            Environment.TickCount - Spells.R.LastCastAttemptT > Game.Ping + 750 &&
                            Environment.TickCount - Spells.QE.LastCastAttemptT > Game.Ping + 750 &&
                            Environment.TickCount - Spells.W.LastCastAttemptT > Game.Ping + 750)
                        {
                            ObjectManager.Player.Spellbook.CastSpell(Spells.IgniteSlot, enemy);
                        }
                    }
                    else
                    {
                        ObjectManager.Player.Spellbook.CastSpell(Spells.IgniteSlot, enemy);
                    }
                }
            }

            //Use QE
            if (useQEBool && Utils.DetectCollision(qeTarget) && qeTarget != null && Spells.Q.IsReady() &&
                (Spells.E.IsReady() && Spells.E.Level > 0) &&
                ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).ManaCost + ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).ManaCost <=
                ObjectManager.Player.Mana)
            {
                Spells.UseQeSpell(qeTarget);
            }

            //Use Q
            else if (useQBool && qTarget != null)
            {
                Spells.UseQSpell(qTarget);
            }

            //Use E
            if (useEBool && Spells.E.IsReady() && Environment.TickCount - Spells.W.LastCastAttemptT > Game.Ping + 150 &&
                Environment.TickCount - QWLastcast > Game.Ping)
            {
                foreach (
                    var enemy in
                    ObjectManager.Get <Obj_AI_Hero>()
                    .Where(enemy => enemy.Team != ObjectManager.Player.Team)
                    .Where(enemy => enemy.IsValidTarget(Spells.E.Range)))
                {
                    if (GetDamage.GetComboDamage(enemy, useQBool, useWBool, useEBool, useRBool) > enemy.Health &&
                        ObjectManager.Player.Distance(enemy, true) <= Math.Pow(Spells.E.Range, 2))
                    {
                        Spells.E.Cast(enemy);
                    }
                    else if (ObjectManager.Player.Distance(enemy, true) <= Math.Pow(Spells.QE.Range, 2))
                    {
                        Spells.UseESpell(enemy);
                    }
                }
            }
            //Use W
            if (useWBool)
            {
                Spells.UseWSpell(qeTarget, wTarget);
            }
        }
Ejemplo n.º 4
0
        internal static void Draw()
        {
            var menuItem = Program.Menu.Item("DrawQE").GetValue <Circle>();

            if (menuItem.Active)
            {
                Render.Circle.DrawCircle(ObjectManager.Player.Position, Spells.QE.Range, menuItem.Color);
            }
            menuItem = Program.Menu.Item("DrawQEC").GetValue <Circle>();

            if (Program.Menu.Item("drawing").GetValue <bool>())
            {
                foreach (var enemy in ObjectManager.Get <Obj_AI_Hero>().Where(enemy => enemy.Team != ObjectManager.Player.Team))
                {
                    if (enemy.IsVisible && !enemy.IsDead)
                    {
                        //Draw Combo Damage to Enemy HP bars

                        var hpBarPos = enemy.HPBarPosition;
                        hpBarPos.X += 45;
                        hpBarPos.Y += 18;
                        var killText    = "";
                        var combodamage = GetDamage.GetComboDamage(
                            enemy, Program.Menu.Item("UseQ").GetValue <bool>(), Program.Menu.Item("UseW").GetValue <bool>(),
                            Program.Menu.Item("UseE").GetValue <bool>(), Program.Menu.Item("UseR").GetValue <bool>());
                        var PercentHPleftAfterCombo = (enemy.Health - combodamage) / enemy.MaxHealth;
                        var PercentHPleft           = enemy.Health / enemy.MaxHealth;
                        if (PercentHPleftAfterCombo < 0)
                        {
                            PercentHPleftAfterCombo = 0;
                        }
                        double comboXPos     = hpBarPos.X - 36 + (107 * PercentHPleftAfterCombo);
                        double currentHpxPos = hpBarPos.X - 36 + (107 * PercentHPleft);
                        var    barcolor      = Color.FromArgb(100, 0, 220, 0);
                        var    barcolorline  = Color.WhiteSmoke;
                        if (combodamage + ObjectManager.Player.GetSpellDamage(enemy, SpellSlot.Q) +
                            ObjectManager.Player.GetAutoAttackDamage(enemy) * 2 > enemy.Health)
                        {
                            killText = "Killable by: Full Combo + 1Q + 2AA";
                            if (combodamage >= enemy.Health)
                            {
                                killText = "Killable by: Full Combo";
                            }
                            barcolor     = Color.FromArgb(100, 255, 255, 0);
                            barcolorline = Color.SpringGreen;
                            var linecolor = barcolor;
                            if (
                                GetDamage.GetComboDamage(
                                    enemy, Program.Menu.Item("UseQ").GetValue <bool>(), Program.Menu.Item("UseW").GetValue <bool>(),
                                    Program.Menu.Item("UseE").GetValue <bool>(), false) > enemy.Health)
                            {
                                killText  = "Killable by: Q + W + E";
                                barcolor  = Color.FromArgb(130, 255, 70, 0);
                                linecolor = Color.FromArgb(150, 255, 0, 0);
                            }
                            if (Program.Menu.Item("Gank").GetValue <bool>())
                            {
                                var pos = ObjectManager.Player.Position +
                                          Vector3.Normalize(enemy.Position - ObjectManager.Player.Position) * 100;
                                var myPos = Drawing.WorldToScreen(pos);
                                pos = ObjectManager.Player.Position + Vector3.Normalize(enemy.Position - ObjectManager.Player.Position) * 350;
                                var ePos = Drawing.WorldToScreen(pos);
                                Drawing.DrawLine(myPos.X, myPos.Y, ePos.X, ePos.Y, 1, linecolor);
                            }
                        }
                        var killTextPos = Drawing.WorldToScreen(enemy.Position);
                        var hPleftText  = Math.Round(PercentHPleftAfterCombo * 100) + "%";
                        Drawing.DrawLine(
                            (float)comboXPos, hpBarPos.Y, (float)comboXPos, hpBarPos.Y + 5, 1, barcolorline);
                        if (Program.Menu.Item("KillText").GetValue <bool>())
                        {
                            Drawing.DrawText(killTextPos[0] - 105, killTextPos[1] + 25, barcolor, killText);
                        }
                        if (Program.Menu.Item("KillTextHP").GetValue <bool>())
                        {
                            Drawing.DrawText(hpBarPos.X + 98, hpBarPos.Y + 5, barcolor, hPleftText);
                        }
                        if (Program.Menu.Item("DrawHPFill").GetValue <bool>())
                        {
                            var diff = currentHpxPos - comboXPos;
                            for (var i = 0; i < diff; i++)
                            {
                                Drawing.DrawLine(
                                    (float)comboXPos + i, hpBarPos.Y + 2, (float)comboXPos + i,
                                    hpBarPos.Y + 10, 1, barcolor);
                            }
                        }
                    }

                    //Draw QE to cursor circle
                    if (Program.Menu.Item("UseQEC").GetValue <KeyBind>().Active&& Spells.E.IsReady() && Spells.Q.IsReady() && menuItem.Active)
                    {
                        Render.Circle.DrawCircle(Game.CursorPos, 150f,
                                                 (enemy.Distance(Game.CursorPos, true) <= 150 * 150) ? Color.Red : menuItem.Color, 3);
                    }
                }
            }

            foreach (var spell in Spells.SpellList)
            {
                // Draw Spell Ranges
                menuItem = Program.Menu.Item("Draw" + spell.Slot).GetValue <Circle>();
                if (menuItem.Active)
                {
                    Render.Circle.DrawCircle(ObjectManager.Player.Position, spell.Range, menuItem.Color);
                }
            }

            // Dashboard Indicators
            if (Program.Menu.Item("HUD").GetValue <bool>())
            {
                if (Program.Menu.Item("HarassActiveT").GetValue <KeyBind>().Active)
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.68f, Color.Yellow, "Auto Harass : On");
                }
                else
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.68f, Color.DarkRed, "Auto Harass : Off");
                }

                if (Program.Menu.Item("AutoKST").GetValue <KeyBind>().Active)
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.66f, Color.Yellow, "Auto KS : On");
                }
                else
                {
                    Drawing.DrawText(Drawing.Width * 0.90f, Drawing.Height * 0.66f, Color.DarkRed, "Auto KS : Off");
                }
            }
            // Draw QE MAP
            if (Program.Menu.Item("DrawQEMAP").GetValue <bool>())
            {
                var qeTarget = TargetSelector.GetTarget(Spells.QE.Range, TargetSelector.DamageType.Magical);
                var sPos     = Prediction.GetPrediction(qeTarget, Spells.Q.Delay + Spells.E.Delay).UnitPosition;
                var tPos     = Spells.QE.GetPrediction(qeTarget);
                if (tPos != null && ObjectManager.Player.Distance(sPos, true) > Math.Pow(Spells.E.Range, 2) &&
                    (Spells.E.IsReady() || ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).CooldownExpires - Game.Time < 2) &&
                    ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).Level > 0)
                {
                    var color = Color.Red;
                    var orb   = ObjectManager.Player.Position + Vector3.Normalize(sPos - ObjectManager.Player.Position) * Spells.E.Range;
                    Spells.QE.Delay = Spells.Q.Delay + Spells.E.Delay + ObjectManager.Player.Distance(orb) / Spells.E.Speed;
                    if (tPos.Hitchance >= HitChance.Medium)
                    {
                        color = Color.Green;
                    }
                    if (ObjectManager.Player.Spellbook.GetSpell(SpellSlot.Q).ManaCost +
                        ObjectManager.Player.Spellbook.GetSpell(SpellSlot.E).ManaCost > ObjectManager.Player.Mana)
                    {
                        color = Color.DarkBlue;
                    }
                    var pos = ObjectManager.Player.Position + Vector3.Normalize(tPos.UnitPosition - ObjectManager.Player.Position) * 700;
                    Render.Circle.DrawCircle(pos, Spells.Q.Width, color);
                    Render.Circle.DrawCircle(tPos.UnitPosition, Spells.Q.Width / 2, color);
                    var sp1 = pos + Vector3.Normalize(ObjectManager.Player.Position - pos) * 100f;
                    var sp  = Drawing.WorldToScreen(sp1);
                    var ep1 = pos + Vector3.Normalize(pos - ObjectManager.Player.Position) * 592;
                    var ep  = Drawing.WorldToScreen(ep1);
                    Drawing.DrawLine(sp.X, sp.Y, ep.X, ep.Y, 2, color);
                }
            }

            if (!Program.Menu.Item("DrawWMAP").GetValue <bool>() || ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).Level <= 0)
            {
                return;
            }
            var color2  = Color.FromArgb(100, 255, 0, 0);
            var wTarget = TargetSelector.GetTarget(Spells.W.Range + Spells.W.Width, TargetSelector.DamageType.Magical);
            var pos2    = Spells.W.GetPrediction(wTarget, true);

            if (pos2.Hitchance >= HitChance.High)
            {
                color2 = Color.FromArgb(100, 50, 150, 255);
            }
            Render.Circle.DrawCircle(pos2.UnitPosition, Spells.W.Width, color2);
        }