예제 #1
0
        public static void OnHarass()
        {
            Obj_AI_Hero target            = SimpleTs.GetTarget(SkillHandler.E.Range, SimpleTs.DamageType.Physical);
            float       percentManaAfterQ = 100 * ((ObjectManager.Player.Mana - SkillHandler.Q.Instance.ManaCost) / ObjectManager.Player.MaxMana);
            float       percentManaAfterE = 100 * ((ObjectManager.Player.Mana - SkillHandler.E.Instance.ManaCost) / ObjectManager.Player.MaxMana);
            int         minPercentMana    = MenuHandler.Config.SubMenu("Harass").Item("manaPercent").GetValue <Slider>().Value;

            if (percentManaAfterQ >= minPercentMana && MenuHandler.Config.Item("harassQ").GetValue <bool>() && SkillHandler.Q.IsReady())
            {
                FightHandler.customQCast(target);
            }
            if (SkillHandler.E.IsReady() &&
                ObjectManager.Get <Obj_AI_Hero>().Any(
                    hero => hero.IsValidTarget(SkillHandler.E.Range)
                    &&
                    hero.Buffs.FirstOrDefault(b => b.Name.ToLower() == "kalistaexpungemarker").Count >= MenuHandler.Config.Item("stackE").GetValue <Slider>().Value
                    )
                &&
                percentManaAfterE >= minPercentMana)
            {
                SkillHandler.E.Cast(Kalista.packetCast);
            }
            if (SkillHandler.E.IsReady() && target.IsValidTarget(SkillHandler.E.Range))
            {
                MathHandler.castMinionE(SimpleTs.GetTarget(SkillHandler.E.Range, SimpleTs.DamageType.Physical));
            }
        }
예제 #2
0
        /**
         * @author TwilightLoL
         * Copying without permission = DCMA.
         * */

        public static void getAvailableJumpSpots()
        {
            int     size = 295;
            int     n = 15;
            double  x, y;
            Vector3 drawWhere;

            if (!SkillHandler.Q.IsReady())
            {
                Drawing.DrawText(Drawing.Width * 0.44f, Drawing.Height * 0.80f, Color.Red,
                                 "Jumping mode active, but Q isn't.");
            }
            else
            {
                Drawing.DrawText(Drawing.Width * 0.39f, Drawing.Height * 0.80f, Color.White,
                                 "Hover the spot to jump to ");
            }
            Vector3 playerPosition = ObjectManager.Player.Position;

            Drawing.DrawCircle(ObjectManager.Player.Position, size, Color.RoyalBlue);
            Obj_AI_Hero target = TargetSelector.GetTarget(SkillHandler.Q.Range, TargetSelector.DamageType.Physical);

            for (int i = 1; i <= n; i++)
            {
                x         = size * Math.Cos(2 * Math.PI * i / n);
                y         = size * Math.Sin(2 * Math.PI * i / n);
                drawWhere = new Vector3((int)(playerPosition.X + x), (float)(playerPosition.Y + y), playerPosition.Z);
                if (!Utility.IsWall(drawWhere))
                {
                    if (SkillHandler.Q.IsReady() && Game.CursorPos.Distance(drawWhere) <= 80f)
                    {
                        if (target != null)
                        {
                            FightHandler.customQCast(target);
                        }
                        else
                        {
                            SkillHandler.Q.Cast(new Vector2(drawWhere.X, drawWhere.Y), true);
                        }

                        Packet.C2S.Move.Encoded(new Packet.C2S.Move.Struct(drawWhere.X, drawWhere.Y)).Send();
                        return;
                    }
                    Utility.DrawCircle(drawWhere, 20, Color.Red);
                }
            }
        }