Пример #1
0
        public static void LaneClearLogic()
        {
            var PacketCast = SkyLv_Tristana.Menu.Item("Tristana.UsePacketCastLaneClear").GetValue <bool>();

            var useQ = SkyLv_Tristana.Menu.Item("Tristana.UseQLaneClear").GetValue <bool>();
            var useE = SkyLv_Tristana.Menu.Item("Tristana.UseELaneClear").GetValue <bool>();

            var MiniManaQ = SkyLv_Tristana.Menu.Item("Tristana.QMiniManaLaneClear").GetValue <Slider>().Value;
            var MiniManaE = SkyLv_Tristana.Menu.Item("Tristana.EMiniManaLaneClear").GetValue <Slider>().Value;

            var MiniCountQ = SkyLv_Tristana.Menu.Item("Tristana.QLaneClearCount").GetValue <Slider>().Value;
            var MiniCountE = SkyLv_Tristana.Menu.Item("Tristana.ELaneClearCount").GetValue <Slider>().Value;

            var Minion = MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Enemy).FirstOrDefault();

            if (Minion.IsValidTarget() && SkyLv_Tristana.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear && !SkyLv_Tristana.Menu.Item("Tristana.AfterAttackModeLaneClear").GetValue <bool>())
            {
                if (SkyLv_Tristana.Menu.Item("Tristana.SafeLaneClear").GetValue <bool>() && Player.CountEnemiesInRange(1500) > 0)
                {
                    return;
                }

                if (useE && Player.ManaPercent > MiniManaE && E.IsReady())
                {
                    foreach (var minion in ObjectManager.Get <Obj_AI_Minion>().Where(m => m.Team != ObjectManager.Player.Team && !m.IsDead && Player.Distance(m) <= E.Range))
                    {
                        if (CustomLib.EnemyMinionInMinionRange(minion, 300) >= MiniCountE)
                        {
                            if (Player.GetAutoAttackDamage(minion) * 2 > minion.Health && SkyLv_Tristana.Menu.Item("Tristana.UseELaneClearOnlyLastHitable").GetValue <bool>())
                            {
                                E.CastOnUnit(minion, PacketCast);
                            }
                            if (!SkyLv_Tristana.Menu.Item("Tristana.UseELaneClearOnlyLastHitable").GetValue <bool>())
                            {
                                E.CastOnUnit(minion, PacketCast);
                            }
                        }
                    }
                }

                if (useQ && Player.ManaPercent > MiniManaQ && Q.IsReady())
                {
                    if (CustomLib.EnemyMinionInPlayerRange(Orbwalking.GetRealAutoAttackRange(Player)) >= MiniCountQ)
                    {
                        Q.Cast(PacketCast);
                    }
                }
            }
        }
Пример #2
0
        public static void Drawing_OnDraw(EventArgs args)
        {
            foreach (var spell in SkyLv_Tristana.SpellList)
            {
                var menuItem = SkyLv_Tristana.Menu.Item(spell.Slot + "Range").GetValue <Circle>();

                if (menuItem.Active && (spell.Slot != SpellSlot.R || R.Level > 0))
                {
                    Render.Circle.DrawCircle(Player.Position, spell.Range, menuItem.Color, SkyLv_Tristana.Menu.Item("SpellDraw.Radius").GetValue <Slider>().Value);
                }
            }

            if (SkyLv_Tristana.Menu.Item("DrawOrbwalkTarget").GetValue <Circle>().Active)
            {
                var orbT = SkyLv_Tristana.Orbwalker.GetTarget();
                if (orbT.IsValidTarget())
                {
                    Render.Circle.DrawCircle(orbT.Position, 100, SkyLv_Tristana.Menu.Item("DrawOrbwalkTarget").GetValue <Circle>().Color, SkyLv_Tristana.Menu.Item("OrbwalkDraw.Radius").GetValue <Slider>().Value);
                }
            }

            if (SkyLv_Tristana.Menu.Item("Tristana.DrawingsInsec").GetValue <Circle>().Active)
            {
                var target = CustomLib.GetTarget;
                if (target != null)
                {
                    Drawing.DrawLine(Drawing.WorldToScreen(target.Position), Drawing.WorldToScreen(CustomLib.GetPushPosition(target)), SkyLv_Tristana.Menu.Item("Insec.Radius").GetValue <Slider>().Value, SkyLv_Tristana.Menu.Item("Tristana.DrawingsInsec").GetValue <Circle>().Color);
                    Render.Circle.DrawCircle(target.Position, target.BoundingRadius * 1.35f, SkyLv_Tristana.Menu.Item("Tristana.DrawingsInsec").GetValue <Circle>().Color, SkyLv_Tristana.Menu.Item("Insec.Radius").GetValue <Slider>().Value);
                    Render.Circle.DrawCircle(CustomLib.GetBehindPosition(target), target.BoundingRadius * 1.35f, SkyLv_Tristana.Menu.Item("Tristana.DrawingsInsec").GetValue <Circle>().Color, SkyLv_Tristana.Menu.Item("Insec.Radius").GetValue <Slider>().Value);
                }
            }

            if (SkyLv_Tristana.Menu.Item("Tristana.DrawingsREndPosition").GetValue <Circle>().Active)
            {
                var target = TargetSelector.GetSelectedTarget();
                if (target != null && R.IsReady())
                {
                    Render.Circle.DrawCircle(Player.Position.Extend(target.Position, Player.Distance(target) + CustomLib.RPushDistance()), target.BoundingRadius * 1.35f, SkyLv_Tristana.Menu.Item("Tristana.DrawingsREndPosition").GetValue <Circle>().Color, SkyLv_Tristana.Menu.Item("REndPosition.Radius").GetValue <Slider>().Value);
                }
            }
        }
Пример #3
0
        public static void Orbwalking_AfterAttack(AttackableUnit unit, AttackableUnit target)
        {
            #region Combo
            if (SkyLv_Tristana.Menu.Item("Tristana.AfterAttackModeCombo").GetValue <bool>() && SkyLv_Tristana.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                var PacketCast = SkyLv_Tristana.Menu.Item("Tristana.UsePacketCastCombo").GetValue <bool>();

                if (target is AIHeroClient)
                {
                    var t = (AIHeroClient)target;
                    if (t.IsValidTarget())
                    {
                        if (SkyLv_Tristana.Menu.Item("Tristana.UseQCombo").GetValue <bool>() && Q.IsReady() && t.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player)))
                        {
                            Q.Cast(PacketCast);
                        }
                        if (SkyLv_Tristana.Menu.Item("Tristana.UseECombo").GetValue <bool>() && E.IsReady() && t.IsValidTarget(E.Range))
                        {
                            E.CastOnUnit(t, PacketCast);
                        }
                    }
                }
            }
            #endregion

            #region Harass
            if (SkyLv_Tristana.Menu.Item("Tristana.AfterAttackModeHarass").GetValue <bool>() && (SkyLv_Tristana.Menu.Item("Tristana.HarassActive").GetValue <KeyBind>().Active || SkyLv_Tristana.Menu.Item("Tristana.HarassActive2").GetValue <KeyBind>().Active || SkyLv_Tristana.Menu.Item("Tristana.HarassActiveT").GetValue <KeyBind>().Active))
            {
                var PacketCast = SkyLv_Tristana.Menu.Item("Tristana.UsePacketCastHarass").GetValue <bool>();

                var useQ      = SkyLv_Tristana.Menu.Item("Tristana.UseQHarass").GetValue <bool>();
                var MiniManaQ = SkyLv_Tristana.Menu.Item("Tristana.QMiniManaHarass").GetValue <Slider>().Value;
                var useE      = SkyLv_Tristana.Menu.Item("Tristana.UseEHarass").GetValue <bool>();
                var MiniManaE = SkyLv_Tristana.Menu.Item("Tristana.EMiniManaHarass").GetValue <Slider>().Value;

                if (target is AIHeroClient)
                {
                    var t = (AIHeroClient)target;
                    if (t.IsValidTarget())
                    {
                        if (useE && E.IsReady() && target.IsValidTarget(E.Range) && Player.ManaPercent > MiniManaE)
                        {
                            E.CastOnUnit(t, PacketCast);
                        }

                        if (useQ && Q.IsReady() && target.IsValidTarget(Orbwalking.GetRealAutoAttackRange(Player)) && Player.ManaPercent > MiniManaQ)
                        {
                            Q.Cast(PacketCast);
                        }
                    }
                }
            }
            #endregion

            #region LaneClear
            if (SkyLv_Tristana.Menu.Item("Tristana.AfterAttackModeLaneClear").GetValue <bool>() && SkyLv_Tristana.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                var PacketCast = SkyLv_Tristana.Menu.Item("Tristana.UsePacketCastLaneClear").GetValue <bool>();

                var useQ = SkyLv_Tristana.Menu.Item("Tristana.UseQLaneClear").GetValue <bool>();
                var useE = SkyLv_Tristana.Menu.Item("Tristana.UseELaneClear").GetValue <bool>();

                var MiniManaQ = SkyLv_Tristana.Menu.Item("Tristana.QMiniManaLaneClear").GetValue <Slider>().Value;
                var MiniManaE = SkyLv_Tristana.Menu.Item("Tristana.EMiniManaLaneClear").GetValue <Slider>().Value;

                var MiniCountQ = SkyLv_Tristana.Menu.Item("Tristana.QLaneClearCount").GetValue <Slider>().Value;
                var MiniCountE = SkyLv_Tristana.Menu.Item("Tristana.ELaneClearCount").GetValue <Slider>().Value;


                var Minion = MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.Enemy).FirstOrDefault();

                if (Minion.IsValidTarget() && SkyLv_Tristana.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (SkyLv_Tristana.Menu.Item("Tristana.SafeLaneClear").GetValue <bool>() && Player.CountEnemiesInRange(1500) > 0)
                    {
                        return;
                    }

                    if (useE && Player.ManaPercent > MiniManaE && E.IsReady())
                    {
                        foreach (var minion in ObjectManager.Get <Obj_AI_Minion>().Where(m => m.Team != ObjectManager.Player.Team && !m.IsDead && Player.Distance(m) <= E.Range))
                        {
                            if (CustomLib.EnemyMinionInMinionRange(minion, 300) >= MiniCountE)
                            {
                                if (Player.GetAutoAttackDamage(minion) * 2 > minion.Health && SkyLv_Tristana.Menu.Item("Tristana.UseELaneClearOnlyLastHitable").GetValue <bool>())
                                {
                                    E.CastOnUnit(minion, PacketCast);
                                }
                                if (!SkyLv_Tristana.Menu.Item("Tristana.UseELaneClearOnlyLastHitable").GetValue <bool>())
                                {
                                    E.CastOnUnit(minion, PacketCast);
                                }
                            }
                        }
                    }

                    if (useQ && Player.ManaPercent > MiniManaQ && Q.IsReady())
                    {
                        if (CustomLib.EnemyMinionInPlayerRange(Orbwalking.GetRealAutoAttackRange(Player)) >= MiniCountQ)
                        {
                            Q.Cast(PacketCast);
                        }
                    }
                }
            }
            #endregion

            #region JungleClear
            if (SkyLv_Tristana.Menu.Item("Tristana.AfterAttackModeJungleClear").GetValue <bool>() && SkyLv_Tristana.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                var PacketCast = SkyLv_Tristana.Menu.Item("Tristana.UsePacketCastJungleClear").GetValue <bool>();
                var useQ       = SkyLv_Tristana.Menu.Item("Tristana.UseQJungleClear").GetValue <bool>();
                var useE       = SkyLv_Tristana.Menu.Item("Tristana.UseEJungleClear").GetValue <bool>();

                var MiniManaQ = SkyLv_Tristana.Menu.Item("Tristana.QMiniManaJungleClear").GetValue <Slider>().Value;
                var MiniManaE = SkyLv_Tristana.Menu.Item("Tristana.EMiniManaJungleClear").GetValue <Slider>().Value;

                var MinionN = MinionManager.GetMinions(E.Range + 200, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault();

                if (MinionN.IsValidTarget() && SkyLv_Tristana.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
                {
                    if (SkyLv_Tristana.Menu.Item("Tristana.SafeJungleClear").GetValue <bool>() && Player.CountEnemiesInRange(1500) > 0)
                    {
                        return;
                    }

                    if (useE && Player.ManaPercent > MiniManaE && E.IsReady())
                    {
                        if (SkyLv_Tristana.Menu.Item("Tristana.SpellOnlyBigMonster").GetValue <bool>())
                        {
                            foreach (var monster in ObjectManager.Get <Obj_AI_Base>().Where(monster => SkyLv_Tristana.Monsters.Contains(monster.BaseSkinName) && !monster.IsDead))
                            {
                                E.CastOnUnit(monster, PacketCast);
                            }
                        }
                        else if (!SkyLv_Tristana.Menu.Item("Tristana.SpellOnlyBigMonster").GetValue <bool>())
                        {
                            E.CastOnUnit(MinionN, PacketCast);
                        }
                    }

                    if (useQ && Q.IsReady() && Player.ManaPercent > MiniManaQ)
                    {
                        if (SkyLv_Tristana.Menu.Item("Tristana.SpellOnlyBigMonster").GetValue <bool>())
                        {
                            foreach (var monster in ObjectManager.Get <Obj_AI_Base>().Where(monster => SkyLv_Tristana.Monsters.Contains(monster.BaseSkinName) && !monster.IsDead))
                            {
                                Q.Cast(PacketCast);
                            }
                        }
                        else if (!SkyLv_Tristana.Menu.Item("Tristana.SpellOnlyBigMonster").GetValue <bool>())
                        {
                            Q.Cast(PacketCast);
                        }
                    }
                }
            }
            #endregion
        }
Пример #4
0
        public static void InsecLogic()
        {
            switch (SkyLv_Tristana.Menu.Item("Tristana.InsecSpellUsage").GetValue <StringList>().SelectedIndex)
            {
            case 0:
            {
                var PacketCast = SkyLv_Tristana.Menu.Item("Tristana.UsePacketCastInsec").GetValue <bool>();
                if (TargetSelector.SelectedTarget == null)
                {
                    return;
                }
                var target = TargetSelector.GetSelectedTarget();

                if (SkyLv_Tristana.InsecState == false)
                {
                    PosBehindW = CustomLib.GetBehindPosition(target);
                    PosBehindF = CustomLib.GetBehindPositionExtend(target);
                }

                if (Utils.GameTimeTickCount - SkyLv_Tristana.lastInsec > 2500 && SkyLv_Tristana.InsecState == true)
                {
                    SkyLv_Tristana.InsecState = false;
                    return;
                }

                if (SkyLv_Tristana.InsecState == true && Player.Distance(PosBehindW) < Player.Distance(target) && R.IsReady() && W.IsReady() && !SkyLv_Tristana.FlashSlot.IsReady() && Player.Mana >= R.ManaCost + W.ManaCost)
                {
                    R.Cast(target);
                    SkyLv_Tristana.lastInsec  = Utils.GameTimeTickCount;
                    SkyLv_Tristana.InsecState = true;
                    return;
                }

                if (SkyLv_Tristana.InsecState == false && Player.Distance(target) < 420 && Player.Distance(PosBehindW) > Player.Distance(target) && SkyLv_Tristana.FlashSlot.IsReady() && R.IsReady() && W.IsReady() && Player.Mana >= R.ManaCost + W.ManaCost)
                {
                    Player.Spellbook.CastSpell(SkyLv_Tristana.FlashSlot, PosBehindF);
                    SkyLv_Tristana.lastInsec  = Utils.GameTimeTickCount;
                    SkyLv_Tristana.InsecState = true;
                    return;
                }

                if (SkyLv_Tristana.InsecState == true && !R.IsReady() && !SkyLv_Tristana.FlashSlot.IsReady() && W.IsReady() && Player.Mana >= W.ManaCost)
                {
                    W.Cast(SkyLv_Tristana.REndPosition);
                    SkyLv_Tristana.lastInsec  = Utils.GameTimeTickCount;
                    SkyLv_Tristana.InsecState = false;
                    return;
                }
                break;
            }

            case 1:
            {
                var PacketCast = SkyLv_Tristana.Menu.Item("Tristana.UsePacketCastInsec").GetValue <bool>();
                if (TargetSelector.SelectedTarget == null)
                {
                    return;
                }
                var target = TargetSelector.GetSelectedTarget();

                if (SkyLv_Tristana.InsecState == false)
                {
                    PosBehindW = CustomLib.GetBehindPosition(target);
                }

                if (Utils.GameTimeTickCount - SkyLv_Tristana.lastInsec > 2500 && SkyLv_Tristana.InsecState == true)
                {
                    SkyLv_Tristana.InsecState = false;
                    return;
                }

                if (SkyLv_Tristana.InsecState == true && Player.Distance(PosBehindW) < Player.Distance(target) && R.IsReady() && !W.IsReady() && Player.Mana >= R.ManaCost)
                {
                    R.Cast(target);
                    SkyLv_Tristana.lastInsec  = Utils.GameTimeTickCount;
                    SkyLv_Tristana.InsecState = false;
                    return;
                }

                if (SkyLv_Tristana.InsecState == false && Player.Distance(PosBehindW) < W.Range && Player.Distance(PosBehindW) > Player.Distance(target) && W.IsReady() && R.IsReady() && Player.Mana >= R.ManaCost + W.ManaCost)
                {
                    W.Cast(PosBehindW);
                    SkyLv_Tristana.lastInsec  = Utils.GameTimeTickCount;
                    SkyLv_Tristana.InsecState = true;
                    return;
                }
                break;
            }

            case 2:
            {
                var PacketCast = SkyLv_Tristana.Menu.Item("Tristana.UsePacketCastInsec").GetValue <bool>();
                if (TargetSelector.SelectedTarget == null)
                {
                    return;
                }
                var target = TargetSelector.GetSelectedTarget();

                if (SkyLv_Tristana.InsecState == false)
                {
                    PosBehindW = CustomLib.GetBehindPosition(target);
                    PosBehindF = CustomLib.GetBehindPositionExtend(target);
                }

                if (Utils.GameTimeTickCount - SkyLv_Tristana.lastInsec > 2500 && SkyLv_Tristana.InsecState == true)
                {
                    SkyLv_Tristana.InsecState = false;
                    return;
                }

                if (SkyLv_Tristana.InsecState == true && Player.Distance(PosBehindW) < Player.Distance(target) && R.IsReady() && ((W.IsReady() && Player.Mana >= R.ManaCost + W.ManaCost) || (!W.IsReady() && Player.Mana >= R.ManaCost)) && (!SkyLv_Tristana.FlashSlot.IsReady() || !W.IsReady()))
                {
                    R.Cast(target);
                    SkyLv_Tristana.lastInsec = Utils.GameTimeTickCount;
                    if (W.IsReady())
                    {
                        SkyLv_Tristana.InsecState = true;
                        return;
                    }

                    if (!W.IsReady())
                    {
                        SkyLv_Tristana.InsecState = false;
                        return;
                    }
                }

                if (SkyLv_Tristana.InsecState == false && Player.Distance(target) < 420 && Player.Distance(PosBehindW) > Player.Distance(target) && SkyLv_Tristana.FlashSlot.IsReady() && R.IsReady() && W.IsReady() && Player.Mana >= R.ManaCost + W.ManaCost)
                {
                    Player.Spellbook.CastSpell(SkyLv_Tristana.FlashSlot, PosBehindF);
                    SkyLv_Tristana.lastInsec  = Utils.GameTimeTickCount;
                    SkyLv_Tristana.InsecState = true;
                    return;
                }

                if (SkyLv_Tristana.InsecState == false && (Player.Distance(target) > 420 || !SkyLv_Tristana.FlashSlot.IsReady()) && Player.Distance(PosBehindW) < W.Range && Player.Distance(PosBehindW) > Player.Distance(target) && W.IsReady() && R.IsReady() && Player.Mana >= R.ManaCost + W.ManaCost)
                {
                    W.Cast(PosBehindW);
                    SkyLv_Tristana.lastInsec  = Utils.GameTimeTickCount;
                    SkyLv_Tristana.InsecState = true;
                    return;
                }

                if (SkyLv_Tristana.InsecState == true && !R.IsReady() && W.IsReady() && Player.Mana >= W.ManaCost)
                {
                    W.Cast(SkyLv_Tristana.REndPosition);
                    SkyLv_Tristana.lastInsec  = Utils.GameTimeTickCount;
                    SkyLv_Tristana.InsecState = false;
                    return;
                }
                break;
            }
            }
        }
Пример #5
0
        public static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsMe)
            {
                return;
            }

            if (args.SData.IsAutoAttack())
            {
                SkyLv_Tristana.lastAA = Utils.GameTimeTickCount;
            }

            switch (args.SData.Name)
            {
            case "TristanaQ":
                SkyLv_Tristana.lastQ = Utils.GameTimeTickCount;
                break;

            case "TristanaW":
                SkyLv_Tristana.lastW = Utils.GameTimeTickCount;
                break;

            case "TristanaE":
                SkyLv_Tristana.lastE = Utils.GameTimeTickCount;
                break;

            case "TristanaR":
                SkyLv_Tristana.lastR = Utils.GameTimeTickCount;
                var target = CustomLib.GetTarget;
                SkyLv_Tristana.REndPosition = Player.Position.Extend(target.Position, Player.Distance(target) + CustomLib.RPushDistance());
                break;
            }
        }