Example #1
0
 private static void Loading_OnLoadingComplete(EventArgs args)
 {
     Menu = MainMenu.AddMenu("Activator", "activatorMenu");
     ItemManager.Init();
     SummonerSpells.Init();
     Defence.Init();
 }
Example #2
0
        public static double Damage(Obj_AI_Base target)
        {
            if (target == null)
            {
                return(0);
            }

            var dmg = 0d;

            if (Global.Orbwalker.CanAttack())
            {
                dmg += Global.Player.GetAutoAttackDamage(target);
            }

            if (SpellManager.Q.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.Q);
            }

            if (SpellManager.E.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.E) + Global.Player.GetSpellDamage(target, SpellSlot.E, DamageStage.Collision);
            }

            if (SummonerSpells.IsValid(SummonerSpells.Ignite))
            {
                dmg += SummonerSpells.IgniteDamage(target);
            }
            return(dmg);
        }
Example #3
0
        public static void OnUpdate()
        {
            var target = GameObjects.EnemyHeroes.FirstOrDefault(x => x.Distance(Global.Player) < SpellConfig.R.Range && x.HealthPercent() <= 40);

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

            if (SpellConfig.Q.Ready && target.Health < Global.Player.GetSpellDamage(target, SpellSlot.Q) &&
                target.IsValidTarget(SpellConfig.Q.Range) &&
                MenuConfig.Killsteal["Q"].Enabled)
            {
                if (Extension.CurrentMode == Mode.Tornado && !MenuConfig.Killsteal["Q3"].Enabled)
                {
                    return;
                }

                SpellConfig.Q.Cast(target);
            }
            else if (SpellConfig.E.Ready && target.Health < Global.Player.GetSpellDamage(target, SpellSlot.E) &&
                     target.IsValidTarget(SpellConfig.E.Range) &&
                     !target.HasBuff("YasuoDashWrapper") &&
                     MenuConfig.Killsteal["E"].Enabled)
            {
                SpellConfig.E.CastOnUnit(target);
            }
            else if (MenuConfig.Killsteal["Ignite"].Enabled && SummonerSpells.IsValid(SummonerSpells.Ignite) && target.Health < SummonerSpells.IgniteDamage(target))
            {
                SummonerSpells.Ignite.Cast(target);
            }
        }
Example #4
0
        public void QSmite(Obj_AI_Base target)
        {
            var pred    = this.Q.GetPrediction(target);
            var objects = pred.CollisionObjects;

            if (pred.HitChance != HitChance.Collision || !objects.Any())
            {
                return;
            }

            if (SummonerSpells.Smite == null || !SummonerSpells.Smite.Ready || SummonerSpells.Ammo("Smite") < 2)
            {
                return;
            }

            var current = objects.FirstOrDefault();

            if (current == null || current.NetworkId == target.NetworkId || current.Health > SummonerSpells.SmiteMonsters() ||
                current.ServerPosition.Distance(Global.Player) > SummonerSpells.Smite.Range)
            {
                return;
            }

            SummonerSpells.Smite.CastOnUnit(current);
            Global.Player.SpellBook.CastSpell(SpellSlot.Q, target.ServerPosition);
        }
Example #5
0
        public static double Damage(Obj_AI_Base target)
        {
            if (target == null)
            {
                return(0);
            }

            var dmg = 0d;

            if (SoldierManager.Soldiers != null && SoldierManager.Soldiers.Any())
            {
                dmg += (SoldierManager.Soldiers.Count + Global.Player.GetSpell(SpellSlot.W).Ammo) * Global.Player.GetSpellDamage(target, SpellSlot.W);
            }

            if (SpellConfig.E.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.E);
            }

            if (SpellConfig.Q.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.Q);
            }

            if (SummonerSpells.IsValid(SummonerSpells.Ignite))
            {
                dmg += SummonerSpells.IgniteDamage(target);
            }

            return(dmg);
        }
Example #6
0
        public void OnUpdate()
        {
            var target = GameObjects.EnemyHeroes.FirstOrDefault(x => x.Distance(Global.Player) < spellConfig.R.Range && x.HealthPercent() <= 40);

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

            if (this.SmiteEnabled && SummonerSpells.IsValid(SummonerSpells.Smite) && target.Health < SummonerSpells.SmiteChampions())
            {
                SummonerSpells.Smite.CastOnUnit(target);
            }
            if (spellConfig.Q.Ready &&
                (spellConfig.IsQ2()
                    ? target.Health < Global.Player.GetSpellDamage(target, SpellSlot.Q, DamageStage.SecondCast)
                    : target.Health < Global.Player.GetSpellDamage(target, SpellSlot.Q)) &&
                target.IsValidTarget(spellConfig.Q.Range) && this.QEnabled)
            {
                spellConfig.Q.Cast(target);
            }
            else if (spellConfig.E.Ready && target.Health < Global.Player.GetSpellDamage(target, SpellSlot.E) && target.IsValidTarget(spellConfig.E.Range) && this.EEnabled)
            {
                spellConfig.E.Cast();
            }
            else if (spellConfig.R.Ready && target.Health < Global.Player.GetSpellDamage(target, SpellSlot.R) && target.IsValidTarget(spellConfig.R.Range) && this.REnabled)
            {
                spellConfig.R.CastOnUnit(target);
            }
            else if (this.IgniteEnabled && SummonerSpells.IsValid(SummonerSpells.Ignite) && target.Health < SummonerSpells.IgniteDamage(target))
            {
                SummonerSpells.Ignite.Cast(target);
            }
        }
Example #7
0
        void Drawing_OnEndScene(EventArgs args)
        {
            if (!IsActive())
            {
                return;
            }

            SpellSlot spell = SummonerSpells.GetFlashSlot();

            if (ObjectManager.Player.Spellbook.CanUseSpell(spell) != SpellState.Ready)
            {
                return;
            }

            for (int i = 0; i < spotsStart.Count; i++)
            {
                if (ObjectManager.Player.ServerPosition.Distance(spotsStart[i]) < 2000)
                {
                    if (spotsStart[i].IsOnScreen())
                    {
                        Utility.DrawCircle(spotsStart[i], 50, System.Drawing.Color.Red);
                    }
                    if (spotsEnd[i].IsOnScreen())
                    {
                        Utility.DrawCircle(spotsEnd[i], 100, System.Drawing.Color.Green);
                    }
                    if (spotsStart[i].IsOnScreen() || spotsEnd[i].IsOnScreen())
                    {
                        Drawing.DrawLine(Drawing.WorldToScreen(spotsStart[i]), Drawing.WorldToScreen(spotsEnd[i]), 2, Color.Gold);
                    }
                }
            }
        }
Example #8
0
        public static void OnKeyPressed()
        {
            var target = Global.TargetSelector.GetSelectedTarget();

            if (target == null || !SpellManager.E.Ready)
            {
                return;
            }

            if (target.IsValidTarget(SpellManager.E.Range))
            {
                SpellManager.CastE(target);
            }

            var point = WallExtension.NearestWall(target, 430);

            if (point.IsZero)
            {
                return;
            }

            var pos = target.ServerPosition + (target.ServerPosition - point).Normalized() * 200;

            SpellManager.DrawingPred = pos;

            if (pos.Distance(Global.Player) <= SummonerSpells.Flash.Range && SummonerSpells.IsValid(SummonerSpells.Flash))
            {
                SpellManager.E.CastOnUnit(target);
                DelayAction.Queue(100, () => SummonerSpells.Flash.Cast(pos), new CancellationToken(false));
            }
        }
Example #9
0
        public static double Damage(Obj_AI_Base target)
        {
            if (target == null)
            {
                return(0);
            }

            var dmg = Global.Player.GetAutoAttackDamage(target);

            if (SpellConfig.R.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.R, DamageStage.SecondCast);
            }

            if (SpellConfig.W.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.W);
            }

            if (SpellConfig.Q.Ready)
            {
                var count = 4 - Extensions.CurrentQCount;
                dmg += (Global.Player.GetSpellDamage(target, SpellSlot.Q) + dmg) * count;
            }

            if (SummonerSpells.IsValid(SummonerSpells.Ignite))
            {
                dmg += SummonerSpells.IgniteDamage(target);
            }

            return(dmg);
        }
