Ejemplo n.º 1
0
 public GoblinSorcerer(string name, string job, int maxHealth, ETargetType targetType) : base(name, job, maxHealth, targetType)
 {
     Abilities[0] = new Vulnerable(new Bare("Head", "Your bare head"));
     Abilities[1] = new Regular(new IceBeam());
     Abilities[2] = new Regular(new LightningBolt());
     Abilities[3] = new Evade(new Spring(), 0.25f);
     Abilities[4] = new Vulnerable(new Bare("Chest", "Your bare chest"));
     Abilities[5] = new Vulnerable(new Bare("Back", "Your bare back"));
 }
Ejemplo n.º 2
0
        private static void DrawEvadeStatus()
        {
            if (!ObjectCache.MenuCache.Cache["ShowStatus"].Enabled)
            {
                return;
            }

            Render.WorldToScreen(ObjectManager.GetLocalPlayer().Position, out var heroPos);

            if (ObjectCache.MenuCache.Cache["DodgeSkillShots"].Enabled)
            {
                if (Evade.IsDodging)
                {
                    Render.Text("Evade: ON", new Vector2(heroPos.X - 10, heroPos.Y), RenderTextFlags.Center, Color.Red);
                }
                else
                {
                    if (ObjectCache.MenuCache.Cache["DodgeOnlyOnComboKeyEnabled"].Enabled && !ObjectCache.MenuCache.Cache["DodgeComboKey"].As <MenuKeyBind>().Enabled)
                    {
                        Render.Text("Evade: OFF", new Vector2(heroPos.X - 10, heroPos.Y), RenderTextFlags.Center, Color.Gray);
                    }
                    else
                    {
                        if (ObjectCache.MenuCache.Cache["DontDodgeKeyEnabled"].Enabled && ObjectCache.MenuCache.Cache["DontDodgeKey"].As <MenuKeyBind>().Enabled)
                        {
                            Render.Text("Evade: OFF", new Vector2(heroPos.X - 10, heroPos.Y), RenderTextFlags.Center, Color.Gray);
                        }
                        else if (Evade.IsDodgeDangerousEnabled())
                        {
                            Render.Text("Evade: ON", new Vector2(heroPos.X - 10, heroPos.Y), RenderTextFlags.Center, Color.Yellow);
                        }
                        else
                        {
                            Render.Text("Evade: ON", new Vector2(heroPos.X - 10, heroPos.Y), RenderTextFlags.Center, Color.Lime);
                        }
                    }
                }
            }
            else
            {
                if (ObjectCache.MenuCache.Cache["ActivateEvadeSpells"].As <MenuKeyBind>().Enabled)
                {
                    if (ObjectCache.MenuCache.Cache["DodgeOnlyOnComboKeyEnabled"].Enabled && !ObjectCache.MenuCache.Cache["DodgeComboKey"].As <MenuKeyBind>().Enabled)
                    {
                        Render.Text("Evade: OFF", new Vector2(heroPos.X - 10, heroPos.Y), RenderTextFlags.Center, Color.Gray);
                    }
                    else
                    {
                        Render.Text("Evade: Spell", new Vector2(heroPos.X - 10, heroPos.Y), RenderTextFlags.Center, Evade.IsDodgeDangerousEnabled() ? Color.Yellow : Color.DeepSkyBlue);
                    }
                }
                else
                {
                    Render.Text("Evade: OFF", new Vector2(heroPos.X - 10, heroPos.Y), RenderTextFlags.Center, Color.Gray);
                }
            }
        }
Ejemplo n.º 3
0
        private static void Game_OnUpdate(EventArgs args)
        {
            if (!Program.Menu.Item("WSpells").IsActive() || !SpellManager.W.IsReady())
            {
                return;
            }

            foreach (var skillshot in
                     Evade.GetSkillshotsAboutToHit(
                         ObjectManager.Player, (int)(SpellManager.W.Delay * 1000f + Game.Ping / 2f)))
            {
                if (!SpellManager.W.IsReady())
                {
                    return;
                }

                var enemy = skillshot.Unit as Obj_AI_Hero;
                if (enemy == null)
                {
                    continue;
                }

                List <BlockedSpell> spells;
                BlockedSpells.TryGetValue(enemy.ChampionName, out spells);

                if (spells == null || spells.Count == 0)
                {
                    continue;
                }

                foreach (var spell in spells)
                {
                    var item = Menu.Item(enemy.ChampionName + spell.MenuName);
                    if (item == null || !item.IsActive())
                    {
                        continue;
                    }

                    if (!spell.PassesSlotCondition(skillshot.SpellData.Slot))
                    {
                        continue;
                    }

                    if (spell.IsAutoAttack || !spell.PassesBuffCondition(enemy) || !spell.PassesModelCondition(enemy))
                    {
                        continue;
                    }

                    if (!spell.PassesSpellCondition(skillshot.SpellData.SpellName))
                    {
                        continue;
                    }

                    Program.CastW(skillshot.Unit);
                }
            }
        }
Ejemplo n.º 4
0
 public void EvadeOn(Vector3 threatPos)
 {
     if (!behaviours.Contains(Evade.GetInstance()))
     {
         behaviours.Add(Evade.GetInstance());
     }
     ThreatTrans = null;
     ThreatPos   = threatPos;
 }
