Exemple #1
0
 private static void Draw(EventArgs args)
 {
     foreach (MenuItem item in m_mMenu.SubMenu("draw").Items)
     {
         if (item.Name.Length == 1 && item.GetValue <Circle>().Active)
         {
             SpellEx spell = GetSpell(item.Name[0]);
             if (spell != null)
             {
                 Render.Circle.DrawCircle(myHero.Position, spell.Range, item.GetValue <Circle>().Color);
             }
         }
     }
 }
Exemple #2
0
 public static void ForceCast(SpellEx s, Vector3 pos)
 {
     s.ForceCast(pos);
 }
Exemple #3
0
 public static void ForceCast(SpellEx s, Obj_AI_Base enemy)
 {
     s.ForceCast(enemy);
 }
Exemple #4
0
        private static void GameLoaded(EventArgs args)
        {
            myHero = ObjectManager.Player;

            if (!myHero.BaseSkinName.Equals("Graves"))
            {
                return;
            }

            Q = new SpellEx(SpellSlot.Q, 840f);
            //Q1 = new SpellEx(SpellSlot.Q, 930f);
            W  = new SpellEx(SpellSlot.W, 950f);
            E  = new SpellEx(SpellSlot.E, 450f);
            R  = new SpellEx(SpellSlot.R, 1000f);
            R1 = new SpellEx(SpellSlot.R, 1600f);

            Q.SetSkillshot(0.26f, 20f * (float)Math.PI / 180, 1800f, false, SkillshotType.SkillshotCone);
            //Q1.SetSkillshot(0.26f, 50f, 1950f, false, SkillshotType.SkillshotLine);
            W.SetSkillshot(0.35f, 250f, 1650f, false, SkillshotType.SkillshotCircle);
            R.SetSkillshot(0.25f, 120f, 2100f, false, SkillshotType.SkillshotLine);
            R1.SetSkillshot(0.26f, 20f * (float)Math.PI / 180, 2100f, false, SkillshotType.SkillshotCone);

            m_mMenu = new Menu("GravesSharp", "GravesSharp", true);

            Menu tsMenu = new Menu("Target Selector", "ts");

            TargetSelector.AddToMenu(tsMenu);
            m_mMenu.AddSubMenu(tsMenu);

            Menu orbwalkMenu = new Menu("Orbwalking", "orbwalk");

            m_mMenu.AddSubMenu(orbwalkMenu);
            m_oOrbwalker = new Orbwalking.Orbwalker(orbwalkMenu);

            Menu comboMenu = new Menu("Combo Options", "combo");

            m_mMenu.AddSubMenu(comboMenu);
            comboMenu.AddItem(new MenuItem("enabled", "Combo Enabled").SetValue(new KeyBind(' ', KeyBindType.Press)));
            comboMenu.AddItem(new MenuItem("useQ", "Use Q").SetValue(true));
            comboMenu.AddItem(new MenuItem("useW", "Use W").SetValue(true));
            Menu harassMenu = new Menu("Harass Options", "harass");

            m_mMenu.AddSubMenu(harassMenu);
            harassMenu.AddItem(new MenuItem("enabled", "Harass Enabled").SetValue(new KeyBind('C', KeyBindType.Press)));
            harassMenu.AddItem(new MenuItem("useQ", "Use Q").SetValue(true));
            harassMenu.AddItem(new MenuItem("useW", "Use W").SetValue(false));
            harassMenu.AddItem(new MenuItem("manaSlider", "Harass Mana Percent").SetValue(new Slider(15, 0, 100)));

            /*Menu farmMenu = new Menu("Farm Options", "farm");
             * m_config.AddSubMenu(farmMenu);
             *      farmMenu.AddItem(new MenuItem("enabled", "Farm Enabled").SetValue(new KeyBind('V', KeyBindType.Press)));
             * //farm for later
             */

            MenuItem comboDmg = new MenuItem("comboDmg", "Draw HPBar Combo Damage").SetValue(true);

            Utility.HpBarDamageIndicator.DamageToUnit += delegate(Obj_AI_Hero hero)
            {
                float dmg = 0;
                if (Ready(Q))
                {
                    dmg += (float)myHero.GetSpellDamage(hero, SpellSlot.Q);
                }
                if (Ready(W))
                {
                    dmg += (float)myHero.GetSpellDamage(hero, SpellSlot.W);
                }
                if (Ready(R))
                {
                    dmg += (float)myHero.GetSpellDamage(hero, SpellSlot.R);
                }
                dmg += (float)myHero.GetAutoAttackDamage(hero, true) * 3;
                return(dmg);
            };
            Utility.HpBarDamageIndicator.Enabled = comboDmg.GetValue <bool>();
            comboDmg.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                Utility.HpBarDamageIndicator.Enabled = eventArgs.GetNewValue <bool>();
            };

            Menu drawMenu = new Menu("Draw Options", "draw");

            m_mMenu.AddSubMenu(drawMenu);
            drawMenu.AddItem(new MenuItem("Q", "Draw Q Range").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255))));
            drawMenu.AddItem(new MenuItem("W", "Draw W Range").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255))));
            drawMenu.AddItem(new MenuItem("E", "Draw E Range").SetValue(new Circle(true, Color.FromArgb(100, 255, 0, 255))));
            drawMenu.AddItem(new MenuItem("R", "Draw R Range").SetValue(new Circle(false, Color.FromArgb(100, 255, 0, 255))));
            drawMenu.AddItem(new MenuItem("panicE", "Draw E Panic Status").SetValue(true));
            drawMenu.AddItem(comboDmg);
            Menu miscMenu = new Menu("Misc Options", "misc");

            m_mMenu.AddSubMenu(miscMenu);
            miscMenu.AddItem(new MenuItem("castTime", "When to Cast Spells").SetValue(new StringList(new[] { "After Auto Attack", "Any Time" }, 0))).ValueChanged += CastTimeChanged;
            miscMenu.AddItem(new MenuItem("antiGapCloseE", "Use E as Anti-Gapclose").SetValue(true));
            miscMenu.AddItem(new MenuItem("castE", "Enable E Panic Mode").SetValue(new KeyBind('A', KeyBindType.Toggle))).ValueChanged += CastEChanged;
            miscMenu.AddItem(new MenuItem("castEDisable", "Disable Cast E After x Seconds").SetValue(new Slider(0, 0, 25)));
            miscMenu.AddItem(new MenuItem("useQ", "Use Q in E Panic Mode").SetValue(true));
            miscMenu.AddItem(new MenuItem("waitTimeQ", "Wait Time if Q is Down").SetValue(new Slider(3, 0, 15)));
            miscMenu.AddItem(new MenuItem("turnOffAfterAA", "Turn off E Panic Mode After AA").SetValue(true));
            miscMenu.AddItem(new MenuItem("useW", "Cast W in E Panic Mode").SetValue(true));
            miscMenu.AddItem(new MenuItem("autoUlt", "Auto Aim Ult").SetValue(new KeyBind('R', KeyBindType.Press)));
            Menu ksMenu = new Menu("KS Options", "ks");

            m_mMenu.AddSubMenu(ksMenu);
            ksMenu.AddItem(new MenuItem("ksQ", "KS with Q").SetValue(true));
            ksMenu.AddItem(new MenuItem("ksW", "KS with W").SetValue(false));
            ksMenu.AddItem(new MenuItem("ksR", "KS with R").SetValue(true));

            m_mMenu.AddToMainMenu();

            Drawing.OnDraw += delegate(EventArgs eventArgs)
            {
                if (m_mMenu.SubMenu("draw").Item("panicE").GetValue <bool>())
                {
                    string text  = "";
                    string text2 = "";
                    if (m_mMenu.SubMenu("misc").Item("castE").GetValue <KeyBind>().Active)
                    {
                        text += "Panic E Enabled";
                        if (m_mMenu.SubMenu("misc").Item("castEDisable").GetValue <Slider>().Value > 0)
                        {
                            text2 = (String.Format("Tuning off in {0} seconds", (m_iTurnOffCastE - Environment.TickCount) / 1000));
                        }
                    }

                    if (text != "")
                    {
                        text = text.ToUpper();
                        double x = (Drawing.Width - (Drawing.Width * 0.15));
                        double y = (Drawing.Height - (Drawing.Height * 0.85));

                        Drawing.DrawText((float)x, (float)y, Color.FromArgb(255, 255, 0, 0), text);

                        if (text2 != "")
                        {
                            text2 = text2.ToUpper();
                            x     = (Drawing.Width - (Drawing.Width * 0.17));
                            y     = (Drawing.Height - (Drawing.Height * 0.80));
                            Drawing.DrawText((float)x, (float)y, Color.FromArgb(255, 255, 0, 0), text2);
                        }
                    }
                }
            };

            Game.OnGameUpdate += delegate(EventArgs eventArgs)
            {
                if (m_mMenu.SubMenu("misc").Item("autoUlt").GetValue <KeyBind>().Active)
                {
                    Obj_AI_Base target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Physical);
                    if (target.IsValid && target.IsTargetable)
                    {
                        if (R1.Cast(target) != Spell.CastStates.SuccessfullyCasted)
                        {
                            R.Cast(target);
                        }
                    }
                }
            };
            Game.OnGameUpdate += KillSteal;
            Drawing.OnDraw    += Draw;
            AntiGapcloser.OnEnemyGapcloser += AntiGapcloser_OnEnemyGapcloser;
            Orbwalking.AfterAttack         += PanicE;


            if (m_mMenu.SubMenu("misc").Item("castTime").GetValue <StringList>().SelectedValue.Equals("After Auto Attack"))
            {
                ReadyForSpellCast.OnReadyForSpellCast += Combo;
                ReadyForSpellCast.OnReadyForSpellCast += Harass;
            }
            else if (m_mMenu.SubMenu("misc").Item("castTime").GetValue <StringList>().SelectedValue.Equals("Any Time"))
            {
                Game.OnGameUpdate += Combo;
                Game.OnGameUpdate += Harass;
            }

            Game.OnGameUpdate += delegate(EventArgs eventArgs)
            {
                if (m_mMenu.SubMenu("misc").Item("castEDisable").GetValue <Slider>().Value > 0 && Environment.TickCount >= m_iTurnOffCastE)
                {
                    KeyBind bind = m_mMenu.SubMenu("misc").Item("castE").GetValue <KeyBind>();
                    bind.Active = false;
                    m_mMenu.SubMenu("misc").Item("castE").SetValue(bind);
                }
            };

            Game.PrintChat("<font color=\"#00BFFF\">GravesSharp -</font> <font color=\"#FFFFFF\">Loaded</font>");
        }