Example #10
0
        public static void OnUpdate()
        {
            var target = GameObjects.EnemyHeroes.FirstOrDefault(x => x.Distance(Global.Player) < SpellConfig.R.Range && x.HealthPercent() <= 40);

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

            if (SpellConfig.Q.Ready && target.Health < Global.Player.GetSpellDamage(target, SpellSlot.Q) &&
                target.IsValidTarget(SpellConfig.Q.Range) &&
                MenuConfig.Killsteal["Q"].Enabled)
            {
                SpellConfig.Q.Cast(target);
            }
            else if (SpellConfig.W.Ready && target.Health < Global.Player.GetSpellDamage(target, SpellSlot.W) &&
                     target.IsValidTarget(SpellConfig.W.Range) &&
                     MenuConfig.Killsteal["W"].Enabled)
            {
                SpellConfig.W.Cast(target);
            }
            else if (SpellConfig.R.Ready && target.Health < Global.Player.GetSpellDamage(target, SpellSlot.R) + Global.Player.GetAutoAttackDamage(target) &&
                     target.IsValidTarget(SpellConfig.R.Range) &&
                     MenuConfig.Killsteal["R"].Enabled)
            {
                SpellConfig.R.CastOnUnit(target);
            }
            else if (MenuConfig.Killsteal["Ignite"].Enabled && SummonerSpells.IsValid(SummonerSpells.Ignite) && target.Health < SummonerSpells.IgniteDamage(target))
            {
                SummonerSpells.Ignite.Cast(target);
            }
        }
Example #11
0
        public static double Damage(Obj_AI_Base target)
        {
            if (target == null)
            {
                return(0);
            }

            var dmg = Global.Player.GetAutoAttackDamage(target);

            if (SpellConfig.E.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.E);
            }

            if (SpellConfig.W.Ready)
            {
                Global.Player.GetSpellDamage(target, SpellSlot.W);
            }

            if (SpellConfig.Q.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.Q) + dmg;
            }

            if (SummonerSpells.IsValid(SummonerSpells.Ignite))
            {
                dmg += SummonerSpells.IgniteDamage(target);
            }

            return(dmg);
        }
Example #12
0
        public static void CastE(Obj_AI_Base target, bool flash = false)
        {
            var canFlash = flash && SummonerSpells.IsValid(SummonerSpells.Flash) && target.Distance(Global.Player) > E.Range && target.Distance(Global.Player) < E.Range + 425;

            var pred = E.GetPrediction(target);

            BodySlam = new Geometry.Rectangle(
                canFlash ? Global.Player.ServerPosition.Extend(target.ServerPosition, 425 + E.Range - target.BoundingRadius).To2D() : Global.Player.ServerPosition.To2D(),
                Global.Player.ServerPosition.Extend(pred.CastPosition, E.Range).To2D(),
                EHitboxRadius);

            if (BodySlam.IsOutside(target.ServerPosition.To2D()))
            {
                return;
            }

            if (GameObjects.EnemyMinions.Any(x => BodySlam.IsInside(x.ServerPosition.To2D()) && x.Distance(BodySlam.Start) <= target.Distance(BodySlam.Start) &&
                                             x.Distance(target) >= Global.Player.BoundingRadius + 200))
            {
                return;
            }

            if (canFlash)
            {
                E.Cast(target.ServerPosition);
                DelayAction.Queue(300, () => SummonerSpells.Flash.Cast(target.ServerPosition), new CancellationToken(false));
                return;
            }

            E.Cast(target.ServerPosition);
        }
Example #13
0
        public static void Initialize()
        {
            Q = new Spell.Active(SpellSlot.Q);
            W = new Spell.Active(SpellSlot.W);
            E = new Spell.Targeted(SpellSlot.E, 650);
            R = new Spell.Active(SpellSlot.R, 500);

            SummonerSpells.Initialize();
        }
Example #14
0
        private static void Game_OnStart(EventArgs args)
        {
            if (myHero.Spellbook.GetSpell(SpellSlot.Summoner1).Name == "summonerheal")
            {
                Heal = new Spell.Active(SpellSlot.Summoner1);
            }
            if (myHero.Spellbook.GetSpell(SpellSlot.Summoner2).Name == "summonerheal")
            {
                Heal = new Spell.Active(SpellSlot.Summoner2);
            }

            if (myHero.Spellbook.GetSpell(SpellSlot.Summoner1).Name == "summonermana")
            {
                Clarity = new Spell.Active(SpellSlot.Summoner1);
            }
            if (myHero.Spellbook.GetSpell(SpellSlot.Summoner2).Name == "summonermana")
            {
                Clarity = new Spell.Active(SpellSlot.Summoner2);
            }

            trinket            = new Item((int)ItemId.Warding_Totem_Trinket);
            Boots              = new Item((int)ItemId.Boots_of_Speed);
            MercuryTreads      = new Item((int)ItemId.Mercurys_Treads);
            SapphireCrystal    = new Item((int)ItemId.Sapphire_Crystal);
            RubyCrystal        = new Item((int)ItemId.Ruby_Crystal);
            SapphireCrystal    = new Item((int)ItemId.Sapphire_Crystal);
            BlastingWand       = new Item((int)ItemId.Blasting_Wand);
            ROA                = new Item((int)ItemId.Rod_of_Ages);
            Catalyst           = new Item((int)ItemId.Catalyst_the_Protector);
            ArchangelsStaff    = new Item((int)ItemId.Archangels_Staff);
            Tear               = new Item((int)ItemId.Tear_of_the_Goddess);
            NeedlesslyLargeRod = new Item((int)ItemId.Needlessly_Large_Rod);
            SeraphEmbrace      = new Item(3040);
            Menu               = MainMenu.AddMenu("RyzeFollow", "ryzefollow");
            Menu.Add("sliderdist", new Slider("Distance to ally", 70, 50, 300));
            Menu.Add("recall", new CheckBox("Recall if ally is recalling"));
            Laneclear = Menu.AddSubMenu("Laneclear", "laneclear");
            Laneclear.Add("QLaneclear", new CheckBox("Use Q in laneclear"));
            Laneclear.Add("QSlider", new Slider("Use Q in laneclear only if mana > than", 40, 0, 100));
            Agressive = Menu.AddSubMenu("Agressive mode", "agm");
            Agressive.Add("kill", new CheckBox("Orbwalk to target if enemy is killable"));
            SummonerSpells = Menu.AddSubMenu("Summoner spells", "summs");
            SummonerSpells.Add("heal", new Slider("Use heal at % health", 40, 0, 100));
            SummonerSpells.Add("mana", new Slider("Use clarity at % mana", 40, 0, 100));
            if (myHero.ChampionName == "Ryze")
            {
                Q = new Spell.Skillshot(SpellSlot.Q, 900, SkillShotType.Linear, 250, 1700, 100);
                W = new Spell.Targeted(SpellSlot.W, 600);
                E = new Spell.Targeted(SpellSlot.E, 600);
                R = new Spell.Active(SpellSlot.R);
            }
            Game.OnUpdate += Game_OnUpdate;
            //1095
        }
Example #15
0
        public static void OnUpdate()
        {
            var target = Global.TargetSelector.GetTarget(SpellManager.Q.Range + Global.Player.AttackRange);

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

            if (SpellManager.Q.Ready && MenuConfig.Combo["Q"].Value == 1)
            {
                SpellManager.CastQ(target, MenuConfig.Combo["Mode"].Value, MenuConfig.Combo["ToE"].Enabled);
            }

            else if (SpellManager.E.Ready && MenuConfig.Combo["E"].Enabled && MenuConfig.Combo[target.ChampionName].Enabled)
            {
                SpellManager.CastE(target);
            }

            else if (SpellManager.R.Ready && MenuConfig.Combo["R"].Enabled)
            {
                if (target.Health > Dmg.Damage(target) && MenuConfig.Combo["Killable"].Enabled)
                {
                    return;
                }

                if (Global.Player.CountEnemyHeroesInRange(1500) >= MenuConfig.Combo["Count"].Value && target.HealthPercent() >= 25)
                {
                    SpellManager.R.Cast();
                }
            }

            if (!MenuConfig.Combo["Flash"].Enabled || !SpellManager.E.Ready || !SummonerSpells.IsValid(SummonerSpells.Flash))
            {
                return;
            }

            var allyT = GameObjects.AllyTurrets.FirstOrDefault(x => x.Distance(target) <= 900);

            if (allyT == null)
            {
                return;
            }

            var pos = target.ServerPosition + (target.ServerPosition - allyT.ServerPosition).Normalized() * 200;

            if (pos.Distance(Global.Player) > 425)
            {
                return;
            }

            SpellManager.E.CastOnUnit(target);
            DelayAction.Queue(100, () => SummonerSpells.Flash.Cast(pos), new CancellationToken(false));
        }
Example #16
0
        public static void Initialize()
        {
            _spells = new Dictionary <DamageToUnitDelegate, Color>
            {
                { QDamage, Color.Blue },
                { EDamage, Color.Red },
                { IgniteDamage, Color.FromArgb(255, 120, 56, 28) },
            };

            SummonerSpells.Initialize();
            Drawing.OnEndScene += Drawing_OnEndScene;
        }
Example #17
0
        private static Tuple <string, string> GetSummonerSpellsPaths(Participant participant)
        {
            var spell1 = SummonerSpells.FirstOrDefault(s => s.Id == participant.Spell1Id);
            var spell2 = SummonerSpells.FirstOrDefault(s => s.Id == participant.Spell2Id);

            if (spell1 == null || spell2 == null)
            {
                return(Tuple.Create("/lol-game-data/assets/DATA/Spells/Icons2D/Summoner_heal.png", "/lol-game-data/assets/DATA/Spells/Icons2D/Summoner_haste.png"));
            }

            return(Tuple.Create(spell1.IconPath, spell2.IconPath));
        }
Example #18
0
        private static void DrawLine(Obj_AI_Base unit)
        {
            var barPos = unit.HPBarPosition;
            var percentHealthAfterDamage = Math.Max(0, unit.Health - SummonerSpells.SmiteDamage()) /
                                           (unit.MaxHealth + unit.AllShield + unit.AttackShield + unit.MagicShield);
            var currentHealthPercentage = unit.Health / (unit.MaxHealth + unit.AllShield + unit.AttackShield + unit.MagicShield);
            var startPoint = barPos.X + OffsetX + (percentHealthAfterDamage * Width);
            var endPoint   = barPos.X + OffsetX + (currentHealthPercentage * Width);
            var yPos       = barPos.Y + OffsetY;
            var canKill    = SummonerSpells.SmiteDamage() - 10 > unit.Health;

            Drawing.DrawLine(startPoint, yPos, endPoint, yPos, Height, canKill ? Color.BlueViolet : Color.Beige);
        }
Example #19
0
        static Spells()
        {
            var keys = SummonerList.Where(x => x.Value.Slot == SpellSlot.Unknown).Select(x => x.Key).ToList();

            foreach (var key in keys)
            {
                SummonerList.Remove(key);
            }
            if (SummonerSpells.PlayerHas(SummonerSpellsEnum.Barrier))
            {
                GameObject.OnCreate            += GameObject_OnCreate;
                Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast;
            }
        }
Example #20
0
        public void SmiteMob()
        {
            var smiteAbleMob = ObjectManager.Get<Obj_AI_Minion>().FirstOrDefault(x => x.Distance(Global.Player) < 1300);

            if (smiteAbleMob != null && (smiteAlways.Contains(smiteAbleMob.UnitSkinName) || smiteOptional.Contains(smiteAbleMob.UnitSkinName)))
            {
                if (smiteAbleMob.Health < StealDamage(smiteAbleMob))
                {
                    if (smiteOptional.Contains(smiteAbleMob.UnitSkinName) && Global.Player.HealthPercent() >= (SummonerSpells.Ammo("Smite") <= 1 ? 40 : 50) ||
                        smiteAbleMob.UnitSkinName.ToLower().Contains("blue") && !this.BlueEnabled)
                    {
                        return;
                    }

                    if (this.SmiteEnabled && SummonerSpells.IsValid(SummonerSpells.Smite))
                    {
                        SummonerSpells.Smite.CastOnUnit(smiteAbleMob);
                    }

                    if (spellConfig.IsQ2() && spellConfig.Q.Ready)
                    {
                        spellConfig.Q.Cast();
                    }
                }
            }

            var mob = GameObjects.JungleLegendary.FirstOrDefault(x => x.Distance(Global.Player) <= 1500);

            if (mob == null || !this.SmiteEnabled)
            {
                return;
            }

            if (q2Time > 0 && Game.TickCount - q2Time <= 1500 && SummonerSpells.IsValid(SummonerSpells.Smite) && StealDamage(mob) > mob.Health)
            {
                if (spellConfig.W.Ready && spellConfig.IsFirst(spellConfig.W) && Global.Player.Distance(mob) <= 500)
                {
                    SummonerSpells.Smite.CastOnUnit(mob);
                    wardManager.WardJump(positions.FirstOrDefault(), (int) mob.Distance(Global.Player));
                }
            }

            if (mob.Position.CountAllyHeroesInRange(700) <= 1 && spellConfig.Q.Ready && spellConfig.IsQ2() && StealDamage(mob) > mob.Health)
            {
                spellConfig.Q.Cast();
                q2Time = Game.TickCount;
            }
        }