Ejemplo n.º 5
0
 public Sorcerer(string name, int maxHealth, ETargetType targetType)
     : base(name, "Sorcerer", maxHealth, targetType)
 {
     Abilities[0] = new Regular(new DragonsBreath());
     Abilities[1] = new Regular(new IceBeam());
     Abilities[2] = new Regular(new LightningBolt());
     Abilities[3] = new Evade(new Spring(), 0.25f);
     Abilities[4] = new Vulnerable(new Bare("Chest", "Your bare chest"));
     Abilities[5] = new Vulnerable(new Bare("Back", "Your bare back"));
 }
Ejemplo n.º 6
0
    private void Start()
    {
        myMoveType           = new Evade();
        myMoveType.target    = myTarget;
        myMoveType.character = this;

        myRotateType           = new LookWhereGoing();
        myRotateType.character = this;
        myRotateType.target    = myTarget;
    }
Ejemplo n.º 7
0
 public Cleric(string name, int maxHealth, ETargetType targetType)
     : base(name, "Cleric", maxHealth, targetType)
 {
     Abilities[0] = new Regular(new Prayer());
     Abilities[1] = new Armored(new Shieldslam(), 3);
     Abilities[2] = new Regular(new Heal());
     Abilities[3] = new Evade(new Dodge(), 0.25f);
     Abilities[4] = new Armored(new Bare("Chest", "Bare Chest"), 3);
     Abilities[5] = new Vulnerable(new Bare("Back", "Your bare back"));
 }
Ejemplo n.º 8
0
    private void Awake()
    {
        steering = GetComponent <SteeringBehaviour>();

        arrival           = gameObject.AddComponent <Arrival>();
        arrival.maxSpeed  = maxSpeed;
        arrival.jerkiness = jerkiness;

        evade           = gameObject.AddComponent <Evade>();
        evade.maxSpeed  = maxSpeed;
        evade.jerkiness = jerkiness;
    }
Ejemplo n.º 9
0
    public static Steering GetSteering(Agent target, Agent npc, Vector3 behind, float slowingRadius, float maxAccel, float threshold, float decayCoefficient, bool visibleRays, float arrivePriority, float separationPriority, float evadePriority)
    {
        Steering steering = new Steering();

        steering.linear += Arrive.GetSteering(behind, npc, slowingRadius, maxAccel).linear *arrivePriority;
        steering.linear += Separation.GetSteering(npc, threshold, decayCoefficient, maxAccel, visibleRays).linear *separationPriority;
        if (OnLeaderSight(target, npc))
        {
            steering.linear += Evade.GetSteering(target, npc, maxAccel, Vector3.Distance(target.position, npc.position) * maxAccel, true).linear *evadePriority;
        }

        return(steering);
    }
Ejemplo n.º 10
0
        public static void Initialize()
        {
            if (_initialized)
            {
                return;
            }

            _initialized = true;

            Menu = new Menu("TreeLib", "TreeLib", true);
            Menu.AddToMainMenu();
            SpellManager.Initialize();
            CustomEvents.Game.OnGameLoad += args => { Evade.Init(); };
        }
Ejemplo n.º 11
0
        private static void Evading(Obj_AI_Base sender)
        {
            var yasuoW = EvadeSpellDatabase.Spells.FirstOrDefault(i => i.Enable && i.IsReady && i.Slot == SpellSlot.W);

            if (yasuoW == null)
            {
                return;
            }
            var skillshot = Evade.SkillshotAboutToHit(sender, yasuoW.Delay - Evade.getSliderItem("Yasuo WDelay"), true).OrderByDescending(i => i.DangerLevel).FirstOrDefault(i => i.DangerLevel >= yasuoW.DangerLevel);

            if (skillshot != null)
            {
                W.Cast(sender.ServerPosition.LSExtend((Vector3)skillshot.Start, 100));
            }
        }
Ejemplo n.º 12
0
        public static float GetPredictedHealthPercent(this Obj_AI_Hero hero)
        {
            var dmg = 0d;

            foreach (var skillshot in Evade.GetSkillshotsAboutToHit(hero, 400))
            {
                try
                {
                    dmg += skillshot.Unit.GetDamageSpell(hero, skillshot.SpellData.SpellName).CalculatedDamage;
                }
                catch {}
            }

            return((float)((hero.Health - dmg) / hero.MaxHealth * 100));
        }
Ejemplo n.º 13
0
        private static void TryEvading(List <Skillshot> hitBy, Vector2 to)
        {
            var dangerLevel = hitBy.Select(i => i.DangerLevel).Concat(new[] { 0 }).Max();
            var zedR        =
                EvadeSpellDatabase.Spells.FirstOrDefault(
                    i => i.Enable && i.DangerLevel <= dangerLevel && i.IsReady && i.Slot == SpellSlot.R);

            if (zedR == null)
            {
                return;
            }
            if (Evade.IsAboutToHit(Player, zedR.Delay - MainMenu["Evade"]["Spells"][zedR.Name]["RDelay"]))
            {
                Player.Spellbook.CastSpell(zedR.Slot);
            }
        }
Ejemplo n.º 14
0
    protected override void Start()
    {
        base.Start();

        PrepareToPlay prepare  = new PrepareToPlay(this);
        ChaseBall     chase    = new ChaseBall(this);
        GameOver      gameover = new GameOver(this);
        Evade         evade    = new Evade(this);

        fsm.AddState(SeekerStateID.PrepareToPlay, prepare);
        fsm.AddState(SeekerStateID.ChaseBall, chase);
        fsm.AddState(SeekerStateID.GameOver, gameover);
        fsm.AddState(SeekerStateID.Evade, evade);

        fsm.ChangeState(SeekerStateID.PrepareToPlay);
    }
Ejemplo n.º 15
0
        public override void Combat()
        {
            string fnname = "FTWRev.Combat";

            MyTimer.Start(fnname);
            if (!FTWUtils.ValidState())
            {
                //FTWLogger.debug(Color.Red, "Invalid state: {0}", FTWUtils.printState());
            }
            else
            {
                CheckForChest.Clear();
                Evade.CheckCombat();
                FTWProps.core.EvaluateRules("@COMBAT");
            };
            MyTimer.Stop(fnname);
        }
Ejemplo n.º 16
0
        private static void LastHit()
        {
            if (getCheckBoxItem(lhMenu, "Q") && Q.IsReady() && !IsDashing && (!haveQ3 || getCheckBoxItem(lhMenu, "Q3")))
            {
                if (!haveQ3)
                {
                    var minion =
                        EntityManager.MinionsAndMonsters.EnemyMinions.Where(
                            i => (i.IsMinion() || i.IsPet(false)) && IsInRangeQ(i) && Q.CanLastHit(i, GetQDmg(i)))
                        .MaxOrDefault(i => i.MaxHealth);
                    if (minion != null && Q.Casting(minion).IsCasted())
                    {
                        return;
                    }
                }
                else
                {
                    var minion =
                        EntityManager.MinionsAndMonsters.EnemyMinions.Where(
                            i =>
                            (i.IsMinion() || i.IsPet(false)) && i.IsValidTarget(Q2.Range - i.BoundingRadius / 2) &&
                            Q2.CanLastHit(i, GetQDmg(i))).MaxOrDefault(i => i.MaxHealth);
                    if (minion != null && Q2.Casting(minion, false, LeagueSharp.SDK.CollisionableObjects.YasuoWall).IsCasted())
                    {
                        return;
                    }
                }
            }

            if (getCheckBoxItem(lhMenu, "E") && E.IsReady() && !Orbwalker.IsAutoAttacking)
            {
                var minion = EntityManager.MinionsAndMonsters.EnemyMinions.Where(i =>
                                                                                 (i.IsMinion() || i.IsPet(false)) &&
                                                                                 i.IsValidTarget(E.Range) &&
                                                                                 !HaveE(i) &&
                                                                                 E.CanLastHit(i, GetEDmg(i)) &&
                                                                                 Evade.IsSafePoint(GetPosAfterDash(i).ToVector2()).IsSafe&&
                                                                                 (!GetPosAfterDash(i).IsUnderEnemyTurret() || getCheckBoxItem(lhMenu, "ETower"))).MaxOrDefault(i => i.MaxHealth);

                if (minion != null && E.CastOnUnit(minion))
                {
                    lastE = Variables.TickCount;
                }
            }
        }
Ejemplo n.º 17
0
        public static void UseEvadeSpell()
        {
            if (!Situation.ShouldUseEvadeSpell())
            {
                return;
            }

            if (Environment.TickCount - LastSpellEvadeCommand.Timestamp < 1000)
            {
                return;
            }

            if (!SpellDetector.Spells.Select(entry => entry.Value).Where(ShouldActivateEvadeSpell).Any(spell => ActivateEvadeSpell(spell)))
            {
                return;
            }
            Evade.SetAllUndodgeable();
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Creates a new instance
 /// </summary>
 public Behaviors()
 {
     Alignment         = new Alignment();
     Arrive            = new Arrive();
     Cohesion          = new Cohesion();
     Evade             = new Evade();
     Flee              = new Flee();
     Hide              = new Hide();
     Interpose         = new Interpose();
     ObstacleAvoidance = new ObstacleAvoidance();
     OffsetPursuit     = new OffsetPursuit();
     PathFollowing     = new PathFollowing();
     Pursuit           = new Pursuit();
     Seek              = new Seek();
     Separation        = new Separation();
     WallAvoidance     = new WallAvoidance();
     Wander            = new Wander();
 }
Ejemplo n.º 19
0
            static Modes()
            {
                ModesMenu = Menu.AddSubMenu("Modes");

                Combo.Initialize();
                Menu.AddSeparator();
                Harass.Initialize();
                Menu.AddSeparator();
                LaneClear.Initialize();
                Menu.AddSeparator();
                LastHit.Initialize();

                EvaderMenu = Menu.AddSubMenu("Evader");
                Evade.Initialize();

                DrawMenu = Menu.AddSubMenu("Draw");
                Draw.Initialize();
            }
Ejemplo n.º 20
0
 /// <summary>
 /// Creates a new instance
 /// </summary>
 public Behaviors()
 {
     Alignment = new Alignment();
     Arrive = new Arrive();
     Cohesion = new Cohesion();
     Evade = new Evade();
     Flee = new Flee();
     Hide = new Hide();
     Interpose = new Interpose();
     ObstacleAvoidance = new ObstacleAvoidance();
     OffsetPursuit = new OffsetPursuit();
     PathFollowing = new PathFollowing();
     Pursuit = new Pursuit();
     Seek = new Seek();
     Separation = new Separation();
     WallAvoidance = new WallAvoidance();
     Wander = new Wander();
 }
Ejemplo n.º 21
0
        public override void Pull()
        {
            string fnname = "FTWRev.Pull";

            MyTimer.Start(fnname);
            if (!FTWUtils.ValidState())
            {
                //FTWLogger.debug(Color.Red, "Invalid state: {0}", FTWUtils.printState());
            }
            else
            {
                CheckForChest.Clear();
                if (Evade.CheckPull())
                {
                    FTWProps.core.EvaluateRules("@PULL");
                }
            }
            MyTimer.Stop(fnname);
        }
Ejemplo n.º 22
0
    private void Start()
    {
        kinematic = GetComponent <Kinematic>();

        switch (type)
        {
        case SteeringType.Pursue:
            pursueAI           = new Pursue();
            pursueAI.character = kinematic;
            pursueAI.target    = target;
            break;

        case SteeringType.Evade:
            evadeAI           = new Evade();
            evadeAI.character = kinematic;
            evadeAI.target    = target;
            break;

        case SteeringType.FollowPath:
            followAI           = new PathFollow();
            followAI.character = kinematic;
            followAI.path      = pathOfObjects;
            break;

        case SteeringType.Seek:
            seekAI           = new Seek();
            seekAI.character = kinematic;
            seekAI.target    = target;
            break;

        case SteeringType.Flee:
            fleeAI           = new Flee();
            fleeAI.character = kinematic;
            fleeAI.target    = target;
            break;

        case SteeringType.Seperation:
            seperationAI           = new Seperation();
            seperationAI.character = kinematic;
            seperationAI.targets   = seperateObstacles;
            break;
        }
    }
Ejemplo n.º 23
0
        private static bool CanDash(
            Obj_AI_Base target,
            bool inQCir     = false,
            bool underTower = true,
            Vector3 pos     = new Vector3())
        {
            if (HaveE(target))
            {
                return(false);
            }
            if (!pos.IsValid())
            {
                pos = target.ServerPosition;
            }
            var posAfterE = GetPosAfterDash(target);

            return((underTower || !posAfterE.IsUnderEnemyTurret()) &&
                   posAfterE.Distance(pos) < (inQCir ? Q3.Range : pos.DistanceToPlayer()) &&
                   Evade.IsSafePoint(posAfterE.ToVector2()).IsSafe);
        }
Ejemplo n.º 24
0
        private void DrawEvadeStatus()
        {
            if (ConfigValue.DrawEvadeStatus.GetBool())
            {
                var heroPos   = Drawing.WorldToScreen(ObjectManager.Player.Position);
                var dimension = Drawing.GetTextEntent("Evade: ON", 12);

                if (ConfigValue.DodgeSkillShots.GetBool())
                {
                    if (Evade.IsDodging)
                    {
                        Drawing.DrawText(heroPos.X - dimension.Width / 2, heroPos.Y, Color.Red, "Evade: ON");
                    }
                    else
                    {
                        if (Evade.IsDodgeDangerousEnabled())
                        {
                            Drawing.DrawText(heroPos.X - dimension.Width / 2, heroPos.Y, Color.Yellow, "Evade: ON");
                        }
                        else
                        {
                            Drawing.DrawText(heroPos.X - dimension.Width / 2, heroPos.Y, Color.White, "Evade: ON");
                        }
                    }
                }
                else
                {
                    if (ConfigValue.ActivateEvadeSpells.GetBool())
                    {
                        Drawing.DrawText(heroPos.X - dimension.Width / 2, heroPos.Y, Color.Purple, "Evade: Spell");
                    }
                    else
                    {
                        Drawing.DrawText(heroPos.X - dimension.Width / 2, heroPos.Y, Color.Gray, "Evade: OFF");
                    }
                }
            }
        }
Ejemplo n.º 25
0
        private bool IsSpecialMob(FightingObjectView target, out Evade evade)
        {
            evade = Evade.Tank;
            if (!target.IsCasting())
            {
                return(false);
            }

            var targetName    = target.name;
            var spellName     = target.GetSpellCasted().d6;
            var spellTarget   = target.GetSpellCasted().d1;
            var spellCategory = target.GetSpellCasted().d4;

            var mob      = _mobList.Find(s => s.GetName().Equals(targetName));
            var mobSpell = mob.GetSpell(spellName, spellCategory, spellTarget);

            if (mobSpell == null)
            {
                return(false);
            }
            evade = mobSpell.GetEvadeMethod();
            return(true);
        }
Ejemplo n.º 26
0
    protected override void Start()
    {
        base.Start();
        player        = GameObject.FindWithTag("Player").GetComponent <PlayerController>();
        playerRB      = player.GetComponent <Rigidbody>();
        movingEntity  = GetComponent <MovingEntity>();
        playerTarget  = GameObject.FindGameObjectWithTag("Player");
        pathfinder    = GetComponent <NavMeshAgent>();
        material      = gameObject.GetComponentInChildren <Renderer>().material;
        weaponSystems = GetComponent <WeaponSystems>();

        steeringBasics = GetComponent <SteeringBasics>();
        pursue         = GetComponent <Pursue>();
        evade          = GetComponent <Evade>();
        patrol         = GetComponent <Patrol>();

        shader1 = Shader.Find("Diffuse");
        shader2 = Shader.Find("Transparent/Diffuse");

        shotTimer       = maxShotTime;
        secondShotTimer = maxSecondShotTime;

        enemyState = EnemyState.PATROL;
    }
Ejemplo n.º 27
0
 // Use this for initialization
 void Start()
 {
     steeringBasics = GetComponent <SteeringBasics>();
     evade          = GetComponent <Evade>();
 }
Ejemplo n.º 28
0
        public Zed()
        {
            Q              = new LeagueSharp.SDK.Spell(SpellSlot.Q, 925).SetSkillshot(0.25f, 50, 1700, true, SkillshotType.SkillshotLine);
            Q2             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            Q3             = new LeagueSharp.SDK.Spell(Q.Slot, Q.Range).SetSkillshot(Q.Delay, Q.Width, Q.Speed, true, Q.Type);
            W              = new LeagueSharp.SDK.Spell(SpellSlot.W, 700).SetSkillshot(0, 0, 1750, false, SkillshotType.SkillshotLine);
            E              = new LeagueSharp.SDK.Spell(SpellSlot.E, 290).SetTargetted(0.005f, float.MaxValue);
            R              = new LeagueSharp.SDK.Spell(SpellSlot.R, 625);
            Q.DamageType   = W.DamageType = E.DamageType = R.DamageType = DamageType.Physical;
            Q.MinHitChance = HitChance.VeryHigh;

            comboMenu = config.AddSubMenu("Combo", "Combo");
            comboMenu.AddGroupLabel("Q/E: Always On");
            comboMenu.Add("Ignite", new CheckBox("Use Ignite"));
            comboMenu.Add("Items", new CheckBox("Use Items"));
            comboMenu.AddGroupLabel("Swap Settings");
            comboMenu.Add("SwapIfKill", new CheckBox("Swap W/R If Mark Can Kill Target", false));
            comboMenu.Add("SwapIfHpU", new Slider("Swap W/R If Hp < (%)", 10));
            comboMenu.Add("SwapGap", new ComboBox("Swap W/R To Gap Close", 1, "OFF", "Smart", "Always"));
            comboMenu.AddGroupLabel("W Settings");
            comboMenu.Add("WNormal", new CheckBox("Use For Non-R Combo"));
            comboMenu.Add("WAdv", new ComboBox("Use For R Combo", 1, "OFF", "Line", "Triangle", "Mouse"));
            comboMenu.AddGroupLabel("R Settings");
            comboMenu.Add("R", new KeyBind("Use R", false, KeyBind.BindTypes.PressToggle, 'X'));
            comboMenu.Add("RMode", new ComboBox("Mode", 0, "Always", "Wait Q/E"));
            comboMenu.Add("RStopRange", new Slider("Prevent Q/W/E If R Ready And Distance <=", (int)(R.Range + 200), (int)R.Range, (int)(R.Range + W.Range)));
            if (GameObjects.EnemyHeroes.Any())
            {
                comboMenu.AddGroupLabel("Extra R Settings");
                foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(o => o.IsEnemy))
                {
                    comboMenu.Add("RCast" + enemy.NetworkId, new CheckBox("Cast On " + enemy.ChampionName, false));
                }
            }

            hybridMenu = config.AddSubMenu("Hybrid", "Hybrid");
            hybridMenu.Add("Mode", new ComboBox("Mode", 1, "W-E-Q", "E-Q", "Q"));
            hybridMenu.Add("WEQ", new KeyBind("Only W If Hit E-Q", false, KeyBind.BindTypes.PressToggle, 'X'));
            hybridMenu.AddGroupLabel("Auto Q Settings (Champ)");
            hybridMenu.Add("AutoQ", new KeyBind("KeyBind", false, KeyBind.BindTypes.PressToggle, 'T'));
            hybridMenu.Add("AutoQMpA", new Slider("If Mp >=", 100, 0, 200));
            hybridMenu.AddGroupLabel("Auto E Settings (Champ/Shadow)");
            hybridMenu.Add("AutoE", new CheckBox("Auto", false));

            lhMenu = config.AddSubMenu("LastHit", "Last Hit");
            lhMenu.Add("Q", new CheckBox("Use Q"));

            ksMenu = config.AddSubMenu("KillSteal", "Kill Steal");
            ksMenu.Add("Q", new CheckBox("Use Q"));
            ksMenu.Add("E", new CheckBox("Use E"));

            if (GameObjects.EnemyHeroes.Any())
            {
                Evade.Init();
            }

            drawMenu = config.AddSubMenu("Draw", "Draw");
            drawMenu.Add("Q", new CheckBox("Q Range", false));
            drawMenu.Add("W", new CheckBox("W Range", false));
            drawMenu.Add("E", new CheckBox("E Range", false));
            drawMenu.Add("R", new CheckBox("R Range", false));
            drawMenu.Add("RStop", new CheckBox("Prevent Q/W/E Range", false));
            drawMenu.Add("UseR", new CheckBox("R In Combo Status"));
            drawMenu.Add("Target", new CheckBox("Target"));
            drawMenu.Add("DMark", new CheckBox("Death Mark"));
            drawMenu.Add("WPos", new CheckBox("W Shadow"));
            drawMenu.Add("RPos", new CheckBox("R Shadow"));

            miscMenu = config.AddSubMenu("Misc", "Misc");
            miscMenu.Add("FleeW", new KeyBind("Use W To Flee", false, KeyBind.BindTypes.HoldActive, 'C'));

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Obj_AI_Base.OnProcessSpellCast += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                if (args.Slot == SpellSlot.W && args.SData.Name == "ZedW")
                {
                    rCasted = false;
                    wCasted = true;
                }
                else if (args.Slot == SpellSlot.R && args.SData.Name == "ZedR")
                {
                    wCasted = false;
                    rCasted = true;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                if (sender.IsEnemy)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow == null || !shadow.IsAlly || shadow.CharData.BaseSkinName != "ZedUltMissile" || shadow.CharData.BaseSkinName != "ZedShadowDashMissile" || shadow.CharData.BaseSkinName != "zedshadow")
                {
                    return;
                }
                if (wCasted)
                {
                    wShadowT = Variables.TickCount;
                    wShadow  = shadow;
                    wCasted  = rCasted = false;
                }
                else if (rCasted)
                {
                    rShadowT = Variables.TickCount;
                    rShadow  = shadow;
                    wCasted  = rCasted = false;
                }
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (sender.IsEnemy || !args.Buff.Caster.IsMe)
                {
                    return;
                }
                var shadow = sender as Obj_AI_Minion;
                if (shadow != null && shadow.IsAlly && shadow.BaseSkinName == "ZedShadow" && args.Buff.Caster.IsMe)
                {
                    switch (args.Buff.Name)
                    {
                    case "zedwshadowbuff":
                        if (!wShadow.Compare(shadow))
                        {
                            wShadowT = Variables.TickCount;
                            wShadow  = shadow;
                        }
                        break;

                    case "zedrshadowbuff":
                        if (!rShadow.Compare(shadow))
                        {
                            rShadowT = Variables.TickCount;
                            rShadow  = shadow;
                        }
                        break;
                    }
                }
            };
            Obj_AI_Base.OnPlayAnimation += (sender, args) =>
            {
                if (sender.IsMe || sender.IsEnemy || args.Animation != "Death")
                {
                    return;
                }
                if (sender.Compare(wShadow))
                {
                    wShadow = null;
                }
                else if (sender.Compare(rShadow))
                {
                    rShadow = null;
                }
            };
            GameObject.OnCreate += (sender, args) =>
            {
                var missile = sender as MissileClient;
                if (missile != null)
                {
                    if (missile.SpellCaster.IsMe && missile.SData.Name == "ZedWMissile")
                    {
                        wMissile = missile;
                    }
                    return;
                }
                if (sender.Name != "Zed_Base_R_buf_tell.troy")
                {
                    return;
                }
                var target = EntityManager.Heroes.Enemies.FirstOrDefault(i => i.LSIsValidTarget() && HaveR(i));
                if (target != null && target.Distance(sender) < 150)
                {
                    deathMark = sender;
                }
            };
            GameObject.OnDelete += (sender, args) =>
            {
                if (sender.Compare(wMissile))
                {
                    wMissile = null;
                }
                else if (sender.Compare(deathMark))
                {
                    deathMark = null;
                }
            };
        }
Ejemplo n.º 29
0
 public static void Main()
 {
     Configs.Debug = false;
     Evade.OnGameLoad(new System.EventArgs());
 }
Ejemplo n.º 30
0
        protected override void TargetedDetector_TSDetector(Evade.Targeted.TargetSpell spell)
        {
            if (Player.IsDead)
                return;

            if (spell.IsActive && spell.Sender.IsEnemy && (spell.Target.IsMe || spell.Target.IsAlly))
            {
                if (!config.Item(spell.Spell.ChampionName.ToLower().ToString() + spell.Spell.Slot.ToString(), true).GetValue<bool>())
                    return;

                if (!config.Item(spell.Target.ChampionName.ToLower().ToString(), true).GetValue<bool>())
                    return;

                if (E.IsReady() && Player.Distance(spell.Target.Position) < E.Range)
                {
                    debug<string>("TSDetector", spell.Spell.ChampionName + " - " + spell.Spell.Slot.ToString());
                    CastE(spell.Target);
                }
            }
        }
Ejemplo n.º 31
0
        public Yasuo()
        {
            Q                = new LeagueSharp.SDK.Spell(SpellSlot.Q, 505).SetSkillshot(QDelay, 20, float.MaxValue, false, SkillshotType.SkillshotLine);
            Q2               = new LeagueSharp.SDK.Spell(Q.Slot, 1100).SetSkillshot(Q2Delay, 90, 1200, true, Q.Type);
            Q3               = new LeagueSharp.SDK.Spell(Q.Slot, 250).SetTargetted(0.005f, float.MaxValue);
            W                = new LeagueSharp.SDK.Spell(SpellSlot.W, 400);
            E                = new LeagueSharp.SDK.Spell(SpellSlot.E, 475).SetTargetted(0, 1050);
            E2               = new LeagueSharp.SDK.Spell(E.Slot).SetTargetted(E.Delay + Q3.Delay, E.Speed);
            R                = new LeagueSharp.SDK.Spell(SpellSlot.R, 1200);
            Q.DamageType     = Q2.DamageType = R.DamageType = DamageType.Physical;
            E.DamageType     = DamageType.Magical;
            Q.MinHitChance   = Q2.MinHitChance = HitChance.VeryHigh;
            E.CastCondition += () => !posDash.IsValid();

            if (YasuoPro.YasuoMenu.ComboM != null)
            {
                if (EntityManager.Heroes.Enemies.Any())
                {
                    Evade.Init();
                }
                Evade.Evading    += Evading;
                Evade.TryEvading += TryEvading;
                return;
            }

            comboMenu = config.AddSubMenu("Combo", "Combo");
            comboMenu.AddGroupLabel("Q: Always On");
            comboMenu.AddGroupLabel("E Gap Settings");
            comboMenu.Add("EGap", new CheckBox("Use E"));
            comboMenu.Add("EMode", new ComboBox("Follow Mode", 0, "Enemy", "Mouse"));
            comboMenu.Add("ETower", new CheckBox("Under Tower", false));
            comboMenu.Add("EStackQ", new CheckBox("Stack Q While Gap", false));
            comboMenu.AddGroupLabel("R Settings");
            comboMenu.Add("R", new KeyBind("Use R", false, KeyBind.BindTypes.PressToggle, 'X'));
            comboMenu.Add("RDelay", new CheckBox("Delay Cast"));
            comboMenu.Add("RHpU", new Slider("If Enemies Hp < (%)", 60));
            comboMenu.Add("RCountA", new Slider("Or Count >=", 2, 1, 5));

            hybridMenu = config.AddSubMenu("Hybrid", "Hybrid");
            hybridMenu.AddGroupLabel("Q: Always On");
            hybridMenu.Add("Q3", new CheckBox("Also Q3"));
            hybridMenu.Add("QLastHit", new CheckBox("Last Hit (Q1/2)"));
            hybridMenu.AddGroupLabel("Auto Q Settings");
            hybridMenu.Add("AutoQ", new KeyBind("KeyBind", false, KeyBind.BindTypes.PressToggle, 'T'));
            hybridMenu.Add("AutoQ3", new CheckBox("Also Q3", false));

            lcMenu = config.AddSubMenu("LaneClear", "Lane Clear");
            lcMenu.AddGroupLabel("Q Settings");
            lcMenu.Add("Q", new CheckBox("Use Q"));
            lcMenu.Add("Q3", new CheckBox("Also Q3", false));
            lcMenu.AddGroupLabel("E Settings");
            lcMenu.Add("E", new CheckBox("Use E"));
            lcMenu.Add("ELastHit", new CheckBox("Last Hit Only", false));
            lcMenu.Add("ETower", new CheckBox("Under Tower", false));

            lhMenu = config.AddSubMenu("LastHit", "Last Hit");
            lhMenu.AddGroupLabel("Q Settings");
            lhMenu.Add("Q", new CheckBox("Use Q"));
            lhMenu.Add("Q3", new CheckBox("Also Q3", false));
            lhMenu.AddGroupLabel("E Settings");
            lhMenu.Add("E", new CheckBox("Use E"));
            lhMenu.Add("ETower", new CheckBox("Under Tower", false));

            ksMenu = config.AddSubMenu("KillSteal", "Kill Steal");
            ksMenu.Add("Q", new CheckBox("Use Q"));
            ksMenu.Add("E", new CheckBox("Use E"));
            ksMenu.Add("R", new CheckBox("Use R"));
            foreach (var enemy in ObjectManager.Get <AIHeroClient>().Where(o => o.IsEnemy))
            {
                ksMenu.Add("RCast" + enemy.NetworkId, new CheckBox("Cast On " + enemy.ChampionName, false));
            }

            fleeMenu = config.AddSubMenu("Flee", "Flee");
            fleeMenu.Add("E", new KeyBind("Use E", false, KeyBind.BindTypes.HoldActive, 'C'));
            fleeMenu.Add("Q", new CheckBox("Stack Q While Dash"));

            if (EntityManager.Heroes.Enemies.Any())
            {
                Evade.Init();
            }

            drawMenu = config.AddSubMenu("Draw", "Draw");
            drawMenu.Add("Q", new CheckBox("Q Range", false));
            drawMenu.Add("E", new CheckBox("E Range", false));
            drawMenu.Add("R", new CheckBox("R Range", false));
            drawMenu.Add("UseR", new CheckBox("R In Combo Status"));
            drawMenu.Add("StackQ", new CheckBox("Auto Stack Q Status"));

            miscMenu = config.AddSubMenu("Misc", "Misc");
            miscMenu.Add("StackQ", new KeyBind("Auto Stack Q", false, KeyBind.BindTypes.PressToggle, 'Z'));

            Evade.Evading    += Evading;
            Evade.TryEvading += TryEvading;
            Game.OnUpdate    += OnUpdate;
            Drawing.OnDraw   += OnDraw;
            Game.OnUpdate    += args =>
            {
                if (Player.IsDead)
                {
                    if (isDash)
                    {
                        isDash  = false;
                        posDash = new Vector2();
                    }
                    return;
                }
                if (isDash && !Player.IsDashing())
                {
                    isDash = false;
                    DelayAction.Add(50, () => posDash = new Vector2());
                }
                Q.Delay  = GetQDelay(false);
                Q2.Delay = GetQDelay(true);
                E.Speed  = E2.Speed = 1045 + (Player.MoveSpeed - 345);
            };
            Orbwalker.OnPostAttack += (sender, args) =>
            {
                if (!Q.IsReady() || haveQ3 || (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear)) || Orbwalker.LastTarget is AIHeroClient || Orbwalker.LastTarget is Obj_AI_Minion)
                {
                    return;
                }
                if (Q.GetTarget(50) != null || Common.ListMinions().Count(i => i.IsValidTarget(Q.Range + 50)) > 0)
                {
                    return;
                }
                if ((Items.HasItem((int)ItemId.Sheen) && Items.CanUseItem((int)ItemId.Sheen)) || (Items.HasItem((int)ItemId.Trinity_Force) && Items.CanUseItem((int)ItemId.Trinity_Force)))
                {
                    Q.Cast(Game.CursorPos);
                }
            };
            Events.OnDash += (sender, args) =>
            {
                if (!args.Unit.IsMe)
                {
                    return;
                }
                isDash  = true;
                posDash = args.EndPos;
            };
            Obj_AI_Base.OnBuffGain += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "YasuoQ3W":
                    haveQ3 = true;
                    break;

                case "YasuoDashScalar":
                    cDash = 1;
                    break;
                }
            };
            Obj_AI_Base.OnBuffUpdate += (sender, args) =>
            {
                if (!sender.IsMe || !args.Buff.Caster.IsMe || args.Buff.DisplayName != "YasuoDashScalar")
                {
                    return;
                }
                cDash = 2;
            };
            Obj_AI_Base.OnBuffLose += (sender, args) =>
            {
                if (!sender.IsMe)
                {
                    return;
                }
                switch (args.Buff.DisplayName)
                {
                case "YasuoQ3W":
                    haveQ3 = false;
                    break;

                case "YasuoDashScalar":
                    cDash = 0;
                    break;
                }
            };
            Obj_AI_Base.OnSpellCast += (sender, args) =>
            {
                if (!sender.IsMe || !args.SData.Name.StartsWith("YasuoQ") || args.SData.Name.EndsWith("Mis"))
                {
                    return;
                }
                if (args.SData.Name.EndsWith("W"))
                {
                    DelayAction.Add(50, Orbwalker.ResetAutoAttack);
                }
                EloBuddy.Player.IssueOrder(GameObjectOrder.AttackTo, Player.ServerPosition.LSExtend(args.End, -(Player.BoundingRadius * 2)));
            };
        }
Ejemplo n.º 32
0
        protected override void TargetedDetector_TSDetector(Evade.Targeted.TargetSpell spell)
        {
            if (Player.IsDead)
                return;

            if (spell.IsActive && spell.Sender.IsEnemy && spell.Target.IsMe)
            {
                if (!IsFind(spell))
                    return;

                if (E.IsReady())
                {
                    debug<string>("TSDetector", spell.Spell.ChampionName + " - " + spell.Spell.Slot.ToString());
                    CastE();
                }
            }
        }
Ejemplo n.º 33
0
 private static bool IsFind(Evade.Targeted.TargetSpell args)
 {
     return config.Item(args.Spell.ChampionName.ToString() + args.Spell.Slot.ToString(), true).GetValue<bool>();
 }
Ejemplo n.º 34
0
    // Use this for initialization
    void Start () {
        steeringBasics = GetComponent<SteeringBasics>();
        evade = GetComponent<Evade>();
	}
Ejemplo n.º 35
0
        private static void LaneClear()
        {
            var useQ  = getCheckBoxItem(lcMenu, "Q");
            var useQ3 = getCheckBoxItem(lcMenu, "Q3");

            if (haveQ3 && useQ3)
            {
                var minions = EntityManager.MinionsAndMonsters.GetJungleMonsters().Where(i => Q2.IsInRange(i)).Cast <Obj_AI_Base>().ToList();
                if (minions != null)
                {
                    Q2.Cast(minions.FirstOrDefault());
                }
            }
            if (getCheckBoxItem(lcMenu, "E") && E.IsReady())
            {
                var minions = Common.ListMinions().Where(i => i.LSIsValidTarget(E.Range) && !HaveE(i) && (!GetPosAfterDash(i).IsUnderEnemyTurret() || getCheckBoxItem(lcMenu, "ETower")) && Evade.IsSafePoint(GetPosAfterDash(i).ToVector2()).IsSafe).OrderByDescending(i => i.MaxHealth).ToList();
                if (minions.Count > 0)
                {
                    var minion = minions.FirstOrDefault(i => E.CanLastHit(i, GetEDmg(i)));
                    if (useQ && minion == null && Q.IsReady(50) && (!haveQ3 || useQ3))
                    {
                        var sub = new List <Obj_AI_Minion>();
                        foreach (var mob in minions)
                        {
                            if ((E2.CanLastHit(mob, GetQDmg(mob), GetEDmg(mob)) || mob.Team == GameObjectTeam.Neutral) &&
                                mob.Distance(GetPosAfterDash(mob)) < Q3.Range)
                            {
                                sub.Add(mob);
                            }
                            if (getCheckBoxItem(lcMenu, "ELastHit"))
                            {
                                continue;
                            }
                            var nearMinion =
                                Common.ListMinions()
                                .Where(i => i.IsValidTarget(Q3.Range, true, GetPosAfterDash(mob)))
                                .ToList();
                            if (nearMinion.Count > 2 || nearMinion.Count(i => mob.Health <= GetQDmg(mob)) > 1)
                            {
                                sub.Add(mob);
                            }
                        }
                        minion = sub.FirstOrDefault();
                    }
                    if (minion != null && E.CastOnUnit(minion))
                    {
                        lastE = Variables.TickCount;
                        return;
                    }
                }
            }
            if (useQ && Q.IsReady() && (!haveQ3 || useQ3))
            {
                if (IsDashing)
                {
                    if (CanCastQCir)
                    {
                        var minions = GetQCirObj.Where(i => i is Obj_AI_Minion).ToList();
                        if (minions.Any(i => i.Health <= GetQDmg(i) || i.Team == GameObjectTeam.Neutral) || minions.Count > 1)
                        {
                            CastQCir(minions);
                        }
                    }
                }
                else
                {
                    var minions = Common.ListMinions().Where(i => !haveQ3 ? IsInRangeQ(i) : i.IsValidTarget(Q2.Range - i.BoundingRadius / 2)).OrderByDescending(i => i.MaxHealth).ToList();
                    if (minions.Count == 0)
                    {
                        return;
                    }
                    if (!haveQ3)
                    {
                        var minion = minions.FirstOrDefault(i => Q.CanLastHit(i, GetQDmg(i)));
                        if (minion != null)
                        {
                            Q.Casting(minion);
                        }
                        else
                        {
                            var pos = Q.GetLineFarmLocation(minions);
                            if (pos.MinionsHit > 0)
                            {
                                Q.Cast(pos.Position);
                            }
                        }
                    }
                    else
                    {
                        var pos = Q2.GetLineFarmLocation(minions);
                        if (pos.MinionsHit > 0)
                        {
                            Console.WriteLine("ASKDJLAKSJDLKASJDKSAJD");
                            Q2.Cast(pos.Position);
                        }
                    }
                }
            }
        }
Ejemplo n.º 36
0
 public static bool WillKill(this Obj_AI_Base caster, Obj_AI_Base target, Evade.SpellData spell, int buffer = 10)
 {
     return caster.GetSpellDamage(target, spell.SpellName) >= target.HealthBuffer(buffer);
 }