Ejemplo n.º 1
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);
                }
            }
        }
Ejemplo n.º 2
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;
            }
            }
        }