Example #21
0
        public static float InsecRange()
        {
            var range = 250f;

            if (SpellConfig.E.Ready)
            {
                range += SpellConfig.E.Range - 65;
            }

            if (MenuConfig.InsecMenu["Flash"].Enabled && SummonerSpells.IsValid(SummonerSpells.Flash))
            {
                range += SummonerSpells.Flash.Range;
            }

            return(range);
        }
Example #22
0
        public static double Damage(Obj_AI_Base target)
        {
            if (target == null)
            {
                return(0);
            }

            var dmg         = 0d;
            var shadowCount = ShadowManager.Shadows.Count + 1;

            if (SpellManager.W.Ready && ShadowManager.CanCastFirst(SpellSlot.W))
            {
                shadowCount += 1;
            }

            if (SpellManager.R.Ready && ShadowManager.CanCastFirst(SpellSlot.R))
            {
                shadowCount += 1;
            }

            if (Global.Orbwalker.CanAttack())
            {
                dmg += Global.Player.GetAutoAttackDamage(target);
            }

            if (SpellManager.Q.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.Q) * shadowCount;
            }

            if (SpellManager.E.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.E);
            }

            if (SpellManager.R.Ready)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.R) + dmg;
            }

            if (SummonerSpells.IsValid(SummonerSpells.Ignite))
            {
                dmg += SummonerSpells.IgniteDamage(target);
            }
            return(dmg);
        }
Example #23
0
            static Types()
            {
                OffensiveMenu = Menu.AddSubMenu("::Offensive Items::");
                OffensiveItems.Initialize();

                DefensiveMenu = Menu.AddSubMenu("::Defensive Items::");
                DeffensiveItems.Initialize();

                ConsumablesMenu = Menu.AddSubMenu("::Consumables Items::");
                ConsumablesItems.Initialize();

                SummonerMenu = Menu.AddSubMenu("::Summoner Spells::");
                SummonerSpells.Initialize();

                SettingsMenu = Menu.AddSubMenu("::Settings::");
                Settings.Initialize();
            }
Example #24
0
        void Game_OnGameUpdate(EventArgs args)
        {
            if (!IsActive() || !FlashJukeMisc.GetMenuItem("SAssembliesMiscsFlashJukeKeyActive").GetValue <KeyBind>().Active || lastGameUpdateTime + new Random().Next(500, 1000) > Environment.TickCount)
            {
                return;
            }

            lastGameUpdateTime = Environment.TickCount;

            SpellSlot spell = SummonerSpells.GetFlashSlot();

            if (ObjectManager.Player.Spellbook.CanUseSpell(spell) != SpellState.Ready)
            {
                return;
            }

            Vector3 nearestPosStart = GetNearestPos(spotsStart);

            if (Game.Time > flashedTime + 5)
            {
                ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, nearestPosStart);
            }

            if (nearestPosStart.X != 0 && ObjectManager.Player.Distance(nearestPosStart) < 50 && !NavMesh.IsWallOfGrass(ObjectManager.Player.ServerPosition, 10) && Game.Time > flashedTime + 5 &&
                !AnyEnemyInBush())
            {
                Vector3 nearestPosEnd = GetNearestPos(spotsEnd);
                if (nearestPosEnd.X != 0)
                {
                    Packet.C2S.Cast.Encoded(new Packet.C2S.Cast.Struct(0, spell, -1, nearestPosEnd.X, nearestPosEnd.Y, nearestPosEnd.X, nearestPosEnd.Y)).Send();
                    ObjectManager.Player.Spellbook.CastSpell(spell, nearestPosEnd);
                    flashedTime = Game.Time;
                    if (FlashJukeMisc.GetMenuItem("SAssembliesMiscsFlashJukeRecall").GetValue <bool>())
                    {
                        Utility.DelayAction.Add(200, () =>
                        {
                            ObjectManager.Player.IssueOrder(GameObjectOrder.MoveTo, nearestPosEnd);
                            Packet.C2S.Cast.Encoded(new Packet.C2S.Cast.Struct(0, SpellSlot.Recall)).Send();
                            ObjectManager.Player.Spellbook.CastSpell(SpellSlot.Recall);
                        });
                    }
                }
            }
        }
Example #25
0
        public static double Damage(Obj_AI_Base target)
        {
            if (target == null)
            {
                return(0);
            }

            var dmg = Global.Player.GetAutoAttackDamage(target);

            if (SpellManager.Q.Ready)
            {
                dmg += SpellManager.GnarState == GnarState.Small
                    ? Global.Player.GetSpellDamage(target, SpellSlot.Q)
                    : Global.Player.GetSpellDamage(target, SpellSlot.Q, DamageStage.SecondForm);
            }

            if (SpellManager.W.Ready)
            {
                dmg += SpellManager.GnarState == GnarState.Small
                    ? Global.Player.GetSpellDamage(target, SpellSlot.W)
                    : Global.Player.GetSpellDamage(target, SpellSlot.W, DamageStage.SecondForm);
            }

            if (SpellManager.E.Ready)
            {
                dmg += SpellManager.GnarState == GnarState.Small
                    ? Global.Player.GetSpellDamage(target, SpellSlot.E)
                    : Global.Player.GetSpellDamage(target, SpellSlot.E, DamageStage.SecondForm);
            }

            if (SpellManager.R.Ready && SpellManager.GnarState == GnarState.Mega)
            {
                dmg += Global.Player.GetSpellDamage(target, SpellSlot.R) + Global.Player.GetSpellDamage(target, SpellSlot.R, DamageStage.Collision);
            }

            if (SummonerSpells.IsValid(SummonerSpells.Ignite))
            {
                dmg += SummonerSpells.IgniteDamage(target);
            }

            return(dmg);
        }
Example #26
0
        public static void OnUpdate()
        {
            var target = GameObjects.EnemyHeroes.FirstOrDefault(x => x.Distance(Global.Player) <= SpellConfig.R2.Range && x.IsValid && !x.IsDead);

            if (target == null)
            {
                return;
            }

            if (SpellConfig.R2.Ready &&
                Enums.UltimateMode == UltimateMode.Second &&
                MenuConfig.Killsteal["R2"].Enabled)
            {
                var killable = target.Health <= Global.Player.GetSpellDamage(target, SpellSlot.R) ||
                               target.Health <= Global.Player.GetSpellDamage(target, SpellSlot.R) +
                               Global.Player.GetAutoAttackDamage(target) && target.Distance(Global.Player) <= Global.Player.AttackRange + 65;

                if (killable)
                {
                    SpellManager.CastR2(target);
                }
            }
            else if (SpellConfig.W.Ready &&
                     MenuConfig.Killsteal["W"].Enabled &&
                     target.Health <= Global.Player.GetSpellDamage(target, SpellSlot.W) &&
                     target.IsValidTarget(SpellConfig.W.Range))
            {
                SpellManager.CastW(target);
            }
            else if (SpellConfig.Q.Ready &&
                     MenuConfig.Killsteal["Q"].Enabled &&
                     target.Health <= Global.Player.GetSpellDamage(target, SpellSlot.Q) &&
                     target.Distance(Global.Player) <= SpellConfig.Q.Range)
            {
                SpellManager.CastQ(target);
            }

            if (MenuConfig.Killsteal["Ignite"].Enabled && SummonerSpells.IsValid(SummonerSpells.Ignite) && target.Health < SummonerSpells.IgniteDamage(target))
            {
                SummonerSpells.Ignite.CastOnUnit(target);
            }
        }
Example #27
0
            static Types()
            {
                OffensiveMenu = Menu.AddSubMenu("Offensive Items");
                OffensiveItems.Initialize();

                DefensiveMenu = Menu.AddSubMenu("Defensive Items");
                DeffensiveItems.Initialize();

                ConsumablesMenu = Menu.AddSubMenu("Consumables Items");
                ConsumablesItems.Initialize();

                SummonerMenu = Menu.AddSubMenu("Summoner Spells");
                SummonerSpells.Initialize();

                DrawMenu = Menu.AddSubMenu("Drawings");
                DrawMenu.AddLabel("SOON");

                SettingsMenu = Menu.AddSubMenu("Settings");
                Settings.Initialize();
            }
Example #28
0
        public static void CastR(Obj_AI_Base target, int count = 1)
        {
            var wall = WallExtension.NearestWall(target, 590);

            if (wall.IsZero || count != 1 && wall.CountEnemyHeroesInRange(590) < count)
            {
                return;
            }

            var flashPos = wall + (wall - Global.Player.ServerPosition).Normalized() * SummonerSpells.Flash.Range;

            if (SummonerSpells.IsValid(SummonerSpells.Flash) && MenuConfig.Combo["Flash"].Enabled && target.Distance(Global.Player) > 475 && wall.Distance(Global.Player) < 475 + 425)
            {
                SummonerSpells.Flash.Cast(flashPos);
            }

            if (wall.Distance(Global.Player) <= 590)
            {
                R.Cast(wall);
            }
        }
Example #29
0
 private double StealDamage(Obj_AI_Base mob)
 {
     return SummonerSpells.SmiteMonsters() + (spellConfig.IsQ2() ? Global.Player.GetSpellDamage(mob, SpellSlot.Q, DamageStage.SecondCast) : 0);
 }
Example #30
0
        public static void OnKeyPressed()
        {
            var target = Extension.BeybladeMode.GetTarget() as Obj_AI_Hero;

            if (target == null)
            {
                return;
            }

            var distance = target.Distance(Global.Player);
            var minion   = MinionHelper.GetDashableMinion(target);

            var m2 = MinionHelper.GetClosest(target);
            var positionBehindMinion = MinionHelper.WalkBehindMinion(target);

            MinionHelper.ExtendedMinion = positionBehindMinion;
            MinionHelper.ExtendedTarget = target.ServerPosition;

            var dashDistance = MinionHelper.DashDistance(minion, target);

            if (SpellConfig.Q.Ready)
            {
                switch (Extension.CurrentMode)
                {
                case Mode.Dashing:
                    SpellConfig.Q.Cast();
                    break;

                case Mode.DashingTornado:
                    if (minion != null && dashDistance <= 425 && dashDistance > 220)
                    {
                        if (MenuConfig.Combo["Flash"].Enabled && SummonerSpells.IsValid(SummonerSpells.Flash))
                        {
                            SpellConfig.Q.Cast();

                            DelayAction.Queue(Game.Ping / 2 + 30, () =>
                            {
                                SummonerSpells.Flash.Cast(target.Position);
                            }, new CancellationToken(false));;
                        }
                    }
                    break;

                case Mode.Normal:
                    if (target.IsValidTarget(SpellConfig.Q.Range))
                    {
                        SpellConfig.Q.CastOnUnit(target);
                    }
                    break;
                }
            }

            //if (KnockUpHelper.IsItTimeToUlt(target, 860) && SpellConfig.R.Ready)
            //{
            //    SpellConfig.R.OnProcessSpellCast();
            //}

            if (SpellConfig.E.Ready)
            {
                if (distance <= 320)
                {
                    return;
                }

                if (!positionBehindMinion.IsZero && Global.Orbwalker.CanMove())
                {
                    Global.Orbwalker.Move(positionBehindMinion);
                    if (positionBehindMinion.Distance(Global.Player) <= 65)
                    {
                        SpellConfig.E.CastOnUnit(m2);
                    }
                }
                else if (minion != null)
                {
                    SpellConfig.E.CastOnUnit(minion);
                }
            }
        }