Ejemplo n.º 1
0
        public static bool UseBrokenWings(EvadeSpellData evadeSpell, bool process = false)
        {
            var posInfo = EvadeHelper.GetBestPositionDash(evadeSpell);

            if (posInfo != null)
            {
                EvadeCommand.MoveTo(posInfo.position);
                DelayAction.Add(50, () => EvadeSpell.CastEvadeSpell(() => EvadeCommand.CastSpell(evadeSpell), process));
                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        public static bool UsePounce(EvadeSpellData evadeSpell, bool process = true)
        {
            if (myHero.UnitSkinName != "Nidalee")
            {
                var posInfo = EvadeHelper.GetBestPositionDash(evadeSpell);
                if (posInfo != null)
                {
                    EvadeSpell.CastEvadeSpell(() => EvadeCommand.CastSpell(evadeSpell), process);
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 3
0
        public static bool CanHeroEvade(this Spell spell, Obj_AI_Base hero, out float rEvadeTime,
                                        out float rSpellHitTime)
        {
            var   heroPos      = hero.ServerPosition.To2D();
            float evadeTime    = 0;
            float spellHitTime = 0;
            var   speed        = hero.MoveSpeed;
            float delay        = 0;

            var moveBuff = EvadeSpell.evadeSpells.OrderBy(s => s.dangerlevel)
                           .FirstOrDefault(s => s.evadeType == EvadeType.MovementSpeedBuff);

            if (moveBuff != null && EvadeSpell.ShouldUseMovementBuff(spell))
            {
                speed += speed * moveBuff.speedArray[
                    ObjectManager.GetLocalPlayer().GetSpell(moveBuff.spellKey).Level - 1] / 100;
                delay += (moveBuff.spellDelay > 50 ? moveBuff.spellDelay : 0) + ObjectCache.gamePing;
            }

            if (spell.spellType == SpellType.Line)
            {
                var projection = heroPos.ProjectOn(spell.startPos, spell.endPos).SegmentPoint;
                evadeTime    = 1000 * (spell.radius - heroPos.Distance(projection) + hero.BoundingRadius) / speed;
                spellHitTime = spell.GetSpellHitTime(projection);
            }
            else if (spell.spellType == SpellType.Circular)
            {
                evadeTime    = 1000 * (spell.radius - heroPos.Distance(spell.endPos)) / speed;
                spellHitTime = spell.GetSpellHitTime(heroPos);
            }
            else if (spell.spellType == SpellType.Cone)
            {
                var sides = new[]
                {
                    heroPos.ProjectOn(spell.cnStart, spell.cnLeft).SegmentPoint,
                    heroPos.ProjectOn(spell.cnLeft, spell.cnRight).SegmentPoint,
                    heroPos.ProjectOn(spell.cnRight, spell.cnStart).SegmentPoint
                };

                var p = sides.OrderBy(x => x.Distance(x)).First();
                evadeTime    = 1000 * (spell.info.range / 2 - heroPos.Distance(p) + hero.BoundingRadius) / speed;
                spellHitTime = spell.GetSpellHitTime(heroPos);
            }

            rEvadeTime    = evadeTime;
            rSpellHitTime = spellHitTime;

            return(spellHitTime - delay > evadeTime);
        }
Ejemplo n.º 4
0
        public static bool UseEkkoE2(EvadeSpellData evadeSpell, bool process = true)
        {
            if (myHero.HasBuff("ekkoeattackbuff"))
            {
                var posInfo = EvadeHelper.GetBestPositionTargetedDash(evadeSpell);
                if (posInfo != null && posInfo.target != null)
                {
                    EvadeSpell.CastEvadeSpell(() => EvadeCommand.Attack(evadeSpell, posInfo.target), process);
                    //DelayAction.Add(50, () => myHero.IssueOrder(OrderType.MoveTo, posInfo.position.To3D()));
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 5
0
        public static bool UseRappel(EvadeSpellData evadeSpell, bool process = true)
        {
            if (myHero.UnitSkinName != "Elise")
            {
                EvadeSpell.CastEvadeSpell(() => EvadeCommand.CastSpell(evadeSpell, myHero), process);
                return(true);
            }

            if (myHero.UnitSkinName == "Elise")
            {
                if (myHero.SpellBook.CanUseSpell(SpellSlot.R))
                {
                    myHero.SpellBook.CastSpell(SpellSlot.R);
                }
            }

            return(false);
        }
Ejemplo n.º 6
0
        public static bool UseEkkoR(EvadeSpellData evadeSpell, bool process = true)
        {
            foreach (var obj in ObjectManager.Get <Obj_AI_Minion>())
            {
                if (obj != null && obj.IsValid && !obj.IsDead && obj.Name == "Ekko" && obj.IsAlly)
                {
                    var blinkPos = obj.ServerPosition.To2D();
                    if (!blinkPos.CheckDangerousPos(10))
                    {
                        EvadeSpell.CastEvadeSpell(() => EvadeCommand.CastSpell(evadeSpell), process);
                        //DelayAction.Add(50, () => myHero.IssueOrder(OrderType.MoveTo, posInfo.position.To3D()));
                        return(true);
                    }
                }
            }

            return(false);
        }
Ejemplo n.º 7
0
        private void Game_OnGameUpdate()
        {
            try
            {
                ObjectCache.myHeroCache.UpdateInfo();
                CheckHeroInDanger();

                if (isChanneling && channelPosition.Distance(ObjectCache.myHeroCache.serverPos2D) > 50 &&
                    !myHero.SpellBook.IsChanneling)
                {
                    isChanneling = false;
                }

                // fix
                //if (ObjectCache.menuCache.cache["ResetConfig"].As<MenuBool>().Enabled)
                //{
                //    //ResetConfig();
                //    //menu.Item("ResetConfig"));
                //}

                var limitDelay =
                    ObjectCache.menuCache.cache["TickLimiter"].As <MenuSlider>(); //Tick limiter
                if (EvadeHelper.fastEvadeMode || EvadeUtils.TickCount - lastTickCount > limitDelay.Value)
                {
                    if (EvadeUtils.TickCount > lastStopEvadeTime)
                    {
                        DodgeSkillShots(); //walking
                        ContinueLastBlockedCommand();
                    }

                    lastTickCount = EvadeUtils.TickCount;
                }

                EvadeSpell.UseEvadeSpell(); //using spells
                CheckDodgeOnlyDangerous();
                RecalculatePath();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Ejemplo n.º 8
0
        private void RecalculatePath()
        {
            if (ObjectCache.menuCache.cache["RecalculatePosition"].As <MenuBool>().Enabled&& isDodging) //recheck path
            {
                if (lastPosInfo != null && !lastPosInfo.recalculatedPath)
                {
                    var path = myHero.Path;
                    if (path.Length > 0)
                    {
                        var movePos = path.Last().To2D();

                        if (movePos.Distance(lastPosInfo.position) < 5) //more strict checking
                        {
                            var posInfo =
                                EvadeHelper.CanHeroWalkToPos(movePos, ObjectCache.myHeroCache.moveSpeed, 0, 0, false);
                            if (posInfo.posDangerCount > lastPosInfo.posDangerCount)
                            {
                                lastPosInfo.recalculatedPath = true;

                                if (EvadeSpell.PreferEvadeSpell())
                                {
                                    lastPosInfo = PositionInfo.SetAllUndodgeable();
                                }
                                else
                                {
                                    var newPosInfo = EvadeHelper.GetBestPosition();
                                    if (newPosInfo.posDangerCount < posInfo.posDangerCount)
                                    {
                                        lastPosInfo = newPosInfo;
                                        CheckHeroInDanger();
                                        DodgeSkillShots();
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 9
0
        private void SpellDetector_OnProcessDetectedSpells()
        {
            ObjectCache.myHeroCache.UpdateInfo();

            if (ObjectCache.menuCache.cache["DodgeSkillShots"].As <MenuKeyBind>().Enabled == false)
            {
                lastPosInfo = PositionInfo.SetAllUndodgeable();
                EvadeSpell.UseEvadeSpell();
                return;
            }

            if (ObjectCache.myHeroCache.serverPos2D.CheckDangerousPos(0) ||
                ObjectCache.myHeroCache.serverPos2DExtra.CheckDangerousPos(0))
            {
                if (EvadeSpell.PreferEvadeSpell())
                {
                    lastPosInfo = PositionInfo.SetAllUndodgeable();
                }
                else
                {
                    var posInfo          = EvadeHelper.GetBestPosition();
                    var calculationTimer = EvadeUtils.TickCount;
                    var caculationTime   = EvadeUtils.TickCount - calculationTimer;
                    //computing time

                    /*if (numCalculationTime > 0)
                     * {
                     *  sumCalculationTime += caculationTime;
                     *  avgCalculationTime = sumCalculationTime / numCalculationTime;
                     * }
                     * numCalculationTime += 1;*/

                    //Console.WriteLine("CalculationTime: " + caculationTime);

                    /*if (EvadeHelper.GetHighestDetectedSpellID() > EvadeHelper.GetHighestSpellID(posInfo))
                     * {
                     *  return;
                     * }*/
                    if (posInfo != null)
                    {
                        lastPosInfo = posInfo.CompareLastMovePos();

                        var travelTime = ObjectCache.myHeroCache.serverPos2DPing.Distance(lastPosInfo.position) /
                                         myHero.MoveSpeed;

                        lastPosInfo.endTime = EvadeUtils.TickCount + travelTime * 1000 - 100;
                    }

                    CheckHeroInDanger();

                    if (EvadeUtils.TickCount > lastStopEvadeTime)
                    {
                        DodgeSkillShots(); //walking
                    }
                    CheckLastMoveTo();
                    EvadeSpell.UseEvadeSpell(); //using spells
                }
            }
            else
            {
                lastPosInfo = PositionInfo.SetAllDodgeable();
                CheckLastMoveTo();
            }


            //Console.WriteLine("SkillsDodged: " + lastPosInfo.dodgeableSpells.Count + " DangerLevel: " + lastPosInfo.undodgeableSpells.Count);
        }
Ejemplo n.º 10
0
        private void Game_OnGameLoad()
        {
            try
            {
                // devModeOn = true;

                Obj_AI_Base.OnIssueOrder += Game_OnIssueOrder;
                SpellBook.OnCastSpell    += Game_OnCastSpell;
                Game.OnUpdate            += Game_OnGameUpdate;

                Obj_AI_Base.OnProcessSpellCast += Game_OnProcessSpell;

                Game.OnEnd += Game_OnGameEnd;
                SpellDetector.OnProcessDetectedSpells += SpellDetector_OnProcessDetectedSpells;
                var OrbwalkerInst = Orbwalker.OrbwalkerInstances.FirstOrDefault();
                if (OrbwalkerInst != null)
                {
                    OrbwalkerInst.PreAttack += Orbwalker_PreAttack;
                }


                menu = new Menu("ezevadeeeeeeeee", "ezEvade Ported by ya homeboy Sean", true);

                mainMenu = new Menu("MainMenu", "Main Menu");
                mainMenu.Add(new MenuKeyBind("DodgeSkillShots", "Dodge SkillShots", KeyCode.K, KeybindType.Toggle));
                mainMenu.Add(new MenuBool("DodgeDangerous", "Dodge Only Dangerous", false));
                mainMenu.Add(new MenuBool("DodgeCircularSpells", "Dodge Circular Spells"));
                mainMenu.Add(new MenuKeyBind("ActivateEvadeSpells", "Activate Evade Spells", KeyCode.K,
                                             KeybindType.Toggle));
                mainMenu.Add(new MenuBool("DodgeFOWSpells", "Dodge FOW Spells"));
                menu.Add(mainMenu);

                keyMenu = new Menu("KeyMenu", "Key Menu");
                keyMenu.Add(new MenuBool("DodgeOnlyOnComboKeyEnabled", "Dodge Only On Combo Key Enabled", false));
                keyMenu.Add(new MenuKeyBind("DodgeComboKey", "Dodge Combo Key", KeyCode.Space, KeybindType.Press));
                keyMenu.Add(new MenuBool("DodgeDangerousKeyEnabled", "Enable Dodge Only Dangerous Keys", false));
                keyMenu.Add(new MenuKeyBind("DodgeDangerousKey", "Dodge Only Dangerous Key", KeyCode.Space,
                                            KeybindType.Press));
                keyMenu.Add(new MenuKeyBind("DodgeDangerousKey2", "Dodge Only Dangerous Key 2", KeyCode.V,
                                            KeybindType.Press));
                keyMenu.Add(new MenuBool("DontDodgeKeyEnabled", "Dont Dodge Key Enabled", false));
                keyMenu.Add(new MenuKeyBind("DontDodgeKey", "Dodge Combo Key", KeyCode.Z, KeybindType.Press));
                menu.Add(keyMenu);

                var loadTestMenu = new Menu("LoadTests", "Tests")
                {
                    new MenuBool("LoadPingTester", "Load Ping Tester", false),
                    new MenuBool("LoadSpellTester", "Load Spell Tester", false)
                };

                loadTestMenu["LoadPingTester"].OnValueChanged  += OnLoadPingTesterChange;
                loadTestMenu["LoadSpellTester"].OnValueChanged += OnLoadSpellTesterChange;

                miscMenu = new Menu("MiscMenu", "Misc Menu");
                miscMenu.Add(new MenuBool("HigherPrecision", "Higher Precision"));
                miscMenu.Add(new MenuBool("RecalculatePosition", "Recalculate Position"));
                miscMenu.Add(new MenuBool("ContinueMovement", "Continue Previous Movement"));
                miscMenu.Add(new MenuBool("ClickRemove", "Click Remove"));
                miscMenu.Add(new MenuBool("CalculateWindupDelay", "Calculate Windup Delay"));
                miscMenu.Add(new MenuBool("AdvancedSpellDetection", "Advanced Spell Detection", true));
                miscMenu.Add(new MenuBool("CheckSpellCollision", "Check Spell Collision"));
                miscMenu.Add(new MenuList("EvadeMode", "Evade Profile",
                                          new[] { "Smooth", "Very Smooth", "Fastest", "Hawk", "Kurisu", "GuessWho" }, 0));
                miscMenu.Add(new MenuBool("PreventDodgingUnderTower", "Prevent Dodging Under Tower"));
                miscMenu.Add(new MenuBool("PreventDodgingNearEnemy", "Prevent Dodging Near Enemy"));
                //miscMenu.Add(new MenuBool("DrawEvadePosition", "Draw Evade Position", false));
                miscMenu.Add(loadTestMenu);
                menu.Add(miscMenu);

                miscMenu["EvadeMode"].OnValueChanged += OnEvadeModeChange;

                bufferMenu = new Menu("BufferMenu", "Buffer Menu");
                bufferMenu.Add(new MenuSlider("ExtraSpellRadius", "Extra Spell Radius", 0, 0, 100));
                bufferMenu.Add(new MenuSlider("ExtraPingBuffer", "Extra Ping Buffer", 65, 0, 200));
                bufferMenu.Add(new MenuSlider("ExtraAvoidDistance", "Extra Avoid Distance", 50, 0, 300));
                bufferMenu.Add(new MenuSlider("ExtraEvadeDistance", "Extra Evade Distance", 100, 0, 300));
                bufferMenu.Add(new MenuSlider("ExtraCPADistance", "Extra Collision Distance", 10, 0, 150));
                bufferMenu.Add(new MenuSlider("MinComfortZone", "Min Distance to Champion", 550, 0, 1000));

                menu.Add(bufferMenu);

                limiterMenu = new Menu("LimiterMenu", "Humanizer Menu");
                limiterMenu.Add(new MenuSlider("SpellDetectionTime", "Spell Detection Time", 0, 0, 1000));
                limiterMenu.Add(new MenuSlider("ReactionTime", "Reaction Time", 0, 0, 500));
                limiterMenu.Add(new MenuSlider("DodgeInterval", "Dodge Interval Time", 0, 0, 2000));
                limiterMenu.Add(new MenuSlider("TickLimiter", "Tick Limiter", 100, 0, 500));
                limiterMenu.Add(new MenuBool("EnableEvadeDistance", "Extended Evade"));
                limiterMenu.Add(new MenuBool("ClickOnlyOnce", "Only Click Once"));
                menu.Add(limiterMenu);

                fastEvadeMenu = new Menu("FastEvade", "Fast Evade Menu");
                fastEvadeMenu.Add(new MenuBool("FastMovementBlock", "Fast Movement Block"));
                fastEvadeMenu.Add(new MenuSlider("FastEvadeActivationTime", "FastEvade Activation Time", 65, 0, 500));
                fastEvadeMenu.Add(new MenuSlider("SpellActivationTime", "Spell Activation Time", 400, 0, 1000));
                fastEvadeMenu.Add(new MenuSlider("RejectMinDistance", "Collision Distance Buffer", 10, 0, 100));
                menu.Add(fastEvadeMenu);

                //keyMenu = new Menu("KeySettings", "Key Settings")
                //{
                //    new MenuBool("DodgeDangerousKeyEnabled", "Enable Dodge Only Dangerous Keys"),
                //    new MenuKeyBind("DodgeDangerousKey", "Dodge Only Dangerous Key", KeyCode.Space, KeybindType.Press),
                //    new MenuKeyBind("DodgeDangerousKey2", "Dodge Only Dangerous Key 2", KeyCode.V, KeybindType.Press),
                //    new MenuBool("DodgeOnlyOnComboKeyEnabled", "Enable Dodge Only On Combo Key"),
                //    new MenuKeyBind("DodgeComboKey", "Dodge Only Combo Key", KeyCode.Space, KeybindType.Press),
                //    new MenuBool("DontDodgeKeyEnabled", "Enable Don't Dodge Key"),
                //    new MenuKeyBind("DontDodgeKey", "Don't Dodge Key", KeyCode.Z, KeybindType.Press)
                //};
                //menu.Add(keyMenu);

                //miscMenu = new Menu("MiscSettings", "Misc Settings")
                //{
                //    new MenuBool("HigherPrecision", "Enhanced Dodge Precision"),
                //    new MenuBool("RecalculatePosition", "Recalculate Path"),
                //    new MenuBool("ContinueMovement", "Continue Last Movement"),
                //    new MenuBool("CalculateWindupDelay", "Calculate Windup Delay"),
                //    new MenuBool("CheckSpellCollision", "Check Spell Collision"),
                //    new MenuBool("PreventDodgingUnderTower", "Prevent Dodging Under Tower"),
                //    new MenuBool("PreventDodgingNearEnemy", "Prevent Dodging Near Enemies"),
                //    new MenuBool("AdvancedSpellDetection", "Advanced Spell Detection"),
                //    new MenuBool("ClickRemove", "Allow Left Click Removal"),
                //    new MenuList("EvadeMode", "Evade Profile",
                //        new[] {"Smooth", "Very Smooth", "Fastest", "Hawk", "Kurisu", "GuessWho"}, 0),
                //    new MenuBool("ResetConfig", "Reset Evade Config")
                //};
                //menu.Add(miscMenu);

                //bufferMenu = new Menu("ExtraBuffers", "Extra Buffers")
                //{
                //    new MenuSlider("ExtraPingBuffer", "Extra Ping Buffer", 65, 0, 200),
                //    new MenuSlider("ExtraCPADistance", "Extra Collision Distance", 10, 0, 150),
                //    new MenuSlider("ExtraSpellRadius", "Extra Spell Radius", 0, 0, 100),
                //    new MenuSlider("ExtraEvadeDistance", "Extra Evade Distance", 100, 0, 300),
                //    new MenuSlider("ExtraAvoidDistance", "Extra Avoid Distance", 50, 0, 300),
                //    new MenuSlider("MinComfortZone", "Min Distance to Champion", 550, 0, 1000)
                //};
                //miscMenu.Add(bufferMenu);

                //mainMenu = new Menu("Main", "Main")
                //{
                //    new MenuKeyBind("DodgeSkillShots", "Dodge SkillShots", KeyCode.K, KeybindType.Toggle, true),
                //    new MenuKeyBind("ActivateEvadeSpells", "Use Evade Spells", KeyCode.K, KeybindType.Toggle, true),
                //    new MenuBool("DodgeDangerous", "Dodge Only Dangerous"),
                //    new MenuBool("DodgeFOWSpells", "Dodge FOW SkillShots"),
                //    new MenuBool("DodgeCircularSpells", "Dodge Circular SkillShots")
                //};
                //menu.Add(mainMenu);


                spellDetector = new SpellDetector(menu);
                evadeSpell    = new EvadeSpell(menu);

                //miscMenu["EvadeMode"].OnValueChanged += OnEvadeModeChange;

                //limiterMenu = new Menu("Limiter", "Humanizer")
                //{
                //    new MenuBool("ClickOnlyOnce", "Click Only Once"),
                //    new MenuBool("EnableEvadeDistance", "Extended Evade"),
                //    new MenuSlider("TickLimiter", "Tick Limiter", 100, 0, 500),
                //    new MenuSlider("SpellDetectionTime", "Spell Detection Time", 0, 0, 1000),
                //    new MenuSlider("ReactionTime", "Reaction Time", 0, 0, 500),
                //    new MenuSlider("DodgeInterval", "Dodge Interval", 0, 0, 2000)
                //};

                //miscMenu.Add(limiterMenu);

                //fastEvadeMenu = new Menu("FastEvade", "Fast Evade")
                //{
                //    new MenuBool("FastMovementBlock", "Fast Movement Block"),
                //    new MenuSlider("FastEvadeActivationTime", "FastEvade Activation Time", 65, 0, 500),
                //    new MenuSlider("SpellActivationTime", "Spell Activation Time", 400, 0, 1000),
                //    new MenuSlider("RejectMinDistance", "Collision Distance Buffer", 10, 0, 100)
                //};

                //miscMenu.Add(fastEvadeMenu);

                //Menu loadTestMenu = new Menu("LoadTests", "Tests")
                //{
                //    new MenuBool("LoadPingTester", "Load Ping Tester"),
                //    new MenuBool("LoadSpellTester", "Load Spell Tester")
                //};

                //loadTestMenu["LoadPingTester"].OnValueChanged += OnLoadPingTesterChange;
                //loadTestMenu["LoadSpellTester"].OnValueChanged += OnLoadSpellTesterChange;

                //miscMenu.Add(loadTestMenu);

                menu.Attach();


                spellDrawer = new SpellDrawer(menu);

                //autoSetPing = new AutoSetPing(menu);

                var initCache = ObjectCache.myHeroCache;

                if (devModeOn)
                {
                    var evadeTester = new Menu("ezevade: Test", "ezEvadeTest", true);
                    var o           = new EvadeTester(evadeTester);
                    evadeTester.Attach();
                    //Utility.DelayAction.Add(100, () => loadTestMenu.Item("LoadSpellTester"));
                }

                Console.WriteLine("ezevade Loaded");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }