コード例 #1
0
ファイル: Yasuo.cs プロジェクト: betw01/detu
        public static void fleeToMouse()
        {
            try
            {
                YasDash closeDash = getClosestDash();
                if (closeDash != null)
                {
                    List <Obj_AI_Base> jumps = canGoThrough(closeDash);
                    if (jumps.Count > 0 || ((W.IsReady() || (Yasuo.wall != null && (Yasuo.wall.endtime - Game.Time) > 3f)) && jTimers.closestJCUp(closeDash.to)))
                    {
                        var distToDash = Player.Distance(closeDash.from);

                        if (W.IsReady() && distToDash < 136f && jumps.Count == 0 && MinionManager.GetMinions(Game.CursorPos, 350).Where(min => min.IsVisible).Count() < 2)
                        {
                            W.Cast(closeDash.to);
                        }

                        if (distToDash > 2f)
                        {
                            Player.IssueOrder(GameObjectOrder.MoveTo, closeDash.from);
                            return;
                        }

                        if (distToDash < 3f && jumps.Count > 0)
                        {
                            E.Cast(jumps.First());
                        }
                        return;
                    }
                }
                if (getClosestDash(400) == null)
                {
                    Yasuo.gapCloseE(Game.CursorPos.To2D());
                }
                Player.IssueOrder(GameObjectOrder.MoveTo, Game.CursorPos);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
コード例 #2
0
ファイル: YasuoSharp.cs プロジェクト: WTayllor/LeagueSharp-3
        private static void onLoad(EventArgs args)
        {
            if (ObjectManager.Player.ChampionName != CharName)
            {
                return;
            }

            Yasuo.setSkillShots();
            Yasuo.setDashes();
            Yasuo.point1 = Yasuo.Player.Position;
            Game.PrintChat("YasuoSharp by DeTuKs");

            try
            {
                Config = new Menu("YasuoSharp", "Yasuo", true);
                //Orbwalker
                Config.AddSubMenu(new Menu("Orbwalker", "Orbwalker"));
                Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalker"));
                //TS
                var TargetSelectorMenu = new Menu("Target Selector", "Target Selector");
                SimpleTs.AddToMenu(TargetSelectorMenu);
                Config.AddSubMenu(TargetSelectorMenu);
                //Combo
                Config.AddSubMenu(new Menu("Combo Sharp", "combo"));
                Config.SubMenu("combo").AddItem(new MenuItem("comboItems", "Use Items")).SetValue(true);
                //SmartR
                Config.SubMenu("combo").AddItem(new MenuItem("smartR", "Smart R")).SetValue(true);
                Config.SubMenu("combo").AddItem(new MenuItem("useRHit", "Use R if hit")).SetValue(new Slider(3, 5, 1));
                Config.SubMenu("combo").AddItem(new MenuItem("useRHitTime", "Use R when they land")).SetValue(true);
                Config.SubMenu("combo").AddItem(new MenuItem("useEWall", "use E to safe")).SetValue(true);
                //Flee away
                Config.SubMenu("combo").AddItem(new MenuItem("flee", "E away")).SetValue(new KeyBind('Z', KeyBindType.Press, false));


                //LastHit
                Config.AddSubMenu(new Menu("LastHit Sharp", "lHit"));
                Config.SubMenu("lHit").AddItem(new MenuItem("useQlh", "Use Q")).SetValue(true);
                Config.SubMenu("lHit").AddItem(new MenuItem("useElh", "Use E")).SetValue(true);
                //LaneClear
                Config.AddSubMenu(new Menu("LaneClear Sharp", "lClear"));
                Config.SubMenu("lClear").AddItem(new MenuItem("useQlc", "Use Q")).SetValue(true);
                Config.SubMenu("lClear").AddItem(new MenuItem("useEmpQHit", "Emp Q Min hit")).SetValue(new Slider(3, 6, 1));
                Config.SubMenu("lClear").AddItem(new MenuItem("useElc", "Use E")).SetValue(true);
                //Harass
                Config.AddSubMenu(new Menu("Harass Sharp", "harass"));
                Config.SubMenu("harass").AddItem(new MenuItem("harassTower", "Harass under tower")).SetValue(false);
                Config.SubMenu("harass").AddItem(new MenuItem("harassOn", "Harass enemies")).SetValue(true);
                Config.SubMenu("harass").AddItem(new MenuItem("harQ3Only", "Use only Q3")).SetValue(false);
                //Drawings
                Config.AddSubMenu(new Menu("Drawing Sharp", "drawing"));
                Config.SubMenu("drawing").AddItem(new MenuItem("disDraw", "Dissabel drawing")).SetValue(false);
                Config.SubMenu("drawing").AddItem(new MenuItem("drawQ", "Draw Q range")).SetValue(true);
                Config.SubMenu("drawing").AddItem(new MenuItem("drawE", "Draw E range")).SetValue(true);
                Config.SubMenu("drawing").AddItem(new MenuItem("drawR", "Draw R range")).SetValue(true);
                Config.SubMenu("drawing").AddItem(new MenuItem("drawWJ", "Draw Wall Jumps")).SetValue(true);

                //Extra
                Config.AddSubMenu(new Menu("Extra Sharp", "extra"));
                Config.SubMenu("extra").AddItem(new MenuItem("djTur", "Dont Jump turrets")).SetValue(true);
                Config.SubMenu("extra").AddItem(new MenuItem("autoLevel", "Auto Level")).SetValue(true);
                Config.SubMenu("extra").AddItem(new MenuItem("levUpSeq", "")).SetValue(new StringList(new string[2] {
                    "Q E W Q start", "Q E Q W start"
                }));

                //LastHit
                Config.AddSubMenu(new Menu("Anti Skillshots", "aShots"));
                //SmartW
                Config.SubMenu("aShots").AddItem(new MenuItem("smartW", "Smart WW")).SetValue(true);
                Config.SubMenu("aShots").AddItem(new MenuItem("smartEDogue", "E use dogue")).SetValue(true);
                Config.SubMenu("aShots").AddItem(new MenuItem("wwDanger", "WW only dangerous")).SetValue(false);
                Config.SubMenu("aShots").AddItem(new MenuItem("wwDmg", "WW if does proc HP")).SetValue(new Slider(0, 100, 1));
                skillShotMenu = getSkilshotMenu();
                Config.SubMenu("aShots").AddSubMenu(skillShotMenu);
                //Debug
                Config.AddSubMenu(new Menu("Debug", "debug"));
                Config.SubMenu("debug").AddItem(new MenuItem("WWLast", "Print last ww blocked")).SetValue(new KeyBind('T', KeyBindType.Press, false));
                Config.SubMenu("debug").AddItem(new MenuItem("saveDash", "saveDashd")).SetValue(new KeyBind('O', KeyBindType.Press, false));
                Config.SubMenu("debug").AddItem(new MenuItem("exportDash", "export dashes")).SetValue(new KeyBind('P', KeyBindType.Press, false));
                Config.SubMenu("debug").AddItem(new MenuItem("deleteDash", "deleteLastDash")).SetValue(new KeyBind('I', KeyBindType.Press, false));

                Config.AddToMainMenu();
                Drawing.OnDraw    += onDraw;
                Game.OnGameUpdate += OnGameUpdate;

                GameObject.OnCreate            += OnCreateObject;
                GameObject.OnDelete            += OnDeleteObject;
                Obj_AI_Base.OnProcessSpellCast += OnProcessSpell;
                CustomEvents.Unit.OnLevelUp    += OnLevelUp;

                Game.OnGameSendPacket    += OnGameSendPacket;
                Game.OnGameProcessPacket += OnGameProcessPacket;

                SkillshotDetector.OnDetectSkillshot += OnDetectSkillshot;
                SkillshotDetector.OnDeleteMissile   += OnDeleteMissile;
            }
            catch
            {
                Game.PrintChat("Oops. Something went wrong with Yasuo - Sharpino");
            }
        }
コード例 #3
0
ファイル: YasuoSharp.cs プロジェクト: WTayllor/LeagueSharp-3
        private static void OnGameUpdate(EventArgs args)
        {
            try
            {
                Yasuo.Q.SetSkillshot(Yasuo.getNewQSpeed(), 50f, float.MaxValue, false, SkillshotType.SkillshotLine);

                if (Yasuo.startDash + 1f < Game.Time && Yasuo.isDashigPro)
                {
                    Yasuo.isDashigPro = false;
                }

                //updateSkillshots();
                //Remove the detected skillshots that have expired.
                DetectedSkillshots.RemoveAll(skillshot => !skillshot.IsActive());

                Obj_AI_Hero target = SimpleTs.GetTarget(1250, SimpleTs.DamageType.Physical);
                if (Orbwalker.ActiveMode.ToString() == "Combo")
                {
                    Yasuo.doCombo(target);
                }

                if (Orbwalker.ActiveMode.ToString() == "LastHit")
                {
                    Yasuo.doLastHit(target);
                    Yasuo.useQSmart(target);
                }

                if (Orbwalker.ActiveMode.ToString() == "Mixed")
                {
                    Yasuo.doLastHit(target);
                    Yasuo.useQSmart(target);
                }

                if (Orbwalker.ActiveMode.ToString() == "LaneClear")
                {
                    Yasuo.doLaneClear(target);
                }

                if (Config.Item("flee").GetValue <KeyBind>().Active)
                {
                    Yasuo.fleeToMouse();
                }

                if (Config.Item("saveDash").GetValue <KeyBind>().Active&& canSave)
                {
                    Yasuo.saveLastDash();
                    canSave = false;
                }
                else
                {
                    canSave = true;
                }

                if (Config.Item("deleteDash").GetValue <KeyBind>().Active&& canDelete)
                {
                    if (Yasuo.dashes.Count > 0)
                    {
                        Yasuo.dashes.RemoveAt(Yasuo.dashes.Count - 1);
                    }
                    canDelete = false;
                }
                else
                {
                    canDelete = true;
                }
                if (Config.Item("exportDash").GetValue <KeyBind>().Active&& canExport)
                {
                    using (var file = new System.IO.StreamWriter(@"C:\YasuoDashes.txt"))
                    {
                        foreach (var dash in Yasuo.dashes)
                        {
                            string dashS = "dashes.Add(new YasDash(new Vector3(" +
                                           dash.from.X.ToString("0.00").Replace(',', '.') + "f," +
                                           dash.from.Y.ToString("0.00").Replace(',', '.') + "f," +
                                           dash.from.Z.ToString("0.00").Replace(',', '.') +
                                           "f),new Vector3(" + dash.to.X.ToString("0.00").Replace(',', '.') + "f," +
                                           dash.to.Y.ToString("0.00").Replace(',', '.') + "f," +
                                           dash.to.Z.ToString("0.00").Replace(',', '.') + "f)));";
                            //new YasDash(new Vector3(X,Y,Z),new Vector3(X,Y,Z))

                            file.WriteLine(dashS);
                        }
                        file.Close();
                    }

                    canExport = false;
                }
                else
                {
                    canExport = true;
                }
                //if (!Yasuo.isSafePoint(Yasuo.Player.Position.To2D()).IsSafe)
                //    Console.WriteLine("not safe");
                if (Config.Item("WWLast").GetValue <KeyBind>().Active)
                {
                    Console.WriteLine("Last WW skill blocked: " + lastSpell);
                    Game.PrintChat("Last WW skill blocked: " + lastSpell);
                }

                if (Config.Item("harassOn").GetValue <bool>() && Orbwalker.ActiveMode.ToString() == "None")
                {
                    Yasuo.useQSmart(target, Config.Item("harQ3Only").GetValue <bool>());
                }
                // if (Config.Item("smartW").GetValue<bool>() && !Config.Item("flee").GetValue<KeyBind>().Active)
                foreach (var mis in DetectedSkillshots)
                {
                    Yasuo.useWSmart(mis);
                    // if (Config.Item("smartEDogue").GetValue<bool>())

                    if (/*mis.IsAboutToHit(300,Yasuo.Player)*/ !Yasuo.isSafePoint(Yasuo.Player.Position.To2D()).IsSafe)
                    {
                        Yasuo.useEtoSafe(mis);
                    }
                }
                //smartEDog
                if (Config.Item("smartEDogue").GetValue <bool>())
                {
                    //Yasuo.useEtoSafe(target, (Orbwalker.ActiveMode.ToString() == "Combo")?true:false);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }