Пример #1
0
        public static void useWSmart(Skillshot skillShot)
        {
            //try douge with E if cant windWall

            if (!W.IsReady() || skillShot.SpellData.Type == SkillShotType.SkillshotCircle || skillShot.SpellData.Type == SkillShotType.SkillshotRing)
            {
                return;
            }
            if (skillShot.IsAboutToHit(500, Player))
            {
                var sd = SpellDatabase.GetByMissileName(skillShot.SpellData.MissileSpellName);
                if (sd == null)
                {
                    return;
                }

                //If enabled
                if (!YasuoSharp.EvadeSpellEnabled(sd.MenuItemName))
                {
                    return;
                }

                //if only dangerous
                if (YasuoSharp.Config.Item("wwDanger").GetValue <bool>() &&
                    !YasuoSharp.skillShotIsDangerous(sd.MenuItemName))
                {
                    return;
                }

                //Console.WriteLine("dmg: " + missle.SpellCaster.GetSpellDamage(Player, sd.SpellName));
                float spellDamage = (float)skillShot.Unit.GetSpellDamage(Player, sd.SpellName);
                int   procHp      = (int)((spellDamage / Player.MaxHealth) * 100);

                if (procHp < YasuoSharp.Config.Item("wwDmg").GetValue <Slider>().Value&& Player.Health - spellDamage > 0)
                {
                    return;
                }


                Vector2 blockwhere = Player.Position.To2D().Extend(skillShot.MissilePosition, 150); // missle.Position;
                // SmoothMouse.addMouseEvent(blockwhere);
                W.Cast(blockwhere);
            }
        }
Пример #2
0
        public static void useWSmart(Skillshot skillShot)
        {
            //try douge with E if cant windWall

            if (!W.IsReady() || skillShot.SpellData.Type == SkillShotType.SkillshotCircle || skillShot.SpellData.Type == SkillShotType.SkillshotRing)
            {
                return;
            }
            if (skillShot.IsAboutToHit(500, Player))
            {
                var sd = SpellDatabase.GetByMissileName(skillShot.SpellData.MissileSpellName);
                if (sd == null)
                {
                    return;
                }

                //If enabled
                if (!YasuoSharp.EvadeSpellEnabled(sd.MenuItemName))
                {
                    return;
                }

                //if only dangerous
                if (YasuoSharp.smartW["wwDanger"].Cast <CheckBox>().CurrentValue&&
                    !YasuoSharp.skillShotIsDangerous(sd.MenuItemName))
                {
                    return;
                }

                //Console.WriteLine("dmg: " + missle.SpellCaster.LSGetSpellDamage(Player, sd.SpellName));
                float spellDamage = (float)skillShot.Unit.LSGetSpellDamage(Player, sd.SpellName);
                int   procHp      = (int)((spellDamage / Player.MaxHealth) * 100);

                if (procHp < YasuoSharp.smartW["wwDmg"].Cast <Slider>().CurrentValue&& Player.Health - spellDamage > 0)
                {
                    return;
                }


                Vector3 blockwhere = Player.ServerPosition + Vector3.Normalize(skillShot.MissilePosition.To3D() - Player.ServerPosition) * 10; // missle.Position;
                W.Cast(blockwhere);
            }
        }
Пример #3
0
        public static void useWSmartOld(Obj_SpellMissile missle)
        {
            if (!W.IsReady())
            {
                return;
            }
            try
            {
                if (missle.SpellCaster is Obj_AI_Hero && missle.IsEnemy)
                {
                    var sd = SpellDatabase.GetByMissileName(missle.SData.Name);
                    if (sd == null)
                    {
                        return;
                    }

                    //If enabled
                    if (!YasuoSharp.EvadeSpellEnabled(sd.MenuItemName))
                    {
                        return;
                    }

                    //if only dangerous
                    if (YasuoSharp.Config.Item("wwDanger").GetValue <bool>() &&
                        !YasuoSharp.skillShotIsDangerous(sd.MenuItemName))
                    {
                        return;
                    }

                    //Console.WriteLine("dmg: " + missle.SpellCaster.GetSpellDamage(Player, sd.SpellName));
                    float spellDamage = (float)missle.SpellCaster.GetSpellDamage(Player, sd.SpellName);
                    int   procHp      = (int)((spellDamage / Player.MaxHealth) * 100);

                    if (procHp < YasuoSharp.Config.Item("wwDmg").GetValue <Slider>().Value&& Player.Health - spellDamage > 0)
                    {
                        return;
                    }

                    Obj_AI_Base enemHero = missle.SpellCaster;
                    float       dmg      = (float)enemHero.GetAutoAttackDamage(Player);
                    //enemHero.BaseAttackDamage + enemHero.FlatPhysicalDamageMod);
                    if (missle.SData.Name.Contains("Crit"))
                    {
                        dmg *= 2;
                    }
                    if (!missle.SData.Name.Contains("Attack") ||
                        (enemHero.CombatType == GameObjectCombatType.Ranged && dmg > Player.MaxHealth / 8))
                    {
                        if (missleWillHit(missle))
                        {
                            Vector3 blockWhere = missle.Position;
                            if (Player.Distance(missle.Position) < 420)
                            {
                                if (missle.Target.IsMe || isMissileCommingAtMe(missle))
                                {
                                    YasuoSharp.lastSpell = missle.SData.Name;
                                    W.Cast(blockWhere, true);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }